修改BUG:网站设置支持默认皮肤选择

This commit is contained in:
Argo-Surface 2017-06-13 15:04:06 +08:00
parent e97db1a077
commit 96fc494fef
2 changed files with 10 additions and 12 deletions

View File

@ -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('<li><a href="#" data-val="{1}">{0}</a></li>', 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) {

View File

@ -46,12 +46,12 @@
<div class="form-group col-xs-12">
<label class="control-label">网站样式</label>
<div class="dropdown lgbDropdown">
<a id="dictCssDefine" class="btn btn-success" data-toggle="dropdown" data-default-val="site.css">
<a id="dictCssDefine" class="btn btn-success" data-toggle="dropdown" data-default-val="">
<span>默认样式</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" id="cssContainer">
<li><a href="#" data-val="site.css">默认样式</a></li>
<li><a href="#" data-val="">默认样式</a></li>
</ul>
</div>
<button class="btn btn-default pull-right" type="button" id="cssSave">保存</button>