mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
jsbeautify
This commit is contained in:
@@ -534,10 +534,10 @@ define(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) {
|
||||||
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);
|
$(formEl).deserialize(values);
|
||||||
if (typeof callback === 'function') {
|
if (typeof callback === 'function') {
|
||||||
@@ -548,12 +548,12 @@ define(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
save: function(hash, formEl, callback) {
|
save: function (hash, formEl, callback) {
|
||||||
formEl = $(formEl);
|
formEl = $(formEl);
|
||||||
if (formEl.length) {
|
if (formEl.length) {
|
||||||
var values = formEl.serializeObject();
|
var values = formEl.serializeObject();
|
||||||
// "Fix" checkbox values, so that unchecked options are not omitted
|
// "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);
|
inputEl = $(inputEl);
|
||||||
if (!inputEl.is(':checked')) {
|
if (!inputEl.is(':checked')) {
|
||||||
values[inputEl.attr('id')] = 'off';
|
values[inputEl.attr('id')] = 'off';
|
||||||
@@ -562,7 +562,7 @@ define(function () {
|
|||||||
socket.emit('admin.settings.set', {
|
socket.emit('admin.settings.set', {
|
||||||
hash: hash,
|
hash: hash,
|
||||||
values: values
|
values: values
|
||||||
}, function(err) {
|
}, function (err) {
|
||||||
app.alert({
|
app.alert({
|
||||||
title: 'Settings Saved',
|
title: 'Settings Saved',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
Reference in New Issue
Block a user