|
|
@ -5,18 +5,10 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
|
|
|
|
var Settings = {};
|
|
|
|
var Settings = {};
|
|
|
|
|
|
|
|
|
|
|
|
Settings.init = function() {
|
|
|
|
Settings.init = function() {
|
|
|
|
Settings.prepare();
|
|
|
|
$(window).on('action:config.loaded', Settings.prepare);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Settings.prepare = function(callback) {
|
|
|
|
Settings.prepare = function(callback) {
|
|
|
|
// Come back in 125ms if the config isn't ready yet
|
|
|
|
|
|
|
|
if (!app.config) {
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
|
|
Settings.prepare(callback);
|
|
|
|
|
|
|
|
}, 125);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Populate the fields on the page from the config
|
|
|
|
// Populate the fields on the page from the config
|
|
|
|
var fields = $('#content [data-field]'),
|
|
|
|
var fields = $('#content [data-field]'),
|
|
|
|
numFields = fields.length,
|
|
|
|
numFields = fields.length,
|
|
|
|