$(function () { $('a[data-admin="False"]').hide(); $('#headerDataForm').autoValidate({ sysName: { required: true, maxlength: 50 } }, { button: ['sysSave'] }); $('#footerDataForm').autoValidate({ sysFoot: { required: true, maxlength: 50 } }, { button: ['footSave'] }); var bsa = new BootstrapAdmin({ url: Profiles.url, bootstrapTable: null, validateForm: null, modal: null, dataEntity: new DataEntity({ map: { Title: "sysName", Footer: "sysFoot" } }), click: { assign: [{ id: 'sysSave', click: function (row, data) { if ($(this).attr('data-valid') == "true") { $.bc({ url: Profiles.url, data: { name: '网站标题', code: data.Title, category: Profiles.title }, title: Profiles.title, callback: function (result) { if (result) $('#websiteTitle').text(data.Title); } }); } } }, { id: 'footSave', click: function (row, data) { if ($(this).attr('data-valid') == "true") { $.bc({ url: Profiles.url, data: { name: '网站页脚', code: data.Footer, category: Profiles.title }, title: Profiles.title, callback: function (result) { if (result) $('#websiteFooter').text(data.Footer); } }); } } }] } }); function listCache(options) { options = $.extend({ url: '../../CacheList.axd' }, options); $.bc({ url: options.url, swal: false, callback: function (result) { if (result) { result = $.parseJSON(result); if ($.isArray(result)) { var html = '