jsbeautify

v1.18.x
Ole Reglitzki 11 years ago
parent d76ba519d4
commit 4da8121827

@ -534,10 +534,10 @@ define(function () {
}
helper.persistSettings(hash, Settings.cfg, notify, callback);
},
load: function(hash, formEl, callback) {
load: function (hash, formEl, callback) {
socket.emit('admin.settings.get', {
hash: hash
}, function(err, values) {
}, function (err, values) {
if (!err) {
$(formEl).deserialize(values);
if (typeof callback === 'function') {
@ -548,12 +548,12 @@ define(function () {
}
});
},
save: function(hash, formEl, callback) {
save: function (hash, formEl, callback) {
formEl = $(formEl);
if (formEl.length) {
var values = formEl.serializeObject();
// "Fix" checkbox values, so that unchecked options are not omitted
formEl.find('input[type="checkbox"]').each(function(idx, inputEl) {
formEl.find('input[type="checkbox"]').each(function (idx, inputEl) {
inputEl = $(inputEl);
if (!inputEl.is(':checked')) {
values[inputEl.attr('id')] = 'off';
@ -562,7 +562,7 @@ define(function () {
socket.emit('admin.settings.set', {
hash: hash,
values: values
}, function(err) {
}, function (err) {
app.alert({
title: 'Settings Saved',
type: 'success',

Loading…
Cancel
Save