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
f680f668
Commit
f680f668
authored
Apr 03, 2016
by
ms-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模版管理bug修复
parent
4cc72690
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
259 additions
and
350 deletions
+259
-350
src/main/java/com/mingsoft/basic/action/AppAction.java
src/main/java/com/mingsoft/basic/action/AppAction.java
+207
-213
src/main/java/com/mingsoft/cms/action/TempletsAction.java
src/main/java/com/mingsoft/cms/action/TempletsAction.java
+3
-4
src/main/webapp/manager/app/app.ftl
src/main/webapp/manager/app/app.ftl
+2
-2
src/main/webapp/manager/cms/templets/templets_file_list.ftl
src/main/webapp/manager/cms/templets/templets_file_list.ftl
+5
-14
src/main/webapp/manager/include/ui/form.ftl
src/main/webapp/manager/include/ui/form.ftl
+11
-3
src/main/webapp/manager/people/user/people_user.ftl
src/main/webapp/manager/people/user/people_user.ftl
+24
-107
src/main/webapp/manager/people/user/people_user_list.ftl
src/main/webapp/manager/people/user/people_user_list.ftl
+7
-7
No files found.
src/main/java/com/mingsoft/basic/action/AppAction.java
View file @
f680f668
/**
/**
The MIT License (MIT) * Copyright (c) 201
5
铭飞科技
The MIT License (MIT) * Copyright (c) 201
6
铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* 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
* this software and associated documentation files (the "Software"), to deal in
...
@@ -63,12 +63,6 @@ public class AppAction extends BaseAction {
...
@@ -63,12 +63,6 @@ public class AppAction extends BaseAction {
@Autowired
@Autowired
private
IAppBiz
appBiz
;
private
IAppBiz
appBiz
;
/**
* managerBiz业务层的注入
*/
@Autowired
private
IManagerBiz
managerBiz
;
/**
/**
* 跳转到修改页面
* 跳转到修改页面
*
*
...
@@ -146,20 +140,20 @@ public class AppAction extends BaseAction {
...
@@ -146,20 +140,20 @@ 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
=
app
.
getAppUrl
();
String
_url
[]
=
url
.
split
(
"\r\n"
);
String
_url
[]
=
url
.
split
(
"\r\n"
);
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
for
(
String
temp
:
_url
)
{
for
(
String
temp
:
_url
)
{
String
lastChar
=
temp
.
trim
().
substring
(
temp
.
length
()
-
1
);
String
lastChar
=
temp
.
trim
().
substring
(
temp
.
length
()
-
1
);
if
(
lastChar
.
equals
(
"/"
)
||
lastChar
.
equals
(
"\\"
))
{
if
(
lastChar
.
equals
(
"/"
)
||
lastChar
.
equals
(
"\\"
))
{
sb
.
append
(
temp
.
substring
(
0
,
temp
.
trim
().
length
()
-
1
)).
append
(
"\r\n"
);
sb
.
append
(
temp
.
substring
(
0
,
temp
.
trim
().
length
()
-
1
)).
append
(
"\r\n"
);
}
}
}
}
if
(!
StringUtil
.
isBlank
(
sb
.
toString
()))
{
if
(!
StringUtil
.
isBlank
(
sb
.
toString
()))
{
app
.
setAppUrl
(
sb
.
toString
());
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/cms/action/TempletsAction.java
View file @
f680f668
...
@@ -305,8 +305,7 @@ public class TempletsAction extends BaseAction {
...
@@ -305,8 +305,7 @@ public class TempletsAction extends BaseAction {
model
.
addAttribute
(
"fileNameList"
,
folderNameList
);
model
.
addAttribute
(
"fileNameList"
,
folderNameList
);
}
}
String
uploadFileUrl
=
skinFolderName
;
String
uploadFileUrl
=
skinFolderName
;
uploadFileUrl
=
uploadFileUrl
.
replace
(
File
.
separator
+
File
.
separator
,
File
.
separator
);
model
.
addAttribute
(
"uploadFileUrl"
,
uploadFileUrl
+
File
.
separator
);
model
.
addAttribute
(
"uploadFileUrl"
,
uploadFileUrl
);
model
.
addAttribute
(
"websiteId"
,
managerSession
.
getBasicId
());
model
.
addAttribute
(
"websiteId"
,
managerSession
.
getBasicId
());
return
"/manager/cms/templets/templets_file_list"
;
return
"/manager/cms/templets/templets_file_list"
;
}
}
...
@@ -341,7 +340,7 @@ public class TempletsAction extends BaseAction {
...
@@ -341,7 +340,7 @@ public class TempletsAction extends BaseAction {
int
pageNo
=
1
;
int
pageNo
=
1
;
ManagerSessionEntity
managerSession
=
getManagerBySession
(
request
);
ManagerSessionEntity
managerSession
=
getManagerBySession
(
request
);
String
fileName
=
request
.
getParameter
(
"fileName"
);
String
fileName
=
request
.
getParameter
(
"fileName"
);
FileUtil
.
delFile
(
this
.
getRealPath
(
request
,
fileName
));
FileUtil
.
delFile
(
this
.
getRealPath
(
request
,
IParserRegexConstant
.
REGEX_SAVE_TEMPLATE
+
File
.
separator
+
managerSession
.
getBasicId
()
+
File
.
separator
+
fileName
));
// 判断当前页码
// 判断当前页码
this
.
getHistoryPageNoByCookie
(
request
);
this
.
getHistoryPageNoByCookie
(
request
);
return
pageNo
;
return
pageNo
;
...
...
src/main/webapp/manager/app/app.ftl
View file @
f680f668
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
<@ms.checkbox name="appMobileStyle" width="200" list=[{"id":"m","value":"启用"}] listKey="id" listValue="value" valueList=["${app.appMobileStyle!('')}"] label="启用移动端"
<@ms.checkbox name="appMobileStyle" width="200" list=[{"id":"m","value":"启用"}] listKey="id" listValue="value" valueList=["${app.appMobileStyle!('')}"] label="启用移动端"
help="启用后手机用户访问网站会显示手机版网页,前提是网站必需提供移动端皮肤,相关教程:<a href='http://ms.ming-soft.com/mbbs/13086/detail.do' target='_blank'>铭飞移动端开发教程</a>"/>
help="启用后手机用户访问网站会显示手机版网页,前提是网站必需提供移动端皮肤,相关教程:<a href='http://ms.ming-soft.com/mbbs/13086/detail.do' target='_blank'>铭飞移动端开发教程</a>"/>
<@ms.textarea name="appUrl" label="域 名" width="400" rows="4" value="${app.appUrl?default('')}"
<@ms.textarea name="appUrl" label="域 名" width="400" rows="4" value="${app.appUrl?default('')}"
placeholder="使用回车换行可以输入多个域名地址,必须要加http:// 域名不要以
/
\\符号结尾"
placeholder="使用回车换行可以输入多个域名地址,必须要加http:// 域名不要以
/
\\符号结尾"
help="多个域名回车换行显示,必须以http[s]://打头,
域名不要以/\\符号结尾<br/>例如:<br/>http://www.a.com <br/> http://a.com
"
help="多个域名回车换行显示,必须以http[s]://打头,
<br/>例如:http://www.a.com <br/> http://a.com 域名不要以/\\符号结尾
"
validation={"maxlength":"150","required":"true","data-bv-notempty-message":"必填项目", "data-bv-stringlength-message":"长度在150个字符以内!"} />
validation={"maxlength":"150","required":"true","data-bv-notempty-message":"必填项目", "data-bv-stringlength-message":"长度在150个字符以内!"} />
<@ms.select name="appStyle" width="300" id="appStyle" label="模板风格" />
<@ms.select name="appStyle" width="300" id="appStyle" label="模板风格" />
<@ms.textarea name="appKeyword" label="关键字" width="700" value="${app.appKeyword?default('')}" rows="4" placeholder="请输入关键字"/>
<@ms.textarea name="appKeyword" label="关键字" width="700" value="${app.appKeyword?default('')}" rows="4" placeholder="请输入关键字"/>
...
...
src/main/webapp/manager/cms/templets/templets_file_list.ftl
View file @
f680f668
<@ms.html5>
<@ms.html5>
<@ms.nav title="文件列表"></@ms.nav>
<@ms.nav title="文件列表"></@ms.nav>
<@ms.panel>
<@ms.panel>
<@ms.uploadFile path="${uploadFileUrl}" inputName="file" size="20" filetype="*.htm;*.html;*.jpg;*.gif;*.png;*.css;*.js;*.ico;*.swf" msg="建议上传5M以下htm/html/css/js/jpg/gif/png/swf文件" maxSize="5" callBack="
test
" isRename="false"/>
<@ms.uploadFile path="${uploadFileUrl}" inputName="file" size="20" filetype="*.htm;*.html;*.jpg;*.gif;*.png;*.css;*.js;*.ico;*.swf" msg="建议上传5M以下htm/html/css/js/jpg/gif/png/swf文件" maxSize="5" callBack="
refresh
" isRename="false"/>
<@ms.table head=['<th class="text-center">图标</th>','模板名称',"<th style='width:20%;text-align:center'>类型</th>","<th class='text-center' style='width:10%;'>操作</th>"]>
<@ms.table head=['<th class="text-center">图标</th>','模板名称',"<th style='width:20%;text-align:center'>类型</th>","<th class='text-center' style='width:10%;'>操作</th>"]>
...
@@ -50,17 +50,11 @@
...
@@ -50,17 +50,11 @@
var skinFolderName = "${uploadFileUrl?replace("\\","/")}";
var skinFolderName = "${uploadFileUrl?replace("\\","/")}";
var interval;
var interval;
function run() {
function refresh(e){
interval = setInterval(chat, "1000");
alert("上传成功");
}
location.reload();
function test(e){
isSuccess = true;
fileUrl = e;
alert("模版文件上传成功 ");
}
}
function chat() {
function chat() {
if(isSuccess){
clearTimeout(interval); //关闭定时器
var temp = $(".deleteIcon").attr("data-title");
var temp = $(".deleteIcon").attr("data-title");
if(temp == null || temp == ""){
if(temp == null || temp == ""){
temp = $(".editFileBtn").attr("data-title");
temp = $(".editFileBtn").attr("data-title");
...
@@ -87,7 +81,6 @@
...
@@ -87,7 +81,6 @@
} else {
} else {
location.href="${base}/manager/cms/templet/showChildFileAndFolder.do?skinFolderName="+temp;
location.href="${base}/manager/cms/templet/showChildFileAndFolder.do?skinFolderName="+temp;
}
}
}
}
}
//删除模版文件
//删除模版文件
...
@@ -98,8 +91,7 @@
...
@@ -98,8 +91,7 @@
$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
if(msg != 0) {
if(msg != 0) {
alert("删除模版文件成功");
alert("删除模版文件成功");
fileName = fileName.substring(0,fileName.lastIndexOf("/"));
location.reload();
location.href = base+"/manager/cms/templet/showChildFileAndFolder.do?skinFolderName="+fileName;
} else {
} else {
alert("删除模版文件失败");
alert("删除模版文件失败");
}
}
...
@@ -109,7 +101,6 @@
...
@@ -109,7 +101,6 @@
$(function () {
$(function () {
//加载页面时启动定时器
//加载页面时启动定时器
run();
//若为文件夹,则左侧显示文件夹图标;若为文件,则左侧显示文件图标,且稍向右偏移
//若为文件夹,则左侧显示文件夹图标;若为文件,则左侧显示文件图标,且稍向右偏移
$(".name").each(function(i){
$(".name").each(function(i){
...
...
src/main/webapp/manager/include/ui/form.ftl
View file @
f680f668
...
@@ -41,10 +41,10 @@ method:提交方式
...
@@ -41,10 +41,10 @@ method:提交方式
});
});
</#if>
</#if>
//$("#${name} .form-group>div.radio").siblings("i.form-control-feedback").clone().prependTo($("#${name} .form-group>div.radio"));
//$("#${name} .form-group>div.radio").siblings("i.form-control-feedback").clone().prependTo($("#${name} .form-group>div.radio"));
//$("#${name} .form-group>div.radio").siblings("i.form-control-feedback").remove();
//$("#${name} .form-group>div.radio").siblings("i.form-control-feedback").remove();
<#if !class?has_content>
<#if !class?has_content>
$("#${name} .form-group>label").removeClass("col-sm-2");
$("#${name} .form-group>label").removeClass("col-sm-2");
$("#${name} .form-group>div").removeClass("col-sm-9");
$("#${name} .form-group>div").removeClass("col-sm-9");
var width = $("#${name} .form-group>div.ms-from-group-input").width();
var width = $("#${name} .form-group>div.ms-from-group-input").width();
...
@@ -53,7 +53,15 @@ method:提交方式
...
@@ -53,7 +53,15 @@ method:提交方式
//$("#${name} .form-group label").removeClass("checkbox-inline").removeClass("radio-inline");
//$("#${name} .form-group label").removeClass("checkbox-inline").removeClass("radio-inline");
//$("#${name} .has-feedback .form-control-feedback").css({top:"25px"});
//$("#${name} .has-feedback .form-control-feedback").css({top:"25px"});
<#elseif class?index_of("searchForm") gt -1>
$("#${name} .form-group>label").removeClass("col-sm-3");
$("#${name} .form-group>div").removeClass("col-sm-9");
$("#${name} .form-group>label").addClass("col-sm-4");
$("#${name} .form-group>div").addClass("col-sm-8");
$("#${name} .ms-form-group").addClass("col-sm-4");
$("#${name}").show();
</#if>
</#if>
})
})
</script>
</script>
...
@@ -63,13 +71,13 @@ method:提交方式
...
@@ -63,13 +71,13 @@ method:提交方式
<#macro searchForm name id="" target=""
<#macro searchForm name id="" target=""
action="" method="post" enctype=""
action="" method="post" enctype=""
class="searchForm form-inline" style="display:none; background-color: white;" isvalidation=false tooltip=true >
class="searchForm form-inline" style="display:none; background-color: white;" isvalidation=false tooltip=true >
<@ms.form name="${name}" id="${id}" action="${action}" style="background-color: white;" isvalidation=true class="${class}" tooltip=true>
<@ms.form name="${name}" id="${id}" action="${action}" style="
display:none;
background-color: white;" isvalidation=true class="${class}" tooltip=true>
<#nested/><#rt/>
<#nested/><#rt/>
</@ms.form>
</@ms.form>
</#macro>
</#macro>
<#macro searchFormButton close="">
<#macro searchFormButton close="">
<div class="bottom">
<div class="bottom"
style="clear:both"
>
<!--div class="close">close</div-->
<!--div class="close">close</div-->
<@ms.resetButton/>
<@ms.resetButton/>
<#nested/><#rt/>
<#nested/><#rt/>
...
...
src/main/webapp/manager/people/user/people_user.ftl
View file @
f680f668
<!DOCTYPE html>
<@ms.html5>
<html
lang=
"en"
>
<@ms.nav title="用户管理" back=true>
<head>
<@ms.saveButton id="saveUpdate" />
<
#include
"/
manager
/
include
/
meta
.
ftl
"
/>
</@ms.nav>
</head>
<@ms.panel>
<body>
<@ms.form isvalidation=true name="peopleForm" action="${base}/manager/people/user/${autoCURD}.do">
<
@
ms
.
content
>
<@ms.text name="peopleUserNickName" width="300" label="用户昵称" title="用户昵称" size="5" placeholder="请输入文章标题" value="${peopleUser.peopleUserNickName?default('')}" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"12","data-bv-stringlength-message":"昵称不能超过12个字符"}/>
<
@
ms
.
contentBody
>
<@ms.text name="peopleName" label="用户名" placeholder="请输入用户名" title="" size="5" width="300" value="${peopleUser.peopleName?default('')}" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"12","data-bv-stringlength-message":"用户名长度不能超过12个字符"}/>
<@ms.password name="peoplePassword" label="密码" title="" size="5" width="300" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"20","data-bv-stringlength-message":"密码长度不能超过20个字符","data-bv-regexp":"true","data-bv-regexp-regexp":'^[A-Za-z0-9_]+$',"data-bv-regexp-message":"密码只能由英文字母,数字,下划线组成!"}/>
<
@
ms
.
contentNav
title=
"用户管理"
>
<@ms.text name="peoplePhone" label="手机号" placeholder="请输入手机号" title="" size="5" width="300" value="${peopleUser.peoplePhone?default('')}" validation={"maxlength":"18","data-bv-stringlength":"true","data-bv-stringlength-max":"18","data-bv-stringlength-message":"手机号码长度不能超过18个字符","data-bv-regexp":"true", "data-bv-regexp-regexp":'^[1][1-8][0-9]{9}',"data-bv-regexp-message":"手机号码格式错误"}/>
<
@
ms
.
savebutton
id=
"saveUpdate"
value=
""
/>
<@ms.text name="peopleMail" label="邮箱" placeholder="请输入邮箱" title="" size="5" width="300" value="${peopleUser.peopleMail?default('')}" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"50","data-bv-stringlength-message":"邮箱长度不能超过50个字符","data-bv-regexp":"true", "data-bv-regexp-regexp":'^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$',"data-bv-regexp-message":"邮箱格式错误"}/>
<
@
ms
.
contentNavBack
class=
"btn btn-default returnList"
value=
"返回列表"
/>
</
@
ms
.contentNav
>
<
@
ms
.
contentPanel
>
<
@
ms
.
form
isvalidation=
true
name=
"peopleForm"
action=
"${basePath}/manager/people/user/update.do"
class=
"form-inline searchForm"
style=
"min-height:98%"
>
<
#if
peopleUser
?
has_content
>
<input
type=
"hidden"
class=
"form-control"
name=
"peopleId"
value=
""
/>
</
#
if>
<
@
ms
.
row
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
text
name=
"peopleUserNickName"
label=
"用户昵称"
placeholder=
"请输入用户昵称"
title=
""
size=
"5"
style=
"width:40%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"12","data-bv-stringlength-message":"昵称不能超过12个字符"}/
>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
text
name=
"peopleName"
label=
"用户名"
placeholder=
"请输入用户名"
title=
""
size=
"5"
style=
"width:40%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"12","data-bv-stringlength-message":"用户名长度不能超过12个字符"}/
>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
#if
peopleUser
?
has_content
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
password
name=
"peoplePassword"
label=
"密码"
title=
""
size=
"5"
style=
"width:40%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"20","data-bv-stringlength-message":"密码长度不能超过20个字符","data-bv-regexp":"true","data-bv-regexp-regexp":'^[A-Za-z0-9_]+$',"data-bv-regexp-message":"密码只能由英文字母,数字,下划线组成!"}/
>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
#else
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
password
name=
"peoplePassword"
label=
"密码"
title=
""
size=
"5"
style=
"width:40%"
validation=
{"data-bv-stringlength":"true","required":"true",
"
data-bv-notempty-message
"
:
"密码不能为空","
data-bv-stringlength-max
"
:
"
20
","
data-bv-stringlength-message
"
:
"密码长度不能超过
20
个字符","
data-bv-regexp
"
:
"
true
","
data-bv-regexp-regexp
"
:
'^[
A-Za-z0-9_
]+$',"
data-bv-regexp-message
"
:
"密码只能由英文字母,数字,下划线组成!"}
/>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
</
#
if>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
text
name=
"peoplePhone"
label=
"手机号"
placeholder=
"请输入手机号"
title=
""
size=
"5"
style=
"width:36%"
validation=
{"maxlength":"18","data-bv-stringlength":"true","data-bv-stringlength-max":"18","data-bv-stringlength-message":"手机号码长度不能超过18个字符","data-bv-regexp":"true",
"
data-bv-regexp-regexp
"
:
'^[
1
][
1-8
][
0-9
]{
9
}',"
data-bv-regexp-message
"
:
"手机号码格式错误"}
/>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
text
name=
"peopleMail"
label=
"邮箱"
placeholder=
"请输入邮箱"
title=
""
size=
"5"
style=
"width:36%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"50","data-bv-stringlength-message":"邮箱长度不能超过50个字符","data-bv-regexp":"true",
"
data-bv-regexp-regexp
"
:
'^([
a-z0-9A-Z
]+[
-
|\\.]?)+[
a-z0-9A-Z
]@([
a-z0-9A-Z
]+(
-
[
a-z0-9A-Z
]+)?\\.)+[
a-zA-Z
]{
2
,}$',"
data-bv-regexp-message
"
:
"邮箱格式错误"}
/>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
@
ms
.
col
size=
"6"
>
<#assign peopleSexs=[{"id":"1","name":"男"},{"id":"2","name":"女"}]>
<#assign peopleSexs=[{"id":"1","name":"男"},{"id":"2","name":"女"}]>
<
@
ms
.
radio
name=
"peopleUserSex"
label=
"性别"
list=
peopleSexs
listKey=
"id"
listValue=
"name"
value=
"1"
/>
<@ms.radio name="peopleUserSex" label="性别" list=peopleSexs listKey="id" listValue="name" value="${peopleUser.peopleUserSex?default('1')}"/>
</
@
ms
.col
>
<@ms.text name="peopleUserRealName" label="姓名" placeholder="请输入姓名" title="" value="${peopleUser.peopleUserRealName?default('')}" size="2" width="300" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"8","data-bv-stringlength-message":"真实姓名长度不能超过8个字符"}/>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<@ms.hidden name="peopleId" value="${peopleUser.peopleId?default('0')}"/>
<
@
ms
.
col
size=
"6"
>
<@ms.formRow label="头像" width="400">
<
@
ms
.
text
name=
"peopleUserRealName"
label=
"姓名"
placeholder=
"请输入姓名"
title=
""
value=
""
size=
"2"
style=
"width:50%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"8","data-bv-stringlength-message":"真实姓名长度不能超过8个字符"}/
>
<@ms.uploadImg path="upload/people/${appId?default(0)}/" inputName="peopleUserIcon" size="1" filetype="" msg="提示:文章缩略图,支持jpg格式" maxSize="2" imgs="${peopleUser.peopleUserIcon?default('')}" />
</
@
ms
.col
>
</@ms.formRow>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<@ms.text name="peopleUserCard" label="用户身份证" placeholder="请输入用户身份证" title="" size="5" width="300" value="${peopleUser.peopleUserCard?default('')}" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"18","data-bv-stringlength-message":"身份证输入不合法"}/>
<
@
ms
.
col
style=
"text-align: right; width:14%;"
>
用户头像
</
@
ms
.col
>
<@ms.textarea name="peopleUserAddress" label="用户地址" rows="4" placeholder="请输入用户地址" width="500" value="${peopleUser.peopleUserAddress?default('')}" validation={"data-bv-stringlength":"true","data-bv-stringlength-max":"60","data-bv-stringlength-message":"地址不能超过60个字符"}/>
<
@
ms
.
col
size=
"8"
>
<div
style=
"float:left;position: relative;z-index:1;"
>
<
#if
peopleUser
?
has_content
>
<
@
uploadImg
path=
"upload/people/${appId?default(0)}/"
inputName=
"peopleUserIcon"
size=
"1"
filetype=
""
msg=
"提示:用户头像,支持jpg格式"
maxSize=
"2"
imgs=
"${peopleUser.peopleUserIcon?default('')}"
/>
<
#else
>
<
@
uploadImg
path=
"upload/people/${appId?default(0)}/"
inputName=
"peopleUserIcon"
size=
"1"
filetype=
""
msg=
"提示:用户头像,支持jpg格式"
maxSize=
"2"
imgs=
""
/>
</
#
if>
</div>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
text
name=
"peopleUserCard"
label=
"用户身份证"
placeholder=
"请输入用户身份证"
title=
""
size=
"5"
style=
"width:50%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-min":"15","data-bv-stringlength-max":"18","data-bv-stringlength-message":"身份证输入不合法"}/
>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
<
@
ms
.
col
size=
"6"
>
<
@
ms
.
textarea
name=
"peopleUserAddress"
label=
"用户地址"
rows=
"4"
placeholder=
"请输入用户地址"
style=
"width:80%"
validation=
{"data-bv-stringlength":"true","data-bv-stringlength-max":"60","data-bv-stringlength-message":"地址不能超过60个字符"}/
>
</
@
ms
.col
>
<
@
ms
.
col
size=
"12"
></
@
ms
.col
>
</
@
ms
.row
>
</@ms.form>
</@ms.form>
</
@
ms
.contentPanel
>
</@ms.panel>
</
@
ms
.contentBody
>
</@ms.html5>
<!--=================模态框部分开始=================-->
<!--删除的模态框开始-->
</
@
ms
.content
>
<script>
<script>
$(function(){
$(function(){
<
#
if
peopleUser
?
has_content
>
$
(
"
input[name=peopleName]
"
).
val
(
"
${peopleUser.peopleName?default('')}
"
);
$
(
"
input[name=peopleUserNickName]
"
).
val
(
"
${peopleUser.peopleUserNickName?default('')}
"
);
$
(
"
input[name=peoplePhone]
"
).
val
(
"
${peopleUser.peoplePhone?default('')}
"
);
$
(
"
input[name=peopleUserRealName]
"
).
val
(
"
${peopleUser.peopleUserRealName?default('')}
"
);
$
(
"
input[name=peopleUserCard]
"
).
val
(
"
${peopleUser.peopleUserCard?default('')}
"
);
$
(
"
textarea[name=peopleUserAddress]
"
).
val
(
"
${peopleUser.peopleUserAddress?default('')}
"
);
$
(
"
input[name=peopleId]
"
).
val
(
"
${peopleUser.peopleId?default('')}
"
);
$
(
"
input[name=peopleMail]
"
).
val
(
"
${peopleUser.peopleMail?default('')}
"
);
$
(
"
#peopleForm
"
).
attr
(
"
action
"
,
"
${basePath}/manager/people/user/update.do
"
)
$
(
"
[name='peopleUserSex'][value=
"
+
$
{
peopleUser
.
peopleUserSex
?
default
(
1
)}
+
"
]
"
).
attr
(
"
checked
"
,
true
);
$
(
"
#saveUpdate
"
).
text
(
"
更新
"
)
<
#
else
>
$
(
"
#peopleForm
"
).
attr
(
"
action
"
,
"
${basePath}/manager/people/user/save.do
"
)
$
(
"
#saveUpdate
"
).
text
(
"
保存
"
)
<
/#if>
//更新用户基本信息
//更新用户基本信息
$("#saveUpdate").click(function() {
$("#saveUpdate").click(function() {
var vobj = $("#peopleForm").data('bootstrapValidator').validate();
var vobj = $("#peopleForm").data('bootstrapValidator').validate();
...
@@ -110,16 +31,12 @@
...
@@ -110,16 +31,12 @@
}
}
$(this).postForm("#peopleForm",{func:function(msg) {
$(this).postForm("#peopleForm",{func:function(msg) {
if(msg.result){
if(msg.result){
alert
(
$
(
"
#saveUpdate
"
).
text
()
+
"
成功
"
);
<@ms.notify msg="保存成功" type="success"/>
location.href=msg.resultMsg;
location.href=msg.resultMsg;
}else{
}else{
alert(msg.resultMsg);
alert(msg.resultMsg);
}
}
}});
}});
});
});
});
});
</script>
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/manager/people/user/people_user_list.ftl
View file @
f680f668
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
<@ms.nav title="用户管理" back=true></@ms.nav>
<@ms.nav title="用户管理" back=true></@ms.nav>
<@ms.panel>
<@ms.panel>
<@ms.searchForm name="searchForm" id="searchForm" action="${basePath}/manager/people/user/list.do">
<@ms.searchForm name="searchForm" id="searchForm" action="${basePath}/manager/people/user/list.do">
<@ms.text label="昵称"
width="150"
name="peopleUserNickName" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserNickName?default('')}" />
<@ms.text label="昵称" name="peopleUserNickName" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserNickName?default('')}" />
<@ms.text label="真实姓名"
width="150"
name="peopleUserRealName" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserRealName?default('')}" />
<@ms.text label="真实姓名"
name="peopleUserRealName" title="请输入用户昵称" placeholder="请输入用户昵称" value="${peopleUserRealName?default('')}" />
<#assign status=[{"id":"1","name":"男"},{"id":"2","name":"女"}]>
<#assign status=[{"id":"1","name":"男"},{"id":"2","name":"女"}]>
<@ms.select label="性别" list=status listValue="name" listKey="id"
width="150"
name="peopleUserSex" default="全部" />
<@ms.select label="性别" list=status listValue="name" listKey="id" name="peopleUserSex" default="全部" />
<#assign status=[{"id":"0","name":"未审核"},{"id":"1","name":"已审核"}]>
<#assign status=[{"id":"0","name":"未审核"},{"id":"1","name":"已审核"}]>
<@ms.select label="审核状态" list=status listValue="name" listKey="id"
width="150"
name="peopleState" default="全部" />
<@ms.select label="审核状态" list=status listValue="name" listKey="id" name="peopleState" default="全部" />
<@ms.date label="注册时间" name="peopleDateTime"
width="150"
value="${peopleDateTime?default('')}" readonly="readonly" />
<@ms.date label="注册时间" name="peopleDateTime" value="${peopleDateTime?default('')}" readonly="readonly" />
<@ms.searchFormButton>
<@ms.searchFormButton>
<@ms.queryButton id="submitSearch"/>
<@ms.queryButton id="submitSearch"/>
</@ms.searchFormButton>
</@ms.searchFormButton>
...
...
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