拖了這麼久。。今天把欄目管理還有新聞管理模塊的也掛出來。。
欄目管理跟用戶管理一樣。
這裏重點講解新聞管理。
效果圖如上:
1,可選擇欄目類別,且欄目類別是動態生成的。
默認生成的文章是未審覈狀態的。
欄目類別:
<select name="typeId" id="typeId" style="width: 100">
<option value="">
請選擇
</option>
<%
NewsType type = new NewsType();
NewsTypeService typeService = new NewsTypeService();
List<NewsType> typeList = typeService.findAll(type);
if(typeList!=null&&typeList.size()>0){
for(int i=0;i<typeList.size();i++){
type = typeList.get(i);%>
<option value="<%=type.getTypeId() %>">
<%=type.getTypeName() %>
</option>
<%}
}%>
</select>
,2,文本編輯器使用的是百度開發的ueditor,很好用,方便簡單,具體使用方法可上官網查找。
<script id="editor" type="text/plain" name="content">初始化</script>
<script id="editor" type="text/plain" name="content">${news.content }</script>
3,全選操作。
function ChkAllClick(sonName, cbAllId) {
var arrSon = document.getElementsByName(sonName);
var cbAll = document.getElementById(cbAllId);
var tempState = cbAll.checked;
for (i = 0; i < arrSon.length; i++) {
if (arrSon[i].checked != tempState)
arrSon[i].click();
}
}
猛搓下載源碼-》》》http://download.csdn.net/detail/a331251021/5783043