|
@@ -8,42 +8,30 @@
|
|
|
<c:set var="basePath" value="${pageContext.request.contextPath}"/>
|
|
<c:set var="basePath" value="${pageContext.request.contextPath}"/>
|
|
|
<div id="updateDialog" class="crudDialog">
|
|
<div id="updateDialog" class="crudDialog">
|
|
|
<form id="updateForm" method="post">
|
|
<form id="updateForm" method="post">
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label for="icon">图标</label>
|
|
|
|
|
- <input id="icon" type="text" class="form-control" name="icon" maxlength="20" value="${system.icon}">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label for="title">标题</label>
|
|
|
|
|
- <input id="title" type="text" class="form-control" name="title" maxlength="20" value="${system.title}">
|
|
|
|
|
- </div>
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="name">名称</label>
|
|
<label for="name">名称</label>
|
|
|
- <input id="name" type="text" class="form-control" name="name" maxlength="20" value="${system.name}">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label for="theme">主题</label>
|
|
|
|
|
- <input id="theme" type="text" class="form-control" name="theme" maxlength="50" value="${system.theme}">
|
|
|
|
|
|
|
+ <input id="name" type="text" class="form-control" name="name" maxlength="20" value="${tag.name}">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- <label for="banner">背景图</label>
|
|
|
|
|
- <input id="banner" type="text" class="form-control" name="banner" maxlength="50" value="${system.banner}">
|
|
|
|
|
|
|
+ <label for="alias">别名</label>
|
|
|
|
|
+ <input id="alias" type="text" class="form-control" name="alias" maxlength="20" value="${tag.alias}">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="description">描述</label>
|
|
<label for="description">描述</label>
|
|
|
- <input id="description" type="text" class="form-control" name="description" maxlength="300" value="${system.description}">
|
|
|
|
|
|
|
+ <input id="description" type="text" class="form-control" name="description" maxlength="200" value="${tag.description}">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
- <label for="basepath">根目录</label>
|
|
|
|
|
- <input id="basepath" type="text" class="form-control" name="basepath" maxlength="100" value="${system.basepath}">
|
|
|
|
|
|
|
+ <label for="icon">图标</label>
|
|
|
|
|
+ <input id="icon" type="text" class="form-control" name="icon" maxlength="20" value="${tag.icon}">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="radio">
|
|
<div class="radio">
|
|
|
- <div class="radio radio-inline radio-success">
|
|
|
|
|
- <input id="status_1" type="radio" name="status" value="1" <c:if test="${system.status==1}">checked</c:if>>
|
|
|
|
|
- <label for="status_1">正常 </label>
|
|
|
|
|
|
|
+ <div class="radio radio-inline radio-info">
|
|
|
|
|
+ <input id="type_1" type="radio" name="type" value="1" <c:if test="${tag.type==1}">checked</c:if>>
|
|
|
|
|
+ <label for="type_1">普通 </label>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="radio radio-inline">
|
|
|
|
|
- <input id="status_0" type="radio" name="status" value="-1" <c:if test="${system.status!=1}">checked</c:if>>
|
|
|
|
|
- <label for="status_0">锁定 </label>
|
|
|
|
|
|
|
+ <div class="radio radio-inline radio-danger">
|
|
|
|
|
+ <input id="type_2" type="radio" name="type" value="2" <c:if test="${tag.type==2}">checked</c:if>>
|
|
|
|
|
+ <label for="type_2">热门 </label>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group text-right dialog-buttons">
|
|
<div class="form-group text-right dialog-buttons">
|
|
@@ -53,40 +41,40 @@
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
<script>
|
|
<script>
|
|
|
-function createSubmit() {
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- type: 'post',
|
|
|
|
|
- url: '${basePath}/manage/system/update/${system.systemId}',
|
|
|
|
|
- data: $('#updateForm').serialize(),
|
|
|
|
|
- beforeSend: function() {
|
|
|
|
|
- if ($('#title').val() == '') {
|
|
|
|
|
- $('#title').focus();
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if ($('#name').val() == '') {
|
|
|
|
|
- $('#name').focus();
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- success: function(result) {
|
|
|
|
|
- if (result.code != 1) {
|
|
|
|
|
- if (result.data instanceof Array) {
|
|
|
|
|
- $.each(result.data, function(index, value) {
|
|
|
|
|
- $.confirm({
|
|
|
|
|
- theme: 'dark',
|
|
|
|
|
- animation: 'rotateX',
|
|
|
|
|
- closeAnimation: 'rotateX',
|
|
|
|
|
- title: false,
|
|
|
|
|
- content: value.errorMsg,
|
|
|
|
|
- buttons: {
|
|
|
|
|
- confirm: {
|
|
|
|
|
- text: '确认',
|
|
|
|
|
- btnClass: 'waves-effect waves-button waves-light'
|
|
|
|
|
|
|
+ function createSubmit() {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: 'post',
|
|
|
|
|
+ url: '${basePath}/manage/tag/update/${tag.tagId}',
|
|
|
|
|
+ data: $('#updateForm').serialize(),
|
|
|
|
|
+ beforeSend: function() {
|
|
|
|
|
+ if ($('#name').val() == '') {
|
|
|
|
|
+ $('#name').focus();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($('#alias').val() == '') {
|
|
|
|
|
+ $('#alias').focus();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function(result) {
|
|
|
|
|
+ if (result.code != 1) {
|
|
|
|
|
+ if (result.data instanceof Array) {
|
|
|
|
|
+ $.each(result.data, function(index, value) {
|
|
|
|
|
+ $.confirm({
|
|
|
|
|
+ theme: 'dark',
|
|
|
|
|
+ animation: 'rotateX',
|
|
|
|
|
+ closeAnimation: 'rotateX',
|
|
|
|
|
+ title: false,
|
|
|
|
|
+ content: value.errorMsg,
|
|
|
|
|
+ buttons: {
|
|
|
|
|
+ confirm: {
|
|
|
|
|
+ text: '确认',
|
|
|
|
|
+ btnClass: 'waves-effect waves-button waves-light'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
$.confirm({
|
|
$.confirm({
|
|
|
theme: 'dark',
|
|
theme: 'dark',
|
|
|
animation: 'rotateX',
|
|
animation: 'rotateX',
|
|
@@ -100,27 +88,27 @@ function createSubmit() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- updateDialog.close();
|
|
|
|
|
- $table.bootstrapTable('refresh');
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
- $.confirm({
|
|
|
|
|
- theme: 'dark',
|
|
|
|
|
- animation: 'rotateX',
|
|
|
|
|
- closeAnimation: 'rotateX',
|
|
|
|
|
- title: false,
|
|
|
|
|
- content: textStatus,
|
|
|
|
|
- buttons: {
|
|
|
|
|
- confirm: {
|
|
|
|
|
- text: '确认',
|
|
|
|
|
- btnClass: 'waves-effect waves-button waves-light'
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ updateDialog.close();
|
|
|
|
|
+ $table.bootstrapTable('refresh');
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
+ $.confirm({
|
|
|
|
|
+ theme: 'dark',
|
|
|
|
|
+ animation: 'rotateX',
|
|
|
|
|
+ closeAnimation: 'rotateX',
|
|
|
|
|
+ title: false,
|
|
|
|
|
+ content: textStatus,
|
|
|
|
|
+ buttons: {
|
|
|
|
|
+ confirm: {
|
|
|
|
|
+ text: '确认',
|
|
|
|
|
+ btnClass: 'waves-effect waves-button waves-light'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|