This commit is contained in:
322
WebRoot/js/easyui-1.3.5/plugins/jquery.accordion.js
Normal file
322
WebRoot/js/easyui-1.3.5/plugins/jquery.accordion.js
Normal file
@@ -0,0 +1,322 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"accordion");
|
||||
var _4=_3.options;
|
||||
var _5=_3.panels;
|
||||
var cc=$(_2);
|
||||
_4.fit?$.extend(_4,cc._fit()):cc._fit(false);
|
||||
if(!isNaN(_4.width)){
|
||||
cc._outerWidth(_4.width);
|
||||
}else{
|
||||
cc.css("width","");
|
||||
}
|
||||
var _6=0;
|
||||
var _7="auto";
|
||||
var _8=cc.find(">div.panel>div.accordion-header");
|
||||
if(_8.length){
|
||||
_6=$(_8[0]).css("height","")._outerHeight();
|
||||
}
|
||||
if(!isNaN(_4.height)){
|
||||
cc._outerHeight(_4.height);
|
||||
_7=cc.height()-_6*_8.length;
|
||||
}else{
|
||||
cc.css("height","");
|
||||
}
|
||||
_9(true,_7-_9(false)+1);
|
||||
function _9(_a,_b){
|
||||
var _c=0;
|
||||
for(var i=0;i<_5.length;i++){
|
||||
var p=_5[i];
|
||||
var h=p.panel("header")._outerHeight(_6);
|
||||
if(p.panel("options").collapsible==_a){
|
||||
var _d=isNaN(_b)?undefined:(_b+_6*h.length);
|
||||
p.panel("resize",{width:cc.width(),height:(_a?_d:undefined)});
|
||||
_c+=p.panel("panel").outerHeight()-_6;
|
||||
}
|
||||
}
|
||||
return _c;
|
||||
};
|
||||
};
|
||||
function _e(_f,_10,_11,all){
|
||||
var _12=$.data(_f,"accordion").panels;
|
||||
var pp=[];
|
||||
for(var i=0;i<_12.length;i++){
|
||||
var p=_12[i];
|
||||
if(_10){
|
||||
if(p.panel("options")[_10]==_11){
|
||||
pp.push(p);
|
||||
}
|
||||
}else{
|
||||
if(p[0]==$(_11)[0]){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_10){
|
||||
return all?pp:(pp.length?pp[0]:null);
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
function _13(_14){
|
||||
return _e(_14,"collapsed",false,true);
|
||||
};
|
||||
function _15(_16){
|
||||
var pp=_13(_16);
|
||||
return pp.length?pp[0]:null;
|
||||
};
|
||||
function _17(_18,_19){
|
||||
return _e(_18,null,_19);
|
||||
};
|
||||
function _1a(_1b,_1c){
|
||||
var _1d=$.data(_1b,"accordion").panels;
|
||||
if(typeof _1c=="number"){
|
||||
if(_1c<0||_1c>=_1d.length){
|
||||
return null;
|
||||
}else{
|
||||
return _1d[_1c];
|
||||
}
|
||||
}
|
||||
return _e(_1b,"title",_1c);
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"accordion").options;
|
||||
var cc=$(_1f);
|
||||
if(_20.border){
|
||||
cc.removeClass("accordion-noborder");
|
||||
}else{
|
||||
cc.addClass("accordion-noborder");
|
||||
}
|
||||
};
|
||||
function _21(_22){
|
||||
var _23=$.data(_22,"accordion");
|
||||
var cc=$(_22);
|
||||
cc.addClass("accordion");
|
||||
_23.panels=[];
|
||||
cc.children("div").each(function(){
|
||||
var _24=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
var pp=$(this);
|
||||
_23.panels.push(pp);
|
||||
_27(_22,pp,_24);
|
||||
});
|
||||
cc.bind("_resize",function(e,_25){
|
||||
var _26=$.data(_22,"accordion").options;
|
||||
if(_26.fit==true||_25){
|
||||
_1(_22);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _27(_28,pp,_29){
|
||||
var _2a=$.data(_28,"accordion").options;
|
||||
pp.panel($.extend({},{collapsible:true,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:true,headerCls:"accordion-header",bodyCls:"accordion-body"},_29,{onBeforeExpand:function(){
|
||||
if(_29.onBeforeExpand){
|
||||
if(_29.onBeforeExpand.call(this)==false){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!_2a.multiple){
|
||||
var all=$.grep(_13(_28),function(p){
|
||||
return p.panel("options").collapsible;
|
||||
});
|
||||
for(var i=0;i<all.length;i++){
|
||||
_35(_28,_17(_28,all[i]));
|
||||
}
|
||||
}
|
||||
var _2b=$(this).panel("header");
|
||||
_2b.addClass("accordion-header-selected");
|
||||
_2b.find(".accordion-collapse").removeClass("accordion-expand");
|
||||
},onExpand:function(){
|
||||
if(_29.onExpand){
|
||||
_29.onExpand.call(this);
|
||||
}
|
||||
_2a.onSelect.call(_28,$(this).panel("options").title,_17(_28,this));
|
||||
},onBeforeCollapse:function(){
|
||||
if(_29.onBeforeCollapse){
|
||||
if(_29.onBeforeCollapse.call(this)==false){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var _2c=$(this).panel("header");
|
||||
_2c.removeClass("accordion-header-selected");
|
||||
_2c.find(".accordion-collapse").addClass("accordion-expand");
|
||||
},onCollapse:function(){
|
||||
if(_29.onCollapse){
|
||||
_29.onCollapse.call(this);
|
||||
}
|
||||
_2a.onUnselect.call(_28,$(this).panel("options").title,_17(_28,this));
|
||||
}}));
|
||||
var _2d=pp.panel("header");
|
||||
var _2e=_2d.children("div.panel-tool");
|
||||
_2e.children("a.panel-tool-collapse").hide();
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").addClass("accordion-collapse accordion-expand").appendTo(_2e);
|
||||
t.bind("click",function(){
|
||||
var _2f=_17(_28,pp);
|
||||
if(pp.panel("options").collapsed){
|
||||
_30(_28,_2f);
|
||||
}else{
|
||||
_35(_28,_2f);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
pp.panel("options").collapsible?t.show():t.hide();
|
||||
_2d.click(function(){
|
||||
$(this).find("a.accordion-collapse:visible").triggerHandler("click");
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _30(_31,_32){
|
||||
var p=_1a(_31,_32);
|
||||
if(!p){
|
||||
return;
|
||||
}
|
||||
_33(_31);
|
||||
var _34=$.data(_31,"accordion").options;
|
||||
p.panel("expand",_34.animate);
|
||||
};
|
||||
function _35(_36,_37){
|
||||
var p=_1a(_36,_37);
|
||||
if(!p){
|
||||
return;
|
||||
}
|
||||
_33(_36);
|
||||
var _38=$.data(_36,"accordion").options;
|
||||
p.panel("collapse",_38.animate);
|
||||
};
|
||||
function _39(_3a){
|
||||
var _3b=$.data(_3a,"accordion").options;
|
||||
var p=_e(_3a,"selected",true);
|
||||
if(p){
|
||||
_3c(_17(_3a,p));
|
||||
}else{
|
||||
_3c(_3b.selected);
|
||||
}
|
||||
function _3c(_3d){
|
||||
var _3e=_3b.animate;
|
||||
_3b.animate=false;
|
||||
_30(_3a,_3d);
|
||||
_3b.animate=_3e;
|
||||
};
|
||||
};
|
||||
function _33(_3f){
|
||||
var _40=$.data(_3f,"accordion").panels;
|
||||
for(var i=0;i<_40.length;i++){
|
||||
_40[i].stop(true,true);
|
||||
}
|
||||
};
|
||||
function add(_41,_42){
|
||||
var _43=$.data(_41,"accordion");
|
||||
var _44=_43.options;
|
||||
var _45=_43.panels;
|
||||
if(_42.selected==undefined){
|
||||
_42.selected=true;
|
||||
}
|
||||
_33(_41);
|
||||
var pp=$("<div></div>").appendTo(_41);
|
||||
_45.push(pp);
|
||||
_27(_41,pp,_42);
|
||||
_1(_41);
|
||||
_44.onAdd.call(_41,_42.title,_45.length-1);
|
||||
if(_42.selected){
|
||||
_30(_41,_45.length-1);
|
||||
}
|
||||
};
|
||||
function _46(_47,_48){
|
||||
var _49=$.data(_47,"accordion");
|
||||
var _4a=_49.options;
|
||||
var _4b=_49.panels;
|
||||
_33(_47);
|
||||
var _4c=_1a(_47,_48);
|
||||
var _4d=_4c.panel("options").title;
|
||||
var _4e=_17(_47,_4c);
|
||||
if(!_4c){
|
||||
return;
|
||||
}
|
||||
if(_4a.onBeforeRemove.call(_47,_4d,_4e)==false){
|
||||
return;
|
||||
}
|
||||
_4b.splice(_4e,1);
|
||||
_4c.panel("destroy");
|
||||
if(_4b.length){
|
||||
_1(_47);
|
||||
var _4f=_15(_47);
|
||||
if(!_4f){
|
||||
_30(_47,0);
|
||||
}
|
||||
}
|
||||
_4a.onRemove.call(_47,_4d,_4e);
|
||||
};
|
||||
$.fn.accordion=function(_50,_51){
|
||||
if(typeof _50=="string"){
|
||||
return $.fn.accordion.methods[_50](this,_51);
|
||||
}
|
||||
_50=_50||{};
|
||||
return this.each(function(){
|
||||
var _52=$.data(this,"accordion");
|
||||
if(_52){
|
||||
$.extend(_52.options,_50);
|
||||
}else{
|
||||
$.data(this,"accordion",{options:$.extend({},$.fn.accordion.defaults,$.fn.accordion.parseOptions(this),_50),accordion:$(this).addClass("accordion"),panels:[]});
|
||||
_21(this);
|
||||
}
|
||||
_1e(this);
|
||||
_1(this);
|
||||
_39(this);
|
||||
});
|
||||
};
|
||||
$.fn.accordion.methods={options:function(jq){
|
||||
return $.data(jq[0],"accordion").options;
|
||||
},panels:function(jq){
|
||||
return $.data(jq[0],"accordion").panels;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_1(this);
|
||||
});
|
||||
},getSelections:function(jq){
|
||||
return _13(jq[0]);
|
||||
},getSelected:function(jq){
|
||||
return _15(jq[0]);
|
||||
},getPanel:function(jq,_53){
|
||||
return _1a(jq[0],_53);
|
||||
},getPanelIndex:function(jq,_54){
|
||||
return _17(jq[0],_54);
|
||||
},select:function(jq,_55){
|
||||
return jq.each(function(){
|
||||
_30(this,_55);
|
||||
});
|
||||
},unselect:function(jq,_56){
|
||||
return jq.each(function(){
|
||||
_35(this,_56);
|
||||
});
|
||||
},add:function(jq,_57){
|
||||
return jq.each(function(){
|
||||
add(this,_57);
|
||||
});
|
||||
},remove:function(jq,_58){
|
||||
return jq.each(function(){
|
||||
_46(this,_58);
|
||||
});
|
||||
}};
|
||||
$.fn.accordion.parseOptions=function(_59){
|
||||
var t=$(_59);
|
||||
return $.extend({},$.parser.parseOptions(_59,["width","height",{fit:"boolean",border:"boolean",animate:"boolean",multiple:"boolean",selected:"number"}]));
|
||||
};
|
||||
$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,multiple:false,selected:0,onSelect:function(_5a,_5b){
|
||||
},onUnselect:function(_5c,_5d){
|
||||
},onAdd:function(_5e,_5f){
|
||||
},onBeforeRemove:function(_60,_61){
|
||||
},onRemove:function(_62,_63){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
304
WebRoot/js/easyui-1.3.5/plugins/jquery.calendar.js
Normal file
304
WebRoot/js/easyui-1.3.5/plugins/jquery.calendar.js
Normal file
@@ -0,0 +1,304 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"calendar").options;
|
||||
var t=$(_2);
|
||||
_3.fit?$.extend(_3,t._fit()):t._fit(false);
|
||||
var _4=t.find(".calendar-header");
|
||||
t._outerWidth(_3.width);
|
||||
t._outerHeight(_3.height);
|
||||
t.find(".calendar-body")._outerHeight(t.height()-_4._outerHeight());
|
||||
};
|
||||
function _5(_6){
|
||||
$(_6).addClass("calendar").html("<div class=\"calendar-header\">"+"<div class=\"calendar-prevmonth\"></div>"+"<div class=\"calendar-nextmonth\"></div>"+"<div class=\"calendar-prevyear\"></div>"+"<div class=\"calendar-nextyear\"></div>"+"<div class=\"calendar-title\">"+"<span>Aprial 2010</span>"+"</div>"+"</div>"+"<div class=\"calendar-body\">"+"<div class=\"calendar-menu\">"+"<div class=\"calendar-menu-year-inner\">"+"<span class=\"calendar-menu-prev\"></span>"+"<span><input class=\"calendar-menu-year\" type=\"text\"></input></span>"+"<span class=\"calendar-menu-next\"></span>"+"</div>"+"<div class=\"calendar-menu-month-inner\">"+"</div>"+"</div>"+"</div>");
|
||||
$(_6).find(".calendar-title span").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
}).click(function(){
|
||||
var _7=$(_6).find(".calendar-menu");
|
||||
if(_7.is(":visible")){
|
||||
_7.hide();
|
||||
}else{
|
||||
_14(_6);
|
||||
}
|
||||
});
|
||||
$(".calendar-prevmonth,.calendar-nextmonth,.calendar-prevyear,.calendar-nextyear",_6).hover(function(){
|
||||
$(this).addClass("calendar-nav-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-nav-hover");
|
||||
});
|
||||
$(_6).find(".calendar-nextmonth").click(function(){
|
||||
_9(_6,1);
|
||||
});
|
||||
$(_6).find(".calendar-prevmonth").click(function(){
|
||||
_9(_6,-1);
|
||||
});
|
||||
$(_6).find(".calendar-nextyear").click(function(){
|
||||
_f(_6,1);
|
||||
});
|
||||
$(_6).find(".calendar-prevyear").click(function(){
|
||||
_f(_6,-1);
|
||||
});
|
||||
$(_6).bind("_resize",function(){
|
||||
var _8=$.data(_6,"calendar").options;
|
||||
if(_8.fit==true){
|
||||
_1(_6);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _9(_a,_b){
|
||||
var _c=$.data(_a,"calendar").options;
|
||||
_c.month+=_b;
|
||||
if(_c.month>12){
|
||||
_c.year++;
|
||||
_c.month=1;
|
||||
}else{
|
||||
if(_c.month<1){
|
||||
_c.year--;
|
||||
_c.month=12;
|
||||
}
|
||||
}
|
||||
_d(_a);
|
||||
var _e=$(_a).find(".calendar-menu-month-inner");
|
||||
_e.find("td.calendar-selected").removeClass("calendar-selected");
|
||||
_e.find("td:eq("+(_c.month-1)+")").addClass("calendar-selected");
|
||||
};
|
||||
function _f(_10,_11){
|
||||
var _12=$.data(_10,"calendar").options;
|
||||
_12.year+=_11;
|
||||
_d(_10);
|
||||
var _13=$(_10).find(".calendar-menu-year");
|
||||
_13.val(_12.year);
|
||||
};
|
||||
function _14(_15){
|
||||
var _16=$.data(_15,"calendar").options;
|
||||
$(_15).find(".calendar-menu").show();
|
||||
if($(_15).find(".calendar-menu-month-inner").is(":empty")){
|
||||
$(_15).find(".calendar-menu-month-inner").empty();
|
||||
var t=$("<table></table>").appendTo($(_15).find(".calendar-menu-month-inner"));
|
||||
var idx=0;
|
||||
for(var i=0;i<3;i++){
|
||||
var tr=$("<tr></tr>").appendTo(t);
|
||||
for(var j=0;j<4;j++){
|
||||
$("<td class=\"calendar-menu-month\"></td>").html(_16.months[idx++]).attr("abbr",idx).appendTo(tr);
|
||||
}
|
||||
}
|
||||
$(_15).find(".calendar-menu-prev,.calendar-menu-next").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
});
|
||||
$(_15).find(".calendar-menu-next").click(function(){
|
||||
var y=$(_15).find(".calendar-menu-year");
|
||||
if(!isNaN(y.val())){
|
||||
y.val(parseInt(y.val())+1);
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-prev").click(function(){
|
||||
var y=$(_15).find(".calendar-menu-year");
|
||||
if(!isNaN(y.val())){
|
||||
y.val(parseInt(y.val()-1));
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-year").keypress(function(e){
|
||||
if(e.keyCode==13){
|
||||
_17();
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-month").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
}).click(function(){
|
||||
var _18=$(_15).find(".calendar-menu");
|
||||
_18.find(".calendar-selected").removeClass("calendar-selected");
|
||||
$(this).addClass("calendar-selected");
|
||||
_17();
|
||||
});
|
||||
}
|
||||
function _17(){
|
||||
var _19=$(_15).find(".calendar-menu");
|
||||
var _1a=_19.find(".calendar-menu-year").val();
|
||||
var _1b=_19.find(".calendar-selected").attr("abbr");
|
||||
if(!isNaN(_1a)){
|
||||
_16.year=parseInt(_1a);
|
||||
_16.month=parseInt(_1b);
|
||||
_d(_15);
|
||||
}
|
||||
_19.hide();
|
||||
};
|
||||
var _1c=$(_15).find(".calendar-body");
|
||||
var _1d=$(_15).find(".calendar-menu");
|
||||
var _1e=_1d.find(".calendar-menu-year-inner");
|
||||
var _1f=_1d.find(".calendar-menu-month-inner");
|
||||
_1e.find("input").val(_16.year).focus();
|
||||
_1f.find("td.calendar-selected").removeClass("calendar-selected");
|
||||
_1f.find("td:eq("+(_16.month-1)+")").addClass("calendar-selected");
|
||||
_1d._outerWidth(_1c._outerWidth());
|
||||
_1d._outerHeight(_1c._outerHeight());
|
||||
_1f._outerHeight(_1d.height()-_1e._outerHeight());
|
||||
};
|
||||
function _20(_21,_22,_23){
|
||||
var _24=$.data(_21,"calendar").options;
|
||||
var _25=[];
|
||||
var _26=new Date(_22,_23,0).getDate();
|
||||
for(var i=1;i<=_26;i++){
|
||||
_25.push([_22,_23,i]);
|
||||
}
|
||||
var _27=[],_28=[];
|
||||
var _29=-1;
|
||||
while(_25.length>0){
|
||||
var _2a=_25.shift();
|
||||
_28.push(_2a);
|
||||
var day=new Date(_2a[0],_2a[1]-1,_2a[2]).getDay();
|
||||
if(_29==day){
|
||||
day=0;
|
||||
}else{
|
||||
if(day==(_24.firstDay==0?7:_24.firstDay)-1){
|
||||
_27.push(_28);
|
||||
_28=[];
|
||||
}
|
||||
}
|
||||
_29=day;
|
||||
}
|
||||
if(_28.length){
|
||||
_27.push(_28);
|
||||
}
|
||||
var _2b=_27[0];
|
||||
if(_2b.length<7){
|
||||
while(_2b.length<7){
|
||||
var _2c=_2b[0];
|
||||
var _2a=new Date(_2c[0],_2c[1]-1,_2c[2]-1);
|
||||
_2b.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
}else{
|
||||
var _2c=_2b[0];
|
||||
var _28=[];
|
||||
for(var i=1;i<=7;i++){
|
||||
var _2a=new Date(_2c[0],_2c[1]-1,_2c[2]-i);
|
||||
_28.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
_27.unshift(_28);
|
||||
}
|
||||
var _2d=_27[_27.length-1];
|
||||
while(_2d.length<7){
|
||||
var _2e=_2d[_2d.length-1];
|
||||
var _2a=new Date(_2e[0],_2e[1]-1,_2e[2]+1);
|
||||
_2d.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
if(_27.length<6){
|
||||
var _2e=_2d[_2d.length-1];
|
||||
var _28=[];
|
||||
for(var i=1;i<=7;i++){
|
||||
var _2a=new Date(_2e[0],_2e[1]-1,_2e[2]+i);
|
||||
_28.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
_27.push(_28);
|
||||
}
|
||||
return _27;
|
||||
};
|
||||
function _d(_2f){
|
||||
var _30=$.data(_2f,"calendar").options;
|
||||
$(_2f).find(".calendar-title span").html(_30.months[_30.month-1]+" "+_30.year);
|
||||
var _31=$(_2f).find("div.calendar-body");
|
||||
_31.find(">table").remove();
|
||||
var t=$("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><thead></thead><tbody></tbody></table>").prependTo(_31);
|
||||
var tr=$("<tr></tr>").appendTo(t.find("thead"));
|
||||
for(var i=_30.firstDay;i<_30.weeks.length;i++){
|
||||
tr.append("<th>"+_30.weeks[i]+"</th>");
|
||||
}
|
||||
for(var i=0;i<_30.firstDay;i++){
|
||||
tr.append("<th>"+_30.weeks[i]+"</th>");
|
||||
}
|
||||
var _32=_20(_2f,_30.year,_30.month);
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _33=_32[i];
|
||||
var tr=$("<tr></tr>").appendTo(t.find("tbody"));
|
||||
for(var j=0;j<_33.length;j++){
|
||||
var day=_33[j];
|
||||
$("<td class=\"calendar-day calendar-other-month\"></td>").attr("abbr",day[0]+","+day[1]+","+day[2]).html(day[2]).appendTo(tr);
|
||||
}
|
||||
}
|
||||
t.find("td[abbr^=\""+_30.year+","+_30.month+"\"]").removeClass("calendar-other-month");
|
||||
var now=new Date();
|
||||
var _34=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate();
|
||||
t.find("td[abbr=\""+_34+"\"]").addClass("calendar-today");
|
||||
if(_30.current){
|
||||
t.find(".calendar-selected").removeClass("calendar-selected");
|
||||
var _35=_30.current.getFullYear()+","+(_30.current.getMonth()+1)+","+_30.current.getDate();
|
||||
t.find("td[abbr=\""+_35+"\"]").addClass("calendar-selected");
|
||||
}
|
||||
var _36=6-_30.firstDay;
|
||||
var _37=_36+1;
|
||||
if(_36>=7){
|
||||
_36-=7;
|
||||
}
|
||||
if(_37>=7){
|
||||
_37-=7;
|
||||
}
|
||||
t.find("tr").find("td:eq("+_36+")").addClass("calendar-saturday");
|
||||
t.find("tr").find("td:eq("+_37+")").addClass("calendar-sunday");
|
||||
t.find("td").hover(function(){
|
||||
$(this).addClass("calendar-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-hover");
|
||||
}).click(function(){
|
||||
t.find(".calendar-selected").removeClass("calendar-selected");
|
||||
$(this).addClass("calendar-selected");
|
||||
var _38=$(this).attr("abbr").split(",");
|
||||
_30.current=new Date(_38[0],parseInt(_38[1])-1,_38[2]);
|
||||
_30.onSelect.call(_2f,_30.current);
|
||||
});
|
||||
};
|
||||
$.fn.calendar=function(_39,_3a){
|
||||
if(typeof _39=="string"){
|
||||
return $.fn.calendar.methods[_39](this,_3a);
|
||||
}
|
||||
_39=_39||{};
|
||||
return this.each(function(){
|
||||
var _3b=$.data(this,"calendar");
|
||||
if(_3b){
|
||||
$.extend(_3b.options,_39);
|
||||
}else{
|
||||
_3b=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,$.fn.calendar.parseOptions(this),_39)});
|
||||
_5(this);
|
||||
}
|
||||
if(_3b.options.border==false){
|
||||
$(this).addClass("calendar-noborder");
|
||||
}
|
||||
_1(this);
|
||||
_d(this);
|
||||
$(this).find("div.calendar-menu").hide();
|
||||
});
|
||||
};
|
||||
$.fn.calendar.methods={options:function(jq){
|
||||
return $.data(jq[0],"calendar").options;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_1(this);
|
||||
});
|
||||
},moveTo:function(jq,_3c){
|
||||
return jq.each(function(){
|
||||
$(this).calendar({year:_3c.getFullYear(),month:_3c.getMonth()+1,current:_3c});
|
||||
});
|
||||
}};
|
||||
$.fn.calendar.parseOptions=function(_3d){
|
||||
var t=$(_3d);
|
||||
return $.extend({},$.parser.parseOptions(_3d,["width","height",{firstDay:"number",fit:"boolean",border:"boolean"}]));
|
||||
};
|
||||
$.fn.calendar.defaults={width:180,height:180,fit:false,border:true,firstDay:0,weeks:["S","M","T","W","T","F","S"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date(),onSelect:function(_3e){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
453
WebRoot/js/easyui-1.3.5/plugins/jquery.combo.js
Normal file
453
WebRoot/js/easyui-1.3.5/plugins/jquery.combo.js
Normal file
@@ -0,0 +1,453 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
var _4=$.data(_2,"combo");
|
||||
var _5=_4.options;
|
||||
var _6=_4.combo;
|
||||
var _7=_4.panel;
|
||||
if(_3){
|
||||
_5.width=_3;
|
||||
}
|
||||
if(isNaN(_5.width)){
|
||||
var c=$(_2).clone();
|
||||
c.css("visibility","hidden");
|
||||
c.appendTo("body");
|
||||
_5.width=c.outerWidth();
|
||||
c.remove();
|
||||
}
|
||||
_6.appendTo("body");
|
||||
var _8=_6.find("input.combo-text");
|
||||
var _9=_6.find(".combo-arrow");
|
||||
var _a=_5.hasDownArrow?_9._outerWidth():0;
|
||||
_6._outerWidth(_5.width)._outerHeight(_5.height);
|
||||
_8._outerWidth(_6.width()-_a);
|
||||
_8.css({height:_6.height()+"px",lineHeight:_6.height()+"px"});
|
||||
_9._outerHeight(_6.height());
|
||||
_7.panel("resize",{width:(_5.panelWidth?_5.panelWidth:_6.outerWidth()),height:_5.panelHeight});
|
||||
_6.insertAfter(_2);
|
||||
};
|
||||
function _b(_c){
|
||||
$(_c).addClass("combo-f").hide();
|
||||
var _d=$("<span class=\"combo\">"+"<input type=\"text\" class=\"combo-text\" autocomplete=\"off\">"+"<span><span class=\"combo-arrow\"></span></span>"+"<input type=\"hidden\" class=\"combo-value\">"+"</span>").insertAfter(_c);
|
||||
var _e=$("<div class=\"combo-panel\"></div>").appendTo("body");
|
||||
_e.panel({doSize:false,closed:true,cls:"combo-p",style:{position:"absolute",zIndex:10},onOpen:function(){
|
||||
$(this).panel("resize");
|
||||
},onClose:function(){
|
||||
var _f=$.data(_c,"combo");
|
||||
if(_f){
|
||||
_f.options.onHidePanel.call(_c);
|
||||
}
|
||||
}});
|
||||
var _10=$(_c).attr("name");
|
||||
if(_10){
|
||||
_d.find("input.combo-value").attr("name",_10);
|
||||
$(_c).removeAttr("name").attr("comboName",_10);
|
||||
}
|
||||
return {combo:_d,panel:_e};
|
||||
};
|
||||
function _11(_12){
|
||||
var _13=$.data(_12,"combo");
|
||||
var _14=_13.options;
|
||||
var _15=_13.combo;
|
||||
if(_14.hasDownArrow){
|
||||
_15.find(".combo-arrow").show();
|
||||
}else{
|
||||
_15.find(".combo-arrow").hide();
|
||||
}
|
||||
_16(_12,_14.disabled);
|
||||
_17(_12,_14.readonly);
|
||||
};
|
||||
function _18(_19){
|
||||
var _1a=$.data(_19,"combo");
|
||||
var _1b=_1a.combo.find("input.combo-text");
|
||||
_1b.validatebox("destroy");
|
||||
_1a.panel.panel("destroy");
|
||||
_1a.combo.remove();
|
||||
$(_19).remove();
|
||||
};
|
||||
function _1c(_1d){
|
||||
$(_1d).find(".combo-f").each(function(){
|
||||
var p=$(this).combo("panel");
|
||||
if(p.is(":visible")){
|
||||
p.panel("close");
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"combo");
|
||||
var _21=_20.options;
|
||||
var _22=_20.panel;
|
||||
var _23=_20.combo;
|
||||
var _24=_23.find(".combo-text");
|
||||
var _25=_23.find(".combo-arrow");
|
||||
$(document).unbind(".combo").bind("mousedown.combo",function(e){
|
||||
var p=$(e.target).closest("span.combo,div.combo-p");
|
||||
if(p.length){
|
||||
_1c(p);
|
||||
return;
|
||||
}
|
||||
$("body>div.combo-p>div.combo-panel:visible").panel("close");
|
||||
});
|
||||
_24.unbind(".combo");
|
||||
_25.unbind(".combo");
|
||||
if(!_21.disabled&&!_21.readonly){
|
||||
_24.bind("click.combo",function(e){
|
||||
if(!_21.editable){
|
||||
_26.call(this);
|
||||
}else{
|
||||
var p=$(this).closest("div.combo-panel");
|
||||
$("div.combo-panel:visible").not(_22).not(p).panel("close");
|
||||
}
|
||||
}).bind("keydown.combo",function(e){
|
||||
switch(e.keyCode){
|
||||
case 38:
|
||||
_21.keyHandler.up.call(_1f,e);
|
||||
break;
|
||||
case 40:
|
||||
_21.keyHandler.down.call(_1f,e);
|
||||
break;
|
||||
case 37:
|
||||
_21.keyHandler.left.call(_1f,e);
|
||||
break;
|
||||
case 39:
|
||||
_21.keyHandler.right.call(_1f,e);
|
||||
break;
|
||||
case 13:
|
||||
e.preventDefault();
|
||||
_21.keyHandler.enter.call(_1f,e);
|
||||
return false;
|
||||
case 9:
|
||||
case 27:
|
||||
_27(_1f);
|
||||
break;
|
||||
default:
|
||||
if(_21.editable){
|
||||
if(_20.timer){
|
||||
clearTimeout(_20.timer);
|
||||
}
|
||||
_20.timer=setTimeout(function(){
|
||||
var q=_24.val();
|
||||
if(_20.previousValue!=q){
|
||||
_20.previousValue=q;
|
||||
$(_1f).combo("showPanel");
|
||||
_21.keyHandler.query.call(_1f,_24.val(),e);
|
||||
$(_1f).combo("validate");
|
||||
}
|
||||
},_21.delay);
|
||||
}
|
||||
}
|
||||
});
|
||||
_25.bind("click.combo",function(){
|
||||
_26.call(this);
|
||||
}).bind("mouseenter.combo",function(){
|
||||
$(this).addClass("combo-arrow-hover");
|
||||
}).bind("mouseleave.combo",function(){
|
||||
$(this).removeClass("combo-arrow-hover");
|
||||
});
|
||||
}
|
||||
function _26(){
|
||||
if(_22.is(":visible")){
|
||||
_1c(_22);
|
||||
_27(_1f);
|
||||
}else{
|
||||
var p=$(this).closest("div.combo-panel");
|
||||
$("div.combo-panel:visible").not(_22).not(p).panel("close");
|
||||
$(_1f).combo("showPanel");
|
||||
}
|
||||
_24.focus();
|
||||
};
|
||||
};
|
||||
function _28(_29){
|
||||
var _2a=$.data(_29,"combo").options;
|
||||
var _2b=$.data(_29,"combo").combo;
|
||||
var _2c=$.data(_29,"combo").panel;
|
||||
if($.fn.window){
|
||||
_2c.panel("panel").css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
_2c.panel("move",{left:_2b.offset().left,top:_2d()});
|
||||
if(_2c.panel("options").closed){
|
||||
_2c.panel("open");
|
||||
_2a.onShowPanel.call(_29);
|
||||
}
|
||||
(function(){
|
||||
if(_2c.is(":visible")){
|
||||
_2c.panel("move",{left:_2e(),top:_2d()});
|
||||
setTimeout(arguments.callee,200);
|
||||
}
|
||||
})();
|
||||
function _2e(){
|
||||
var _2f=_2b.offset().left;
|
||||
if(_2f+_2c._outerWidth()>$(window)._outerWidth()+$(document).scrollLeft()){
|
||||
_2f=$(window)._outerWidth()+$(document).scrollLeft()-_2c._outerWidth();
|
||||
}
|
||||
if(_2f<0){
|
||||
_2f=0;
|
||||
}
|
||||
return _2f;
|
||||
};
|
||||
function _2d(){
|
||||
var top=_2b.offset().top+_2b._outerHeight();
|
||||
if(top+_2c._outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=_2b.offset().top-_2c._outerHeight();
|
||||
}
|
||||
if(top<$(document).scrollTop()){
|
||||
top=_2b.offset().top+_2b._outerHeight();
|
||||
}
|
||||
return top;
|
||||
};
|
||||
};
|
||||
function _27(_30){
|
||||
var _31=$.data(_30,"combo").panel;
|
||||
_31.panel("close");
|
||||
};
|
||||
function _32(_33){
|
||||
var _34=$.data(_33,"combo").options;
|
||||
var _35=$(_33).combo("textbox");
|
||||
_35.validatebox($.extend({},_34,{deltaX:(_34.hasDownArrow?_34.deltaX:(_34.deltaX>0?1:-1))}));
|
||||
};
|
||||
function _16(_36,_37){
|
||||
var _38=$.data(_36,"combo");
|
||||
var _39=_38.options;
|
||||
var _3a=_38.combo;
|
||||
if(_37){
|
||||
_39.disabled=true;
|
||||
$(_36).attr("disabled",true);
|
||||
_3a.find(".combo-value").attr("disabled",true);
|
||||
_3a.find(".combo-text").attr("disabled",true);
|
||||
}else{
|
||||
_39.disabled=false;
|
||||
$(_36).removeAttr("disabled");
|
||||
_3a.find(".combo-value").removeAttr("disabled");
|
||||
_3a.find(".combo-text").removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
function _17(_3b,_3c){
|
||||
var _3d=$.data(_3b,"combo");
|
||||
var _3e=_3d.options;
|
||||
_3e.readonly=_3c==undefined?true:_3c;
|
||||
var _3f=_3e.readonly?true:(!_3e.editable);
|
||||
_3d.combo.find(".combo-text").attr("readonly",_3f).css("cursor",_3f?"pointer":"");
|
||||
};
|
||||
function _40(_41){
|
||||
var _42=$.data(_41,"combo");
|
||||
var _43=_42.options;
|
||||
var _44=_42.combo;
|
||||
if(_43.multiple){
|
||||
_44.find("input.combo-value").remove();
|
||||
}else{
|
||||
_44.find("input.combo-value").val("");
|
||||
}
|
||||
_44.find("input.combo-text").val("");
|
||||
};
|
||||
function _45(_46){
|
||||
var _47=$.data(_46,"combo").combo;
|
||||
return _47.find("input.combo-text").val();
|
||||
};
|
||||
function _48(_49,_4a){
|
||||
var _4b=$.data(_49,"combo");
|
||||
var _4c=_4b.combo.find("input.combo-text");
|
||||
if(_4c.val()!=_4a){
|
||||
_4c.val(_4a);
|
||||
$(_49).combo("validate");
|
||||
_4b.previousValue=_4a;
|
||||
}
|
||||
};
|
||||
function _4d(_4e){
|
||||
var _4f=[];
|
||||
var _50=$.data(_4e,"combo").combo;
|
||||
_50.find("input.combo-value").each(function(){
|
||||
_4f.push($(this).val());
|
||||
});
|
||||
return _4f;
|
||||
};
|
||||
function _51(_52,_53){
|
||||
var _54=$.data(_52,"combo").options;
|
||||
var _55=_4d(_52);
|
||||
var _56=$.data(_52,"combo").combo;
|
||||
_56.find("input.combo-value").remove();
|
||||
var _57=$(_52).attr("comboName");
|
||||
for(var i=0;i<_53.length;i++){
|
||||
var _58=$("<input type=\"hidden\" class=\"combo-value\">").appendTo(_56);
|
||||
if(_57){
|
||||
_58.attr("name",_57);
|
||||
}
|
||||
_58.val(_53[i]);
|
||||
}
|
||||
var tmp=[];
|
||||
for(var i=0;i<_55.length;i++){
|
||||
tmp[i]=_55[i];
|
||||
}
|
||||
var aa=[];
|
||||
for(var i=0;i<_53.length;i++){
|
||||
for(var j=0;j<tmp.length;j++){
|
||||
if(_53[i]==tmp[j]){
|
||||
aa.push(_53[i]);
|
||||
tmp.splice(j,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(aa.length!=_53.length||_53.length!=_55.length){
|
||||
if(_54.multiple){
|
||||
_54.onChange.call(_52,_53,_55);
|
||||
}else{
|
||||
_54.onChange.call(_52,_53[0],_55[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _59(_5a){
|
||||
var _5b=_4d(_5a);
|
||||
return _5b[0];
|
||||
};
|
||||
function _5c(_5d,_5e){
|
||||
_51(_5d,[_5e]);
|
||||
};
|
||||
function _5f(_60){
|
||||
var _61=$.data(_60,"combo").options;
|
||||
var fn=_61.onChange;
|
||||
_61.onChange=function(){
|
||||
};
|
||||
if(_61.multiple){
|
||||
if(_61.value){
|
||||
if(typeof _61.value=="object"){
|
||||
_51(_60,_61.value);
|
||||
}else{
|
||||
_5c(_60,_61.value);
|
||||
}
|
||||
}else{
|
||||
_51(_60,[]);
|
||||
}
|
||||
_61.originalValue=_4d(_60);
|
||||
}else{
|
||||
_5c(_60,_61.value);
|
||||
_61.originalValue=_61.value;
|
||||
}
|
||||
_61.onChange=fn;
|
||||
};
|
||||
$.fn.combo=function(_62,_63){
|
||||
if(typeof _62=="string"){
|
||||
var _64=$.fn.combo.methods[_62];
|
||||
if(_64){
|
||||
return _64(this,_63);
|
||||
}else{
|
||||
return this.each(function(){
|
||||
var _65=$(this).combo("textbox");
|
||||
_65.validatebox(_62,_63);
|
||||
});
|
||||
}
|
||||
}
|
||||
_62=_62||{};
|
||||
return this.each(function(){
|
||||
var _66=$.data(this,"combo");
|
||||
if(_66){
|
||||
$.extend(_66.options,_62);
|
||||
}else{
|
||||
var r=_b(this);
|
||||
_66=$.data(this,"combo",{options:$.extend({},$.fn.combo.defaults,$.fn.combo.parseOptions(this),_62),combo:r.combo,panel:r.panel,previousValue:null});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_11(this);
|
||||
_1(this);
|
||||
_1e(this);
|
||||
_32(this);
|
||||
_5f(this);
|
||||
});
|
||||
};
|
||||
$.fn.combo.methods={options:function(jq){
|
||||
return $.data(jq[0],"combo").options;
|
||||
},panel:function(jq){
|
||||
return $.data(jq[0],"combo").panel;
|
||||
},textbox:function(jq){
|
||||
return $.data(jq[0],"combo").combo.find("input.combo-text");
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_18(this);
|
||||
});
|
||||
},resize:function(jq,_67){
|
||||
return jq.each(function(){
|
||||
_1(this,_67);
|
||||
});
|
||||
},showPanel:function(jq){
|
||||
return jq.each(function(){
|
||||
_28(this);
|
||||
});
|
||||
},hidePanel:function(jq){
|
||||
return jq.each(function(){
|
||||
_27(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_16(this,true);
|
||||
_1e(this);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_16(this,false);
|
||||
_1e(this);
|
||||
});
|
||||
},readonly:function(jq,_68){
|
||||
return jq.each(function(){
|
||||
_17(this,_68);
|
||||
_1e(this);
|
||||
});
|
||||
},isValid:function(jq){
|
||||
var _69=$.data(jq[0],"combo").combo.find("input.combo-text");
|
||||
return _69.validatebox("isValid");
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
_40(this);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _6a=$.data(this,"combo").options;
|
||||
if(_6a.multiple){
|
||||
$(this).combo("setValues",_6a.originalValue);
|
||||
}else{
|
||||
$(this).combo("setValue",_6a.originalValue);
|
||||
}
|
||||
});
|
||||
},getText:function(jq){
|
||||
return _45(jq[0]);
|
||||
},setText:function(jq,_6b){
|
||||
return jq.each(function(){
|
||||
_48(this,_6b);
|
||||
});
|
||||
},getValues:function(jq){
|
||||
return _4d(jq[0]);
|
||||
},setValues:function(jq,_6c){
|
||||
return jq.each(function(){
|
||||
_51(this,_6c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return _59(jq[0]);
|
||||
},setValue:function(jq,_6d){
|
||||
return jq.each(function(){
|
||||
_5c(this,_6d);
|
||||
});
|
||||
}};
|
||||
$.fn.combo.parseOptions=function(_6e){
|
||||
var t=$(_6e);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_6e),$.parser.parseOptions(_6e,["width","height","separator",{panelWidth:"number",editable:"boolean",hasDownArrow:"boolean",delay:"number",selectOnNavigation:"boolean"}]),{panelHeight:(t.attr("panelHeight")=="auto"?"auto":parseInt(t.attr("panelHeight"))||undefined),multiple:(t.attr("multiple")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined),value:(t.val()||undefined)});
|
||||
};
|
||||
$.fn.combo.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,panelWidth:null,panelHeight:200,multiple:false,selectOnNavigation:true,separator:",",editable:true,disabled:false,readonly:false,hasDownArrow:true,value:"",delay:200,deltaX:19,keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
},query:function(q,e){
|
||||
}},onShowPanel:function(){
|
||||
},onHidePanel:function(){
|
||||
},onChange:function(_6f,_70){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
444
WebRoot/js/easyui-1.3.5/plugins/jquery.combobox.js
Normal file
444
WebRoot/js/easyui-1.3.5/plugins/jquery.combobox.js
Normal file
@@ -0,0 +1,444 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3,_4,_5){
|
||||
var _6=$.data(_2,"combobox");
|
||||
var _7=_6.options;
|
||||
if(_5){
|
||||
return _8(_6.groups,_4,_3);
|
||||
}else{
|
||||
return _8(_6.data,(_4?_4:_6.options.valueField),_3);
|
||||
}
|
||||
function _8(_9,_a,_b){
|
||||
for(var i=0;i<_9.length;i++){
|
||||
var _c=_9[i];
|
||||
if(_c[_a]==_b){
|
||||
return _c;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
};
|
||||
function _d(_e,_f){
|
||||
var _10=$(_e).combo("panel");
|
||||
var row=_1(_e,_f);
|
||||
if(row){
|
||||
var _11=$("#"+row.domId);
|
||||
if(_11.position().top<=0){
|
||||
var h=_10.scrollTop()+_11.position().top;
|
||||
_10.scrollTop(h);
|
||||
}else{
|
||||
if(_11.position().top+_11.outerHeight()>_10.height()){
|
||||
var h=_10.scrollTop()+_11.position().top+_11.outerHeight()-_10.height();
|
||||
_10.scrollTop(h);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function nav(_12,dir){
|
||||
var _13=$.data(_12,"combobox").options;
|
||||
var _14=$(_12).combobox("panel");
|
||||
var _15=_14.children("div.combobox-item-hover");
|
||||
if(!_15.length){
|
||||
_15=_14.children("div.combobox-item-selected");
|
||||
}
|
||||
_15.removeClass("combobox-item-hover");
|
||||
var _16="div.combobox-item:visible:not(.combobox-item-disabled):first";
|
||||
var _17="div.combobox-item:visible:not(.combobox-item-disabled):last";
|
||||
if(!_15.length){
|
||||
_15=_14.children(dir=="next"?_16:_17);
|
||||
}else{
|
||||
if(dir=="next"){
|
||||
_15=_15.nextAll(_16);
|
||||
if(!_15.length){
|
||||
_15=_14.children(_16);
|
||||
}
|
||||
}else{
|
||||
_15=_15.prevAll(_16);
|
||||
if(!_15.length){
|
||||
_15=_14.children(_17);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_15.length){
|
||||
_15.addClass("combobox-item-hover");
|
||||
var row=_1(_12,_15.attr("id"),"domId");
|
||||
if(row){
|
||||
_d(_12,row[_13.valueField]);
|
||||
if(_13.selectOnNavigation){
|
||||
_18(_12,row[_13.valueField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _18(_19,_1a){
|
||||
var _1b=$.data(_19,"combobox").options;
|
||||
var _1c=$(_19).combo("getValues");
|
||||
if($.inArray(_1a+"",_1c)==-1){
|
||||
if(_1b.multiple){
|
||||
_1c.push(_1a);
|
||||
}else{
|
||||
_1c=[_1a];
|
||||
}
|
||||
_1d(_19,_1c);
|
||||
_1b.onSelect.call(_19,_1(_19,_1a));
|
||||
}
|
||||
};
|
||||
function _1e(_1f,_20){
|
||||
var _21=$.data(_1f,"combobox").options;
|
||||
var _22=$(_1f).combo("getValues");
|
||||
var _23=$.inArray(_20+"",_22);
|
||||
if(_23>=0){
|
||||
_22.splice(_23,1);
|
||||
_1d(_1f,_22);
|
||||
_21.onUnselect.call(_1f,_1(_1f,_20));
|
||||
}
|
||||
};
|
||||
function _1d(_24,_25,_26){
|
||||
var _27=$.data(_24,"combobox").options;
|
||||
var _28=$(_24).combo("panel");
|
||||
_28.find("div.combobox-item-selected").removeClass("combobox-item-selected");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_25.length;i++){
|
||||
var v=_25[i];
|
||||
var s=v;
|
||||
var row=_1(_24,v);
|
||||
if(row){
|
||||
s=row[_27.textField];
|
||||
$("#"+row.domId).addClass("combobox-item-selected");
|
||||
}
|
||||
vv.push(v);
|
||||
ss.push(s);
|
||||
}
|
||||
$(_24).combo("setValues",vv);
|
||||
if(!_26){
|
||||
$(_24).combo("setText",ss.join(_27.separator));
|
||||
}
|
||||
};
|
||||
var _29=1;
|
||||
function _2a(_2b,_2c,_2d){
|
||||
var _2e=$.data(_2b,"combobox");
|
||||
var _2f=_2e.options;
|
||||
_2e.data=_2f.loadFilter.call(_2b,_2c);
|
||||
_2e.groups=[];
|
||||
_2c=_2e.data;
|
||||
var _30=$(_2b).combobox("getValues");
|
||||
var dd=[];
|
||||
var _31=undefined;
|
||||
for(var i=0;i<_2c.length;i++){
|
||||
var row=_2c[i];
|
||||
var v=row[_2f.valueField]+"";
|
||||
var s=row[_2f.textField];
|
||||
var g=row[_2f.groupField];
|
||||
if(g){
|
||||
if(_31!=g){
|
||||
_31=g;
|
||||
var _32={value:g,domId:("_easyui_combobox_"+_29++)};
|
||||
_2e.groups.push(_32);
|
||||
dd.push("<div id=\""+_32.domId+"\" class=\"combobox-group\">");
|
||||
dd.push(_2f.groupFormatter?_2f.groupFormatter.call(_2b,g):g);
|
||||
dd.push("</div>");
|
||||
}
|
||||
}else{
|
||||
_31=undefined;
|
||||
}
|
||||
var cls="combobox-item"+(row.disabled?" combobox-item-disabled":"")+(g?" combobox-gitem":"");
|
||||
row.domId="_easyui_combobox_"+_29++;
|
||||
dd.push("<div id=\""+row.domId+"\" class=\""+cls+"\">");
|
||||
dd.push(_2f.formatter?_2f.formatter.call(_2b,row):s);
|
||||
dd.push("</div>");
|
||||
if(row["selected"]&&$.inArray(v,_30)==-1){
|
||||
_30.push(v);
|
||||
}
|
||||
}
|
||||
$(_2b).combo("panel").html(dd.join(""));
|
||||
if(_2f.multiple){
|
||||
_1d(_2b,_30,_2d);
|
||||
}else{
|
||||
_1d(_2b,_30.length?[_30[_30.length-1]]:[],_2d);
|
||||
}
|
||||
_2f.onLoadSuccess.call(_2b,_2c);
|
||||
};
|
||||
function _33(_34,url,_35,_36){
|
||||
var _37=$.data(_34,"combobox").options;
|
||||
if(url){
|
||||
_37.url=url;
|
||||
}
|
||||
_35=_35||{};
|
||||
if(_37.onBeforeLoad.call(_34,_35)==false){
|
||||
return;
|
||||
}
|
||||
_37.loader.call(_34,_35,function(_38){
|
||||
_2a(_34,_38,_36);
|
||||
},function(){
|
||||
_37.onLoadError.apply(this,arguments);
|
||||
});
|
||||
};
|
||||
function _39(_3a,q){
|
||||
var _3b=$.data(_3a,"combobox");
|
||||
var _3c=_3b.options;
|
||||
if(_3c.multiple&&!q){
|
||||
_1d(_3a,[],true);
|
||||
}else{
|
||||
_1d(_3a,[q],true);
|
||||
}
|
||||
if(_3c.mode=="remote"){
|
||||
_33(_3a,null,{q:q},true);
|
||||
}else{
|
||||
var _3d=$(_3a).combo("panel");
|
||||
_3d.find("div.combobox-item,div.combobox-group").hide();
|
||||
var _3e=_3b.data;
|
||||
var _3f=undefined;
|
||||
for(var i=0;i<_3e.length;i++){
|
||||
var row=_3e[i];
|
||||
if(_3c.filter.call(_3a,q,row)){
|
||||
var v=row[_3c.valueField];
|
||||
var s=row[_3c.textField];
|
||||
var g=row[_3c.groupField];
|
||||
var _40=$("#"+row.domId).show();
|
||||
if(s.toLowerCase()==q.toLowerCase()){
|
||||
_1d(_3a,[v]);
|
||||
_40.addClass("combobox-item-selected");
|
||||
}
|
||||
if(_3c.groupField&&_3f!=g){
|
||||
var _41=_1(_3a,g,"value",true);
|
||||
if(_41){
|
||||
$("#"+_41.domId).show();
|
||||
}
|
||||
_3f=g;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _42(_43){
|
||||
var t=$(_43);
|
||||
var _44=t.combobox("options");
|
||||
var _45=t.combobox("panel");
|
||||
var _46=_45.children("div.combobox-item-hover");
|
||||
if(!_46.length){
|
||||
_46=_45.children("div.combobox-item-selected");
|
||||
}
|
||||
if(!_46.length){
|
||||
return;
|
||||
}
|
||||
var row=_1(_43,_46.attr("id"),"domId");
|
||||
if(!row){
|
||||
return;
|
||||
}
|
||||
var _47=row[_44.valueField];
|
||||
if(_44.multiple){
|
||||
if(_46.hasClass("combobox-item-selected")){
|
||||
t.combobox("unselect",_47);
|
||||
}else{
|
||||
t.combobox("select",_47);
|
||||
}
|
||||
}else{
|
||||
t.combobox("select",_47);
|
||||
t.combobox("hidePanel");
|
||||
}
|
||||
var vv=[];
|
||||
var _48=t.combobox("getValues");
|
||||
for(var i=0;i<_48.length;i++){
|
||||
if(_1(_43,_48[i])){
|
||||
vv.push(_48[i]);
|
||||
}
|
||||
}
|
||||
t.combobox("setValues",vv);
|
||||
};
|
||||
function _49(_4a){
|
||||
var _4b=$.data(_4a,"combobox").options;
|
||||
$(_4a).addClass("combobox-f");
|
||||
$(_4a).combo($.extend({},_4b,{onShowPanel:function(){
|
||||
$(_4a).combo("panel").find("div.combobox-item,div.combobox-group").show();
|
||||
_d(_4a,$(_4a).combobox("getValue"));
|
||||
_4b.onShowPanel.call(_4a);
|
||||
}}));
|
||||
$(_4a).combo("panel").unbind().bind("mouseover",function(e){
|
||||
$(this).children("div.combobox-item-hover").removeClass("combobox-item-hover");
|
||||
var _4c=$(e.target).closest("div.combobox-item");
|
||||
if(!_4c.hasClass("combobox-item-disabled")){
|
||||
_4c.addClass("combobox-item-hover");
|
||||
}
|
||||
e.stopPropagation();
|
||||
}).bind("mouseout",function(e){
|
||||
$(e.target).closest("div.combobox-item").removeClass("combobox-item-hover");
|
||||
e.stopPropagation();
|
||||
}).bind("click",function(e){
|
||||
var _4d=$(e.target).closest("div.combobox-item");
|
||||
if(!_4d.length||_4d.hasClass("combobox-item-disabled")){
|
||||
return;
|
||||
}
|
||||
var row=_1(_4a,_4d.attr("id"),"domId");
|
||||
if(!row){
|
||||
return;
|
||||
}
|
||||
var _4e=row[_4b.valueField];
|
||||
if(_4b.multiple){
|
||||
if(_4d.hasClass("combobox-item-selected")){
|
||||
_1e(_4a,_4e);
|
||||
}else{
|
||||
_18(_4a,_4e);
|
||||
}
|
||||
}else{
|
||||
_18(_4a,_4e);
|
||||
$(_4a).combo("hidePanel");
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
};
|
||||
$.fn.combobox=function(_4f,_50){
|
||||
if(typeof _4f=="string"){
|
||||
var _51=$.fn.combobox.methods[_4f];
|
||||
if(_51){
|
||||
return _51(this,_50);
|
||||
}else{
|
||||
return this.combo(_4f,_50);
|
||||
}
|
||||
}
|
||||
_4f=_4f||{};
|
||||
return this.each(function(){
|
||||
var _52=$.data(this,"combobox");
|
||||
if(_52){
|
||||
$.extend(_52.options,_4f);
|
||||
_49(this);
|
||||
}else{
|
||||
_52=$.data(this,"combobox",{options:$.extend({},$.fn.combobox.defaults,$.fn.combobox.parseOptions(this),_4f),data:[]});
|
||||
_49(this);
|
||||
var _53=$.fn.combobox.parseData(this);
|
||||
if(_53.length){
|
||||
_2a(this,_53);
|
||||
}
|
||||
}
|
||||
if(_52.options.data){
|
||||
_2a(this,_52.options.data);
|
||||
}
|
||||
_33(this);
|
||||
});
|
||||
};
|
||||
$.fn.combobox.methods={options:function(jq){
|
||||
var _54=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combobox").options,{originalValue:_54.originalValue,disabled:_54.disabled,readonly:_54.readonly});
|
||||
},getData:function(jq){
|
||||
return $.data(jq[0],"combobox").data;
|
||||
},setValues:function(jq,_55){
|
||||
return jq.each(function(){
|
||||
_1d(this,_55);
|
||||
});
|
||||
},setValue:function(jq,_56){
|
||||
return jq.each(function(){
|
||||
_1d(this,[_56]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).combo("clear");
|
||||
var _57=$(this).combo("panel");
|
||||
_57.find("div.combobox-item-selected").removeClass("combobox-item-selected");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _58=$(this).combobox("options");
|
||||
if(_58.multiple){
|
||||
$(this).combobox("setValues",_58.originalValue);
|
||||
}else{
|
||||
$(this).combobox("setValue",_58.originalValue);
|
||||
}
|
||||
});
|
||||
},loadData:function(jq,_59){
|
||||
return jq.each(function(){
|
||||
_2a(this,_59);
|
||||
});
|
||||
},reload:function(jq,url){
|
||||
return jq.each(function(){
|
||||
_33(this,url);
|
||||
});
|
||||
},select:function(jq,_5a){
|
||||
return jq.each(function(){
|
||||
_18(this,_5a);
|
||||
});
|
||||
},unselect:function(jq,_5b){
|
||||
return jq.each(function(){
|
||||
_1e(this,_5b);
|
||||
});
|
||||
}};
|
||||
$.fn.combobox.parseOptions=function(_5c){
|
||||
var t=$(_5c);
|
||||
return $.extend({},$.fn.combo.parseOptions(_5c),$.parser.parseOptions(_5c,["valueField","textField","groupField","mode","method","url"]));
|
||||
};
|
||||
$.fn.combobox.parseData=function(_5d){
|
||||
var _5e=[];
|
||||
var _5f=$(_5d).combobox("options");
|
||||
$(_5d).children().each(function(){
|
||||
if(this.tagName.toLowerCase()=="optgroup"){
|
||||
var _60=$(this).attr("label");
|
||||
$(this).children().each(function(){
|
||||
_61(this,_60);
|
||||
});
|
||||
}else{
|
||||
_61(this);
|
||||
}
|
||||
});
|
||||
return _5e;
|
||||
function _61(el,_62){
|
||||
var t=$(el);
|
||||
var row={};
|
||||
row[_5f.valueField]=t.attr("value")!=undefined?t.attr("value"):t.html();
|
||||
row[_5f.textField]=t.html();
|
||||
row["selected"]=t.is(":selected");
|
||||
row["disabled"]=t.is(":disabled");
|
||||
if(_62){
|
||||
_5f.groupField=_5f.groupField||"group";
|
||||
row[_5f.groupField]=_62;
|
||||
}
|
||||
_5e.push(row);
|
||||
};
|
||||
};
|
||||
$.fn.combobox.defaults=$.extend({},$.fn.combo.defaults,{valueField:"value",textField:"text",groupField:null,groupFormatter:function(_63){
|
||||
return _63;
|
||||
},mode:"local",method:"post",url:null,data:null,keyHandler:{up:function(e){
|
||||
nav(this,"prev");
|
||||
e.preventDefault();
|
||||
},down:function(e){
|
||||
nav(this,"next");
|
||||
e.preventDefault();
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_42(this);
|
||||
},query:function(q,e){
|
||||
_39(this,q);
|
||||
}},filter:function(q,row){
|
||||
var _64=$(this).combobox("options");
|
||||
return row[_64.textField].toLowerCase().indexOf(q.toLowerCase())==0;
|
||||
},formatter:function(row){
|
||||
var _65=$(this).combobox("options");
|
||||
return row[_65.textField];
|
||||
},loader:function(_66,_67,_68){
|
||||
var _69=$(this).combobox("options");
|
||||
if(!_69.url){
|
||||
return false;
|
||||
}
|
||||
$.ajax({type:_69.method,url:_69.url,data:_66,dataType:"json",success:function(_6a){
|
||||
_67(_6a);
|
||||
},error:function(){
|
||||
_68.apply(this,arguments);
|
||||
}});
|
||||
},loadFilter:function(_6b){
|
||||
return _6b;
|
||||
},onBeforeLoad:function(_6c){
|
||||
},onLoadSuccess:function(){
|
||||
},onLoadError:function(){
|
||||
},onSelect:function(_6d){
|
||||
},onUnselect:function(_6e){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
253
WebRoot/js/easyui-1.3.5/plugins/jquery.combogrid.js
Normal file
253
WebRoot/js/easyui-1.3.5/plugins/jquery.combogrid.js
Normal file
@@ -0,0 +1,253 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"combogrid");
|
||||
var _4=_3.options;
|
||||
var _5=_3.grid;
|
||||
$(_2).addClass("combogrid-f").combo(_4);
|
||||
var _6=$(_2).combo("panel");
|
||||
if(!_5){
|
||||
_5=$("<table></table>").appendTo(_6);
|
||||
_3.grid=_5;
|
||||
}
|
||||
_5.datagrid($.extend({},_4,{border:false,fit:true,singleSelect:(!_4.multiple),onLoadSuccess:function(_7){
|
||||
var _8=$(_2).combo("getValues");
|
||||
var _9=_4.onSelect;
|
||||
_4.onSelect=function(){
|
||||
};
|
||||
_1a(_2,_8,_3.remainText);
|
||||
_4.onSelect=_9;
|
||||
_4.onLoadSuccess.apply(_2,arguments);
|
||||
},onClickRow:_a,onSelect:function(_b,_c){
|
||||
_d();
|
||||
_4.onSelect.call(this,_b,_c);
|
||||
},onUnselect:function(_e,_f){
|
||||
_d();
|
||||
_4.onUnselect.call(this,_e,_f);
|
||||
},onSelectAll:function(_10){
|
||||
_d();
|
||||
_4.onSelectAll.call(this,_10);
|
||||
},onUnselectAll:function(_11){
|
||||
if(_4.multiple){
|
||||
_d();
|
||||
}
|
||||
_4.onUnselectAll.call(this,_11);
|
||||
}}));
|
||||
function _a(_12,row){
|
||||
_3.remainText=false;
|
||||
_d();
|
||||
if(!_4.multiple){
|
||||
$(_2).combo("hidePanel");
|
||||
}
|
||||
_4.onClickRow.call(this,_12,row);
|
||||
};
|
||||
function _d(){
|
||||
var _13=_5.datagrid("getSelections");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_13.length;i++){
|
||||
vv.push(_13[i][_4.idField]);
|
||||
ss.push(_13[i][_4.textField]);
|
||||
}
|
||||
if(!_4.multiple){
|
||||
$(_2).combo("setValues",(vv.length?vv:[""]));
|
||||
}else{
|
||||
$(_2).combo("setValues",vv);
|
||||
}
|
||||
if(!_3.remainText){
|
||||
$(_2).combo("setText",ss.join(_4.separator));
|
||||
}
|
||||
};
|
||||
};
|
||||
function nav(_14,dir){
|
||||
var _15=$.data(_14,"combogrid");
|
||||
var _16=_15.options;
|
||||
var _17=_15.grid;
|
||||
var _18=_17.datagrid("getRows").length;
|
||||
if(!_18){
|
||||
return;
|
||||
}
|
||||
var tr=_16.finder.getTr(_17[0],null,"highlight");
|
||||
if(!tr.length){
|
||||
tr=_16.finder.getTr(_17[0],null,"selected");
|
||||
}
|
||||
var _19;
|
||||
if(!tr.length){
|
||||
_19=(dir=="next"?0:_18-1);
|
||||
}else{
|
||||
var _19=parseInt(tr.attr("datagrid-row-index"));
|
||||
_19+=(dir=="next"?1:-1);
|
||||
if(_19<0){
|
||||
_19=_18-1;
|
||||
}
|
||||
if(_19>=_18){
|
||||
_19=0;
|
||||
}
|
||||
}
|
||||
_17.datagrid("highlightRow",_19);
|
||||
if(_16.selectOnNavigation){
|
||||
_15.remainText=false;
|
||||
_17.datagrid("selectRow",_19);
|
||||
}
|
||||
};
|
||||
function _1a(_1b,_1c,_1d){
|
||||
var _1e=$.data(_1b,"combogrid");
|
||||
var _1f=_1e.options;
|
||||
var _20=_1e.grid;
|
||||
var _21=_20.datagrid("getRows");
|
||||
var ss=[];
|
||||
var _22=$(_1b).combo("getValues");
|
||||
var _23=$(_1b).combo("options");
|
||||
var _24=_23.onChange;
|
||||
_23.onChange=function(){
|
||||
};
|
||||
_20.datagrid("clearSelections");
|
||||
for(var i=0;i<_1c.length;i++){
|
||||
var _25=_20.datagrid("getRowIndex",_1c[i]);
|
||||
if(_25>=0){
|
||||
_20.datagrid("selectRow",_25);
|
||||
ss.push(_21[_25][_1f.textField]);
|
||||
}else{
|
||||
ss.push(_1c[i]);
|
||||
}
|
||||
}
|
||||
$(_1b).combo("setValues",_22);
|
||||
_23.onChange=_24;
|
||||
$(_1b).combo("setValues",_1c);
|
||||
if(!_1d){
|
||||
var s=ss.join(_1f.separator);
|
||||
if($(_1b).combo("getText")!=s){
|
||||
$(_1b).combo("setText",s);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _26(_27,q){
|
||||
var _28=$.data(_27,"combogrid");
|
||||
var _29=_28.options;
|
||||
var _2a=_28.grid;
|
||||
_28.remainText=true;
|
||||
if(_29.multiple&&!q){
|
||||
_1a(_27,[],true);
|
||||
}else{
|
||||
_1a(_27,[q],true);
|
||||
}
|
||||
if(_29.mode=="remote"){
|
||||
_2a.datagrid("clearSelections");
|
||||
_2a.datagrid("load",$.extend({},_29.queryParams,{q:q}));
|
||||
}else{
|
||||
if(!q){
|
||||
return;
|
||||
}
|
||||
var _2b=_2a.datagrid("getRows");
|
||||
for(var i=0;i<_2b.length;i++){
|
||||
if(_29.filter.call(_27,q,_2b[i])){
|
||||
_2a.datagrid("clearSelections");
|
||||
_2a.datagrid("selectRow",i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _2c(_2d){
|
||||
var _2e=$.data(_2d,"combogrid");
|
||||
var _2f=_2e.options;
|
||||
var _30=_2e.grid;
|
||||
var tr=_2f.finder.getTr(_30[0],null,"highlight");
|
||||
if(!tr.length){
|
||||
tr=_2f.finder.getTr(_30[0],null,"selected");
|
||||
}
|
||||
if(!tr.length){
|
||||
return;
|
||||
}
|
||||
_2e.remainText=false;
|
||||
var _31=parseInt(tr.attr("datagrid-row-index"));
|
||||
if(_2f.multiple){
|
||||
if(tr.hasClass("datagrid-row-selected")){
|
||||
_30.datagrid("unselectRow",_31);
|
||||
}else{
|
||||
_30.datagrid("selectRow",_31);
|
||||
}
|
||||
}else{
|
||||
_30.datagrid("selectRow",_31);
|
||||
$(_2d).combogrid("hidePanel");
|
||||
}
|
||||
};
|
||||
$.fn.combogrid=function(_32,_33){
|
||||
if(typeof _32=="string"){
|
||||
var _34=$.fn.combogrid.methods[_32];
|
||||
if(_34){
|
||||
return _34(this,_33);
|
||||
}else{
|
||||
return this.combo(_32,_33);
|
||||
}
|
||||
}
|
||||
_32=_32||{};
|
||||
return this.each(function(){
|
||||
var _35=$.data(this,"combogrid");
|
||||
if(_35){
|
||||
$.extend(_35.options,_32);
|
||||
}else{
|
||||
_35=$.data(this,"combogrid",{options:$.extend({},$.fn.combogrid.defaults,$.fn.combogrid.parseOptions(this),_32)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.combogrid.methods={options:function(jq){
|
||||
var _36=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combogrid").options,{originalValue:_36.originalValue,disabled:_36.disabled,readonly:_36.readonly});
|
||||
},grid:function(jq){
|
||||
return $.data(jq[0],"combogrid").grid;
|
||||
},setValues:function(jq,_37){
|
||||
return jq.each(function(){
|
||||
_1a(this,_37);
|
||||
});
|
||||
},setValue:function(jq,_38){
|
||||
return jq.each(function(){
|
||||
_1a(this,[_38]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).combogrid("grid").datagrid("clearSelections");
|
||||
$(this).combo("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _39=$(this).combogrid("options");
|
||||
if(_39.multiple){
|
||||
$(this).combogrid("setValues",_39.originalValue);
|
||||
}else{
|
||||
$(this).combogrid("setValue",_39.originalValue);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.combogrid.parseOptions=function(_3a){
|
||||
var t=$(_3a);
|
||||
return $.extend({},$.fn.combo.parseOptions(_3a),$.fn.datagrid.parseOptions(_3a),$.parser.parseOptions(_3a,["idField","textField","mode"]));
|
||||
};
|
||||
$.fn.combogrid.defaults=$.extend({},$.fn.combo.defaults,$.fn.datagrid.defaults,{loadMsg:null,idField:null,textField:null,mode:"local",keyHandler:{up:function(e){
|
||||
nav(this,"prev");
|
||||
e.preventDefault();
|
||||
},down:function(e){
|
||||
nav(this,"next");
|
||||
e.preventDefault();
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_2c(this);
|
||||
},query:function(q,e){
|
||||
_26(this,q);
|
||||
}},filter:function(q,row){
|
||||
var _3b=$(this).combogrid("options");
|
||||
return row[_3b.textField].indexOf(q)==0;
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
162
WebRoot/js/easyui-1.3.5/plugins/jquery.combotree.js
Normal file
162
WebRoot/js/easyui-1.3.5/plugins/jquery.combotree.js
Normal file
@@ -0,0 +1,162 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"combotree").options;
|
||||
var _4=$.data(_2,"combotree").tree;
|
||||
$(_2).addClass("combotree-f");
|
||||
$(_2).combo(_3);
|
||||
var _5=$(_2).combo("panel");
|
||||
if(!_4){
|
||||
_4=$("<ul></ul>").appendTo(_5);
|
||||
$.data(_2,"combotree").tree=_4;
|
||||
}
|
||||
_4.tree($.extend({},_3,{checkbox:_3.multiple,onLoadSuccess:function(_6,_7){
|
||||
var _8=$(_2).combotree("getValues");
|
||||
if(_3.multiple){
|
||||
var _9=_4.tree("getChecked");
|
||||
for(var i=0;i<_9.length;i++){
|
||||
var id=_9[i].id;
|
||||
(function(){
|
||||
for(var i=0;i<_8.length;i++){
|
||||
if(id==_8[i]){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_8.push(id);
|
||||
})();
|
||||
}
|
||||
}
|
||||
$(_2).combotree("setValues",_8);
|
||||
_3.onLoadSuccess.call(this,_6,_7);
|
||||
},onClick:function(_a){
|
||||
_d(_2);
|
||||
$(_2).combo("hidePanel");
|
||||
_3.onClick.call(this,_a);
|
||||
},onCheck:function(_b,_c){
|
||||
_d(_2);
|
||||
_3.onCheck.call(this,_b,_c);
|
||||
}}));
|
||||
};
|
||||
function _d(_e){
|
||||
var _f=$.data(_e,"combotree").options;
|
||||
var _10=$.data(_e,"combotree").tree;
|
||||
var vv=[],ss=[];
|
||||
if(_f.multiple){
|
||||
var _11=_10.tree("getChecked");
|
||||
for(var i=0;i<_11.length;i++){
|
||||
vv.push(_11[i].id);
|
||||
ss.push(_11[i].text);
|
||||
}
|
||||
}else{
|
||||
var _12=_10.tree("getSelected");
|
||||
if(_12){
|
||||
vv.push(_12.id);
|
||||
ss.push(_12.text);
|
||||
}
|
||||
}
|
||||
$(_e).combo("setValues",vv).combo("setText",ss.join(_f.separator));
|
||||
};
|
||||
function _13(_14,_15){
|
||||
var _16=$.data(_14,"combotree").options;
|
||||
var _17=$.data(_14,"combotree").tree;
|
||||
_17.find("span.tree-checkbox").addClass("tree-checkbox0").removeClass("tree-checkbox1 tree-checkbox2");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_15.length;i++){
|
||||
var v=_15[i];
|
||||
var s=v;
|
||||
var _18=_17.tree("find",v);
|
||||
if(_18){
|
||||
s=_18.text;
|
||||
_17.tree("check",_18.target);
|
||||
_17.tree("select",_18.target);
|
||||
}
|
||||
vv.push(v);
|
||||
ss.push(s);
|
||||
}
|
||||
$(_14).combo("setValues",vv).combo("setText",ss.join(_16.separator));
|
||||
};
|
||||
$.fn.combotree=function(_19,_1a){
|
||||
if(typeof _19=="string"){
|
||||
var _1b=$.fn.combotree.methods[_19];
|
||||
if(_1b){
|
||||
return _1b(this,_1a);
|
||||
}else{
|
||||
return this.combo(_19,_1a);
|
||||
}
|
||||
}
|
||||
_19=_19||{};
|
||||
return this.each(function(){
|
||||
var _1c=$.data(this,"combotree");
|
||||
if(_1c){
|
||||
$.extend(_1c.options,_19);
|
||||
}else{
|
||||
$.data(this,"combotree",{options:$.extend({},$.fn.combotree.defaults,$.fn.combotree.parseOptions(this),_19)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.combotree.methods={options:function(jq){
|
||||
var _1d=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combotree").options,{originalValue:_1d.originalValue,disabled:_1d.disabled,readonly:_1d.readonly});
|
||||
},tree:function(jq){
|
||||
return $.data(jq[0],"combotree").tree;
|
||||
},loadData:function(jq,_1e){
|
||||
return jq.each(function(){
|
||||
var _1f=$.data(this,"combotree").options;
|
||||
_1f.data=_1e;
|
||||
var _20=$.data(this,"combotree").tree;
|
||||
_20.tree("loadData",_1e);
|
||||
});
|
||||
},reload:function(jq,url){
|
||||
return jq.each(function(){
|
||||
var _21=$.data(this,"combotree").options;
|
||||
var _22=$.data(this,"combotree").tree;
|
||||
if(url){
|
||||
_21.url=url;
|
||||
}
|
||||
_22.tree({url:_21.url});
|
||||
});
|
||||
},setValues:function(jq,_23){
|
||||
return jq.each(function(){
|
||||
_13(this,_23);
|
||||
});
|
||||
},setValue:function(jq,_24){
|
||||
return jq.each(function(){
|
||||
_13(this,[_24]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _25=$.data(this,"combotree").tree;
|
||||
_25.find("div.tree-node-selected").removeClass("tree-node-selected");
|
||||
var cc=_25.tree("getChecked");
|
||||
for(var i=0;i<cc.length;i++){
|
||||
_25.tree("uncheck",cc[i].target);
|
||||
}
|
||||
$(this).combo("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _26=$(this).combotree("options");
|
||||
if(_26.multiple){
|
||||
$(this).combotree("setValues",_26.originalValue);
|
||||
}else{
|
||||
$(this).combotree("setValue",_26.originalValue);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.combotree.parseOptions=function(_27){
|
||||
return $.extend({},$.fn.combo.parseOptions(_27),$.fn.tree.parseOptions(_27));
|
||||
};
|
||||
$.fn.combotree.defaults=$.extend({},$.fn.combo.defaults,$.fn.tree.defaults,{editable:false});
|
||||
})(jQuery);
|
||||
|
||||
2286
WebRoot/js/easyui-1.3.5/plugins/jquery.datagrid.js
Normal file
2286
WebRoot/js/easyui-1.3.5/plugins/jquery.datagrid.js
Normal file
File diff suppressed because it is too large
Load Diff
157
WebRoot/js/easyui-1.3.5/plugins/jquery.datebox.js
Normal file
157
WebRoot/js/easyui-1.3.5/plugins/jquery.datebox.js
Normal file
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"datebox");
|
||||
var _4=_3.options;
|
||||
$(_2).addClass("datebox-f").combo($.extend({},_4,{onShowPanel:function(){
|
||||
_5();
|
||||
_10(_2,$(_2).datebox("getText"));
|
||||
_4.onShowPanel.call(_2);
|
||||
}}));
|
||||
$(_2).combo("textbox").parent().addClass("datebox");
|
||||
if(!_3.calendar){
|
||||
_6();
|
||||
}
|
||||
function _6(){
|
||||
var _7=$(_2).combo("panel").css("overflow","hidden");
|
||||
var cc=$("<div class=\"datebox-calendar-inner\"></div>").appendTo(_7);
|
||||
if(_4.sharedCalendar){
|
||||
_3.calendar=$(_4.sharedCalendar).appendTo(cc);
|
||||
if(!_3.calendar.hasClass("calendar")){
|
||||
_3.calendar.calendar();
|
||||
}
|
||||
}else{
|
||||
_3.calendar=$("<div></div>").appendTo(cc).calendar();
|
||||
}
|
||||
$.extend(_3.calendar.calendar("options"),{fit:true,border:false,onSelect:function(_8){
|
||||
var _9=$(this.target).datebox("options");
|
||||
_10(this.target,_9.formatter(_8));
|
||||
$(this.target).combo("hidePanel");
|
||||
_9.onSelect.call(_2,_8);
|
||||
}});
|
||||
_10(_2,_4.value);
|
||||
var _a=$("<div class=\"datebox-button\"><table cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%\"><tr></tr></table></div>").appendTo(_7);
|
||||
var tr=_a.find("tr");
|
||||
for(var i=0;i<_4.buttons.length;i++){
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _b=_4.buttons[i];
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").html($.isFunction(_b.text)?_b.text(_2):_b.text).appendTo(td);
|
||||
t.bind("click",{target:_2,handler:_b.handler},function(e){
|
||||
e.data.handler.call(this,e.data.target);
|
||||
});
|
||||
}
|
||||
tr.find("td").css("width",(100/_4.buttons.length)+"%");
|
||||
};
|
||||
function _5(){
|
||||
var _c=$(_2).combo("panel");
|
||||
var cc=_c.children("div.datebox-calendar-inner");
|
||||
_c.children()._outerWidth(_c.width());
|
||||
_3.calendar.appendTo(cc);
|
||||
_3.calendar[0].target=_2;
|
||||
if(_4.panelHeight!="auto"){
|
||||
var _d=_c.height();
|
||||
_c.children().not(cc).each(function(){
|
||||
_d-=$(this).outerHeight();
|
||||
});
|
||||
cc._outerHeight(_d);
|
||||
}
|
||||
_3.calendar.calendar("resize");
|
||||
};
|
||||
};
|
||||
function _e(_f,q){
|
||||
_10(_f,q);
|
||||
};
|
||||
function _11(_12){
|
||||
var _13=$.data(_12,"datebox");
|
||||
var _14=_13.options;
|
||||
var _15=_14.formatter(_13.calendar.calendar("options").current);
|
||||
_10(_12,_15);
|
||||
$(_12).combo("hidePanel");
|
||||
};
|
||||
function _10(_16,_17){
|
||||
var _18=$.data(_16,"datebox");
|
||||
var _19=_18.options;
|
||||
$(_16).combo("setValue",_17).combo("setText",_17);
|
||||
_18.calendar.calendar("moveTo",_19.parser(_17));
|
||||
};
|
||||
$.fn.datebox=function(_1a,_1b){
|
||||
if(typeof _1a=="string"){
|
||||
var _1c=$.fn.datebox.methods[_1a];
|
||||
if(_1c){
|
||||
return _1c(this,_1b);
|
||||
}else{
|
||||
return this.combo(_1a,_1b);
|
||||
}
|
||||
}
|
||||
_1a=_1a||{};
|
||||
return this.each(function(){
|
||||
var _1d=$.data(this,"datebox");
|
||||
if(_1d){
|
||||
$.extend(_1d.options,_1a);
|
||||
}else{
|
||||
$.data(this,"datebox",{options:$.extend({},$.fn.datebox.defaults,$.fn.datebox.parseOptions(this),_1a)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.datebox.methods={options:function(jq){
|
||||
var _1e=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"datebox").options,{originalValue:_1e.originalValue,disabled:_1e.disabled,readonly:_1e.readonly});
|
||||
},calendar:function(jq){
|
||||
return $.data(jq[0],"datebox").calendar;
|
||||
},setValue:function(jq,_1f){
|
||||
return jq.each(function(){
|
||||
_10(this,_1f);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _20=$(this).datebox("options");
|
||||
$(this).datebox("setValue",_20.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.datebox.parseOptions=function(_21){
|
||||
return $.extend({},$.fn.combo.parseOptions(_21),$.parser.parseOptions(_21,["sharedCalendar"]));
|
||||
};
|
||||
$.fn.datebox.defaults=$.extend({},$.fn.combo.defaults,{panelWidth:180,panelHeight:"auto",sharedCalendar:null,keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_11(this);
|
||||
},query:function(q,e){
|
||||
_e(this,q);
|
||||
}},currentText:"Today",closeText:"Close",okText:"Ok",buttons:[{text:function(_22){
|
||||
return $(_22).datebox("options").currentText;
|
||||
},handler:function(_23){
|
||||
$(_23).datebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
|
||||
_11(_23);
|
||||
}},{text:function(_24){
|
||||
return $(_24).datebox("options").closeText;
|
||||
},handler:function(_25){
|
||||
$(this).closest("div.combo-panel").panel("close");
|
||||
}}],formatter:function(_26){
|
||||
var y=_26.getFullYear();
|
||||
var m=_26.getMonth()+1;
|
||||
var d=_26.getDate();
|
||||
return m+"/"+d+"/"+y;
|
||||
},parser:function(s){
|
||||
var t=Date.parse(s);
|
||||
if(!isNaN(t)){
|
||||
return new Date(t);
|
||||
}else{
|
||||
return new Date();
|
||||
}
|
||||
},onSelect:function(_27){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
166
WebRoot/js/easyui-1.3.5/plugins/jquery.datetimebox.js
Normal file
166
WebRoot/js/easyui-1.3.5/plugins/jquery.datetimebox.js
Normal file
@@ -0,0 +1,166 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"datetimebox");
|
||||
var _4=_3.options;
|
||||
$(_2).datebox($.extend({},_4,{onShowPanel:function(){
|
||||
var _5=$(_2).datetimebox("getValue");
|
||||
_8(_2,_5,true);
|
||||
_4.onShowPanel.call(_2);
|
||||
},formatter:$.fn.datebox.defaults.formatter,parser:$.fn.datebox.defaults.parser}));
|
||||
$(_2).removeClass("datebox-f").addClass("datetimebox-f");
|
||||
$(_2).datebox("calendar").calendar({onSelect:function(_6){
|
||||
_4.onSelect.call(_2,_6);
|
||||
}});
|
||||
var _7=$(_2).datebox("panel");
|
||||
if(!_3.spinner){
|
||||
var p=$("<div style=\"padding:2px\"><input style=\"width:80px\"></div>").insertAfter(_7.children("div.datebox-calendar-inner"));
|
||||
_3.spinner=p.children("input");
|
||||
}
|
||||
_3.spinner.timespinner({showSeconds:_4.showSeconds,separator:_4.timeSeparator}).unbind(".datetimebox").bind("mousedown.datetimebox",function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
_8(_2,_4.value);
|
||||
};
|
||||
function _9(_a){
|
||||
var c=$(_a).datetimebox("calendar");
|
||||
var t=$(_a).datetimebox("spinner");
|
||||
var _b=c.calendar("options").current;
|
||||
return new Date(_b.getFullYear(),_b.getMonth(),_b.getDate(),t.timespinner("getHours"),t.timespinner("getMinutes"),t.timespinner("getSeconds"));
|
||||
};
|
||||
function _c(_d,q){
|
||||
_8(_d,q,true);
|
||||
};
|
||||
function _e(_f){
|
||||
var _10=$.data(_f,"datetimebox").options;
|
||||
var _11=_9(_f);
|
||||
_8(_f,_10.formatter.call(_f,_11));
|
||||
$(_f).combo("hidePanel");
|
||||
};
|
||||
function _8(_12,_13,_14){
|
||||
var _15=$.data(_12,"datetimebox").options;
|
||||
$(_12).combo("setValue",_13);
|
||||
if(!_14){
|
||||
if(_13){
|
||||
var _16=_15.parser.call(_12,_13);
|
||||
$(_12).combo("setValue",_15.formatter.call(_12,_16));
|
||||
$(_12).combo("setText",_15.formatter.call(_12,_16));
|
||||
}else{
|
||||
$(_12).combo("setText",_13);
|
||||
}
|
||||
}
|
||||
var _16=_15.parser.call(_12,_13);
|
||||
$(_12).datetimebox("calendar").calendar("moveTo",_16);
|
||||
$(_12).datetimebox("spinner").timespinner("setValue",_17(_16));
|
||||
function _17(_18){
|
||||
function _19(_1a){
|
||||
return (_1a<10?"0":"")+_1a;
|
||||
};
|
||||
var tt=[_19(_18.getHours()),_19(_18.getMinutes())];
|
||||
if(_15.showSeconds){
|
||||
tt.push(_19(_18.getSeconds()));
|
||||
}
|
||||
return tt.join($(_12).datetimebox("spinner").timespinner("options").separator);
|
||||
};
|
||||
};
|
||||
$.fn.datetimebox=function(_1b,_1c){
|
||||
if(typeof _1b=="string"){
|
||||
var _1d=$.fn.datetimebox.methods[_1b];
|
||||
if(_1d){
|
||||
return _1d(this,_1c);
|
||||
}else{
|
||||
return this.datebox(_1b,_1c);
|
||||
}
|
||||
}
|
||||
_1b=_1b||{};
|
||||
return this.each(function(){
|
||||
var _1e=$.data(this,"datetimebox");
|
||||
if(_1e){
|
||||
$.extend(_1e.options,_1b);
|
||||
}else{
|
||||
$.data(this,"datetimebox",{options:$.extend({},$.fn.datetimebox.defaults,$.fn.datetimebox.parseOptions(this),_1b)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.datetimebox.methods={options:function(jq){
|
||||
var _1f=jq.datebox("options");
|
||||
return $.extend($.data(jq[0],"datetimebox").options,{originalValue:_1f.originalValue,disabled:_1f.disabled,readonly:_1f.readonly});
|
||||
},spinner:function(jq){
|
||||
return $.data(jq[0],"datetimebox").spinner;
|
||||
},setValue:function(jq,_20){
|
||||
return jq.each(function(){
|
||||
_8(this,_20);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _21=$(this).datetimebox("options");
|
||||
$(this).datetimebox("setValue",_21.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.datetimebox.parseOptions=function(_22){
|
||||
var t=$(_22);
|
||||
return $.extend({},$.fn.datebox.parseOptions(_22),$.parser.parseOptions(_22,["timeSeparator",{showSeconds:"boolean"}]));
|
||||
};
|
||||
$.fn.datetimebox.defaults=$.extend({},$.fn.datebox.defaults,{showSeconds:true,timeSeparator:":",keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_e(this);
|
||||
},query:function(q,e){
|
||||
_c(this,q);
|
||||
}},buttons:[{text:function(_23){
|
||||
return $(_23).datetimebox("options").currentText;
|
||||
},handler:function(_24){
|
||||
$(_24).datetimebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
|
||||
_e(_24);
|
||||
}},{text:function(_25){
|
||||
return $(_25).datetimebox("options").okText;
|
||||
},handler:function(_26){
|
||||
_e(_26);
|
||||
}},{text:function(_27){
|
||||
return $(_27).datetimebox("options").closeText;
|
||||
},handler:function(_28){
|
||||
$(this).closest("div.combo-panel").panel("close");
|
||||
}}],formatter:function(_29){
|
||||
var h=_29.getHours();
|
||||
var M=_29.getMinutes();
|
||||
var s=_29.getSeconds();
|
||||
function _2a(_2b){
|
||||
return (_2b<10?"0":"")+_2b;
|
||||
};
|
||||
var _2c=$(this).datetimebox("spinner").timespinner("options").separator;
|
||||
var r=$.fn.datebox.defaults.formatter(_29)+" "+_2a(h)+_2c+_2a(M);
|
||||
if($(this).datetimebox("options").showSeconds){
|
||||
r+=_2c+_2a(s);
|
||||
}
|
||||
return r;
|
||||
},parser:function(s){
|
||||
if($.trim(s)==""){
|
||||
return new Date();
|
||||
}
|
||||
var dt=s.split(" ");
|
||||
var d=$.fn.datebox.defaults.parser(dt[0]);
|
||||
if(dt.length<2){
|
||||
return d;
|
||||
}
|
||||
var _2d=$(this).datetimebox("spinner").timespinner("options").separator;
|
||||
var tt=dt[1].split(_2d);
|
||||
var _2e=parseInt(tt[0],10)||0;
|
||||
var _2f=parseInt(tt[1],10)||0;
|
||||
var _30=parseInt(tt[2],10)||0;
|
||||
return new Date(d.getFullYear(),d.getMonth(),d.getDate(),_2e,_2f,_30);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
141
WebRoot/js/easyui-1.3.5/plugins/jquery.dialog.js
Normal file
141
WebRoot/js/easyui-1.3.5/plugins/jquery.dialog.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var cp=document.createElement("div");
|
||||
while(_2.firstChild){
|
||||
cp.appendChild(_2.firstChild);
|
||||
}
|
||||
_2.appendChild(cp);
|
||||
var _3=$(cp);
|
||||
_3.attr("style",$(_2).attr("style"));
|
||||
$(_2).removeAttr("style").css("overflow","hidden");
|
||||
_3.panel({border:false,doSize:false,bodyCls:"dialog-content"});
|
||||
return _3;
|
||||
};
|
||||
function _4(_5){
|
||||
var _6=$.data(_5,"dialog").options;
|
||||
var _7=$.data(_5,"dialog").contentPanel;
|
||||
if(_6.toolbar){
|
||||
if($.isArray(_6.toolbar)){
|
||||
$(_5).find("div.dialog-toolbar").remove();
|
||||
var _8=$("<div class=\"dialog-toolbar\"><table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table></div>").prependTo(_5);
|
||||
var tr=_8.find("tr");
|
||||
for(var i=0;i<_6.toolbar.length;i++){
|
||||
var _9=_6.toolbar[i];
|
||||
if(_9=="-"){
|
||||
$("<td><div class=\"dialog-tool-separator\"></div></td>").appendTo(tr);
|
||||
}else{
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _a=$("<a href=\"javascript:void(0)\"></a>").appendTo(td);
|
||||
_a[0].onclick=eval(_9.handler||function(){
|
||||
});
|
||||
_a.linkbutton($.extend({},_9,{plain:true}));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_6.toolbar).addClass("dialog-toolbar").prependTo(_5);
|
||||
$(_6.toolbar).show();
|
||||
}
|
||||
}else{
|
||||
$(_5).find("div.dialog-toolbar").remove();
|
||||
}
|
||||
if(_6.buttons){
|
||||
if($.isArray(_6.buttons)){
|
||||
$(_5).find("div.dialog-button").remove();
|
||||
var _b=$("<div class=\"dialog-button\"></div>").appendTo(_5);
|
||||
for(var i=0;i<_6.buttons.length;i++){
|
||||
var p=_6.buttons[i];
|
||||
var _c=$("<a href=\"javascript:void(0)\"></a>").appendTo(_b);
|
||||
if(p.handler){
|
||||
_c[0].onclick=p.handler;
|
||||
}
|
||||
_c.linkbutton(p);
|
||||
}
|
||||
}else{
|
||||
$(_6.buttons).addClass("dialog-button").appendTo(_5);
|
||||
$(_6.buttons).show();
|
||||
}
|
||||
}else{
|
||||
$(_5).find("div.dialog-button").remove();
|
||||
}
|
||||
var _d=_6.href;
|
||||
var _e=_6.content;
|
||||
_6.href=null;
|
||||
_6.content=null;
|
||||
_7.panel({closed:_6.closed,cache:_6.cache,href:_d,content:_e,onLoad:function(){
|
||||
if(_6.height=="auto"){
|
||||
$(_5).window("resize");
|
||||
}
|
||||
_6.onLoad.apply(_5,arguments);
|
||||
}});
|
||||
$(_5).window($.extend({},_6,{onOpen:function(){
|
||||
if(_7.panel("options").closed){
|
||||
_7.panel("open");
|
||||
}
|
||||
if(_6.onOpen){
|
||||
_6.onOpen.call(_5);
|
||||
}
|
||||
},onResize:function(_f,_10){
|
||||
var _11=$(_5);
|
||||
_7.panel("panel").show();
|
||||
_7.panel("resize",{width:_11.width(),height:(_10=="auto")?"auto":_11.height()-_11.children("div.dialog-toolbar")._outerHeight()-_11.children("div.dialog-button")._outerHeight()});
|
||||
if(_6.onResize){
|
||||
_6.onResize.call(_5,_f,_10);
|
||||
}
|
||||
}}));
|
||||
_6.href=_d;
|
||||
_6.content=_e;
|
||||
};
|
||||
function _12(_13,_14){
|
||||
var _15=$.data(_13,"dialog").contentPanel;
|
||||
_15.panel("refresh",_14);
|
||||
};
|
||||
$.fn.dialog=function(_16,_17){
|
||||
if(typeof _16=="string"){
|
||||
var _18=$.fn.dialog.methods[_16];
|
||||
if(_18){
|
||||
return _18(this,_17);
|
||||
}else{
|
||||
return this.window(_16,_17);
|
||||
}
|
||||
}
|
||||
_16=_16||{};
|
||||
return this.each(function(){
|
||||
var _19=$.data(this,"dialog");
|
||||
if(_19){
|
||||
$.extend(_19.options,_16);
|
||||
}else{
|
||||
$.data(this,"dialog",{options:$.extend({},$.fn.dialog.defaults,$.fn.dialog.parseOptions(this),_16),contentPanel:_1(this)});
|
||||
}
|
||||
_4(this);
|
||||
});
|
||||
};
|
||||
$.fn.dialog.methods={options:function(jq){
|
||||
var _1a=$.data(jq[0],"dialog").options;
|
||||
var _1b=jq.panel("options");
|
||||
$.extend(_1a,{closed:_1b.closed,collapsed:_1b.collapsed,minimized:_1b.minimized,maximized:_1b.maximized});
|
||||
var _1c=$.data(jq[0],"dialog").contentPanel;
|
||||
return _1a;
|
||||
},dialog:function(jq){
|
||||
return jq.window("window");
|
||||
},refresh:function(jq,_1d){
|
||||
return jq.each(function(){
|
||||
_12(this,_1d);
|
||||
});
|
||||
}};
|
||||
$.fn.dialog.parseOptions=function(_1e){
|
||||
return $.extend({},$.fn.window.parseOptions(_1e),$.parser.parseOptions(_1e,["toolbar","buttons"]));
|
||||
};
|
||||
$.fn.dialog.defaults=$.extend({},$.fn.window.defaults,{title:"New Dialog",collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null});
|
||||
})(jQuery);
|
||||
|
||||
285
WebRoot/js/easyui-1.3.5/plugins/jquery.draggable.js
Normal file
285
WebRoot/js/easyui-1.3.5/plugins/jquery.draggable.js
Normal file
@@ -0,0 +1,285 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(e){
|
||||
var _2=$.data(e.data.target,"draggable");
|
||||
var _3=_2.options;
|
||||
var _4=_2.proxy;
|
||||
var _5=e.data;
|
||||
var _6=_5.startLeft+e.pageX-_5.startX;
|
||||
var _7=_5.startTop+e.pageY-_5.startY;
|
||||
if(_4){
|
||||
if(_4.parent()[0]==document.body){
|
||||
if(_3.deltaX!=null&&_3.deltaX!=undefined){
|
||||
_6=e.pageX+_3.deltaX;
|
||||
}else{
|
||||
_6=e.pageX-e.data.offsetWidth;
|
||||
}
|
||||
if(_3.deltaY!=null&&_3.deltaY!=undefined){
|
||||
_7=e.pageY+_3.deltaY;
|
||||
}else{
|
||||
_7=e.pageY-e.data.offsetHeight;
|
||||
}
|
||||
}else{
|
||||
if(_3.deltaX!=null&&_3.deltaX!=undefined){
|
||||
_6+=e.data.offsetWidth+_3.deltaX;
|
||||
}
|
||||
if(_3.deltaY!=null&&_3.deltaY!=undefined){
|
||||
_7+=e.data.offsetHeight+_3.deltaY;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(e.data.parent!=document.body){
|
||||
_6+=$(e.data.parent).scrollLeft();
|
||||
_7+=$(e.data.parent).scrollTop();
|
||||
}
|
||||
if(_3.axis=="h"){
|
||||
_5.left=_6;
|
||||
}else{
|
||||
if(_3.axis=="v"){
|
||||
_5.top=_7;
|
||||
}else{
|
||||
_5.left=_6;
|
||||
_5.top=_7;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _8(e){
|
||||
var _9=$.data(e.data.target,"draggable");
|
||||
var _a=_9.options;
|
||||
var _b=_9.proxy;
|
||||
if(!_b){
|
||||
_b=$(e.data.target);
|
||||
}
|
||||
_b.css({left:e.data.left,top:e.data.top});
|
||||
$("body").css("cursor",_a.cursor);
|
||||
};
|
||||
function _c(e){
|
||||
$.fn.draggable.isDragging=true;
|
||||
var _d=$.data(e.data.target,"draggable");
|
||||
var _e=_d.options;
|
||||
var _f=$(".droppable").filter(function(){
|
||||
return e.data.target!=this;
|
||||
}).filter(function(){
|
||||
var _10=$.data(this,"droppable").options.accept;
|
||||
if(_10){
|
||||
return $(_10).filter(function(){
|
||||
return this==e.data.target;
|
||||
}).length>0;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
_d.droppables=_f;
|
||||
var _11=_d.proxy;
|
||||
if(!_11){
|
||||
if(_e.proxy){
|
||||
if(_e.proxy=="clone"){
|
||||
_11=$(e.data.target).clone().insertAfter(e.data.target);
|
||||
}else{
|
||||
_11=_e.proxy.call(e.data.target,e.data.target);
|
||||
}
|
||||
_d.proxy=_11;
|
||||
}else{
|
||||
_11=$(e.data.target);
|
||||
}
|
||||
}
|
||||
_11.css("position","absolute");
|
||||
_1(e);
|
||||
_8(e);
|
||||
_e.onStartDrag.call(e.data.target,e);
|
||||
return false;
|
||||
};
|
||||
function _12(e){
|
||||
var _13=$.data(e.data.target,"draggable");
|
||||
_1(e);
|
||||
if(_13.options.onDrag.call(e.data.target,e)!=false){
|
||||
_8(e);
|
||||
}
|
||||
var _14=e.data.target;
|
||||
_13.droppables.each(function(){
|
||||
var _15=$(this);
|
||||
if(_15.droppable("options").disabled){
|
||||
return;
|
||||
}
|
||||
var p2=_15.offset();
|
||||
if(e.pageX>p2.left&&e.pageX<p2.left+_15.outerWidth()&&e.pageY>p2.top&&e.pageY<p2.top+_15.outerHeight()){
|
||||
if(!this.entered){
|
||||
$(this).trigger("_dragenter",[_14]);
|
||||
this.entered=true;
|
||||
}
|
||||
$(this).trigger("_dragover",[_14]);
|
||||
}else{
|
||||
if(this.entered){
|
||||
$(this).trigger("_dragleave",[_14]);
|
||||
this.entered=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
function _16(e){
|
||||
$.fn.draggable.isDragging=false;
|
||||
_12(e);
|
||||
var _17=$.data(e.data.target,"draggable");
|
||||
var _18=_17.proxy;
|
||||
var _19=_17.options;
|
||||
if(_19.revert){
|
||||
if(_1a()==true){
|
||||
$(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop});
|
||||
}else{
|
||||
if(_18){
|
||||
var _1b,top;
|
||||
if(_18.parent()[0]==document.body){
|
||||
_1b=e.data.startX-e.data.offsetWidth;
|
||||
top=e.data.startY-e.data.offsetHeight;
|
||||
}else{
|
||||
_1b=e.data.startLeft;
|
||||
top=e.data.startTop;
|
||||
}
|
||||
_18.animate({left:_1b,top:top},function(){
|
||||
_1c();
|
||||
});
|
||||
}else{
|
||||
$(e.data.target).animate({left:e.data.startLeft,top:e.data.startTop},function(){
|
||||
$(e.data.target).css("position",e.data.startPosition);
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(e.data.target).css({position:"absolute",left:e.data.left,top:e.data.top});
|
||||
_1a();
|
||||
}
|
||||
_19.onStopDrag.call(e.data.target,e);
|
||||
$(document).unbind(".draggable");
|
||||
setTimeout(function(){
|
||||
$("body").css("cursor","");
|
||||
},100);
|
||||
function _1c(){
|
||||
if(_18){
|
||||
_18.remove();
|
||||
}
|
||||
_17.proxy=null;
|
||||
};
|
||||
function _1a(){
|
||||
var _1d=false;
|
||||
_17.droppables.each(function(){
|
||||
var _1e=$(this);
|
||||
if(_1e.droppable("options").disabled){
|
||||
return;
|
||||
}
|
||||
var p2=_1e.offset();
|
||||
if(e.pageX>p2.left&&e.pageX<p2.left+_1e.outerWidth()&&e.pageY>p2.top&&e.pageY<p2.top+_1e.outerHeight()){
|
||||
if(_19.revert){
|
||||
$(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop});
|
||||
}
|
||||
$(this).trigger("_drop",[e.data.target]);
|
||||
_1c();
|
||||
_1d=true;
|
||||
this.entered=false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if(!_1d&&!_19.revert){
|
||||
_1c();
|
||||
}
|
||||
return _1d;
|
||||
};
|
||||
return false;
|
||||
};
|
||||
$.fn.draggable=function(_1f,_20){
|
||||
if(typeof _1f=="string"){
|
||||
return $.fn.draggable.methods[_1f](this,_20);
|
||||
}
|
||||
return this.each(function(){
|
||||
var _21;
|
||||
var _22=$.data(this,"draggable");
|
||||
if(_22){
|
||||
_22.handle.unbind(".draggable");
|
||||
_21=$.extend(_22.options,_1f);
|
||||
}else{
|
||||
_21=$.extend({},$.fn.draggable.defaults,$.fn.draggable.parseOptions(this),_1f||{});
|
||||
}
|
||||
var _23=_21.handle?(typeof _21.handle=="string"?$(_21.handle,this):_21.handle):$(this);
|
||||
$.data(this,"draggable",{options:_21,handle:_23});
|
||||
if(_21.disabled){
|
||||
$(this).css("cursor","");
|
||||
return;
|
||||
}
|
||||
_23.unbind(".draggable").bind("mousemove.draggable",{target:this},function(e){
|
||||
if($.fn.draggable.isDragging){
|
||||
return;
|
||||
}
|
||||
var _24=$.data(e.data.target,"draggable").options;
|
||||
if(_25(e)){
|
||||
$(this).css("cursor",_24.cursor);
|
||||
}else{
|
||||
$(this).css("cursor","");
|
||||
}
|
||||
}).bind("mouseleave.draggable",{target:this},function(e){
|
||||
$(this).css("cursor","");
|
||||
}).bind("mousedown.draggable",{target:this},function(e){
|
||||
if(_25(e)==false){
|
||||
return;
|
||||
}
|
||||
$(this).css("cursor","");
|
||||
var _26=$(e.data.target).position();
|
||||
var _27=$(e.data.target).offset();
|
||||
var _28={startPosition:$(e.data.target).css("position"),startLeft:_26.left,startTop:_26.top,left:_26.left,top:_26.top,startX:e.pageX,startY:e.pageY,offsetWidth:(e.pageX-_27.left),offsetHeight:(e.pageY-_27.top),target:e.data.target,parent:$(e.data.target).parent()[0]};
|
||||
$.extend(e.data,_28);
|
||||
var _29=$.data(e.data.target,"draggable").options;
|
||||
if(_29.onBeforeDrag.call(e.data.target,e)==false){
|
||||
return;
|
||||
}
|
||||
$(document).bind("mousedown.draggable",e.data,_c);
|
||||
$(document).bind("mousemove.draggable",e.data,_12);
|
||||
$(document).bind("mouseup.draggable",e.data,_16);
|
||||
});
|
||||
function _25(e){
|
||||
var _2a=$.data(e.data.target,"draggable");
|
||||
var _2b=_2a.handle;
|
||||
var _2c=$(_2b).offset();
|
||||
var _2d=$(_2b).outerWidth();
|
||||
var _2e=$(_2b).outerHeight();
|
||||
var t=e.pageY-_2c.top;
|
||||
var r=_2c.left+_2d-e.pageX;
|
||||
var b=_2c.top+_2e-e.pageY;
|
||||
var l=e.pageX-_2c.left;
|
||||
return Math.min(t,r,b,l)>_2a.options.edge;
|
||||
};
|
||||
});
|
||||
};
|
||||
$.fn.draggable.methods={options:function(jq){
|
||||
return $.data(jq[0],"draggable").options;
|
||||
},proxy:function(jq){
|
||||
return $.data(jq[0],"draggable").proxy;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).draggable({disabled:false});
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).draggable({disabled:true});
|
||||
});
|
||||
}};
|
||||
$.fn.draggable.parseOptions=function(_2f){
|
||||
var t=$(_2f);
|
||||
return $.extend({},$.parser.parseOptions(_2f,["cursor","handle","axis",{"revert":"boolean","deltaX":"number","deltaY":"number","edge":"number"}]),{disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.draggable.defaults={proxy:null,revert:false,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:false,edge:0,axis:null,onBeforeDrag:function(e){
|
||||
},onStartDrag:function(e){
|
||||
},onDrag:function(e){
|
||||
},onStopDrag:function(e){
|
||||
}};
|
||||
$.fn.draggable.isDragging=false;
|
||||
})(jQuery);
|
||||
|
||||
64
WebRoot/js/easyui-1.3.5/plugins/jquery.droppable.js
Normal file
64
WebRoot/js/easyui-1.3.5/plugins/jquery.droppable.js
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("droppable");
|
||||
$(_2).bind("_dragenter",function(e,_3){
|
||||
$.data(_2,"droppable").options.onDragEnter.apply(_2,[e,_3]);
|
||||
});
|
||||
$(_2).bind("_dragleave",function(e,_4){
|
||||
$.data(_2,"droppable").options.onDragLeave.apply(_2,[e,_4]);
|
||||
});
|
||||
$(_2).bind("_dragover",function(e,_5){
|
||||
$.data(_2,"droppable").options.onDragOver.apply(_2,[e,_5]);
|
||||
});
|
||||
$(_2).bind("_drop",function(e,_6){
|
||||
$.data(_2,"droppable").options.onDrop.apply(_2,[e,_6]);
|
||||
});
|
||||
};
|
||||
$.fn.droppable=function(_7,_8){
|
||||
if(typeof _7=="string"){
|
||||
return $.fn.droppable.methods[_7](this,_8);
|
||||
}
|
||||
_7=_7||{};
|
||||
return this.each(function(){
|
||||
var _9=$.data(this,"droppable");
|
||||
if(_9){
|
||||
$.extend(_9.options,_7);
|
||||
}else{
|
||||
_1(this);
|
||||
$.data(this,"droppable",{options:$.extend({},$.fn.droppable.defaults,$.fn.droppable.parseOptions(this),_7)});
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn.droppable.methods={options:function(jq){
|
||||
return $.data(jq[0],"droppable").options;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).droppable({disabled:false});
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).droppable({disabled:true});
|
||||
});
|
||||
}};
|
||||
$.fn.droppable.parseOptions=function(_a){
|
||||
var t=$(_a);
|
||||
return $.extend({},$.parser.parseOptions(_a,["accept"]),{disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.droppable.defaults={accept:null,disabled:false,onDragEnter:function(e,_b){
|
||||
},onDragOver:function(e,_c){
|
||||
},onDragLeave:function(e,_d){
|
||||
},onDrop:function(e,_e){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
292
WebRoot/js/easyui-1.3.5/plugins/jquery.form.js
Normal file
292
WebRoot/js/easyui-1.3.5/plugins/jquery.form.js
Normal file
@@ -0,0 +1,292 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
_3=_3||{};
|
||||
var _4={};
|
||||
if(_3.onSubmit){
|
||||
if(_3.onSubmit.call(_2,_4)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
var _5=$(_2);
|
||||
if(_3.url){
|
||||
_5.attr("action",_3.url);
|
||||
}
|
||||
var _6="easyui_frame_"+(new Date().getTime());
|
||||
var _7=$("<iframe id="+_6+" name="+_6+"></iframe>").attr("src",window.ActiveXObject?"javascript:false":"about:blank").css({position:"absolute",top:-1000,left:-1000});
|
||||
var t=_5.attr("target"),a=_5.attr("action");
|
||||
_5.attr("target",_6);
|
||||
var _8=$();
|
||||
try{
|
||||
_7.appendTo("body");
|
||||
_7.bind("load",cb);
|
||||
for(var n in _4){
|
||||
var f=$("<input type=\"hidden\" name=\""+n+"\">").val(_4[n]).appendTo(_5);
|
||||
_8=_8.add(f);
|
||||
}
|
||||
_9();
|
||||
_5[0].submit();
|
||||
}
|
||||
finally{
|
||||
_5.attr("action",a);
|
||||
t?_5.attr("target",t):_5.removeAttr("target");
|
||||
_8.remove();
|
||||
}
|
||||
function _9(){
|
||||
var f=$("#"+_6);
|
||||
if(!f.length){
|
||||
return;
|
||||
}
|
||||
try{
|
||||
var s=f.contents()[0].readyState;
|
||||
if(s&&s.toLowerCase()=="uninitialized"){
|
||||
setTimeout(_9,100);
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
cb();
|
||||
}
|
||||
};
|
||||
var _a=10;
|
||||
function cb(){
|
||||
var _b=$("#"+_6);
|
||||
if(!_b.length){
|
||||
return;
|
||||
}
|
||||
_b.unbind();
|
||||
var _c="";
|
||||
try{
|
||||
var _d=_b.contents().find("body");
|
||||
_c=_d.html();
|
||||
if(_c==""){
|
||||
if(--_a){
|
||||
setTimeout(cb,100);
|
||||
return;
|
||||
}
|
||||
}
|
||||
var ta=_d.find(">textarea");
|
||||
if(ta.length){
|
||||
_c=ta.val();
|
||||
}else{
|
||||
var _e=_d.find(">pre");
|
||||
if(_e.length){
|
||||
_c=_e.html();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
if(_3.success){
|
||||
_3.success(_c);
|
||||
}
|
||||
setTimeout(function(){
|
||||
_b.unbind();
|
||||
_b.remove();
|
||||
},100);
|
||||
};
|
||||
};
|
||||
function _f(_10,_11){
|
||||
if(!$.data(_10,"form")){
|
||||
$.data(_10,"form",{options:$.extend({},$.fn.form.defaults)});
|
||||
}
|
||||
var _12=$.data(_10,"form").options;
|
||||
if(typeof _11=="string"){
|
||||
var _13={};
|
||||
if(_12.onBeforeLoad.call(_10,_13)==false){
|
||||
return;
|
||||
}
|
||||
$.ajax({url:_11,data:_13,dataType:"json",success:function(_14){
|
||||
_15(_14);
|
||||
},error:function(){
|
||||
_12.onLoadError.apply(_10,arguments);
|
||||
}});
|
||||
}else{
|
||||
_15(_11);
|
||||
}
|
||||
function _15(_16){
|
||||
var _17=$(_10);
|
||||
for(var _18 in _16){
|
||||
var val=_16[_18];
|
||||
var rr=_19(_18,val);
|
||||
if(!rr.length){
|
||||
var _1a=_1b(_18,val);
|
||||
if(!_1a){
|
||||
$("input[name=\""+_18+"\"]",_17).val(val);
|
||||
$("textarea[name=\""+_18+"\"]",_17).val(val);
|
||||
$("select[name=\""+_18+"\"]",_17).val(val);
|
||||
}
|
||||
}
|
||||
_1c(_18,val);
|
||||
}
|
||||
_12.onLoadSuccess.call(_10,_16);
|
||||
_28(_10);
|
||||
};
|
||||
function _19(_1d,val){
|
||||
var rr=$(_10).find("input[name=\""+_1d+"\"][type=radio], input[name=\""+_1d+"\"][type=checkbox]");
|
||||
rr._propAttr("checked",false);
|
||||
rr.each(function(){
|
||||
var f=$(this);
|
||||
if(f.val()==String(val)||$.inArray(f.val(),$.isArray(val)?val:[val])>=0){
|
||||
f._propAttr("checked",true);
|
||||
}
|
||||
});
|
||||
return rr;
|
||||
};
|
||||
function _1b(_1e,val){
|
||||
var _1f=0;
|
||||
var pp=["numberbox","slider"];
|
||||
for(var i=0;i<pp.length;i++){
|
||||
var p=pp[i];
|
||||
var f=$(_10).find("input["+p+"Name=\""+_1e+"\"]");
|
||||
if(f.length){
|
||||
f[p]("setValue",val);
|
||||
_1f+=f.length;
|
||||
}
|
||||
}
|
||||
return _1f;
|
||||
};
|
||||
function _1c(_20,val){
|
||||
var _21=$(_10);
|
||||
var cc=["combobox","combotree","combogrid","datetimebox","datebox","combo"];
|
||||
var c=_21.find("[comboName=\""+_20+"\"]");
|
||||
if(c.length){
|
||||
for(var i=0;i<cc.length;i++){
|
||||
var _22=cc[i];
|
||||
if(c.hasClass(_22+"-f")){
|
||||
if(c[_22]("options").multiple){
|
||||
c[_22]("setValues",val);
|
||||
}else{
|
||||
c[_22]("setValue",val);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _23(_24){
|
||||
$("input,select,textarea",_24).each(function(){
|
||||
var t=this.type,tag=this.tagName.toLowerCase();
|
||||
if(t=="text"||t=="hidden"||t=="password"||tag=="textarea"){
|
||||
this.value="";
|
||||
}else{
|
||||
if(t=="file"){
|
||||
var _25=$(this);
|
||||
_25.after(_25.clone().val(""));
|
||||
_25.remove();
|
||||
}else{
|
||||
if(t=="checkbox"||t=="radio"){
|
||||
this.checked=false;
|
||||
}else{
|
||||
if(tag=="select"){
|
||||
this.selectedIndex=-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var t=$(_24);
|
||||
var _26=["combo","combobox","combotree","combogrid","slider"];
|
||||
for(var i=0;i<_26.length;i++){
|
||||
var _27=_26[i];
|
||||
var r=t.find("."+_27+"-f");
|
||||
if(r.length&&r[_27]){
|
||||
r[_27]("clear");
|
||||
}
|
||||
}
|
||||
_28(_24);
|
||||
};
|
||||
function _29(_2a){
|
||||
_2a.reset();
|
||||
var t=$(_2a);
|
||||
var _2b=["combo","combobox","combotree","combogrid","datebox","datetimebox","spinner","timespinner","numberbox","numberspinner","slider"];
|
||||
for(var i=0;i<_2b.length;i++){
|
||||
var _2c=_2b[i];
|
||||
var r=t.find("."+_2c+"-f");
|
||||
if(r.length&&r[_2c]){
|
||||
r[_2c]("reset");
|
||||
}
|
||||
}
|
||||
_28(_2a);
|
||||
};
|
||||
function _2d(_2e){
|
||||
var _2f=$.data(_2e,"form").options;
|
||||
var _30=$(_2e);
|
||||
_30.unbind(".form").bind("submit.form",function(){
|
||||
setTimeout(function(){
|
||||
_1(_2e,_2f);
|
||||
},0);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _28(_31){
|
||||
if($.fn.validatebox){
|
||||
var t=$(_31);
|
||||
t.find(".validatebox-text:not(:disabled)").validatebox("validate");
|
||||
var _32=t.find(".validatebox-invalid");
|
||||
_32.filter(":not(:disabled):first").focus();
|
||||
return _32.length==0;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
function _33(_34,_35){
|
||||
$(_34).find(".validatebox-text:not(:disabled)").validatebox(_35?"disableValidation":"enableValidation");
|
||||
};
|
||||
$.fn.form=function(_36,_37){
|
||||
if(typeof _36=="string"){
|
||||
return $.fn.form.methods[_36](this,_37);
|
||||
}
|
||||
_36=_36||{};
|
||||
return this.each(function(){
|
||||
if(!$.data(this,"form")){
|
||||
$.data(this,"form",{options:$.extend({},$.fn.form.defaults,_36)});
|
||||
}
|
||||
_2d(this);
|
||||
});
|
||||
};
|
||||
$.fn.form.methods={submit:function(jq,_38){
|
||||
return jq.each(function(){
|
||||
_1(this,$.extend({},$.fn.form.defaults,_38||{}));
|
||||
});
|
||||
},load:function(jq,_39){
|
||||
return jq.each(function(){
|
||||
_f(this,_39);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
_23(this);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
_29(this);
|
||||
});
|
||||
},validate:function(jq){
|
||||
return _28(jq[0]);
|
||||
},disableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_33(this,true);
|
||||
});
|
||||
},enableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_33(this,false);
|
||||
});
|
||||
}};
|
||||
$.fn.form.defaults={url:null,onSubmit:function(_3a){
|
||||
return $(this).form("validate");
|
||||
},success:function(_3b){
|
||||
},onBeforeLoad:function(_3c){
|
||||
},onLoadSuccess:function(_3d){
|
||||
},onLoadError:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
433
WebRoot/js/easyui-1.3.5/plugins/jquery.layout.js
Normal file
433
WebRoot/js/easyui-1.3.5/plugins/jquery.layout.js
Normal file
@@ -0,0 +1,433 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
var _1=false;
|
||||
function _2(_3){
|
||||
var _4=$.data(_3,"layout");
|
||||
var _5=_4.options;
|
||||
var _6=_4.panels;
|
||||
var cc=$(_3);
|
||||
if(_3.tagName=="BODY"){
|
||||
cc._fit();
|
||||
}else{
|
||||
_5.fit?cc.css(cc._fit()):cc._fit(false);
|
||||
}
|
||||
var _7={top:0,left:0,width:cc.width(),height:cc.height()};
|
||||
_8(_9(_6.expandNorth)?_6.expandNorth:_6.north,"n");
|
||||
_8(_9(_6.expandSouth)?_6.expandSouth:_6.south,"s");
|
||||
_a(_9(_6.expandEast)?_6.expandEast:_6.east,"e");
|
||||
_a(_9(_6.expandWest)?_6.expandWest:_6.west,"w");
|
||||
_6.center.panel("resize",_7);
|
||||
function _b(pp){
|
||||
var _c=pp.panel("options");
|
||||
return Math.min(Math.max(_c.height,_c.minHeight),_c.maxHeight);
|
||||
};
|
||||
function _d(pp){
|
||||
var _e=pp.panel("options");
|
||||
return Math.min(Math.max(_e.width,_e.minWidth),_e.maxWidth);
|
||||
};
|
||||
function _8(pp,_f){
|
||||
if(!pp.length){
|
||||
return;
|
||||
}
|
||||
var _10=pp.panel("options");
|
||||
var _11=_b(pp);
|
||||
pp.panel("resize",{width:cc.width(),height:_11,left:0,top:(_f=="n"?0:cc.height()-_11)});
|
||||
_7.height-=_11;
|
||||
if(_f=="n"){
|
||||
_7.top+=_11;
|
||||
if(!_10.split&&_10.border){
|
||||
_7.top--;
|
||||
}
|
||||
}
|
||||
if(!_10.split&&_10.border){
|
||||
_7.height++;
|
||||
}
|
||||
};
|
||||
function _a(pp,_12){
|
||||
if(!pp.length){
|
||||
return;
|
||||
}
|
||||
var _13=pp.panel("options");
|
||||
var _14=_d(pp);
|
||||
pp.panel("resize",{width:_14,height:_7.height,left:(_12=="e"?cc.width()-_14:0),top:_7.top});
|
||||
_7.width-=_14;
|
||||
if(_12=="w"){
|
||||
_7.left+=_14;
|
||||
if(!_13.split&&_13.border){
|
||||
_7.left--;
|
||||
}
|
||||
}
|
||||
if(!_13.split&&_13.border){
|
||||
_7.width++;
|
||||
}
|
||||
};
|
||||
};
|
||||
function _15(_16){
|
||||
var cc=$(_16);
|
||||
cc.addClass("layout");
|
||||
function _17(cc){
|
||||
cc.children("div").each(function(){
|
||||
var _18=$.fn.layout.parsePanelOptions(this);
|
||||
if("north,south,east,west,center".indexOf(_18.region)>=0){
|
||||
_1b(_16,_18,this);
|
||||
}
|
||||
});
|
||||
};
|
||||
cc.children("form").length?_17(cc.children("form")):_17(cc);
|
||||
cc.append("<div class=\"layout-split-proxy-h\"></div><div class=\"layout-split-proxy-v\"></div>");
|
||||
cc.bind("_resize",function(e,_19){
|
||||
var _1a=$.data(_16,"layout").options;
|
||||
if(_1a.fit==true||_19){
|
||||
_2(_16);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _1b(_1c,_1d,el){
|
||||
_1d.region=_1d.region||"center";
|
||||
var _1e=$.data(_1c,"layout").panels;
|
||||
var cc=$(_1c);
|
||||
var dir=_1d.region;
|
||||
if(_1e[dir].length){
|
||||
return;
|
||||
}
|
||||
var pp=$(el);
|
||||
if(!pp.length){
|
||||
pp=$("<div></div>").appendTo(cc);
|
||||
}
|
||||
var _1f=$.extend({},$.fn.layout.paneldefaults,{width:(pp.length?parseInt(pp[0].style.width)||pp.outerWidth():"auto"),height:(pp.length?parseInt(pp[0].style.height)||pp.outerHeight():"auto"),doSize:false,collapsible:true,cls:("layout-panel layout-panel-"+dir),bodyCls:"layout-body",onOpen:function(){
|
||||
var _20=$(this).panel("header").children("div.panel-tool");
|
||||
_20.children("a.panel-tool-collapse").hide();
|
||||
var _21={north:"up",south:"down",east:"right",west:"left"};
|
||||
if(!_21[dir]){
|
||||
return;
|
||||
}
|
||||
var _22="layout-button-"+_21[dir];
|
||||
var t=_20.children("a."+_22);
|
||||
if(!t.length){
|
||||
t=$("<a href=\"javascript:void(0)\"></a>").addClass(_22).appendTo(_20);
|
||||
t.bind("click",{dir:dir},function(e){
|
||||
_2f(_1c,e.data.dir);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
$(this).panel("options").collapsible?t.show():t.hide();
|
||||
}},_1d);
|
||||
pp.panel(_1f);
|
||||
_1e[dir]=pp;
|
||||
if(pp.panel("options").split){
|
||||
var _23=pp.panel("panel");
|
||||
_23.addClass("layout-split-"+dir);
|
||||
var _24="";
|
||||
if(dir=="north"){
|
||||
_24="s";
|
||||
}
|
||||
if(dir=="south"){
|
||||
_24="n";
|
||||
}
|
||||
if(dir=="east"){
|
||||
_24="w";
|
||||
}
|
||||
if(dir=="west"){
|
||||
_24="e";
|
||||
}
|
||||
_23.resizable($.extend({},{handles:_24,onStartResize:function(e){
|
||||
_1=true;
|
||||
if(dir=="north"||dir=="south"){
|
||||
var _25=$(">div.layout-split-proxy-v",_1c);
|
||||
}else{
|
||||
var _25=$(">div.layout-split-proxy-h",_1c);
|
||||
}
|
||||
var top=0,_26=0,_27=0,_28=0;
|
||||
var pos={display:"block"};
|
||||
if(dir=="north"){
|
||||
pos.top=parseInt(_23.css("top"))+_23.outerHeight()-_25.height();
|
||||
pos.left=parseInt(_23.css("left"));
|
||||
pos.width=_23.outerWidth();
|
||||
pos.height=_25.height();
|
||||
}else{
|
||||
if(dir=="south"){
|
||||
pos.top=parseInt(_23.css("top"));
|
||||
pos.left=parseInt(_23.css("left"));
|
||||
pos.width=_23.outerWidth();
|
||||
pos.height=_25.height();
|
||||
}else{
|
||||
if(dir=="east"){
|
||||
pos.top=parseInt(_23.css("top"))||0;
|
||||
pos.left=parseInt(_23.css("left"))||0;
|
||||
pos.width=_25.width();
|
||||
pos.height=_23.outerHeight();
|
||||
}else{
|
||||
if(dir=="west"){
|
||||
pos.top=parseInt(_23.css("top"))||0;
|
||||
pos.left=_23.outerWidth()-_25.width();
|
||||
pos.width=_25.width();
|
||||
pos.height=_23.outerHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_25.css(pos);
|
||||
$("<div class=\"layout-mask\"></div>").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc);
|
||||
},onResize:function(e){
|
||||
if(dir=="north"||dir=="south"){
|
||||
var _29=$(">div.layout-split-proxy-v",_1c);
|
||||
_29.css("top",e.pageY-$(_1c).offset().top-_29.height()/2);
|
||||
}else{
|
||||
var _29=$(">div.layout-split-proxy-h",_1c);
|
||||
_29.css("left",e.pageX-$(_1c).offset().left-_29.width()/2);
|
||||
}
|
||||
return false;
|
||||
},onStopResize:function(e){
|
||||
cc.children("div.layout-split-proxy-v,div.layout-split-proxy-h").hide();
|
||||
pp.panel("resize",e.data);
|
||||
_2(_1c);
|
||||
_1=false;
|
||||
cc.find(">div.layout-mask").remove();
|
||||
}},_1d));
|
||||
}
|
||||
};
|
||||
function _2a(_2b,_2c){
|
||||
var _2d=$.data(_2b,"layout").panels;
|
||||
if(_2d[_2c].length){
|
||||
_2d[_2c].panel("destroy");
|
||||
_2d[_2c]=$();
|
||||
var _2e="expand"+_2c.substring(0,1).toUpperCase()+_2c.substring(1);
|
||||
if(_2d[_2e]){
|
||||
_2d[_2e].panel("destroy");
|
||||
_2d[_2e]=undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _2f(_30,_31,_32){
|
||||
if(_32==undefined){
|
||||
_32="normal";
|
||||
}
|
||||
var _33=$.data(_30,"layout").panels;
|
||||
var p=_33[_31];
|
||||
var _34=p.panel("options");
|
||||
if(_34.onBeforeCollapse.call(p)==false){
|
||||
return;
|
||||
}
|
||||
var _35="expand"+_31.substring(0,1).toUpperCase()+_31.substring(1);
|
||||
if(!_33[_35]){
|
||||
_33[_35]=_36(_31);
|
||||
_33[_35].panel("panel").bind("click",function(){
|
||||
var _37=_38();
|
||||
p.panel("expand",false).panel("open").panel("resize",_37.collapse);
|
||||
p.panel("panel").animate(_37.expand,function(){
|
||||
$(this).unbind(".layout").bind("mouseleave.layout",{region:_31},function(e){
|
||||
if(_1==true){
|
||||
return;
|
||||
}
|
||||
_2f(_30,e.data.region);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
var _39=_38();
|
||||
if(!_9(_33[_35])){
|
||||
_33.center.panel("resize",_39.resizeC);
|
||||
}
|
||||
p.panel("panel").animate(_39.collapse,_32,function(){
|
||||
p.panel("collapse",false).panel("close");
|
||||
_33[_35].panel("open").panel("resize",_39.expandP);
|
||||
$(this).unbind(".layout");
|
||||
});
|
||||
function _36(dir){
|
||||
var _3a;
|
||||
if(dir=="east"){
|
||||
_3a="layout-button-left";
|
||||
}else{
|
||||
if(dir=="west"){
|
||||
_3a="layout-button-right";
|
||||
}else{
|
||||
if(dir=="north"){
|
||||
_3a="layout-button-down";
|
||||
}else{
|
||||
if(dir=="south"){
|
||||
_3a="layout-button-up";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var p=$("<div></div>").appendTo(_30);
|
||||
p.panel($.extend({},$.fn.layout.paneldefaults,{cls:("layout-expand layout-expand-"+dir),title:" ",closed:true,doSize:false,tools:[{iconCls:_3a,handler:function(){
|
||||
_3c(_30,_31);
|
||||
return false;
|
||||
}}]}));
|
||||
p.panel("panel").hover(function(){
|
||||
$(this).addClass("layout-expand-over");
|
||||
},function(){
|
||||
$(this).removeClass("layout-expand-over");
|
||||
});
|
||||
return p;
|
||||
};
|
||||
function _38(){
|
||||
var cc=$(_30);
|
||||
var _3b=_33.center.panel("options");
|
||||
if(_31=="east"){
|
||||
var ww=_3b.width+_34.width-28;
|
||||
if(_34.split||!_34.border){
|
||||
ww++;
|
||||
}
|
||||
return {resizeC:{width:ww},expand:{left:cc.width()-_34.width},expandP:{top:_3b.top,left:cc.width()-28,width:28,height:_3b.height},collapse:{left:cc.width(),top:_3b.top,height:_3b.height}};
|
||||
}else{
|
||||
if(_31=="west"){
|
||||
var ww=_3b.width+_34.width-28;
|
||||
if(_34.split||!_34.border){
|
||||
ww++;
|
||||
}
|
||||
return {resizeC:{width:ww,left:28-1},expand:{left:0},expandP:{left:0,top:_3b.top,width:28,height:_3b.height},collapse:{left:-_34.width,top:_3b.top,height:_3b.height}};
|
||||
}else{
|
||||
if(_31=="north"){
|
||||
var hh=_3b.height;
|
||||
if(!_9(_33.expandNorth)){
|
||||
hh+=_34.height-28+((_34.split||!_34.border)?1:0);
|
||||
}
|
||||
_33.east.add(_33.west).add(_33.expandEast).add(_33.expandWest).panel("resize",{top:28-1,height:hh});
|
||||
return {resizeC:{top:28-1,height:hh},expand:{top:0},expandP:{top:0,left:0,width:cc.width(),height:28},collapse:{top:-_34.height,width:cc.width()}};
|
||||
}else{
|
||||
if(_31=="south"){
|
||||
var hh=_3b.height;
|
||||
if(!_9(_33.expandSouth)){
|
||||
hh+=_34.height-28+((_34.split||!_34.border)?1:0);
|
||||
}
|
||||
_33.east.add(_33.west).add(_33.expandEast).add(_33.expandWest).panel("resize",{height:hh});
|
||||
return {resizeC:{height:hh},expand:{top:cc.height()-_34.height},expandP:{top:cc.height()-28,left:0,width:cc.width(),height:28},collapse:{top:cc.height(),width:cc.width()}};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"layout").panels;
|
||||
var p=_3f[_3e];
|
||||
var _40=p.panel("options");
|
||||
if(_40.onBeforeExpand.call(p)==false){
|
||||
return;
|
||||
}
|
||||
var _41=_42();
|
||||
var _43="expand"+_3e.substring(0,1).toUpperCase()+_3e.substring(1);
|
||||
if(_3f[_43]){
|
||||
_3f[_43].panel("close");
|
||||
p.panel("panel").stop(true,true);
|
||||
p.panel("expand",false).panel("open").panel("resize",_41.collapse);
|
||||
p.panel("panel").animate(_41.expand,function(){
|
||||
_2(_3d);
|
||||
});
|
||||
}
|
||||
function _42(){
|
||||
var cc=$(_3d);
|
||||
var _44=_3f.center.panel("options");
|
||||
if(_3e=="east"&&_3f.expandEast){
|
||||
return {collapse:{left:cc.width(),top:_44.top,height:_44.height},expand:{left:cc.width()-_3f["east"].panel("options").width}};
|
||||
}else{
|
||||
if(_3e=="west"&&_3f.expandWest){
|
||||
return {collapse:{left:-_3f["west"].panel("options").width,top:_44.top,height:_44.height},expand:{left:0}};
|
||||
}else{
|
||||
if(_3e=="north"&&_3f.expandNorth){
|
||||
return {collapse:{top:-_3f["north"].panel("options").height,width:cc.width()},expand:{top:0}};
|
||||
}else{
|
||||
if(_3e=="south"&&_3f.expandSouth){
|
||||
return {collapse:{top:cc.height(),width:cc.width()},expand:{top:cc.height()-_3f["south"].panel("options").height}};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _9(pp){
|
||||
if(!pp){
|
||||
return false;
|
||||
}
|
||||
if(pp.length){
|
||||
return pp.panel("panel").is(":visible");
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
function _45(_46){
|
||||
var _47=$.data(_46,"layout").panels;
|
||||
if(_47.east.length&&_47.east.panel("options").collapsed){
|
||||
_2f(_46,"east",0);
|
||||
}
|
||||
if(_47.west.length&&_47.west.panel("options").collapsed){
|
||||
_2f(_46,"west",0);
|
||||
}
|
||||
if(_47.north.length&&_47.north.panel("options").collapsed){
|
||||
_2f(_46,"north",0);
|
||||
}
|
||||
if(_47.south.length&&_47.south.panel("options").collapsed){
|
||||
_2f(_46,"south",0);
|
||||
}
|
||||
};
|
||||
$.fn.layout=function(_48,_49){
|
||||
if(typeof _48=="string"){
|
||||
return $.fn.layout.methods[_48](this,_49);
|
||||
}
|
||||
_48=_48||{};
|
||||
return this.each(function(){
|
||||
var _4a=$.data(this,"layout");
|
||||
if(_4a){
|
||||
$.extend(_4a.options,_48);
|
||||
}else{
|
||||
var _4b=$.extend({},$.fn.layout.defaults,$.fn.layout.parseOptions(this),_48);
|
||||
$.data(this,"layout",{options:_4b,panels:{center:$(),north:$(),south:$(),east:$(),west:$()}});
|
||||
_15(this);
|
||||
}
|
||||
_2(this);
|
||||
_45(this);
|
||||
});
|
||||
};
|
||||
$.fn.layout.methods={resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_2(this);
|
||||
});
|
||||
},panel:function(jq,_4c){
|
||||
return $.data(jq[0],"layout").panels[_4c];
|
||||
},collapse:function(jq,_4d){
|
||||
return jq.each(function(){
|
||||
_2f(this,_4d);
|
||||
});
|
||||
},expand:function(jq,_4e){
|
||||
return jq.each(function(){
|
||||
_3c(this,_4e);
|
||||
});
|
||||
},add:function(jq,_4f){
|
||||
return jq.each(function(){
|
||||
_1b(this,_4f);
|
||||
_2(this);
|
||||
if($(this).layout("panel",_4f.region).panel("options").collapsed){
|
||||
_2f(this,_4f.region,0);
|
||||
}
|
||||
});
|
||||
},remove:function(jq,_50){
|
||||
return jq.each(function(){
|
||||
_2a(this,_50);
|
||||
_2(this);
|
||||
});
|
||||
}};
|
||||
$.fn.layout.parseOptions=function(_51){
|
||||
return $.extend({},$.parser.parseOptions(_51,[{fit:"boolean"}]));
|
||||
};
|
||||
$.fn.layout.defaults={fit:false};
|
||||
$.fn.layout.parsePanelOptions=function(_52){
|
||||
var t=$(_52);
|
||||
return $.extend({},$.fn.panel.parseOptions(_52),$.parser.parseOptions(_52,["region",{split:"boolean",minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number"}]));
|
||||
};
|
||||
$.fn.layout.paneldefaults=$.extend({},$.fn.panel.defaults,{region:null,split:false,minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000});
|
||||
})(jQuery);
|
||||
|
||||
144
WebRoot/js/easyui-1.3.5/plugins/jquery.linkbutton.js
Normal file
144
WebRoot/js/easyui-1.3.5/plugins/jquery.linkbutton.js
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"linkbutton").options;
|
||||
var t=$(_2);
|
||||
t.addClass("l-btn").removeClass("l-btn-plain l-btn-selected l-btn-plain-selected");
|
||||
if(_3.plain){
|
||||
t.addClass("l-btn-plain");
|
||||
}
|
||||
if(_3.selected){
|
||||
t.addClass(_3.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected");
|
||||
}
|
||||
t.attr("group",_3.group||"");
|
||||
t.attr("id",_3.id||"");
|
||||
t.html("<span class=\"l-btn-left\">"+"<span class=\"l-btn-text\"></span>"+"</span>");
|
||||
if(_3.text){
|
||||
t.find(".l-btn-text").html(_3.text);
|
||||
if(_3.iconCls){
|
||||
t.find(".l-btn-text").addClass(_3.iconCls).addClass(_3.iconAlign=="left"?"l-btn-icon-left":"l-btn-icon-right");
|
||||
}
|
||||
}else{
|
||||
t.find(".l-btn-text").html("<span class=\"l-btn-empty\"> </span>");
|
||||
if(_3.iconCls){
|
||||
t.find(".l-btn-empty").addClass(_3.iconCls);
|
||||
}
|
||||
}
|
||||
t.unbind(".linkbutton").bind("focus.linkbutton",function(){
|
||||
if(!_3.disabled){
|
||||
$(this).find(".l-btn-text").addClass("l-btn-focus");
|
||||
}
|
||||
}).bind("blur.linkbutton",function(){
|
||||
$(this).find(".l-btn-text").removeClass("l-btn-focus");
|
||||
});
|
||||
if(_3.toggle&&!_3.disabled){
|
||||
t.bind("click.linkbutton",function(){
|
||||
if(_3.selected){
|
||||
$(this).linkbutton("unselect");
|
||||
}else{
|
||||
$(this).linkbutton("select");
|
||||
}
|
||||
});
|
||||
}
|
||||
_4(_2,_3.selected);
|
||||
_5(_2,_3.disabled);
|
||||
};
|
||||
function _4(_6,_7){
|
||||
var _8=$.data(_6,"linkbutton").options;
|
||||
if(_7){
|
||||
if(_8.group){
|
||||
$("a.l-btn[group=\""+_8.group+"\"]").each(function(){
|
||||
var o=$(this).linkbutton("options");
|
||||
if(o.toggle){
|
||||
$(this).removeClass("l-btn-selected l-btn-plain-selected");
|
||||
o.selected=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
$(_6).addClass(_8.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected");
|
||||
_8.selected=true;
|
||||
}else{
|
||||
if(!_8.group){
|
||||
$(_6).removeClass("l-btn-selected l-btn-plain-selected");
|
||||
_8.selected=false;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _5(_9,_a){
|
||||
var _b=$.data(_9,"linkbutton");
|
||||
var _c=_b.options;
|
||||
$(_9).removeClass("l-btn-disabled l-btn-plain-disabled");
|
||||
if(_a){
|
||||
_c.disabled=true;
|
||||
var _d=$(_9).attr("href");
|
||||
if(_d){
|
||||
_b.href=_d;
|
||||
$(_9).attr("href","javascript:void(0)");
|
||||
}
|
||||
if(_9.onclick){
|
||||
_b.onclick=_9.onclick;
|
||||
_9.onclick=null;
|
||||
}
|
||||
_c.plain?$(_9).addClass("l-btn-disabled l-btn-plain-disabled"):$(_9).addClass("l-btn-disabled");
|
||||
}else{
|
||||
_c.disabled=false;
|
||||
if(_b.href){
|
||||
$(_9).attr("href",_b.href);
|
||||
}
|
||||
if(_b.onclick){
|
||||
_9.onclick=_b.onclick;
|
||||
}
|
||||
}
|
||||
};
|
||||
$.fn.linkbutton=function(_e,_f){
|
||||
if(typeof _e=="string"){
|
||||
return $.fn.linkbutton.methods[_e](this,_f);
|
||||
}
|
||||
_e=_e||{};
|
||||
return this.each(function(){
|
||||
var _10=$.data(this,"linkbutton");
|
||||
if(_10){
|
||||
$.extend(_10.options,_e);
|
||||
}else{
|
||||
$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,$.fn.linkbutton.parseOptions(this),_e)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.linkbutton.methods={options:function(jq){
|
||||
return $.data(jq[0],"linkbutton").options;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_5(this,false);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_5(this,true);
|
||||
});
|
||||
},select:function(jq){
|
||||
return jq.each(function(){
|
||||
_4(this,true);
|
||||
});
|
||||
},unselect:function(jq){
|
||||
return jq.each(function(){
|
||||
_4(this,false);
|
||||
});
|
||||
}};
|
||||
$.fn.linkbutton.parseOptions=function(_11){
|
||||
var t=$(_11);
|
||||
return $.extend({},$.parser.parseOptions(_11,["id","iconCls","iconAlign","group",{plain:"boolean",toggle:"boolean",selected:"boolean"}]),{disabled:(t.attr("disabled")?true:undefined),text:$.trim(t.html()),iconCls:(t.attr("icon")||t.attr("iconCls"))});
|
||||
};
|
||||
$.fn.linkbutton.defaults={id:null,disabled:false,toggle:false,selected:false,group:null,plain:false,text:"",iconCls:null,iconAlign:"left"};
|
||||
})(jQuery);
|
||||
|
||||
427
WebRoot/js/easyui-1.3.5/plugins/jquery.menu.js
Normal file
427
WebRoot/js/easyui-1.3.5/plugins/jquery.menu.js
Normal file
@@ -0,0 +1,427 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).appendTo("body");
|
||||
$(_2).addClass("menu-top");
|
||||
$(document).unbind(".menu").bind("mousedown.menu",function(e){
|
||||
var _3=$("body>div.menu:visible");
|
||||
var m=$(e.target).closest("div.menu",_3);
|
||||
if(m.length){
|
||||
return;
|
||||
}
|
||||
$("body>div.menu-top:visible").menu("hide");
|
||||
});
|
||||
var _4=_5($(_2));
|
||||
for(var i=0;i<_4.length;i++){
|
||||
_6(_4[i]);
|
||||
}
|
||||
function _5(_7){
|
||||
var _8=[];
|
||||
_7.addClass("menu");
|
||||
_8.push(_7);
|
||||
if(!_7.hasClass("menu-content")){
|
||||
_7.children("div").each(function(){
|
||||
var _9=$(this).children("div");
|
||||
if(_9.length){
|
||||
_9.insertAfter(_2);
|
||||
this.submenu=_9;
|
||||
var mm=_5(_9);
|
||||
_8=_8.concat(mm);
|
||||
}
|
||||
});
|
||||
}
|
||||
return _8;
|
||||
};
|
||||
function _6(_a){
|
||||
var _b=$.parser.parseOptions(_a[0],["width"]).width;
|
||||
if(_a.hasClass("menu-content")){
|
||||
_a[0].originalWidth=_b||_a._outerWidth();
|
||||
}else{
|
||||
_a[0].originalWidth=_b||0;
|
||||
_a.children("div").each(function(){
|
||||
var _c=$(this);
|
||||
var _d=$.extend({},$.parser.parseOptions(this,["name","iconCls","href",{separator:"boolean"}]),{disabled:(_c.attr("disabled")?true:undefined)});
|
||||
if(_d.separator){
|
||||
_c.addClass("menu-sep");
|
||||
}
|
||||
if(!_c.hasClass("menu-sep")){
|
||||
_c[0].itemName=_d.name||"";
|
||||
_c[0].itemHref=_d.href||"";
|
||||
var _e=_c.addClass("menu-item").html();
|
||||
_c.empty().append($("<div class=\"menu-text\"></div>").html(_e));
|
||||
if(_d.iconCls){
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_d.iconCls).appendTo(_c);
|
||||
}
|
||||
if(_d.disabled){
|
||||
_f(_2,_c[0],true);
|
||||
}
|
||||
if(_c[0].submenu){
|
||||
$("<div class=\"menu-rightarrow\"></div>").appendTo(_c);
|
||||
}
|
||||
_10(_2,_c);
|
||||
}
|
||||
});
|
||||
$("<div class=\"menu-line\"></div>").prependTo(_a);
|
||||
}
|
||||
_11(_2,_a);
|
||||
_a.hide();
|
||||
_12(_2,_a);
|
||||
};
|
||||
};
|
||||
function _11(_13,_14){
|
||||
var _15=$.data(_13,"menu").options;
|
||||
var _16=_14.attr("style");
|
||||
_14.css({display:"block",left:-10000,height:"auto",overflow:"hidden"});
|
||||
var _17=0;
|
||||
_14.find("div.menu-text").each(function(){
|
||||
if(_17<$(this)._outerWidth()){
|
||||
_17=$(this)._outerWidth();
|
||||
}
|
||||
$(this).closest("div.menu-item")._outerHeight($(this)._outerHeight()+2);
|
||||
});
|
||||
_17+=65;
|
||||
_14._outerWidth(Math.max((_14[0].originalWidth||0),_17,_15.minWidth));
|
||||
_14.children("div.menu-line")._outerHeight(_14.outerHeight());
|
||||
_14.attr("style",_16);
|
||||
};
|
||||
function _12(_18,_19){
|
||||
var _1a=$.data(_18,"menu");
|
||||
_19.unbind(".menu").bind("mouseenter.menu",function(){
|
||||
if(_1a.timer){
|
||||
clearTimeout(_1a.timer);
|
||||
_1a.timer=null;
|
||||
}
|
||||
}).bind("mouseleave.menu",function(){
|
||||
if(_1a.options.hideOnUnhover){
|
||||
_1a.timer=setTimeout(function(){
|
||||
_1b(_18);
|
||||
},100);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _10(_1c,_1d){
|
||||
if(!_1d.hasClass("menu-item")){
|
||||
return;
|
||||
}
|
||||
_1d.unbind(".menu");
|
||||
_1d.bind("click.menu",function(){
|
||||
if($(this).hasClass("menu-item-disabled")){
|
||||
return;
|
||||
}
|
||||
if(!this.submenu){
|
||||
_1b(_1c);
|
||||
var _1e=$(this).attr("href");
|
||||
if(_1e){
|
||||
location.href=_1e;
|
||||
}
|
||||
}
|
||||
var _1f=$(_1c).menu("getItem",this);
|
||||
$.data(_1c,"menu").options.onClick.call(_1c,_1f);
|
||||
}).bind("mouseenter.menu",function(e){
|
||||
_1d.siblings().each(function(){
|
||||
if(this.submenu){
|
||||
_22(this.submenu);
|
||||
}
|
||||
$(this).removeClass("menu-active");
|
||||
});
|
||||
_1d.addClass("menu-active");
|
||||
if($(this).hasClass("menu-item-disabled")){
|
||||
_1d.addClass("menu-active-disabled");
|
||||
return;
|
||||
}
|
||||
var _20=_1d[0].submenu;
|
||||
if(_20){
|
||||
$(_1c).menu("show",{menu:_20,parent:_1d});
|
||||
}
|
||||
}).bind("mouseleave.menu",function(e){
|
||||
_1d.removeClass("menu-active menu-active-disabled");
|
||||
var _21=_1d[0].submenu;
|
||||
if(_21){
|
||||
if(e.pageX>=parseInt(_21.css("left"))){
|
||||
_1d.addClass("menu-active");
|
||||
}else{
|
||||
_22(_21);
|
||||
}
|
||||
}else{
|
||||
_1d.removeClass("menu-active");
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1b(_23){
|
||||
var _24=$.data(_23,"menu");
|
||||
if(_24){
|
||||
if($(_23).is(":visible")){
|
||||
_22($(_23));
|
||||
_24.options.onHide.call(_23);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
function _25(_26,_27){
|
||||
var _28,top;
|
||||
_27=_27||{};
|
||||
var _29=$(_27.menu||_26);
|
||||
if(_29.hasClass("menu-top")){
|
||||
var _2a=$.data(_26,"menu").options;
|
||||
$.extend(_2a,_27);
|
||||
_28=_2a.left;
|
||||
top=_2a.top;
|
||||
if(_2a.alignTo){
|
||||
var at=$(_2a.alignTo);
|
||||
_28=at.offset().left;
|
||||
top=at.offset().top+at._outerHeight();
|
||||
}
|
||||
if(_28+_29.outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){
|
||||
_28=$(window)._outerWidth()+$(document).scrollLeft()-_29.outerWidth()-5;
|
||||
}
|
||||
if(top+_29.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=$(window)._outerHeight()+$(document).scrollTop()-_29.outerHeight()-5;
|
||||
}
|
||||
}else{
|
||||
var _2b=_27.parent;
|
||||
_28=_2b.offset().left+_2b.outerWidth()-2;
|
||||
if(_28+_29.outerWidth()+5>$(window)._outerWidth()+$(document).scrollLeft()){
|
||||
_28=_2b.offset().left-_29.outerWidth()+2;
|
||||
}
|
||||
var top=_2b.offset().top-3;
|
||||
if(top+_29.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=$(window)._outerHeight()+$(document).scrollTop()-_29.outerHeight()-5;
|
||||
}
|
||||
}
|
||||
_29.css({left:_28,top:top});
|
||||
_29.show(0,function(){
|
||||
if(!_29[0].shadow){
|
||||
_29[0].shadow=$("<div class=\"menu-shadow\"></div>").insertAfter(_29);
|
||||
}
|
||||
_29[0].shadow.css({display:"block",zIndex:$.fn.menu.defaults.zIndex++,left:_29.css("left"),top:_29.css("top"),width:_29.outerWidth(),height:_29.outerHeight()});
|
||||
_29.css("z-index",$.fn.menu.defaults.zIndex++);
|
||||
if(_29.hasClass("menu-top")){
|
||||
$.data(_29[0],"menu").options.onShow.call(_29[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _22(_2c){
|
||||
if(!_2c){
|
||||
return;
|
||||
}
|
||||
_2d(_2c);
|
||||
_2c.find("div.menu-item").each(function(){
|
||||
if(this.submenu){
|
||||
_22(this.submenu);
|
||||
}
|
||||
$(this).removeClass("menu-active");
|
||||
});
|
||||
function _2d(m){
|
||||
m.stop(true,true);
|
||||
if(m[0].shadow){
|
||||
m[0].shadow.hide();
|
||||
}
|
||||
m.hide();
|
||||
};
|
||||
};
|
||||
function _2e(_2f,_30){
|
||||
var _31=null;
|
||||
var tmp=$("<div></div>");
|
||||
function _32(_33){
|
||||
_33.children("div.menu-item").each(function(){
|
||||
var _34=$(_2f).menu("getItem",this);
|
||||
var s=tmp.empty().html(_34.text).text();
|
||||
if(_30==$.trim(s)){
|
||||
_31=_34;
|
||||
}else{
|
||||
if(this.submenu&&!_31){
|
||||
_32(this.submenu);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
_32($(_2f));
|
||||
tmp.remove();
|
||||
return _31;
|
||||
};
|
||||
function _f(_35,_36,_37){
|
||||
var t=$(_36);
|
||||
if(!t.hasClass("menu-item")){
|
||||
return;
|
||||
}
|
||||
if(_37){
|
||||
t.addClass("menu-item-disabled");
|
||||
if(_36.onclick){
|
||||
_36.onclick1=_36.onclick;
|
||||
_36.onclick=null;
|
||||
}
|
||||
}else{
|
||||
t.removeClass("menu-item-disabled");
|
||||
if(_36.onclick1){
|
||||
_36.onclick=_36.onclick1;
|
||||
_36.onclick1=null;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _38(_39,_3a){
|
||||
var _3b=$(_39);
|
||||
if(_3a.parent){
|
||||
if(!_3a.parent.submenu){
|
||||
var _3c=$("<div class=\"menu\"><div class=\"menu-line\"></div></div>").appendTo("body");
|
||||
_3c.hide();
|
||||
_3a.parent.submenu=_3c;
|
||||
$("<div class=\"menu-rightarrow\"></div>").appendTo(_3a.parent);
|
||||
}
|
||||
_3b=_3a.parent.submenu;
|
||||
}
|
||||
if(_3a.separator){
|
||||
var _3d=$("<div class=\"menu-sep\"></div>").appendTo(_3b);
|
||||
}else{
|
||||
var _3d=$("<div class=\"menu-item\"></div>").appendTo(_3b);
|
||||
$("<div class=\"menu-text\"></div>").html(_3a.text).appendTo(_3d);
|
||||
}
|
||||
if(_3a.iconCls){
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_3a.iconCls).appendTo(_3d);
|
||||
}
|
||||
if(_3a.id){
|
||||
_3d.attr("id",_3a.id);
|
||||
}
|
||||
if(_3a.name){
|
||||
_3d[0].itemName=_3a.name;
|
||||
}
|
||||
if(_3a.href){
|
||||
_3d[0].itemHref=_3a.href;
|
||||
}
|
||||
if(_3a.onclick){
|
||||
if(typeof _3a.onclick=="string"){
|
||||
_3d.attr("onclick",_3a.onclick);
|
||||
}else{
|
||||
_3d[0].onclick=eval(_3a.onclick);
|
||||
}
|
||||
}
|
||||
if(_3a.handler){
|
||||
_3d[0].onclick=eval(_3a.handler);
|
||||
}
|
||||
if(_3a.disabled){
|
||||
_f(_39,_3d[0],true);
|
||||
}
|
||||
_10(_39,_3d);
|
||||
_12(_39,_3b);
|
||||
_11(_39,_3b);
|
||||
};
|
||||
function _3e(_3f,_40){
|
||||
function _41(el){
|
||||
if(el.submenu){
|
||||
el.submenu.children("div.menu-item").each(function(){
|
||||
_41(this);
|
||||
});
|
||||
var _42=el.submenu[0].shadow;
|
||||
if(_42){
|
||||
_42.remove();
|
||||
}
|
||||
el.submenu.remove();
|
||||
}
|
||||
$(el).remove();
|
||||
};
|
||||
_41(_40);
|
||||
};
|
||||
function _43(_44){
|
||||
$(_44).children("div.menu-item").each(function(){
|
||||
_3e(_44,this);
|
||||
});
|
||||
if(_44.shadow){
|
||||
_44.shadow.remove();
|
||||
}
|
||||
$(_44).remove();
|
||||
};
|
||||
$.fn.menu=function(_45,_46){
|
||||
if(typeof _45=="string"){
|
||||
return $.fn.menu.methods[_45](this,_46);
|
||||
}
|
||||
_45=_45||{};
|
||||
return this.each(function(){
|
||||
var _47=$.data(this,"menu");
|
||||
if(_47){
|
||||
$.extend(_47.options,_45);
|
||||
}else{
|
||||
_47=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,$.fn.menu.parseOptions(this),_45)});
|
||||
_1(this);
|
||||
}
|
||||
$(this).css({left:_47.options.left,top:_47.options.top});
|
||||
});
|
||||
};
|
||||
$.fn.menu.methods={options:function(jq){
|
||||
return $.data(jq[0],"menu").options;
|
||||
},show:function(jq,pos){
|
||||
return jq.each(function(){
|
||||
_25(this,pos);
|
||||
});
|
||||
},hide:function(jq){
|
||||
return jq.each(function(){
|
||||
_1b(this);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_43(this);
|
||||
});
|
||||
},setText:function(jq,_48){
|
||||
return jq.each(function(){
|
||||
$(_48.target).children("div.menu-text").html(_48.text);
|
||||
});
|
||||
},setIcon:function(jq,_49){
|
||||
return jq.each(function(){
|
||||
var _4a=$(this).menu("getItem",_49.target);
|
||||
if(_4a.iconCls){
|
||||
$(_4a.target).children("div.menu-icon").removeClass(_4a.iconCls).addClass(_49.iconCls);
|
||||
}else{
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_49.iconCls).appendTo(_49.target);
|
||||
}
|
||||
});
|
||||
},getItem:function(jq,_4b){
|
||||
var t=$(_4b);
|
||||
var _4c={target:_4b,id:t.attr("id"),text:$.trim(t.children("div.menu-text").html()),disabled:t.hasClass("menu-item-disabled"),name:_4b.itemName,href:_4b.itemHref,onclick:_4b.onclick};
|
||||
var _4d=t.children("div.menu-icon");
|
||||
if(_4d.length){
|
||||
var cc=[];
|
||||
var aa=_4d.attr("class").split(" ");
|
||||
for(var i=0;i<aa.length;i++){
|
||||
if(aa[i]!="menu-icon"){
|
||||
cc.push(aa[i]);
|
||||
}
|
||||
}
|
||||
_4c.iconCls=cc.join(" ");
|
||||
}
|
||||
return _4c;
|
||||
},findItem:function(jq,_4e){
|
||||
return _2e(jq[0],_4e);
|
||||
},appendItem:function(jq,_4f){
|
||||
return jq.each(function(){
|
||||
_38(this,_4f);
|
||||
});
|
||||
},removeItem:function(jq,_50){
|
||||
return jq.each(function(){
|
||||
_3e(this,_50);
|
||||
});
|
||||
},enableItem:function(jq,_51){
|
||||
return jq.each(function(){
|
||||
_f(this,_51,false);
|
||||
});
|
||||
},disableItem:function(jq,_52){
|
||||
return jq.each(function(){
|
||||
_f(this,_52,true);
|
||||
});
|
||||
}};
|
||||
$.fn.menu.parseOptions=function(_53){
|
||||
return $.extend({},$.parser.parseOptions(_53,["left","top",{minWidth:"number",hideOnUnhover:"boolean"}]));
|
||||
};
|
||||
$.fn.menu.defaults={zIndex:110000,left:0,top:0,minWidth:120,hideOnUnhover:true,onShow:function(){
|
||||
},onHide:function(){
|
||||
},onClick:function(_54){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
132
WebRoot/js/easyui-1.3.5/plugins/jquery.menubutton.js
Normal file
132
WebRoot/js/easyui-1.3.5/plugins/jquery.menubutton.js
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"menubutton").options;
|
||||
var _4=$(_2);
|
||||
_4.removeClass(_3.cls.btn1+" "+_3.cls.btn2).addClass("m-btn");
|
||||
_4.linkbutton($.extend({},_3,{text:_3.text+"<span class=\""+_3.cls.arrow+"\"> </span>"}));
|
||||
if(_3.menu){
|
||||
$(_3.menu).menu();
|
||||
var _5=$(_3.menu).menu("options");
|
||||
var _6=_5.onShow;
|
||||
var _7=_5.onHide;
|
||||
$.extend(_5,{onShow:function(){
|
||||
var _8=$(this).menu("options");
|
||||
var _9=$(_8.alignTo);
|
||||
var _a=_9.menubutton("options");
|
||||
_9.addClass((_a.plain==true)?_a.cls.btn2:_a.cls.btn1);
|
||||
_6.call(this);
|
||||
},onHide:function(){
|
||||
var _b=$(this).menu("options");
|
||||
var _c=$(_b.alignTo);
|
||||
var _d=_c.menubutton("options");
|
||||
_c.removeClass((_d.plain==true)?_d.cls.btn2:_d.cls.btn1);
|
||||
_7.call(this);
|
||||
}});
|
||||
}
|
||||
_e(_2,_3.disabled);
|
||||
};
|
||||
function _e(_f,_10){
|
||||
var _11=$.data(_f,"menubutton").options;
|
||||
_11.disabled=_10;
|
||||
var btn=$(_f);
|
||||
var t=btn.find("."+_11.cls.trigger);
|
||||
if(!t.length){
|
||||
t=btn;
|
||||
}
|
||||
t.unbind(".menubutton");
|
||||
if(_10){
|
||||
btn.linkbutton("disable");
|
||||
}else{
|
||||
btn.linkbutton("enable");
|
||||
var _12=null;
|
||||
t.bind("click.menubutton",function(){
|
||||
_13(_f);
|
||||
return false;
|
||||
}).bind("mouseenter.menubutton",function(){
|
||||
_12=setTimeout(function(){
|
||||
_13(_f);
|
||||
},_11.duration);
|
||||
return false;
|
||||
}).bind("mouseleave.menubutton",function(){
|
||||
if(_12){
|
||||
clearTimeout(_12);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
function _13(_14){
|
||||
var _15=$.data(_14,"menubutton").options;
|
||||
if(_15.disabled||!_15.menu){
|
||||
return;
|
||||
}
|
||||
$("body>div.menu-top").menu("hide");
|
||||
var btn=$(_14);
|
||||
var mm=$(_15.menu);
|
||||
if(mm.length){
|
||||
mm.menu("options").alignTo=btn;
|
||||
mm.menu("show",{alignTo:btn});
|
||||
}
|
||||
btn.blur();
|
||||
};
|
||||
$.fn.menubutton=function(_16,_17){
|
||||
if(typeof _16=="string"){
|
||||
var _18=$.fn.menubutton.methods[_16];
|
||||
if(_18){
|
||||
return _18(this,_17);
|
||||
}else{
|
||||
return this.linkbutton(_16,_17);
|
||||
}
|
||||
}
|
||||
_16=_16||{};
|
||||
return this.each(function(){
|
||||
var _19=$.data(this,"menubutton");
|
||||
if(_19){
|
||||
$.extend(_19.options,_16);
|
||||
}else{
|
||||
$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,$.fn.menubutton.parseOptions(this),_16)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.menubutton.methods={options:function(jq){
|
||||
var _1a=jq.linkbutton("options");
|
||||
var _1b=$.data(jq[0],"menubutton").options;
|
||||
_1b.toggle=_1a.toggle;
|
||||
_1b.selected=_1a.selected;
|
||||
return _1b;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_e(this,false);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_e(this,true);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1c=$(this).menubutton("options");
|
||||
if(_1c.menu){
|
||||
$(_1c.menu).menu("destroy");
|
||||
}
|
||||
$(this).remove();
|
||||
});
|
||||
}};
|
||||
$.fn.menubutton.parseOptions=function(_1d){
|
||||
var t=$(_1d);
|
||||
return $.extend({},$.fn.linkbutton.parseOptions(_1d),$.parser.parseOptions(_1d,["menu",{plain:"boolean",duration:"number"}]));
|
||||
};
|
||||
$.fn.menubutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"m-btn-active",btn2:"m-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn"}});
|
||||
})(jQuery);
|
||||
|
||||
217
WebRoot/js/easyui-1.3.5/plugins/jquery.messager.js
Normal file
217
WebRoot/js/easyui-1.3.5/plugins/jquery.messager.js
Normal file
@@ -0,0 +1,217 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(el,_2,_3,_4){
|
||||
var _5=$(el).window("window");
|
||||
if(!_5){
|
||||
return;
|
||||
}
|
||||
switch(_2){
|
||||
case null:
|
||||
_5.show();
|
||||
break;
|
||||
case "slide":
|
||||
_5.slideDown(_3);
|
||||
break;
|
||||
case "fade":
|
||||
_5.fadeIn(_3);
|
||||
break;
|
||||
case "show":
|
||||
_5.show(_3);
|
||||
break;
|
||||
}
|
||||
var _6=null;
|
||||
if(_4>0){
|
||||
_6=setTimeout(function(){
|
||||
_7(el,_2,_3);
|
||||
},_4);
|
||||
}
|
||||
_5.hover(function(){
|
||||
if(_6){
|
||||
clearTimeout(_6);
|
||||
}
|
||||
},function(){
|
||||
if(_4>0){
|
||||
_6=setTimeout(function(){
|
||||
_7(el,_2,_3);
|
||||
},_4);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _7(el,_8,_9){
|
||||
if(el.locked==true){
|
||||
return;
|
||||
}
|
||||
el.locked=true;
|
||||
var _a=$(el).window("window");
|
||||
if(!_a){
|
||||
return;
|
||||
}
|
||||
switch(_8){
|
||||
case null:
|
||||
_a.hide();
|
||||
break;
|
||||
case "slide":
|
||||
_a.slideUp(_9);
|
||||
break;
|
||||
case "fade":
|
||||
_a.fadeOut(_9);
|
||||
break;
|
||||
case "show":
|
||||
_a.hide(_9);
|
||||
break;
|
||||
}
|
||||
setTimeout(function(){
|
||||
$(el).window("destroy");
|
||||
},_9);
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.extend({},$.fn.window.defaults,{collapsible:false,minimizable:false,maximizable:false,shadow:false,draggable:false,resizable:false,closed:true,style:{left:"",top:"",right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop},onBeforeOpen:function(){
|
||||
_1(this,_d.showType,_d.showSpeed,_d.timeout);
|
||||
return false;
|
||||
},onBeforeClose:function(){
|
||||
_7(this,_d.showType,_d.showSpeed);
|
||||
return false;
|
||||
}},{title:"",width:250,height:100,showType:"slide",showSpeed:600,msg:"",timeout:4000},_c);
|
||||
_d.style.zIndex=$.fn.window.defaults.zIndex++;
|
||||
var _e=$("<div class=\"messager-body\"></div>").html(_d.msg).appendTo("body");
|
||||
_e.window(_d);
|
||||
_e.window("window").css(_d.style);
|
||||
_e.window("open");
|
||||
return _e;
|
||||
};
|
||||
function _f(_10,_11,_12){
|
||||
var win=$("<div class=\"messager-body\"></div>").appendTo("body");
|
||||
win.append(_11);
|
||||
if(_12){
|
||||
var tb=$("<div class=\"messager-button\"></div>").appendTo(win);
|
||||
for(var _13 in _12){
|
||||
$("<a></a>").attr("href","javascript:void(0)").text(_13).css("margin-left",10).bind("click",eval(_12[_13])).appendTo(tb).linkbutton();
|
||||
}
|
||||
}
|
||||
win.window({title:_10,noheader:(_10?false:true),width:300,height:"auto",modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,onClose:function(){
|
||||
setTimeout(function(){
|
||||
win.window("destroy");
|
||||
},100);
|
||||
}});
|
||||
win.window("window").addClass("messager-window");
|
||||
win.children("div.messager-button").children("a:first").focus();
|
||||
return win;
|
||||
};
|
||||
$.messager={show:function(_14){
|
||||
return _b(_14);
|
||||
},alert:function(_15,msg,_16,fn){
|
||||
var _17="<div>"+msg+"</div>";
|
||||
switch(_16){
|
||||
case "error":
|
||||
_17="<div class=\"messager-icon messager-error\"></div>"+_17;
|
||||
break;
|
||||
case "info":
|
||||
_17="<div class=\"messager-icon messager-info\"></div>"+_17;
|
||||
break;
|
||||
case "question":
|
||||
_17="<div class=\"messager-icon messager-question\"></div>"+_17;
|
||||
break;
|
||||
case "warning":
|
||||
_17="<div class=\"messager-icon messager-warning\"></div>"+_17;
|
||||
break;
|
||||
}
|
||||
_17+="<div style=\"clear:both;\"/>";
|
||||
var _18={};
|
||||
_18[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_15,_17,_18);
|
||||
return win;
|
||||
},confirm:function(_19,msg,fn){
|
||||
var _1a="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<div style=\"clear:both;\"/>";
|
||||
var _1b={};
|
||||
_1b[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn(true);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
_1b[$.messager.defaults.cancel]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn(false);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_19,_1a,_1b);
|
||||
return win;
|
||||
},prompt:function(_1c,msg,fn){
|
||||
var _1d="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<br/>"+"<div style=\"clear:both;\"/>"+"<div><input class=\"messager-input\" type=\"text\"/></div>";
|
||||
var _1e={};
|
||||
_1e[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn($(".messager-input",win).val());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
_1e[$.messager.defaults.cancel]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_1c,_1d,_1e);
|
||||
win.children("input.messager-input").focus();
|
||||
return win;
|
||||
},progress:function(_1f){
|
||||
var _20={bar:function(){
|
||||
return $("body>div.messager-window").find("div.messager-p-bar");
|
||||
},close:function(){
|
||||
var win=$("body>div.messager-window>div.messager-body:has(div.messager-progress)");
|
||||
if(win.length){
|
||||
win.window("close");
|
||||
}
|
||||
}};
|
||||
if(typeof _1f=="string"){
|
||||
var _21=_20[_1f];
|
||||
return _21();
|
||||
}
|
||||
var _22=$.extend({title:"",msg:"",text:undefined,interval:300},_1f||{});
|
||||
var _23="<div class=\"messager-progress\"><div class=\"messager-p-msg\"></div><div class=\"messager-p-bar\"></div></div>";
|
||||
var win=_f(_22.title,_23,null);
|
||||
win.find("div.messager-p-msg").html(_22.msg);
|
||||
var bar=win.find("div.messager-p-bar");
|
||||
bar.progressbar({text:_22.text});
|
||||
win.window({closable:false,onClose:function(){
|
||||
if(this.timer){
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
$(this).window("destroy");
|
||||
}});
|
||||
if(_22.interval){
|
||||
win[0].timer=setInterval(function(){
|
||||
var v=bar.progressbar("getValue");
|
||||
v+=10;
|
||||
if(v>100){
|
||||
v=0;
|
||||
}
|
||||
bar.progressbar("setValue",v);
|
||||
},_22.interval);
|
||||
}
|
||||
return win;
|
||||
}};
|
||||
$.messager.defaults={ok:"Ok",cancel:"Cancel"};
|
||||
})(jQuery);
|
||||
|
||||
224
WebRoot/js/easyui-1.3.5/plugins/jquery.numberbox.js
Normal file
224
WebRoot/js/easyui-1.3.5/plugins/jquery.numberbox.js
Normal file
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("numberbox-f");
|
||||
var v=$("<input type=\"hidden\">").insertAfter(_2);
|
||||
var _3=$(_2).attr("name");
|
||||
if(_3){
|
||||
v.attr("name",_3);
|
||||
$(_2).removeAttr("name").attr("numberboxName",_3);
|
||||
}
|
||||
return v;
|
||||
};
|
||||
function _4(_5){
|
||||
var _6=$.data(_5,"numberbox").options;
|
||||
var fn=_6.onChange;
|
||||
_6.onChange=function(){
|
||||
};
|
||||
_7(_5,_6.parser.call(_5,_6.value));
|
||||
_6.onChange=fn;
|
||||
_6.originalValue=_8(_5);
|
||||
};
|
||||
function _8(_9){
|
||||
return $.data(_9,"numberbox").field.val();
|
||||
};
|
||||
function _7(_a,_b){
|
||||
var _c=$.data(_a,"numberbox");
|
||||
var _d=_c.options;
|
||||
var _e=_8(_a);
|
||||
_b=_d.parser.call(_a,_b);
|
||||
_d.value=_b;
|
||||
_c.field.val(_b);
|
||||
$(_a).val(_d.formatter.call(_a,_b));
|
||||
if(_e!=_b){
|
||||
_d.onChange.call(_a,_b,_e);
|
||||
}
|
||||
};
|
||||
function _f(_10){
|
||||
var _11=$.data(_10,"numberbox").options;
|
||||
$(_10).unbind(".numberbox").bind("keypress.numberbox",function(e){
|
||||
return _11.filter.call(_10,e);
|
||||
}).bind("blur.numberbox",function(){
|
||||
_7(_10,$(this).val());
|
||||
$(this).val(_11.formatter.call(_10,_8(_10)));
|
||||
}).bind("focus.numberbox",function(){
|
||||
var vv=_8(_10);
|
||||
if(vv!=_11.parser.call(_10,$(this).val())){
|
||||
$(this).val(_11.formatter.call(_10,vv));
|
||||
}
|
||||
});
|
||||
};
|
||||
function _12(_13){
|
||||
if($.fn.validatebox){
|
||||
var _14=$.data(_13,"numberbox").options;
|
||||
$(_13).validatebox(_14);
|
||||
}
|
||||
};
|
||||
function _15(_16,_17){
|
||||
var _18=$.data(_16,"numberbox").options;
|
||||
if(_17){
|
||||
_18.disabled=true;
|
||||
$(_16).attr("disabled",true);
|
||||
}else{
|
||||
_18.disabled=false;
|
||||
$(_16).removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
$.fn.numberbox=function(_19,_1a){
|
||||
if(typeof _19=="string"){
|
||||
var _1b=$.fn.numberbox.methods[_19];
|
||||
if(_1b){
|
||||
return _1b(this,_1a);
|
||||
}else{
|
||||
return this.validatebox(_19,_1a);
|
||||
}
|
||||
}
|
||||
_19=_19||{};
|
||||
return this.each(function(){
|
||||
var _1c=$.data(this,"numberbox");
|
||||
if(_1c){
|
||||
$.extend(_1c.options,_19);
|
||||
}else{
|
||||
_1c=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,$.fn.numberbox.parseOptions(this),_19),field:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
$(this).css({imeMode:"disabled"});
|
||||
}
|
||||
_15(this,_1c.options.disabled);
|
||||
_f(this);
|
||||
_12(this);
|
||||
_4(this);
|
||||
});
|
||||
};
|
||||
$.fn.numberbox.methods={options:function(jq){
|
||||
return $.data(jq[0],"numberbox").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"numberbox").field.remove();
|
||||
$(this).validatebox("destroy");
|
||||
$(this).remove();
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_15(this,true);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_15(this,false);
|
||||
});
|
||||
},fix:function(jq){
|
||||
return jq.each(function(){
|
||||
_7(this,$(this).val());
|
||||
});
|
||||
},setValue:function(jq,_1d){
|
||||
return jq.each(function(){
|
||||
_7(this,_1d);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return _8(jq[0]);
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1e=$.data(this,"numberbox");
|
||||
_1e.field.val("");
|
||||
$(this).val("");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1f=$(this).numberbox("options");
|
||||
$(this).numberbox("setValue",_1f.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.numberbox.parseOptions=function(_20){
|
||||
var t=$(_20);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_20),$.parser.parseOptions(_20,["decimalSeparator","groupSeparator","suffix",{min:"number",max:"number",precision:"number"}]),{prefix:(t.attr("prefix")?t.attr("prefix"):undefined),disabled:(t.attr("disabled")?true:undefined),value:(t.val()||undefined)});
|
||||
};
|
||||
$.fn.numberbox.defaults=$.extend({},$.fn.validatebox.defaults,{disabled:false,value:"",min:null,max:null,precision:0,decimalSeparator:".",groupSeparator:"",prefix:"",suffix:"",filter:function(e){
|
||||
var _21=$(this).numberbox("options");
|
||||
if(e.which==45){
|
||||
return ($(this).val().indexOf("-")==-1?true:false);
|
||||
}
|
||||
var c=String.fromCharCode(e.which);
|
||||
if(c==_21.decimalSeparator){
|
||||
return ($(this).val().indexOf(c)==-1?true:false);
|
||||
}else{
|
||||
if(c==_21.groupSeparator){
|
||||
return true;
|
||||
}else{
|
||||
if((e.which>=48&&e.which<=57&&e.ctrlKey==false&&e.shiftKey==false)||e.which==0||e.which==8){
|
||||
return true;
|
||||
}else{
|
||||
if(e.ctrlKey==true&&(e.which==99||e.which==118)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},formatter:function(_22){
|
||||
if(!_22){
|
||||
return _22;
|
||||
}
|
||||
_22=_22+"";
|
||||
var _23=$(this).numberbox("options");
|
||||
var s1=_22,s2="";
|
||||
var _24=_22.indexOf(".");
|
||||
if(_24>=0){
|
||||
s1=_22.substring(0,_24);
|
||||
s2=_22.substring(_24+1,_22.length);
|
||||
}
|
||||
if(_23.groupSeparator){
|
||||
var p=/(\d+)(\d{3})/;
|
||||
while(p.test(s1)){
|
||||
s1=s1.replace(p,"$1"+_23.groupSeparator+"$2");
|
||||
}
|
||||
}
|
||||
if(s2){
|
||||
return _23.prefix+s1+_23.decimalSeparator+s2+_23.suffix;
|
||||
}else{
|
||||
return _23.prefix+s1+_23.suffix;
|
||||
}
|
||||
},parser:function(s){
|
||||
s=s+"";
|
||||
var _25=$(this).numberbox("options");
|
||||
if(parseFloat(s)!=s){
|
||||
if(_25.prefix){
|
||||
s=$.trim(s.replace(new RegExp("\\"+$.trim(_25.prefix),"g"),""));
|
||||
}
|
||||
if(_25.suffix){
|
||||
s=$.trim(s.replace(new RegExp("\\"+$.trim(_25.suffix),"g"),""));
|
||||
}
|
||||
if(_25.groupSeparator){
|
||||
s=$.trim(s.replace(new RegExp("\\"+_25.groupSeparator,"g"),""));
|
||||
}
|
||||
if(_25.decimalSeparator){
|
||||
s=$.trim(s.replace(new RegExp("\\"+_25.decimalSeparator,"g"),"."));
|
||||
}
|
||||
s=s.replace(/\s/g,"");
|
||||
}
|
||||
var val=parseFloat(s).toFixed(_25.precision);
|
||||
if(isNaN(val)){
|
||||
val="";
|
||||
}else{
|
||||
if(typeof (_25.min)=="number"&&val<_25.min){
|
||||
val=_25.min.toFixed(_25.precision);
|
||||
}else{
|
||||
if(typeof (_25.max)=="number"&&val>_25.max){
|
||||
val=_25.max.toFixed(_25.precision);
|
||||
}
|
||||
}
|
||||
}
|
||||
return val;
|
||||
},onChange:function(_26,_27){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
75
WebRoot/js/easyui-1.3.5/plugins/jquery.numberspinner.js
Normal file
75
WebRoot/js/easyui-1.3.5/plugins/jquery.numberspinner.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("numberspinner-f");
|
||||
var _3=$.data(_2,"numberspinner").options;
|
||||
$(_2).spinner(_3).numberbox(_3);
|
||||
};
|
||||
function _4(_5,_6){
|
||||
var _7=$.data(_5,"numberspinner").options;
|
||||
var v=parseFloat($(_5).numberbox("getValue")||_7.value)||0;
|
||||
if(_6==true){
|
||||
v-=_7.increment;
|
||||
}else{
|
||||
v+=_7.increment;
|
||||
}
|
||||
$(_5).numberbox("setValue",v);
|
||||
};
|
||||
$.fn.numberspinner=function(_8,_9){
|
||||
if(typeof _8=="string"){
|
||||
var _a=$.fn.numberspinner.methods[_8];
|
||||
if(_a){
|
||||
return _a(this,_9);
|
||||
}else{
|
||||
return this.spinner(_8,_9);
|
||||
}
|
||||
}
|
||||
_8=_8||{};
|
||||
return this.each(function(){
|
||||
var _b=$.data(this,"numberspinner");
|
||||
if(_b){
|
||||
$.extend(_b.options,_8);
|
||||
}else{
|
||||
$.data(this,"numberspinner",{options:$.extend({},$.fn.numberspinner.defaults,$.fn.numberspinner.parseOptions(this),_8)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.numberspinner.methods={options:function(jq){
|
||||
var _c=$.data(jq[0],"numberspinner").options;
|
||||
return $.extend(_c,{value:jq.numberbox("getValue"),originalValue:jq.numberbox("options").originalValue});
|
||||
},setValue:function(jq,_d){
|
||||
return jq.each(function(){
|
||||
$(this).numberbox("setValue",_d);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.numberbox("getValue");
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).spinner("clear");
|
||||
$(this).numberbox("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _e=$(this).numberspinner("options");
|
||||
$(this).numberspinner("setValue",_e.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.numberspinner.parseOptions=function(_f){
|
||||
return $.extend({},$.fn.spinner.parseOptions(_f),$.fn.numberbox.parseOptions(_f),{});
|
||||
};
|
||||
$.fn.numberspinner.defaults=$.extend({},$.fn.spinner.defaults,$.fn.numberbox.defaults,{spin:function(_10){
|
||||
_4(this,_10);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
284
WebRoot/js/easyui-1.3.5/plugins/jquery.pagination.js
Normal file
284
WebRoot/js/easyui-1.3.5/plugins/jquery.pagination.js
Normal file
@@ -0,0 +1,284 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"pagination");
|
||||
var _4=_3.options;
|
||||
var bb=_3.bb={};
|
||||
var _5=$(_2).addClass("pagination").html("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr></tr></table>");
|
||||
var tr=_5.find("tr");
|
||||
var aa=$.extend([],_4.layout);
|
||||
if(!_4.showPageList){
|
||||
_6(aa,"list");
|
||||
}
|
||||
if(!_4.showRefresh){
|
||||
_6(aa,"refresh");
|
||||
}
|
||||
if(aa[0]=="sep"){
|
||||
aa.shift();
|
||||
}
|
||||
if(aa[aa.length-1]=="sep"){
|
||||
aa.pop();
|
||||
}
|
||||
for(var _7=0;_7<aa.length;_7++){
|
||||
var _8=aa[_7];
|
||||
if(_8=="list"){
|
||||
var ps=$("<select class=\"pagination-page-list\"></select>");
|
||||
ps.bind("change",function(){
|
||||
_4.pageSize=parseInt($(this).val());
|
||||
_4.onChangePageSize.call(_2,_4.pageSize);
|
||||
_10(_2,_4.pageNumber);
|
||||
});
|
||||
for(var i=0;i<_4.pageList.length;i++){
|
||||
$("<option></option>").text(_4.pageList[i]).appendTo(ps);
|
||||
}
|
||||
$("<td></td>").append(ps).appendTo(tr);
|
||||
}else{
|
||||
if(_8=="sep"){
|
||||
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
|
||||
}else{
|
||||
if(_8=="first"){
|
||||
bb.first=_9("first");
|
||||
}else{
|
||||
if(_8=="prev"){
|
||||
bb.prev=_9("prev");
|
||||
}else{
|
||||
if(_8=="next"){
|
||||
bb.next=_9("next");
|
||||
}else{
|
||||
if(_8=="last"){
|
||||
bb.last=_9("last");
|
||||
}else{
|
||||
if(_8=="manual"){
|
||||
$("<span style=\"padding-left:6px;\"></span>").html(_4.beforePageText).appendTo(tr).wrap("<td></td>");
|
||||
bb.num=$("<input class=\"pagination-num\" type=\"text\" value=\"1\" size=\"2\">").appendTo(tr).wrap("<td></td>");
|
||||
bb.num.unbind(".pagination").bind("keydown.pagination",function(e){
|
||||
if(e.keyCode==13){
|
||||
var _a=parseInt($(this).val())||1;
|
||||
_10(_2,_a);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
bb.after=$("<span style=\"padding-right:6px;\"></span>").appendTo(tr).wrap("<td></td>");
|
||||
}else{
|
||||
if(_8=="refresh"){
|
||||
bb.refresh=_9("refresh");
|
||||
}else{
|
||||
if(_8=="links"){
|
||||
$("<td class=\"pagination-links\"></td>").appendTo(tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_4.buttons){
|
||||
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
|
||||
if($.isArray(_4.buttons)){
|
||||
for(var i=0;i<_4.buttons.length;i++){
|
||||
var _b=_4.buttons[i];
|
||||
if(_b=="-"){
|
||||
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
|
||||
}else{
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var a=$("<a href=\"javascript:void(0)\"></a>").appendTo(td);
|
||||
a[0].onclick=eval(_b.handler||function(){
|
||||
});
|
||||
a.linkbutton($.extend({},_b,{plain:true}));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
$(_4.buttons).appendTo(td).show();
|
||||
}
|
||||
}
|
||||
$("<div class=\"pagination-info\"></div>").appendTo(_5);
|
||||
$("<div style=\"clear:both;\"></div>").appendTo(_5);
|
||||
function _9(_c){
|
||||
var _d=_4.nav[_c];
|
||||
var a=$("<a href=\"javascript:void(0)\"></a>").appendTo(tr);
|
||||
a.wrap("<td></td>");
|
||||
a.linkbutton({iconCls:_d.iconCls,plain:true}).unbind(".pagination").bind("click.pagination",function(){
|
||||
_d.handler.call(_2);
|
||||
});
|
||||
return a;
|
||||
};
|
||||
function _6(aa,_e){
|
||||
var _f=$.inArray(_e,aa);
|
||||
if(_f>=0){
|
||||
aa.splice(_f,1);
|
||||
}
|
||||
return aa;
|
||||
};
|
||||
};
|
||||
function _10(_11,_12){
|
||||
var _13=$.data(_11,"pagination").options;
|
||||
_14(_11,{pageNumber:_12});
|
||||
_13.onSelectPage.call(_11,_13.pageNumber,_13.pageSize);
|
||||
};
|
||||
function _14(_15,_16){
|
||||
var _17=$.data(_15,"pagination");
|
||||
var _18=_17.options;
|
||||
var bb=_17.bb;
|
||||
$.extend(_18,_16||{});
|
||||
var ps=$(_15).find("select.pagination-page-list");
|
||||
if(ps.length){
|
||||
ps.val(_18.pageSize+"");
|
||||
_18.pageSize=parseInt(ps.val());
|
||||
}
|
||||
var _19=Math.ceil(_18.total/_18.pageSize)||1;
|
||||
if(_18.pageNumber<1){
|
||||
_18.pageNumber=1;
|
||||
}
|
||||
if(_18.pageNumber>_19){
|
||||
_18.pageNumber=_19;
|
||||
}
|
||||
if(bb.num){
|
||||
bb.num.val(_18.pageNumber);
|
||||
}
|
||||
if(bb.after){
|
||||
bb.after.html(_18.afterPageText.replace(/{pages}/,_19));
|
||||
}
|
||||
var td=$(_15).find("td.pagination-links");
|
||||
if(td.length){
|
||||
td.empty();
|
||||
var _1a=_18.pageNumber-Math.floor(_18.links/2);
|
||||
if(_1a<1){
|
||||
_1a=1;
|
||||
}
|
||||
var _1b=_1a+_18.links-1;
|
||||
if(_1b>_19){
|
||||
_1b=_19;
|
||||
}
|
||||
_1a=_1b-_18.links+1;
|
||||
if(_1a<1){
|
||||
_1a=1;
|
||||
}
|
||||
for(var i=_1a;i<=_1b;i++){
|
||||
var a=$("<a class=\"pagination-link\" href=\"javascript:void(0)\"></a>").appendTo(td);
|
||||
a.linkbutton({plain:true,text:i});
|
||||
if(i==_18.pageNumber){
|
||||
a.linkbutton("select");
|
||||
}else{
|
||||
a.unbind(".pagination").bind("click.pagination",{pageNumber:i},function(e){
|
||||
_10(_15,e.data.pageNumber);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
var _1c=_18.displayMsg;
|
||||
_1c=_1c.replace(/{from}/,_18.total==0?0:_18.pageSize*(_18.pageNumber-1)+1);
|
||||
_1c=_1c.replace(/{to}/,Math.min(_18.pageSize*(_18.pageNumber),_18.total));
|
||||
_1c=_1c.replace(/{total}/,_18.total);
|
||||
$(_15).find("div.pagination-info").html(_1c);
|
||||
if(bb.first){
|
||||
bb.first.linkbutton({disabled:(_18.pageNumber==1)});
|
||||
}
|
||||
if(bb.prev){
|
||||
bb.prev.linkbutton({disabled:(_18.pageNumber==1)});
|
||||
}
|
||||
if(bb.next){
|
||||
bb.next.linkbutton({disabled:(_18.pageNumber==_19)});
|
||||
}
|
||||
if(bb.last){
|
||||
bb.last.linkbutton({disabled:(_18.pageNumber==_19)});
|
||||
}
|
||||
_1d(_15,_18.loading);
|
||||
};
|
||||
function _1d(_1e,_1f){
|
||||
var _20=$.data(_1e,"pagination");
|
||||
var _21=_20.options;
|
||||
_21.loading=_1f;
|
||||
if(_21.showRefresh&&_20.bb.refresh){
|
||||
_20.bb.refresh.linkbutton({iconCls:(_21.loading?"pagination-loading":"pagination-load")});
|
||||
}
|
||||
};
|
||||
$.fn.pagination=function(_22,_23){
|
||||
if(typeof _22=="string"){
|
||||
return $.fn.pagination.methods[_22](this,_23);
|
||||
}
|
||||
_22=_22||{};
|
||||
return this.each(function(){
|
||||
var _24;
|
||||
var _25=$.data(this,"pagination");
|
||||
if(_25){
|
||||
_24=$.extend(_25.options,_22);
|
||||
}else{
|
||||
_24=$.extend({},$.fn.pagination.defaults,$.fn.pagination.parseOptions(this),_22);
|
||||
$.data(this,"pagination",{options:_24});
|
||||
}
|
||||
_1(this);
|
||||
_14(this);
|
||||
});
|
||||
};
|
||||
$.fn.pagination.methods={options:function(jq){
|
||||
return $.data(jq[0],"pagination").options;
|
||||
},loading:function(jq){
|
||||
return jq.each(function(){
|
||||
_1d(this,true);
|
||||
});
|
||||
},loaded:function(jq){
|
||||
return jq.each(function(){
|
||||
_1d(this,false);
|
||||
});
|
||||
},refresh:function(jq,_26){
|
||||
return jq.each(function(){
|
||||
_14(this,_26);
|
||||
});
|
||||
},select:function(jq,_27){
|
||||
return jq.each(function(){
|
||||
_10(this,_27);
|
||||
});
|
||||
}};
|
||||
$.fn.pagination.parseOptions=function(_28){
|
||||
var t=$(_28);
|
||||
return $.extend({},$.parser.parseOptions(_28,[{total:"number",pageSize:"number",pageNumber:"number",links:"number"},{loading:"boolean",showPageList:"boolean",showRefresh:"boolean"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined)});
|
||||
};
|
||||
$.fn.pagination.defaults={total:1,pageSize:10,pageNumber:1,pageList:[10,20,30,50],loading:false,buttons:null,showPageList:true,showRefresh:true,links:10,layout:["list","sep","first","prev","sep","manual","sep","next","last","sep","refresh"],onSelectPage:function(_29,_2a){
|
||||
},onBeforeRefresh:function(_2b,_2c){
|
||||
},onRefresh:function(_2d,_2e){
|
||||
},onChangePageSize:function(_2f){
|
||||
},beforePageText:"Page",afterPageText:"of {pages}",displayMsg:"Displaying {from} to {to} of {total} items",nav:{first:{iconCls:"pagination-first",handler:function(){
|
||||
var _30=$(this).pagination("options");
|
||||
if(_30.pageNumber>1){
|
||||
$(this).pagination("select",1);
|
||||
}
|
||||
}},prev:{iconCls:"pagination-prev",handler:function(){
|
||||
var _31=$(this).pagination("options");
|
||||
if(_31.pageNumber>1){
|
||||
$(this).pagination("select",_31.pageNumber-1);
|
||||
}
|
||||
}},next:{iconCls:"pagination-next",handler:function(){
|
||||
var _32=$(this).pagination("options");
|
||||
var _33=Math.ceil(_32.total/_32.pageSize);
|
||||
if(_32.pageNumber<_33){
|
||||
$(this).pagination("select",_32.pageNumber+1);
|
||||
}
|
||||
}},last:{iconCls:"pagination-last",handler:function(){
|
||||
var _34=$(this).pagination("options");
|
||||
var _35=Math.ceil(_34.total/_34.pageSize);
|
||||
if(_34.pageNumber<_35){
|
||||
$(this).pagination("select",_35);
|
||||
}
|
||||
}},refresh:{iconCls:"pagination-refresh",handler:function(){
|
||||
var _36=$(this).pagination("options");
|
||||
if(_36.onBeforeRefresh.call(this,_36.pageNumber,_36.pageSize)!=false){
|
||||
$(this).pagination("select",_36.pageNumber);
|
||||
_36.onRefresh.call(this,_36.pageNumber,_36.pageSize);
|
||||
}
|
||||
}}}};
|
||||
})(jQuery);
|
||||
|
||||
520
WebRoot/js/easyui-1.3.5/plugins/jquery.panel.js
Normal file
520
WebRoot/js/easyui-1.3.5/plugins/jquery.panel.js
Normal file
@@ -0,0 +1,520 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.fn._remove=function(){
|
||||
return this.each(function(){
|
||||
$(this).remove();
|
||||
try{
|
||||
this.outerHTML="";
|
||||
}
|
||||
catch(err){
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1(_2){
|
||||
_2._remove();
|
||||
};
|
||||
function _3(_4,_5){
|
||||
var _6=$.data(_4,"panel").options;
|
||||
var _7=$.data(_4,"panel").panel;
|
||||
var _8=_7.children("div.panel-header");
|
||||
var _9=_7.children("div.panel-body");
|
||||
if(_5){
|
||||
$.extend(_6,{width:_5.width,height:_5.height,left:_5.left,top:_5.top});
|
||||
}
|
||||
_6.fit?$.extend(_6,_7._fit()):_7._fit(false);
|
||||
_7.css({left:_6.left,top:_6.top});
|
||||
if(!isNaN(_6.width)){
|
||||
_7._outerWidth(_6.width);
|
||||
}else{
|
||||
_7.width("auto");
|
||||
}
|
||||
_8.add(_9)._outerWidth(_7.width());
|
||||
if(!isNaN(_6.height)){
|
||||
_7._outerHeight(_6.height);
|
||||
_9._outerHeight(_7.height()-_8._outerHeight());
|
||||
}else{
|
||||
_9.height("auto");
|
||||
}
|
||||
_7.css("height","");
|
||||
_6.onResize.apply(_4,[_6.width,_6.height]);
|
||||
$(_4).find(">div,>form>div").triggerHandler("_resize");
|
||||
};
|
||||
function _a(_b,_c){
|
||||
var _d=$.data(_b,"panel").options;
|
||||
var _e=$.data(_b,"panel").panel;
|
||||
if(_c){
|
||||
if(_c.left!=null){
|
||||
_d.left=_c.left;
|
||||
}
|
||||
if(_c.top!=null){
|
||||
_d.top=_c.top;
|
||||
}
|
||||
}
|
||||
_e.css({left:_d.left,top:_d.top});
|
||||
_d.onMove.apply(_b,[_d.left,_d.top]);
|
||||
};
|
||||
function _f(_10){
|
||||
$(_10).addClass("panel-body");
|
||||
var _11=$("<div class=\"panel\"></div>").insertBefore(_10);
|
||||
_11[0].appendChild(_10);
|
||||
_11.bind("_resize",function(){
|
||||
var _12=$.data(_10,"panel").options;
|
||||
if(_12.fit==true){
|
||||
_3(_10);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return _11;
|
||||
};
|
||||
function _13(_14){
|
||||
var _15=$.data(_14,"panel").options;
|
||||
var _16=$.data(_14,"panel").panel;
|
||||
if(_15.tools&&typeof _15.tools=="string"){
|
||||
_16.find(">div.panel-header>div.panel-tool .panel-tool-a").appendTo(_15.tools);
|
||||
}
|
||||
_1(_16.children("div.panel-header"));
|
||||
if(_15.title&&!_15.noheader){
|
||||
var _17=$("<div class=\"panel-header\"><div class=\"panel-title\">"+_15.title+"</div></div>").prependTo(_16);
|
||||
if(_15.iconCls){
|
||||
_17.find(".panel-title").addClass("panel-with-icon");
|
||||
$("<div class=\"panel-icon\"></div>").addClass(_15.iconCls).appendTo(_17);
|
||||
}
|
||||
var _18=$("<div class=\"panel-tool\"></div>").appendTo(_17);
|
||||
_18.bind("click",function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
if(_15.tools){
|
||||
if($.isArray(_15.tools)){
|
||||
for(var i=0;i<_15.tools.length;i++){
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").addClass(_15.tools[i].iconCls).appendTo(_18);
|
||||
if(_15.tools[i].handler){
|
||||
t.bind("click",eval(_15.tools[i].handler));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_15.tools).children().each(function(){
|
||||
$(this).addClass($(this).attr("iconCls")).addClass("panel-tool-a").appendTo(_18);
|
||||
});
|
||||
}
|
||||
}
|
||||
if(_15.collapsible){
|
||||
$("<a class=\"panel-tool-collapse\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
if(_15.collapsed==true){
|
||||
_3c(_14,true);
|
||||
}else{
|
||||
_2c(_14,true);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.minimizable){
|
||||
$("<a class=\"panel-tool-min\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
_47(_14);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.maximizable){
|
||||
$("<a class=\"panel-tool-max\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
if(_15.maximized==true){
|
||||
_4b(_14);
|
||||
}else{
|
||||
_2b(_14);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.closable){
|
||||
$("<a class=\"panel-tool-close\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
_19(_14);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
_16.children("div.panel-body").removeClass("panel-body-noheader");
|
||||
}else{
|
||||
_16.children("div.panel-body").addClass("panel-body-noheader");
|
||||
}
|
||||
};
|
||||
function _1a(_1b){
|
||||
var _1c=$.data(_1b,"panel");
|
||||
var _1d=_1c.options;
|
||||
if(_1d.href){
|
||||
if(!_1c.isLoaded||!_1d.cache){
|
||||
if(_1d.onBeforeLoad.call(_1b)==false){
|
||||
return;
|
||||
}
|
||||
_1c.isLoaded=false;
|
||||
_1e(_1b);
|
||||
if(_1d.loadingMessage){
|
||||
$(_1b).html($("<div class=\"panel-loading\"></div>").html(_1d.loadingMessage));
|
||||
}
|
||||
$.ajax({url:_1d.href,cache:false,dataType:"html",success:function(_1f){
|
||||
_20(_1d.extractor.call(_1b,_1f));
|
||||
_1d.onLoad.apply(_1b,arguments);
|
||||
_1c.isLoaded=true;
|
||||
}});
|
||||
}
|
||||
}else{
|
||||
if(_1d.content){
|
||||
if(!_1c.isLoaded){
|
||||
_1e(_1b);
|
||||
_20(_1d.content);
|
||||
_1c.isLoaded=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function _20(_21){
|
||||
$(_1b).html(_21);
|
||||
if($.parser){
|
||||
$.parser.parse($(_1b));
|
||||
}
|
||||
};
|
||||
};
|
||||
function _1e(_22){
|
||||
var t=$(_22);
|
||||
t.find(".combo-f").each(function(){
|
||||
$(this).combo("destroy");
|
||||
});
|
||||
t.find(".m-btn").each(function(){
|
||||
$(this).menubutton("destroy");
|
||||
});
|
||||
t.find(".s-btn").each(function(){
|
||||
$(this).splitbutton("destroy");
|
||||
});
|
||||
t.find(".tooltip-f").each(function(){
|
||||
$(this).tooltip("destroy");
|
||||
});
|
||||
};
|
||||
function _23(_24){
|
||||
$(_24).find("div.panel:visible,div.accordion:visible,div.tabs-container:visible,div.layout:visible").each(function(){
|
||||
$(this).triggerHandler("_resize",[true]);
|
||||
});
|
||||
};
|
||||
function _25(_26,_27){
|
||||
var _28=$.data(_26,"panel").options;
|
||||
var _29=$.data(_26,"panel").panel;
|
||||
if(_27!=true){
|
||||
if(_28.onBeforeOpen.call(_26)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_29.show();
|
||||
_28.closed=false;
|
||||
_28.minimized=false;
|
||||
var _2a=_29.children("div.panel-header").find("a.panel-tool-restore");
|
||||
if(_2a.length){
|
||||
_28.maximized=true;
|
||||
}
|
||||
_28.onOpen.call(_26);
|
||||
if(_28.maximized==true){
|
||||
_28.maximized=false;
|
||||
_2b(_26);
|
||||
}
|
||||
if(_28.collapsed==true){
|
||||
_28.collapsed=false;
|
||||
_2c(_26);
|
||||
}
|
||||
if(!_28.collapsed){
|
||||
_1a(_26);
|
||||
_23(_26);
|
||||
}
|
||||
};
|
||||
function _19(_2d,_2e){
|
||||
var _2f=$.data(_2d,"panel").options;
|
||||
var _30=$.data(_2d,"panel").panel;
|
||||
if(_2e!=true){
|
||||
if(_2f.onBeforeClose.call(_2d)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_30._fit(false);
|
||||
_30.hide();
|
||||
_2f.closed=true;
|
||||
_2f.onClose.call(_2d);
|
||||
};
|
||||
function _31(_32,_33){
|
||||
var _34=$.data(_32,"panel").options;
|
||||
var _35=$.data(_32,"panel").panel;
|
||||
if(_33!=true){
|
||||
if(_34.onBeforeDestroy.call(_32)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_1e(_32);
|
||||
_1(_35);
|
||||
_34.onDestroy.call(_32);
|
||||
};
|
||||
function _2c(_36,_37){
|
||||
var _38=$.data(_36,"panel").options;
|
||||
var _39=$.data(_36,"panel").panel;
|
||||
var _3a=_39.children("div.panel-body");
|
||||
var _3b=_39.children("div.panel-header").find("a.panel-tool-collapse");
|
||||
if(_38.collapsed==true){
|
||||
return;
|
||||
}
|
||||
_3a.stop(true,true);
|
||||
if(_38.onBeforeCollapse.call(_36)==false){
|
||||
return;
|
||||
}
|
||||
_3b.addClass("panel-tool-expand");
|
||||
if(_37==true){
|
||||
_3a.slideUp("normal",function(){
|
||||
_38.collapsed=true;
|
||||
_38.onCollapse.call(_36);
|
||||
});
|
||||
}else{
|
||||
_3a.hide();
|
||||
_38.collapsed=true;
|
||||
_38.onCollapse.call(_36);
|
||||
}
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"panel").options;
|
||||
var _40=$.data(_3d,"panel").panel;
|
||||
var _41=_40.children("div.panel-body");
|
||||
var _42=_40.children("div.panel-header").find("a.panel-tool-collapse");
|
||||
if(_3f.collapsed==false){
|
||||
return;
|
||||
}
|
||||
_41.stop(true,true);
|
||||
if(_3f.onBeforeExpand.call(_3d)==false){
|
||||
return;
|
||||
}
|
||||
_42.removeClass("panel-tool-expand");
|
||||
if(_3e==true){
|
||||
_41.slideDown("normal",function(){
|
||||
_3f.collapsed=false;
|
||||
_3f.onExpand.call(_3d);
|
||||
_1a(_3d);
|
||||
_23(_3d);
|
||||
});
|
||||
}else{
|
||||
_41.show();
|
||||
_3f.collapsed=false;
|
||||
_3f.onExpand.call(_3d);
|
||||
_1a(_3d);
|
||||
_23(_3d);
|
||||
}
|
||||
};
|
||||
function _2b(_43){
|
||||
var _44=$.data(_43,"panel").options;
|
||||
var _45=$.data(_43,"panel").panel;
|
||||
var _46=_45.children("div.panel-header").find("a.panel-tool-max");
|
||||
if(_44.maximized==true){
|
||||
return;
|
||||
}
|
||||
_46.addClass("panel-tool-restore");
|
||||
if(!$.data(_43,"panel").original){
|
||||
$.data(_43,"panel").original={width:_44.width,height:_44.height,left:_44.left,top:_44.top,fit:_44.fit};
|
||||
}
|
||||
_44.left=0;
|
||||
_44.top=0;
|
||||
_44.fit=true;
|
||||
_3(_43);
|
||||
_44.minimized=false;
|
||||
_44.maximized=true;
|
||||
_44.onMaximize.call(_43);
|
||||
};
|
||||
function _47(_48){
|
||||
var _49=$.data(_48,"panel").options;
|
||||
var _4a=$.data(_48,"panel").panel;
|
||||
_4a._fit(false);
|
||||
_4a.hide();
|
||||
_49.minimized=true;
|
||||
_49.maximized=false;
|
||||
_49.onMinimize.call(_48);
|
||||
};
|
||||
function _4b(_4c){
|
||||
var _4d=$.data(_4c,"panel").options;
|
||||
var _4e=$.data(_4c,"panel").panel;
|
||||
var _4f=_4e.children("div.panel-header").find("a.panel-tool-max");
|
||||
if(_4d.maximized==false){
|
||||
return;
|
||||
}
|
||||
_4e.show();
|
||||
_4f.removeClass("panel-tool-restore");
|
||||
$.extend(_4d,$.data(_4c,"panel").original);
|
||||
_3(_4c);
|
||||
_4d.minimized=false;
|
||||
_4d.maximized=false;
|
||||
$.data(_4c,"panel").original=null;
|
||||
_4d.onRestore.call(_4c);
|
||||
};
|
||||
function _50(_51){
|
||||
var _52=$.data(_51,"panel").options;
|
||||
var _53=$.data(_51,"panel").panel;
|
||||
var _54=$(_51).panel("header");
|
||||
var _55=$(_51).panel("body");
|
||||
_53.css(_52.style);
|
||||
_53.addClass(_52.cls);
|
||||
if(_52.border){
|
||||
_54.removeClass("panel-header-noborder");
|
||||
_55.removeClass("panel-body-noborder");
|
||||
}else{
|
||||
_54.addClass("panel-header-noborder");
|
||||
_55.addClass("panel-body-noborder");
|
||||
}
|
||||
_54.addClass(_52.headerCls);
|
||||
_55.addClass(_52.bodyCls);
|
||||
if(_52.id){
|
||||
$(_51).attr("id",_52.id);
|
||||
}else{
|
||||
$(_51).attr("id","");
|
||||
}
|
||||
};
|
||||
function _56(_57,_58){
|
||||
$.data(_57,"panel").options.title=_58;
|
||||
$(_57).panel("header").find("div.panel-title").html(_58);
|
||||
};
|
||||
var TO=false;
|
||||
var _59=true;
|
||||
$(window).unbind(".panel").bind("resize.panel",function(){
|
||||
if(!_59){
|
||||
return;
|
||||
}
|
||||
if(TO!==false){
|
||||
clearTimeout(TO);
|
||||
}
|
||||
TO=setTimeout(function(){
|
||||
_59=false;
|
||||
var _5a=$("body.layout");
|
||||
if(_5a.length){
|
||||
_5a.layout("resize");
|
||||
}else{
|
||||
$("body").children("div.panel,div.accordion,div.tabs-container,div.layout").triggerHandler("_resize");
|
||||
}
|
||||
_59=true;
|
||||
TO=false;
|
||||
},200);
|
||||
});
|
||||
$.fn.panel=function(_5b,_5c){
|
||||
if(typeof _5b=="string"){
|
||||
return $.fn.panel.methods[_5b](this,_5c);
|
||||
}
|
||||
_5b=_5b||{};
|
||||
return this.each(function(){
|
||||
var _5d=$.data(this,"panel");
|
||||
var _5e;
|
||||
if(_5d){
|
||||
_5e=$.extend(_5d.options,_5b);
|
||||
_5d.isLoaded=false;
|
||||
}else{
|
||||
_5e=$.extend({},$.fn.panel.defaults,$.fn.panel.parseOptions(this),_5b);
|
||||
$(this).attr("title","");
|
||||
_5d=$.data(this,"panel",{options:_5e,panel:_f(this),isLoaded:false});
|
||||
}
|
||||
_13(this);
|
||||
_50(this);
|
||||
if(_5e.doSize==true){
|
||||
_5d.panel.css("display","block");
|
||||
_3(this);
|
||||
}
|
||||
if(_5e.closed==true||_5e.minimized==true){
|
||||
_5d.panel.hide();
|
||||
}else{
|
||||
_25(this);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn.panel.methods={options:function(jq){
|
||||
return $.data(jq[0],"panel").options;
|
||||
},panel:function(jq){
|
||||
return $.data(jq[0],"panel").panel;
|
||||
},header:function(jq){
|
||||
return $.data(jq[0],"panel").panel.find(">div.panel-header");
|
||||
},body:function(jq){
|
||||
return $.data(jq[0],"panel").panel.find(">div.panel-body");
|
||||
},setTitle:function(jq,_5f){
|
||||
return jq.each(function(){
|
||||
_56(this,_5f);
|
||||
});
|
||||
},open:function(jq,_60){
|
||||
return jq.each(function(){
|
||||
_25(this,_60);
|
||||
});
|
||||
},close:function(jq,_61){
|
||||
return jq.each(function(){
|
||||
_19(this,_61);
|
||||
});
|
||||
},destroy:function(jq,_62){
|
||||
return jq.each(function(){
|
||||
_31(this,_62);
|
||||
});
|
||||
},refresh:function(jq,_63){
|
||||
return jq.each(function(){
|
||||
$.data(this,"panel").isLoaded=false;
|
||||
if(_63){
|
||||
$.data(this,"panel").options.href=_63;
|
||||
}
|
||||
_1a(this);
|
||||
});
|
||||
},resize:function(jq,_64){
|
||||
return jq.each(function(){
|
||||
_3(this,_64);
|
||||
});
|
||||
},move:function(jq,_65){
|
||||
return jq.each(function(){
|
||||
_a(this,_65);
|
||||
});
|
||||
},maximize:function(jq){
|
||||
return jq.each(function(){
|
||||
_2b(this);
|
||||
});
|
||||
},minimize:function(jq){
|
||||
return jq.each(function(){
|
||||
_47(this);
|
||||
});
|
||||
},restore:function(jq){
|
||||
return jq.each(function(){
|
||||
_4b(this);
|
||||
});
|
||||
},collapse:function(jq,_66){
|
||||
return jq.each(function(){
|
||||
_2c(this,_66);
|
||||
});
|
||||
},expand:function(jq,_67){
|
||||
return jq.each(function(){
|
||||
_3c(this,_67);
|
||||
});
|
||||
}};
|
||||
$.fn.panel.parseOptions=function(_68){
|
||||
var t=$(_68);
|
||||
return $.extend({},$.parser.parseOptions(_68,["id","width","height","left","top","title","iconCls","cls","headerCls","bodyCls","tools","href",{cache:"boolean",fit:"boolean",border:"boolean",noheader:"boolean"},{collapsible:"boolean",minimizable:"boolean",maximizable:"boolean"},{closable:"boolean",collapsed:"boolean",minimized:"boolean",maximized:"boolean",closed:"boolean"}]),{loadingMessage:(t.attr("loadingMessage")!=undefined?t.attr("loadingMessage"):undefined)});
|
||||
};
|
||||
$.fn.panel.defaults={id:null,title:null,iconCls:null,width:"auto",height:"auto",left:null,top:null,cls:null,headerCls:null,bodyCls:null,style:{},href:null,cache:true,fit:false,border:true,doSize:true,noheader:false,content:null,collapsible:false,minimizable:false,maximizable:false,closable:false,collapsed:false,minimized:false,maximized:false,closed:false,tools:null,href:null,loadingMessage:"Loading...",extractor:function(_69){
|
||||
var _6a=/<body[^>]*>((.|[\n\r])*)<\/body>/im;
|
||||
var _6b=_6a.exec(_69);
|
||||
if(_6b){
|
||||
return _6b[1];
|
||||
}else{
|
||||
return _69;
|
||||
}
|
||||
},onBeforeLoad:function(){
|
||||
},onLoad:function(){
|
||||
},onBeforeOpen:function(){
|
||||
},onOpen:function(){
|
||||
},onBeforeClose:function(){
|
||||
},onClose:function(){
|
||||
},onBeforeDestroy:function(){
|
||||
},onDestroy:function(){
|
||||
},onResize:function(_6c,_6d){
|
||||
},onMove:function(_6e,top){
|
||||
},onMaximize:function(){
|
||||
},onRestore:function(){
|
||||
},onMinimize:function(){
|
||||
},onBeforeCollapse:function(){
|
||||
},onBeforeExpand:function(){
|
||||
},onCollapse:function(){
|
||||
},onExpand:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
218
WebRoot/js/easyui-1.3.5/plugins/jquery.parser.js
Normal file
218
WebRoot/js/easyui-1.3.5/plugins/jquery.parser.js
Normal file
@@ -0,0 +1,218 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.parser={auto:true,onComplete:function(_1){
|
||||
},plugins:["draggable","droppable","resizable","pagination","tooltip","linkbutton","menu","menubutton","splitbutton","progressbar","tree","combobox","combotree","combogrid","numberbox","validatebox","searchbox","numberspinner","timespinner","calendar","datebox","datetimebox","slider","layout","panel","datagrid","propertygrid","treegrid","tabs","accordion","window","dialog"],parse:function(_2){
|
||||
var aa=[];
|
||||
for(var i=0;i<$.parser.plugins.length;i++){
|
||||
var _3=$.parser.plugins[i];
|
||||
var r=$(".easyui-"+_3,_2);
|
||||
if(r.length){
|
||||
if(r[_3]){
|
||||
r[_3]();
|
||||
}else{
|
||||
aa.push({name:_3,jq:r});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(aa.length&&window.easyloader){
|
||||
var _4=[];
|
||||
for(var i=0;i<aa.length;i++){
|
||||
_4.push(aa[i].name);
|
||||
}
|
||||
easyloader.load(_4,function(){
|
||||
for(var i=0;i<aa.length;i++){
|
||||
var _5=aa[i].name;
|
||||
var jq=aa[i].jq;
|
||||
jq[_5]();
|
||||
}
|
||||
$.parser.onComplete.call($.parser,_2);
|
||||
});
|
||||
}else{
|
||||
$.parser.onComplete.call($.parser,_2);
|
||||
}
|
||||
},parseOptions:function(_6,_7){
|
||||
var t=$(_6);
|
||||
var _8={};
|
||||
var s=$.trim(t.attr("data-options"));
|
||||
if(s){
|
||||
if(s.substring(0,1)!="{"){
|
||||
s="{"+s+"}";
|
||||
}
|
||||
_8=(new Function("return "+s))();
|
||||
}
|
||||
if(_7){
|
||||
var _9={};
|
||||
for(var i=0;i<_7.length;i++){
|
||||
var pp=_7[i];
|
||||
if(typeof pp=="string"){
|
||||
if(pp=="width"||pp=="height"||pp=="left"||pp=="top"){
|
||||
_9[pp]=parseInt(_6.style[pp])||undefined;
|
||||
}else{
|
||||
_9[pp]=t.attr(pp);
|
||||
}
|
||||
}else{
|
||||
for(var _a in pp){
|
||||
var _b=pp[_a];
|
||||
if(_b=="boolean"){
|
||||
_9[_a]=t.attr(_a)?(t.attr(_a)=="true"):undefined;
|
||||
}else{
|
||||
if(_b=="number"){
|
||||
_9[_a]=t.attr(_a)=="0"?0:parseFloat(t.attr(_a))||undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$.extend(_8,_9);
|
||||
}
|
||||
return _8;
|
||||
}};
|
||||
$(function(){
|
||||
var d=$("<div style=\"position:absolute;top:-1000px;width:100px;height:100px;padding:5px\"></div>").appendTo("body");
|
||||
d.width(100);
|
||||
$._boxModel=parseInt(d.width())==100;
|
||||
d.remove();
|
||||
if(!window.easyloader&&$.parser.auto){
|
||||
$.parser.parse();
|
||||
}
|
||||
});
|
||||
$.fn._outerWidth=function(_c){
|
||||
if(_c==undefined){
|
||||
if(this[0]==window){
|
||||
return this.width()||document.body.clientWidth;
|
||||
}
|
||||
return this.outerWidth()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if($._boxModel){
|
||||
$(this).width(_c-($(this).outerWidth()-$(this).width()));
|
||||
}else{
|
||||
$(this).width(_c);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn._outerHeight=function(_d){
|
||||
if(_d==undefined){
|
||||
if(this[0]==window){
|
||||
return this.height()||document.body.clientHeight;
|
||||
}
|
||||
return this.outerHeight()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if($._boxModel){
|
||||
$(this).height(_d-($(this).outerHeight()-$(this).height()));
|
||||
}else{
|
||||
$(this).height(_d);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn._scrollLeft=function(_e){
|
||||
if(_e==undefined){
|
||||
return this.scrollLeft();
|
||||
}else{
|
||||
return this.each(function(){
|
||||
$(this).scrollLeft(_e);
|
||||
});
|
||||
}
|
||||
};
|
||||
$.fn._propAttr=$.fn.prop||$.fn.attr;
|
||||
$.fn._fit=function(_f){
|
||||
_f=_f==undefined?true:_f;
|
||||
var t=this[0];
|
||||
var p=(t.tagName=="BODY"?t:this.parent()[0]);
|
||||
var _10=p.fcount||0;
|
||||
if(_f){
|
||||
if(!t.fitted){
|
||||
t.fitted=true;
|
||||
p.fcount=_10+1;
|
||||
$(p).addClass("panel-noscroll");
|
||||
if(p.tagName=="BODY"){
|
||||
$("html").addClass("panel-fit");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(t.fitted){
|
||||
t.fitted=false;
|
||||
p.fcount=_10-1;
|
||||
if(p.fcount==0){
|
||||
$(p).removeClass("panel-noscroll");
|
||||
if(p.tagName=="BODY"){
|
||||
$("html").removeClass("panel-fit");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {width:$(p).width(),height:$(p).height()};
|
||||
};
|
||||
})(jQuery);
|
||||
(function($){
|
||||
var _11=null;
|
||||
var _12=null;
|
||||
var _13=false;
|
||||
function _14(e){
|
||||
if(e.touches.length!=1){
|
||||
return;
|
||||
}
|
||||
if(!_13){
|
||||
_13=true;
|
||||
dblClickTimer=setTimeout(function(){
|
||||
_13=false;
|
||||
},500);
|
||||
}else{
|
||||
clearTimeout(dblClickTimer);
|
||||
_13=false;
|
||||
_15(e,"dblclick");
|
||||
}
|
||||
_11=setTimeout(function(){
|
||||
_15(e,"contextmenu",3);
|
||||
},1000);
|
||||
_15(e,"mousedown");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _16(e){
|
||||
if(e.touches.length!=1){
|
||||
return;
|
||||
}
|
||||
if(_11){
|
||||
clearTimeout(_11);
|
||||
}
|
||||
_15(e,"mousemove");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _17(e){
|
||||
if(_11){
|
||||
clearTimeout(_11);
|
||||
}
|
||||
_15(e,"mouseup");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _15(e,_18,_19){
|
||||
var _1a=new $.Event(_18);
|
||||
_1a.pageX=e.changedTouches[0].pageX;
|
||||
_1a.pageY=e.changedTouches[0].pageY;
|
||||
_1a.which=_19||1;
|
||||
$(e.target).trigger(_1a);
|
||||
};
|
||||
if(document.addEventListener){
|
||||
document.addEventListener("touchstart",_14,true);
|
||||
document.addEventListener("touchmove",_16,true);
|
||||
document.addEventListener("touchend",_17,true);
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
80
WebRoot/js/easyui-1.3.5/plugins/jquery.progressbar.js
Normal file
80
WebRoot/js/easyui-1.3.5/plugins/jquery.progressbar.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("progressbar");
|
||||
$(_2).html("<div class=\"progressbar-text\"></div><div class=\"progressbar-value\"><div class=\"progressbar-text\"></div></div>");
|
||||
return $(_2);
|
||||
};
|
||||
function _3(_4,_5){
|
||||
var _6=$.data(_4,"progressbar").options;
|
||||
var _7=$.data(_4,"progressbar").bar;
|
||||
if(_5){
|
||||
_6.width=_5;
|
||||
}
|
||||
_7._outerWidth(_6.width)._outerHeight(_6.height);
|
||||
_7.find("div.progressbar-text").width(_7.width());
|
||||
_7.find("div.progressbar-text,div.progressbar-value").css({height:_7.height()+"px",lineHeight:_7.height()+"px"});
|
||||
};
|
||||
$.fn.progressbar=function(_8,_9){
|
||||
if(typeof _8=="string"){
|
||||
var _a=$.fn.progressbar.methods[_8];
|
||||
if(_a){
|
||||
return _a(this,_9);
|
||||
}
|
||||
}
|
||||
_8=_8||{};
|
||||
return this.each(function(){
|
||||
var _b=$.data(this,"progressbar");
|
||||
if(_b){
|
||||
$.extend(_b.options,_8);
|
||||
}else{
|
||||
_b=$.data(this,"progressbar",{options:$.extend({},$.fn.progressbar.defaults,$.fn.progressbar.parseOptions(this),_8),bar:_1(this)});
|
||||
}
|
||||
$(this).progressbar("setValue",_b.options.value);
|
||||
_3(this);
|
||||
});
|
||||
};
|
||||
$.fn.progressbar.methods={options:function(jq){
|
||||
return $.data(jq[0],"progressbar").options;
|
||||
},resize:function(jq,_c){
|
||||
return jq.each(function(){
|
||||
_3(this,_c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return $.data(jq[0],"progressbar").options.value;
|
||||
},setValue:function(jq,_d){
|
||||
if(_d<0){
|
||||
_d=0;
|
||||
}
|
||||
if(_d>100){
|
||||
_d=100;
|
||||
}
|
||||
return jq.each(function(){
|
||||
var _e=$.data(this,"progressbar").options;
|
||||
var _f=_e.text.replace(/{value}/,_d);
|
||||
var _10=_e.value;
|
||||
_e.value=_d;
|
||||
$(this).find("div.progressbar-value").width(_d+"%");
|
||||
$(this).find("div.progressbar-text").html(_f);
|
||||
if(_10!=_d){
|
||||
_e.onChange.call(this,_d,_10);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.progressbar.parseOptions=function(_11){
|
||||
return $.extend({},$.parser.parseOptions(_11,["width","height","text",{value:"number"}]));
|
||||
};
|
||||
$.fn.progressbar.defaults={width:"auto",height:22,value:0,text:"{value}%",onChange:function(_12,_13){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
237
WebRoot/js/easyui-1.3.5/plugins/jquery.propertygrid.js
Normal file
237
WebRoot/js/easyui-1.3.5/plugins/jquery.propertygrid.js
Normal file
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
var _1;
|
||||
function _2(_3){
|
||||
var _4=$.data(_3,"propertygrid");
|
||||
var _5=$.data(_3,"propertygrid").options;
|
||||
$(_3).datagrid($.extend({},_5,{cls:"propertygrid",view:(_5.showGroup?_5.groupView:_5.view),onClickRow:function(_6,_7){
|
||||
if(_1!=this){
|
||||
_a(_1);
|
||||
_1=this;
|
||||
}
|
||||
if(_5.editIndex!=_6&&_7.editor){
|
||||
var _8=$(this).datagrid("getColumnOption","value");
|
||||
_8.editor=_7.editor;
|
||||
_a(_1);
|
||||
$(this).datagrid("beginEdit",_6);
|
||||
$(this).datagrid("getEditors",_6)[0].target.focus();
|
||||
_5.editIndex=_6;
|
||||
}
|
||||
_5.onClickRow.call(_3,_6,_7);
|
||||
},loadFilter:function(_9){
|
||||
_a(this);
|
||||
return _5.loadFilter.call(this,_9);
|
||||
}}));
|
||||
$(document).unbind(".propertygrid").bind("mousedown.propertygrid",function(e){
|
||||
var p=$(e.target).closest("div.datagrid-view,div.combo-panel");
|
||||
if(p.length){
|
||||
return;
|
||||
}
|
||||
_a(_1);
|
||||
_1=undefined;
|
||||
});
|
||||
};
|
||||
function _a(_b){
|
||||
var t=$(_b);
|
||||
if(!t.length){
|
||||
return;
|
||||
}
|
||||
var _c=$.data(_b,"propertygrid").options;
|
||||
var _d=_c.editIndex;
|
||||
if(_d==undefined){
|
||||
return;
|
||||
}
|
||||
var ed=t.datagrid("getEditors",_d)[0];
|
||||
if(ed){
|
||||
ed.target.blur();
|
||||
if(t.datagrid("validateRow",_d)){
|
||||
t.datagrid("endEdit",_d);
|
||||
}else{
|
||||
t.datagrid("cancelEdit",_d);
|
||||
}
|
||||
}
|
||||
_c.editIndex=undefined;
|
||||
};
|
||||
$.fn.propertygrid=function(_e,_f){
|
||||
if(typeof _e=="string"){
|
||||
var _10=$.fn.propertygrid.methods[_e];
|
||||
if(_10){
|
||||
return _10(this,_f);
|
||||
}else{
|
||||
return this.datagrid(_e,_f);
|
||||
}
|
||||
}
|
||||
_e=_e||{};
|
||||
return this.each(function(){
|
||||
var _11=$.data(this,"propertygrid");
|
||||
if(_11){
|
||||
$.extend(_11.options,_e);
|
||||
}else{
|
||||
var _12=$.extend({},$.fn.propertygrid.defaults,$.fn.propertygrid.parseOptions(this),_e);
|
||||
_12.frozenColumns=$.extend(true,[],_12.frozenColumns);
|
||||
_12.columns=$.extend(true,[],_12.columns);
|
||||
$.data(this,"propertygrid",{options:_12});
|
||||
}
|
||||
_2(this);
|
||||
});
|
||||
};
|
||||
$.fn.propertygrid.methods={options:function(jq){
|
||||
return $.data(jq[0],"propertygrid").options;
|
||||
}};
|
||||
$.fn.propertygrid.parseOptions=function(_13){
|
||||
return $.extend({},$.fn.datagrid.parseOptions(_13),$.parser.parseOptions(_13,[{showGroup:"boolean"}]));
|
||||
};
|
||||
var _14=$.extend({},$.fn.datagrid.defaults.view,{render:function(_15,_16,_17){
|
||||
var _18=[];
|
||||
var _19=this.groups;
|
||||
for(var i=0;i<_19.length;i++){
|
||||
_18.push(this.renderGroup.call(this,_15,i,_19[i],_17));
|
||||
}
|
||||
$(_16).html(_18.join(""));
|
||||
},renderGroup:function(_1a,_1b,_1c,_1d){
|
||||
var _1e=$.data(_1a,"datagrid");
|
||||
var _1f=_1e.options;
|
||||
var _20=$(_1a).datagrid("getColumnFields",_1d);
|
||||
var _21=[];
|
||||
_21.push("<div class=\"datagrid-group\" group-index="+_1b+">");
|
||||
_21.push("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"height:100%\"><tbody>");
|
||||
_21.push("<tr>");
|
||||
if((_1d&&(_1f.rownumbers||_1f.frozenColumns.length))||(!_1d&&!(_1f.rownumbers||_1f.frozenColumns.length))){
|
||||
_21.push("<td style=\"border:0;text-align:center;width:25px\"><span class=\"datagrid-row-expander datagrid-row-collapse\" style=\"display:inline-block;width:16px;height:16px;cursor:pointer\"> </span></td>");
|
||||
}
|
||||
_21.push("<td style=\"border:0;\">");
|
||||
if(!_1d){
|
||||
_21.push("<span class=\"datagrid-group-title\">");
|
||||
_21.push(_1f.groupFormatter.call(_1a,_1c.value,_1c.rows));
|
||||
_21.push("</span>");
|
||||
}
|
||||
_21.push("</td>");
|
||||
_21.push("</tr>");
|
||||
_21.push("</tbody></table>");
|
||||
_21.push("</div>");
|
||||
_21.push("<table class=\"datagrid-btable\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody>");
|
||||
var _22=_1c.startIndex;
|
||||
for(var j=0;j<_1c.rows.length;j++){
|
||||
var css=_1f.rowStyler?_1f.rowStyler.call(_1a,_22,_1c.rows[j]):"";
|
||||
var _23="";
|
||||
var _24="";
|
||||
if(typeof css=="string"){
|
||||
_24=css;
|
||||
}else{
|
||||
if(css){
|
||||
_23=css["class"]||"";
|
||||
_24=css["style"]||"";
|
||||
}
|
||||
}
|
||||
var cls="class=\"datagrid-row "+(_22%2&&_1f.striped?"datagrid-row-alt ":" ")+_23+"\"";
|
||||
var _25=_24?"style=\""+_24+"\"":"";
|
||||
var _26=_1e.rowIdPrefix+"-"+(_1d?1:2)+"-"+_22;
|
||||
_21.push("<tr id=\""+_26+"\" datagrid-row-index=\""+_22+"\" "+cls+" "+_25+">");
|
||||
_21.push(this.renderRow.call(this,_1a,_20,_1d,_22,_1c.rows[j]));
|
||||
_21.push("</tr>");
|
||||
_22++;
|
||||
}
|
||||
_21.push("</tbody></table>");
|
||||
return _21.join("");
|
||||
},bindEvents:function(_27){
|
||||
var _28=$.data(_27,"datagrid");
|
||||
var dc=_28.dc;
|
||||
var _29=dc.body1.add(dc.body2);
|
||||
var _2a=($.data(_29[0],"events")||$._data(_29[0],"events")).click[0].handler;
|
||||
_29.unbind("click").bind("click",function(e){
|
||||
var tt=$(e.target);
|
||||
var _2b=tt.closest("span.datagrid-row-expander");
|
||||
if(_2b.length){
|
||||
var _2c=_2b.closest("div.datagrid-group").attr("group-index");
|
||||
if(_2b.hasClass("datagrid-row-collapse")){
|
||||
$(_27).datagrid("collapseGroup",_2c);
|
||||
}else{
|
||||
$(_27).datagrid("expandGroup",_2c);
|
||||
}
|
||||
}else{
|
||||
_2a(e);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
},onBeforeRender:function(_2d,_2e){
|
||||
var _2f=$.data(_2d,"datagrid");
|
||||
var _30=_2f.options;
|
||||
_31();
|
||||
var _32=[];
|
||||
for(var i=0;i<_2e.length;i++){
|
||||
var row=_2e[i];
|
||||
var _33=_34(row[_30.groupField]);
|
||||
if(!_33){
|
||||
_33={value:row[_30.groupField],rows:[row]};
|
||||
_32.push(_33);
|
||||
}else{
|
||||
_33.rows.push(row);
|
||||
}
|
||||
}
|
||||
var _35=0;
|
||||
var _36=[];
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _33=_32[i];
|
||||
_33.startIndex=_35;
|
||||
_35+=_33.rows.length;
|
||||
_36=_36.concat(_33.rows);
|
||||
}
|
||||
_2f.data.rows=_36;
|
||||
this.groups=_32;
|
||||
var _37=this;
|
||||
setTimeout(function(){
|
||||
_37.bindEvents(_2d);
|
||||
},0);
|
||||
function _34(_38){
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _39=_32[i];
|
||||
if(_39.value==_38){
|
||||
return _39;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _31(){
|
||||
if(!$("#datagrid-group-style").length){
|
||||
$("head").append("<style id=\"datagrid-group-style\">"+".datagrid-group{height:25px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}"+"</style>");
|
||||
}
|
||||
};
|
||||
}});
|
||||
$.extend($.fn.datagrid.methods,{expandGroup:function(jq,_3a){
|
||||
return jq.each(function(){
|
||||
var _3b=$.data(this,"datagrid").dc.view;
|
||||
var _3c=_3b.find(_3a!=undefined?"div.datagrid-group[group-index=\""+_3a+"\"]":"div.datagrid-group");
|
||||
var _3d=_3c.find("span.datagrid-row-expander");
|
||||
if(_3d.hasClass("datagrid-row-expand")){
|
||||
_3d.removeClass("datagrid-row-expand").addClass("datagrid-row-collapse");
|
||||
_3c.next("table").show();
|
||||
}
|
||||
$(this).datagrid("fixRowHeight");
|
||||
});
|
||||
},collapseGroup:function(jq,_3e){
|
||||
return jq.each(function(){
|
||||
var _3f=$.data(this,"datagrid").dc.view;
|
||||
var _40=_3f.find(_3e!=undefined?"div.datagrid-group[group-index=\""+_3e+"\"]":"div.datagrid-group");
|
||||
var _41=_40.find("span.datagrid-row-expander");
|
||||
if(_41.hasClass("datagrid-row-collapse")){
|
||||
_41.removeClass("datagrid-row-collapse").addClass("datagrid-row-expand");
|
||||
_40.next("table").hide();
|
||||
}
|
||||
$(this).datagrid("fixRowHeight");
|
||||
});
|
||||
}});
|
||||
$.fn.propertygrid.defaults=$.extend({},$.fn.datagrid.defaults,{singleSelect:true,remoteSort:false,fitColumns:true,loadMsg:"",frozenColumns:[[{field:"f",width:16,resizable:false}]],columns:[[{field:"name",title:"Name",width:100,sortable:true},{field:"value",title:"Value",width:100,resizable:false}]],showGroup:false,groupView:_14,groupField:"group",groupFormatter:function(_42,_43){
|
||||
return _42;
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
172
WebRoot/js/easyui-1.3.5/plugins/jquery.resizable.js
Normal file
172
WebRoot/js/easyui-1.3.5/plugins/jquery.resizable.js
Normal file
@@ -0,0 +1,172 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.fn.resizable=function(_1,_2){
|
||||
if(typeof _1=="string"){
|
||||
return $.fn.resizable.methods[_1](this,_2);
|
||||
}
|
||||
function _3(e){
|
||||
var _4=e.data;
|
||||
var _5=$.data(_4.target,"resizable").options;
|
||||
if(_4.dir.indexOf("e")!=-1){
|
||||
var _6=_4.startWidth+e.pageX-_4.startX;
|
||||
_6=Math.min(Math.max(_6,_5.minWidth),_5.maxWidth);
|
||||
_4.width=_6;
|
||||
}
|
||||
if(_4.dir.indexOf("s")!=-1){
|
||||
var _7=_4.startHeight+e.pageY-_4.startY;
|
||||
_7=Math.min(Math.max(_7,_5.minHeight),_5.maxHeight);
|
||||
_4.height=_7;
|
||||
}
|
||||
if(_4.dir.indexOf("w")!=-1){
|
||||
var _6=_4.startWidth-e.pageX+_4.startX;
|
||||
_6=Math.min(Math.max(_6,_5.minWidth),_5.maxWidth);
|
||||
_4.width=_6;
|
||||
_4.left=_4.startLeft+_4.startWidth-_4.width;
|
||||
}
|
||||
if(_4.dir.indexOf("n")!=-1){
|
||||
var _7=_4.startHeight-e.pageY+_4.startY;
|
||||
_7=Math.min(Math.max(_7,_5.minHeight),_5.maxHeight);
|
||||
_4.height=_7;
|
||||
_4.top=_4.startTop+_4.startHeight-_4.height;
|
||||
}
|
||||
};
|
||||
function _8(e){
|
||||
var _9=e.data;
|
||||
var t=$(_9.target);
|
||||
t.css({left:_9.left,top:_9.top});
|
||||
if(t.outerWidth()!=_9.width){
|
||||
t._outerWidth(_9.width);
|
||||
}
|
||||
if(t.outerHeight()!=_9.height){
|
||||
t._outerHeight(_9.height);
|
||||
}
|
||||
};
|
||||
function _a(e){
|
||||
$.fn.resizable.isResizing=true;
|
||||
$.data(e.data.target,"resizable").options.onStartResize.call(e.data.target,e);
|
||||
return false;
|
||||
};
|
||||
function _b(e){
|
||||
_3(e);
|
||||
if($.data(e.data.target,"resizable").options.onResize.call(e.data.target,e)!=false){
|
||||
_8(e);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
function _c(e){
|
||||
$.fn.resizable.isResizing=false;
|
||||
_3(e,true);
|
||||
_8(e);
|
||||
$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e);
|
||||
$(document).unbind(".resizable");
|
||||
$("body").css("cursor","");
|
||||
return false;
|
||||
};
|
||||
return this.each(function(){
|
||||
var _d=null;
|
||||
var _e=$.data(this,"resizable");
|
||||
if(_e){
|
||||
$(this).unbind(".resizable");
|
||||
_d=$.extend(_e.options,_1||{});
|
||||
}else{
|
||||
_d=$.extend({},$.fn.resizable.defaults,$.fn.resizable.parseOptions(this),_1||{});
|
||||
$.data(this,"resizable",{options:_d});
|
||||
}
|
||||
if(_d.disabled==true){
|
||||
return;
|
||||
}
|
||||
$(this).bind("mousemove.resizable",{target:this},function(e){
|
||||
if($.fn.resizable.isResizing){
|
||||
return;
|
||||
}
|
||||
var _f=_10(e);
|
||||
if(_f==""){
|
||||
$(e.data.target).css("cursor","");
|
||||
}else{
|
||||
$(e.data.target).css("cursor",_f+"-resize");
|
||||
}
|
||||
}).bind("mouseleave.resizable",{target:this},function(e){
|
||||
$(e.data.target).css("cursor","");
|
||||
}).bind("mousedown.resizable",{target:this},function(e){
|
||||
var dir=_10(e);
|
||||
if(dir==""){
|
||||
return;
|
||||
}
|
||||
function _11(css){
|
||||
var val=parseInt($(e.data.target).css(css));
|
||||
if(isNaN(val)){
|
||||
return 0;
|
||||
}else{
|
||||
return val;
|
||||
}
|
||||
};
|
||||
var _12={target:e.data.target,dir:dir,startLeft:_11("left"),startTop:_11("top"),left:_11("left"),top:_11("top"),startX:e.pageX,startY:e.pageY,startWidth:$(e.data.target).outerWidth(),startHeight:$(e.data.target).outerHeight(),width:$(e.data.target).outerWidth(),height:$(e.data.target).outerHeight(),deltaWidth:$(e.data.target).outerWidth()-$(e.data.target).width(),deltaHeight:$(e.data.target).outerHeight()-$(e.data.target).height()};
|
||||
$(document).bind("mousedown.resizable",_12,_a);
|
||||
$(document).bind("mousemove.resizable",_12,_b);
|
||||
$(document).bind("mouseup.resizable",_12,_c);
|
||||
$("body").css("cursor",dir+"-resize");
|
||||
});
|
||||
function _10(e){
|
||||
var tt=$(e.data.target);
|
||||
var dir="";
|
||||
var _13=tt.offset();
|
||||
var _14=tt.outerWidth();
|
||||
var _15=tt.outerHeight();
|
||||
var _16=_d.edge;
|
||||
if(e.pageY>_13.top&&e.pageY<_13.top+_16){
|
||||
dir+="n";
|
||||
}else{
|
||||
if(e.pageY<_13.top+_15&&e.pageY>_13.top+_15-_16){
|
||||
dir+="s";
|
||||
}
|
||||
}
|
||||
if(e.pageX>_13.left&&e.pageX<_13.left+_16){
|
||||
dir+="w";
|
||||
}else{
|
||||
if(e.pageX<_13.left+_14&&e.pageX>_13.left+_14-_16){
|
||||
dir+="e";
|
||||
}
|
||||
}
|
||||
var _17=_d.handles.split(",");
|
||||
for(var i=0;i<_17.length;i++){
|
||||
var _18=_17[i].replace(/(^\s*)|(\s*$)/g,"");
|
||||
if(_18=="all"||_18==dir){
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
});
|
||||
};
|
||||
$.fn.resizable.methods={options:function(jq){
|
||||
return $.data(jq[0],"resizable").options;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:false});
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:true});
|
||||
});
|
||||
}};
|
||||
$.fn.resizable.parseOptions=function(_19){
|
||||
var t=$(_19);
|
||||
return $.extend({},$.parser.parseOptions(_19,["handles",{minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number",edge:"number"}]),{disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.resizable.defaults={disabled:false,handles:"n, e, s, w, ne, se, sw, nw, all",minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000,edge:5,onStartResize:function(e){
|
||||
},onResize:function(e){
|
||||
},onStopResize:function(e){
|
||||
}};
|
||||
$.fn.resizable.isResizing=false;
|
||||
})(jQuery);
|
||||
|
||||
184
WebRoot/js/easyui-1.3.5/plugins/jquery.searchbox.js
Normal file
184
WebRoot/js/easyui-1.3.5/plugins/jquery.searchbox.js
Normal file
@@ -0,0 +1,184 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("searchbox-f").hide();
|
||||
var _3=$("<span class=\"searchbox\"></span>").insertAfter(_2);
|
||||
var _4=$("<input type=\"text\" class=\"searchbox-text\">").appendTo(_3);
|
||||
$("<span><span class=\"searchbox-button\"></span></span>").appendTo(_3);
|
||||
var _5=$(_2).attr("name");
|
||||
if(_5){
|
||||
_4.attr("name",_5);
|
||||
$(_2).removeAttr("name").attr("searchboxName",_5);
|
||||
}
|
||||
return _3;
|
||||
};
|
||||
function _6(_7,_8){
|
||||
var _9=$.data(_7,"searchbox").options;
|
||||
var sb=$.data(_7,"searchbox").searchbox;
|
||||
if(_8){
|
||||
_9.width=_8;
|
||||
}
|
||||
sb.appendTo("body");
|
||||
if(isNaN(_9.width)){
|
||||
_9.width=sb._outerWidth();
|
||||
}
|
||||
var _a=sb.find("span.searchbox-button");
|
||||
var _b=sb.find("a.searchbox-menu");
|
||||
var _c=sb.find("input.searchbox-text");
|
||||
sb._outerWidth(_9.width)._outerHeight(_9.height);
|
||||
_c._outerWidth(sb.width()-_b._outerWidth()-_a._outerWidth());
|
||||
_c.css({height:sb.height()+"px",lineHeight:sb.height()+"px"});
|
||||
_b._outerHeight(sb.height());
|
||||
_a._outerHeight(sb.height());
|
||||
var _d=_b.find("span.l-btn-left");
|
||||
_d._outerHeight(sb.height());
|
||||
_d.find("span.l-btn-text,span.m-btn-downarrow").css({height:_d.height()+"px",lineHeight:_d.height()+"px"});
|
||||
sb.insertAfter(_7);
|
||||
};
|
||||
function _e(_f){
|
||||
var _10=$.data(_f,"searchbox");
|
||||
var _11=_10.options;
|
||||
if(_11.menu){
|
||||
_10.menu=$(_11.menu).menu({onClick:function(_12){
|
||||
_13(_12);
|
||||
}});
|
||||
var _14=_10.menu.children("div.menu-item:first");
|
||||
_10.menu.children("div.menu-item").each(function(){
|
||||
var _15=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
if(_15.selected){
|
||||
_14=$(this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
_14.triggerHandler("click");
|
||||
}else{
|
||||
_10.searchbox.find("a.searchbox-menu").remove();
|
||||
_10.menu=null;
|
||||
}
|
||||
function _13(_16){
|
||||
_10.searchbox.find("a.searchbox-menu").remove();
|
||||
var mb=$("<a class=\"searchbox-menu\" href=\"javascript:void(0)\"></a>").html(_16.text);
|
||||
mb.prependTo(_10.searchbox).menubutton({menu:_10.menu,iconCls:_16.iconCls});
|
||||
_10.searchbox.find("input.searchbox-text").attr("name",_16.name||_16.text);
|
||||
_6(_f);
|
||||
};
|
||||
};
|
||||
function _17(_18){
|
||||
var _19=$.data(_18,"searchbox");
|
||||
var _1a=_19.options;
|
||||
var _1b=_19.searchbox.find("input.searchbox-text");
|
||||
var _1c=_19.searchbox.find(".searchbox-button");
|
||||
_1b.unbind(".searchbox").bind("blur.searchbox",function(e){
|
||||
_1a.value=$(this).val();
|
||||
if(_1a.value==""){
|
||||
$(this).val(_1a.prompt);
|
||||
$(this).addClass("searchbox-prompt");
|
||||
}else{
|
||||
$(this).removeClass("searchbox-prompt");
|
||||
}
|
||||
}).bind("focus.searchbox",function(e){
|
||||
if($(this).val()!=_1a.value){
|
||||
$(this).val(_1a.value);
|
||||
}
|
||||
$(this).removeClass("searchbox-prompt");
|
||||
}).bind("keydown.searchbox",function(e){
|
||||
if(e.keyCode==13){
|
||||
e.preventDefault();
|
||||
_1a.value=$(this).val();
|
||||
_1a.searcher.call(_18,_1a.value,_1b._propAttr("name"));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
_1c.unbind(".searchbox").bind("click.searchbox",function(){
|
||||
_1a.searcher.call(_18,_1a.value,_1b._propAttr("name"));
|
||||
}).bind("mouseenter.searchbox",function(){
|
||||
$(this).addClass("searchbox-button-hover");
|
||||
}).bind("mouseleave.searchbox",function(){
|
||||
$(this).removeClass("searchbox-button-hover");
|
||||
});
|
||||
};
|
||||
function _1d(_1e){
|
||||
var _1f=$.data(_1e,"searchbox");
|
||||
var _20=_1f.options;
|
||||
var _21=_1f.searchbox.find("input.searchbox-text");
|
||||
if(_20.value==""){
|
||||
_21.val(_20.prompt);
|
||||
_21.addClass("searchbox-prompt");
|
||||
}else{
|
||||
_21.val(_20.value);
|
||||
_21.removeClass("searchbox-prompt");
|
||||
}
|
||||
};
|
||||
$.fn.searchbox=function(_22,_23){
|
||||
if(typeof _22=="string"){
|
||||
return $.fn.searchbox.methods[_22](this,_23);
|
||||
}
|
||||
_22=_22||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"searchbox");
|
||||
if(_24){
|
||||
$.extend(_24.options,_22);
|
||||
}else{
|
||||
_24=$.data(this,"searchbox",{options:$.extend({},$.fn.searchbox.defaults,$.fn.searchbox.parseOptions(this),_22),searchbox:_1(this)});
|
||||
}
|
||||
_e(this);
|
||||
_1d(this);
|
||||
_17(this);
|
||||
_6(this);
|
||||
});
|
||||
};
|
||||
$.fn.searchbox.methods={options:function(jq){
|
||||
return $.data(jq[0],"searchbox").options;
|
||||
},menu:function(jq){
|
||||
return $.data(jq[0],"searchbox").menu;
|
||||
},textbox:function(jq){
|
||||
return $.data(jq[0],"searchbox").searchbox.find("input.searchbox-text");
|
||||
},getValue:function(jq){
|
||||
return $.data(jq[0],"searchbox").options.value;
|
||||
},setValue:function(jq,_25){
|
||||
return jq.each(function(){
|
||||
$(this).searchbox("options").value=_25;
|
||||
$(this).searchbox("textbox").val(_25);
|
||||
$(this).searchbox("textbox").blur();
|
||||
});
|
||||
},getName:function(jq){
|
||||
return $.data(jq[0],"searchbox").searchbox.find("input.searchbox-text").attr("name");
|
||||
},selectName:function(jq,_26){
|
||||
return jq.each(function(){
|
||||
var _27=$.data(this,"searchbox").menu;
|
||||
if(_27){
|
||||
_27.children("div.menu-item[name=\""+_26+"\"]").triggerHandler("click");
|
||||
}
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _28=$(this).searchbox("menu");
|
||||
if(_28){
|
||||
_28.menu("destroy");
|
||||
}
|
||||
$.data(this,"searchbox").searchbox.remove();
|
||||
$(this).remove();
|
||||
});
|
||||
},resize:function(jq,_29){
|
||||
return jq.each(function(){
|
||||
_6(this,_29);
|
||||
});
|
||||
}};
|
||||
$.fn.searchbox.parseOptions=function(_2a){
|
||||
var t=$(_2a);
|
||||
return $.extend({},$.parser.parseOptions(_2a,["width","height","prompt","menu"]),{value:t.val(),searcher:(t.attr("searcher")?eval(t.attr("searcher")):undefined)});
|
||||
};
|
||||
$.fn.searchbox.defaults={width:"auto",height:22,prompt:"",value:"",menu:null,searcher:function(_2b,_2c){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
280
WebRoot/js/easyui-1.3.5/plugins/jquery.slider.js
Normal file
280
WebRoot/js/easyui-1.3.5/plugins/jquery.slider.js
Normal file
@@ -0,0 +1,280 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$("<div class=\"slider\">"+"<div class=\"slider-inner\">"+"<a href=\"javascript:void(0)\" class=\"slider-handle\"></a>"+"<span class=\"slider-tip\"></span>"+"</div>"+"<div class=\"slider-rule\"></div>"+"<div class=\"slider-rulelabel\"></div>"+"<div style=\"clear:both\"></div>"+"<input type=\"hidden\" class=\"slider-value\">"+"</div>").insertAfter(_2);
|
||||
var t=$(_2);
|
||||
t.addClass("slider-f").hide();
|
||||
var _4=t.attr("name");
|
||||
if(_4){
|
||||
_3.find("input.slider-value").attr("name",_4);
|
||||
t.removeAttr("name").attr("sliderName",_4);
|
||||
}
|
||||
return _3;
|
||||
};
|
||||
function _5(_6,_7){
|
||||
var _8=$.data(_6,"slider");
|
||||
var _9=_8.options;
|
||||
var _a=_8.slider;
|
||||
if(_7){
|
||||
if(_7.width){
|
||||
_9.width=_7.width;
|
||||
}
|
||||
if(_7.height){
|
||||
_9.height=_7.height;
|
||||
}
|
||||
}
|
||||
if(_9.mode=="h"){
|
||||
_a.css("height","");
|
||||
_a.children("div").css("height","");
|
||||
if(!isNaN(_9.width)){
|
||||
_a.width(_9.width);
|
||||
}
|
||||
}else{
|
||||
_a.css("width","");
|
||||
_a.children("div").css("width","");
|
||||
if(!isNaN(_9.height)){
|
||||
_a.height(_9.height);
|
||||
_a.find("div.slider-rule").height(_9.height);
|
||||
_a.find("div.slider-rulelabel").height(_9.height);
|
||||
_a.find("div.slider-inner")._outerHeight(_9.height);
|
||||
}
|
||||
}
|
||||
_b(_6);
|
||||
};
|
||||
function _c(_d){
|
||||
var _e=$.data(_d,"slider");
|
||||
var _f=_e.options;
|
||||
var _10=_e.slider;
|
||||
var aa=_f.mode=="h"?_f.rule:_f.rule.slice(0).reverse();
|
||||
if(_f.reversed){
|
||||
aa=aa.slice(0).reverse();
|
||||
}
|
||||
_11(aa);
|
||||
function _11(aa){
|
||||
var _12=_10.find("div.slider-rule");
|
||||
var _13=_10.find("div.slider-rulelabel");
|
||||
_12.empty();
|
||||
_13.empty();
|
||||
for(var i=0;i<aa.length;i++){
|
||||
var _14=i*100/(aa.length-1)+"%";
|
||||
var _15=$("<span></span>").appendTo(_12);
|
||||
_15.css((_f.mode=="h"?"left":"top"),_14);
|
||||
if(aa[i]!="|"){
|
||||
_15=$("<span></span>").appendTo(_13);
|
||||
_15.html(aa[i]);
|
||||
if(_f.mode=="h"){
|
||||
_15.css({left:_14,marginLeft:-Math.round(_15.outerWidth()/2)});
|
||||
}else{
|
||||
_15.css({top:_14,marginTop:-Math.round(_15.outerHeight()/2)});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _16(_17){
|
||||
var _18=$.data(_17,"slider");
|
||||
var _19=_18.options;
|
||||
var _1a=_18.slider;
|
||||
_1a.removeClass("slider-h slider-v slider-disabled");
|
||||
_1a.addClass(_19.mode=="h"?"slider-h":"slider-v");
|
||||
_1a.addClass(_19.disabled?"slider-disabled":"");
|
||||
_1a.find("a.slider-handle").draggable({axis:_19.mode,cursor:"pointer",disabled:_19.disabled,onDrag:function(e){
|
||||
var _1b=e.data.left;
|
||||
var _1c=_1a.width();
|
||||
if(_19.mode!="h"){
|
||||
_1b=e.data.top;
|
||||
_1c=_1a.height();
|
||||
}
|
||||
if(_1b<0||_1b>_1c){
|
||||
return false;
|
||||
}else{
|
||||
var _1d=_32(_17,_1b);
|
||||
_1e(_1d);
|
||||
return false;
|
||||
}
|
||||
},onBeforeDrag:function(){
|
||||
_18.isDragging=true;
|
||||
},onStartDrag:function(){
|
||||
_19.onSlideStart.call(_17,_19.value);
|
||||
},onStopDrag:function(e){
|
||||
var _1f=_32(_17,(_19.mode=="h"?e.data.left:e.data.top));
|
||||
_1e(_1f);
|
||||
_19.onSlideEnd.call(_17,_19.value);
|
||||
_19.onComplete.call(_17,_19.value);
|
||||
_18.isDragging=false;
|
||||
}});
|
||||
_1a.find("div.slider-inner").unbind(".slider").bind("mousedown.slider",function(e){
|
||||
if(_18.isDragging){
|
||||
return;
|
||||
}
|
||||
var pos=$(this).offset();
|
||||
var _20=_32(_17,(_19.mode=="h"?(e.pageX-pos.left):(e.pageY-pos.top)));
|
||||
_1e(_20);
|
||||
_19.onComplete.call(_17,_19.value);
|
||||
});
|
||||
function _1e(_21){
|
||||
var s=Math.abs(_21%_19.step);
|
||||
if(s<_19.step/2){
|
||||
_21-=s;
|
||||
}else{
|
||||
_21=_21-s+_19.step;
|
||||
}
|
||||
_22(_17,_21);
|
||||
};
|
||||
};
|
||||
function _22(_23,_24){
|
||||
var _25=$.data(_23,"slider");
|
||||
var _26=_25.options;
|
||||
var _27=_25.slider;
|
||||
var _28=_26.value;
|
||||
if(_24<_26.min){
|
||||
_24=_26.min;
|
||||
}
|
||||
if(_24>_26.max){
|
||||
_24=_26.max;
|
||||
}
|
||||
_26.value=_24;
|
||||
$(_23).val(_24);
|
||||
_27.find("input.slider-value").val(_24);
|
||||
var pos=_29(_23,_24);
|
||||
var tip=_27.find(".slider-tip");
|
||||
if(_26.showTip){
|
||||
tip.show();
|
||||
tip.html(_26.tipFormatter.call(_23,_26.value));
|
||||
}else{
|
||||
tip.hide();
|
||||
}
|
||||
if(_26.mode=="h"){
|
||||
var _2a="left:"+pos+"px;";
|
||||
_27.find(".slider-handle").attr("style",_2a);
|
||||
tip.attr("style",_2a+"margin-left:"+(-Math.round(tip.outerWidth()/2))+"px");
|
||||
}else{
|
||||
var _2a="top:"+pos+"px;";
|
||||
_27.find(".slider-handle").attr("style",_2a);
|
||||
tip.attr("style",_2a+"margin-left:"+(-Math.round(tip.outerWidth()))+"px");
|
||||
}
|
||||
if(_28!=_24){
|
||||
_26.onChange.call(_23,_24,_28);
|
||||
}
|
||||
};
|
||||
function _b(_2b){
|
||||
var _2c=$.data(_2b,"slider").options;
|
||||
var fn=_2c.onChange;
|
||||
_2c.onChange=function(){
|
||||
};
|
||||
_22(_2b,_2c.value);
|
||||
_2c.onChange=fn;
|
||||
};
|
||||
function _29(_2d,_2e){
|
||||
var _2f=$.data(_2d,"slider");
|
||||
var _30=_2f.options;
|
||||
var _31=_2f.slider;
|
||||
if(_30.mode=="h"){
|
||||
var pos=(_2e-_30.min)/(_30.max-_30.min)*_31.width();
|
||||
if(_30.reversed){
|
||||
pos=_31.width()-pos;
|
||||
}
|
||||
}else{
|
||||
var pos=_31.height()-(_2e-_30.min)/(_30.max-_30.min)*_31.height();
|
||||
if(_30.reversed){
|
||||
pos=_31.height()-pos;
|
||||
}
|
||||
}
|
||||
return pos.toFixed(0);
|
||||
};
|
||||
function _32(_33,pos){
|
||||
var _34=$.data(_33,"slider");
|
||||
var _35=_34.options;
|
||||
var _36=_34.slider;
|
||||
if(_35.mode=="h"){
|
||||
var _37=_35.min+(_35.max-_35.min)*(pos/_36.width());
|
||||
}else{
|
||||
var _37=_35.min+(_35.max-_35.min)*((_36.height()-pos)/_36.height());
|
||||
}
|
||||
return _35.reversed?_35.max-_37.toFixed(0):_37.toFixed(0);
|
||||
};
|
||||
$.fn.slider=function(_38,_39){
|
||||
if(typeof _38=="string"){
|
||||
return $.fn.slider.methods[_38](this,_39);
|
||||
}
|
||||
_38=_38||{};
|
||||
return this.each(function(){
|
||||
var _3a=$.data(this,"slider");
|
||||
if(_3a){
|
||||
$.extend(_3a.options,_38);
|
||||
}else{
|
||||
_3a=$.data(this,"slider",{options:$.extend({},$.fn.slider.defaults,$.fn.slider.parseOptions(this),_38),slider:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
var _3b=_3a.options;
|
||||
_3b.min=parseFloat(_3b.min);
|
||||
_3b.max=parseFloat(_3b.max);
|
||||
_3b.value=parseFloat(_3b.value);
|
||||
_3b.step=parseFloat(_3b.step);
|
||||
_3b.originalValue=_3b.value;
|
||||
_16(this);
|
||||
_c(this);
|
||||
_5(this);
|
||||
});
|
||||
};
|
||||
$.fn.slider.methods={options:function(jq){
|
||||
return $.data(jq[0],"slider").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").slider.remove();
|
||||
$(this).remove();
|
||||
});
|
||||
},resize:function(jq,_3c){
|
||||
return jq.each(function(){
|
||||
_5(this,_3c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.slider("options").value;
|
||||
},setValue:function(jq,_3d){
|
||||
return jq.each(function(){
|
||||
_22(this,_3d);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _3e=$(this).slider("options");
|
||||
_22(this,_3e.min);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _3f=$(this).slider("options");
|
||||
_22(this,_3f.originalValue);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").options.disabled=false;
|
||||
_16(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").options.disabled=true;
|
||||
_16(this);
|
||||
});
|
||||
}};
|
||||
$.fn.slider.parseOptions=function(_40){
|
||||
var t=$(_40);
|
||||
return $.extend({},$.parser.parseOptions(_40,["width","height","mode",{reversed:"boolean",showTip:"boolean",min:"number",max:"number",step:"number"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined),rule:(t.attr("rule")?eval(t.attr("rule")):undefined)});
|
||||
};
|
||||
$.fn.slider.defaults={width:"auto",height:"auto",mode:"h",reversed:false,showTip:false,disabled:false,value:0,min:0,max:100,step:1,rule:[],tipFormatter:function(_41){
|
||||
return _41;
|
||||
},onChange:function(_42,_43){
|
||||
},onSlideStart:function(_44){
|
||||
},onSlideEnd:function(_45){
|
||||
},onComplete:function(_46){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
152
WebRoot/js/easyui-1.3.5/plugins/jquery.spinner.js
Normal file
152
WebRoot/js/easyui-1.3.5/plugins/jquery.spinner.js
Normal file
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$("<span class=\"spinner\">"+"<span class=\"spinner-arrow\">"+"<span class=\"spinner-arrow-up\"></span>"+"<span class=\"spinner-arrow-down\"></span>"+"</span>"+"</span>").insertAfter(_2);
|
||||
$(_2).addClass("spinner-text spinner-f").prependTo(_3);
|
||||
return _3;
|
||||
};
|
||||
function _4(_5,_6){
|
||||
var _7=$.data(_5,"spinner").options;
|
||||
var _8=$.data(_5,"spinner").spinner;
|
||||
if(_6){
|
||||
_7.width=_6;
|
||||
}
|
||||
var _9=$("<div style=\"display:none\"></div>").insertBefore(_8);
|
||||
_8.appendTo("body");
|
||||
if(isNaN(_7.width)){
|
||||
_7.width=$(_5).outerWidth();
|
||||
}
|
||||
var _a=_8.find(".spinner-arrow");
|
||||
_8._outerWidth(_7.width)._outerHeight(_7.height);
|
||||
$(_5)._outerWidth(_8.width()-_a.outerWidth());
|
||||
$(_5).css({height:_8.height()+"px",lineHeight:_8.height()+"px"});
|
||||
_a._outerHeight(_8.height());
|
||||
_a.find("span")._outerHeight(_a.height()/2);
|
||||
_8.insertAfter(_9);
|
||||
_9.remove();
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.data(_c,"spinner").options;
|
||||
var _e=$.data(_c,"spinner").spinner;
|
||||
_e.find(".spinner-arrow-up,.spinner-arrow-down").unbind(".spinner");
|
||||
if(!_d.disabled){
|
||||
_e.find(".spinner-arrow-up").bind("mouseenter.spinner",function(){
|
||||
$(this).addClass("spinner-arrow-hover");
|
||||
}).bind("mouseleave.spinner",function(){
|
||||
$(this).removeClass("spinner-arrow-hover");
|
||||
}).bind("click.spinner",function(){
|
||||
_d.spin.call(_c,false);
|
||||
_d.onSpinUp.call(_c);
|
||||
$(_c).validatebox("validate");
|
||||
});
|
||||
_e.find(".spinner-arrow-down").bind("mouseenter.spinner",function(){
|
||||
$(this).addClass("spinner-arrow-hover");
|
||||
}).bind("mouseleave.spinner",function(){
|
||||
$(this).removeClass("spinner-arrow-hover");
|
||||
}).bind("click.spinner",function(){
|
||||
_d.spin.call(_c,true);
|
||||
_d.onSpinDown.call(_c);
|
||||
$(_c).validatebox("validate");
|
||||
});
|
||||
}
|
||||
};
|
||||
function _f(_10,_11){
|
||||
var _12=$.data(_10,"spinner").options;
|
||||
if(_11){
|
||||
_12.disabled=true;
|
||||
$(_10).attr("disabled",true);
|
||||
}else{
|
||||
_12.disabled=false;
|
||||
$(_10).removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
$.fn.spinner=function(_13,_14){
|
||||
if(typeof _13=="string"){
|
||||
var _15=$.fn.spinner.methods[_13];
|
||||
if(_15){
|
||||
return _15(this,_14);
|
||||
}else{
|
||||
return this.validatebox(_13,_14);
|
||||
}
|
||||
}
|
||||
_13=_13||{};
|
||||
return this.each(function(){
|
||||
var _16=$.data(this,"spinner");
|
||||
if(_16){
|
||||
$.extend(_16.options,_13);
|
||||
}else{
|
||||
_16=$.data(this,"spinner",{options:$.extend({},$.fn.spinner.defaults,$.fn.spinner.parseOptions(this),_13),spinner:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_16.options.originalValue=_16.options.value;
|
||||
$(this).val(_16.options.value);
|
||||
$(this).attr("readonly",!_16.options.editable);
|
||||
_f(this,_16.options.disabled);
|
||||
_4(this);
|
||||
$(this).validatebox(_16.options);
|
||||
_b(this);
|
||||
});
|
||||
};
|
||||
$.fn.spinner.methods={options:function(jq){
|
||||
var _17=$.data(jq[0],"spinner").options;
|
||||
return $.extend(_17,{value:jq.val()});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _18=$.data(this,"spinner").spinner;
|
||||
$(this).validatebox("destroy");
|
||||
_18.remove();
|
||||
});
|
||||
},resize:function(jq,_19){
|
||||
return jq.each(function(){
|
||||
_4(this,_19);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_f(this,false);
|
||||
_b(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_f(this,true);
|
||||
_b(this);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.val();
|
||||
},setValue:function(jq,_1a){
|
||||
return jq.each(function(){
|
||||
var _1b=$.data(this,"spinner").options;
|
||||
_1b.value=_1a;
|
||||
$(this).val(_1a);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1c=$.data(this,"spinner").options;
|
||||
_1c.value="";
|
||||
$(this).val("");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1d=$(this).spinner("options");
|
||||
$(this).spinner("setValue",_1d.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.spinner.parseOptions=function(_1e){
|
||||
var t=$(_1e);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_1e),$.parser.parseOptions(_1e,["width","height","min","max",{increment:"number",editable:"boolean"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.spinner.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,deltaX:19,value:"",min:null,max:null,increment:1,editable:true,disabled:false,spin:function(_1f){
|
||||
},onSpinUp:function(){
|
||||
},onSpinDown:function(){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
50
WebRoot/js/easyui-1.3.5/plugins/jquery.splitbutton.js
Normal file
50
WebRoot/js/easyui-1.3.5/plugins/jquery.splitbutton.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"splitbutton").options;
|
||||
$(_2).menubutton(_3);
|
||||
};
|
||||
$.fn.splitbutton=function(_4,_5){
|
||||
if(typeof _4=="string"){
|
||||
var _6=$.fn.splitbutton.methods[_4];
|
||||
if(_6){
|
||||
return _6(this,_5);
|
||||
}else{
|
||||
return this.menubutton(_4,_5);
|
||||
}
|
||||
}
|
||||
_4=_4||{};
|
||||
return this.each(function(){
|
||||
var _7=$.data(this,"splitbutton");
|
||||
if(_7){
|
||||
$.extend(_7.options,_4);
|
||||
}else{
|
||||
$.data(this,"splitbutton",{options:$.extend({},$.fn.splitbutton.defaults,$.fn.splitbutton.parseOptions(this),_4)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.splitbutton.methods={options:function(jq){
|
||||
var _8=jq.menubutton("options");
|
||||
var _9=$.data(jq[0],"splitbutton").options;
|
||||
$.extend(_9,{disabled:_8.disabled,toggle:_8.toggle,selected:_8.selected});
|
||||
return _9;
|
||||
}};
|
||||
$.fn.splitbutton.parseOptions=function(_a){
|
||||
var t=$(_a);
|
||||
return $.extend({},$.fn.linkbutton.parseOptions(_a),$.parser.parseOptions(_a,["menu",{plain:"boolean",duration:"number"}]));
|
||||
};
|
||||
$.fn.splitbutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"s-btn-active",btn2:"s-btn-plain-active",arrow:"s-btn-downarrow",trigger:"s-btn-downarrow"}});
|
||||
})(jQuery);
|
||||
|
||||
609
WebRoot/js/easyui-1.3.5/plugins/jquery.tabs.js
Normal file
609
WebRoot/js/easyui-1.3.5/plugins/jquery.tabs.js
Normal file
@@ -0,0 +1,609 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"tabs").options;
|
||||
if(_3.tabPosition=="left"||_3.tabPosition=="right"||!_3.showHeader){
|
||||
return;
|
||||
}
|
||||
var _4=$(_2).children("div.tabs-header");
|
||||
var _5=_4.children("div.tabs-tool");
|
||||
var _6=_4.children("div.tabs-scroller-left");
|
||||
var _7=_4.children("div.tabs-scroller-right");
|
||||
var _8=_4.children("div.tabs-wrap");
|
||||
var _9=_4.outerHeight();
|
||||
if(_3.plain){
|
||||
_9-=_9-_4.height();
|
||||
}
|
||||
_5._outerHeight(_9);
|
||||
var _a=0;
|
||||
$("ul.tabs li",_4).each(function(){
|
||||
_a+=$(this).outerWidth(true);
|
||||
});
|
||||
var _b=_4.width()-_5._outerWidth();
|
||||
if(_a>_b){
|
||||
_6.add(_7).show()._outerHeight(_9);
|
||||
if(_3.toolPosition=="left"){
|
||||
_5.css({left:_6.outerWidth(),right:""});
|
||||
_8.css({marginLeft:_6.outerWidth()+_5._outerWidth(),marginRight:_7._outerWidth(),width:_b-_6.outerWidth()-_7.outerWidth()});
|
||||
}else{
|
||||
_5.css({left:"",right:_7.outerWidth()});
|
||||
_8.css({marginLeft:_6.outerWidth(),marginRight:_7.outerWidth()+_5._outerWidth(),width:_b-_6.outerWidth()-_7.outerWidth()});
|
||||
}
|
||||
}else{
|
||||
_6.add(_7).hide();
|
||||
if(_3.toolPosition=="left"){
|
||||
_5.css({left:0,right:""});
|
||||
_8.css({marginLeft:_5._outerWidth(),marginRight:0,width:_b});
|
||||
}else{
|
||||
_5.css({left:"",right:0});
|
||||
_8.css({marginLeft:0,marginRight:_5._outerWidth(),width:_b});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _c(_d){
|
||||
var _e=$.data(_d,"tabs").options;
|
||||
var _f=$(_d).children("div.tabs-header");
|
||||
if(_e.tools){
|
||||
if(typeof _e.tools=="string"){
|
||||
$(_e.tools).addClass("tabs-tool").appendTo(_f);
|
||||
$(_e.tools).show();
|
||||
}else{
|
||||
_f.children("div.tabs-tool").remove();
|
||||
var _10=$("<div class=\"tabs-tool\"><table cellspacing=\"0\" cellpadding=\"0\" style=\"height:100%\"><tr></tr></table></div>").appendTo(_f);
|
||||
var tr=_10.find("tr");
|
||||
for(var i=0;i<_e.tools.length;i++){
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _11=$("<a href=\"javascript:void(0);\"></a>").appendTo(td);
|
||||
_11[0].onclick=eval(_e.tools[i].handler||function(){
|
||||
});
|
||||
_11.linkbutton($.extend({},_e.tools[i],{plain:true}));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
_f.children("div.tabs-tool").remove();
|
||||
}
|
||||
};
|
||||
function _12(_13){
|
||||
var _14=$.data(_13,"tabs");
|
||||
var _15=_14.options;
|
||||
var cc=$(_13);
|
||||
_15.fit?$.extend(_15,cc._fit()):cc._fit(false);
|
||||
cc.width(_15.width).height(_15.height);
|
||||
var _16=$(_13).children("div.tabs-header");
|
||||
var _17=$(_13).children("div.tabs-panels");
|
||||
var _18=_16.find("div.tabs-wrap");
|
||||
var ul=_18.find(".tabs");
|
||||
for(var i=0;i<_14.tabs.length;i++){
|
||||
var _19=_14.tabs[i].panel("options");
|
||||
var p_t=_19.tab.find("a.tabs-inner");
|
||||
var _1a=parseInt(_19.tabWidth||_15.tabWidth)||undefined;
|
||||
if(_1a){
|
||||
p_t._outerWidth(_1a);
|
||||
}else{
|
||||
p_t.css("width","");
|
||||
}
|
||||
p_t._outerHeight(_15.tabHeight);
|
||||
p_t.css("lineHeight",p_t.height()+"px");
|
||||
}
|
||||
if(_15.tabPosition=="left"||_15.tabPosition=="right"){
|
||||
_16._outerWidth(_15.showHeader?_15.headerWidth:0);
|
||||
_17._outerWidth(cc.width()-_16.outerWidth());
|
||||
_16.add(_17)._outerHeight(_15.height);
|
||||
_18._outerWidth(_16.width());
|
||||
ul._outerWidth(_18.width()).css("height","");
|
||||
}else{
|
||||
var lrt=_16.children("div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool");
|
||||
_16._outerWidth(_15.width).css("height","");
|
||||
if(_15.showHeader){
|
||||
_16.css("background-color","");
|
||||
_18.css("height","");
|
||||
lrt.show();
|
||||
}else{
|
||||
_16.css("background-color","transparent");
|
||||
_16._outerHeight(0);
|
||||
_18._outerHeight(0);
|
||||
lrt.hide();
|
||||
}
|
||||
ul._outerHeight(_15.tabHeight).css("width","");
|
||||
_1(_13);
|
||||
var _1b=_15.height;
|
||||
if(!isNaN(_1b)){
|
||||
_17._outerHeight(_1b-_16.outerHeight());
|
||||
}else{
|
||||
_17.height("auto");
|
||||
}
|
||||
var _1a=_15.width;
|
||||
if(!isNaN(_1a)){
|
||||
_17._outerWidth(_1a);
|
||||
}else{
|
||||
_17.width("auto");
|
||||
}
|
||||
}
|
||||
};
|
||||
function _1c(_1d){
|
||||
var _1e=$.data(_1d,"tabs").options;
|
||||
var tab=_1f(_1d);
|
||||
if(tab){
|
||||
var _20=$(_1d).children("div.tabs-panels");
|
||||
var _21=_1e.width=="auto"?"auto":_20.width();
|
||||
var _22=_1e.height=="auto"?"auto":_20.height();
|
||||
tab.panel("resize",{width:_21,height:_22});
|
||||
}
|
||||
};
|
||||
function _23(_24){
|
||||
var _25=$.data(_24,"tabs").tabs;
|
||||
var cc=$(_24);
|
||||
cc.addClass("tabs-container");
|
||||
var pp=$("<div class=\"tabs-panels\"></div>").insertBefore(cc);
|
||||
cc.children("div").each(function(){
|
||||
pp[0].appendChild(this);
|
||||
});
|
||||
cc[0].appendChild(pp[0]);
|
||||
$("<div class=\"tabs-header\">"+"<div class=\"tabs-scroller-left\"></div>"+"<div class=\"tabs-scroller-right\"></div>"+"<div class=\"tabs-wrap\">"+"<ul class=\"tabs\"></ul>"+"</div>"+"</div>").prependTo(_24);
|
||||
cc.children("div.tabs-panels").children("div").each(function(i){
|
||||
var _26=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
var pp=$(this);
|
||||
_25.push(pp);
|
||||
_36(_24,pp,_26);
|
||||
});
|
||||
cc.children("div.tabs-header").find(".tabs-scroller-left, .tabs-scroller-right").hover(function(){
|
||||
$(this).addClass("tabs-scroller-over");
|
||||
},function(){
|
||||
$(this).removeClass("tabs-scroller-over");
|
||||
});
|
||||
cc.bind("_resize",function(e,_27){
|
||||
var _28=$.data(_24,"tabs").options;
|
||||
if(_28.fit==true||_27){
|
||||
_12(_24);
|
||||
_1c(_24);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _29(_2a){
|
||||
var _2b=$.data(_2a,"tabs");
|
||||
var _2c=_2b.options;
|
||||
$(_2a).children("div.tabs-header").unbind().bind("click",function(e){
|
||||
if($(e.target).hasClass("tabs-scroller-left")){
|
||||
$(_2a).tabs("scrollBy",-_2c.scrollIncrement);
|
||||
}else{
|
||||
if($(e.target).hasClass("tabs-scroller-right")){
|
||||
$(_2a).tabs("scrollBy",_2c.scrollIncrement);
|
||||
}else{
|
||||
var li=$(e.target).closest("li");
|
||||
if(li.hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
var a=$(e.target).closest("a.tabs-close");
|
||||
if(a.length){
|
||||
_4c(_2a,_2d(li));
|
||||
}else{
|
||||
if(li.length){
|
||||
var _2e=_2d(li);
|
||||
var _2f=_2b.tabs[_2e].panel("options");
|
||||
if(_2f.collapsible){
|
||||
_2f.closed?_41(_2a,_2e):_6b(_2a,_2e);
|
||||
}else{
|
||||
_41(_2a,_2e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).bind("contextmenu",function(e){
|
||||
var li=$(e.target).closest("li");
|
||||
if(li.hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
if(li.length){
|
||||
_2c.onContextMenu.call(_2a,e,li.find("span.tabs-title").html(),_2d(li));
|
||||
}
|
||||
});
|
||||
function _2d(li){
|
||||
var _30=0;
|
||||
li.parent().children("li").each(function(i){
|
||||
if(li[0]==this){
|
||||
_30=i;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return _30;
|
||||
};
|
||||
};
|
||||
function _31(_32){
|
||||
var _33=$.data(_32,"tabs").options;
|
||||
var _34=$(_32).children("div.tabs-header");
|
||||
var _35=$(_32).children("div.tabs-panels");
|
||||
_34.removeClass("tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right");
|
||||
_35.removeClass("tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right");
|
||||
if(_33.tabPosition=="top"){
|
||||
_34.insertBefore(_35);
|
||||
}else{
|
||||
if(_33.tabPosition=="bottom"){
|
||||
_34.insertAfter(_35);
|
||||
_34.addClass("tabs-header-bottom");
|
||||
_35.addClass("tabs-panels-top");
|
||||
}else{
|
||||
if(_33.tabPosition=="left"){
|
||||
_34.addClass("tabs-header-left");
|
||||
_35.addClass("tabs-panels-right");
|
||||
}else{
|
||||
if(_33.tabPosition=="right"){
|
||||
_34.addClass("tabs-header-right");
|
||||
_35.addClass("tabs-panels-left");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_33.plain==true){
|
||||
_34.addClass("tabs-header-plain");
|
||||
}else{
|
||||
_34.removeClass("tabs-header-plain");
|
||||
}
|
||||
if(_33.border==true){
|
||||
_34.removeClass("tabs-header-noborder");
|
||||
_35.removeClass("tabs-panels-noborder");
|
||||
}else{
|
||||
_34.addClass("tabs-header-noborder");
|
||||
_35.addClass("tabs-panels-noborder");
|
||||
}
|
||||
};
|
||||
function _36(_37,pp,_38){
|
||||
var _39=$.data(_37,"tabs");
|
||||
_38=_38||{};
|
||||
pp.panel($.extend({},_38,{border:false,noheader:true,closed:true,doSize:false,iconCls:(_38.icon?_38.icon:undefined),onLoad:function(){
|
||||
if(_38.onLoad){
|
||||
_38.onLoad.call(this,arguments);
|
||||
}
|
||||
_39.options.onLoad.call(_37,$(this));
|
||||
}}));
|
||||
var _3a=pp.panel("options");
|
||||
var _3b=$(_37).children("div.tabs-header").find("ul.tabs");
|
||||
_3a.tab=$("<li></li>").appendTo(_3b);
|
||||
_3a.tab.append("<a href=\"javascript:void(0)\" class=\"tabs-inner\">"+"<span class=\"tabs-title\"></span>"+"<span class=\"tabs-icon\"></span>"+"</a>");
|
||||
$(_37).tabs("update",{tab:pp,options:_3a});
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"tabs").options;
|
||||
var _40=$.data(_3d,"tabs").tabs;
|
||||
if(_3e.selected==undefined){
|
||||
_3e.selected=true;
|
||||
}
|
||||
var pp=$("<div></div>").appendTo($(_3d).children("div.tabs-panels"));
|
||||
_40.push(pp);
|
||||
_36(_3d,pp,_3e);
|
||||
_3f.onAdd.call(_3d,_3e.title,_40.length-1);
|
||||
_12(_3d);
|
||||
if(_3e.selected){
|
||||
_41(_3d,_40.length-1);
|
||||
}
|
||||
};
|
||||
function _42(_43,_44){
|
||||
var _45=$.data(_43,"tabs").selectHis;
|
||||
var pp=_44.tab;
|
||||
var _46=pp.panel("options").title;
|
||||
pp.panel($.extend({},_44.options,{iconCls:(_44.options.icon?_44.options.icon:undefined)}));
|
||||
var _47=pp.panel("options");
|
||||
var tab=_47.tab;
|
||||
var _48=tab.find("span.tabs-title");
|
||||
var _49=tab.find("span.tabs-icon");
|
||||
_48.html(_47.title);
|
||||
_49.attr("class","tabs-icon");
|
||||
tab.find("a.tabs-close").remove();
|
||||
if(_47.closable){
|
||||
_48.addClass("tabs-closable");
|
||||
$("<a href=\"javascript:void(0)\" class=\"tabs-close\"></a>").appendTo(tab);
|
||||
}else{
|
||||
_48.removeClass("tabs-closable");
|
||||
}
|
||||
if(_47.iconCls){
|
||||
_48.addClass("tabs-with-icon");
|
||||
_49.addClass(_47.iconCls);
|
||||
}else{
|
||||
_48.removeClass("tabs-with-icon");
|
||||
}
|
||||
if(_46!=_47.title){
|
||||
for(var i=0;i<_45.length;i++){
|
||||
if(_45[i]==_46){
|
||||
_45[i]=_47.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
tab.find("span.tabs-p-tool").remove();
|
||||
if(_47.tools){
|
||||
var _4a=$("<span class=\"tabs-p-tool\"></span>").insertAfter(tab.find("a.tabs-inner"));
|
||||
if($.isArray(_47.tools)){
|
||||
for(var i=0;i<_47.tools.length;i++){
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").appendTo(_4a);
|
||||
t.addClass(_47.tools[i].iconCls);
|
||||
if(_47.tools[i].handler){
|
||||
t.bind("click",{handler:_47.tools[i].handler},function(e){
|
||||
if($(this).parents("li").hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
e.data.handler.call(this);
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_47.tools).children().appendTo(_4a);
|
||||
}
|
||||
var pr=_4a.children().length*12;
|
||||
if(_47.closable){
|
||||
pr+=8;
|
||||
}else{
|
||||
pr-=3;
|
||||
_4a.css("right","5px");
|
||||
}
|
||||
_48.css("padding-right",pr+"px");
|
||||
}
|
||||
_12(_43);
|
||||
$.data(_43,"tabs").options.onUpdate.call(_43,_47.title,_4b(_43,pp));
|
||||
};
|
||||
function _4c(_4d,_4e){
|
||||
var _4f=$.data(_4d,"tabs").options;
|
||||
var _50=$.data(_4d,"tabs").tabs;
|
||||
var _51=$.data(_4d,"tabs").selectHis;
|
||||
if(!_52(_4d,_4e)){
|
||||
return;
|
||||
}
|
||||
var tab=_53(_4d,_4e);
|
||||
var _54=tab.panel("options").title;
|
||||
var _55=_4b(_4d,tab);
|
||||
if(_4f.onBeforeClose.call(_4d,_54,_55)==false){
|
||||
return;
|
||||
}
|
||||
var tab=_53(_4d,_4e,true);
|
||||
tab.panel("options").tab.remove();
|
||||
tab.panel("destroy");
|
||||
_4f.onClose.call(_4d,_54,_55);
|
||||
_12(_4d);
|
||||
for(var i=0;i<_51.length;i++){
|
||||
if(_51[i]==_54){
|
||||
_51.splice(i,1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
var _56=_51.pop();
|
||||
if(_56){
|
||||
_41(_4d,_56);
|
||||
}else{
|
||||
if(_50.length){
|
||||
_41(_4d,0);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _53(_57,_58,_59){
|
||||
var _5a=$.data(_57,"tabs").tabs;
|
||||
if(typeof _58=="number"){
|
||||
if(_58<0||_58>=_5a.length){
|
||||
return null;
|
||||
}else{
|
||||
var tab=_5a[_58];
|
||||
if(_59){
|
||||
_5a.splice(_58,1);
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
for(var i=0;i<_5a.length;i++){
|
||||
var tab=_5a[i];
|
||||
if(tab.panel("options").title==_58){
|
||||
if(_59){
|
||||
_5a.splice(i,1);
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _4b(_5b,tab){
|
||||
var _5c=$.data(_5b,"tabs").tabs;
|
||||
for(var i=0;i<_5c.length;i++){
|
||||
if(_5c[i][0]==$(tab)[0]){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
function _1f(_5d){
|
||||
var _5e=$.data(_5d,"tabs").tabs;
|
||||
for(var i=0;i<_5e.length;i++){
|
||||
var tab=_5e[i];
|
||||
if(tab.panel("options").closed==false){
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _5f(_60){
|
||||
var _61=$.data(_60,"tabs");
|
||||
var _62=_61.tabs;
|
||||
for(var i=0;i<_62.length;i++){
|
||||
if(_62[i].panel("options").selected){
|
||||
_41(_60,i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
_41(_60,_61.options.selected);
|
||||
};
|
||||
function _41(_63,_64){
|
||||
var _65=$.data(_63,"tabs");
|
||||
var _66=_65.options;
|
||||
var _67=_65.tabs;
|
||||
var _68=_65.selectHis;
|
||||
if(_67.length==0){
|
||||
return;
|
||||
}
|
||||
var _69=_53(_63,_64);
|
||||
if(!_69){
|
||||
return;
|
||||
}
|
||||
var _6a=_1f(_63);
|
||||
if(_6a){
|
||||
if(_69[0]==_6a[0]){
|
||||
return;
|
||||
}
|
||||
_6b(_63,_4b(_63,_6a));
|
||||
if(!_6a.panel("options").closed){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_69.panel("open");
|
||||
var _6c=_69.panel("options").title;
|
||||
_68.push(_6c);
|
||||
var tab=_69.panel("options").tab;
|
||||
tab.addClass("tabs-selected");
|
||||
var _6d=$(_63).find(">div.tabs-header>div.tabs-wrap");
|
||||
var _6e=tab.position().left;
|
||||
var _6f=_6e+tab.outerWidth();
|
||||
if(_6e<0||_6f>_6d.width()){
|
||||
var _70=_6e-(_6d.width()-tab.width())/2;
|
||||
$(_63).tabs("scrollBy",_70);
|
||||
}else{
|
||||
$(_63).tabs("scrollBy",0);
|
||||
}
|
||||
_1c(_63);
|
||||
_66.onSelect.call(_63,_6c,_4b(_63,_69));
|
||||
};
|
||||
function _6b(_71,_72){
|
||||
var _73=$.data(_71,"tabs");
|
||||
var p=_53(_71,_72);
|
||||
if(p){
|
||||
var _74=p.panel("options");
|
||||
if(!_74.closed){
|
||||
p.panel("close");
|
||||
if(_74.closed){
|
||||
_74.tab.removeClass("tabs-selected");
|
||||
_73.options.onUnselect.call(_71,_74.title,_4b(_71,p));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _52(_75,_76){
|
||||
return _53(_75,_76)!=null;
|
||||
};
|
||||
function _77(_78,_79){
|
||||
var _7a=$.data(_78,"tabs").options;
|
||||
_7a.showHeader=_79;
|
||||
$(_78).tabs("resize");
|
||||
};
|
||||
$.fn.tabs=function(_7b,_7c){
|
||||
if(typeof _7b=="string"){
|
||||
return $.fn.tabs.methods[_7b](this,_7c);
|
||||
}
|
||||
_7b=_7b||{};
|
||||
return this.each(function(){
|
||||
var _7d=$.data(this,"tabs");
|
||||
var _7e;
|
||||
if(_7d){
|
||||
_7e=$.extend(_7d.options,_7b);
|
||||
_7d.options=_7e;
|
||||
}else{
|
||||
$.data(this,"tabs",{options:$.extend({},$.fn.tabs.defaults,$.fn.tabs.parseOptions(this),_7b),tabs:[],selectHis:[]});
|
||||
_23(this);
|
||||
}
|
||||
_c(this);
|
||||
_31(this);
|
||||
_12(this);
|
||||
_29(this);
|
||||
_5f(this);
|
||||
});
|
||||
};
|
||||
$.fn.tabs.methods={options:function(jq){
|
||||
var cc=jq[0];
|
||||
var _7f=$.data(cc,"tabs").options;
|
||||
var s=_1f(cc);
|
||||
_7f.selected=s?_4b(cc,s):-1;
|
||||
return _7f;
|
||||
},tabs:function(jq){
|
||||
return $.data(jq[0],"tabs").tabs;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_12(this);
|
||||
_1c(this);
|
||||
});
|
||||
},add:function(jq,_80){
|
||||
return jq.each(function(){
|
||||
_3c(this,_80);
|
||||
});
|
||||
},close:function(jq,_81){
|
||||
return jq.each(function(){
|
||||
_4c(this,_81);
|
||||
});
|
||||
},getTab:function(jq,_82){
|
||||
return _53(jq[0],_82);
|
||||
},getTabIndex:function(jq,tab){
|
||||
return _4b(jq[0],tab);
|
||||
},getSelected:function(jq){
|
||||
return _1f(jq[0]);
|
||||
},select:function(jq,_83){
|
||||
return jq.each(function(){
|
||||
_41(this,_83);
|
||||
});
|
||||
},unselect:function(jq,_84){
|
||||
return jq.each(function(){
|
||||
_6b(this,_84);
|
||||
});
|
||||
},exists:function(jq,_85){
|
||||
return _52(jq[0],_85);
|
||||
},update:function(jq,_86){
|
||||
return jq.each(function(){
|
||||
_42(this,_86);
|
||||
});
|
||||
},enableTab:function(jq,_87){
|
||||
return jq.each(function(){
|
||||
$(this).tabs("getTab",_87).panel("options").tab.removeClass("tabs-disabled");
|
||||
});
|
||||
},disableTab:function(jq,_88){
|
||||
return jq.each(function(){
|
||||
$(this).tabs("getTab",_88).panel("options").tab.addClass("tabs-disabled");
|
||||
});
|
||||
},showHeader:function(jq){
|
||||
return jq.each(function(){
|
||||
_77(this,true);
|
||||
});
|
||||
},hideHeader:function(jq){
|
||||
return jq.each(function(){
|
||||
_77(this,false);
|
||||
});
|
||||
},scrollBy:function(jq,_89){
|
||||
return jq.each(function(){
|
||||
var _8a=$(this).tabs("options");
|
||||
var _8b=$(this).find(">div.tabs-header>div.tabs-wrap");
|
||||
var pos=Math.min(_8b._scrollLeft()+_89,_8c());
|
||||
_8b.animate({scrollLeft:pos},_8a.scrollDuration);
|
||||
function _8c(){
|
||||
var w=0;
|
||||
var ul=_8b.children("ul");
|
||||
ul.children("li").each(function(){
|
||||
w+=$(this).outerWidth(true);
|
||||
});
|
||||
return w-_8b.width()+(ul.outerWidth()-ul.width());
|
||||
};
|
||||
});
|
||||
}};
|
||||
$.fn.tabs.parseOptions=function(_8d){
|
||||
return $.extend({},$.parser.parseOptions(_8d,["width","height","tools","toolPosition","tabPosition",{fit:"boolean",border:"boolean",plain:"boolean",headerWidth:"number",tabWidth:"number",tabHeight:"number",selected:"number",showHeader:"boolean"}]));
|
||||
};
|
||||
$.fn.tabs.defaults={width:"auto",height:"auto",headerWidth:150,tabWidth:"auto",tabHeight:27,selected:0,showHeader:true,plain:false,fit:false,border:true,tools:null,toolPosition:"right",tabPosition:"top",scrollIncrement:100,scrollDuration:400,onLoad:function(_8e){
|
||||
},onSelect:function(_8f,_90){
|
||||
},onUnselect:function(_91,_92){
|
||||
},onBeforeClose:function(_93,_94){
|
||||
},onClose:function(_95,_96){
|
||||
},onAdd:function(_97,_98){
|
||||
},onUpdate:function(_99,_9a){
|
||||
},onContextMenu:function(e,_9b,_9c){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
187
WebRoot/js/easyui-1.3.5/plugins/jquery.timespinner.js
Normal file
187
WebRoot/js/easyui-1.3.5/plugins/jquery.timespinner.js
Normal file
@@ -0,0 +1,187 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"timespinner").options;
|
||||
$(_2).addClass("timespinner-f");
|
||||
$(_2).spinner(_3);
|
||||
$(_2).unbind(".timespinner");
|
||||
$(_2).bind("click.timespinner",function(){
|
||||
var _4=0;
|
||||
if(this.selectionStart!=null){
|
||||
_4=this.selectionStart;
|
||||
}else{
|
||||
if(this.createTextRange){
|
||||
var _5=_2.createTextRange();
|
||||
var s=document.selection.createRange();
|
||||
s.setEndPoint("StartToStart",_5);
|
||||
_4=s.text.length;
|
||||
}
|
||||
}
|
||||
if(_4>=0&&_4<=2){
|
||||
_3.highlight=0;
|
||||
}else{
|
||||
if(_4>=3&&_4<=5){
|
||||
_3.highlight=1;
|
||||
}else{
|
||||
if(_4>=6&&_4<=8){
|
||||
_3.highlight=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
_7(_2);
|
||||
}).bind("blur.timespinner",function(){
|
||||
_6(_2);
|
||||
});
|
||||
};
|
||||
function _7(_8){
|
||||
var _9=$.data(_8,"timespinner").options;
|
||||
var _a=0,_b=0;
|
||||
if(_9.highlight==0){
|
||||
_a=0;
|
||||
_b=2;
|
||||
}else{
|
||||
if(_9.highlight==1){
|
||||
_a=3;
|
||||
_b=5;
|
||||
}else{
|
||||
if(_9.highlight==2){
|
||||
_a=6;
|
||||
_b=8;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_8.selectionStart!=null){
|
||||
_8.setSelectionRange(_a,_b);
|
||||
}else{
|
||||
if(_8.createTextRange){
|
||||
var _c=_8.createTextRange();
|
||||
_c.collapse();
|
||||
_c.moveEnd("character",_b);
|
||||
_c.moveStart("character",_a);
|
||||
_c.select();
|
||||
}
|
||||
}
|
||||
$(_8).focus();
|
||||
};
|
||||
function _d(_e,_f){
|
||||
var _10=$.data(_e,"timespinner").options;
|
||||
if(!_f){
|
||||
return null;
|
||||
}
|
||||
var vv=_f.split(_10.separator);
|
||||
for(var i=0;i<vv.length;i++){
|
||||
if(isNaN(vv[i])){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
while(vv.length<3){
|
||||
vv.push(0);
|
||||
}
|
||||
return new Date(1900,0,0,vv[0],vv[1],vv[2]);
|
||||
};
|
||||
function _6(_11){
|
||||
var _12=$.data(_11,"timespinner").options;
|
||||
var _13=$(_11).val();
|
||||
var _14=_d(_11,_13);
|
||||
if(!_14){
|
||||
_12.value="";
|
||||
$(_11).val("");
|
||||
return;
|
||||
}
|
||||
var _15=_d(_11,_12.min);
|
||||
var _16=_d(_11,_12.max);
|
||||
if(_15&&_15>_14){
|
||||
_14=_15;
|
||||
}
|
||||
if(_16&&_16<_14){
|
||||
_14=_16;
|
||||
}
|
||||
var tt=[_17(_14.getHours()),_17(_14.getMinutes())];
|
||||
if(_12.showSeconds){
|
||||
tt.push(_17(_14.getSeconds()));
|
||||
}
|
||||
var val=tt.join(_12.separator);
|
||||
_12.value=val;
|
||||
$(_11).val(val);
|
||||
function _17(_18){
|
||||
return (_18<10?"0":"")+_18;
|
||||
};
|
||||
};
|
||||
function _19(_1a,_1b){
|
||||
var _1c=$.data(_1a,"timespinner").options;
|
||||
var val=$(_1a).val();
|
||||
if(val==""){
|
||||
val=[0,0,0].join(_1c.separator);
|
||||
}
|
||||
var vv=val.split(_1c.separator);
|
||||
for(var i=0;i<vv.length;i++){
|
||||
vv[i]=parseInt(vv[i],10);
|
||||
}
|
||||
if(_1b==true){
|
||||
vv[_1c.highlight]-=_1c.increment;
|
||||
}else{
|
||||
vv[_1c.highlight]+=_1c.increment;
|
||||
}
|
||||
$(_1a).val(vv.join(_1c.separator));
|
||||
_6(_1a);
|
||||
_7(_1a);
|
||||
};
|
||||
$.fn.timespinner=function(_1d,_1e){
|
||||
if(typeof _1d=="string"){
|
||||
var _1f=$.fn.timespinner.methods[_1d];
|
||||
if(_1f){
|
||||
return _1f(this,_1e);
|
||||
}else{
|
||||
return this.spinner(_1d,_1e);
|
||||
}
|
||||
}
|
||||
_1d=_1d||{};
|
||||
return this.each(function(){
|
||||
var _20=$.data(this,"timespinner");
|
||||
if(_20){
|
||||
$.extend(_20.options,_1d);
|
||||
}else{
|
||||
$.data(this,"timespinner",{options:$.extend({},$.fn.timespinner.defaults,$.fn.timespinner.parseOptions(this),_1d)});
|
||||
_1(this);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn.timespinner.methods={options:function(jq){
|
||||
var _21=$.data(jq[0],"timespinner").options;
|
||||
return $.extend(_21,{value:jq.val(),originalValue:jq.spinner("options").originalValue});
|
||||
},setValue:function(jq,_22){
|
||||
return jq.each(function(){
|
||||
$(this).val(_22);
|
||||
_6(this);
|
||||
});
|
||||
},getHours:function(jq){
|
||||
var _23=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_23.separator);
|
||||
return parseInt(vv[0],10);
|
||||
},getMinutes:function(jq){
|
||||
var _24=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_24.separator);
|
||||
return parseInt(vv[1],10);
|
||||
},getSeconds:function(jq){
|
||||
var _25=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_25.separator);
|
||||
return parseInt(vv[2],10)||0;
|
||||
}};
|
||||
$.fn.timespinner.parseOptions=function(_26){
|
||||
return $.extend({},$.fn.spinner.parseOptions(_26),$.parser.parseOptions(_26,["separator",{showSeconds:"boolean",highlight:"number"}]));
|
||||
};
|
||||
$.fn.timespinner.defaults=$.extend({},$.fn.spinner.defaults,{separator:":",showSeconds:false,highlight:0,spin:function(_27){
|
||||
_19(this,_27);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
204
WebRoot/js/easyui-1.3.5/plugins/jquery.tooltip.js
Normal file
204
WebRoot/js/easyui-1.3.5/plugins/jquery.tooltip.js
Normal file
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("tooltip-f");
|
||||
};
|
||||
function _3(_4){
|
||||
var _5=$.data(_4,"tooltip").options;
|
||||
$(_4).unbind(".tooltip").bind(_5.showEvent+".tooltip",function(e){
|
||||
_10(_4,e);
|
||||
}).bind(_5.hideEvent+".tooltip",function(e){
|
||||
_17(_4,e);
|
||||
}).bind("mousemove.tooltip",function(e){
|
||||
if(_5.trackMouse){
|
||||
_5.trackMouseX=e.pageX;
|
||||
_5.trackMouseY=e.pageY;
|
||||
_6(_4);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _7(_8){
|
||||
var _9=$.data(_8,"tooltip");
|
||||
if(_9.showTimer){
|
||||
clearTimeout(_9.showTimer);
|
||||
_9.showTimer=null;
|
||||
}
|
||||
if(_9.hideTimer){
|
||||
clearTimeout(_9.hideTimer);
|
||||
_9.hideTimer=null;
|
||||
}
|
||||
};
|
||||
function _6(_a){
|
||||
var _b=$.data(_a,"tooltip");
|
||||
if(!_b||!_b.tip){
|
||||
return;
|
||||
}
|
||||
var _c=_b.options;
|
||||
var _d=_b.tip;
|
||||
if(_c.trackMouse){
|
||||
t=$();
|
||||
var _e=_c.trackMouseX+_c.deltaX;
|
||||
var _f=_c.trackMouseY+_c.deltaY;
|
||||
}else{
|
||||
var t=$(_a);
|
||||
var _e=t.offset().left+_c.deltaX;
|
||||
var _f=t.offset().top+_c.deltaY;
|
||||
}
|
||||
switch(_c.position){
|
||||
case "right":
|
||||
_e+=t._outerWidth()+12+(_c.trackMouse?12:0);
|
||||
_f-=(_d._outerHeight()-t._outerHeight())/2;
|
||||
break;
|
||||
case "left":
|
||||
_e-=_d._outerWidth()+12+(_c.trackMouse?12:0);
|
||||
_f-=(_d._outerHeight()-t._outerHeight())/2;
|
||||
break;
|
||||
case "top":
|
||||
_e-=(_d._outerWidth()-t._outerWidth())/2;
|
||||
_f-=_d._outerHeight()+12+(_c.trackMouse?12:0);
|
||||
break;
|
||||
case "bottom":
|
||||
_e-=(_d._outerWidth()-t._outerWidth())/2;
|
||||
_f+=t._outerHeight()+12+(_c.trackMouse?12:0);
|
||||
break;
|
||||
}
|
||||
if(!$(_a).is(":visible")){
|
||||
_e=-100000;
|
||||
_f=-100000;
|
||||
}
|
||||
_d.css({left:_e,top:_f,zIndex:(_c.zIndex!=undefined?_c.zIndex:($.fn.window?$.fn.window.defaults.zIndex++:""))});
|
||||
_c.onPosition.call(_a,_e,_f);
|
||||
};
|
||||
function _10(_11,e){
|
||||
var _12=$.data(_11,"tooltip");
|
||||
var _13=_12.options;
|
||||
var tip=_12.tip;
|
||||
if(!tip){
|
||||
tip=$("<div tabindex=\"-1\" class=\"tooltip\">"+"<div class=\"tooltip-content\"></div>"+"<div class=\"tooltip-arrow-outer\"></div>"+"<div class=\"tooltip-arrow\"></div>"+"</div>").appendTo("body");
|
||||
_12.tip=tip;
|
||||
_14(_11);
|
||||
}
|
||||
tip.removeClass("tooltip-top tooltip-bottom tooltip-left tooltip-right").addClass("tooltip-"+_13.position);
|
||||
_7(_11);
|
||||
_12.showTimer=setTimeout(function(){
|
||||
_6(_11);
|
||||
tip.show();
|
||||
_13.onShow.call(_11,e);
|
||||
var _15=tip.children(".tooltip-arrow-outer");
|
||||
var _16=tip.children(".tooltip-arrow");
|
||||
var bc="border-"+_13.position+"-color";
|
||||
_15.add(_16).css({borderTopColor:"",borderBottomColor:"",borderLeftColor:"",borderRightColor:""});
|
||||
_15.css(bc,tip.css(bc));
|
||||
_16.css(bc,tip.css("backgroundColor"));
|
||||
},_13.showDelay);
|
||||
};
|
||||
function _17(_18,e){
|
||||
var _19=$.data(_18,"tooltip");
|
||||
if(_19&&_19.tip){
|
||||
_7(_18);
|
||||
_19.hideTimer=setTimeout(function(){
|
||||
_19.tip.hide();
|
||||
_19.options.onHide.call(_18,e);
|
||||
},_19.options.hideDelay);
|
||||
}
|
||||
};
|
||||
function _14(_1a,_1b){
|
||||
var _1c=$.data(_1a,"tooltip");
|
||||
var _1d=_1c.options;
|
||||
if(_1b){
|
||||
_1d.content=_1b;
|
||||
}
|
||||
if(!_1c.tip){
|
||||
return;
|
||||
}
|
||||
var cc=typeof _1d.content=="function"?_1d.content.call(_1a):_1d.content;
|
||||
_1c.tip.children(".tooltip-content").html(cc);
|
||||
_1d.onUpdate.call(_1a,cc);
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"tooltip");
|
||||
if(_20){
|
||||
_7(_1f);
|
||||
var _21=_20.options;
|
||||
if(_20.tip){
|
||||
_20.tip.remove();
|
||||
}
|
||||
if(_21._title){
|
||||
$(_1f).attr("title",_21._title);
|
||||
}
|
||||
$.removeData(_1f,"tooltip");
|
||||
$(_1f).unbind(".tooltip").removeClass("tooltip-f");
|
||||
_21.onDestroy.call(_1f);
|
||||
}
|
||||
};
|
||||
$.fn.tooltip=function(_22,_23){
|
||||
if(typeof _22=="string"){
|
||||
return $.fn.tooltip.methods[_22](this,_23);
|
||||
}
|
||||
_22=_22||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"tooltip");
|
||||
if(_24){
|
||||
$.extend(_24.options,_22);
|
||||
}else{
|
||||
$.data(this,"tooltip",{options:$.extend({},$.fn.tooltip.defaults,$.fn.tooltip.parseOptions(this),_22)});
|
||||
_1(this);
|
||||
}
|
||||
_3(this);
|
||||
_14(this);
|
||||
});
|
||||
};
|
||||
$.fn.tooltip.methods={options:function(jq){
|
||||
return $.data(jq[0],"tooltip").options;
|
||||
},tip:function(jq){
|
||||
return $.data(jq[0],"tooltip").tip;
|
||||
},arrow:function(jq){
|
||||
return jq.tooltip("tip").children(".tooltip-arrow-outer,.tooltip-arrow");
|
||||
},show:function(jq,e){
|
||||
return jq.each(function(){
|
||||
_10(this,e);
|
||||
});
|
||||
},hide:function(jq,e){
|
||||
return jq.each(function(){
|
||||
_17(this,e);
|
||||
});
|
||||
},update:function(jq,_25){
|
||||
return jq.each(function(){
|
||||
_14(this,_25);
|
||||
});
|
||||
},reposition:function(jq){
|
||||
return jq.each(function(){
|
||||
_6(this);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_1e(this);
|
||||
});
|
||||
}};
|
||||
$.fn.tooltip.parseOptions=function(_26){
|
||||
var t=$(_26);
|
||||
var _27=$.extend({},$.parser.parseOptions(_26,["position","showEvent","hideEvent","content",{deltaX:"number",deltaY:"number",showDelay:"number",hideDelay:"number"}]),{_title:t.attr("title")});
|
||||
t.attr("title","");
|
||||
if(!_27.content){
|
||||
_27.content=_27._title;
|
||||
}
|
||||
return _27;
|
||||
};
|
||||
$.fn.tooltip.defaults={position:"bottom",content:null,trackMouse:false,deltaX:0,deltaY:0,showEvent:"mouseenter",hideEvent:"mouseleave",showDelay:200,hideDelay:100,onShow:function(e){
|
||||
},onHide:function(e){
|
||||
},onUpdate:function(_28){
|
||||
},onPosition:function(_29,top){
|
||||
},onDestroy:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
1155
WebRoot/js/easyui-1.3.5/plugins/jquery.tree.js
Normal file
1155
WebRoot/js/easyui-1.3.5/plugins/jquery.tree.js
Normal file
File diff suppressed because it is too large
Load Diff
1100
WebRoot/js/easyui-1.3.5/plugins/jquery.treegrid.js
Normal file
1100
WebRoot/js/easyui-1.3.5/plugins/jquery.treegrid.js
Normal file
File diff suppressed because it is too large
Load Diff
217
WebRoot/js/easyui-1.3.5/plugins/jquery.validatebox.js
Normal file
217
WebRoot/js/easyui-1.3.5/plugins/jquery.validatebox.js
Normal file
@@ -0,0 +1,217 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("validatebox-text");
|
||||
};
|
||||
function _3(_4){
|
||||
var _5=$.data(_4,"validatebox");
|
||||
_5.validating=false;
|
||||
if(_5.timer){
|
||||
clearTimeout(_5.timer);
|
||||
}
|
||||
$(_4).tooltip("destroy");
|
||||
$(_4).unbind();
|
||||
$(_4).remove();
|
||||
};
|
||||
function _6(_7){
|
||||
var _8=$(_7);
|
||||
var _9=$.data(_7,"validatebox");
|
||||
_8.unbind(".validatebox");
|
||||
if(_9.options.novalidate){
|
||||
return;
|
||||
}
|
||||
_8.bind("focus.validatebox",function(){
|
||||
_9.validating=true;
|
||||
_9.value=undefined;
|
||||
(function(){
|
||||
if(_9.validating){
|
||||
if(_9.value!=_8.val()){
|
||||
_9.value=_8.val();
|
||||
if(_9.timer){
|
||||
clearTimeout(_9.timer);
|
||||
}
|
||||
_9.timer=setTimeout(function(){
|
||||
$(_7).validatebox("validate");
|
||||
},_9.options.delay);
|
||||
}else{
|
||||
_f(_7);
|
||||
}
|
||||
setTimeout(arguments.callee,200);
|
||||
}
|
||||
})();
|
||||
}).bind("blur.validatebox",function(){
|
||||
if(_9.timer){
|
||||
clearTimeout(_9.timer);
|
||||
_9.timer=undefined;
|
||||
}
|
||||
_9.validating=false;
|
||||
_a(_7);
|
||||
}).bind("mouseenter.validatebox",function(){
|
||||
if(_8.hasClass("validatebox-invalid")){
|
||||
_b(_7);
|
||||
}
|
||||
}).bind("mouseleave.validatebox",function(){
|
||||
if(!_9.validating){
|
||||
_a(_7);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.data(_c,"validatebox");
|
||||
var _e=_d.options;
|
||||
$(_c).tooltip($.extend({},_e.tipOptions,{content:_d.message,position:_e.tipPosition,deltaX:_e.deltaX})).tooltip("show");
|
||||
_d.tip=true;
|
||||
};
|
||||
function _f(_10){
|
||||
var _11=$.data(_10,"validatebox");
|
||||
if(_11&&_11.tip){
|
||||
$(_10).tooltip("reposition");
|
||||
}
|
||||
};
|
||||
function _a(_12){
|
||||
var _13=$.data(_12,"validatebox");
|
||||
_13.tip=false;
|
||||
$(_12).tooltip("hide");
|
||||
};
|
||||
function _14(_15){
|
||||
var _16=$.data(_15,"validatebox");
|
||||
var _17=_16.options;
|
||||
var box=$(_15);
|
||||
var _18=box.val();
|
||||
function _19(msg){
|
||||
_16.message=msg;
|
||||
};
|
||||
function _1a(_1b){
|
||||
var _1c=/([a-zA-Z_]+)(.*)/.exec(_1b);
|
||||
var _1d=_17.rules[_1c[1]];
|
||||
if(_1d&&_18){
|
||||
var _1e=eval(_1c[2]);
|
||||
if(!_1d["validator"](_18,_1e)){
|
||||
box.addClass("validatebox-invalid");
|
||||
var _1f=_1d["message"];
|
||||
if(_1e){
|
||||
for(var i=0;i<_1e.length;i++){
|
||||
_1f=_1f.replace(new RegExp("\\{"+i+"\\}","g"),_1e[i]);
|
||||
}
|
||||
}
|
||||
_19(_17.invalidMessage||_1f);
|
||||
if(_16.validating){
|
||||
_b(_15);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
box.removeClass("validatebox-invalid");
|
||||
_a(_15);
|
||||
if(_17.novalidate||box.is(":disabled")){
|
||||
return true;
|
||||
}
|
||||
if(_17.required){
|
||||
if(_18==""){
|
||||
box.addClass("validatebox-invalid");
|
||||
_19(_17.missingMessage);
|
||||
if(_16.validating){
|
||||
_b(_15);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(_17.validType){
|
||||
if(typeof _17.validType=="string"){
|
||||
if(!_1a(_17.validType)){
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
for(var i=0;i<_17.validType.length;i++){
|
||||
if(!_1a(_17.validType[i])){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
function _20(_21,_22){
|
||||
var _23=$.data(_21,"validatebox").options;
|
||||
if(_22!=undefined){
|
||||
_23.novalidate=_22;
|
||||
}
|
||||
if(_23.novalidate){
|
||||
$(_21).removeClass("validatebox-invalid");
|
||||
_a(_21);
|
||||
}
|
||||
_6(_21);
|
||||
};
|
||||
$.fn.validatebox=function(_24,_25){
|
||||
if(typeof _24=="string"){
|
||||
return $.fn.validatebox.methods[_24](this,_25);
|
||||
}
|
||||
_24=_24||{};
|
||||
return this.each(function(){
|
||||
var _26=$.data(this,"validatebox");
|
||||
if(_26){
|
||||
$.extend(_26.options,_24);
|
||||
}else{
|
||||
_1(this);
|
||||
$.data(this,"validatebox",{options:$.extend({},$.fn.validatebox.defaults,$.fn.validatebox.parseOptions(this),_24)});
|
||||
}
|
||||
_20(this);
|
||||
_14(this);
|
||||
});
|
||||
};
|
||||
$.fn.validatebox.methods={options:function(jq){
|
||||
return $.data(jq[0],"validatebox").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_3(this);
|
||||
});
|
||||
},validate:function(jq){
|
||||
return jq.each(function(){
|
||||
_14(this);
|
||||
});
|
||||
},isValid:function(jq){
|
||||
return _14(jq[0]);
|
||||
},enableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_20(this,false);
|
||||
});
|
||||
},disableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_20(this,true);
|
||||
});
|
||||
}};
|
||||
$.fn.validatebox.parseOptions=function(_27){
|
||||
var t=$(_27);
|
||||
return $.extend({},$.parser.parseOptions(_27,["validType","missingMessage","invalidMessage","tipPosition",{delay:"number",deltaX:"number"}]),{required:(t.attr("required")?true:undefined),novalidate:(t.attr("novalidate")!=undefined?true:undefined)});
|
||||
};
|
||||
$.fn.validatebox.defaults={required:false,validType:null,delay:200,missingMessage:"This field is required.",invalidMessage:null,tipPosition:"right",deltaX:0,novalidate:false,tipOptions:{showEvent:"none",hideEvent:"none",showDelay:0,hideDelay:0,zIndex:"",onShow:function(){
|
||||
$(this).tooltip("tip").css({color:"#000",borderColor:"#CC9933",backgroundColor:"#FFFFCC"});
|
||||
},onHide:function(){
|
||||
$(this).tooltip("destroy");
|
||||
}},rules:{email:{validator:function(_28){
|
||||
return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(_28);
|
||||
},message:"Please enter a valid email address."},url:{validator:function(_29){
|
||||
return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(_29);
|
||||
},message:"Please enter a valid URL."},length:{validator:function(_2a,_2b){
|
||||
var len=$.trim(_2a).length;
|
||||
return len>=_2b[0]&&len<=_2b[1];
|
||||
},message:"Please enter a value between {0} and {1}."},remote:{validator:function(_2c,_2d){
|
||||
var _2e={};
|
||||
_2e[_2d[1]]=_2c;
|
||||
var _2f=$.ajax({url:_2d[0],dataType:"json",data:_2e,async:false,cache:false,type:"post"}).responseText;
|
||||
return _2f=="true";
|
||||
},message:"Please fix this field."}}};
|
||||
})(jQuery);
|
||||
|
||||
277
WebRoot/js/easyui-1.3.5/plugins/jquery.window.js
Normal file
277
WebRoot/js/easyui-1.3.5/plugins/jquery.window.js
Normal file
@@ -0,0 +1,277 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
var _4=$.data(_2,"window").options;
|
||||
if(_3){
|
||||
$.extend(_4,_3);
|
||||
}
|
||||
$(_2).panel("resize",_4);
|
||||
};
|
||||
function _5(_6,_7){
|
||||
var _8=$.data(_6,"window");
|
||||
if(_7){
|
||||
if(_7.left!=null){
|
||||
_8.options.left=_7.left;
|
||||
}
|
||||
if(_7.top!=null){
|
||||
_8.options.top=_7.top;
|
||||
}
|
||||
}
|
||||
$(_6).panel("move",_8.options);
|
||||
if(_8.shadow){
|
||||
_8.shadow.css({left:_8.options.left,top:_8.options.top});
|
||||
}
|
||||
};
|
||||
function _9(_a,_b){
|
||||
var _c=$.data(_a,"window");
|
||||
var _d=_c.options;
|
||||
var _e=_d.width;
|
||||
if(isNaN(_e)){
|
||||
_e=_c.window._outerWidth();
|
||||
}
|
||||
if(_d.inline){
|
||||
var _f=_c.window.parent();
|
||||
_d.left=(_f.width()-_e)/2+_f.scrollLeft();
|
||||
}else{
|
||||
_d.left=($(window)._outerWidth()-_e)/2+$(document).scrollLeft();
|
||||
}
|
||||
if(_b){
|
||||
_5(_a);
|
||||
}
|
||||
};
|
||||
function _10(_11,_12){
|
||||
var _13=$.data(_11,"window");
|
||||
var _14=_13.options;
|
||||
var _15=_14.height;
|
||||
if(isNaN(_15)){
|
||||
_15=_13.window._outerHeight();
|
||||
}
|
||||
if(_14.inline){
|
||||
var _16=_13.window.parent();
|
||||
_14.top=(_16.height()-_15)/2+_16.scrollTop();
|
||||
}else{
|
||||
_14.top=($(window)._outerHeight()-_15)/2+$(document).scrollTop();
|
||||
}
|
||||
if(_12){
|
||||
_5(_11);
|
||||
}
|
||||
};
|
||||
function _17(_18){
|
||||
var _19=$.data(_18,"window");
|
||||
var win=$(_18).panel($.extend({},_19.options,{border:false,doSize:true,closed:true,cls:"window",headerCls:"window-header",bodyCls:"window-body "+(_19.options.noheader?"window-body-noheader":""),onBeforeDestroy:function(){
|
||||
if(_19.options.onBeforeDestroy.call(_18)==false){
|
||||
return false;
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.remove();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.remove();
|
||||
}
|
||||
},onClose:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.hide();
|
||||
}
|
||||
_19.options.onClose.call(_18);
|
||||
},onOpen:function(){
|
||||
if(_19.mask){
|
||||
_19.mask.css({display:"block",zIndex:$.fn.window.defaults.zIndex++});
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:_19.options.left,top:_19.options.top,width:_19.window._outerWidth(),height:_19.window._outerHeight()});
|
||||
}
|
||||
_19.window.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
_19.options.onOpen.call(_18);
|
||||
},onResize:function(_1a,_1b){
|
||||
var _1c=$(this).panel("options");
|
||||
$.extend(_19.options,{width:_1c.width,height:_1c.height,left:_1c.left,top:_1c.top});
|
||||
if(_19.shadow){
|
||||
_19.shadow.css({left:_19.options.left,top:_19.options.top,width:_19.window._outerWidth(),height:_19.window._outerHeight()});
|
||||
}
|
||||
_19.options.onResize.call(_18,_1a,_1b);
|
||||
},onMinimize:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.hide();
|
||||
}
|
||||
_19.options.onMinimize.call(_18);
|
||||
},onBeforeCollapse:function(){
|
||||
if(_19.options.onBeforeCollapse.call(_18)==false){
|
||||
return false;
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
},onExpand:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.show();
|
||||
}
|
||||
_19.options.onExpand.call(_18);
|
||||
}}));
|
||||
_19.window=win.panel("panel");
|
||||
if(_19.mask){
|
||||
_19.mask.remove();
|
||||
}
|
||||
if(_19.options.modal==true){
|
||||
_19.mask=$("<div class=\"window-mask\"></div>").insertAfter(_19.window);
|
||||
_19.mask.css({width:(_19.options.inline?_19.mask.parent().width():_1d().width),height:(_19.options.inline?_19.mask.parent().height():_1d().height),display:"none"});
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.remove();
|
||||
}
|
||||
if(_19.options.shadow==true){
|
||||
_19.shadow=$("<div class=\"window-shadow\"></div>").insertAfter(_19.window);
|
||||
_19.shadow.css({display:"none"});
|
||||
}
|
||||
if(_19.options.left==null){
|
||||
_9(_18);
|
||||
}
|
||||
if(_19.options.top==null){
|
||||
_10(_18);
|
||||
}
|
||||
_5(_18);
|
||||
if(_19.options.closed==false){
|
||||
win.window("open");
|
||||
}
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"window");
|
||||
_20.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_20.options.draggable==false,onStartDrag:function(e){
|
||||
if(_20.mask){
|
||||
_20.mask.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
if(_20.shadow){
|
||||
_20.shadow.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
_20.window.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
if(!_20.proxy){
|
||||
_20.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_20.window);
|
||||
}
|
||||
_20.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(_20.window._outerWidth());
|
||||
_20.proxy._outerHeight(_20.window._outerHeight());
|
||||
setTimeout(function(){
|
||||
if(_20.proxy){
|
||||
_20.proxy.show();
|
||||
}
|
||||
},500);
|
||||
},onDrag:function(e){
|
||||
_20.proxy.css({display:"block",left:e.data.left,top:e.data.top});
|
||||
return false;
|
||||
},onStopDrag:function(e){
|
||||
_20.options.left=e.data.left;
|
||||
_20.options.top=e.data.top;
|
||||
$(_1f).window("move");
|
||||
_20.proxy.remove();
|
||||
_20.proxy=null;
|
||||
}});
|
||||
_20.window.resizable({disabled:_20.options.resizable==false,onStartResize:function(e){
|
||||
_20.pmask=$("<div class=\"window-proxy-mask\"></div>").insertAfter(_20.window);
|
||||
_20.pmask.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:_20.window._outerWidth(),height:_20.window._outerHeight()});
|
||||
if(!_20.proxy){
|
||||
_20.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_20.window);
|
||||
}
|
||||
_20.proxy.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(e.data.width);
|
||||
_20.proxy._outerHeight(e.data.height);
|
||||
},onResize:function(e){
|
||||
_20.proxy.css({left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(e.data.width);
|
||||
_20.proxy._outerHeight(e.data.height);
|
||||
return false;
|
||||
},onStopResize:function(e){
|
||||
$.extend(_20.options,{left:e.data.left,top:e.data.top,width:e.data.width,height:e.data.height});
|
||||
_1(_1f);
|
||||
_20.pmask.remove();
|
||||
_20.pmask=null;
|
||||
_20.proxy.remove();
|
||||
_20.proxy=null;
|
||||
}});
|
||||
};
|
||||
function _1d(){
|
||||
if(document.compatMode=="BackCompat"){
|
||||
return {width:Math.max(document.body.scrollWidth,document.body.clientWidth),height:Math.max(document.body.scrollHeight,document.body.clientHeight)};
|
||||
}else{
|
||||
return {width:Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth),height:Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight)};
|
||||
}
|
||||
};
|
||||
$(window).resize(function(){
|
||||
$("body>div.window-mask").css({width:$(window)._outerWidth(),height:$(window)._outerHeight()});
|
||||
setTimeout(function(){
|
||||
$("body>div.window-mask").css({width:_1d().width,height:_1d().height});
|
||||
},50);
|
||||
});
|
||||
$.fn.window=function(_21,_22){
|
||||
if(typeof _21=="string"){
|
||||
var _23=$.fn.window.methods[_21];
|
||||
if(_23){
|
||||
return _23(this,_22);
|
||||
}else{
|
||||
return this.panel(_21,_22);
|
||||
}
|
||||
}
|
||||
_21=_21||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"window");
|
||||
if(_24){
|
||||
$.extend(_24.options,_21);
|
||||
}else{
|
||||
_24=$.data(this,"window",{options:$.extend({},$.fn.window.defaults,$.fn.window.parseOptions(this),_21)});
|
||||
if(!_24.options.inline){
|
||||
document.body.appendChild(this);
|
||||
}
|
||||
}
|
||||
_17(this);
|
||||
_1e(this);
|
||||
});
|
||||
};
|
||||
$.fn.window.methods={options:function(jq){
|
||||
var _25=jq.panel("options");
|
||||
var _26=$.data(jq[0],"window").options;
|
||||
return $.extend(_26,{closed:_25.closed,collapsed:_25.collapsed,minimized:_25.minimized,maximized:_25.maximized});
|
||||
},window:function(jq){
|
||||
return $.data(jq[0],"window").window;
|
||||
},resize:function(jq,_27){
|
||||
return jq.each(function(){
|
||||
_1(this,_27);
|
||||
});
|
||||
},move:function(jq,_28){
|
||||
return jq.each(function(){
|
||||
_5(this,_28);
|
||||
});
|
||||
},hcenter:function(jq){
|
||||
return jq.each(function(){
|
||||
_9(this,true);
|
||||
});
|
||||
},vcenter:function(jq){
|
||||
return jq.each(function(){
|
||||
_10(this,true);
|
||||
});
|
||||
},center:function(jq){
|
||||
return jq.each(function(){
|
||||
_9(this);
|
||||
_10(this);
|
||||
_5(this);
|
||||
});
|
||||
}};
|
||||
$.fn.window.parseOptions=function(_29){
|
||||
return $.extend({},$.fn.panel.parseOptions(_29),$.parser.parseOptions(_29,[{draggable:"boolean",resizable:"boolean",shadow:"boolean",modal:"boolean",inline:"boolean"}]));
|
||||
};
|
||||
$.fn.window.defaults=$.extend({},$.fn.panel.defaults,{zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,inline:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false});
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user