Commit e72f88a2 authored by killfen's avatar killfen

Merge branch 'master' of https://git.oschina.net/mingSoft/MCMS.git

Conflicts:
	src/main/java/com/mingsoft/basic/action/AppAction.java
parents 83c95d79 8fbe0fb7
...@@ -314,7 +314,6 @@ public class ManagerAction extends BaseAction { ...@@ -314,7 +314,6 @@ public class ManagerAction extends BaseAction {
this.outJson(response, ModelCode.ROLE, false, getResString("err.exist",this.getResString("managerName"))); this.outJson(response, ModelCode.ROLE, false, getResString("err.exist",this.getResString("managerName")));
return; return;
} }
System.out.println("============" + managerBiz.countManagerName(manager.getManagerName()));
//验证表单 //验证表单
if (!this.checkForm(manager, response)) { if (!this.checkForm(manager, response)) {
return; return;
......
...@@ -769,7 +769,7 @@ public class GeneraterAction extends BaseAction { ...@@ -769,7 +769,7 @@ public class GeneraterAction extends BaseAction {
//获取应用实体信息 //获取应用实体信息
AppEntity app = this.getApp(request); AppEntity app = this.getApp(request);
//组织主页预览地址 //组织主页预览地址
String indexPosition = app.getAppHostUrl() + File.separator + IParserRegexConstant.HTML_SAVE_PATH + File.separator + app.getAppId() + File.separator + position; String indexPosition = app.getAppHostUrl() + (app.getAppHostUrl().lastIndexOf("/")>-1?"":File.separator) + IParserRegexConstant.HTML_SAVE_PATH + File.separator + app.getAppId() + File.separator + position;
return "redirect:" + indexPosition; return "redirect:" + indexPosition;
} }
......
...@@ -291,7 +291,10 @@ public class TempletsAction extends BaseAction { ...@@ -291,7 +291,10 @@ public class TempletsAction extends BaseAction {
List<String> fileNameList = new ArrayList<String>(); List<String> fileNameList = new ArrayList<String>();
for (int i = 0; i < files.length; i++) { for (int i = 0; i < files.length; i++) {
File currFile = files[i]; File currFile = files[i];
String temp = currFile.getPath().replace(this.getRealPath(request, ""),"").replace(IParserRegexConstant.REGEX_SAVE_TEMPLATE+Const.SEPARATOR+this.getAppId(request)+Const.SEPARATOR, ""); String filter = IParserRegexConstant.REGEX_SAVE_TEMPLATE+"/"+this.getAppId(request)+"/";
String temp = currFile.getPath().replace(this.getRealPath(request, ""),"").replace(filter, "");
filter = IParserRegexConstant.REGEX_SAVE_TEMPLATE+"\\"+this.getAppId(request)+"\\";
temp = temp.replace(filter, "");
if(currFile.isDirectory()){ if(currFile.isDirectory()){
folderNameList.add(temp); folderNameList.add(temp);
}else { }else {
...@@ -321,6 +324,7 @@ public class TempletsAction extends BaseAction { ...@@ -321,6 +324,7 @@ public class TempletsAction extends BaseAction {
model.addAttribute("fileContent", FileUtil.readFile(this.getRealPath(request, fileName))); model.addAttribute("fileContent", FileUtil.readFile(this.getRealPath(request, fileName)));
} }
model.addAttribute("name",new File(this.getRealPath(request, fileName)).getName());
model.addAttribute("fileName", fileName); model.addAttribute("fileName", fileName);
model.addAttribute("fileNamePrefix", fileName.substring(0,fileName.lastIndexOf(File.separator)+1)); model.addAttribute("fileNamePrefix", fileName.substring(0,fileName.lastIndexOf(File.separator)+1));
return "/manager/cms/templets/templets_edit_file"; return "/manager/cms/templets/templets_edit_file";
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd"> http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:property-placeholder location="classpath:config.properties" />
<context:component-scan
base-package="com.mingsoft.**.biz.impl,com.mingsoft.**.aop,com.**.parser">
</context:component-scan>
<!-- 打开aop 注解 -->
<aop:aspectj-autoproxy proxy-target-class="true" />
<!-- 自动扫描controller包下的所有类,使其认为spring mvc的控制器 --> <!-- 自动扫描controller包下的所有类,使其认为spring mvc的控制器 -->
<context:component-scan base-package="com.mingsoft.**.action" /> <context:component-scan base-package="com.mingsoft.**.action" />
<mvc:annotation-driven conversion-service="conversionService" /> <mvc:annotation-driven conversion-service="conversionService" />
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
">
<context:property-placeholder location="classpath:config.properties" />
<context:component-scan
base-package="com.mingsoft.**.biz.impl,com.mingsoft.**.aop,com.**.parser">
</context:component-scan>
<!-- 打开aop 注解 -->
<aop:aspectj-autoproxy proxy-target-class="true" />
</beans>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<display-name>mybatis</display-name> <display-name>mybatis</display-name>
<context-param> <context-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml,classpath:spring-mybatis.xml,classpath:spring-shiro.xml</param-value> <param-value>classpath:spring-mvc.xml,classpath:spring-mybatis.xml,classpath:spring-shiro.xml</param-value>
</context-param> </context-param>
<filter> <filter>
<description>字符集过滤器</description> <description>字符集过滤器</description>
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
</welcome-file-list> </welcome-file-list>
<!-- 配置session超时时间,单位分钟 --> <!-- 配置session超时时间,单位分钟 -->
<error-page> <error-page>
<error-code>404</error-code> <error-code>404</error-code>
<location>/error/404.do</location> <location>/error/404.do</location>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<@ms.panel> <@ms.panel>
<@ms.form name="form" id="editFileForm"> <@ms.form name="form" id="editFileForm">
<!--文件名称--> <!--文件名称-->
<@ms.text label="文件名称" value="${name}" readonly="readonly"/> <@ms.text label="文件名称" value="${name?default('')}" readonly="readonly"/>
<@ms.hidden value="${fileName}" name="fileName" /> <@ms.hidden value="${fileName}" name="fileName" />
<!--文件内容--> <!--文件内容-->
<@ms.textarea name="fileContent" label="文件内容" wrap="Soft" rows="21" size="" value="${fileContent}"/> <@ms.textarea name="fileContent" label="文件内容" wrap="Soft" rows="21" size="" value="${fileContent}"/>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<td style="width:35%" class="name">${fileName}</td> <td style="width:35%" class="name">${fileName}</td>
<td class="text-center type"></td> <td class="text-center type"></td>
<td style="width:10%;text-align:center"> <td style="width:10%;text-align:center">
<a class="btn btn-xs tooltips deleteIcon" data-toggle="tooltip" data-title="templets/${websiteId}/${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>
<a class="btn btn-xs tooltips editFileBtn" data-toggle="tooltip" data-title="templets/${websiteId}/${fileName}" data-original-title="编辑"> <a class="btn btn-xs tooltips editFileBtn" data-toggle="tooltip" data-title="templets/${websiteId}/${fileName}" data-original-title="编辑">
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<p class="gform-box" style="margin-bottom:0px"> <p class="gform-box" style="margin-bottom:0px">
<input type="hidden" name="isImgCode" value="true" /> <input type="hidden" name="isImgCode" value="true" />
<input class="gbtxt" id="rand_code" maxlength="4" style="width: 259px;" name="rand_code" placeholder="验证码" type="text" value="" /> <input class="gbtxt" id="rand_code" maxlength="4" style="width: 259px;" name="rand_code" placeholder="验证码" type="text" value="" />
<img id="yzmimg" class="ms-w32 ms-h16" style="position: relative;top: 9px;height:26px;width:86px;" src="/code" onclick="this.src='/code?t='+new Date().getTime()"/> <img id="yzmimg" class="ms-w32 ms-h16" style="position: relative;top: 9px;height:26px;width:86px;" src="{ms:global.host/}/code" onclick="this.src='{ms:global.host/}/code?t='+new Date().getTime()"/>
</p> </p>
<div class="infor-tips"></div> <div class="infor-tips"></div>
<p class="gform-box"> <p class="gform-box">
......
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