Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OC/legacy-loader.js')
-rw-r--r--core/src/OC/legacy-loader.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/src/OC/legacy-loader.js b/core/src/OC/legacy-loader.js
index ece9f3c3fc1..3fedc07a081 100644
--- a/core/src/OC/legacy-loader.js
+++ b/core/src/OC/legacy-loader.js
@@ -1,7 +1,9 @@
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
- * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
@@ -11,15 +13,17 @@
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY without even the implied warranty of
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
import $ from 'jquery'
+import { generateFilePath } from '@nextcloud/router'
const loadedScripts = {}
const loadedStyles = []
@@ -37,7 +41,7 @@ export const addScript = (app, script, ready) => {
console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead')
let deferred
- const path = OC.filePath(app, 'js', script + '.js')
+ const path = generateFilePath(app, 'js', script + '.js')
if (!loadedScripts[path]) {
deferred = $.Deferred()
$.getScript(path, () => deferred.resolve())
@@ -59,7 +63,7 @@ export const addScript = (app, script, ready) => {
export const addStyle = (app, style) => {
console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead')
- const path = OC.filePath(app, 'css', style + '.css')
+ const path = generateFilePath(app, 'css', style + '.css')
if (loadedStyles.indexOf(path) === -1) {
loadedStyles.push(path)
if (document.createStyleSheet) {