diff --git a/Bootstrap.Admin/Scripts/Settings.js b/Bootstrap.Admin/Scripts/Settings.js index 3553d522..90052e11 100644 --- a/Bootstrap.Admin/Scripts/Settings.js +++ b/Bootstrap.Admin/Scripts/Settings.js @@ -57,16 +57,14 @@ id: 'cssSave', click: function (row, data) { var cssDefine = $('#dictCssDefine').val(); - if (cssDefine) { - $.bc({ - url: Settings.url, data: { name: '使用样式', code: cssDefine, category: '当前样式' }, title: '网站样式', - callback: function (result) { - if (result) { - window.setTimeout(function () { window.location.reload(true); }, 1000); - } + $.bc({ + url: Settings.url, data: { name: '使用样式', code: cssDefine, category: '当前样式' }, title: '网站样式', + callback: function (result) { + if (result) { + window.setTimeout(function () { window.location.reload(true); }, 1000); } - }); - } + } + }); } }] } @@ -167,7 +165,7 @@ Id: 1, url: Dicts.url, data: { type: 'css' }, swal: false, callback: function (result) { var html = result.map(function (ele, index) { return $.format('
  • {0}
  • ', ele.Name, ele.Code); }).join(''); - $('#cssContainer').html(html); + $('#cssContainer').append(html); $.bc({ Id: 1, url: Dicts.url, data: { type: 'activeCss' }, swal: false, callback: function (result) { diff --git a/Bootstrap.Admin/Views/Admin/Settings.cshtml b/Bootstrap.Admin/Views/Admin/Settings.cshtml index 230103d9..bd36d8dc 100644 --- a/Bootstrap.Admin/Views/Admin/Settings.cshtml +++ b/Bootstrap.Admin/Views/Admin/Settings.cshtml @@ -46,12 +46,12 @@