|
|
@ -61,10 +61,41 @@ define(['uploader'], function(uploader) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#uploadLogoBtn').on('click', function() {
|
|
|
|
|
|
|
|
uploader.open(RELATIVE_PATH + '/admin/uploadlogo', {}, 0, function(image) {
|
|
|
|
|
|
|
|
$('#logoUrl').val(image);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uploader.hideAlerts();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#uploadFaviconBtn').on('click', function() {
|
|
|
|
|
|
|
|
uploader.open(RELATIVE_PATH + '/admin/uploadfavicon', {}, 0, function(icon) {
|
|
|
|
|
|
|
|
$('#faviconUrl').val(icon);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uploader.hideAlerts();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#settings-tab a').click(function (e) {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
$(this).tab('show');
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Settings.remove = function(key) {
|
|
|
|
|
|
|
|
socket.emit('admin.config.remove', key);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function saveField(field) {
|
|
|
|
function saveField(field) {
|
|
|
|
field = $(field);
|
|
|
|
field = $(field);
|
|
|
|
var key = field.attr('data-field'),
|
|
|
|
var key = field.attr('data-field'),
|
|
|
|
value;
|
|
|
|
value, inputType;
|
|
|
|
|
|
|
|
|
|
|
|
if (field.is('input')) {
|
|
|
|
if (field.is('input')) {
|
|
|
|
inputType = field.attr('type');
|
|
|
|
inputType = field.attr('type');
|
|
|
@ -113,37 +144,6 @@ define(['uploader'], function(uploader) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#uploadLogoBtn').on('click', function() {
|
|
|
|
|
|
|
|
uploader.open(RELATIVE_PATH + '/admin/uploadlogo', {}, 0, function(image) {
|
|
|
|
|
|
|
|
$('#logoUrl').val(image);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uploader.hideAlerts();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#uploadFaviconBtn').on('click', function() {
|
|
|
|
|
|
|
|
uploader.open(RELATIVE_PATH + '/admin/uploadfavicon', {}, 0, function(icon) {
|
|
|
|
|
|
|
|
$('#faviconUrl').val(icon);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uploader.hideAlerts();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#settings-tab a').click(function (e) {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
$(this).tab('show');
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Settings.remove = function(key) {
|
|
|
|
|
|
|
|
socket.emit('admin.config.remove', key);
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return Settings;
|
|
|
|
return Settings;
|
|
|
|