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);
|
||||
},
|
||||
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();
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user