mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
moved js code in footer.tpl for admin into footer.js
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
nodebb_admin.themes = {
|
||||
render: function(bootswatch) {
|
||||
var themeFrag = document.createDocumentFragment(),
|
||||
|
||||
|
||||
var nodebb_admin = (function(nodebb_admin) {
|
||||
|
||||
var themes = {};
|
||||
|
||||
themes.render = function(bootswatch) {
|
||||
var themeFrag = document.createDocumentFragment(),
|
||||
themeEl = document.createElement('li'),
|
||||
themeContainer = document.querySelector('#content .themes'),
|
||||
numThemes = bootswatch.themes.length;
|
||||
@@ -24,10 +29,16 @@ nodebb_admin.themes = {
|
||||
themeContainer.innerHTML = '';
|
||||
themeContainer.appendChild(themeFrag);
|
||||
}
|
||||
};
|
||||
|
||||
nodebb_admin.themes = themes;
|
||||
|
||||
return nodebb_admin;
|
||||
|
||||
}(nodebb_admin || {}));
|
||||
|
||||
|
||||
(function() {
|
||||
var scriptEl = document.createElement('script');
|
||||
var scriptEl = document.createElement('script');
|
||||
scriptEl.src = 'http://api.bootswatch.com?callback=nodebb_admin.themes.render';
|
||||
document.body.appendChild(scriptEl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user