treeselect功能修复
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-validation/1.11.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js" type="text/javascript"></script>
|
||||
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.min.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.src.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<!-- END CORE PLUGINS -->
|
||||
@@ -53,6 +52,7 @@
|
||||
|
||||
<!-- BEGIN THEME GLOBAL SCRIPTS -->
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/app.min.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/jeesite.js" type="text/javascript"></script>
|
||||
<!-- END THEME GLOBAL SCRIPTS -->
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#${id}Button, #${id}Name").click(function(){
|
||||
// 是否限制选择,如果限制,设置为disabled
|
||||
// 是否限制选择,如果限制,设置为disablegetQueryString d
|
||||
if ($("#${id}Button").hasClass("disabled")){
|
||||
return true;
|
||||
}
|
||||
@@ -109,6 +109,7 @@
|
||||
}
|
||||
}, loaded:function(h){
|
||||
$(".jbox-content", top.document).css("overflow-y","hidden");
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<head>
|
||||
|
||||
<title>数据选择</title>
|
||||
<link href="${pageContext.request.contextPath }/static/jquery-ztree/3.5.12/css/zTreeStyle/zTreeStyle.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="${pageContext.request.contextPath }/static/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/jquery-ztree/3.5.12/css/zTreeStyle/zTreeStyle.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var key, lastValue = "", nodeList = [], type = getQueryString("type", "${url}");
|
||||
var tree, setting = {view:{selectedMulti:false,dblClickExpand:false},check:{enable:"${checked}",nocheckInherit:true},
|
||||
|
||||
@@ -1042,7 +1042,8 @@ th {
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*:before,
|
||||
*:after {
|
||||
|
||||
@@ -1,2 +1,14 @@
|
||||
@charset "utf-8";*:focus{outline:0}.jbox-fade{background-color:#ccc}.jbox-drag{border:1px dashed #376ea5}div.jbox{padding:0;border:0;font-size:12px}div.jbox .jbox-border{background:none repeat scroll 0 0 #999;filter:alpha(opacity=20);-moz-opacity:.2;opacity:.2}div.jbox .jbox-container{background-color:#fff;border:1px solid #999}div.jbox .jbox-title-panel{background:#fff;border-bottom:1px solid #ccc;padding:8px 15px}div.jbox .jbox-title{font-weight:bold;color:#333;font-size:18px;line-height:27px;padding-top:0}div.jbox .jbox-title-icon{background:url(images/jbox-title-icon.gif) no-repeat scroll 3px 5px transparent}div.jbox .jbox-close,div.jbox .jbox-close-hover{background:url(images/jbox-close.gif) no-repeat scroll 0 0 transparent;margin:7px}div.jbox .jbox-close-hover{background-position:-16px 0}div.jbox .jbox-content{min-height:24px;line-height:18px;color:#444}div.jbox .jbox-content-loading{background-color:#e6e6e6}div.jbox .jbox-content-loading-image{background:url(images/jbox-content-loading.gif) no-repeat bottom center}div.jbox .jbox-button-panel{border-top:1px solid #ccc;background-color:#eee}div.jbox .jbox-bottom-text{text-indent:10px;color:#444}div.jbox .jbox-button{background:url(images/jbox-button1.png) repeat-x transparent;border:#aaa 1px solid;color:#888;border-radius:3px 3px 3px 3px;margin:1px 7px 0 0;height:22px;cursor:default}div.jbox .jbox-button-hover{background-position:0 -20px;color:#666}div.jbox .jbox-button-active{background-position:0 -40px}div.jbox-warning .jbox .jbox-button-panel{background-color:#fff}div.jbox .jbox-tip-color{background-color:#376ea5;border-color:#376ea5;border-radius:3px 3px 3px 3px;color:#fff}div.jbox span.jbox-icon{background:url(images/jbox-icons.png) no-repeat scroll 0 0 transparent;_background:url(images/jbox-icons-ie6.gif) no-repeat scroll 0 0 transparent}div.jbox span.jbox-icon-info{background-position:0 0}div.jbox span.jbox-icon-question{background-position:-36px 0}div.jbox span.jbox-icon-success{background-position:-72px 0}div.jbox span.jbox-icon-warning{background-position:-108px 0}
|
||||
div.jbox span.jbox-icon-error{background-position:-144px 0}div.jbox span.jbox-icon-none{display:none;overflow:hidden}div.jbox span.jbox-icon-loading{background:url(images/jbox-loading1.gif) no-repeat scroll 0 0 transparent}
|
||||
@charset "utf-8";*:focus{outline:0}.jbox-fade{background-color:#ccc}.jbox-drag{border:1px dashed #376ea5}div.jbox{padding:0;border:0;font-size:12px}div.jbox .jbox-border{background:none repeat scroll 0 0 #999;filter:alpha(opacity=20);-moz-opacity:.2;opacity:.2}div.jbox .jbox-container{background-color:#fff;border:1px solid #999}div.jbox .jbox-title-panel{background:#fff;border-bottom:1px solid #ccc;padding:8px 15px}div.jbox .jbox-title{font-weight:bold;color:#333;font-size:18px;line-height:27px;padding-top:0}div.jbox .jbox-title-icon{background:url(images/jbox-title-icon.gif) no-repeat scroll 3px 5px transparent}div.jbox .jbox-close,div.jbox .jbox-close-hover{background:url(images/jbox-close.gif) no-repeat scroll 0 0 transparent;margin:7px}div.jbox .jbox-close-hover{background-position:-16px 0}div.jbox .jbox-content{min-height:24px;line-height:18px;color:#444}div.jbox .jbox-content-loading{background-color:#e6e6e6}div.jbox .jbox-content-loading-image{background:url(images/jbox-content-loading.gif) no-repeat bottom center}div.jbox .jbox-button-panel{border-top:1px solid #ccc;background-color:#eee}div.jbox .jbox-bottom-text{text-indent:10px;color:#444}div.jbox .jbox-button{background:url(images/jbox-button1.png) repeat-x transparent;border:#aaa 1px solid;color:#888;border-radius:3px 3px 3px 3px;margin:1px 7px 0 0;height:20px;cursor:default}div.jbox .jbox-button-hover{background-position:0 -20px;color:#666}div.jbox .jbox-button-active{background-position:0 -40px}div.jbox-warning .jbox .jbox-button-panel{background-color:#fff}div.jbox .jbox-tip-color{background-color:#376ea5;border-color:#376ea5;border-radius:3px 3px 3px 3px;color:#fff}div.jbox span.jbox-icon{background:url(images/jbox-icons.png) no-repeat scroll 0 0 transparent;_background:url(images/jbox-icons-ie6.gif) no-repeat scroll 0 0 transparent}div.jbox span.jbox-icon-info{background-position:0 0}div.jbox span.jbox-icon-question{background-position:-36px 0}div.jbox span.jbox-icon-success{background-position:-72px 0}div.jbox span.jbox-icon-warning{background-position:-108px 0}
|
||||
div.jbox span.jbox-icon-error{background-position:-144px 0}div.jbox span.jbox-icon-none{display:none;overflow:hidden}div.jbox span.jbox-icon-loading{background:url(images/jbox-loading1.gif) no-repeat scroll 0 0 transparent}
|
||||
|
||||
.jbox-container *{
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.jbox-container *:before,
|
||||
.jbox-container *:after {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
300
src/main/webapp/static/global/scripts/jeesite.js
Normal file
300
src/main/webapp/static/global/scripts/jeesite.js
Normal file
@@ -0,0 +1,300 @@
|
||||
/*!
|
||||
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
|
||||
*
|
||||
* 通用公共方法
|
||||
* @author ThinkGem
|
||||
* @version 2014-4-29
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
try{
|
||||
// 链接去掉虚框
|
||||
$("a").bind("focus",function() {
|
||||
if(this.blur) {this.blur()};
|
||||
});
|
||||
//所有下拉框使用select2 - 排除class为noSelect2的<select>元素
|
||||
$("select:not(.noSelect2)").select2();
|
||||
|
||||
|
||||
|
||||
}catch(e){
|
||||
// blank
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function getContextPath() {
|
||||
var pathName = window.location.pathname;
|
||||
var index = pathName.substring(1).indexOf("/");
|
||||
var result = pathName.substring(0,index+1);
|
||||
return result;
|
||||
}
|
||||
|
||||
function getProjectPath() {
|
||||
var pathName = window.location.pathname;
|
||||
var pathNames = pathName.substring(1).split("/");
|
||||
var result = "/"+pathNames[0]+"/"+pathNames[1];
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// 引入js和css文件
|
||||
function include(id, path, file){
|
||||
if (document.getElementById(id)==null){
|
||||
var files = typeof file == "string" ? [file] : file;
|
||||
for (var i = 0; i < files.length; i++){
|
||||
var name = files[i].replace(/^\s|\s$/g, "");
|
||||
var att = name.split('.');
|
||||
var ext = att[att.length - 1].toLowerCase();
|
||||
var isCSS = ext == "css";
|
||||
var tag = isCSS ? "link" : "script";
|
||||
var attr = isCSS ? " type='text/css' rel='stylesheet' " : " type='text/javascript' ";
|
||||
var link = (isCSS ? "href" : "src") + "='" + path + name + "'";
|
||||
document.write("<" + tag + (i==0?" id="+id:"") + attr + link + "></" + tag + ">");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取URL地址参数
|
||||
function getQueryString(name, url) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
if (!url || url == ""){
|
||||
url = window.location.search;
|
||||
}else{
|
||||
url = url.substring(url.indexOf("?"));
|
||||
}
|
||||
r = url.substr(1).match(reg)
|
||||
if (r != null) return unescape(r[2]); return null;
|
||||
}
|
||||
|
||||
//获取字典标签
|
||||
function getDictLabel(data, value, defaultValue){
|
||||
for (var i=0; i<data.length; i++){
|
||||
var row = data[i];
|
||||
if (row.itemCode == value){
|
||||
return row.itemValue;
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
// 打开一个窗体
|
||||
function windowOpen(url, name, width, height){
|
||||
var top=parseInt((window.screen.height-height)/2,10),left=parseInt((window.screen.width-width)/2,10),
|
||||
options="location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,"+
|
||||
"resizable=yes,scrollbars=yes,"+"width="+width+",height="+height+",top="+top+",left="+left;
|
||||
window.open(url ,name , options);
|
||||
}
|
||||
|
||||
// 恢复提示框显示
|
||||
function resetTip(){
|
||||
top.$.jBox.tip.mess = null;
|
||||
}
|
||||
|
||||
// 关闭提示框
|
||||
function closeTip(){
|
||||
top.$.jBox.closeTip();
|
||||
}
|
||||
|
||||
//显示提示框
|
||||
function showTip(mess, type, timeout, lazytime){
|
||||
resetTip();
|
||||
setTimeout(function(){
|
||||
top.$.jBox.tip(mess, (type == undefined || type == '' ? 'info' : type), {opacity:0,
|
||||
timeout: timeout == undefined ? 2000 : timeout});
|
||||
}, lazytime == undefined ? 500 : lazytime);
|
||||
}
|
||||
|
||||
// 显示加载框
|
||||
function loading(mess){
|
||||
if (mess == undefined || mess == ""){
|
||||
mess = "正在提交,请稍等...";
|
||||
}
|
||||
resetTip();
|
||||
top.$.jBox.tip(mess,'loading',{opacity:0});
|
||||
}
|
||||
|
||||
// 警告对话框
|
||||
function alertx(mess, closed){
|
||||
top.$.jBox.info(mess, '提示', {closed:function(){
|
||||
if (typeof closed == 'function') {
|
||||
closed();
|
||||
}
|
||||
}});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}
|
||||
|
||||
// 确认对话框
|
||||
function confirmx(mess, href, closed){
|
||||
top.$.jBox.confirm(mess,'系统提示',function(v,h,f){
|
||||
if(v=='ok'){
|
||||
if (typeof href == 'function') {
|
||||
href();
|
||||
}else{
|
||||
resetTip(); //loading();
|
||||
location = href;
|
||||
}
|
||||
}
|
||||
},{buttonsFocus:1, closed:function(){
|
||||
if (typeof closed == 'function') {
|
||||
closed();
|
||||
}
|
||||
}});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 提示输入对话框
|
||||
function promptx(title, lable, href, closed){
|
||||
top.$.jBox("<div class='form-search' style='padding:20px;text-align:center;'>" + lable + ":<input type='text' id='txt' name='txt'/></div>", {
|
||||
title: title, submit: function (v, h, f){
|
||||
if (f.txt == '') {
|
||||
top.$.jBox.tip("请输入" + lable + "。", 'error');
|
||||
return false;
|
||||
}
|
||||
if (typeof href == 'function') {
|
||||
href();
|
||||
}else{
|
||||
resetTip(); //loading();
|
||||
location = href + encodeURIComponent(f.txt);
|
||||
}
|
||||
},closed:function(){
|
||||
if (typeof closed == 'function') {
|
||||
closed();
|
||||
}
|
||||
}});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 添加TAB页面
|
||||
function addTabPage(title, url, closeable, $this, refresh){
|
||||
top.$.fn.jerichoTab.addTab({
|
||||
tabFirer: $this,
|
||||
title: title,
|
||||
closeable: closeable == undefined,
|
||||
data: {
|
||||
dataType: 'iframe',
|
||||
dataLink: url
|
||||
}
|
||||
}).loadData(refresh != undefined);
|
||||
}
|
||||
|
||||
// cookie操作
|
||||
function cookie(name, value, options) {
|
||||
if (typeof value != 'undefined') { // name and value given, set cookie
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
var path = options.path ? '; path=' + options.path : '';
|
||||
var domain = options.domain ? '; domain=' + options.domain : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else { // only name given, get cookie
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
}
|
||||
|
||||
// 数值前补零
|
||||
function pad(num, n) {
|
||||
var len = num.toString().length;
|
||||
while(len < n) {
|
||||
num = "0" + num;
|
||||
len++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// 转换为日期
|
||||
function strToDate(date){
|
||||
return new Date(date.replace(/-/g,"/"));
|
||||
}
|
||||
|
||||
// 日期加减
|
||||
function addDate(date, dadd){
|
||||
date = date.valueOf();
|
||||
date = date + dadd * 24 * 60 * 60 * 1000;
|
||||
return new Date(date);
|
||||
}
|
||||
|
||||
//截取字符串,区别汉字和英文
|
||||
function abbr(name, maxLength){
|
||||
if(!maxLength){
|
||||
maxLength = 20;
|
||||
}
|
||||
if(name==null||name.length<1){
|
||||
return "";
|
||||
}
|
||||
var w = 0;//字符串长度,一个汉字长度为2
|
||||
var s = 0;//汉字个数
|
||||
var p = false;//判断字符串当前循环的前一个字符是否为汉字
|
||||
var b = false;//判断字符串当前循环的字符是否为汉字
|
||||
var nameSub;
|
||||
for (var i=0; i<name.length; i++) {
|
||||
if(i>1 && b==false){
|
||||
p = false;
|
||||
}
|
||||
if(i>1 && b==true){
|
||||
p = true;
|
||||
}
|
||||
var c = name.charCodeAt(i);
|
||||
//单字节加1
|
||||
if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {
|
||||
w++;
|
||||
b = false;
|
||||
}else {
|
||||
w+=2;
|
||||
s++;
|
||||
b = true;
|
||||
}
|
||||
if(w>maxLength && i<=name.length-1){
|
||||
if(b==true && p==true){
|
||||
nameSub = name.substring(0,i-2)+"...";
|
||||
}
|
||||
if(b==false && p==false){
|
||||
nameSub = name.substring(0,i-3)+"...";
|
||||
}
|
||||
if(b==true && p==false){
|
||||
nameSub = name.substring(0,i-2)+"...";
|
||||
}
|
||||
if(p==true){
|
||||
nameSub = name.substring(0,i-2)+"...";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(w<=maxLength){
|
||||
return name;
|
||||
}
|
||||
return nameSub;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1626,10 +1626,12 @@
|
||||
.page-full-width .page-content {
|
||||
margin-left:0!important
|
||||
}
|
||||
|
||||
@media (min-width:992px) {
|
||||
.page-content-wrapper {
|
||||
float:left;
|
||||
width:100%
|
||||
width:100%;
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
.page-content-wrapper .page-content {
|
||||
margin-left:235px;
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
Boby
|
||||
****/
|
||||
body {
|
||||
background-color: #3d3d3d;
|
||||
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user