|
|
@ -448,17 +448,18 @@ define('settings', function () {
|
|
|
|
helper.persistSettings(hash, Settings.cfg, notify, callback);
|
|
|
|
helper.persistSettings(hash, Settings.cfg, notify, callback);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
load: function (hash, formEl, callback) {
|
|
|
|
load: function (hash, formEl, callback) {
|
|
|
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
socket.emit('admin.settings.get', {
|
|
|
|
socket.emit('admin.settings.get', {
|
|
|
|
hash: hash
|
|
|
|
hash: hash
|
|
|
|
}, function (err, values) {
|
|
|
|
}, function (err, values) {
|
|
|
|
if (!err) {
|
|
|
|
if (err) {
|
|
|
|
$(formEl).deserialize(values);
|
|
|
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.log('[settings] Unable to load settings for hash: ', hash);
|
|
|
|
console.log('[settings] Unable to load settings for hash: ', hash);
|
|
|
|
|
|
|
|
return callback(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(formEl).deserialize(values);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
callback(null, values);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
save: function (hash, formEl, callback) {
|
|
|
|
save: function (hash, formEl, callback) {
|
|
|
|