增加网站Title/Footer空字符串保护

This commit is contained in:
Argo-Lenovo 2016-11-10 01:27:58 +08:00
parent d997b41b82
commit d6bad30cbf
3 changed files with 12 additions and 3 deletions

View File

@ -49,7 +49,6 @@
}
});
$('table').smartTable({
url: '../api/Groups', //请求后台的URL*
sortName: 'GroupName',

View File

@ -14,11 +14,19 @@
assign: [{
id: 'sysSave',
click: function (row, data) {
if (data.Title == "") {
swal("请输入网站标题内容", "保存操作", "error");
return;
}
Profiles.saveWebSite({ name: '网站标题', code: data.Title, category: '网站设置' });
}
}, {
id: 'footSave',
click: function (row, data) {
if (data.Title == "") {
swal("请输入网站页脚内容", "保存操作", "error");
return;
}
Profiles.saveWebSite({ name: '网站页脚', code: data.Footer, category: '网站设置' });
}
}]

View File

@ -6,6 +6,8 @@
@section Javascript {
<script src="~/content/js/longbow.dataentity.js"></script>
<script src="~/content/js/sweetalert.js"></script>
<script src="~/content/js/jquery.validate.js"></script>
<script src="~/content/js/messages_zh.js"></script>
<script src="~/Scripts/Profiles.js"></script>
}
@section css {
@ -22,7 +24,7 @@
<div class="panel-heading">系统名称设置</div>
<div class="panel-body">
<div class="input-group form-group">
<input type="text" class="form-control" id="sysName" value="@Model.Title" />
<input type="text" class="form-control" id="sysName" placeholder="请输入网站标题" value="@Model.Title" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="sysSave">保存</button>
</span>
@ -33,7 +35,7 @@
<div class="panel-heading">页脚设置</div>
<div class="panel-body">
<div class="input-group form-group">
<input type="text" class="form-control" id="sysFoot" value="@Model.Footer" />
<input type="text" class="form-control" id="sysFoot" placeholder="请输入网站页脚" value="@Model.Footer" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="footSave">保存</button>
</span>