Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
a480376d
"eladmin-system/src/main/vscode:/vscode.git/clone" did not exist on "78d5d406da782e46c79400677f11b32eb2758a34"
Commit
a480376d
authored
Jan 15, 2019
by
ms-dev
Browse files
优化结构
parent
cd4672a3
Changes
60
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/manager/column/index.ftl
deleted
100644 → 0
View file @
cd4672a3
<@
ms
.html5
>
<@ms.nav title="栏目表管理"></@ms.nav>
<!--@ms.searchForm name="searchForm" isvalidation=true>
<@ms.searchFormButton>
<@ms.queryButton onclick="search()"/>
</@ms.searchFormButton>
</@ms.searchForm-->
<@ms.panel>
<div id="toolbar">
<@ms.panelNav>
<@ms.buttonGroup>
<#include "/$
{
model
?
default
(
''
)}
/column/shiro-button.ftl"/>
</@ms.buttonGroup>
</@ms.panelNav>
</div>
<table id="columnList"
data-show-refresh="true"
data-show-columns="true"
data-show-export="true"
data-method="post"
data-side-pagination="server">
</table>
</@ms.panel>
<@ms.modal modalName="delColumn" title="删除栏目" >
<@ms.modalBody>删除选中栏目,如果有子栏目也会一并删除
<@ms.modalButton>
<!--模态框按钮组-->
<@ms.button value="确认删除?" id="deleteColumnBtn" />
</@ms.modalButton>
</@ms.modalBody>
</@ms.modal>
</@
ms
.html5
>
<
script
>
$(function()
{
$
(
"#columnList"
)
.bootstrapTable
({
url
:
"${managerPath}/${model?default('')}/column/list.do"
,
contentType
:
"application/x-www-form-urlencoded"
,
queryParamsType
:
"undefined"
,
toolbar
:
"#toolbar"
,
idField
:
'
categoryId
'
,
treeShowField
:
'
categoryTitle
'
,
parentIdField
:
'
categoryCategoryId
'
,
columns
:
[
{
checkbox
:
true
},{
field
:
'
categoryId
'
,
title
:
'编号'
,
align
:
'
center
'
},{
field
:
'
categoryTitle
'
,
title
:
'标题'
,
align
:
'
left
'
,
formatter
:
function
(
value
,
row
,
index
)
{
<#
include
"/${model?default('')}/column/shiro-update.ftl"
/>
}
},{
field
:
'
columnType
'
,
title
:
'属性'
,
align
:
'
center
'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
value
==
1
){
return
"列表"
;
}
else
if
(
value
==
2
){
return
"单页"
;
}
else
if
(
value
==
3
){
return
"外部链接"
;
}
}
},{
field
:
'
columnPath
'
,
title
:
'链接地址'
,
align
:
'
left
'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
"{ms:global.url/}"
+
value
+
"/index.html"
;
}
},{
field
:
'
columnListUrl
'
,
title
:
'列表地址'
,
align
:
'
left
'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
value
!=
null
){
return
value
;
}
else
{
return
""
;
}
}
},{
field
:
'
columnUrl
'
,
title
:
'内容地址'
,
align
:
'
left
'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
row
.columnType
==
1
){
return
value
;
}
else
{
return
""
;
}
}
},{
field
:
'
columnUrl
'
,
title
:
'封面地址'
,
align
:
'
left
'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
row
.columnType
==
2
){
return
value
;
}
else
{
return
""
;
}
}
}
]
})
}
)
//增加按钮
$("#addColumnBtn").click(function()
{
location
.href
=
"${managerPath}/${model?default('')}/column/add.do?modelId=${Session.model_id_session?default(0)}&modelTitle=${Session.model_title_session?default('')}"
;
}
)
//删除按钮
$("#delColumnBtn").click(function()
{
//获取
checkbox
选中的数据
var
rows
=
$
(
"#columnList"
)
.bootstrapTable
(
"getSelections"
)
;
//没有选中
checkbox
if
(
rows
.length
<=
0
){
<@
ms
.notify
msg
=
"请选择需要删除的记录"
type
=
"warning"
/>
}
else
{
$
(
".delColumn"
)
.modal
()
;
}
}
)
$("#deleteColumnBtn").click(function()
{
var
rows
=
$
(
"#columnList"
)
.bootstrapTable
(
"getSelections"
)
;
$
(
this
)
.text
(
"正在删除..."
)
;
$
(
this
)
.attr
(
"disabled"
,
"true"
)
;
var
ids
=
[];
for
(
var
i
=
0
;
i
<
rows
.length
;
i
++
){
ids
[
i
]
=
rows
[
i
]
.categoryId
;
}
ids
.reverse
()
;
$
.ajax
({
type
:
"post"
,
url
:
"${managerPath}/${model?default('')}/column/delete.do?ids="
+
ids
,
dataType
:
"json"
,
contentType
:
"application/json"
,
success
:
function
(
msg
)
{
if
(
msg
.result
==
true
)
{
<@
ms
.notify
msg
=
"删除成功"
type
=
"success"
/>
}
else
{
<@
ms
.notify
msg
=
"删除失败"
type
=
"warning"
/>
}
location
.reload
()
;
}
})
}
);
//查询功能
function search()
{
var
search
=
$
(
"form[name='searchForm']"
)
.serializeJSON
()
;
var
params
=
$
(
'#
columnList
'
)
.bootstrapTable
(
'
getOptions
'
)
;
params
.queryParams
=
function
(
params
)
{
$
.extend
(
params
,
search
)
;
return
params
;
}
$
(
"#columnList"
)
.bootstrapTable
(
'
refresh
'
,
{
query
:
$
(
"form[name='searchForm']"
)
.serializeJSON
()})
;
}
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/column/shiro-button.ftl
deleted
100644 → 0
View file @
cd4672a3
<@
ms
.addButton
id="addColumnBtn"/>
<@
ms
.delButton
id="delColumnBtn"/>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/column/shiro-update.ftl
deleted
100644 → 0
View file @
cd4672a3
var
url = "$
{
managerPath
}
/$
{
model
?
default
(
""
)}
/column/"+row.categoryId+"/edit.do?modelId=$
{
S
ession
.model_id_session
?
default
(
0
)}
&modelTitle=$
{
S
ession
.model_title_session
?
default
(
''
)}
";
return
"<a href=" +url+ " target='_self'>" + value + "</a>";
src/main/webapp/WEB-INF/manager/include/head-file.ftl
deleted
100644 → 0
View file @
cd4672a3
<
meta
charset="utf-8">
<!--浏览器小图标-->
<
link
rel="icon" href="http://cdn.mingsoft.net/global/images/ms.ico" type="x-icon">
<
script
type="text/javascript" src="https://unpkg.com/vue@2.5.21/dist/vue.js"></script>
<!--
引入样式 -->
<
link
rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!--
引入组件库 -->
<
script
src="https://unpkg.com/element-ui/lib/index.js"></script>
<!--网络请求框架-->
<
script
src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
<
script
src="https://cdn.bootcss.com/qs/6.5.2/qs.min.js"></script>
<!--铭飞-->
<
script
src="http://cdn.mingsoft.net/ms/1.0/ms.js"></script>
<
script
src="http://cdn.mingsoft.net/ms/1.0/ms.http.js"></script>
<
script
src="http://cdn.mingsoft.net/ms/1.0/ms.util.js"></script>
<
link
rel="stylesheet" href="http://cdn.mingsoft.net/ms-admin-ui/4.7.0/css/ms.css">
<
script
>
ms.manager =
{
path
:
"${managerPath}"
}
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/macro.ftl
deleted
100644 → 0
View file @
cd4672a3
<#
include
"/include/ui/index.ftl"/>
<#
include
"/include/manager.ftl"/>
<#
global
autoCURD=""/>
<#
macro
autoCURD>
<#local url=baseUrl?split("?")?first?split("/")?last/>
<#if url == "add.do">
<#global autoCURD="save">
<#elseif url =="edit.do">
<#global autoCURD="update">
</#if>
</#
macro
>
<@
ms
.autoCURD
/>
<#--权限控制-->
<#-
-link
:必须
type:add/del/edit/query class:样式 id,value:显示文字-->
<#
macro
auth link type="" value="" class="" id="">
<@shiro.hasPermission name="$
{
link
}
">
<#if type=="add">
<@ms.panelNavBtnAdd id="$
{
id
}
" value="$
{
value
}
" class="$
{
class
}
"/>
<#elseif type=="del">
<@ms.panelNavBtnDel id="$
{
id
}
" value="$
{
value
}
" class="$
{
class
}
"/>
<!--
<#elseif type=="edit">
<@ms.panelNavBtnDel id="$
{
id
}
" value="$
{
value
}
" class="$
{
class
}
"/>
-->
<#else>
<a href="$
{
link
}
" class="$
{
class
}
">$
{
value
}
</a>
</#if>
</@shiro.hasPermission>
</#
macro
>
<#--分页-->
<#
macro
pagehelper page displayedPages="5" edges="3" url="">
<#
if
page?exists && page.pages gt 1>
<nav class="pageNav">
<ul class="pagination pull-right" id="pagination">
<#--格式 <(上一页) 1 2 3 4 >(下一页) -->
<li class="prev <#if (page.pageNum)==1> disabled" ><a<#else> "><a href="$
{
url
}
&pageNo=$
{
page
.pageNum-1
}
" </#if> target="_self"><i class="fa fa-angle-left">上一页</i></a></li>
<#list 1..page.pages as i>
<li <#if page.pageNum==i>class="active" ><a<#else> ><a href='$
{
url
}
&pageNo=$
{
i
}
'</#if> target="_self">$
{
i
}
</a></li>
</#list>
<li class="next <#if page.pageNum == page.pages>disabled" ><a<#else> "><a href="$
{
url
}
&pageNo=$
{
page
.pageNum
+
1
}
"</#if> target="_self"><i class="fa fa-angle-right">下一页</i></a></li>
</ul>
</nav>
</#
if
>
</#
macro
>
<#--分页-->
<#
macro
showPage page displayedPages="5" edges="3">
<#
if
page?exists && page.pageCount gt 1>
<nav class="pageNav">
<ul class="pagination pull-right" id="pagination">
<#if displayedPages?has_content && edges?has_content>
<script>
$(function()
{
$
(
'#
pagination
'
)
.pagination
({
pages
:
$
{
page
.pageCount
},
cssStyle
:
'
pagination
pull-right
'
,
displayedPages
:
$
{
displayedPages
?
default
(
1
)},
hrefTextPrefix
:
"${page.linkUrl}pageNo="
,
currentPage
:
$
{
page
.pageNo
+
1
},
edges
:
<#
if
edges
?
has_content
>$
{
edges
?
default
(
3
)}
<#
else
>
3
</#
if
>
})
;
}
)
</script>
<#else>
<#--格式 <(上一页) 1 2 3 4 >(下一页) -->
<li class="prev <#if (page.pageNo+1)==1> disabled" ><a<#else> "><a href="$
{
page
.previousUrl
}
" </#if> target="_self"><i class="fa fa-angle-left">上一页</i></a></li>
<#list 1..page.pageCount as i>
<li <#if page.pageNo+1==i>class="active" ><a<#else> ><a href='$
{
page
.linkUrl
}
pageNo=$
{
i
}
'</#if> target="_self">$
{
i
}
</a></li>
</#list>
<li class="next <#if page.pageNo+1 == page.pageCount>disabled" ><a<#else> "><a href="$
{
page
.nextUrl
}
"</#if> target="_self"><i class="fa fa-angle-right">下一页</i></a></li>
</#if>
</ul>
</nav>
</#
if
>
</#
macro
>
<#
macro
method>
$
{
baseUrl
}
</#
macro
>
src/main/webapp/WEB-INF/manager/include/manager.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--4.5.5版本该文件废弃->
<#--后台的
UI
界面通用区域定义
-->
<#
macro
html5 width="100%" style="">
<!
DOCTYPE
html>
<
html
lang="en">
<head>
<#include "/include/macro.ftl"/>
<#include "/include/meta.ftl"/>
</head>
<body>
<div class="ms-content">
<div class="ms-content-body" style="width:$
{
width
}
;$
{
style
}
">
<#nested/>
</div>
</div>
</body>
</
html
>
</#
macro
>
<#
macro
panel style="">
<div class="ms-content-body-panel" style="$
{
style
}
">
<#nested/>
</div>
</#
macro
>
<#--主体结构-->
<#
macro
content>
<div class="ms-content">
<#nested/>
</div>
</#
macro
>
<#--左侧菜单-->
<#
macro
contentMenu style="">
<div class="ms-content-menu" style="$
{
style
}
">
<#nested/>
</div>
</#
macro
>
<#--废弃-->
<#
macro
left>
<div class="ms-content-menu">
<#nested/>
</div>
</#
macro
>
<#--内容-->
<#
macro
contentBody width="100%" style="">
<div class="ms-content-body" style="width:$
{
width
}
;$
{
style
}
">
<#nested/>
</div>
</#
macro
>
<#--内容导航-->
<#-
-button
:格式为
map
例如:button=
{
"text"
:
标题
,
"link"
:
默认返回
}
-->
<#
macro
contentNav title="板块名称">
<div class="ms-content-body-title">
<strong>$
{
title
}
</strong>
<#nested/>
</div>
</#
macro
>
<#--搜索按钮组-->
<#
macro
searchBtnGroup size="1">
<@ms.col size="$
{
size
}
" style="text-align:right;border-top: 1px #EAEAEA solid;padding-top: 10px;">
<#nested/>
</@ms.col>
</#
macro
>
<#--
分割线-->
<#
macro
panelNav empty=false>
<div class="ms-content-body-panel-nav" <#if empty>style=" padding: 0;"</#if>>
<#nested/>
</div>
</#
macro
>
<#--列表上面导航条右侧的过滤按钮区域
右浮动 -->
<#
macro
panelNavFilter>
<div style="float:right;">
<#nested/>
</div>
</#
macro
>
<#--列表按钮组
如下拉菜单-->
<#
macro
panelNavBtnGroup role="group" btn="" >
<div class="btn-group" role="$
{
role
}
">
<#nested/>
</div>
</#
macro
>
<#--
判断按钮的传入参数是否为空值 -->
<#
macro
isPanelNavBtn class _class id _id>
<#assign _id="$
{
_
id
}
"/>
<#if id?has_content>
<#assign _id="$
{
id
}
" />
</#if>
<#assign _class="$
{
_
class
}
">
<#if class?has_content>
<#assign _class="$
{
class
}
">
</#if>
</#
macro
>
<#
macro
panelNavBtnAdd value="" icon="plus" class="default" id="addButton" onclick="" title="">
<@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
}
"/>
</#
macro
>
<#
macro
panelNavBtnDel value="" icon="trash" class="danger" id="delButton" onclick="" title="">
<@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
}
"/>
</#
macro
>
<#
macro
contentNavBack value="返回" icon="share-alt" class="default" onclick="javascript:history.go(-1)" title="返回">
<@ms.button value="$
{
value
}
" icon="$
{
icon
}
" onclick="$
{
onclick
}
" class="btn btn-$
{
class
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
panelNavBtnSave value="保存" icon="disk" class="default" id="saveButton" onclick="" title="保存" >
<@ms.button class="btn btn-success" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#---->
<#
macro
contentPanel style="">
<div class="ms-content-body-panel" style="$
{
style
}
">
<#nested/>
</div>
</#
macro
>
<#--整行-->
<#
macro
row>
<div class="row">
<#nested/>
</div>
</#
macro
>
<#--整列-->
<#
macro
col size="1" style="">
<div class="col-md-$
{
size
}
col-sm-$
{
size
}
" style="$
{
style
}
">
<#nested/>
</div>
</#
macro
>
<#--提示没有数据-->
<#
macro
nodata content="暂无数据" style="text-align:center">
<p class="alert alert-info" role="alert" style="$
{
style
}
">
$
{
content
}
</p>
</#
macro
>
<#--表格列表-->
<#
macro
table head="" list="" id="">
<table class="table table-hover">
<!--表格栏目属性 开始-->
<thead>
<tr>
<#if head?has_content>
<#list head as h>
<#if h?html?length gt 5 && h?html?substring(0,6)=="<th">
$
{
h
}
<#else>
<th>
$
{
h
}
</th>
</#if>
</#list>
</#if>
</tr>
</thead>
<!--表格栏目属性 结束-->
<tbody id=$
{
id
}
>
<#nested/>
</tbody>
</table>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/meta.ftl
deleted
100644 → 0
View file @
cd4672a3
<base target="mainFrame" />
<#assign static="$
{
basePath
}
/static">
<#setting url_escaping_charset='utf-8'>
<#assign bootstrap="3.3.5">
<#assign manager_ui="4.6.4">
<#assign easyui="1.5">
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/animate/1.0.0/animate.css" media="all" />
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/iconfont/1.0.0/iconfont.css"/>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery/1.9.1/jquery-1.9.1.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.serializeJSON/2.8.1/jquery.serializejson.min.js"></script>
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/ztree/3.5/zTreeStyle.css" media="all" />
<script type="text/javascript" src="$
{
static
}
/plugins/ztree/3.5/jquery.ztree.all-3.5.min.js"></script>
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/css/bootstrap.min.css" media="all" />
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/css/bootstrap-switch.css" media="all" />
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/css/bootstrapValidator.css" media="all" />
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/css/bootstrap-notify.css" media="all" />
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/js/bootstrap.min.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/js/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/js/bootstrapValidator.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap/$
{
bootstrap
}
/js/bootstrap-notify.js"></script>
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/select2/4.0.3/css/select2.min.css" media="all" />
<script type="text/javascript" src="$
{
static
}
/plugins/select2/4.0.3/js/select2.min.js"></script>
<!--时间插件-->
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.validation/1.15.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.tmpl/1.4.2/jquery.tmpl.min.js"></script>
<!--时间插件-->
<link href="$
{
static
}
/plugins/bootstrap.daterangepicker/1.3.4/daterangepicker.css" rel="stylesheet">
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap.daterangepicker/1.3.4/moment.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/bootstrap.daterangepicker/1.3.4/daterangepicker.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.cookie/2.2.0/jquery.cookie.js"></script>
<!----上传图片--->
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.swfupload/1.0.0/swfupload.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.swfupload/1.0.0/jquery.swfupload.js"></script>
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.swfupload/1.0.0/fileprogress.js"></script>
<!--script type="text/javascript" src="$
{
static
}
/plugins/plupload/2.2.1/plupload.full.min.js"></script-->
<!--后台UI-->
<script type="text/javascript" src="$
{
static
}
/skin/manager/$
{
manager_ui
}
/js/ms.manager.js"></script>
<script type="text/javascript" src="$
{
static
}
/skin/manager/$
{
manager_ui
}
/js/ms.web.js"></script>
<!--easyUI-->
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/jquery.easyui/$
{
easyui
}
/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="$
{
static
}
/plugins/jquery.easyui/$
{
easyui
}
/themes/icon.css">
<script type="text/javascript" src="$
{
static
}
/plugins/jquery.easyui/$
{
easyui
}
/jquery.easyui.min.js"></script>
<!--bootstrap=table-->
<link rel="stylesheet" href="$
{
static
}
/plugins/bootstrap-table/1.11.1/bootstrap-table.css">
<link rel="stylesheet" href="$
{
static
}
/plugins/bootstrap-table/1.11.1/extensions/tree-column/bootstrap-table-tree-column.css">
<script src="$
{
static
}
/plugins/bootstrap-table/1.11.1/bootstrap-table.js"></script>
<script src="$
{
static
}
/plugins/bootstrap-table/1.11.1/extensions/tree-column/bootstrap-table-tree-column.min.js"></script>
<script src="$
{
static
}
/plugins//bootstrap-table/1.11.0/locale/bootstrap-table-zh-CN.min.js"></script>
<!-- vue框架所需要的资源 -->
<script src="$
{
static
}
/plugins/hammerjs/2.0.8/hammer.min.js"></script>
<script src="$
{
static
}
/plugins/vue/2.3.3/vue.min.js"></script>
<link rel="stylesheet" type="text/css" href="$
{
static
}
/skin/manager/$
{
manager_ui
}
/css/ms.manager.min.css" media="all" />
<#assign skin_manager_logo="$
{
static
}
/skin/manager/$
{
manager_ui
}
/images/logo.png"/>
<#assign skin_manager_loadding="$
{
static
}
/skin/manager/$
{
manager_ui
}
/images/loading.gif"/>
<#include "/include/macro.ftl"/>
<script>
var basePath = "$
{
basePath
}
";
var base = "$
{
base
}
";
var managerPath = "$
{
managerPath
}
";
var static = "$
{
static
}
";
$(function()
{
//启用工具提示
//
$
(
"[data-toggle='tooltip']"
)
.tooltip
()
;
//
$
(
"[data-toggle='popover']"
)
.popover
({
html
:
true
})
;
}
)
<#if manager_session?exists>
var websiteId= "$
{
manager_session
.basicId
?
default
(
'
0
'
)}
" ;
</#if>
</script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="$
{
base
}
/https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="$
{
base
}
/https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" charset="utf-8" src="$
{
base
}
/static/plugins/ueditor/1.4.3.1/ueditor.parse.js"></script>
<script type="text/javascript" charset="utf-8" src="$
{
base
}
/static/plugins/ueditor/1.4.3.1/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="$
{
base
}
/static/plugins/ueditor/1.4.3.1/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="$
{
base
}
/static/plugins/ueditor/1.4.3.1/lang/zh-cn/zh-cn.js"></script>
src/main/webapp/WEB-INF/manager/include/ui/attributes.ftl
deleted
100644 → 0
View file @
cd4672a3
<#
if
id?? && id!=""> id="$
{
id
}
"</#if><#rt/>
<#
if
ajaxUrl?? && ajaxUrl!=""> data-ajax-url="$
{
ajaxUrl
}
"</#if><#rt/>
<#
if
class?? && class!=""> class="$
{
class
}
"</#if><#rt/>
<#
if
style?? && style!=""> style="$
{
style
}
"</#if><#rt/>
<#
if
onclick?? && onclick!=""> onclick="$
{
onclick
}
"</#if><#rt/>
<#
rt
/>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/button.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
表单相关按钮存放区域
-->
<#
macro
buttonarea id="" label="" class="form-group" style="clear: both;" size="">
<
div
class="$
{
class
}
ms-form-group"
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
<#if style?? && style?string!=""> style="$
{
style
}
"</#if><#rt/>
>
<#if label!="">
<label class=" control-label text-right ms-form-label">$
{
label
}
</label>
</#if>
<div class="ms-form-control">
<#nested/><#rt/>
</div>
</
div
>
</#
macro
>
<#--
保存按钮
-->
<#
macro
savebutton value="" id="" name="" class="" style="" disabled=false
onclick
=
"" click=""
>
<button type="button" class="btn btn-success"
<#include "/include/ui/common-attributes.ftl"/><#rt/>
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
>
<#if value!="">$
{
value
}
<#else>保存</#if>
</button><#rt/>
<#if click?? && click!="" && id?? && id!="">
<script>
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
eval
(
$
{
click
})
;
})
;
}
)
</script>
</#if>
</#
macro
>
<#--
重置按钮
-->
<#
macro
resetbutton value="" id="" name="" class="" style="" size="" title="" disabled=false>
<button type="reset" class="btn reset"
<#include "/include/ui/common-attributes.ftl"/><#rt/>
>
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
<#if value!="">$
{
value
}
<#else>重置</#if>
</button><#rt/>
</#
macro
>
<#
macro
button value="" id="" name="" class="btn btn-primary" style="" disabled=false
onclick
=
"" click="" url="" toggle="tooltip" target="bottom" icon="" title="" placement="bottom"
>
<button type="button"
<#include "/include/ui/common-attributes.ftl"/><#rt/>
<#if toggle!=""> data-toggle="$
{
toggle
}
"</#if><#rt/>
<#if onclick!=""> onclick="$
{
onclick
}
"</#if><#rt/>
<#if target!=""> data-target="$
{
target
}
"</#if><#rt/>
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
<#if url!=""> data-ajax-url="$
{
url
}
"</#if><#rt/>
<#if placement!=""> data-placement="$
{
placement
}
"</#if><#rt/>
>
<#if value!="">$
{
value
}
<#else>按钮</#if>
<#if icon!=""> <span class="glyphicon glyphicon-$
{
icon
}
" <#if value?trim !="" >style="margin-right:5px"</#if>></span></#if>
</button><#rt/>
<#if click?? && click!="" && id?? && id!="">
<script>
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
eval
(
$
{
click
})
;
})
;
}
)
</script>
</#if>
</#
macro
>
<#--按钮组-->
<#
macro
btnGroup value="" id="" name="" class="default" style="" size="" title="" disabled=false >
<button type="button" class="btn btn-$
{
class
}
">$
{
value
}
</button>
<button type="button" class="btn btn-$
{
class
}
dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<#nested/>
</ul>
</#
macro
>
<#--按钮组-子菜单,配合
btnGroup
使用-->
<#
macro
btnGroupLi value="" href="" class="" id="" ajaxUrl="">
<li <#include "/include/ui/attributes.ftl"/><#rt/>><#if href !="" ><a href="$
{
href
}
">$
{
value
}
</a><#else>$
{
value
}
</#if></li>
</#
macro
>
<#--添-->
<#
macro
addButton value="" icon="plus" class="default" id="addButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="" title="添加" url="" openModal="" openModalBefor="">
<@ms.isPanelNavBtn id="$
{
id
}
" _id="addButton" class="$
{
class
}
" _class="default"/>
<#if url!="">
<@ms.button icon="$
{
icon
}
" id="$
{
id
}
" value="$
{
value
}
" icon="$
{
icon
}
" class="btn btn-$
{
_
class
}
" onclick="location.href='$
{
url
}
'" title="$
{
title
}
"/>
<#else>
<@ms.button icon="$
{
icon
}
" id="$
{
id
}
" value="$
{
value
}
" icon="$
{
icon
}
" class="btn btn-$
{
_
class
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#if>
<#if openModal!="">
<script>
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
<#
if
openModalBefor
!=
""
>
eval
(
"${openModalBefor}()"
)
;
</#
if
>
$
(
"#${openModal}"
)
.modal
()
;
})
;
}
)
</script>
</#if>
</#
macro
>
<#--删-->
<#
macro
delButton value="" icon="trash" class="danger" id="delButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="" title="删除" fieldName="" url="">
<#if fieldName!="">
<script>
$(function()
{
$
(
"#${id}"
)
.on
(
"click"
,
function
()
{
var
ids
=
""
;
var
params
=
""
;
var
count
=
0
;
$
(
'
input
[
name
=
"${fieldName}"
]
:
checked
'
)
.each
(
function
(){
ids
+=
$
(
this
)
.val
()
+
","
;
params
+=
"${fieldName}="
+
$
(
this
)
.val
()
+
"&"
;
count
++;
})
;
if
(
count
==
0
)
{
<@
ms
.notify
msg
=
"请选择要删除的数据!"
/>
}
else
{
$
(
'
.deleteModal
$
{
id
}
'
)
.modal
()
;
$
(
"#deleteModal${id}Num"
)
.text
(
count
)
;
$
(
'
.deleteBtn
$
{
id
}
'
)
.on
(
"click"
,
function
()
{
<#
if
onclick
?
has_content
>
eval
(
$
{
onclick
}(
ids
))
;
<#
elseif
url
?
has_content
>
$
(
this
)
.request
({
url
:
"${url}"
,
type
:
"json"
,
data
:
params
,
method
:
"post"
,
func
:
function
(
msg
)
{
if
(
msg
.result
)
{
<@
ms
.notify
msg
=
"删除成功!"
/>
location
.reload
()
;
}
else
{
<@
ms
.notify
msg
=
"删除失败!"
/>
}
}})
;
</#
if
>
})
;
}
})
;
}
)
</script>
</#if>
<@ms.isPanelNavBtn id="$
{
id
}
" _id="delButton" class="$
{
class
}
" _class="danger"/>
<!--删除提示-->
<@ms.modal modalName="deleteModal$
{
id
}
" title="删除提示!">
<@ms.modalBody>
确认删除<span style="color: red; font-size: 20px;" id="deleteModal$
{
id
}
Num"></span>条记录?
</@ms.modalBody>
<@ms.modalButton>
<@ms.button class="btn btn-danger deleteBtn$
{
id
}
" value="确定删除"/>
</@ms.modalButton>
</@ms.modal>
<@ms.button icon="$
{
icon
}
" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" class="btn btn-$
{
_
class
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
editButton value="" icon="edit" class="warning" id="editButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="" title="编辑">
<@ms.isPanelNavBtn id="$
{
id
}
" _id="editButton" class="$
{
class
}
" _class="danger"/>
<@ms.button icon="$
{
icon
}
" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" class="btn btn-$
{
_
class
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
queryButton value="查询" icon="search" class="default" id="queryButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="" title="查询" form="" >
<@ms.button class="btn btn-info" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
<#if onclick=="" && form!="">
<script>
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
$
(
"#${form}"
)[
0
]
.submit();
})
}
)
</script>
</#if>
</#
macro
>
<#--返回-->
<#
macro
backButton value="返回" icon="share-alt" class="default" id="backButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="javascript:history.go(-1)" title="返回">
<@ms.button value="$
{
value
}
" icon="$
{
icon
}
" onclick="$
{
onclick
}
" class="btn btn-$
{
class
}
" title="$
{
title
}
" id="$
{
id
}
"/>
</#
macro
>
<#--保存-->
<#
macro
saveButton value="保存" icon="floppy-saved" class="default" id="saveButton$
{
.now
?
date
?
string
(
'
yyyyMMddhhmmss
'
)}
" onclick="" title="保存" postForm="" postBefor="" postAfter="">
<@ms.button icon="$
{
icon
}
" class="btn btn-success" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
" />
<@ms.event postForm="$
{
postForm
}
" postBefor="$
{
postBefor
}
" postAfter="$
{
postBefor
}
" id="$
{
id
}
"/>
</#
macro
>
<#
macro
updateButton value="更新" icon="open" class="default" id="updateButton" onclick="" title="更新" postForm="" postBefor="" postAfter="" postForm="" postBefor="" postAfter="">
<@ms.button icon="$
{
icon
}
" class="btn btn-success" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
<@ms.event postForm="$
{
postForm
}
" postBefor="$
{
postBefor
}
" postAfter="$
{
postBefor
}
" id="$
{
id
}
"/>
</#
macro
>
<#
macro
resetButton value="重置" icon="retweet" class="warning" id="resetButton$
{
.now
?
long
}
" onclick="" title="重置" form="" >
<@ms.button icon="$
{
icon
}
" class="btn btn-warning" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
<script>
<#--优先click事件-->
<#if onclick=="">
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
<#
if
form
!=
""
>
$
(
"#${form}"
)[
0
]
.reset();
<#
else
>
$
(
"#${id}"
)
.parents
(
"form:first"
)[
0
]
.reset();
</#
if
>
})
}
)
</#if>
</script>
</#
macro
>
<#
macro
exportButton value="导出" icon="export" class="default" id="exportButton" onclick="" title="导出" >
<@ms.button icon="$
{
icon
}
" class="btn btn-default" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
importButton value="导入" icon="import" class="warning" id="importButton" onclick="" title="导入" >
<@ms.button icon="$
{
icon
}
" class="btn btn-default" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
setingButton value="设置" icon="cog" class="warning" id="importButton" onclick="" title="设置" >
<@ms.button icon="$
{
icon
}
" class="btn btn-primary" value="$
{
value
}
" icon="$
{
icon
}
" id="$
{
id
}
" onclick="$
{
onclick
}
" title="$
{
title
}
"/>
</#
macro
>
<#
macro
event postForm="" postBefor="" postAfter="" id="">
<#if postForm!="">
<script>
$(function()
{
$
(
"#${id}"
)
.click
(
function
()
{
var
vobj
=
true
;
try
{
vobj
=
$
(
"#${postForm}"
)
.data
(
'
bootstrapValidator
'
)
.validate
()
.isValid
()
;
}
catch
(
e
){}
var
postBefor
=
true
;
<#
if
postBefor
!=
""
>
postBefor
=
eval
(
$
{
postBefor
}())
;
</#
if
>
if
(
vobj
&&
postBefor
)
{
$
(
this
)
.postForm
(
"#${postForm}"
,{
func
:
function
(
msg
)
{
if
(
msg
.result
)
{
//
history
.back
()
;
<@
ms
.notify
msg
=
"保存成功!"
type
=
"success"
/>
var
redirect
=
$
(
"#${postForm} input[name='redirect']"
)
.val
()
;
if
(
redirect
!=
""
)
{
location
.href
=
redirect
;
}
<#
if
postAfter
!=
""
>
eval
(
$
{
postAfter
}(
msg
))
;
</#
if
>
}
else
{
var
message
=
msg
.resultMsg
;
if
(
message
==
""
||
message
==
undefined
)
{
message
=
"后台验证失败"
;
}
$
(
'
.ms-notifications
'
)
.notify
({
type
:
'
warning
'
,
message
:
{
text
:
message
}
})
.show
()
;
}
}})
;
}
else
{
<@
ms
.notify
msg
=
"验证失败,请重新输入!"
/>
}
})
;
}
)
</script>
</#if>
</#
macro
>
<#--按钮组-->
<#
macro
buttonGroup role="group">
<div class="btn-group" role="$
{
role
}
">
<#nested/>
</div>
</#
macro
>
<#
macro
menuButton links name="菜单名称" class="default">
<
div
class="btn-group dropdown">
<button type="button" class="btn btn-$
{
class
}
">$
{
name
}
</button>
<button type="button" class="btn btn-$
{
class
}
dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only"></span>
</button>
<ul class="dropdown-menu">
<#list links as b>
<li><a href="javascript:$
{
b
.click
?
default
(
"void"
)}
()">$
{
b
.name
?
default
(
"菜单"
)}
</a></li>
</#list>
</ul>
</
div
>
</#
macro
>
<#
macro
switchButton name on off size="small" value="" class="" color="default" onclass="danger" offclass="primary">
<input type="checkbox" class="ms-button-switch-$
{
name
}
" data-on="$
{
onclass
}
" data-off="$
{
offclass
}
" data-size="$
{
size
}
" data-on-text="$
{
on
.text
}
" data-off-text="$
{
off
.text
}
" data-off-color="$
{
color
}
"/>
<script>
$(function()
{
<#
if
value
!=
""
>
<#
if
value
==
on
.value
?
string
>
$
(
".ms-button-switch-${name}"
)
.bootstrapSwitch
(
'
state
'
,
true
)
;
<#
else
>
$
(
".ms-button-switch-${name}"
)
.bootstrapSwitch
(
'
state
'
,
false
)
;
</#
if
>
<#
else
>
$
(
".ms-button-switch-${name}"
)
.bootstrapSwitch
(
'
state
'
,
true
)
;
</#
if
>
$
(
'
.ms-button-switch-
$
{
name
}
'
)
.on
(
'
switchChange
.bootstrapSwitch
'
,
function
(
event
,
state
)
{
if
(
state
)
{
$
(
"input[name='${name}']"
)
.val
(
'$
{
on
.value
}
'
)
;
}
else
{
$
(
"input[name='${name}']"
)
.val
(
'$
{
off
.value
}
'
)
;
}
})
;
}
)
</script>
<input type="hidden" name="$
{
name
}
" value="$
{
value
}
"/>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/ui/checkboxlist-item.ftl
deleted
100644 → 0
View file @
cd4672a3
<label class="ms-check"><input type="checkbox"<#rt/>
value="$
{
rkey
}
"<#rt/>
<#if valueList?seq_contains(rkey)> checked="checked"</#if><#rt/>
<#include "/include/ui/common-attributes.ftl"/><#rt/>
/> $
{
rvalue
}
</label><#if hasNext> </#if>
src/main/webapp/WEB-INF/manager/include/ui/checkboxlist.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
4.5.5开始废弃
<
input
type="checkbox"/>
-->
<#
macro
checkboxlist
list listKey="" listValue="" valueList=[]
label="" colon=":" hasColon="true"
id="" name="" class="" style="" size="" title="" disabled=false
validation="" direction=true
width=""
labelStyle=""
help=""
>
<
div
class="form-group ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-10" <#if width!=""> style="$
{
width
}
px"</#if><#rt/>>
<#if list?is_sequence>
<#if listKey!="" && listValue!="">
<#list list as item>
<#local rkey=item[listKey]>
<#local rvalue=item[listValue]>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
<#else>
<#list list as item>
<#local rkey=item>
<#local rvalue=item>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
<#else>
<#list list?keys as key>
<#local rkey=key/>
<#local rvalue=list[key]/>
<#local index=key_index>
<#local hasNext=key_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
</div>
</
div
>
</#
macro
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/common-attributes.ftl
deleted
100644 → 0
View file @
cd4672a3
<#
if
name!=""> name="$
{
name
}
"</#if><#rt/>
<#
if
class!=""> class="$
{
class
}
"</#if><#rt/>
<#
if
style!=""> style="$
{
style
}
"</#if><#rt/>
<#
if
title?? && title!=""> title="$
{
title
}
"</#if><#rt/>
<#
if
disabled?? && disabled> disabled="disabled"</#if><#rt/>
<#
if
maxlength?? && maxlength!=""> maxlength="$
{
maxlength
}
"</#if><#rt/>
<#
if
minlength?? && minlength!=""> minlength="$
{
minlength
}
"</#if><#rt/>
<#
if
name!=""> name="$
{
name
}
"</#if><#rt/>
<#
if
placeholder?? && placeholder!=""> placeholder="$
{
placeholder
}
"</#if><#rt/>
<#
if
validation?? && validation?has_content><#--验证框架,需要bootstrapValidator框架-->
<#list validation?keys as key>
$
{
key
}
="$
{
validation
[
key
]}
"<#rt/>
</#list>
</#
if
>
<#
if
onclick?? && onclick!=""> onclick="$
{
onclick
}
"</#if><#rt/>
<#
rt
/>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/control.ftl
deleted
100644 → 0
View file @
cd4672a3
<#
if
label!="">
<#assign tmp="2">
<label <#if name?? && name!="">for="$
{
name
}
"</#if> <#if labelStyle?? && labelStyle!="">style="$
{
labelStyle
?
default
(
''
)}
"</#if> <#if colSm?? && colSm!=""><#assign tmp="$
{
colSm
}
"></#if> class="col-sm-$
{
tmp
}
control-label ">
<#if help!="">
<script>
$(function ()
{
$
(
'[
data-toggle
=
"popover"
]'
)
.popover
()
}
)
</script>
<span tabindex="0" class="glyphicon glyphicon-question-sign" data-toggle="popover" role="button" data-trigger="focus" data-container="body" data-placement="$
{
helpDirection
?
default
(
'
rigth
'
)}
" title="提示" data-content="$
{
help
}
"></span>
</#if>
$
{
label
}
</label>
</#
if
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/date.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
<
input
type="text"/>
-->
<#
macro
date id="" name="" value="" begin="" end="" limit="30"
time=false single=false label="" title="" size="" width=""
class="form-control" style="" readonly="" validation="" disabled=false maxlength="" minlength="" placeholder="" ranges=true
labelStyle=""
help=""
helpDirection=""
>
<
div
class="form-group ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="control-group col-sm-9 ms-from-group-input has-feedback" style="min-width:200px;<#if width!=""> width:$
{
width
}
px"</#if>"<#rt/>>
<div class="controls">
<div class="input-prepend input-group">
<span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span>
<input type="text"<#rt/>
<#if id!=""> id="$
{
id
}
"<#elseif name!="">id="$
{
name
}
"</#if><#rt/>
<#if maxlength!=""> maxlength="$
{
maxlength
}
"</#if><#rt/>
<#if readonly!=""> readonly="$
{
readonly
}
"</#if><#rt/>
<#if value?? && value?string!=""> value="$
{
value
?
html
}
"</#if><#rt/>
<#include "/include/ui/common-attributes.ftl"/><#rt/>
/><#rt/>
</div>
</div>
</div>
</
div
>
<
script
>
var $
{
name
}
Set =
{
startDate
:
moment
()
.subtract
(
29
,
'
days
'
),
endDate
:
moment
(),
<#
if
begin
?
has_content
>
minDate
:
'$
{
begin
?
string
(
'
yyyy-MM-dd
'
)}
'
,
</#
if
>
<#
if
end
?
has_content
>
maxDate
:
'$
{
end
?
string
(
'
yyyy-MM-dd
'
)}
'
,
</#
if
>
dateLimit
:
{
days
:
$
{
limit
}
},
showDropdowns
:
true
,
showWeekNumbers
:
true
,
<#
if
time
>
timePicker
:
true
,
timePickerIncrement
:
1
,
</#
if
>
<#
if
single
>
singleDatePicker
:
true
,
</#
if
>
timePicker12Hour
:
true
,
<#
if
ranges
>
ranges
:
{
'今天'
:
[
moment
(),
moment
()
]
,
'昨天'
:
[
moment
()
.subtract
(
1
,
'
days
'
),
moment
()
.subtract
(
1
,
'
days
'
)
]
,
'最近
7
天'
:
[
moment
()
.subtract
(
6
,
'
days
'
),
moment
()
]
,
'最近
30
天'
:
[
moment
()
.subtract
(
29
,
'
days
'
),
moment
()
]
,
'当月'
:
[
moment
()
.startOf
(
'
month
'
),
moment
()
.endOf
(
'
month
'
)
]
,
'上个月'
:
[
moment
()
.subtract
(
1
,
'
month
'
)
.startOf
(
'
month
'
),
moment
()
.subtract
(
1
,
'
month
'
)
.endOf
(
'
month
'
)
]
,
},
</#
if
>
opens
:
'
left
'
,
buttonClasses
:
['
btn
btn-default
']
,
applyClass
:
'
btn-small
btn-primary
'
,
cancelClass
:
'
btn-small
'
,
format
:
'
YYYY
-MM-DD
<#
if
time
>
HH
:
mm
:
ss
</#
if
>'
,
separator
:
'至'
,
locale
:
{
applyLabel
:
'确认'
,
cancelLabel
:
'取消'
,
//
fromLabel
:
'开始时间'
,
//
toLabel
:
'结束时间'
,
customRangeLabel
:
'自定义'
,
daysOfWeek
:
['日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六']
,
monthNames
:
['一月'
,
'二月'
,
'三月'
,
'四月'
,
'五月'
,
'六月'
,
'七月'
,
'八月'
,
'九月'
,
'十月'
,
'十一月'
,
'十二月']
,
firstDay
:
1
}
}
;
var $
{
name
}
Func = function(start, end, label)
{
//
alert
(
"Callback has fired: ["
+
start
.format
(
'
MMMM
D
,
YYYY
'
)
+
" to "
+
end
.format
(
'
MMMM
D
,
YYYY
'
)
+
", label = "
+
label
+
"]"
)
;
//$
(
'#
subscribeReplyForm
'
)
.formValidation
(
'
revalidateField
'
,
"${name}"
)
;
}
$('#$
{
name
}
').daterangepicker($
{
name
}
Set, $
{
name
}
Func);
$('#$
{
name
}
').on('apply.daterangepicker', function(ev, picker)
{
//
$
(
'#$
{
name
}
'
)
.parents
(
"form:first"
)
.data
(
'
bootstrapValidator
'
)
.revalidateField
(
'<#
if
id
!=
""
>$
{
id
}
<#
elseif
name
!=
""
>$
{
name
}
</#
if
>'
)
;
}
);
</
script
>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/ui/editor.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--简易编辑器-->
<#-
-name
:输入框名称-->
<#-
-width
\
height
:编辑器的宽度高度-->
<#-
-content
:初始化内容-->
<#
macro
editor name label="" content="" validation="" width="100%" height="480" labelStyle="" appId="" help="" helpDirection="" colSm="">
<
div
class="form-group ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="ms-form-control ms-from-group-input col-sm-9 has-feedback">
<script type="text/plain" id="editor_$
{
name
}
" name="$
{
name
}
" style="width:$
{
width
}
px;height:$
{
height
}
px">$
{
content
?
default
(
''
)}
</script>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
// var ue = UE.getEditor('editor_$
{
name
}
');
var URL = window.UEDITOR_HOME_URL || "$
{
base
}
/static/plugins/ueditor/1.4.3.1/";
var ue = UE.getEditor('editor_$
{
name
}
',
{
imageScaleEnabled
:
true
,
//
服务器统一请求接口路径
serverUrl
:
URL
+
"jsp/msController.jsp?jsonConfig=%7BvideoUrlPrefix:'${base}',fileUrlPrefix:'${base}',imageUrlPrefix:'${base}',imagePathFormat:'/upload/${appId?default(0)}/editor/%7Btime%7D',filePathFormat:'/upload/${appId?default(0)}/editor/%7Btime%7D',videoPathFormat:'/upload/${appId?default(0)}/editor/%7Btime%7D'%7D"
,
autoHeightEnabled
:
true
,
autoFloatEnabled
:
false
,
scaleEnabled
:
true
,
compressSide
:
0
,
maxImageSideLength
:
2000
,
maximumWords
:
80000
,
}
);
//重新设置编辑器的style
ue.ready(function ()
{
$
(
".edui-editor-bottomContainer"
)
.height
(
30
)
;
}
);
</script>
</div>
</
div
>
</#
macro
>
<#--简易编辑器-->
<#-
-inputName
:输入框名称-->
<#-
-width
\
height
:编辑器的宽度高度-->
<#-
-content
:初始化内容-->
<#
macro
smallUedit inputName width height content>
<script type="text/plain" id="editor_$
{
inputName
}
" name="$
{
inputName
}
">$
{
content
?
default
(
''
)}
</script>
<div class="editor-bottom-bar">
当前已输入
<span class="char_count">
0
</span>
个字符, 您还可以输入
<span class="char_remain">
80000
</span>
个字符。
</div>
<style>
.editor-bottom-bar
{
white-space
:
nowrap
;
border
:
1
px
solid
#
ccc
;
line-height
:
20
px
;
font-size
:
12
px
;
text-align
:
right
;
margin-right
:
5
px
;
color
:
#
aaa
;
border-top
:
0
;
width
:
$
{
width
}
px
;
}
</style>
<script type="text/javascript">
var charLimit = 80000;
window.editor_$
{
inputName
}
= new UE.ui.Editor(
{
initialFrameWidth
:
$
{
width
},
initialFrameHeight
:
$
{
height
}
}
);
window.editor_$
{
inputName
}
.render("editor_$
{
inputName
}
");
function computeChar()
{
var
len
=
editor_
$
{
inputName
}
.getContent
()
.length
;
if
(
len
>
charLimit
)
{
$
(
".editor-bottom-bar"
)
.html
(
"<span style='color:red;'>你输入的字符个数("
+
len
+
")已经超出最大允许值!</span>"
)
}
else
{
$
(
".editor-bottom-bar"
)
.html
(
"当前已输入<span class='char_count'>"
+
len
+
"</span>个字符, 您还可以输入<span class='char_remain'>"
+
(
charLimit
-
len
)
+
"</span>个字符。"
)
}
}
window.editor_$
{
inputName
}
.addListener("keyup", function(type, evt)
{
computeChar
()
}
)
</script>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/ui/file.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
<
input
type="file"/>
-->
<#
macro
file
accept="" value=""
label="" noHeight="false" required="false" colspan="" width="100" help="" helpPosition="2" colon=":" hasColon="true"
id="" name="" class="" style="" size="" title="" disabled="" tabindex="" accesskey="" labelStyle=""
onclick="" ondblclick="" onmousedown="" onmouseup="" onmouseover="" onmousemove="" onmouseout="" onfocus="" onblur="" onkeypress="" onkeydown="" onkeyup="" onselect="" onchange=""
>
<#
include
"/include/ui/control.ftl"/><#rt/>
<
input
type="file"<#rt/>
<#
if
id!=""> id="$
{
id
}
"</#if><#rt/>
<#
if
accept!=""> accept="$
{
accept
}
"</#if><#rt/>
<#
if
value!=""> value="$
{
value
}
"</#if><#rt/>
<#
include
"/include/ui/common-attributes.ftl"/><#rt/>
<#
include
"/include/ui/scripting-events.ftl"/><#rt/>
/>
<#
include
"/include/ui/control-close.ftl"/><#rt/>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/ui/form.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
<
form
></
form
>
name
:表单名称
id
:表单
id
action
:提交地址
method
:提交方式
-->
<#
macro
form name id="" target=""
action="" method="post" enctype=""
class="form-horizontal" style="display:none; width:100%; background-color: white;" isvalidation=false tooltip=false
redirect=""
>
<
form
<#
rt
/>
role="form"<#rt/>
method="$
{
method
}
"<#rt/>
action="$
{
action
}
"<#rt/>
<#
if
target!="">target="$
{
target
}
" <#else> target="_self"</#if><#rt/>
<#
if
id!=""> id="$
{
id
}
"<#else> id="$
{
name
}
"</#if><#rt/>
<#
if
enctype!=""> enctype="$
{
enctype
}
"</#if><#rt/>
<#
include
"/include/ui/common-attributes.ftl"/><#rt/>
>
<@
ms
.hidden
name="redirect" value="$
{
redirect
}
"/>
<#
nested
/><#
rt
/>
<
script
>
$(function()
{
var
id
=
"${name}"
;
<#
if
id
??
&&
id
!=
""
>
id
=
"${id}"
</#
if
>
$
(
'#'+
id
)
.fadeIn
(
"slow"
)
;
<#
if
isvalidation
>
$
(
'#'+
id
)
.bootstrapValidator
({
<#
if
tooltip
>
container
:
'
tooltip
'
,
</#
if
>
feedbackIcons
:
{
valid
:
'
glyphicon
glyphicon-ok
'
,
invalid
:
'
glyphicon
glyphicon-remove
'
,
validating
:
'
glyphicon
glyphicon-refresh
'
}
})
;
</#
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"
)
.remove
()
;
<#
if
!
class
?
has_content
>
$
(
"#${name} .form-group>label"
)
.removeClass
(
"col-sm-2"
)
;
$
(
"#${name} .form-group>div"
)
.removeClass
(
"col-sm-9"
)
;
var
width
=
$
(
"#${name} .form-group>div.ms-from-group-input"
)
.width
()
;
//$
(
"#${name} .form-group>div.ms-from-group-input>:input"
)
.unwrap
()
.parent
()
.width
(
width
)
;
$
(
"#${name} .form-group>div.ms-from-group-input"
)
.addClass
(
"has-feedback"
)
.parent
()
.width
(
width
)
;
//$
(
"#${name} .form-group label"
)
.removeClass
(
"checkbox-inline"
)
.removeClass
(
"radio-inline"
)
;
//$
(
"#${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
>
}
)
</
script
>
</
form
>
</#
macro
>
<#
macro
searchForm name id="" target=""
action="" method="post" enctype=""
class="searchForm form-inline" style="display:none; background-color: white;" isvalidation=false tooltip=true >
<@ms.form name="$
{
name
}
" id="$
{
id
}
" action="$
{
action
}
" style="display:none;background-color: white;" isvalidation=true class="$
{
class
}
" tooltip=true>
<#nested/><#rt/>
</@ms.form>
<div class="search-form-div"></div>
<script type="text/javascript">
$(function()
{
//收缩筛选
var
clickTimes
=
1
;
var
searchFormheight
=
$
(
"#searchForm"
)
.height
()
;
//初始化顶住筛选部分的空白
div
$
(
".search-form-div"
)
.height
(
searchFormheight
+
15
)
;
var
_
height
=
parseInt
(
searchFormheight
)
-26
;
$
(
"#searchForm"
)
.find
(
".close"
)
.click
(
function
(){
var
obj
=
$
(
this
)
;
if
(
clickTimes
%
2
==
1
)
{
//空白
div
与筛选同时往上缩
$
(
".search-form-div"
)
.animate
({
height
:
"0px"
},
"slow"
)
;
$
(
"#searchForm"
)
.animate
({
top
:
"-"
+_
height
+
"px"
},
"slow"
)
;
obj
.find
(
"span"
)
.removeClass
(
"glyphicon-chevron-up"
)
.addClass
(
"glyphicon-chevron-down"
)
;
}
else
{
//空白
div
与筛选同时展开
$
(
".search-form-div"
)
.animate
({
height
:
searchFormheight
+
15
+
"px"
},
"slow"
)
;
$
(
"#searchForm"
)
.animate
({
top
:
"46px"
},
"slow"
)
;
obj
.find
(
"span"
)
.removeClass
(
"glyphicon-chevron-down"
)
.addClass
(
"glyphicon-chevron-up"
)
;
}
clickTimes
++
})
}
)
</
script
>
</#
macro
>
<#
macro
searchFormButton close="">
<div class="bottom" style="clear:both">
<div class="close"><span class="glyphicon glyphicon-chevron-up"></span></div>
<@ms.resetButton/>
<#nested/><#rt/>
</div>
</#
macro
>
<#--自定义行-->
<#
macro
formRow label=" " class="form-control" colSm="" groupClass="form-group" width="" labelStyle="" help="" style="" >
<div class="$
{
groupClass
}
">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-9 ms-from-group-input" style="line-height:30px;<#if width!=""> width:$
{
width
}
px;</#if>$
{
style
}
"<#rt/>>
<#nested/>
</div>
</div>
</#
macro
>
<#--
<
input
type="text"/>
-->
<#
macro
fromgroup id="" size="" label="" style="">
<
div
class="form-group ms-form-group" style="$
{
style
}
" help="">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="ms-form-control">
<#nested/><#rt/>
</div>
</
div
>
</#
macro
>
src/main/webapp/WEB-INF/manager/include/ui/index.ftl
deleted
100644 → 0
View file @
cd4672a3
<#
include
"/include/ui/input.ftl"/>
<#
include
"/include/ui/input-tree.ftl"/>
<#
include
"/include/ui/select.ftl"/>
<#
include
"/include/ui/textarea.ftl"/>
<#
include
"/include/ui/file.ftl"/>
<#
include
"/include/ui/button.ftl"/>
<#
include
"/include/ui/form.ftl"/>
<#
include
"/include/ui/date.ftl"/>
<#
include
"/include/ui/editor.ftl"/>
<#
include
"/include/ui/time.ftl"/>
<#
include
"/include/ui/tree.ftl"/>
<#
include
"/include/ui/page.ftl"/>
<#
include
"/include/ui/table.ftl"/>
<#
include
"/include/ui/modal.ftl"/>
<#
include
"/include/ui/upload.ftl"/>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/input-tree.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
树形控件,以input下拉框的形式显示(官网:http://www.ztree.me/v3/main.php#_zTreeInfo) -->
<#--
treeId(必须):树形加载和控制区域的ID,一张页面同时加载多个树形时必须用该值进行区分 -->
<#--
json(必须):需要加载成树形的数据,数据结构为:[
{
categoryId
:
1
,
categoryCategoryId
:
0
,
categoryTitle
:
""
}
,
{
categoryId
:
2
,
categoryCategoryId
:
1
,
categoryTitle
:
""
}
] -->
<#--
jsonId(必须):json数据中ID名称,如:categoryId -->
<#--
jsonPid(必须):json数据中关联的父ID,如:categoryCategoryId -->
<#--
jsonName(必须):json数据中需要显示的数据名称,如:categoryTitle -->
<#--
rootName:顶级根节点,直接传入根节点名称即可。如:顶级分类 -->
<#--
name(必须):隐藏input框的name与id值,用于保存选中数据的ID -->
<#--
value:隐藏input框的val默认值,适用用于加载初始化数据 -->
<#--
text:选择框加载的默认提示信息 -->
<#--
parent:是否可以选择父节点,false默认不允许,true允许 -->
<#--
expandAll:控制节点数据显示的时候是全部展开还是全部折叠(true[默认]:全部展开,false:全部折叠)。 -->
<#--
showIcon:是否显示文件夹图标,true(默认):显示;false:不显示 -->
<#--
required:是否是必选项,true(默认)必选 false -->
<#--
onclick: 选择节点后触发的事件,会注入event,treeId,treeNode三个参数,参考ztree官方文档-->
<#
macro
inputTree treeId json jsonId jsonPid jsonName name text
rootName="" value="" parent=false onclick="" expandAll="true" showIcon="true"
required=true >
<!-- css样式开始 -->
<style type="text/css">
.ztree
${
treeId
}{
width
:100%;
max-height
:
240px;overflow:auto;
}
.ztree
${
treeId
}
li a
{
padding
:
0
}
#$
{
treeId
}
i
{
right
:
0
}
</style>
<!-- css样式结束 -->
<!-- 初始化样式开始 -->
<div class="dropdown" id="$
{
treeId
}
">
<button id="treeLabel$
{
treeId
}
" class="form-control dropdown-toggle" data-toggle="dropdown" aria-expanded="true" style="text-align:left">
$
{
text
?
default
(
'请选择'
)}
</button>
<input type="text" style="position: absolute;height:0;border: none;" <#if name?has_content>name="$
{
name
}
" id="$
{
name
}
"</#if> value="$
{
value
?
default
(
0
)}
"
<#if required && validation?? && validation?has_content><#--验证框架,需要bootstrapValidator框架-->
<#list validation?keys as key>
$
{
key
}
="$
{
validation
[
key
]}
"<#rt/>
</#list>
<#elseif required>
data-bv-between="true" data-bv-between-message="请选择!" data-bv-between-min="1" data-bv-between-max="99998" required data-bv-notempty-message="请选择分类"
</#if>
/>
<ul class="ztree ztree$
{
treeId
}
dropdown-menu" role="menu" id="tree$
{
treeId
}
" aria-labelledby="treeLabel$
{
treeId
}
">
</ul>
</div>
<!-- 初始化样式结束 -->
<!-- js操作方法开始 input -->
<script>
//初始化树形数据
var zNodes$
{
treeId
}
= <#if json?has_content>$
{
json
}
<#else>[]</#if>;
//初始化树形结构
var setting$
{
treeId
}
=
{
view
:{
//控制视图
fontCss
:{
"white-space"
:
"normal"
,
"display"
:
"initial"
,
"word-break"
:
"break-all"
},
showIcon
:
$
{
showIcon
},
//是否显示节点文件夹图标
showLine
:
true
,
//是否显示借点连接线
expandSpeed
:
""
,
//折叠时的动画速度
,
参考
jquery
中动画效果的
speed
参数
,
三种预定速度之一的字符串
(
"slow"
,
"normal"
,
or
"fast"
)
},
data
:
{
//控制显示数据
simpleData
:
{
enable
:
true
,
//是否采用简单数据模式
(
A
rray
)
idKey
:
"${jsonId}"
,
//节点
ID
名称
pIdKey
:
"${jsonPid}"
,
//父节点
ID
名称
},
key
:{
name
:
"${jsonName}"
,
//节点数据保存节点名称的属性名称。
}
},
callback
:
{
//控制获取选择的节点数据
beforeClick
:
<#
if
!
parent
>
beforeClick
$
{
treeId
}
<#
else
>
null
</#
if
>
,
//用于捕获单击节点之前的事件回调函数,并且根据返回值确定是否允许单击操作
onClick
:
getZtreeId
$
{
treeId
},
//用于捕获节点被点击的事件回调函数
},
check
:{
//控制节点的选中方式
(
暂时未启用
,
根据后期需求再做调整
)
autoCheckTrigger
:
true
,
//是否触发自动勾选
enable
:
false
,
//节点上是否显示选择框
,
false
:
不显示
,
true
:
显示。
chkStyle
:
"checkbox"
,
//勾选框类型
(
checkbox
[默认值]
或
radio
)
chkboxType
:{
"Y"
:
"ps"
,
"N"
:
"ps"
},
//设置勾选关联关系
},
}
;
var zTreeObj$
{
treeId
}
="";
$(function()
{
//自定义顶级栏目
<#
if
rootName
?
has_content
>
zNodes
$
{
treeId
}
[
zNodes
$
{
treeId
}
.length
]
=
{
$
{
jsonName
}:
"${rootName}"
,
$
{
jsonId
}:
0
,
$
{
jsonPid
}:
0
}
;
</#
if
>
//加载树形
$
.fn.zTree.init
(
$
(
"#tree${treeId}"
),
setting
$
{
treeId
},
zNodes
$
{
treeId
})
;
//
zTree
内部函数对象
,
主要用户调用
zTree
内部方法
zTreeObj
$
{
treeId
}
=
$
.fn.zTree.getZTreeObj
(
"tree${treeId}"
)
;
//展开
(
true
)
/折叠
(
false
)
全部节点
(
zTree
内部方法
)
zTreeObj
$
{
treeId
}
.expandAll
(
$
{
expandAll
})
;
//加载默认节点
<#
if
value
?
has_content
>
var
nodes
=
zTreeObj
$
{
treeId
}
.getNodeByParam
(
"${jsonId}"
,
$
{
value
},
null
)
if
(
nodes
!=
null
)
{
zTreeObj
$
{
treeId
}
.selectNode
(
nodes
)
;
$
(
"#treeLabel${treeId}"
)
.text
(
nodes
.$
{
jsonName
})
;
}
</#
if
>
//当属性为折叠时,控制下拉菜单的开启和关闭
<#
if
expandAll
=
"false"
>
$
(
"body"
)
.on
(
"click"
,
function
(
e
)
{
e
=
window
.event
||
e
;
//
兼容
IE
7
//获取当前点击事件对象
var
objZtree
=
$
(
e
.srcElement
||
e
.target
)
;
//获取当前点击事件
ID
,
并对点击的子节点
ID
进行切割获取自定义
ID
var
objZtreeId
=
objZtree
.attr
(
"id"
)
;
//当用户点击选择框时还原下拉框属性
if
(
objZtreeId
!=
undefined
&&
objZtreeId
.split
(
"_"
)[
0
]
== "treeLabel$
{
treeId
}
")
{
$
(
"#tree${treeId}"
)
.attr
(
"style"
,
""
)
;
return
;
}
//切割获取到的
ID
判断点击事件是否产生在下拉框
if
(
objZtreeId
!=
undefined
&&
objZtreeId
.split
(
"_"
)[
0
]
== "tree$
{
treeId
}
")
{
$
(
"#tree${treeId}"
)
.attr
(
"style"
,
"display:block"
)
;
}
else
{
$
(
"#tree${treeId}"
)
.attr
(
"style"
,
"display:none"
)
;
}
})
;
</#
if
>
}
);
<#if !parent>
//对节点选择进行限制,用户只能选择子节点
function beforeClick$
{
treeId
}
(treeId,treeNode)
{
var
check
=
(
treeNode
&&
!
treeNode
.isParent
)
;
if
(
!
check
){
<@
ms
.notify
msg
=
"请选择该分类的子分类!"
/>
}
;
return
check
;
}
</#if>
//获取树形中选中的值,将选择值加载到隐藏框中
function getZtreeId$
{
treeId
}
(event,treeId,treeNode)
{
var
booleanClick
=
true
;
//用于捕获节点被点击的事件回调函数
<#
if
onclick
?
has_content
>
booleanClick
=$
{
onclick
}(
event
,
treeId
,
treeNode
)
;
</#
if
>
if
(
booleanClick
==
false
){
return
;
}
//将用户选择数据
ID
加载到隐藏框
$
(
"#${treeId} input[name='${name}']"
)
.val
(
treeNode
.$
{
jsonId
})
;
<#
if
required
>
$
(
"form:first"
)
.bootstrapValidator
(
'
revalidateField
'
,
'$
{
name
}
'
)
;
</#
if
>
//将用户选择数据的名称加载到输入框
$
(
"#treeLabel${treeId}"
)
.text
(
treeNode
.$
{
jsonName
})
;
}
</script>
<!-- js操作方法结束 -->
</#
macro
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/include/ui/input.ftl
deleted
100644 → 0
View file @
cd4672a3
<#--
<
input
type="text"/>
-->
<#
macro
text id="" name="" value="" label="" title="" colSm=""
class="form-control" style="" readonly="" disabled=false maxlength="" minlength=""
validation="" size="" width="" placeholder="" groupClass="form-group" onclick="" onchange="" labelStyle="" autocomplete="off" help="" helpDirection="">
<
div
class="$
{
groupClass
}
ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-9 ms-from-group-input ms-form-input" style="<#if width!="">width:$
{
width
}
px;</#if>$
{
style
}
"<#rt/>>
<input type="text" autocomplete="$
{
autocomplete
}
"<#rt/>
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
<#if maxlength!=""> maxlength="$
{
maxlength
}
"</#if><#rt/>
<#if size!=""> maxlesizength="$
{
size
}
"</#if><#rt/>
<#if readonly!=""> readonly="$
{
readonly
}
"</#if><#rt/>
<#if value?? && value?string!=""> value="$
{
value
?
html
}
"</#if><#rt/>
<#if onchange?? && onchange!=""> onchange="$
{
onchange
}
"</#if><#rt/>
<#include "/include/ui/common-attributes.ftl" /><#rt/>
/><#rt/>
</div>
</
div
>
</#
macro
>
<#--数字输入框-->
<#
macro
number id="" name="" value="" label="" title="" min=0 max=200 isFloat=false colSm=""
class="form-control" style="" readonly="" disabled=false maxlength="10" minlength=""
validation="" size="" width="150" placeholder="" groupClass="form-group" onclick="" onchange="" labelStyle="" autocomplete="off" help="" helpDirection="">
<#assign reg="^-?\\d+$">
<#if isFloat>
<#assign reg="^\\d+(\\.\\d+)?$">
</#if>
<@ms.text
id="$
{
id
}
" name="$
{
name
}
" value="$
{
value
}
" label="$
{
label
}
" title="$
{
title
}
"
class="$
{
class
}
" style="$
{
style
}
" readonly="$
{
readonly
}
"
maxlength="$
{
maxlength
}
"
minlength="$
{
minlength
}
"
size="$
{
size
}
" width="$
{
width
}
" placeholder="$
{
placeholder
}
" groupClass="$
{
groupClass
}
" onclick="$
{
onclick
}
" onchange="$
{
onchange
}
" labelStyle="$
{
labelStyle
}
"
autocomplete="$
{
autocomplete
}
" help="$
{
help
}
" helpDirection="$
{
helpDirection
}
"
validation=
{
"data-bv-between"
:
"true"
,
"data-bv-between-message"
:
"必须大于等于${min}且小于等于${max}"
,
"data-bv-between-min"
:
"${min}"
,
"data-bv-between-max"
:
"${max}"
,
"data-bv-regexp"
:
"true"
,
"data-bv-regexp-regexp"
:
"${reg}"
,
"data-bv-regexp-message"
:
"请输入数字"
}
/>
</#
macro
>
<#--
<
input
type="password"/>
-->
<#
macro
password
id="" name="" value="" label="" title="" colSm=""
class="form-control" style="" readonly="" disabled=false maxlength="" minlength=""
validation="" size="" width="" placeholder="" groupClass="form-group" onclick="" onchange="" labelStyle="" autocomplete="off" help="" helpDirection="">
<
div
class="form-group ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="ms-form-control ms-from-group-input col-sm-9" <#if width!=""> style="width:$
{
width
}
px"</#if><#rt/>>
<input type="password" autocomplete="$
{
autocomplete
}
"<#rt/>
<#if id!=""> id="$
{
id
}
"</#if><#rt/>
<#if maxlength!=""> maxlength="$
{
maxlength
}
"</#if><#rt/>
<#if readonly!=""> readonly="$
{
readonly
}
"</#if><#rt/>
<#if value!=""> value="$
{
value
}
"</#if><#rt/>
<#if onchange?? && onchange!=""> onchange="$
{
onchange
}
"</#if><#rt/>
<#include "/include/ui/common-attributes.ftl"/><#rt/>
/>
</div>
</
div
>
</#
macro
>
<#--
<
input
type="hidden"/>
-->
<#
macro
hidden
id="" name="" value=""
>
<
input
type="hidden"<#rt/>
<#
if
id!=""> id="$
{
id
}
"</#if><#rt/>
<#
if
name!=""> name="$
{
name
}
"</#if><#rt/>
<#
if
value?string!=""> value="$
{
value
}
"</#if><#rt/>
/>
</#
macro
>
<#--
<
input
type="radio"/>
-->
<#
macro
radio
name list listKey="" listValue="" value="" width="" colSm=""
help="" helpPosition="2" colon=":" hasColon="true"
label="" class="" style="" disabled=false direction=false validation="" size="" labelStyle="" onclick="" help="" helpDirection="">
<
div
class="form-group ms-form-group _$
{
name
}
Div">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-9 ms-from-group-input " style="margin-top:7px<#if width!=""> ;width:$
{
width
}
px</#if>"<#rt/>>
<#if list?is_sequence><#--LIST-->
<#if listKey!="" && listValue!="">
<#list list as item>
<#local rkey=item[listKey]>
<#local rvalue=item[listValue]>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/radio-item.ftl"><#t/>
</#list>
<#else>
<#list list as item>
<#local rkey=item>
<#local rvalue=item>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/radio-item.ftl"><#t/>
</#list>
</#if>
<#else>
<#list list?keys as key><#--MAP-->
<#local rkey=key/>
<#local rvalue=list[key]/>
<#local index=key_index>
<#local hasNext=key_has_next>
<#include "/include/ui/radio-item.ftl"><#t/>
</#list>
</#if>
</div>
</
div
>
<script>
$(function()
{
<#
if
direction
>
$
(
"._${name}Div .ms-radio"
)
.width
(
"100%"
)
;
</#
if
>
}
)
</script>
</#
macro
>
<#--
<
input
type="checkbox"/>
-->
<#
macro
checkbox
list listKey="" listValue="" valueList=[] colSm=""
label="" colon=":" hasColon="true"
id="" name="" class="" style="" size="" title="" disabled=false
validation="" direction=true
width=""
labelStyle=""
help=""
helpDirection=""
>
<
div
class="form-group ms-form-group _$
{
name
}
Div">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-9 ms-from-group-input " style="margin-top:7px<#if width!=""> ;width:$
{
width
}
px</#if>"<#rt/> >
<#if list?is_sequence>
<#if listKey!="" && listValue!="">
<#list list as item>
<#local rkey=item[listKey]>
<#local rvalue=item[listValue]>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
<#else>
<#list list as item>
<#local rkey=item>
<#local rvalue=item>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
<#else>
<#list list?keys as key>
<#local rkey=key/>
<#local rvalue=list[key]/>
<#local index=key_index>
<#local hasNext=key_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
</div>
</
div
>
<script>
$(function()
{
<#
if
direction
>
//$
(
"._${name}Div label.ms-checkbox"
)
.removeClass
(
"checkbox"
)
.addClass
(
"checkbox-inline"
)
;
<#
else
>
//$
(
"._${name}Div label.ms-checkbox"
)
.removeClass
(
"checkbox-inline"
)
.addClass
(
"checkbox"
)
;
</#
if
>
}
)
</script>
</#
macro
>
<#--
<
input
type="checkbox"/>
4.5.5废弃
-->
<#
macro
checkboxlist
list listKey="" listValue="" valueList=[] colSm=""
label="" colon=":" hasColon="true"
id="" name="" class="" style="" size="" title="" disabled=false
validation="" direction=true
width=""
labelStyle=""
help=""
helpDirection=""
>
<
div
class="form-group ms-form-group">
<#include "/include/ui/control.ftl"/><#rt/>
<div class="col-sm-9" <#if width!=""> style="$
{
width
}
px"</#if><#rt/>>
<#if list?is_sequence>
<#if listKey!="" && listValue!="">
<#list list as item>
<#local rkey=item[listKey]>
<#local rvalue=item[listValue]>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
<#else>
<#list list as item>
<#local rkey=item>
<#local rvalue=item>
<#local index=item_index>
<#local hasNext=item_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
<#else>
<#list list?keys as key>
<#local rkey=key/>
<#local rvalue=list[key]/>
<#local index=key_index>
<#local hasNext=key_has_next>
<#include "/include/ui/checkboxlist-item.ftl"><#t/>
</#list>
</#if>
</div>
</
div
>
</#
macro
>
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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