From 5999b212d1110a56f2c1f99820a9053d184b9a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 4 Aug 2017 14:27:37 +0200 Subject: [PATCH] Refactor reloadStylesheets to receive absolute URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/theming/js/settings-admin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index 8c2ab2bc08e2b..9d8e706e124b5 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 = $("", { 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();