First separation commit.
Added LICENSE, README.md, CONTRIBUTORS.md
This commit is contained in:
parent
09513af31b
commit
4678528d00
657 changed files with 422 additions and 0 deletions
15
src/scripts/themeloader.js
Normal file
15
src/scripts/themeloader.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
define(["userSettings", "skinManager", "connectionManager", "events"], function(userSettings, skinManager, connectionManager, events) {
|
||||
"use strict";
|
||||
var currentViewType;
|
||||
pageClassOn("viewbeforeshow", "page", function() {
|
||||
var classList = this.classList,
|
||||
viewType = classList.contains("type-interior") || classList.contains("wizardPage") ? "a" : "b";
|
||||
if (viewType !== currentViewType) {
|
||||
currentViewType = viewType;
|
||||
var theme, context;
|
||||
"a" === viewType ? (theme = userSettings.dashboardTheme(), context = "serverdashboard") : theme = userSettings.theme(), skinManager.setTheme(theme, context)
|
||||
}
|
||||
}), events.on(connectionManager, "localusersignedin", function(e, user) {
|
||||
currentViewType = null
|
||||
})
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue