修改BUG:网站默认样式被应用两次
This commit is contained in:
parent
8b29ff7160
commit
9dd7283cb2
|
@ -347,7 +347,8 @@ $(function () {
|
|||
$.bc({
|
||||
Id: 1, url: Dicts.url, data: { type: 'activeCss' }, swal: false,
|
||||
callback: function (result) {
|
||||
$('head').append($.format('<link href="../Content/css/{0}" rel="stylesheet" type="text/css" />', result[0].Code));
|
||||
if (result.length > 0)
|
||||
$('head').append($.format('<link href="../Content/css/{0}" rel="stylesheet" type="text/css" />', result[0].Code));
|
||||
}
|
||||
});
|
||||
if ($.isFunction($.validator)) {
|
||||
|
|
|
@ -176,7 +176,8 @@
|
|||
$.bc({
|
||||
Id: 1, url: Dicts.url, data: { type: 'activeCss' }, swal: false,
|
||||
callback: function (result) {
|
||||
$('#dictCssDefine').selectval(result[0].Code);
|
||||
if (result.length > 0)
|
||||
$('#dictCssDefine').selectval(result[0].Code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace Bootstrap.DataAccess
|
|||
public static IEnumerable<Dict> RetrieveActiveCss()
|
||||
{
|
||||
var data = RetrieveDicts();
|
||||
return data.Where(d => d.Category == "当前样式");
|
||||
return data.Where(d => d.Category == "当前样式" && !d.Code.Equals("site.css", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存网站个性化设置
|
||||
|
|
Loading…
Reference in New Issue