Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MCMS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
MCMS
Commits
8fbe0fb7
Commit
8fbe0fb7
authored
Mar 24, 2016
by
ms-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
2498f983
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
72 deletions
+69
-72
src/main/java/com/mingsoft/basic/action/AppAction.java
src/main/java/com/mingsoft/basic/action/AppAction.java
+12
-1
src/main/java/com/mingsoft/basic/action/ManagerAction.java
src/main/java/com/mingsoft/basic/action/ManagerAction.java
+0
-1
src/main/java/com/mingsoft/cms/action/GeneraterAction.java
src/main/java/com/mingsoft/cms/action/GeneraterAction.java
+1
-1
src/main/java/com/mingsoft/cms/action/TempletsAction.java
src/main/java/com/mingsoft/cms/action/TempletsAction.java
+5
-1
src/main/resources/spring-mvc.xml
src/main/resources/spring-mvc.xml
+6
-1
src/main/resources/spring.xml
src/main/resources/spring.xml
+0
-20
src/main/webapp/WEB-INF/web.xml
src/main/webapp/WEB-INF/web.xml
+1
-3
src/main/webapp/manager/cms/templets/templets_edit_file.ftl
src/main/webapp/manager/cms/templets/templets_edit_file.ftl
+42
-42
src/main/webapp/manager/cms/templets/templets_file_list.ftl
src/main/webapp/manager/cms/templets/templets_file_list.ftl
+1
-1
src/main/webapp/templets/1/mooc/login.htm
src/main/webapp/templets/1/mooc/login.htm
+1
-1
No files found.
src/main/java/com/mingsoft/basic/action/AppAction.java
View file @
8fbe0fb7
...
@@ -207,7 +207,18 @@ public class AppAction extends BaseAction{
...
@@ -207,7 +207,18 @@ public class AppAction extends BaseAction{
}
}
if
(!
StringUtil
.
isBlank
(
app
.
getAppLogo
()))
{
if
(!
StringUtil
.
isBlank
(
app
.
getAppLogo
()))
{
app
.
setAppLogo
(
app
.
getAppLogo
().
replace
(
"|"
,
""
));
app
.
setAppLogo
(
app
.
getAppLogo
().
replace
(
"|"
,
""
));
}
}
String
url
=
app
.
getAppUrl
();
String
[]
_url
=
url
.
split
(
"\n"
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
String
temp:
_url
)
{
if
(
temp
.
lastIndexOf
(
"/"
)>-
1
||
temp
.
lastIndexOf
(
"\\"
)>-
1
)
{
temp
=
temp
.
substring
(
temp
.
length
()-
1
);
sb
.
append
(
temp
).
append
(
"\n"
);
}
}
app
.
setAppUrl
(
sb
.
toString
());
//更新站点信息
//更新站点信息
appBiz
.
updateEntity
(
app
);
appBiz
.
updateEntity
(
app
);
this
.
outJson
(
response
,
ModelCode
.
APP
,
true
,
String
.
valueOf
(
pageNo
),
String
.
valueOf
(
managerRoleID
));
this
.
outJson
(
response
,
ModelCode
.
APP
,
true
,
String
.
valueOf
(
pageNo
),
String
.
valueOf
(
managerRoleID
));
...
...
src/main/java/com/mingsoft/basic/action/ManagerAction.java
View file @
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
;
...
...
src/main/java/com/mingsoft/cms/action/GeneraterAction.java
View file @
8fbe0fb7
...
@@ -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
;
}
}
...
...
src/main/java/com/mingsoft/cms/action/TempletsAction.java
View file @
8fbe0fb7
...
@@ -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"
;
...
...
src/main/resources/spring-mvc.xml
View file @
8fbe0fb7
...
@@ -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"
/>
...
...
src/main/resources/spring.xml
deleted
100644 → 0
View file @
2498f983
<?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
src/main/webapp/WEB-INF/web.xml
View file @
8fbe0fb7
...
@@ -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>
...
...
src/main/webapp/manager/cms/templets/templets_edit_file.ftl
View file @
8fbe0fb7
<@ms.html5>
<@ms.html5>
<@ms.nav title="编辑模版文件" back=true>
<@ms.nav title="编辑模版文件" back=true>
<@ms.savebutton id="update" value="修改"/>
<@ms.savebutton id="update" value="修改"/>
</@ms.nav>
</@ms.nav>
<@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}"/>
<@ms.hidden id="fileName" value="${fileName}" />
<@ms.hidden id="fileName" value="${fileName}" />
<@ms.hidden id="fileNamePrefix" value="${fileNamePrefix}" />
<@ms.hidden id="fileNamePrefix" value="${fileNamePrefix}" />
</@ms.form>
</@ms.form>
</@ms.panel>
</@ms.panel>
</@ms.html5>
</@ms.html5>
<script type="text/javascript">
<script type="text/javascript">
$(function () {
$(function () {
//修改文件
//修改文件
$("#update").on("click",function(){
$("#update").on("click",function(){
var formData = $("#editFileForm").serialize();
var formData = $("#editFileForm").serialize();
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).text("修改中");
$(this).attr("disabled",true);
$(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){
alert("修改模版文件成功");
alert("修改模版文件成功");
} else {
} else {
alert("修改模版文件失败");
alert("修改模版文件失败");
}
}
var fileNameUrl = $(".fileNamePrefix").val();
var fileNameUrl = $(".fileNamePrefix").val();
$("#update").text("修改");
$("#update").text("修改");
$("#update").attr("disabled",false);
$("#update").attr("disabled",false);
//location.href = base+"/manager/cms/templet/showChildFileAndFolder.do?skinFolderName=" + fileNameUrl;
//location.href = base+"/manager/cms/templet/showChildFileAndFolder.do?skinFolderName=" + fileNameUrl;
}});
}});
});
});
});
});
</script>
</script>
src/main/webapp/manager/cms/templets/templets_file_list.ftl
View file @
8fbe0fb7
...
@@ -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="编辑">
...
...
src/main/webapp/templets/1/mooc/login.htm
View file @
8fbe0fb7
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment