Skip to content

Commit

Permalink
Refactor reloadStylesheets to receive absolute URLs
Browse files Browse the repository at this point in the history
This is a preparatory step for a following change.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Aug 4, 2017
1 parent 9f69200 commit afadefb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/theming/js/settings-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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();
Expand Down

0 comments on commit afadefb

Please sign in to comment.