v1.18.x
Julian Lam 9 years ago
parent 019f5ff35f
commit 8fd5236641

@ -4,14 +4,6 @@
define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) { define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
var Settings = {}; var Settings = {};
Settings.init = function() {
if (!app.config) {
$(window).on('action:config.loaded', Settings.prepare);
} else {
Settings.prepare();
}
};
Settings.populateTOC = function() { Settings.populateTOC = function() {
$('.settings-header').each(function() { $('.settings-header').each(function() {
var header = $(this).text(), var header = $(this).text(),
@ -168,11 +160,9 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
return callback(err); return callback(err);
} }
if (app.config) { for(var field in data) {
for(var field in data) { if (data.hasOwnProperty(field)) {
if (data.hasOwnProperty(field)) { app.config[field] = data[field];
app.config[field] = data[field];
}
} }
} }

@ -6,7 +6,7 @@
<script> <script>
require(['admin/settings'], function(Settings) { require(['admin/settings'], function(Settings) {
Settings.init(); Settings.prepare();
Settings.populateTOC(); Settings.populateTOC();
}); });
</script> </script>

Loading…
Cancel
Save