-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
- change a value in the theming app
- wait for it to be saved
- then the "Loading preview" will show up
- actual: it loads endlessly and if you look at the network it will show you a 404 on
css/core/server.css - expected: the server.css is properly loaded and the loading spinner goes away
Problem: The server.css is in my instance for example served under css/core/72408cbdff8901cd16b886aeabcc367c-server.css - I guess the reloadStylesheets() method needs an adjustment to fetch the current name of this an reload that css.
server/apps/theming/js/settings-admin.js
Lines 44 to 65 in 3470d0a
| var reloadStylesheets = function(cssFile) { | |
| var queryString = '?reload=' + new Date().getTime(); | |
| var url = OC.generateUrl(cssFile) + queryString; | |
| var old = $('link[href*="' + cssFile.replace("/","\/") + '"]'); | |
| var stylesheet = $("<link/>", { | |
| rel: "stylesheet", | |
| type: "text/css", | |
| href: url | |
| }); | |
| stylesheet.load(function () { | |
| $(old).remove(); | |
| stylesheetsLoaded--; | |
| if(stylesheetsLoaded === 0) { | |
| $('#theming_settings_loading').hide(); | |
| var response = { status: 'success', data: {message: t('theming', 'Saved')}}; | |
| OC.msg.finishedSaving('#theming_settings_msg', response); | |
| } | |
| }); | |
| stylesheet.appendTo("head"); | |
| }; | |
| reloadStylesheets('/css/core/server.css'); |
cc @danxuliu @juliushaertl @nextcloud/theming
Valid for at least master.