diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-08-04 14:27:37 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-08-10 13:45:31 +0200 |
commit | 364b1b4a206e1ac0c20d7b6b3fda2b2e0052e9a5 (patch) | |
tree | ba09380da7a3366eee1a73f3dfa762a7075bb588 | |
parent | 5b0d7056e81de003acd529a9d35470904e73a91c (diff) | |
download | nextcloud-server-364b1b4a206e1ac0c20d7b6b3fda2b2e0052e9a5.tar.gz nextcloud-server-364b1b4a206e1ac0c20d7b6b3fda2b2e0052e9a5.zip |
Refactor reloadStylesheets to receive absolute URLs
This is a preparatory step for a following change in which
reloadStylesheets will have to be able to receive absolute URLs.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r-- | apps/theming/js/settings-admin.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index 48c479cc9c3..8a854a37414 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -43,7 +43,7 @@ function preview(setting, value) { var stylesheetsLoaded = 2; var reloadStylesheets = function(cssFile) { var queryString = '?reload=' + new Date().getTime(); - var url = OC.generateUrl(cssFile) + queryString; + var url = cssFile + queryString; var old = $('link[href*="' + cssFile.replace("/","\/") + '"]'); var stylesheet = $("<link/>", { rel: "stylesheet", @@ -62,8 +62,8 @@ function preview(setting, value) { stylesheet.appendTo("head"); }; - reloadStylesheets('/css/core/server.css'); - reloadStylesheets('/apps/theming/styles'); + reloadStylesheets(OC.generateUrl('/css/core/server.css')); + reloadStylesheets(OC.generateUrl('/apps/theming/styles')); // Preview images var timestamp = new Date().getTime(); |