diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index 3992ff74..cd0e51e9 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -23,7 +23,7 @@ }, 200); }); - $('footer > div > span').text($('#footer').val()); + $('#websiteFooter').text($('#footer').val()); $('#sidebar .sub-menu > a').click(function () { var o = ($(this).offset()); diff --git a/Bootstrap.Admin/Content/js/framework.js b/Bootstrap.Admin/Content/js/framework.js index 3c4e43b7..9524289b 100644 --- a/Bootstrap.Admin/Content/js/framework.js +++ b/Bootstrap.Admin/Content/js/framework.js @@ -289,6 +289,9 @@ } } }; + + window.bd = processData; + // Roles Role = { url: '../api/Roles/', @@ -405,15 +408,6 @@ processData.call(this, { Id: roleId, callback: callback, method: "PUT", data: { type: "role", menuIds: menuIds } }); }; - //Profiles - Profiles = { - url: '../api/Profiles/', - title: "个性化维护" - }; - Profiles.saveWebSite = function (options) { - processData.call(this, { data: options }); - }; - // Exceptions Exceptions = { url: '../api/Exceptions/', diff --git a/Bootstrap.Admin/Scripts/Profiles.js b/Bootstrap.Admin/Scripts/Profiles.js index 23993fbb..d0259561 100644 --- a/Bootstrap.Admin/Scripts/Profiles.js +++ b/Bootstrap.Admin/Scripts/Profiles.js @@ -17,8 +17,10 @@ button: ['footSave'] }); + var options = { url: '../api/Profiles', title: '网站设置' }; + var bsa = new BootstrapAdmin({ - url: '../api/Profiles', + url: options.url, bootstrapTable: null, validateForm: null, modal: null, @@ -33,50 +35,55 @@ id: 'sysSave', click: function (row, data) { if ($(this).attr('data-valid') == "true") { - Profiles.saveWebSite({ name: '网站标题', code: data.Title, category: '网站设置' }); + var op = $.extend({ + data: { name: '网站标题', code: data.Title, category: '网站设置' }, + callback: function (result) { + $('#websiteTitle').text(data.Title); + } + }, options) + bd(op); } } }, { id: 'footSave', click: function (row, data) { if ($(this).attr('data-valid') == "true") { - Profiles.saveWebSite({ name: '网站页脚', code: data.Footer, category: '网站设置' }); + var op = $.extend({ + data: { name: '网站页脚', code: data.Footer, category: '网站设置' }, + callback: function (result) { + $('#websiteFooter').text(data.Footer); + } + }, options) + bd(op); } } }] } }); - var html = '