Commit e2a64d42 authored by Huang's avatar Huang
Browse files

no commit message

parent 0844dd86
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="procInsId" type="java.lang.String" required="true" description="流程实例ID"%>
<%@ attribute name="startAct" type="java.lang.String" required="false" description="开始活动节点名称"%>
<%@ attribute name="endAct" type="java.lang.String" required="false" description="结束活动节点名称"%>
<fieldset>
<legend>流转信息</legend>
<div id="histoicFlowList">
正在加载流转信息...
</div>
</fieldset>
<script type="text/javascript">
$.get("${ctx}/act/task/histoicFlow?procInsId=${procInsId}&startAct=${startAct}&endAct=${endAct}&t="+new Date().getTime(), function(data){
$("#histoicFlowList").html(data);
});
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<%@ attribute name="category" type="com.jeespring.modules.cms.entity.Category" required="true" description="栏目对象"%>
<%@ attribute name="pageSize" type="java.lang.Integer" required="false" description="页面大小"%>
<c:forEach items="${fnc:getArticleList(category.site.id, category.id, not empty pageSize?pageSize:8, 'posid:2, orderBy: \"hits desc\"')}" var="article">
<li><a href="${ctx}/view-${article.category.id}-${article.id}${urlSuffix}" style="color:${article.color}" title="${article.title}">${fns:abbr(article.title,16)}</a></li>
</c:forEach>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<%@ attribute name="categoryList" type="java.util.List" required="true" description="栏目列表"%>
<c:forEach items="${categoryList}" var="tpl">
<%--<c:if test="${category.inList eq '1'}"> --%>
<c:choose>
<c:when test="${not empty tpl.href}">
<c:choose>
<c:when test="${fn:indexOf(tpl.href, '://') eq -1 && fn:indexOf(tpl.href, 'mailto:') eq -1}">
<c:set var="url" value="${ctx}${tpl.href}"/></c:when><c:otherwise><c:set var="url" value="${tpl.href}"/></c:otherwise>
</c:choose>
</c:when>
<c:otherwise><c:set var="url" value="${ctx}/list-${tpl.id}${urlSuffix}"/></c:otherwise>
</c:choose>
<li class="${requestScope.category.id eq tpl.id ?'menu_activ':''}">
<c:choose><c:when test="${fn:length(tpl.name) gt 12}">
<a href="${url}" target="${tpl.target}" style="line-height:16px;padding-top:3px;">${tpl.name}</a>
</c:when><c:otherwise>
<a href="${url}" target="${tpl.target}" ${fn:length(tpl.name) gt 10?'style="font-size:12px;"':''}>${tpl.name}</a>
</c:otherwise></c:choose></li>
<%--</c:if> --%>
</c:forEach>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<%@ attribute name="category" type="com.jeespring.modules.cms.entity.Category" required="true" description="栏目对象"%>
<li><strong>当前位置:</strong><a href="${ctx}/index-${site.id}${urlSuffix}">首页</a></li><c:forEach items="${fnc:getCategoryListByIds(category.parentIds)}" var="tpl">
<c:if test="${tpl.id ne '1'}"><li><span class="divider">/</span> <a href="${ctx}/list-${tpl.id}${urlSuffix}">${tpl.name}</a></li></c:if>
</c:forEach><li><span class="divider">/</span> <a href="${ctx}/list-${category.id}${urlSuffix}">${category.name}</a></li>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="replace" type="java.lang.String" required="true" description="需要替换的textarea编号"%>
<%@ attribute name="uploadPath" type="java.lang.String" required="false" description="文件上传路径,路径后自动添加年份。若不指定,则编辑器不可上传文件"%>
<%@ attribute name="height" type="java.lang.String" required="false" description="编辑器高度"%>
<script type="text/javascript">include('ckeditor_lib','${ctxStatic}/ckeditor/',['ckeditor.js']);</script>
<script type="text/javascript">
var ${replace}Ckeditor = CKEDITOR.replace("${replace}");
${replace}Ckeditor.config.height = "${height}";//<c:if test="${not empty uploadPath}">
${replace}Ckeditor.config.ckfinderPath="${ctxStatic}/ckfinder";
var date = new Date(), year = date.getFullYear(), month = (date.getMonth()+1)>9?date.getMonth()+1:"0"+(date.getMonth()+1);
${replace}Ckeditor.config.ckfinderUploadPath="${uploadPath}/"+year+"/"+month+"/";//</c:if>
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ attribute name="input" type="java.lang.String" required="true" description="输入框" %>
<%@ attribute name="type" type="java.lang.String" required="true" description="files、images、flash、thumb" %>
<%@ attribute name="uploadPath" type="java.lang.String" required="true" description="打开文件管理的上传路径" %>
<%@ attribute name="selectMultiple" type="java.lang.Boolean" required="false" description="是否允许多选" %>
<%@ attribute name="readonly" type="java.lang.Boolean" required="false" description="是否查看模式" %>
<%@ attribute name="maxWidth" type="java.lang.String" required="false" description="最大宽度" %>
<%@ attribute name="maxHeight" type="java.lang.String" required="false" description="最大高度" %>
<ol id="${input}Preview"></ol>
<c:if test="${!readonly}"><a href="javascript:" onclick="${input}FinderOpen();"
class="btn btn-primary">${selectMultiple?'添加':'选择'}</a>&nbsp;<a href="javascript:" onclick="${input}DelAll();" class="btn btn-white">清除</a></c:if>
<script type="text/javascript">
function ${input}FinderOpen() {//<c:if test="${type eq 'thumb'}"><c:set var="ctype" value="images"/></c:if><c:if test="${type ne 'thumb'}"><c:set var="ctype" value="${type}"/></c:if>
var date = new Date(), year = date.getFullYear(),
month = (date.getMonth() + 1) > 9 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1);
var url = "${ctxStatic}/ckfinder/ckfinder.html?type=${ctype}&start=${ctype}:${uploadPath}/" + year + "/" + month +
"/&action=js&func=${input}SelectAction&thumbFunc=${input}ThumbSelectAction&cb=${input}Callback&dts=${type eq 'thumb'?'1':'0'}&sm=${selectMultiple?1:0}";
windowOpen(url, "文件管理", 1000, 700);
//top.$.jBox("iframe:"+url+"&pwMf=1", {title: "文件管理", width: 1000, height: 500, buttons:{'关闭': true}});
}
function ${input}SelectAction(fileUrl, data, allFiles) {
var url = "", files = ckfinderAPI.getSelectedFiles();
for (var i = 0; i < files.length; i++) {//<c:if test="${type eq 'thumb'}">
url += files[i].getThumbnailUrl();//</c:if><c:if test="${type ne 'thumb'}">
url += files[i].getUrl();//</c:if>
if (i < files.length - 1) url += "|";
}//<c:if test="${selectMultiple}">
$("#${input}").val($("#${input}").val() + ($("#${input}").val(url) == "" ? url : "|" + url));//</c:if><c:if test="${!selectMultiple}">
$("#${input}").val(url);//</c:if>
${input}Preview();
//top.$.jBox.close();
}
function ${input}ThumbSelectAction(fileUrl, data, allFiles) {
var url = "", files = ckfinderAPI.getSelectedFiles();
for (var i = 0; i < files.length; i++) {
url += files[i].getThumbnailUrl();
if (i < files.length - 1) url += "|";
}//<c:if test="${selectMultiple}">
$("#${input}").val($("#${input}").val() + ($("#${input}").val(url) == "" ? url : "|" + url));//</c:if><c:if test="${!selectMultiple}">
$("#${input}").val(url);//</c:if>
${input}Preview();
//top.$.jBox.close();
}
function ${input}Callback(api) {
ckfinderAPI = api;
}
function ${input}Del(obj) {
var url = $(obj).prev().attr("url");
$("#${input}").val($("#${input}").val().replace("|" + url, "", "").replace(url + "|", "", "").replace(url, "", ""));
${input}Preview();
}
function ${input}DelAll() {
$("#${input}").val("");
${input}Preview();
}
function ${input}Preview() {
var li, urls = $("#${input}").val().split("|");
$("#${input}Preview").children().remove();
for (var i = 0; i < urls.length; i++) {
if (urls[i] != "") {//<c:if test="${type eq 'thumb' || type eq 'images'}">
//li = "<li><img src=\""+urls[i]+"\" url=\""+urls[i]+"\" style=\"max-width:${empty maxWidth ? 200 : maxWidth}px;max-height:${empty maxHeight ? 200 : maxHeight}px;_height:${empty maxHeight ? 200 : maxHeight}px;border:0;padding:3px;\">";//</c:if><c:if test="${type ne 'thumb' && type ne 'images'}">
//li = "<li><a href=\""+urls[i]+"\" url=\""+urls[i]+"\" target=\"_blank\">"+decodeURIComponent(urls[i].substring(urls[i].lastIndexOf("/")+1))+"</a>";//</c:if>
//li += "&nbsp;&nbsp;<c:if test="${!readonly}"><a href=\"javascript:\" onclick=\"${input}Del(this);\">×</a></c:if></li>";
//$("#${input}Preview").append(li);
}
if (urls[i] != "") {
if (urls[i].indexOf(".jpg") || urls[i].indexOf(".png"))
li = "<li style=\"display:inline-block;\"><img src=\"" + urls[i] + "\" url=\"" + urls[i] + "\" style=\"max-width:${empty maxWidth ? 200 : maxWidth}px;max-height:${empty maxHeight ? 200 : maxHeight}px;_height:${empty maxHeight ? 200 : maxHeight}px;border:0;padding:3px;\">";
else
li = "<li><a href=\"" + urls[i] + "\" url=\"" + urls[i] + "\" target=\"_blank\">" + decodeURIComponent(urls[i].substring(urls[i].lastIndexOf("/") + 1)) + "</a>";
if (urls[i].indexOf(".jpg") || urls[i].indexOf(".png"))
li += "&nbsp;&nbsp;<c:if test="${!readonly}"><a href=\"javascript:\" onclick=\"${input}Del(this);\" style=\"display: block;margin: 0px 42% 0px 42%;\">×</a></c:if></li>";
else
li += "&nbsp;&nbsp;<c:if test="${!readonly}"><a href=\"javascript:\" onclick=\"${input}Del(this);\">×</a></c:if></li>";
$("#${input}Preview").append(li);
}
}
if ($("#${input}Preview").text() == "") {
$("#${input}Preview").html("<li style='list-style:none;padding-top:5px;'>无</li>");
}
}
${input}Preview();
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
<%@ attribute name="name" type="java.lang.String" required="true" description="输入框名称"%>
<%@ attribute name="value" type="java.lang.String" required="true" description="输入框值"%>
<i id="${id}Icon" class="icon-${not empty value?value:' hide'}"></i>&nbsp;<span id="${id}IconLabel">${not empty value?value:'无'}</span>&nbsp;
<input id="${id}" name="${name}" type="hidden" value="${value}"/><a id="${id}Button" href="javascript:" class="btn btn-primary">选择</a>&nbsp;&nbsp;
<input id="${id}clear" class="btn btn-default" type="button" value="清除" onclick="clear()"/>
<script type="text/javascript">
$("#${id}Button").click(function(){
top.layer.open({
type: 2,
title:"选择图标",
area: ['700px', $(top.document).height()-180+"px"],
content: '${ctx}/tag/iconselect?value="+$("#${id}").val()',
btn: ['确定', '关闭'],
yes: function(index, layero){ //或者使用btn1
var icon = layero.find("iframe")[0].contentWindow.$("#icon").val();
$("#${id}Icon").attr("class", "fa "+icon);
$("#${id}IconLabel").text(icon);
$("#${id}").val(icon);
top.layer.close(index);
},cancel: function(index){ //或者使用btn2
}
});
});
$("#${id}clear").click(function(){
$("#${id}Icon").attr("class", "icon- hide");
$("#${id}IconLabel").text("无");
$("#${id}").val("");
});
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="hideType" type="java.lang.String" required="false" description="显示类型"%><!-- 0:隐藏tip, 1隐藏box,不设置显示全部 -->
<%@ attribute name="content" type="java.lang.String" required="true" description="消息内容"%>
<%@ attribute name="type" type="java.lang.String" description="消息类型:info、success、warning、error、loading"%>
<!--script type="text/javascript">top.$.jBox.closeTip();</script-->
<c:if test="${not empty content}">
<c:if test="${not empty type}">
<c:set var="ctype" value="${type}"/></c:if>
<c:if test="${empty type}">
<c:set var="ctype" value="${fn:indexOf(content,'失败') eq -1?'success':'danger'}"/>
</c:if>
<c:if test="${hideType != '1'}">
<div id="messageBox" class="alert alert-${ctype}">
<button data-dismiss="alert" class="close">×</button>${content}</div>
</c:if>
<c:if test="${hideType != '0'}">
<script type="text/javascript">if(!top.$.jBox.tip.mess){top.$.jBox.tip.mess=1;top.$.jBox.tip("${content}","${ctype}",{persistent:true,opacity:0});$("#messageBox").show();}</script>
</c:if>
</c:if>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true"%>
<%@ attribute name="name" type="java.lang.String" required="true"%>
<%@ attribute name="value" type="java.lang.String" required="true"%>
<%@ attribute name="callback" type="java.lang.String" required="true"%>
<input id="${id}" name="${name}" type="hidden" value="${value}"/>
<%-- 使用方法: 1.将本tag写在查询的from里;2.在需要排序th列class上添加:sort-column + 排序字段名;3.后台sql添加排序引用page.orderBy;实例文件:userList.jsp、UserDao.xml --%>
<script type="text/javascript">
$(document).ready(function() {
var orderBy = $("#${id}").val().split(" ");
$(".sort-column").each(function(){
if ($(this).hasClass(orderBy[0])){
orderBy[1] = orderBy[1]&&orderBy[1].toUpperCase()=="DESC"?"down":"up";
$(this).html($(this).html()+" <i class=\"icon icon-arrow-"+orderBy[1]+"\"></i>");
}
});
$(".sort-column").click(function(){
var order = $(this).attr("class").split(" ");
var sort = $("#${id}").val().split(" ");
for(var i=0; i<order.length; i++){
if (order[i] == "sort-column"){order = order[i+1]; break;}
}
if (order == sort[0]){
sort = (sort[1]&&sort[1].toUpperCase()=="DESC"?"ASC":"DESC");
$("#${id}").val(order+" DESC"!=order+" "+sort?"":order+" "+sort);
}else{
$("#${id}").val(order+" ASC");
}
${callback}
});
});
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ attribute name="id" type="java.lang.String" required="true" description="编号" %>
<%@ attribute name="name" type="java.lang.String" required="true" description="隐藏域名称(ID)" %>
<%@ attribute name="value" type="java.lang.String" required="true" description="隐藏域值(ID)" %>
<%@ attribute name="labelName" type="java.lang.String" required="true" description="输入框名称(Name)" %>
<%@ attribute name="labelValue" type="java.lang.String" required="true" description="输入框值(Name)" %>
<%@ attribute name="title" type="java.lang.String" required="true" description="选择框标题" %>
<%@ attribute name="url" type="java.lang.String" required="true" description="树结构数据地址" %>
<%@ attribute name="checked" type="java.lang.Boolean" required="false"
description="是否显示复选框,如果不需要返回父节点,请设置notAllowSelectParent为true" %>
<%@ attribute name="extId" type="java.lang.String" required="false" description="排除掉的编号(不能选择的编号)" %>
<%@ attribute name="isAll" type="java.lang.Boolean" required="false"
description="是否列出全部数据,设置true则不进行数据权限过滤(目前仅对Office有效)" %>
<%@ attribute name="notAllowSelectRoot" type="java.lang.Boolean" required="false" description="不允许选择根节点" %>
<%@ attribute name="notAllowSelectParent" type="java.lang.Boolean" required="false" description="不允许选择父节点" %>
<%@ attribute name="module" type="java.lang.String" required="false" description="过滤栏目模型(只显示指定模型,仅针对CMS的Category树)" %>
<%@ attribute name="selectScopeModule" type="java.lang.Boolean" required="false"
description="选择范围内的模型(控制不能选择公共模型,不能选择本栏目外的模型)(仅针对CMS的Category树)" %>
<%@ attribute name="allowClear" type="java.lang.Boolean" required="false" description="是否允许清除" %>
<%@ attribute name="allowInput" type="java.lang.Boolean" required="false" description="文本框可填写" %>
<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式" %>
<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式" %>
<%@ attribute name="smallBtn" type="java.lang.Boolean" required="false" description="缩小按钮显示" %>
<%@ attribute name="hideBtn" type="java.lang.Boolean" required="false" description="是否显示按钮" %>
<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled" %>
<%@ attribute name="dataMsgRequired" type="java.lang.String" required="false" description="" %>
<input id="${id}Id" name="${name}" class="${cssClass}" type="hidden" value="${value}"/>
<div class="input-group">
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}"
data-msg-required="${dataMsgRequired}"
class="${cssClass}" style="${cssStyle}"/>
<a class="input-group-addon" id="${id}Button" href="javascript:">
<i class="fa fa-search"></i>
</a>
</div>
<label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
<script type="text/javascript">
$("#${id}Button, #${id}Name").click(function () {
// 是否限制选择,如果限制,设置为disabled
if ($("#${id}Button").hasClass("disabled")) {
return true;
}
var jeeSpringLayer;
if(top.layer) jeeSpringLayer=top.layer;
else jeeSpringLayer=layer;
// 正常打开
jeeSpringLayer.open({
type: 2,
area: ['300px', '420px'],
title: "选择${title}",
ajaxData: {selectIds: $("#${id}Id").val()},
content: "${ctx}/tag/treeselect?url=" + encodeURIComponent("${url}") + "&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}",
btn: ['确定', '关闭']
, yes: function (index, layero) { //或者使用btn1
var tree = layero.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
var ids = [], names = [], nodes = [];
if ("${checked}" == "true") {
nodes = tree.getCheckedNodes(true);
} else {
nodes = tree.getSelectedNodes();
}
for (var i = 0; i < nodes.length; i++) {//<c:if test="${checked && notAllowSelectParent}">
if (nodes[i].isParent) {
continue; // 如果为复选框选择,则过滤掉父节点
}//</c:if><c:if test="${notAllowSelectRoot}">
if (nodes[i].level == 0) {
//top.$.jBox.tip("不能选择根节点("+nodes[i].name+")请重新选择。");
top.layer.msg("不能选择根节点(" + nodes[i].name + ")请重新选择。", {icon: 0});
return false;
}//</c:if><c:if test="${notAllowSelectParent}">
if (nodes[i].isParent) {
//top.$.jBox.tip("不能选择父节点("+nodes[i].name+")请重新选择。");
//layer.msg('有表情地提示');
jeeSpringLayer.msg("不能选择父节点(" + nodes[i].name + ")请重新选择。", {icon: 0});
return false;
}//</c:if><c:if test="${not empty module && selectScopeModule}">
if (nodes[i].module == "") {
//top.$.jBox.tip("不能选择公共模型("+nodes[i].name+")请重新选择。");
jeeSpringLayer.msg("不能选择公共模型(" + nodes[i].name + ")请重新选择。", {icon: 0});
return false;
} else if (nodes[i].module != "${module}") {
//top.$.jBox.tip("不能选择当前栏目以外的栏目模型,请重新选择。");
jeeSpringLayer.msg("不能选择当前栏目以外的栏目模型,请重新选择。", {icon: 0});
return false;
}//</c:if>
ids.push(nodes[i].id);
names.push(nodes[i].name);//<c:if test="${!checked}">
break; // 如果为非复选框选择,则返回第一个选择 </c:if>
}
$("#${id}Id").val(ids.join(",").replace(/u_/ig, ""));
$("#${id}Name").val(names.join(","));
$("#${id}Name").focus();
jeeSpringLayer.close(index);
},
cancel: function (index) { //或者使用btn2
//按钮【按钮二】的回调
}
});
});
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="name" type="java.lang.String" required="true" description="验证码输入框名称"%>
<%@ attribute name="inputCssStyle" type="java.lang.String" required="false" description="验证框样式"%>
<%@ attribute name="imageCssStyle" type="java.lang.String" required="false" description="验证码图片样式"%>
<%@ attribute name="buttonCssStyle" type="java.lang.String" required="false" description="看不清按钮样式"%>
<input type="text" id="${name}" name="${name}" maxlength="5" class="input-underline input-lg txt required" placeholder="验证码" style="font-weight:bold;width:100px;${inputCssStyle}"/>
<img src="" style="width: 7px;height: 13px;background: url(../static/common/login/images/login_code.png) no-repeat 0 0;position: relative;">
<img src="${pageContext.request.contextPath}/servlet/validateCodeServlet" onclick="$('.${name}Refresh').click();" class="mid ${name}" style="${imageCssStyle};border-radius: 6px;box-shadow: 0 1px 1px 1px rgba(0,0,0,0.25);"/>
<a href="javascript:" onclick="$('.${name}').attr('src','${pageContext.request.contextPath}/servlet/validateCodeServlet?'+new Date().getTime());" class="mid ${name}Refresh" style="${buttonCssStyle}"></a>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%@ attribute name="title" type="java.lang.String" required="true"%>
<%@ attribute name="width" type="java.lang.String" required="false"%>
<%@ attribute name="height" type="java.lang.String" required="false"%>
<%@ attribute name="target" type="java.lang.String" required="false"%>
<%@ attribute name="label" type="java.lang.String" required="false"%>
<button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" onclick="add()" title="添加"><i class="fa fa-plus"></i> ${label==null?'添加':label}</button>
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%>
<script type="text/javascript">
function add(){
window.location.href=${url};
//openDialog("新增"+'${title}',"${url}","${width==null?'800px':width}", "${height==null?'500px':height}","${target}");
}
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true"%>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%@ attribute name="label" type="java.lang.String" required="false"%>
<button class="btn btn-white btn-sm" onclick="deleteAll()" data-toggle="tooltip" data-placement="top" title="删除"><i class="fa fa-trash-o"> ${label==null?'删除':label}</i>
</button>
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%>
<script type="text/javascript">
$(document).ready(function() {
$('#${id} thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
$('#${id} tbody tr td input.i-checks').iCheck('check');
});
$('#${id} thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
});
});
function deleteAll(){
// var url = $(this).attr('data-url');
var str="";
var ids="";
$("#${id} tbody tr td input.i-checks:checkbox").each(function(){
if(true == $(this).is(':checked')){
str+=$(this).attr("id")+",";
}
});
if(str.substr(str.length-1)== ','){
ids = str.substr(0,str.length-1);
}
if(ids == ""){
top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
return;
}
top.layer.confirm('确认要彻底删除数据吗?', {icon: 3, title:'系统提示'}, function(index){
window.location = "${url}?ids="+ids;
//top.layer.close(index);
});
}
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true"%>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%@ attribute name="title" type="java.lang.String" required="true"%>
<%@ attribute name="width" type="java.lang.String" required="false"%>
<%@ attribute name="height" type="java.lang.String" required="false"%>
<%@ attribute name="target" type="java.lang.String" required="false"%>
<%@ attribute name="label" type="java.lang.String" required="false"%>
<button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" onclick="edit()" title="修改"><i class="fa fa-file-text-o"></i> ${label==null?'修改':label}</button>
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%>
<script type="text/javascript">
$(document).ready(function() {
$('#${id} thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
$('#${id} tbody tr td input.i-checks').iCheck('check');
});
$('#${id} thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
});
});
function edit(){
// var url = $(this).attr('data-url');
var str="";
var ids="";
var size = $("#${id} tbody tr td input.i-checks:checked").size();
if(size == 0 ){
top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
return;
}
if(size > 1 ){
top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
return;
}
var id = $("#${id} tbody tr td input.i-checks:checkbox:checked").attr("id");
openDialog("修改"+'${title}',"${url}?id="+id,"${width==null?'800px':width}", "${height==null?'500px':height}","${target}");
}
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入url --%>
<button id="btnExport" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="导出"><i class="fa fa-file-excel-o"></i> 导出</button>
<script type="text/javascript">
$(document).ready(function() {
$("#btnExport").click(function(){
top.layer.confirm('确认要导出Excel吗?', {icon: 3, title:'系统提示'}, function(index){
//do something
//导出之前备份
var url = $("#searchForm").attr("action");
var pageNo = $("#pageNo").val();
var pageSize = $("#pageSize").val();
//导出excel
$("#searchForm").attr("action","${url}");
$("#pageNo").val(-1);
$("#pageSize").val(-1);
$("#searchForm").submit();
//导出excel之后还原
$("#searchForm").attr("action",url);
$("#pageNo").val(pageNo);
$("#pageSize").val(pageSize);
//top.layer.close(index);
});
});
});
</script>
\ No newline at end of file
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入controller的url --%>
<button id="btnImport" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="导入"><i class="fa fa-folder-open-o"></i> 导入</button>
<div id="importBox" class="hide">
<form id="importForm" action="${url}" method="post" enctype="multipart/form-data"
style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入,请稍等...');"><br/>
<input id="uploadFile" name="file" type="file" style="width:330px"/>导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!<br/>  
</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#btnImport").click(function(){
layer.open({
type: 1,
area: [500, 300],
title:"导入数据",
content:$("#importBox").html() ,
btn: ['下载模板','确定', '关闭'],
btn1: function(index, layero){
window.location.href='${url}/template';
},
btn2: function(index, layero){
$("#importBox").remove();
$("#importForm").submit();
//top.layer.close(index);
},
btn3: function(index){
//top.layer.close(index);
}
});
});
});
</script>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment