Commit f11f0dec authored by killfen's avatar killfen

版本更新至4.5.4

parent 60fdc8be
#铭飞MCMS内容管理系统完整开源版J2EE代码 #铭飞MCMS内容管理系统完整开源版J2EE代码
当前版本:4.5.3<br/> 当前版本:4.5.4<br/>
铭飞MS官网:http://ms.ming-soft.com<br/> 铭飞MS官网:http://ms.ming-soft.com<br/>
官网同时提供一键运行版本下载,请步移官网....<br/> 官网同时提供一键运行版本下载,请步移官网....<br/>
QQ交流群号1:231212174<br/> QQ交流群号1:231212174<br/>
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser; package com.mingsoft.cms.parser;
import java.io.File; import java.io.File;
...@@ -55,6 +34,7 @@ import com.mingsoft.cms.parser.impl.ArticleTitleParser; ...@@ -55,6 +34,7 @@ import com.mingsoft.cms.parser.impl.ArticleTitleParser;
import com.mingsoft.cms.parser.impl.ArticleTypeIdParser; import com.mingsoft.cms.parser.impl.ArticleTypeIdParser;
import com.mingsoft.cms.parser.impl.ArticleTypeLinkParser; import com.mingsoft.cms.parser.impl.ArticleTypeLinkParser;
import com.mingsoft.cms.parser.impl.ArticleTypeTitleParser; import com.mingsoft.cms.parser.impl.ArticleTypeTitleParser;
import com.mingsoft.cms.parser.impl.ColumnParser;
import com.mingsoft.cms.parser.impl.NoParser; import com.mingsoft.cms.parser.impl.NoParser;
import com.mingsoft.parser.IGeneralParser; import com.mingsoft.parser.IGeneralParser;
import com.mingsoft.parser.IParserRegexConstant; import com.mingsoft.parser.IParserRegexConstant;
...@@ -147,15 +127,14 @@ public class CmsParser extends IGeneralParser { ...@@ -147,15 +127,14 @@ public class CmsParser extends IGeneralParser {
modelId = modelBiz.getEntityByModelCode(ModelCode.CMS_COLUMN).getModelId(); // 查询当前模块编号 modelId = modelBiz.getEntityByModelCode(ModelCode.CMS_COLUMN).getModelId(); // 查询当前模块编号
// TODO Auto-generated method stub // TODO Auto-generated method stub
htmlContent = parseArticle();
NoParser noParser = new NoParser(htmlContent);
htmlContent = parseGeneral(); htmlContent = parseGeneral();
htmlContent = parseChannel(); htmlContent = parseChannel();
htmlContent = parseSearchList(); htmlContent = parseSearchList();
htmlContent = parseList(); htmlContent = parseList();
htmlContent = parseArclist(); htmlContent = parseArclist();
htmlContent = parsePage(); htmlContent = parsePage();
htmlContent=noParser.parse(htmlContent); htmlContent = parseArticle();
return htmlContent; return htmlContent;
} }
...@@ -275,6 +254,7 @@ public class CmsParser extends IGeneralParser { ...@@ -275,6 +254,7 @@ public class CmsParser extends IGeneralParser {
private String parseArclist() { private String parseArclist() {
// 查找当前模版页面拥有多少个列表标签 // 查找当前模版页面拥有多少个列表标签
int listNum = ListParser.countArcList(super.htmlContent); int listNum = ListParser.countArcList(super.htmlContent);
//List<String> noParserHtml = new ArrayList<String>();
// 替换完分页标签后的HTML代码 // 替换完分页标签后的HTML代码
for (int i = 0; i < listNum; i++) { for (int i = 0; i < listNum; i++) {
...@@ -370,8 +350,8 @@ public class CmsParser extends IGeneralParser { ...@@ -370,8 +350,8 @@ public class CmsParser extends IGeneralParser {
// 替换文章缩略图标签 // 替换文章缩略图标签
htmlContent = new ArticleLitpicParser(htmlContent, article.getBasicThumbnails()).parse(); htmlContent = new ArticleLitpicParser(htmlContent, article.getBasicThumbnails()).parse();
//解析当前栏目信息
htmlContent = new ColumnParser(htmlContent,column,this.getWebsiteUrl()).parse();
// 替换文章栏目链接标签{ms:filed.typelink/} // 替换文章栏目链接标签{ms:filed.typelink/}
ColumnEntity tmp = null; ColumnEntity tmp = null;
htmlContent = new ArticleTypeIdParser(htmlContent, column.getCategoryId() + "").parse(); htmlContent = new ArticleTypeIdParser(htmlContent, column.getCategoryId() + "").parse();
...@@ -451,6 +431,8 @@ public class CmsParser extends IGeneralParser { ...@@ -451,6 +431,8 @@ public class CmsParser extends IGeneralParser {
ColumnEntity tmp = null; ColumnEntity tmp = null;
String columnTitle = column.getCategoryTitle(); String columnTitle = column.getCategoryTitle();
int columnId = column.getCategoryId(); int columnId = column.getCategoryId();
//解析当前栏目信息
htmlContent = new ColumnParser(htmlContent,column,this.getWebsiteUrl()).parse();
// 解析当前栏目id// 替换文章所在栏目标签:{ms:field.typeid/} // 解析当前栏目id// 替换文章所在栏目标签:{ms:field.typeid/}
ArticleTypeIdParser atId = new ArticleTypeIdParser(htmlContent, columnId+ ""); ArticleTypeIdParser atId = new ArticleTypeIdParser(htmlContent, columnId+ "");
if (atId.isTop()) { if (atId.isTop()) {
...@@ -538,12 +520,10 @@ public class CmsParser extends IGeneralParser { ...@@ -538,12 +520,10 @@ public class CmsParser extends IGeneralParser {
channel = htmlContent; channel = htmlContent;
} }
} }
// 替换完封面标签后的TML文件 // 替换完封面标签后的TML文件
String channelContHtml = channel; String channelContHtml = channel;
// 查找当前模版页面拥有多少个封面列表标签 // 查找当前模版页面拥有多少个封面列表标签
int channelConNum = ChannelContParser.channelContNum(channelContHtml); int channelConNum = ChannelContParser.channelContNum(channelContHtml);
for (int i = 0; i < channelConNum; i++) { for (int i = 0; i < channelConNum; i++) {
// 取出当前封面标签中的封面ID // 取出当前封面标签中的封面ID
int channelTypeId = ChannelContParser.channelContTypeId(channelContHtml); int channelTypeId = ChannelContParser.channelContTypeId(channelContHtml);
...@@ -552,7 +532,6 @@ public class CmsParser extends IGeneralParser { ...@@ -552,7 +532,6 @@ public class CmsParser extends IGeneralParser {
} }
String channelCont = ""; String channelCont = "";
// 取出当前封面的内容 // 取出当前封面的内容
// 取出当前封面的内容
if (channelTypeId != 0) { if (channelTypeId != 0) {
List<ArticleEntity> arctile = articleBiz.queryListByColumnId(channelTypeId); List<ArticleEntity> arctile = articleBiz.queryListByColumnId(channelTypeId);
if (arctile != null) { if (arctile != null) {
...@@ -561,7 +540,6 @@ public class CmsParser extends IGeneralParser { ...@@ -561,7 +540,6 @@ public class CmsParser extends IGeneralParser {
} else { } else {
channelCont = arctile.get(arctile.size()).getArticleContent(); channelCont = arctile.get(arctile.size()).getArticleContent();
} }
} }
} }
// 替换封面标签 // 替换封面标签
...@@ -671,34 +649,10 @@ public class CmsParser extends IGeneralParser { ...@@ -671,34 +649,10 @@ public class CmsParser extends IGeneralParser {
String isPaging = property.get(ListParser.LIST_ISPAGING); String isPaging = property.get(ListParser.LIST_ISPAGING);
if (isPaging != null && isPaging.equals("true")) { if (isPaging != null && isPaging.equals("true")) {
// 排序 // 排序
String orderBy = property.get(ListParser.LIST_ORDERBY);
String order = property.get(ListParser.LIST_ORDER); String order = property.get(ListParser.LIST_ORDER);
// 取当前标签下的栏目ID // 取当前标签下的栏目ID
int columnId = StringUtil.string2Int(property.get(ListParser.LIST_TYPEID));
List<Integer> columnIds = new ArrayList<Integer>();
// 从数据库取出文章列表数组 // 从数据库取出文章列表数组
List listArticles =searchList; List listArticles =searchList;
int articleCount=0;
// 列表每页显示的数量
int size = StringUtil.string2Int(property.get(ListParser.LIST_SIZE));
// 从数据库取出文章列表数组
/*
* 判断栏目id是否指定 如果指定则取该栏目下的文章,否则取符合搜索条件的文章
*/
if (columnId != 0) {
columnIds = columnBiz.queryChildIdsByColumnId(columnId, app.getAppId());
columnIds.add(columnId);
// 显示文章的形式flag属性
String flag = property.get(ListParser.LIST_FLAG);
// 显示文章的形式noflag属性
String noFlag = property.get(ListParser.LIST_NOFLAG);
// 数据库中该栏目下文章的总数
articleCount = articleBiz.getCountByColumnId(app.getAppId(), columnIds, flag, noFlag);
listArticles = articleBiz.queryList(app.getAppId(), columnIds, flag, noFlag, 0, size, orderBy, true);
if (page==null) {
page = new PageUtilHtml(curPageNo, size, articleCount, listLinkPath);
}
}
// 当数据库中该栏目下没有该文章时不取数据 // 当数据库中该栏目下没有该文章时不取数据
if(listArticles!=null){ if(listArticles!=null){
/** /**
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser.impl; package com.mingsoft.cms.parser.impl;
import java.util.Map;
import com.mingsoft.parser.IParser; import com.mingsoft.parser.IParser;
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser.impl; package com.mingsoft.cms.parser.impl;
import java.io.File;
import com.mingsoft.parser.IParser; import com.mingsoft.parser.IParser;
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser.impl; package com.mingsoft.cms.parser.impl;
import java.util.Map;
import com.mingsoft.parser.IParser; import com.mingsoft.parser.IParser;
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser.impl; package com.mingsoft.cms.parser.impl;
import java.io.File; import java.io.File;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -112,6 +92,8 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser { ...@@ -112,6 +92,8 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser {
String htmlList = ""; String htmlList = "";
String tabHtml = ""; String tabHtml = "";
tabHtml = tabHtml(tabHtmlContent); tabHtml = tabHtml(tabHtmlContent);
List<String> parserHtml = new ArrayList<String>();
int countNoParser = 0;
if (articleList != null && tabHtml != null && articleList.size() != 0 && tabHtml != "") { if (articleList != null && tabHtml != null && articleList.size() != 0 && tabHtml != "") {
for (int i = 0; i < articleList.size(); i++) { for (int i = 0; i < articleList.size(); i++) {
...@@ -119,6 +101,15 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser { ...@@ -119,6 +101,15 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser {
if(article.getColumn()!=null){ if(article.getColumn()!=null){
// 序号,根据显示条数显示的序号1 2 …..10。 // 序号,根据显示条数显示的序号1 2 …..10。
htmlList += tabContent(tabHtml, StringUtil.int2String((i + 1)),INDEX_FIELD_LIST); htmlList += tabContent(tabHtml, StringUtil.int2String((i + 1)),INDEX_FIELD_LIST);
// 文章内容,
htmlList = tabContent(htmlList, contentLength(article.getArticleContent(), htmlList),CONTENT_FIELD_LIST);
countNoParser = NoParser.countParser(htmlList);
NoParser noParser = new NoParser(htmlList);
if(countNoParser>0){
parserHtml = noParser.getNoParserHtml(countNoParser,parserHtml);
}
htmlList = noParser.parse();
// 编号,对应文章在数据库里的自动编号。 // 编号,对应文章在数据库里的自动编号。
htmlList = tabContent(htmlList, StringUtil.int2String(article.getBasicId()),ID_FIELD_LIST); htmlList = tabContent(htmlList, StringUtil.int2String(article.getBasicId()),ID_FIELD_LIST);
// 标题,标题长度根据titlelen的属性值指定,默认40个汉字, // 标题,标题长度根据titlelen的属性值指定,默认40个汉字,
...@@ -141,7 +132,6 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser { ...@@ -141,7 +132,6 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser {
link =path + StringUtil.null2String(article.getColumn().getColumnPath()) + File.separator + IParserRegexConstant.HTML_INDEX; link =path + StringUtil.null2String(article.getColumn().getColumnPath()) + File.separator + IParserRegexConstant.HTML_INDEX;
} }
link = StringUtil.removeRepeatStr(link, File.separator).replace(":/", "://");
htmlList = tabContent(htmlList, link,LINK_FIELD_LIST); htmlList = tabContent(htmlList, link,LINK_FIELD_LIST);
// 分类编号,文章所属分类的编号, // 分类编号,文章所属分类的编号,
htmlList = tabContent(htmlList, article.getBasicCategoryId(),TYPEID_FIELD_LIST); htmlList = tabContent(htmlList, article.getBasicCategoryId(),TYPEID_FIELD_LIST);
...@@ -153,22 +143,23 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser { ...@@ -153,22 +143,23 @@ public class ListParser extends com.mingsoft.parser.impl.general.ListParser {
String numArticle = Integer.toString(articleList.size()); String numArticle = Integer.toString(articleList.size());
htmlList = tabContent(htmlList, numArticle,NUM_ARTICLE_LIST); htmlList = tabContent(htmlList, numArticle,NUM_ARTICLE_LIST);
//分类连接:[field.typelink/] 点击连接连接到当前分类的列表 //分类连接:[field.typelink/] 点击连接连接到当前分类的列表
String channelLink = path+File.separator+StringUtil.null2String(article.getColumn().getColumnPath())+File.separator+ IParserRegexConstant.HTML_INDEX; String channelLink = path+StringUtil.null2String(article.getColumn().getColumnPath())+File.separator+ IParserRegexConstant.HTML_INDEX;
channelLink = StringUtil.removeRepeatStr(channelLink, File.separator);
htmlList = tabContent(htmlList, channelLink,TTYPELINK_FIELD_LIST); htmlList = tabContent(htmlList, channelLink,TTYPELINK_FIELD_LIST);
//对自定义字段进行替换 //对自定义字段进行替换
htmlList = replaceField(htmlList,article.getColumn(),article.getBasicId()); htmlList = replaceField(htmlList,article.getColumn(),article.getBasicId());
// 文章内容,
htmlList = tabContent(htmlList, contentLength(article.getArticleContent(), htmlList),CONTENT_FIELD_LIST);
}
} }
} }
return htmlList; }
if(countNoParser>0){
NoParser noParser = new NoParser(htmlList);
htmlList =noParser.parse(htmlList,parserHtml);
} }
return htmlList;
}
} }
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.cms.parser.impl; package com.mingsoft.cms.parser.impl;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -48,7 +27,7 @@ public class NoParser extends IParser{ ...@@ -48,7 +27,7 @@ public class NoParser extends IParser{
/** /**
* 不解析标签临时标记标签 * 不解析标签临时标记标签
*/ */
protected final static String TAB_BODY="\\{MS:NOTAB\\}([\\s\\S]*?)\\{/MS:NOTAB}"; protected final static String TAB_BODY="\\{ms:noparser\\}([\\s\\S]*?)\\{/ms:noparser}";
/** /**
* 临时标签开始标记 * 临时标签开始标记
...@@ -93,7 +72,8 @@ public class NoParser extends IParser{ ...@@ -93,7 +72,8 @@ public class NoParser extends IParser{
* *
* @param htmlCotent html模版内容 * @param htmlCotent html模版内容
*/ */
public NoParser(String htmlCotent) { public NoParser(String htmlCotent){
this.htmlCotent = htmlCotent; this.htmlCotent = htmlCotent;
} }
...@@ -114,12 +94,12 @@ public class NoParser extends IParser{ ...@@ -114,12 +94,12 @@ public class NoParser extends IParser{
*/ */
@Override @Override
public String parse() { public String parse() {
//获取模版中不解析标签的个数 // //获取模版中不解析标签的个数
this.noParserCount = countParser(htmlCotent); // this.noParserCount = countParser(htmlCotent);
for(int i=0;i<noParserCount;i++){ // for(int i=0;i<noParserCount;i++){
htmlCotent = replaceStartAndEnd(htmlCotent,LIST_NOPARSER); // htmlCotent = replaceStartAndEnd(htmlCotent,LIST_NOPARSER);
} // }
noParserHtml =this.getNoParserHtml(noParserCount); // noParserHtml =this.getNoParserHtml(noParserCount);
return htmlCotent; return htmlCotent;
} }
...@@ -128,12 +108,12 @@ public class NoParser extends IParser{ ...@@ -128,12 +108,12 @@ public class NoParser extends IParser{
* @param htmlCotent html模版 * @param htmlCotent html模版
* @return * @return
*/ */
public String parse(String htmlCotent){ public String parse(String htmlCotent,List<String> noParserHtml){
if(noParserHtml!=null && noParserHtml.size()<=0){ if(noParserHtml!=null && noParserHtml.size()<=0){
return htmlCotent; return htmlCotent;
} }
for(int i=0;i<noParserHtml.size();i++){ for(int i=0;i<noParserHtml.size();i++){
htmlCotent =RegexUtil.replaceAll(htmlCotent, TAB_REG_CONTENT, noParserHtml.get(i)); htmlCotent =RegexUtil.replaceFirst(htmlCotent, TAB_REG_CONTENT, noParserHtml.get(i));
} }
return htmlCotent; return htmlCotent;
} }
...@@ -145,8 +125,7 @@ public class NoParser extends IParser{ ...@@ -145,8 +125,7 @@ public class NoParser extends IParser{
* @param html html代码 * @param html html代码
* @return 代码集合 * @return 代码集合
*/ */
public List<String> getNoParserHtml(int count){ public List<String> getNoParserHtml(int count,List<String> noParserHtml){
List<String> noParserHtml = new ArrayList<String>();
for(int i=0;i<count;i++){ for(int i=0;i<count;i++){
String tabHtml = ""; String tabHtml = "";
//查找出第i+1个不解析标签的代码 //查找出第i+1个不解析标签的代码
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.parser.impl.general; package com.mingsoft.parser.impl.general;
import java.io.File; import java.io.File;
...@@ -292,7 +271,6 @@ public class ChannelParser extends IParser { ...@@ -292,7 +271,6 @@ public class ChannelParser extends IParser {
// 替换栏目链接标签 // 替换栏目链接标签
String linkUrl = webUrl + File.separator + StringUtil.null2String(articleType.getColumnPath()) + File.separator + IParserRegexConstant.HTML_INDEX; String linkUrl = webUrl + File.separator + StringUtil.null2String(articleType.getColumnPath()) + File.separator + IParserRegexConstant.HTML_INDEX;
linkUrl = StringUtil.removeRepeatStr(linkUrl, File.separator).replace(":/", "://");
htmlList = tabContent(htmlList, linkUrl, CHANNEL_LINK); htmlList = tabContent(htmlList, linkUrl, CHANNEL_LINK);
// 替换栏目关键字标签 // 替换栏目关键字标签
htmlList = tabContent(htmlList, articleType.getColumnKeyword(), CHANNEL_KEYWORD); htmlList = tabContent(htmlList, articleType.getColumnKeyword(), CHANNEL_KEYWORD);
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.parser.impl.general; package com.mingsoft.parser.impl.general;
import java.io.File; import java.io.File;
...@@ -87,19 +66,19 @@ public class PageParser extends IParser{ ...@@ -87,19 +66,19 @@ public class PageParser extends IParser{
if (this.page!=null) { if (this.page!=null) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
//替换首页标签:{ms:page.index} //替换首页标签:{ms:page.index}
super.newCotent = StringUtil.removeRepeatStr(this.page.getIndexUrl(), File.separator).replace(":/", "://");//this.page.getIndexUrl().replace("\\", "/"); super.newCotent =this.page.getIndexUrl();//this.page.getIndexUrl().replace("\\", "/");
String indexHtml = super.replaceAll(PAGE_INDEX); String indexHtml = super.replaceAll(PAGE_INDEX);
//替换上一页标签:{ms:page.pre/} //替换上一页标签:{ms:page.pre/}
super.htmlCotent = indexHtml; super.htmlCotent = indexHtml;
super.newCotent = StringUtil.removeRepeatStr(this.page.getPreviousUrl(), File.separator).replace(":/", "://");// this.page.getPreviousUrl().replace("\\", "/"); super.newCotent = this.page.getPreviousUrl();// this.page.getPreviousUrl().replace("\\", "/");
String preHtml = super.replaceAll(PAGE_PRE); String preHtml = super.replaceAll(PAGE_PRE);
//替换下一页标签:{ms:page.next/} //替换下一页标签:{ms:page.next/}
super.htmlCotent = preHtml; super.htmlCotent = preHtml;
super.newCotent = StringUtil.removeRepeatStr(this.page.getNextUrl(), File.separator).replace(":/", "://");//this.page.getNextUrl().replace("\\", "/"); super.newCotent = this.page.getNextUrl();//this.page.getNextUrl().replace("\\", "/");
String nextHtml = super.replaceAll(PAGE_NEXT); String nextHtml = super.replaceAll(PAGE_NEXT);
//替换尾页标签:{ms:page.over/} //替换尾页标签:{ms:page.over/}
super.htmlCotent = nextHtml; super.htmlCotent = nextHtml;
super.newCotent = StringUtil.removeRepeatStr(this.page.getLastUrl(), File.separator).replace(":/", "://");// this.page.getLastUrl().replace("\\", "/"); super.newCotent = this.page.getLastUrl();// this.page.getLastUrl().replace("\\", "/");
String traileHtml = super.replaceAll(PAGE_OVER); String traileHtml = super.replaceAll(PAGE_OVER);
return traileHtml; return traileHtml;
} else { } else {
......
/** /**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技 *
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package com.mingsoft.people.action; package com.mingsoft.people.action;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -98,18 +81,23 @@ public class PeopleUserAction extends BaseAction{ ...@@ -98,18 +81,23 @@ public class PeopleUserAction extends BaseAction{
public String list(ModelMap mode,HttpServletRequest request,HttpServletResponse response){ public String list(ModelMap mode,HttpServletRequest request,HttpServletResponse response){
//获取应用ID //获取应用ID
int appId = this.getAppId(request); int appId = this.getAppId(request);
//查询用户总数
int peopleCount = this.peopleBiz.queryCountByAppId(appId);
int pageNo = this.getInt(request, "pageNo", 1); int pageNo = this.getInt(request, "pageNo", 1);
Map map = assemblyRequestMap(request);
//查询用户总数
//int peopleCount = this.peopleBiz.queryCountByAppId(appId);
int peopleCount = this.peopleBiz.getCountByAppIdAndMap(appId, map);
map.put("pageNo", null);
//页面链接地址 //页面链接地址
String pageUrl = getUrl(request)+"/manager/people/user/list.do"; String pageUrl = getUrl(request)+"/manager/people/user/list.do";
pageUrl= StringUtil.buildUrl(pageUrl, map);
//分页通用类 //分页通用类
PageUtil page=new PageUtil(pageNo,peopleCount,pageUrl); PageUtil page=new PageUtil(pageNo,20,peopleCount,pageUrl);
//获取用户列表 //获取用户列表
List<PeopleEntity> listPeople = this.peopleBiz.queryPageListByAppId(appId,page); List<PeopleEntity> listPeople = this.peopleBiz.queryByAppIdAndMap(appId,map, page);
//List<PeopleEntity> listPeople = this.peopleBiz.queryPageListByAppId(appId,page);
mode.addAttribute("listPeople", listPeople); mode.addAttribute("listPeople", listPeople);
mode.addAttribute("page", page); mode.addAttribute("page", page);
this.setCookie(request, response,CookieConst.BACK_COOKIE, pageUrl+"?pageNo="+pageNo); this.setCookie(request, response,CookieConst.BACK_COOKIE, pageUrl);
return "/manager/people/user/people_user_list"; return "/manager/people/user/people_user_list";
} }
......
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.biz; package com.mingsoft.people.biz;
import java.util.List; import java.util.List;
import java.util.Map;
import com.mingsoft.base.biz.IBaseBiz; import com.mingsoft.base.biz.IBaseBiz;
import com.mingsoft.people.entity.PeopleEntity; import com.mingsoft.people.entity.PeopleEntity;
...@@ -129,4 +109,20 @@ public interface IPeopleBiz extends IBaseBiz{ ...@@ -129,4 +109,20 @@ public interface IPeopleBiz extends IBaseBiz{
* @param peopleIds 用户id集合 * @param peopleIds 用户id集合
*/ */
public void deletePeople(int[] peopleIds); public void deletePeople(int[] peopleIds);
/**
* 根据应用id和其他查询条件查询用户列表信息
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户列表信息
*/
public List<PeopleEntity> queryByAppIdAndMap(int appId,Map whereMap,PageUtil page);
/**
* 根据应用id和其他查询条件查询用户总数
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户总数
*/
int getCountByAppIdAndMap(int appId,Map whereMap);
} }
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.biz.impl; package com.mingsoft.people.biz.impl;
import java.util.HashMap; import java.util.HashMap;
...@@ -166,5 +145,16 @@ public class PeopleBizImpl extends BaseBizImpl implements IPeopleBiz{ ...@@ -166,5 +145,16 @@ public class PeopleBizImpl extends BaseBizImpl implements IPeopleBiz{
this.peopleDao.deletePeoples(peopleIds); this.peopleDao.deletePeoples(peopleIds);
} }
@Override
public List<PeopleEntity> queryByAppIdAndMap(int appId, Map whereMap,PageUtil page) {
// TODO Auto-generated method stub
return peopleDao.queryByAppIdAndMap(appId, whereMap,page);
}
@Override
public int getCountByAppIdAndMap(int appId, Map whereMap) {
// TODO Auto-generated method stub
return peopleDao.getCountByAppIdAndMap(appId, whereMap);
}
} }
/**
The MIT License (MIT) * Copyright (c) 2015 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.dao; package com.mingsoft.people.dao;
...@@ -113,4 +92,20 @@ public interface IPeopleDao extends IBaseDao { ...@@ -113,4 +92,20 @@ public interface IPeopleDao extends IBaseDao {
* @param peopleIds 用户id集合 * @param peopleIds 用户id集合
*/ */
public void deletePeoples(@Param("peopleIds")int[] peopleIds); public void deletePeoples(@Param("peopleIds")int[] peopleIds);
/**
* 根据应用id和其他查询条件查询用户列表信息
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户列表信息
*/
public List<PeopleEntity> queryByAppIdAndMap(@Param("appId")int appId,@Param("whereMap")Map whereMap,@Param("page")PageUtil page);
/**
* 根据应用id和其他查询条件查询用户总数
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户总数
*/
int getCountByAppIdAndMap(@Param("appId")int appId,@Param("whereMap")Map whereMap);
} }
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
<!-- 根据AppId查询用户列表根据Id排序并进行分页开始 --> <!-- 根据AppId查询用户列表根据Id排序并进行分页开始 -->
<select id="queryPageListByAppId" resultMap="resultMap"> <select id="queryPageListByAppId" resultMap="resultMap">
select <include refid="column_list"/> select <include refid="column_list"/>,people_user.*
from people p from people p left join people_user on people_id=pu_people_id
where p.people_app_id=#{appId} where p.people_app_id=#{appId}
order by people_id desc order by people_id desc
<if test="page != null"> <if test="page != null">
...@@ -162,4 +162,75 @@ ...@@ -162,4 +162,75 @@
</delete> </delete>
<!-- 批量删除用户结束 --> <!-- 批量删除用户结束 -->
<!-- 根据应用id和其他查询条件查询用户列表信息开始 -->
<select id="queryByAppIdAndMap" resultMap="resultMap" parameterType="int">
select <include refid="column_list"/>
,people_user.*
from people p left join people_user on people_id=pu_people_id
<where>
p.PEOPLE_APP_ID = #{appId}
<if test="whereMap!=null">
<!-- 用户审核状态 -->
<if test="whereMap.peopleState">
and PEOPLE_STATE=#{whereMap.peopleState}
</if>
<!-- 根据用户昵称-->
<if test="whereMap.peopleUserNickName">
and PU_NICKNAME=#{whereMap.peopleUserNickName}
</if>
<!-- 根据用户性别 -->
<if test="whereMap.peopleUserSex">
and PU_SEX=#{whereMap.peopleUserSex}
</if>
<!-- 根据用户注册时间 -->
<if test="whereMap.peopleDateTime">
and (date(PEOPLE_DATETIME) between #{where.peopleDateStartTime} and
#{where.peopleDateEndTime})
</if>
<!-- 根据用户真实姓名-->
<if test="whereMap.peopleUserRealName">
and PU_REAL_NAME=#{whereMap.peopleUserRealName}
</if>
</if>
</where>
<if test="page!=null">
limit ${page.pageNo*page.pageSize},#{page.pageSize};
</if>
</select>
<!-- 根据应用id和其他查询条件查询用户列表信息结束 -->
<!-- 根据应用id和其他查询条件查询用户总数开始 -->
<select id="getCountByAppIdAndMap" resultType="int" parameterType="int">
select count(*)
from people p left join people_user on people_id=pu_people_id
<where>
p.PEOPLE_APP_ID = #{appId}
<if test="whereMap!=null">
<!-- 用户审核状态 -->
<if test="whereMap.peopleState">
and PEOPLE_STATE=#{whereMap.peopleState}
</if>
<!-- 根据用户昵称-->
<if test="whereMap.peopleUserNickName">
and PU_NICKNAME=#{whereMap.peopleUserNickName}
</if>
<!-- 根据用户性别 -->
<if test="whereMap.peopleUserSex">
and PU_SEX=#{whereMap.peopleUserSex}
</if>
<!-- 根据用户注册时间 -->
<if test="whereMap.peopleDateTime">
and (date(PEOPLE_DATETIME) between #{where.peopleDateStartTime} and
#{where.peopleDateEndTime})
</if>
<!-- 根据用户真实姓名-->
<if test="whereMap.peopleUserRealName">
and PU_REAL_NAME=#{whereMap.peopleUserRealName}
</if>
</if>
</where>
</select>
<!-- 根据应用id和其他查询条件查询用户总数结束 -->
</mapper> </mapper>
\ No newline at end of file
...@@ -7,9 +7,16 @@ ...@@ -7,9 +7,16 @@
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<#if app.appId != 0>
<@ms.contentNav title="应用设置">
<@ms.button class="btn btn-success" id="saveOrUpdateApp" value="更新"/>
</@ms.contentNav >
<#else>
<@ms.contentNav title="添加站点"> <@ms.contentNav title="添加站点">
<@ms.button class="btn btn-success" id="saveOrUpdateApp" value="保存"/> <@ms.button class="btn btn-success" id="saveOrUpdateApp" value="保存"/>
<@ms.contentNavBack class="btn btn-default returnList" value="返回列表" />
</@ms.contentNav > </@ms.contentNav >
</#if>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.form isvalidation=true name="appForm" style="width: 65%;" class="form-inline" action="${base}/manager/app/save.do"> <@ms.form isvalidation=true name="appForm" style="width: 65%;" class="form-inline" action="${base}/manager/app/save.do">
...@@ -62,8 +69,6 @@ ...@@ -62,8 +69,6 @@
}) })
<#if app.appId != 0> <#if app.appId != 0>
$("#saveOrUpdateApp").text("更新");
$("#saveOrUpdateApp").prev("span").text("编辑站点");
$("#appForm").attr("action","${base}/manager/app/update.do"); $("#appForm").attr("action","${base}/manager/app/update.do");
<#if SystemManager==true> <#if SystemManager==true>
<#else> <#else>
...@@ -123,11 +128,14 @@ ...@@ -123,11 +128,14 @@
alert(msg.resultMsg); alert(msg.resultMsg);
} }
}}); }});
} else {
alert("表单验证失败");
} }
}); });
//返回应用列表
$(".returnList").click(function(){
location.href = base+"/manager/app/list.do";
});
}); });
</script> </script>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<@ms.form class="aritcleForm searchForm" isvalidation=true name="articleForm" action=""> <@ms.form class="aritcleForm searchForm" isvalidation=true name="articleForm" action="">
<@ms.text name="basicTitle" style="width: 30%;" label="文章标题" title="文章标题" size="5" placeholder="请输入文章标题" value="${article.basicTitle?default('')}" labelStyle="width:15%" validation={"maxlength":"300","required":"true", "data-bv-notempty-message":"文章标题不能为空","data-bv-stringlength-message":"标题在300个字符以内!"}/> <@ms.text name="basicTitle" style="width: 30%;" label="文章标题" title="文章标题" size="5" placeholder="请输入文章标题" value="${article.basicTitle?default('')}" labelStyle="width:15%" validation={"maxlength":"300","required":"true", "data-bv-notempty-message":"文章标题不能为空","data-bv-stringlength-message":"标题在300个字符以内!"}/>
<@ms.text name="basicSort" style="width: 10%;" label="自定义顺序" title="自定义顺序" size="5" placeholder="请输入文章顺序" value="${article.basicSort?c?default(0)}" labelStyle="width:15%" validation={"data-bv-between":"true","data-bv-between-message":"自定义顺序必须大于0","data-bv-between-min":"0", "data-bv-between-max":"99999999","data-bv-stringlength-message":"自定义顺序不能为空"}/> <@ms.text name="basicSort" style="width: 10%;" label="自定义顺序" title="自定义顺序" size="5" placeholder="请输入文章顺序" value="${article.basicSort?c?default(0)}" labelStyle="width:15%" validation={"data-bv-between":"true","data-bv-between-message":"自定义顺序必须大于0","data-bv-between-min":"0", "data-bv-between-max":"99999999","data-bv-notempty-message":"自定义顺序不能为空"}/>
<#if articleType?has_content> <#if articleType?has_content>
<@ms.checkboxlist name="checkbox" label="文章属性" style="position: relative;" list=articleType listKey="key" listValue="value" labelStyle="width:15%"/> <@ms.checkboxlist name="checkbox" label="文章属性" style="position: relative;" list=articleType listKey="key" listValue="value" labelStyle="width:15%"/>
</#if> </#if>
......
...@@ -13,12 +13,8 @@ ...@@ -13,12 +13,8 @@
<#--根据filed实体的类别来显示项目的控件--> <#--根据filed实体的类别来显示项目的控件-->
<#switch type> <#switch type>
<#case "1"> <#case "1">
<#if isnull="0">
<#assign validationType={"required":"true", "data-bv-notempty-message":"必填"}>
</#if>
<#if value!=""> <#if value!="">
<@ms.text name="${filedName}" style="width: 15%;" label="${name}" title="${name}" size="5" placeholder="请输入${name}" value="${value}" labelStyle="width:15%" style="width:30%" validation="${validationType?default('')}"/> <@ms.text name="${filedName}" style="width: 15%;" label="${name}" title="${name}" size="5" placeholder="请输入${name}" value="${value}" labelStyle="width:15%" style="width:30%"/>
<#else> <#else>
<@ms.text name="${filedName}" style="width: 15%;" label="${name}" title="${name}" size="5" placeholder="请输入${name}" value="${defaultValue}" labelStyle="width:15%" style="width:30%"/> <@ms.text name="${filedName}" style="width: 15%;" label="${name}" title="${name}" size="5" placeholder="请输入${name}" value="${defaultValue}" labelStyle="width:15%" style="width:30%"/>
</#if> </#if>
...@@ -100,7 +96,7 @@ ...@@ -100,7 +96,7 @@
}else{ }else{
time = time +date.getDate(); time = time +date.getDate();
} }
$("#birthday").val(time); <#if value!="">${value}<#else>$("#birthday").val(time);</#if>
// 应用日历 // 应用日历
$('#birthday').daterangepicker({ $('#birthday').daterangepicker({
singleDatePicker: true singleDatePicker: true
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head> <head>
<#include "/manager/include/macro.ftl"/> <#include "/manager/include/macro.ftl"/>
...@@ -25,27 +25,28 @@ ...@@ -25,27 +25,28 @@
<@ms.col size="12" style="text-align:right"> <@ms.col size="12" style="text-align:right">
<@ms.button id="submitSearch" value="筛选"/> <@ms.button id="submitSearch" value="筛选"/>
<@ms.resetbutton /> <@ms.resetbutton/>
</@ms.col> </@ms.col>
</@ms.row> </@ms.row>
</@ms.form> </@ms.form>
<@ms.panelNav> <@ms.panelNav>
<@ms.panelNavBtnGroup> <@ms.panelNavBtnGroup>
<@ms.panelNavBtnDel /> <@ms.panelNavBtnAdd title=""/>
<@ms.panelNavBtnAdd/> <@ms.panelNavBtnDel title=""/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['<input type="checkbox" name="allCheck"/>','ID',"<th>文章标题</th>",'栏目名','作者','点击','排序']> <@ms.table head=['<input type="checkbox" name="allCheck">','<th class="text-center">编号</th>','文章标题','栏目名','作者','<th class="text-center">排序</th>']>
<#if listArticle?has_content> <#if listArticle?has_content>
<#list listArticle as listArticle> <#list listArticle as listArticle>
<tr id="tableArticle"> <tr id="tableArticle">
<td class="text-center"> <td style="width:5%">
<input type="checkbox" name="ids" value="${listArticle.basicId?c?default(0)}"> <input type="checkbox" name="ids" value="${listArticle.basicId?c?default(0)}">
</td> </td>
<td class="text-center articleId" >${listArticle.basicId?c?default(0)}</td> <td style="width:8%" class="articleId text-center" >${listArticle.basicId?c?default(0)}</td>
<td class="text-center" > <td style="width:35%">
<a style="cursor: pointer;"> <a style="cursor: pointer;">
<span class="updateArticle" data-toggle="tooltip" data-original-title="点击修改文章" data-id="${listArticle.basicId?c?default(0)}"> <span class="updateArticle" data-toggle="tooltip" data-original-title="点击修改文章" data-id="${listArticle.basicId?c?default(0)}">
<#if keyword?has_content> <#if keyword?has_content>
...@@ -66,10 +67,9 @@ ...@@ -66,10 +67,9 @@
</span> </span>
</a> </a>
</td> </td>
<td class="text-center" ><#if listArticle.column?exists>${listArticle.column.categoryTitle?default("")}</#if></td> <td style="width:15%"><#if listArticle.column?exists>${listArticle.column.categoryTitle?default("")}</#if></td>
<td class="text-center" >${listArticle.articleAuthor?default("无作者")}</td> <td style="width:15%">${listArticle.articleAuthor?default("无作者")}</td>
<td class="text-center" >${listArticle.basicHit?c?default(0)}</td> <td class="text-center">${listArticle.basicSort?c?default(0)}</td>
<td class="text-center" >${listArticle.basicSort?c?default(0)}</td>
</tr> </tr>
</#list> </#list>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<!--分页--> <!--分页-->
<@showPage page=page/> <@showPage page=page/>
<!--删除文章--> <!--删除限时文章-->
<@ms.modal modalName="delete" title="删除文章"> <@ms.modal modalName="delete" title="删除文章">
<@ms.modalBody> <@ms.modalBody>
确定要删除所选的文章吗? 确定要删除所选的文章吗?
...@@ -151,15 +151,13 @@ $(function(){ ...@@ -151,15 +151,13 @@ $(function(){
var keyword = $('[name="keyWord"]').val(); var keyword = $('[name="keyWord"]').val();
location.href = base+"/manager/cms/article/${categoryId?default(0)}/list.do?keyword="+keyword+"&articleType="+articleType; location.href = base+"/manager/cms/article/${categoryId?default(0)}/list.do?keyword="+keyword+"&articleType="+articleType;
}); });
//点击重置按钮
$(".reset").click(function(){
$("input[name=keyWord]").val("");
})
var articleId="";//单个文章id var articleId="";//单个文章id
var ids ="";//多个文章id var ids ="";//多个文章id
//删除文章
/*$(".deleteArticle").click(function(){
ids="";
articleId = $(this).attr("data-id");
$(".delete").modal();
});*/
//多选删除 //多选删除
$("#delButton").click(function(){ $("#delButton").click(function(){
ids = $("input[name='ids']").serialize(); ids = $("input[name='ids']").serialize();
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
<@ms.panelNavBtnGroup> <@ms.panelNavBtnGroup>
<@ms.panelNavBtnAdd/> <@ms.panelNavBtnAdd title=""/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['编号','标题','属性','链接地址','列表地址','内容地址','封面地址','操作'] id="tableConterent"> <@ms.table head=["<th class='text-center' style='width:7%'>编号</th>",'标题',"<th style='text-align:center;width:10%'>属性</th>",'链接地址','列表地址','内容地址','封面地址',"<th style='text-align:center;width:10%;'>操作</th>"] id="tableConterent">
<#if listColumn?has_content && listColumn!="[]"> <#if listColumn?has_content && listColumn!="[]">
<@ms.treeTable treeId="clumnTree" style="width:20%" tbodyId="tableConterent" json="${listColumn?default('')}" jsonName="categoryTitle" jsonId="categoryId" jsonPid="categoryCategoryId"/> <@ms.treeTable treeId="clumnTree" style="width:15%" tbodyId="tableConterent" json="${listColumn?default('')}" jsonName="categoryTitle" jsonId="categoryId" jsonPid="categoryCategoryId"/>
<#else> <#else>
<tr> <tr>
<td colspan="8" class="text-center"> <td colspan="8" class="text-center">
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
单页 单页
{{/if}} {{/if}}
</td> </td>
<td class="text-center">${columnRegexConstant}{{= columnPath}}/index.html</td> <td style="width:20%">${columnRegexConstant}{{= columnPath}}/index.html</td>
<td class="text-center">{{= columnListUrl}}</td> <td style="width:10%">{{= columnListUrl}}</td>
<td class="text-center"> <td style="width:10%">
{{if columnType==1 }} {{if columnType==1 }}
{{= columnUrl}} {{= columnUrl}}
{{/if}} {{/if}}
</td> </td>
<td class="text-center"> <td style="width:10%">
{{if columnType==2}} {{if columnType==2}}
{{= columnUrl}} {{= columnUrl}}
{{/if}} {{/if}}
......
This diff is collapsed.
...@@ -2,14 +2,11 @@ ...@@ -2,14 +2,11 @@
<html lang="en"> <html lang="en">
<head> <head>
<#include "/manager/include/meta.ftl"/> <#include "/manager/include/meta.ftl"/>
<style>
</style>
</head> </head>
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="内容模型管理列表"> <@ms.contentNav title="自定义模型">
</@ms.contentNav> </@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
...@@ -17,23 +14,20 @@ ...@@ -17,23 +14,20 @@
<@ms.panelNavBtnAdd id="totalAdd"/> <@ms.panelNavBtnAdd id="totalAdd"/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['编号','内容模型名称','操作']> <@ms.table head=['<th style="width:7%;text-align:center">编号</th>','<th style="text-align:center;">模型名称</th>',"<th style='text-align:center;width:10%;'>操作</th>"]>
<#if listContentModel?has_content> <#if listContentModel?has_content>
<#list listContentModel as model> <#list listContentModel as model>
<tr> <tr>
<td class="text-center">${model.cmId?c?default(0)}</td> <td class="text-center" style="width:7%;text-align:center">${model.cmId?c?default(0)}</td>
<td class="text-center"> <td style="text-align:center">
<a class="btn btn-xs tooltips updateModalBtn" href="${base}/manager/cms/contentModel/${model.cmId?c?default(0)}/edit.do" data-toggle="tooltip" data-original-title="编辑内容模型"> <a class="btn btn-xs tooltips updateModalBtn" href="${base}/manager/cms/contentModel/${model.cmId?c?default(0)}/edit.do" data-toggle="tooltip" data-original-title="编辑内容模型">
${model.cmTipsName?default("暂无")} ${model.cmTipsName?default("暂无")}
</a> </a>
</td> </td>
<td class="text-center operate"> <td class="text-center operate" style='text-align:center;width:10%;'>
<a class="btn btn-xs tooltips delete-btn" data-toggle="tooltip" data-id="${model.cmId?c?default(0)}" data-original-title="删除"> <a class="btn btn-xs tooltips delete-btn" data-toggle="tooltip" data-id="${model.cmId?c?default(0)}" data-original-title="删除">
<i class="glyphicon glyphicon-trash"></i> <i class="glyphicon glyphicon-trash"></i>
</a> </a>
</td> </td>
</tr> </tr>
</#list> </#list>
......
...@@ -23,17 +23,20 @@ ...@@ -23,17 +23,20 @@
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<#if flag=true>
<div class="form-group"> <@ms.contentNav title="新增搜索">
<label class="col-md-3 control-label col-xs-3 ">
<h4 class="page-title bottomLine">搜索管理 <small><#if flag=true>创建<#else>更新</#if>搜索</small></h4>
</label>
<@ms.contentNav title="">
<@ms.panelNavFilter> <@ms.panelNavFilter>
<@ms.contentNavBack onclick="location.href='${base}/manager/cms/search/list.do'" value="返回搜索列表" /> <@ms.contentNavBack onclick="location.href='${base}/manager/cms/search/list.do'" value="返回搜索列表"/>
</@ms.panelNavFilter> </@ms.panelNavFilter>
</@ms.contentNav> </@ms.contentNav >
</div> <#else>
<@ms.contentNav title="更新搜索">
<@ms.panelNavFilter>
<@ms.contentNavBack onclick="location.href='${base}/manager/cms/search/list.do'" value="返回搜索列表"/>
</@ms.panelNavFilter>
</@ms.contentNav >
</#if>
<@ms.contentPanel> <@ms.contentPanel>
<div class="form-group"> <div class="form-group">
...@@ -44,12 +47,10 @@ ...@@ -44,12 +47,10 @@
<@ms.form isvalidation=true name="" id="searchForm"> <@ms.form isvalidation=true name="" id="searchForm">
<!--输入表单名称--> <!--输入表单名称-->
<@ms.row> <@ms.row>
<#if search?has_content>
<#if flag=false> <@ms.hidden value="${search.searchId?default('')}" name="searchId" />
<input type="hidden" value="${search.searchId}" name="searchId" class="searchId"/>
</#if> </#if>
<@ms.col style="width: 12%;height: 20px;text-align: right;">搜索名称</@ms.col>
<@ms.col style="width: 12%;height: 20px;text-align: right;">搜索名称:</@ms.col>
<@ms.col size="4"> <@ms.col size="4">
<#if flag=true> <#if flag=true>
<@ms.text id="searchName" title="搜索名称" size="3" placeholder="请输入搜索名称" name="searchName" /> <@ms.text id="searchName" title="搜索名称" size="3" placeholder="请输入搜索名称" name="searchName" />
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
<!--搜索结果模板--> <!--搜索结果模板-->
<div class="form-group"> <div class="form-group">
<@ms.col style="width: 12%;height: 20px;text-align: right;">搜索结果模板</@ms.col> <@ms.col style="width: 12%;height: 20px;text-align: right;">搜索结果模板</@ms.col>
<div class="col-md-4 col-xs-4"> <div class="col-md-4 col-xs-4">
<select class="col-md-4 form-control searchTemplets" name="searchTemplets"> <select class="col-md-4 form-control searchTemplets" name="searchTemplets">
<#if flag=true> <#if flag=true>
...@@ -179,7 +180,7 @@ ...@@ -179,7 +180,7 @@
<!--生成代码的模态框开始--> <!--生成代码的模态框开始-->
<@ms.modal modalName="softModal" title="提示框标题" style=""> <@ms.modal modalName="softModal" title="提示框标题" style="">
<@ms.modalBody> <@ms.modalBody>
<textarea class="softCode" style='width:100%;height:500px' ></textarea> <textarea class="softCode" style='width:100%;height:300px' ></textarea>
</@ms.modalBody> </@ms.modalBody>
<@ms.modalButton><!--模态框按钮组--> <@ms.modalButton><!--模态框按钮组-->
<@ms.button value="关闭" id="closeModal"/> <@ms.button value="关闭" id="closeModal"/>
...@@ -274,6 +275,7 @@ ...@@ -274,6 +275,7 @@
success:function(msg){ success:function(msg){
if(msg.result){ if(msg.result){
$("#fieldForm").css("display","block"); $("#fieldForm").css("display","block");
$("#fieldForm").append("<input type='hidden' name='searchId'>");
$("input[name='searchId']").val(msg.resultMsg); $("input[name='searchId']").val(msg.resultMsg);
$("#saveSearchForm").html("更新搜索"); $("#saveSearchForm").html("更新搜索");
$("#saveSearchForm").removeAttr("disabled"); $("#saveSearchForm").removeAttr("disabled");
...@@ -282,6 +284,7 @@ ...@@ -282,6 +284,7 @@
}); });
}else { }else {
alert(msg.resultMsg); alert(msg.resultMsg);
location.reload();
} }
} }
}) })
......
...@@ -8,14 +8,7 @@ ...@@ -8,14 +8,7 @@
<!--表单的name值不能改变--> <!--表单的name值不能改变-->
<#list listFieldName as search> <#list listFieldName as search>
<#if search.type?string=="4"><!--数字填写方式:如1-23表示区间查询1表示等值查询--></#if> <#if search.type?string=="4"><!--数字填写方式:如1-23表示区间查询1表示等值查询--></#if>
<#if search.name=="columnId">
<#if basicCategoryId!=0>
<input type="text" name="categoryId" value="${basicCategoryId}"/>
</#if>
<#else>
<input type="text" name="${search.name}"/> <input type="text" name="${search.name}"/>
</#if>
</#list> </#list>
<input type="submit" value="搜索"> <input type="submit" value="搜索">
</form> </form>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="搜索管理"> <@ms.contentNav title="自定义搜索">
</@ms.contentNav> </@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
...@@ -18,25 +18,24 @@ ...@@ -18,25 +18,24 @@
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['编号','搜索名称','搜索结果模版','操作']> <@ms.table head=['<th class="text-center">编号</th>','搜索名称','搜索结果模版',"<th style='text-align:center;width:10%;'>操作</th>"]>
<#if searchList?has_content> <#if searchList?has_content>
<#list searchList as search> <#list searchList as search>
<tr> <tr>
<td class="text-center commentId" style="width: 10%">${search.searchId?c?default(0)}</td> <td class="commentId text-center" style="width: 10%">${search.searchId?c?default(0)}</td>
<td class="text-center" style="width: 35%" "> <td class="" style="width: 35%" ">
<span class="updateSearch" data-toggle="tooltip" data-original-title="点击修改搜索模块" data-id="${search.searchId?c?default(0)}" style="cursor: pointer;"> <span class="updateSearch" data-toggle="tooltip" data-original-title="点击修改搜索模块" data-id="${search.searchId?c?default(0)}" style="cursor: pointer;">
${search.searchName?default("暂无")} ${search.searchName?default("暂无")}
</span> </span>
</td> </td>
<td class="text-center" style="width: 35%">${search.searchTemplets?default("暂无")}</td> <td style="width: 35%">${search.searchTemplets?default("暂无")}</td>
<td class="text-center operate" style="width: 10%"> <td class="text-center operate" style='text-align:center;width:10%;'>
<a class="btn btn-xs tooltips deleteImg" data-toggle="tooltip" data-id="${search.searchId?c?default(0)}" data-original-title="删除"> <a class="btn btn-xs tooltips deleteImg" data-toggle="tooltip" data-id="${search.searchId?c?default(0)}" data-original-title="删除">
<i class="glyphicon glyphicon-trash"></i> <i class="glyphicon glyphicon-trash"></i>
</a> </a>
</td> </td>
</tr> </tr>
</#list> </#list>
...@@ -85,6 +84,8 @@ ...@@ -85,6 +84,8 @@
//删除评论 //删除评论
function deleteSearch(id){ function deleteSearch(id){
var URL="${base}/manager/cms/search/"+id+"/delete.do" var URL="${base}/manager/cms/search/"+id+"/delete.do"
$("#deleteButton").text("删除中");
$("#deleteButton").attr("disabled",true);
$(this).request({url:URL,type:"json",method:"post",func:function(msg) { $(this).request({url:URL,type:"json",method:"post",func:function(msg) {
//回调处理方式 //回调处理方式
if(msg != 0) { if(msg != 0) {
...@@ -96,6 +97,8 @@ ...@@ -96,6 +97,8 @@
} }
} else { } else {
alert("删除搜索失败"); alert("删除搜索失败");
$("#deleteButton").text("删除");
$("#deleteButton").attr("disabled",false);
} }
}}); }});
} }
......
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
var URL="${base}/manager/cms/templet/writeFileContent.do" var URL="${base}/manager/cms/templet/writeFileContent.do"
var oldFileName = $("#fileName").val(); var oldFileName = $("#fileName").val();
var fileNamePrefix = $("#fileNamePrefix").val(); var fileNamePrefix = $("#fileNamePrefix").val();
$(this).text("修改中");
$(this).attr("disabled",true);
$(this).request({url:URL,type:"json",method:"post",data:formData+"&oldFileName="+oldFileName+"&fileNamePrefix="+fileNamePrefix,func:function(msg) { $(this).request({url:URL,type:"json",method:"post",data:formData+"&oldFileName="+oldFileName+"&fileNamePrefix="+fileNamePrefix,func:function(msg) {
//回调处理方式 //回调处理方式
if(msg.result){ if(msg.result){
...@@ -89,6 +91,8 @@ ...@@ -89,6 +91,8 @@
alert("修改模版文件失败"); alert("修改模版文件失败");
} }
var fileNameUrl = $(".fileNamePrefix").val(); var fileNameUrl = $(".fileNamePrefix").val();
$(".update").text("修改");
$(".update").attr("disabled",false);
//location.href = base+"/manager/cms/templet/showChildFileAndFolder.do?skinFolderName=" + fileNameUrl; //location.href = base+"/manager/cms/templet/showChildFileAndFolder.do?skinFolderName=" + fileNameUrl;
}}); }});
}); });
......
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
</@ms.row> </@ms.row>
</@ms.form> </@ms.form>
<@ms.table head=['图标','模板名称','类型','操作']> <@ms.table head=['<th class="text-center">图标</th>','模板名称',"<th style='width:20%;text-align:center'>类型</th>","<th class='text-center' style='width:10%;'>操作</th>"]>
<#if fileNameList?has_content> <#if fileNameList?has_content>
<#list fileNameList as fileName> <#list fileNameList as fileName>
<tr> <tr>
<td class="text-center pic"></td> <td style="width:10%" class="pic text-center"></td>
<td class="text-center name">${fileName}</td> <td style="width:35%" class="name">${fileName}</td>
<td class="text-center type"></td> <td class="text-center type"></td>
<td class="text-center"> <td style="width:10%;text-align:center">
<a class="btn btn-xs tooltips deleteIcon" data-toggle="tooltip" data-title="${fileName}" data-original-title="删除"> <a class="btn btn-xs tooltips deleteIcon" data-toggle="tooltip" data-title="${fileName}" data-original-title="删除">
<i class="glyphicon glyphicon-trash" style="color:#428BCA"></i> <i class="glyphicon glyphicon-trash" style="color:#428BCA"></i>
</a> </a>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="模板列表"></@ms.contentNav> <@ms.contentNav title="模板管理"></@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<!--上传模板文件夹--> <!--上传模板文件夹-->
<@ms.form name=""> <@ms.form name="">
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<@ms.col style="line-height: 30px;text-align: right;"> <@ms.col style="line-height: 30px;text-align: right;">
<b>模版上传:</b> <b>模版上传:</b>
</@ms.col> </@ms.col>
<@ms.col size="5"> <@ms.col size="5">
<@uploadFile path="templets/${websiteId}/" inputName="websiteStyle" size="10" filetype="zip" msg="建议上传30M以下的zip文件,zip的压缩方式为:存储" maxSize="30" callBack="setUrl" isRename="false"/> <@uploadFile path="templets/${websiteId}/" inputName="websiteStyle" size="10" filetype="zip" msg="建议上传30M以下的zip文件,zip的压缩方式为:存储" maxSize="30" callBack="setUrl" isRename="false"/>
</@ms.col> </@ms.col>
...@@ -26,14 +25,14 @@ ...@@ -26,14 +25,14 @@
</@ms.form> </@ms.form>
<@ms.table head=['图标','模板名称','类型','操作']> <@ms.table head=['<th class="text-center">图标</th>','模板名称',"<th style='width:20%;text-align:center'>类型</th>","<th class='text-center' style='width:10%;'>操作</th>"]>
<#if folderNameList?has_content> <#if folderNameList?has_content>
<#list folderNameList as folderName> <#list folderNameList as folderName>
<tr> <tr>
<td class="text-center"><span class='glyphicon glyphicon-folder-close'></span></td> <td style="width:7%" class="pic text-center"><span class='glyphicon glyphicon-folder-close'></span></td>
<td class="text-left" style="text-align: center;">${folderName}</td> <td style="width:35%">${folderName}</td>
<td class="text-center">文件夹</td> <td class="text-center">文件夹</td>
<td class="text-center"> <td style="width:10%;text-align:center">
<a class="btn btn-xs tooltips deleteIcon" data-toggle="tooltip" data-title="${folderName}" data-original-title="删除"> <a class="btn btn-xs tooltips deleteIcon" data-toggle="tooltip" data-title="${folderName}" data-original-title="删除">
<i class="glyphicon glyphicon-trash" style="color:#428BCA"></i> <i class="glyphicon glyphicon-trash" style="color:#428BCA"></i>
</a> </a>
...@@ -57,7 +56,7 @@ ...@@ -57,7 +56,7 @@
</@ms.content> </@ms.content>
<!--=================模态框部分开始=================--> <!--=================模态框部分开始=================-->
<@ms.modal modalName="delete" title="删除评论"> <@ms.modal modalName="delete" title="删除模板">
<@ms.modalBody> <@ms.modalBody>
确定删除该模板吗? 确定删除该模板吗?
</@ms.modalBody> </@ms.modalBody>
...@@ -81,7 +80,7 @@ ...@@ -81,7 +80,7 @@
url: base+"/manager/cms/templet/unZip.do", url: base+"/manager/cms/templet/unZip.do",
data: "fileUrl=" + fileUrl, data: "fileUrl=" + fileUrl,
success: function(msg){ success: function(msg){
alert("模版上传成功"); alert("模版上传成功!");
location.href="${base}/manager/cms/templet/queryTempletSkin.do" location.href="${base}/manager/cms/templet/queryTempletSkin.do"
} }
}); });
......
...@@ -105,13 +105,13 @@ ...@@ -105,13 +105,13 @@
<@ms.panelNavBtnAdd id="addField"/> <@ms.panelNavBtnAdd id="addField"/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['编号','字段提示文字','字段名称','字段类型','操作']> <@ms.table head=['字段提示文字','字段名称',"<th style='width: 30%;text-align:center'>字段类型</th>","<th class='text-center'>操作</th>"]>
<#if searchList?has_content> <#if searchList?has_content>
<#list searchList as search> <#list searchList as search>
<tr> <tr>
<td class="text-center commentId" style="width: 10%"></td> <td class="commentId" style="width: 10%"></td>
<td class="text-center" style="width: 30%"></td> <td style="width: 30%"></td>
<td class="text-center" style="width: 30%"></td> <td style="width: 30%"></td>
<td class="text-center" style="width: 30%"></td> <td class="text-center" style="width: 30%"></td>
<td class="text-center operate" style="width: 10%"> <td class="text-center operate" style="width: 10%">
<a class="btn btn-xs tooltips deleteImg" data-toggle="tooltip" data-id="" data-original-title="删除"> <a class="btn btn-xs tooltips deleteImg" data-toggle="tooltip" data-id="" data-original-title="删除">
...@@ -136,10 +136,6 @@ ...@@ -136,10 +136,6 @@
</@ms.contentPanel> </@ms.contentPanel>
</@ms.contentBody> </@ms.contentBody>
</@ms.content> </@ms.content>
<!--删除的模态框开始--> <!--删除的模态框开始-->
<@ms.modal modalName="deleteModal" title="删除字段"> <@ms.modal modalName="deleteModal" title="删除字段">
<@ms.modalBody> <@ms.modalBody>
...@@ -225,7 +221,9 @@ ...@@ -225,7 +221,9 @@
<script type="text/javascript"> <script type="text/javascript">
//进行自定义表单删除的函数 //进行自定义表单删除的函数
function deleteField(fieldId){ function deleteField(fieldId){
var URL="${base}/manager/diy/formField/"+fieldId+"/delete.do" var URL="${base}/manager/diy/formField/"+fieldId+"/delete.do";
$("#deleteButtonField").text("删除中");
$("#deleteButtonField").attr("disabled",true);
$(this).request({url:URL,type:"json",method:"post",func:function(msg) { $(this).request({url:URL,type:"json",method:"post",func:function(msg) {
//回调处理方式 //回调处理方式
if(msg.result) { if(msg.result) {
...@@ -323,9 +321,8 @@ ...@@ -323,9 +321,8 @@
//获取字段列表信息 //获取字段列表信息
for(var i=0; i<msg.fieldList.length; i++){ for(var i=0; i<msg.fieldList.length; i++){
var fieldTypeC = msg.fieldType[msg.fieldList[i].diyFormFieldType]; var fieldTypeC = msg.fieldType[msg.fieldList[i].diyFormFieldType];
$("tbody").append("<tr class='fieldList'><td class='text-center'>"+msg.fieldList[i].diyFormFieldId+"</td>"+ $("tbody").append("<tr class='fieldList'><td style='width: 30%'>"+msg.fieldList[i].diyFormFieldTipsName+"</td>"+
"<td class='text-center'>"+msg.fieldList[i].diyFormFieldTipsName+"</td>"+ "<td style='width: 30%'>"+msg.fieldList[i].diyFormFieldFieldName+"</td>"+
"<td class='text-center'>"+msg.fieldList[i].diyFormFieldFieldName+"</td>"+
"<td class='text-center'>"+fieldTypeC+"</td>"+ "<td class='text-center'>"+fieldTypeC+"</td>"+
"<td class='text-center'>"+ "<td class='text-center'>"+
"<a class='btn btn-xs tooltips delete deleteImg' data-toggle='tooltip' data-id='"+msg.fieldList[i].diyFormFieldId+"' data-original-title='删除'>"+ "<a class='btn btn-xs tooltips delete deleteImg' data-toggle='tooltip' data-id='"+msg.fieldList[i].diyFormFieldId+"' data-original-title='删除'>"+
......
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
</@ms.contentNav> </@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.table head=['编号','数据','提交时间','操作']> <@ms.table head=['数据','<th class="text-center">提交时间</th>',"<th class='text-center'>操作</th>"]>
<#if list?has_content> <#if list?has_content>
<#list list as form> <#list list as form>
<tr> <tr>
<td class="text-center basicId">${form['Id']?default(0)}</td> <!--<td class="text-center basicId">${form['Id']?default(0)}</td>-->
<td> <td style="width:40%">
<ul> <ul>
<#list fields as field> <#list fields as field>
<li><b style="color:#999">${field.diyFormFieldTipsName}:</b>${form['${field.diyFormFieldFieldName}']?default('')}</li> <li><b style="color:#999">${field.diyFormFieldTipsName}:</b>${form['${field.diyFormFieldFieldName}']?default('')}</li>
</#list> </#list>
</ul> </ul>
</td> </td>
<td class="text-center" id="name">${form.date?default("")}</td> <td style="width:40%" id="name" class="text-center">${form.date?default("")}</td>
<td class="text-center"> <td class="text-center">
<a class="btn btn-xs red tooltips del-btn " data-toggle="tooltip" data-original-title="删除" data-url="${basePath}/manager/diy/form/${form['fromID']?default(0)}/${form['Id']?default(0)}/delete.do"> <a class="btn btn-xs red tooltips del-btn " data-toggle="tooltip" data-original-title="删除" data-url="${basePath}/manager/diy/form/${form['fromID']?default(0)}/${form['Id']?default(0)}/delete.do">
<i class="glyphicon glyphicon-trash"></i> <i class="glyphicon glyphicon-trash"></i>
...@@ -72,13 +72,15 @@ $(function(){ ...@@ -72,13 +72,15 @@ $(function(){
//删除按钮点击 //删除按钮点击
$(".del-btn").click(function() { $(".del-btn").click(function() {
var url = $(this).attr("data-url"); var url = $(this).attr("data-url");
$(".deleteData").attr("data-ajax-url",url); $(".deleteData").attr("data-ajax-url",url);
$(".delete").modal(); $(".delete").modal();
//设置 //设置
}); });
//点击确定进行删除 //点击确定进行删除
$(".deleteData").click(function() { $(".deleteData").click(function() {
deleteData
$(".deleteData").text("删除中");
$(".deleteData").attr("disabled",true);
$(this).request({method:"post",func:function(msg) { $(this).request({method:"post",func:function(msg) {
var json = jQuery.parseJSON(msg); var json = jQuery.parseJSON(msg);
if(json.result==true){ if(json.result==true){
......
...@@ -3,15 +3,11 @@ ...@@ -3,15 +3,11 @@
<head> <head>
<#include "/manager/include/macro.ftl"/> <#include "/manager/include/macro.ftl"/>
<#include "/manager/include/meta.ftl"/> <#include "/manager/include/meta.ftl"/>
<style>
</style>
</head> </head>
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="自定义表单管理"> <@ms.contentNav title="自定义表单">
</@ms.contentNav> </@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
...@@ -20,23 +16,22 @@ ...@@ -20,23 +16,22 @@
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['编号','名称','表单提交地址','请求数据地址','操作']> <@ms.table head=['<th style="width:7%;text-align:center">编号</th>','名称','表单提交地址','请求数据地址',"<th class='text-center'>操作</th>"]>
<#if list?has_content> <#if list?has_content>
<#list list as form> <#list list as form>
<tr> <tr>
<td class="text-center basicId">${form.diyFormId?c?default(0)}</td> <td style="width:5%;text-align:center" class="basicId">${form.diyFormId?c?default(0)}</td>
<td class="text-center" id="name" > <td style="width:10%" id="name" >
<a href="${base}/manager/diy/form/${form.diyFormId?c?default(0)}/edit.do?title=${form.diyFormTipsName?default(0)}" class="btn btn-xs red tooltips " data-toggle="tooltip" data-original-title="编辑表单" > <a href="${base}/manager/diy/form/${form.diyFormId?c?default(0)}/edit.do?title=${form.diyFormTipsName?default(0)}" class="btn btn-xs red tooltips " data-toggle="tooltip" data-original-title="编辑表单" >
${form.diyFormTipsName?default(0)} ${form.diyFormTipsName?default(0)}
</a> </a>
</td> </td>
<td class="text-center" >/from/${form.diyFormUrl?default("")}.do</td> <td style="width:35%">/from/${form.diyFormUrl?default("")}.do</td>
<td class="text-center" >/from/${form.diyFormUrl?default("")}/queryData.do</td> <td style="width:35%">/from/${form.diyFormUrl?default("")}/queryData.do</td>
<td class="text-center"> <td class="text-center">
<a href="${base}/manager/diy/form/${form.diyFormId?c?default(0)}/query.do?title=${form.diyFormTipsName?default(0)}" class="btn btn-xs red tooltips" data-toggle="tooltip" data-original-title="查看记录" > <a href="${base}/manager/diy/form/${form.diyFormId?c?default(0)}/query.do?title=${form.diyFormTipsName?default(0)}" class="btn btn-xs red tooltips" data-toggle="tooltip" data-original-title="查看记录" >
<i class="glyphicon glyphicon-comment"></i> <i class="glyphicon glyphicon-comment"></i>
</a> </a>
<a href="javascript:(0)" class="btn btn-xs red tooltips del-btn" data-toggle="tooltip" data-original-title="删除表单" data-id="${form.diyFormId?c?default(0)}"> <a href="javascript:(0)" class="btn btn-xs red tooltips del-btn" data-toggle="tooltip" data-original-title="删除表单" data-id="${form.diyFormId?c?default(0)}">
<i class="glyphicon glyphicon-trash"></i> <i class="glyphicon glyphicon-trash"></i>
</a> </a>
...@@ -79,7 +74,9 @@ ...@@ -79,7 +74,9 @@
//进行自定义表单删除的函数 //进行自定义表单删除的函数
function deleteDiyForm(diyFormId){ function deleteDiyForm(diyFormId){
var URL="${base}/manager/diy/form/"+diyFormId+"/delete.do" var URL="${base}/manager/diy/form/"+diyFormId+"/delete.do";
$("#deleteButton").text("删除中");
$("#deleteButton").attr("disabled",true);
$(this).request({url:URL,type:"json",method:"post",func:function(msg) { $(this).request({url:URL,type:"json",method:"post",func:function(msg) {
//回调处理方式 //回调处理方式
if(msg.result) { if(msg.result) {
......
...@@ -67,11 +67,11 @@ false> ...@@ -67,11 +67,11 @@ false>
<#assign _class="${class}"> <#assign _class="${class}">
</#if> </#if>
</#macro> </#macro>
<#macro panelNavBtnAdd value="" icon="plus" class="default" id="addButton" onclick="" title="新增"> <#macro panelNavBtnAdd value="" icon="plus" class="default" id="addButton" onclick="" title="">
<@ms.isPanelNavBtn id="${id}" _id="addButton" class="${class}" _class="default"/> <@ms.isPanelNavBtn id="${id}" _id="addButton" class="${class}" _class="default"/>
<@ms.button icon="${icon}" id="${_id}" value="${value} " icon="${icon}" class="btn btn-${_class}" onclick="${onclick}" title="${title}"/> <@ms.button icon="${icon}" id="${_id}" value="${value} " icon="${icon}" class="btn btn-${_class}" onclick="${onclick}" title="${title}"/>
</#macro> </#macro>
<#macro panelNavBtnDel value="" icon="trash" class="danger" id="delButton" onclick="" title="删除"> <#macro panelNavBtnDel value="" icon="trash" class="danger" id="delButton" onclick="" title="">
<@ms.isPanelNavBtn id="${id}" _id="delButton" class="${class}" _class="danger"/> <@ms.isPanelNavBtn id="${id}" _id="delButton" class="${class}" _class="danger"/>
<@ms.button icon="${icon}" value="${value} " icon="${icon}" id="${id}" class="btn btn-${_class}" onclick="${onclick}" title="${title}"/> <@ms.button icon="${icon}" value="${value} " icon="${icon}" id="${id}" class="btn btn-${_class}" onclick="${onclick}" title="${title}"/>
</#macro> </#macro>
...@@ -183,12 +183,11 @@ false> ...@@ -183,12 +183,11 @@ false>
<#--表格列表--> <#--表格列表-->
<#macro table head="" list="" id="" > <#macro table head="" list="" id="">
<table class="table table-hover"> <table class="table table-hover">
<!--表格栏目属性 开始--> <!--表格栏目属性 开始-->
<thead> <thead>
<tr> <tr>
<#if head?has_content> <#if head?has_content>
<#list head as h> <#list head as h>
<#if h?html?length gt 5 && h?html?substring(0,6)=="&lt;th"> <#if h?html?length gt 5 && h?html?substring(0,6)=="&lt;th">
...@@ -200,7 +199,6 @@ false> ...@@ -200,7 +199,6 @@ false>
</#if> </#if>
</#list> </#list>
</#if> </#if>
</tr> </tr>
</thead> </thead>
<!--表格栏目属性 结束--> <!--表格栏目属性 结束-->
......
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
<#if tmplBefored== "true" > <#if tmplBefored== "true" >
{{tmpl($data) '#befored${treeId}'}} {{tmpl($data) '#befored${treeId}'}}
</#if> </#if>
<td class="text-left" style="${style}"> <td style="width:15%">
<a class="btn btn-xs red tooltips switch-list columnTitle" data-id="{{= ${jsonId}}}" onclick="clickDome${treeId}(this)" data-parentId="{{= ${jsonPid}}}" data-toggle="tooltip" data-original-title="查看子结点"> <a class="btn btn-xs red tooltips switch-list columnTitle" data-id="{{= ${jsonId}}}" onclick="clickDome${treeId}(this)" data-parentId="{{= ${jsonPid}}}" data-toggle="tooltip" data-original-title="查看子结点">
<i class="glyphicon glyphicon-folder-close"></i> <i class="glyphicon glyphicon-folder-close"></i>
</a> </a>
......
...@@ -7,40 +7,36 @@ ...@@ -7,40 +7,36 @@
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="管理员管理列表"></@ms.contentNav > <@ms.contentNav title="管理员管理"></@ms.contentNav >
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
<@ms.panelNavBtnGroup> <@ms.panelNavBtnGroup>
<@ms.panelNavBtnAdd id="totalAdd"/> <@ms.panelNavBtnAdd id="totalAdd" title=""/>
<@ms.panelNavBtnDel id="totalDelete"/> <@ms.panelNavBtnDel id="totalDelete"/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['<input type="checkbox" id="allCheck" value="全选" data-original-title="全选删除" data-toggle="tooltip"/>','管理员ID','账号','昵称','密码','角色名称','添加时间','操作']> <@ms.table head=['<th style="text-align:center;width:10%;"><input type="checkbox" id="allCheck" value="全选" data-original-title="全选删除" data-toggle="tooltip"/></th>','账号','昵称','密码','角色名称',"<th style='text-align:center'>添加时间</th>","<th style='text-align:center;width:10%;'>操作</th>"]>
<#if listManager?has_content> <#if listManager?has_content>
<#list listManager as manager> <#list listManager as manager>
<tr> <tr>
<td class="text-center"> <td style="text-align:center;width:10%;">
<label class="checkbox-inline">
<#if manager.managerName != managerSession.managerName> <#if manager.managerName != managerSession.managerName>
<input type="checkbox" name="checkbox" style="margin-top: -6px;margin-left: -16px;" value="${manager.managerId?c?default(0)}"> <input type="checkbox" name="checkbox" value="${manager.managerId?c?default(0)}">
</#if> </#if>
</label>
</td> </td>
<td class="text-center managerId">${manager.managerId?c?default(0)}</td> <td style="width:10%">${manager.managerName?default("暂无")}</td>
<td class="text-center">${manager.managerName?default("暂无")}</td> <td style="width:10%">${manager.managerNickName?default("暂无")}</td>
<td class="text-center">${manager.managerNickName?default("暂无")}</td> <td style="width:25%">${manager.managerPassword?default("暂无")}</td>
<td class="text-center">${manager.managerPassword?default("暂无")}</td> <td style="width:10%">${manager.roleName?default("暂无")}</td>
<td class="text-center">${manager.roleName?default("暂无")}</td>
<td class="text-center">${manager.managerTime?string("yyyy-MM-dd HH:mm:ss")}</td> <td class="text-center">${manager.managerTime?string("yyyy-MM-dd HH:mm:ss")}</td>
<td class="text-center operate"> <td class="text-center operate">
<a class="btn btn-xs tooltips addPage" data-toggle="tooltip" data-id="${manager.managerId?c?default(0)}" data-original-title="绑定">
<#if manager.managerName != managerSession.managerName> <i class="glyphicon glyphicon-plus"></i>
<a class="btn btn-xs tooltips delete" data-toggle="tooltip" data-id="${manager.managerId?c?default(0)}" data-original-title="删除">
<i class="glyphicon glyphicon-trash"></i>
</a> </a>
<a class="btn btn-xs tooltips updateModalBtn" data-toggle="tooltip" data-id="${manager.managerId?c?default(0)}" data-original-title="编辑"> <#if manager.managerName != managerSession.managerName>
<!--a class="btn btn-xs tooltips updateModalBtn" data-toggle="tooltip" data-id="${manager.managerId?c?default(0)}" data-original-title="编辑">
<i class="glyphicon glyphicon-pencil"></i> <i class="glyphicon glyphicon-pencil"></i>
</a> </a-->
</#if> </#if>
</td> </td>
</tr> </tr>
...@@ -121,6 +117,7 @@ ...@@ -121,6 +117,7 @@
$(function () { $(function () {
$("#totalAdd").click(function(){ $("#totalAdd").click(function(){
$("#updateTitle").text("新增管理员"); $("#updateTitle").text("新增管理员");
$("#updateButton").text("保存");
URL="${base}/manager/manager/save.do"; URL="${base}/manager/manager/save.do";
$(".update").modal(); $(".update").modal();
}); });
...@@ -160,9 +157,17 @@ ...@@ -160,9 +157,17 @@
dataType: "json", dataType: "json",
url: URL, url: URL,
data: formData, data: formData,
beforeSend:function(){
$("#updateButton").text($("#updateButton").text()+"");
$("#updateButton").attr("disabled",true);
},
success: function(msg){ success: function(msg){
if(msg.result==true){ if(msg.result==true){
alert("保存成功"); if($("#updateButton").text() == "保存中"){
alert("保存成功!");
}else{
alert("更新成功!");
}
location.reload(); location.reload();
}else{ }else{
alert(msg.resultMsg); alert(msg.resultMsg);
...@@ -177,7 +182,8 @@ ...@@ -177,7 +182,8 @@
}); });
$(".updateModalBtn").click(function(){ $(".updateModalBtn").click(function(){
$("#updateTitle").text("修改管理员"); $("#updateTitle").text("编辑管理员");
$("#updateButton").text("更新");
//找到点击的id //找到点击的id
var managerId = $(this).attr("data-id"); var managerId = $(this).attr("data-id");
URL="${basePath}/manager/manager/"+managerId+"/edit.do"; URL="${basePath}/manager/manager/"+managerId+"/edit.do";
...@@ -187,7 +193,6 @@ ...@@ -187,7 +193,6 @@
url: URL, url: URL,
data: "managerId=" + managerId, data: "managerId=" + managerId,
success: function(msg){ success: function(msg){
if(msg.manager != null){ if(msg.manager != null){
$("input[name='managerName']").val(msg.manager.managerName); $("input[name='managerName']").val(msg.manager.managerName);
$("input[name='oldManagerName']").val(msg.manager.managerName); $("input[name='oldManagerName']").val(msg.manager.managerName);
...@@ -229,7 +234,12 @@ ...@@ -229,7 +234,12 @@
dataType: "json", dataType: "json",
url: base+"/manager/manager/allDelete.do", url: base+"/manager/manager/allDelete.do",
data: checkboxData, data: checkboxData,
beforeSend:function(){
$("#deleteButton").text("删除中");
$("#deleteButton").attr("disabled",true);
},
success: function(msg){ success: function(msg){
alert("删除管理员成功");
if($("tbody tr").length == count && msg != 1){ if($("tbody tr").length == count && msg != 1){
location.href = base+"/manager/manager/queryList.do?pageNo="+(msg-1); location.href = base+"/manager/manager/queryList.do?pageNo="+(msg-1);
}else{ }else{
...@@ -330,6 +340,10 @@ ...@@ -330,6 +340,10 @@
dataType: "json", dataType: "json",
url: "${base}/manager/managerModelPage/save.do", url: "${base}/manager/managerModelPage/save.do",
data:$("#managerPageForm").serialize(), data:$("#managerPageForm").serialize(),
beforeSend:function(){
$("#saveUrl").text("保存中");
$("#saveUrl").attr("disabled",true)
},
success: function(msg){ success: function(msg){
if(msg){ if(msg){
alert("保存成功"); alert("保存成功");
......
...@@ -8,20 +8,20 @@ ...@@ -8,20 +8,20 @@
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody > <@ms.contentBody >
<@ms.contentNav title="自定义页面模块管理" ></@ms.contentNav > <@ms.contentNav title="自定义页面" ></@ms.contentNav >
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav > <@ms.panelNav >
<@ms.panelNavBtnGroup> <@ms.panelNavBtnGroup>
<@ms.panelNavBtnAdd/> <@ms.panelNavBtnAdd/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['名称','模版路径','访问路径','操作']> <@ms.table head=['名称','模版路径','访问路径',"<th class='text-center'>操作</th>"]>
<#if list?has_content> <#if list?has_content>
<#list list as item> <#list list as item>
<tr> <tr>
<td class="text-center" >${item.modelTemplateTitle?default("")}</td> <td style="width:30%">${item.modelTemplateTitle?default("")}</td>
<td class="text-center">${item.modelTemplatePath?default("")}</td> <td style="width:30%">${item.modelTemplatePath?default("")}</td>
<td class="text-center">${item.modelTemplateKey?default("")}</td> <td style="width:30%">${item.modelTemplateKey?default("")}</td>
<td class="text-center"> <td class="text-center">
<a class="btn btn-xs red tooltips del-btn" data-toggle="tooltip" data-id="${item.modelTemplateId?c?default(0)}" data-original-title="删除"> <a class="btn btn-xs red tooltips del-btn" data-toggle="tooltip" data-id="${item.modelTemplateId?c?default(0)}" data-original-title="删除">
<i class="glyphicon glyphicon-trash"></i> <i class="glyphicon glyphicon-trash"></i>
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<@ms.modal modalName="addEditModel" title="添加模块"> <@ms.modal modalName="addEditModel" title="添加模块">
<@ms.modalBody> <@ms.modalBody>
<@ms.form isvalidation=true name="addEditForm" action="" method="post" > <@ms.form isvalidation=true name="addEditForm" action="" method="post" >
<@ms.text name="modelTemplateTitle" style="width: 40%;" label="标题" title="标题" placeholder="请输入标题" value=""/> <@ms.text name="modelTemplateTitle" style="width: 40%;" label="标题" title="标题" placeholder="请输入标题" value="" validation={"maxlength":"20","required":"true", "data-bv-notempty-message":"标题不能为空","data-bv-stringlength-message":"标题在20个字符以内!"}/>
<@ms.text name="modelTemplateKey" style="width: 40%;" label="访问路径" title="访问路径" placeholder="请输入访问路径" value=""/> <@ms.text name="modelTemplateKey" style="width: 40%;" label="访问路径" title="访问路径" placeholder="请输入访问路径" value="" validation={"maxlength":"100","required":"true", "data-bv-notempty-message":"访问路径不能为空","data-bv-stringlength-message":"访问路径在100个字符以内!"}/>
<div class="form-group"> <div class="form-group">
<label for="selectRole">选择模版</label> <label for="selectRole">选择模版</label>
<select class="template templateSelect" style="width:40%" name="modelTemplatePath"></select> <select class="template templateSelect" style="width:40%" name="modelTemplatePath"></select>
...@@ -57,8 +57,6 @@ ...@@ -57,8 +57,6 @@
<@ms.button value="" id="addEditBtn"/> <@ms.button value="" id="addEditBtn"/>
</@ms.modalButton> </@ms.modalButton>
</@ms.modal> </@ms.modal>
<@ms.modal modalName="delete" title="删除提示!"> <@ms.modal modalName="delete" title="删除提示!">
<@ms.modalBody> <@ms.modalBody>
确认删除?? 确认删除??
...@@ -67,10 +65,6 @@ ...@@ -67,10 +65,6 @@
<@ms.button value="确认" id="rightDelete" class="btn btn-danger" value="删除"/> <@ms.button value="确认" id="rightDelete" class="btn btn-danger" value="删除"/>
</@ms.modalButton> </@ms.modalButton>
</@ms.modal> </@ms.modal>
<!--删除的模态框结束--> <!--删除的模态框结束-->
</@ms.contentPanel> </@ms.contentPanel>
</@ms.contentBody> </@ms.contentBody>
...@@ -135,6 +129,8 @@ $(function(){ ...@@ -135,6 +129,8 @@ $(function(){
//确认删除 //确认删除
$("#rightDelete").on("click",function(){ $("#rightDelete").on("click",function(){
var actionUrl="${base}/manager/modeltemplate/"+tmplModelId+"/delete.do"; var actionUrl="${base}/manager/modeltemplate/"+tmplModelId+"/delete.do";
$(this).text("删除中");
$(this).attr("disabled",true);
$("#rightDelete").request({url:actionUrl,type:"json",method:"post",func:function(data) { $("#rightDelete").request({url:actionUrl,type:"json",method:"post",func:function(data) {
alert("删除成功"); alert("删除成功");
location.reload(); location.reload();
...@@ -143,6 +139,8 @@ $(function(){ ...@@ -143,6 +139,8 @@ $(function(){
//保存或更新 //保存或更新
$("#addEditBtn").on("click",function(){ $("#addEditBtn").on("click",function(){
var vobj = $("#addEditForm").data('bootstrapValidator').validate();
if(vobj.isValid()){
$("#addEditForm").attr("action",postUrl); $("#addEditForm").attr("action",postUrl);
$("#addEditForm").postForm("#addEditForm",{func:function(msg){ $("#addEditForm").postForm("#addEditForm",{func:function(msg){
if (msg.result) { if (msg.result) {
...@@ -156,6 +154,7 @@ $(function(){ ...@@ -156,6 +154,7 @@ $(function(){
alert(msg); alert(msg);
} }
}}); }});
}
}); });
}); });
...@@ -165,16 +164,3 @@ $(function(){ ...@@ -165,16 +164,3 @@ $(function(){
</body> </body>
</html> </html>
...@@ -7,15 +7,40 @@ ...@@ -7,15 +7,40 @@
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="用户管理"/> <@ms.contentNav title="用户管理"/>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.form class="searchForm" name="searchForm" action="${basePath}/manager/people/user/list.do">
<@ms.row>
<@ms.col size="4">
<@ms.text label="昵称" name="peopleUserNickName" value="" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserNickName?default('')}" />
</@ms.col>
<@ms.col size="4">
<@ms.text label="真实姓名" name="peopleUserRealName" value="" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserRealName?default('')}" />
</@ms.col>
<@ms.col size="4">
<#assign status=[{"id":"1","name":"男"},{"id":"2","name":"女"}]>
<@ms.select label="性别" list="status" listValue="name" listKey="id" name="peopleUserSex" style="width:100%" default="全部" />
</@ms.col>
<@ms.col size="4">
<#assign status=[{"id":"0","name":"未审核"},{"id":"1","name":"已审核"}]>
<@ms.select label="审核状态" list="status" listValue="name" listKey="id" name="peopleState" style="width:100%" default="全部" />
</@ms.col>
<@ms.col size="4">
<@ms.date label="注册时间" name="peopleDateTime" value="" value="${peopleDateTime?default('')}" readonly="readonly" />
</@ms.col>
<@ms.col size="12" style="text-align:right">
<button type="button" class="btn btn-primary submit">筛选</button> 
<button type="button" class="btn reset">清除条件</button> 
<!--button type="button" class="btn btn-default exportExcel">批量导出&nbsp;<span class="glyphicon glyphicon-export"></span></button-->
</@ms.col>
</@ms.row>
</@ms.form>
<@ms.panelNav> <@ms.panelNav>
<@ms.panelNavBtnGroup> <@ms.panelNavBtnGroup>
<@ms.panelNavBtnAdd/> <@ms.panelNavBtnAdd/>
<@ms.panelNavBtnDel/> <@ms.panelNavBtnDel/>
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['<input type="checkbox" name="allCheck">','编号','头像','帐号','真实姓名','昵称','手机','邮箱','注册时间','用户状态']> <@ms.table head=['<th class="text-center"><input type="checkbox" name="allCheck"></th>','<th class="text-center">编号</th>','<th class="text-center">头像</th>','<th class="text-center">帐号</th>','<th class="text-center">真实姓名</th>','<th class="text-center">昵称</th>','<th class="text-center">手机</th>','<th class="text-center">邮箱</th>','<th class="text-center">注册时间</th>','<th class="text-center">用户状态</th>']>
<#if listPeople?has_content> <#if listPeople?has_content>
<#list listPeople as people> <#list listPeople as people>
<tr> <tr>
...@@ -25,24 +50,21 @@ ...@@ -25,24 +50,21 @@
<td class="text-center commentId">${people.peopleId?c?default(0)}</td> <td class="text-center commentId">${people.peopleId?c?default(0)}</td>
<td class="text-center"><#if people.peopleUser?has_content><img src="${people.peopleUser.peopleUserIcon?default("暂无")}" width="25" height="25"/></#if></td> <td class="text-center"><#if people.peopleUser?has_content><img src="${people.peopleUser.peopleUserIcon?default("暂无")}" width="25" height="25"/></#if></td>
<td class="text-center"> <a class="btn btn-xs tooltips editPeople" data-id="${people.peopleId?c?default(0)}" href="${base}/manager/people/user/${people.peopleId?c?default(0)}/edit.do" data-original-title="编辑用户信息" data-toggle="tooltip">${people.peopleName?default("暂无")}</a></td> <td class="text-center"> <a class="btn btn-xs tooltips editPeople" data-id="${people.peopleId?c?default(0)}" href="${base}/manager/people/user/${people.peopleId?c?default(0)}/edit.do" data-original-title="编辑用户信息" data-toggle="tooltip">${people.peopleName?default("暂无")}</a></td>
<td class="text-center">${people.peoplePhone?default("暂无")}</td>
<td class="text-center"><#if people.peopleUser?has_content>${people.peopleUser.peopleUserNickName?default("暂无")}</#if></td>
<td class="text-center"><#if people.peopleUser?has_content>${people.peopleUser.peopleUserRealName?default("暂无")}</#if></td> <td class="text-center"><#if people.peopleUser?has_content>${people.peopleUser.peopleUserRealName?default("暂无")}</#if></td>
<td class="text-center"><#if people.peopleUser?has_content>${people.peopleUser.peopleUserNickName?default("暂无")}</#if></td>
<td class="text-center">${people.peoplePhone?default("暂无")}</td>
<td class="text-center">${people.peopleMail?default("暂无")}</td> <td class="text-center">${people.peopleMail?default("暂无")}</td>
<td class="text-center">${people.peopleDateTime?string("yyyy-MM-dd HH:mm:ss")}</td> <td class="text-center">${people.peopleDateTime?string("yyyy-MM-dd HH:mm:ss")}</td>
<td class="text-center"> <td class="text-center">
<span class="switch switch-mini " data-id="${people.peopleId?c?default(0)}" data-status="${people.peopleState?default(0)}" data-status="${people.peopleState?default(0)}" > <span class="switch switch-mini " data-id="${people.peopleId?c?default(0)}" data-status="${people.peopleState?default(0)}" data-status="${people.peopleState?default(0)}" >
<input type="checkbox" name="peopleState" data-size="mini" data-on-text="已审" data-id="${people.peopleId?c?default(0)}" data-status="${people.peopleState?default(0)}" data-off-text="未审"/> <input type="checkbox" name="peopleState" data-size="mini" data-on-text="已审" data-id="${people.peopleId?c?default(0)}" data-status="${people.peopleState?default(0)}" data-off-text="未审"/>
</span> </span>
</td> </td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
<tr> <tr>
<td colspan="10" class="text-center"> <td colspan="12" class="text-center">
<@ms.nodata/> <@ms.nodata/>
</td> </td>
</tr> </tr>
...@@ -123,6 +145,10 @@ ...@@ -123,6 +145,10 @@
</@ms.content> </@ms.content>
<script> <script>
$(function(){ $(function(){
//根据条件查询用户
$(".submit").click(function() {
$("#searchForm").submit();
});
//初始化Switch按钮 //初始化Switch按钮
$("input[name='peopleState']").bootstrapSwitch(); $("input[name='peopleState']").bootstrapSwitch();
//遍历所有用户状态 //遍历所有用户状态
...@@ -133,9 +159,11 @@ ...@@ -133,9 +159,11 @@
} else if(status=="0") { } else if(status=="0") {
$(this).bootstrapSwitch('state', false); $(this).bootstrapSwitch('state', false);
} }
$(this).on('switchChange.bootstrapSwitch',changeStatus)
}); });
//点击事件,更新用户的的状态 //点击事件,更新用户的的状态
$(".switch-mini").click(function() { function changeStatus(){
//用户ID //用户ID
var peopleId = $(this).attr("data-id"); var peopleId = $(this).attr("data-id");
var obj = $(this); var obj = $(this);
...@@ -154,7 +182,7 @@ ...@@ -154,7 +182,7 @@
} }
} }
}) })
}); }
//全选 //全选
$("input[name='allCheck']").on("click",function(){ $("input[name='allCheck']").on("click",function(){
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<#if flag == true> <#if flag == true>
<@ms.contentNav title="角色管理 增加"> <@ms.contentNav title="新增角色">
<@ms.contentNavBack onclick="javascript:history.go(-1)" value="返回角色列表"/> <@ms.contentNavBack onclick="javascript:history.go(-1)" value="返回角色列表"/>
</@ms.contentNav> </@ms.contentNav>
<#else> <#else>
<@ms.contentNav title="角色管理 更新"> <@ms.contentNav title="编辑角色">
<@ms.contentNavBack onclick="javascript:history.go(-1)" value="返回角色列表"/> <@ms.contentNavBack onclick="javascript:history.go(-1)" value="返回角色列表"/>
</@ms.contentNav> </@ms.contentNav>
</#if> </#if>
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
//保存按钮点击提交表单 //保存按钮点击提交表单
$("#save").click(function(){ $("#save").click(function(){
if($("#saveRoleFrom").data('bootstrapValidator').validate().isValid()){ if($("#saveRoleFrom").data('bootstrapValidator').validate().isValid()){
$(this).attr("disabled","true"); $(this).attr("disabled","true");
var nodes = zTreeObjtree.getCheckedNodes(true); var nodes = zTreeObjtree.getCheckedNodes(true);
...@@ -113,9 +112,13 @@ ...@@ -113,9 +112,13 @@
dataType: "json", dataType: "json",
url: URL, url: URL,
data: $("#saveRoleFrom").serialize() + "&modelId=" + modelId, data: $("#saveRoleFrom").serialize() + "&modelId=" + modelId,
beforeSend:function(){
$("#save").text($("#save").text()+"");
$("#save").attr("disabled",true);
},
success: function(msg){ success: function(msg){
if(msg.result){ if(msg.result){
alert("<#if flag == true>增加<#else>更新</#if>角色成功"); alert("<#if flag == true>保存<#else>更新</#if>成功");
location.href = "${base}"+msg.resultMsg; location.href = "${base}"+msg.resultMsg;
} else { } else {
alert(msg.resultMsg); alert(msg.resultMsg);
...@@ -127,9 +130,6 @@ ...@@ -127,9 +130,6 @@
location.href = "${base}/manager/role/queryList.do"; location.href = "${base}/manager/role/queryList.do";
} }
}); });
}else{
$("#saveRoleFrom").attr("disabled","false");
return;
} }
}); });
}); });
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<body> <body>
<@ms.content> <@ms.content>
<@ms.contentBody> <@ms.contentBody>
<@ms.contentNav title="角色管理列表"> <@ms.contentNav title="角色管理">
</@ms.contentNav> </@ms.contentNav>
<@ms.contentPanel> <@ms.contentPanel>
<@ms.panelNav> <@ms.panelNav>
...@@ -20,24 +20,19 @@ ...@@ -20,24 +20,19 @@
</@ms.panelNavBtnGroup> </@ms.panelNavBtnGroup>
</@ms.panelNav> </@ms.panelNav>
<@ms.table head=['<input type="checkbox" id="allCheck" value="全选" data-original-title="全选删除" data-toggle="tooltip"/>','角色ID','角色名称','操作']> <@ms.table head=['<th class="text-center"><input type="checkbox" id="allCheck"/></th>','<th style="width:7%;text-align:center;">编号</th>','角色名称',"<th style='text-align:center;width:10%;'>操作</th>"]>
<#if listRole?has_content> <#if listRole?has_content>
<#list listRole as role> <#list listRole as role>
<tr> <tr>
<td class="text-center"> <td style="width:5%" class="text-center">
<#if role.roleId!=managerRoleId> <#if role.roleId!=managerRoleId>
<input class="text-center" type="checkbox" name="ids" value="${role.roleId?c?default(0)}"> <input type="checkbox" name="ids" value="${role.roleId?c?default(0)}">
</#if> </#if>
</td> </td>
<input type="hidden" name="${role.roleId?c?default(0)}" /> <input type="hidden" name="${role.roleId?c?default(0)}" />
<td class="text-center roleId">${role.roleId?c?default(0)}</td> <td style="width:7%" class="roleId text-center">${role.roleId?c?default(0)}</td>
<td class="text-center">${role.roleName?default("暂无")}</td> <td style="width:40%">${role.roleName?default("暂无")}</td>
<td class="text-center operate"> <td class="text-center operate">
<#if role.roleId!=managerRoleId>
<a class="btn btn-xs tooltips del-btn" data-toggle="tooltip" data-id="${role.roleId?c?default(0)}" data-target="#deleteModal" data-original-title="删除">
<i class="glyphicon glyphicon-trash"></i>
</a>
</#if>
<a class="btn btn-xs tooltips" data-toggle="tooltip" href="${base}/manager/role/${role.roleId}/edit.do" data-original-title="编辑"> <a class="btn btn-xs tooltips" data-toggle="tooltip" href="${base}/manager/role/${role.roleId}/edit.do" data-original-title="编辑">
<i class="glyphicon glyphicon-pencil"></i> <i class="glyphicon glyphicon-pencil"></i>
</a> </a>
...@@ -82,11 +77,6 @@ ...@@ -82,11 +77,6 @@
</@ms.content> </@ms.content>
<script type="text/javascript"> <script type="text/javascript">
<#if listRole?has_content>
$("#allCheck").attr("style","display:block;margin:0 auto");
<#else>
$("#allCheck").attr("style","display:none");
</#if>
//触发模态框事件或者是模态框中按钮的事件 //触发模态框事件或者是模态框中按钮的事件
$(function(){ $(function(){
...@@ -132,7 +122,9 @@ ...@@ -132,7 +122,9 @@
//删除角色 //删除角色
function deleteRole(roleId){ function deleteRole(roleId){
//拼接ajax地址 //拼接ajax地址
var URL="${base}/manager/role/"+roleId+"/delete.do" var URL="${base}/manager/role/"+roleId+"/delete.do";
$("#deleteButtonAll").text("删除中");
$("#deleteButtonAll").attr("disabled",true);
$(this).request({url:URL,data:"roleId=" + roleId,type:"json",method:"post",func:function(msg) { $(this).request({url:URL,data:"roleId=" + roleId,type:"json",method:"post",func:function(msg) {
//回调处理方式 //回调处理方式
if(msg != 0) { if(msg != 0) {
...@@ -159,10 +151,10 @@ ...@@ -159,10 +151,10 @@
count++; count++;
} }
}); });
if(ids.length != 0) { if(ids.length != 0) {
var URL= "${base}/manager/role/allDelete.do"; var URL= "${base}/manager/role/allDelete.do";
$("#deleteButtonAll").text("删除中");
$("#deleteButtonAll").attr("disabled",true);
$(this).request({url:URL,data:ids,type:"json",method:"post",func:function(msg) { $(this).request({url:URL,data:ids,type:"json",method:"post",func:function(msg) {
if(msg != 0) { if(msg != 0) {
alert("批量删除成功"); alert("批量删除成功");
...@@ -173,6 +165,8 @@ ...@@ -173,6 +165,8 @@
} }
} else { } else {
alert("删除角色失败"); alert("删除角色失败");
$("#deleteButtonAll").text("删除");
$("#deleteButtonAll").attr("disabled",false);
$(".deleteAll").modal("hide"); $(".deleteAll").modal("hide");
} }
}}); }});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment