|
@@ -150,7 +150,7 @@
|
|
|
$.post("${ctx}/info/info/updateTopPosition", {
|
|
|
'topPosition': topPosition,
|
|
|
'id': id,
|
|
|
- 'type':type
|
|
|
+ 'type': type
|
|
|
}, function (data) {
|
|
|
if (true == data.success) {
|
|
|
$.jBox.tip(data.msg, 'info');
|
|
@@ -159,65 +159,121 @@
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
$("#searchForm").submit();
|
|
|
- },800)
|
|
|
+ }, 800)
|
|
|
}, "JSON");//这里返回的类型有:json,html,xml,text
|
|
|
}
|
|
|
return;
|
|
|
}, {buttonsFocus: 1, persistent: true});
|
|
|
}
|
|
|
+
|
|
|
+ var ontypeId = null;
|
|
|
+ var typeId = null;
|
|
|
+ function ischangeType() {
|
|
|
+ if (null != typeId) {
|
|
|
+ $("#typeListId option[value=" + typeId + "]").val(ontypeId);
|
|
|
+ }
|
|
|
+ $("#optionType").find("option").eq(0).prop("selected", true)
|
|
|
+ optionTypeParent()
|
|
|
+ }
|
|
|
+
|
|
|
+ function optionTypeParent() {
|
|
|
+ $("#optionType [parent]").each(function (item) {
|
|
|
+ if ($("#typeListId option:selected").val() == $(this).attr("parent")) {
|
|
|
+ $(this).show()
|
|
|
+ } else {
|
|
|
+ $(this).hide()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function isoptionType() {
|
|
|
+ if ("" != $("#optionType option:selected").val()) {
|
|
|
+ ontypeId = $("#optionType option:selected").attr("parent")
|
|
|
+ typeId = $("#optionType option:selected").val()
|
|
|
+ $("#typeListId option:selected").val($("#optionType option:selected").val())
|
|
|
+ }else {
|
|
|
+ ischangeType()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function () {
|
|
|
+ $("#typeListId option[value=" + $("#optionType option:selected").attr("parent") + "]").prop("selected", true);
|
|
|
+ optionTypeParent()
|
|
|
+ isoptionType()
|
|
|
+ })
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <ul class="nav nav-tabs">
|
|
|
- <li class="active"><a href="${ctx}/info/info/">文章列表</a></li>
|
|
|
- <shiro:hasPermission name="info:info:edit"><li><a href="${ctx}/info/info/form">文章添加</a></li></shiro:hasPermission>
|
|
|
- <shiro:hasPermission name="info:infoType:edit"><li><a href="javascript:void(0);" onclick="updateType();">修改分类项</a></li></shiro:hasPermission>
|
|
|
- </ul>
|
|
|
- <input type="button" class="btn btn-primary" value="更新全部搜索索引" onclick="updateAllIndex()" />
|
|
|
- <form:form id="searchForm" modelAttribute="info" action="${ctx}/info/info/" method="post" class="breadcrumb form-search">
|
|
|
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
- <form:hidden path="label"/>
|
|
|
- <div class="ul-form">
|
|
|
- <label>ID:</label>
|
|
|
- <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
|
|
|
- <label>标题:</label>
|
|
|
- <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
|
|
|
- <label>发布人:</label>
|
|
|
- <form:input path="publisher" htmlEscape="false" maxlength="50" class="input-medium"/>
|
|
|
- <label>发布时间:</label>
|
|
|
- <form:input path="startPubDate" type="text" maxlength="10" class="input-medium Wdate"
|
|
|
- value="${startPubDate}"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
|
|
|
- 至
|
|
|
- <form:input path="endPubDate" type="text" maxlength="10" class="input-medium Wdate"
|
|
|
- value="${startPubDate}"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
|
|
|
- <br> <br>
|
|
|
- <label>文章分类:</label>
|
|
|
- <form:select path="infoType.id" class="input-small">
|
|
|
- <form:option value="" label=" "/>
|
|
|
- <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
|
|
|
- </form:select>
|
|
|
+<ul class="nav nav-tabs">
|
|
|
+ <li class="active"><a href="${ctx}/info/info/">文章列表</a></li>
|
|
|
+ <shiro:hasPermission name="info:info:edit">
|
|
|
+ <li><a href="${ctx}/info/info/form">文章添加</a></li>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ <shiro:hasPermission name="info:infoType:edit">
|
|
|
+ <li><a href="javascript:void(0);" onclick="updateType();">修改分类项</a></li>
|
|
|
+ </shiro:hasPermission>
|
|
|
+</ul>
|
|
|
+<input type="button" class="btn btn-primary" value="更新全部搜索索引" onclick="updateAllIndex()"/>
|
|
|
+<form:form id="searchForm" modelAttribute="info" action="${ctx}/info/info/" method="post"
|
|
|
+ class="breadcrumb form-search">
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+ <form:hidden path="label"/>
|
|
|
+ <div class="ul-form">
|
|
|
+ <label>ID:</label>
|
|
|
+ <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
|
|
|
+ <label>标题:</label>
|
|
|
+ <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
|
|
|
+ <label>发布人:</label>
|
|
|
+ <form:input path="publisher" htmlEscape="false" maxlength="50" class="input-medium"/>
|
|
|
+ <label>发布时间:</label>
|
|
|
+ <form:input path="startPubDate" type="text" maxlength="10" class="input-medium Wdate"
|
|
|
+ value="${startPubDate}"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
|
|
|
+ 至
|
|
|
+ <form:input path="endPubDate" type="text" maxlength="10" class="input-medium Wdate"
|
|
|
+ value="${startPubDate}"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
|
|
|
+ <br> <br>
|
|
|
+ <label>文章分类:</label>
|
|
|
+ <form:select id="typeListId" path="infoType.id" class="input-small" onchange="ischangeType()">
|
|
|
+ <form:option value="" label=" "/>
|
|
|
+ <c:forEach items="${typeList}" var="type" varStatus="index">
|
|
|
+ <c:if test="${type.parentId eq 0}">
|
|
|
+ <form:option value="${type.id}" label="${type.name}"/>
|
|
|
+ </c:if>
|
|
|
+ </c:forEach>
|
|
|
+ </form:select>
|
|
|
+ <form:select id="optionType" path="" class="input-small" onchange="isoptionType()">
|
|
|
+ <form:option value="" label=" "/>
|
|
|
+ <c:forEach items="${typeList}" var="type" varStatus="index">
|
|
|
+ <c:if test="${type.parentId ne 0}">
|
|
|
+ <form:option value="${type.id}" label="${type.name}" parent="${type.parentId}"
|
|
|
+ cssStyle="display: none"/>
|
|
|
+ </c:if>
|
|
|
+ </c:forEach>
|
|
|
+ </form:select>
|
|
|
|
|
|
- <label>推荐状态:</label>
|
|
|
- <form:select path="recommendStatus" class="input-mini">
|
|
|
- <form:option value="" label=" "/>
|
|
|
- <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
- </form:select>
|
|
|
- <label>状态:</label>
|
|
|
- <form:select path="enabledStatus" class="input-mini">
|
|
|
- <form:option value="" label=" "/>
|
|
|
- <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
- </form:select>
|
|
|
- <label>关联标签库:</label>
|
|
|
- <form:select path="isRelevance" class="input-medium">
|
|
|
- <form:option value="" label="请选择"/>
|
|
|
- <form:option value="1" label="已关联"/>
|
|
|
- <form:option value="2" label="未关联"/>
|
|
|
- </form:select>
|
|
|
- <label>首页置顶:</label>
|
|
|
- <form:select path="topFlag" class="input-mini">
|
|
|
+ <label>推荐状态:</label>
|
|
|
+ <form:select path="recommendStatus" class="input-mini">
|
|
|
+ <form:option value="" label=" "/>
|
|
|
+ <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
|
|
|
+ htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ <label>状态:</label>
|
|
|
+ <form:select path="enabledStatus" class="input-mini">
|
|
|
+ <form:option value="" label=" "/>
|
|
|
+ <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
|
|
|
+ htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ <label>关联标签库:</label>
|
|
|
+ <form:select path="isRelevance" class="input-medium">
|
|
|
+ <form:option value="" label="请选择"/>
|
|
|
+ <form:option value="1" label="已关联"/>
|
|
|
+ <form:option value="2" label="未关联"/>
|
|
|
+ </form:select>
|
|
|
+ <label>首页置顶:</label>
|
|
|
+ <form:select path="topFlag" class="input-mini">
|
|
|
<form:option value="" label="全部"/>
|
|
|
<form:option value="1" label="是"/>
|
|
|
<form:option value="0" label="否"/>
|