initial commit

This commit is contained in:
chenjinsong
2018-09-27 16:21:05 +08:00
commit dc91c4c987
2011 changed files with 408920 additions and 0 deletions

View File

@@ -0,0 +1,216 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"accordion").options;
var _4=$.data(_2,"accordion").panels;
var cc=$(_2);
if(_3.fit==true){
var p=cc.parent();
_3.width=p.width();
_3.height=p.height();
}
if(_3.width>0){
cc.width($.boxModel==true?(_3.width-(cc.outerWidth()-cc.width())):_3.width);
}
var _5="auto";
if(_3.height>0){
cc.height($.boxModel==true?(_3.height-(cc.outerHeight()-cc.height())):_3.height);
var _6=_4.length?_4[0].panel("header").css("height",null).outerHeight():"auto";
var _5=cc.height()-(_4.length-1)*_6;
}
for(var i=0;i<_4.length;i++){
var _7=_4[i];
var _8=_7.panel("header");
_8.height($.boxModel==true?(_6-(_8.outerHeight()-_8.height())):_6);
_7.panel("resize",{width:cc.width(),height:_5});
}
};
function _9(_a){
var _b=$.data(_a,"accordion").panels;
for(var i=0;i<_b.length;i++){
var _c=_b[i];
if(_c.panel("options").collapsed==false){
return _c;
}
}
return null;
};
function _d(_e,_f,_10){
var _11=$.data(_e,"accordion").panels;
for(var i=0;i<_11.length;i++){
var _12=_11[i];
if(_12.panel("options").title==_f){
if(_10){
_11.splice(i,1);
}
return _12;
}
}
return null;
};
function _13(_14){
var cc=$(_14);
cc.addClass("accordion");
if(cc.attr("border")=="false"){
cc.addClass("accordion-noborder");
}else{
cc.removeClass("accordion-noborder");
}
if(cc.find(">div[selected=true]").length==0){
cc.find(">div:first").attr("selected","true");
}
var _15=[];
cc.find(">div").each(function(){
var pp=$(this);
_15.push(pp);
_17(_14,pp,{});
});
cc.bind("_resize",function(){
var _16=$.data(_14,"accordion").options;
if(_16.fit==true){
_1(_14);
}
return false;
});
return {accordion:cc,panels:_15};
};
function _17(_18,pp,_19){
pp.panel($.extend({},_19,{collapsible:false,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:pp.attr("selected")!="true",tools:[{iconCls:"panel-tool-collapse",handler:function(){
var _1a=$.data(_18,"accordion").options.animate;
if(pp.panel("options").collapsed){
pp.panel("expand",_1a);
}else{
pp.panel("collapse",_1a);
}
return false;
}}],onBeforeExpand:function(){
var _1b=_9(_18);
if(_1b){
var _1c=$(_1b).panel("header");
_1c.removeClass("accordion-header-selected");
_1c.find(".panel-tool-collapse").triggerHandler("click");
}
pp.panel("header").addClass("accordion-header-selected");
},onExpand:function(){
if($.parser){
$.parser.parse(pp.panel("body"));
}
pp.panel("body").find(">div").triggerHandler("_resize");
var _1d=$.data(_18,"accordion").options;
_1d.onSelect.call(_18,pp.panel("options").title);
},onBeforeCollapse:function(){
pp.panel("header").removeClass("accordion-header-selected");
}}));
pp.panel("body").addClass("accordion-body");
pp.panel("header").addClass("accordion-header").click(function(){
$(this).find(".panel-tool-collapse").triggerHandler("click");
return false;
});
};
function _1e(_1f,_20){
var _21=$.data(_1f,"accordion").options;
var _22=$.data(_1f,"accordion").panels;
var _23=_9(_1f);
if(_23&&_23.panel("options").title==_20){
return;
}
var _24=_d(_1f,_20);
if(_24){
_24.panel("header").triggerHandler("click");
}else{
if(_23){
_23.panel("header").addClass("accordion-header-selected");
_21.onSelect.call(_1f,_23.panel("options").title);
}
}
};
function add(_25,_26){
var _27=$.data(_25,"accordion").options;
var _28=$.data(_25,"accordion").panels;
var pp=$("<div></div>").appendTo(_25);
_28.push(pp);
_17(_25,pp,_26);
_1(_25);
_27.onAdd.call(_25,_26.title);
_1e(_25,_26.title);
};
function _29(_2a,_2b){
var _2c=$.data(_2a,"accordion").options;
var _2d=$.data(_2a,"accordion").panels;
if(_2c.onBeforeRemove.call(_2a,_2b)==false){
return;
}
var _2e=_d(_2a,_2b,true);
if(_2e){
_2e.panel("destroy");
if(_2d.length){
_1(_2a);
var _2f=_9(_2a);
if(!_2f){
_1e(_2a,_2d[0].panel("options").title);
}
}
}
_2c.onRemove.call(_2a,_2b);
};
$.fn.accordion=function(_30,_31){
if(typeof _30=="string"){
switch(_30){
case "options":
return $.data(this[0],"accordion").options;
case "panels":
return $.data(this[0],"accordion").panels;
case "resize":
return this.each(function(){
_1(this);
});
case "getSelected":
return _9(this[0]);
case "getPanel":
return _d(this[0],_31);
case "select":
return this.each(function(){
_1e(this,_31);
});
case "add":
return this.each(function(){
add(this,_31);
});
case "remove":
return this.each(function(){
_29(this,_31);
});
}
}
_30=_30||{};
return this.each(function(){
var _32=$.data(this,"accordion");
var _33;
if(_32){
_33=$.extend(_32.options,_30);
_32.opts=_33;
}else{
var t=$(this);
_33=$.extend({},$.fn.accordion.defaults,{width:(parseInt(t.css("width"))||undefined),height:(parseInt(t.css("height"))||undefined),fit:(t.attr("fit")?t.attr("fit")=="true":undefined),border:(t.attr("border")?t.attr("border")=="true":undefined),animate:(t.attr("animate")?t.attr("animate")=="true":undefined)},_30);
var r=_13(this);
$.data(this,"accordion",{options:_33,accordion:r.accordion,panels:r.panels});
}
_1(this);
_1e(this);
});
};
$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,onSelect:function(_34){
},onAdd:function(_35){
},onBeforeRemove:function(_36){
},onRemove:function(_37){
}};
})(jQuery);

View File

@@ -0,0 +1,287 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"calendar").options;
var t=$(_2);
if(_3.fit==true){
var p=t.parent();
_3.width=p.width();
_3.height=p.height();
}
var _4=t.find(".calendar-header");
if($.boxModel==true){
t.width(_3.width-(t.outerWidth()-t.width()));
t.height(_3.height-(t.outerHeight()-t.height()));
}else{
t.width(_3.width);
t.height(_3.height);
}
var _5=t.find(".calendar-body");
var _6=t.height()-_4.outerHeight();
if($.boxModel==true){
_5.height(_6-(_5.outerHeight()-_5.height()));
}else{
_5.height(_6);
}
};
function _7(_8){
$(_8).addClass("calendar").wrapInner("<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>");
$(_8).find(".calendar-title span").hover(function(){
$(this).addClass("calendar-menu-hover");
},function(){
$(this).removeClass("calendar-menu-hover");
}).click(function(){
var _9=$(_8).find(".calendar-menu");
if(_9.is(":visible")){
_9.hide();
}else{
_16(_8);
}
});
$(".calendar-prevmonth,.calendar-nextmonth,.calendar-prevyear,.calendar-nextyear",_8).hover(function(){
$(this).addClass("calendar-nav-hover");
},function(){
$(this).removeClass("calendar-nav-hover");
});
$(_8).find(".calendar-nextmonth").click(function(){
_b(_8,1);
});
$(_8).find(".calendar-prevmonth").click(function(){
_b(_8,-1);
});
$(_8).find(".calendar-nextyear").click(function(){
_11(_8,1);
});
$(_8).find(".calendar-prevyear").click(function(){
_11(_8,-1);
});
$(_8).bind("_resize",function(){
var _a=$.data(_8,"calendar").options;
if(_a.fit==true){
_1(_8);
}
return false;
});
};
function _b(_c,_d){
var _e=$.data(_c,"calendar").options;
_e.month+=_d;
if(_e.month>12){
_e.year++;
_e.month=1;
}else{
if(_e.month<1){
_e.year--;
_e.month=12;
}
}
_f(_c);
var _10=$(_c).find(".calendar-menu-month-inner");
_10.find("td.calendar-selected").removeClass("calendar-selected");
_10.find("td:eq("+(_e.month-1)+")").addClass("calendar-selected");
};
function _11(_12,_13){
var _14=$.data(_12,"calendar").options;
_14.year+=_13;
_f(_12);
var _15=$(_12).find(".calendar-menu-year");
_15.val(_14.year);
};
function _16(_17){
var _18=$.data(_17,"calendar").options;
$(_17).find(".calendar-menu").show();
if($(_17).find(".calendar-menu-month-inner").is(":empty")){
$(_17).find(".calendar-menu-month-inner").empty();
var t=$("<table></table>").appendTo($(_17).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(_18.months[idx++]).attr("abbr",idx).appendTo(tr);
}
}
$(_17).find(".calendar-menu-prev,.calendar-menu-next").hover(function(){
$(this).addClass("calendar-menu-hover");
},function(){
$(this).removeClass("calendar-menu-hover");
});
$(_17).find(".calendar-menu-next").click(function(){
var y=$(_17).find(".calendar-menu-year");
if(!isNaN(y.val())){
y.val(parseInt(y.val())+1);
}
});
$(_17).find(".calendar-menu-prev").click(function(){
var y=$(_17).find(".calendar-menu-year");
if(!isNaN(y.val())){
y.val(parseInt(y.val()-1));
}
});
$(_17).find(".calendar-menu-year").keypress(function(e){
if(e.keyCode==13){
_19();
}
});
$(_17).find(".calendar-menu-month").hover(function(){
$(this).addClass("calendar-menu-hover");
},function(){
$(this).removeClass("calendar-menu-hover");
}).click(function(){
var _1a=$(_17).find(".calendar-menu");
_1a.find(".calendar-selected").removeClass("calendar-selected");
$(this).addClass("calendar-selected");
_19();
});
}
function _19(){
var _1b=$(_17).find(".calendar-menu");
var _1c=_1b.find(".calendar-menu-year").val();
var _1d=_1b.find(".calendar-selected").attr("abbr");
if(!isNaN(_1c)){
_18.year=parseInt(_1c);
_18.month=parseInt(_1d);
_f(_17);
}
_1b.hide();
};
var _1e=$(_17).find(".calendar-body");
var _1f=$(_17).find(".calendar-menu");
var _20=_1f.find(".calendar-menu-year-inner");
var _21=_1f.find(".calendar-menu-month-inner");
_20.find("input").val(_18.year).focus();
_21.find("td.calendar-selected").removeClass("calendar-selected");
_21.find("td:eq("+(_18.month-1)+")").addClass("calendar-selected");
if($.boxModel==true){
_1f.width(_1e.outerWidth()-(_1f.outerWidth()-_1f.width()));
_1f.height(_1e.outerHeight()-(_1f.outerHeight()-_1f.height()));
_21.height(_1f.height()-(_21.outerHeight()-_21.height())-_20.outerHeight());
}else{
_1f.width(_1e.outerWidth());
_1f.height(_1e.outerHeight());
_21.height(_1f.height()-_20.outerHeight());
}
};
function _22(_23,_24){
var _25=[];
var _26=new Date(_23,_24,0).getDate();
for(var i=1;i<=_26;i++){
_25.push([_23,_24,i]);
}
var _27=[],_28=[];
while(_25.length>0){
var _29=_25.shift();
_28.push(_29);
if(new Date(_29[0],_29[1]-1,_29[2]).getDay()==6){
_27.push(_28);
_28=[];
}
}
if(_28.length){
_27.push(_28);
}
var _2a=_27[0];
if(_2a.length<7){
while(_2a.length<7){
var _2b=_2a[0];
var _29=new Date(_2b[0],_2b[1]-1,_2b[2]-1);
_2a.unshift([_29.getFullYear(),_29.getMonth()+1,_29.getDate()]);
}
}else{
var _2b=_2a[0];
var _28=[];
for(var i=1;i<=7;i++){
var _29=new Date(_2b[0],_2b[1]-1,_2b[2]-i);
_28.unshift([_29.getFullYear(),_29.getMonth()+1,_29.getDate()]);
}
_27.unshift(_28);
}
var _2c=_27[_27.length-1];
while(_2c.length<7){
var _2d=_2c[_2c.length-1];
var _29=new Date(_2d[0],_2d[1]-1,_2d[2]+1);
_2c.push([_29.getFullYear(),_29.getMonth()+1,_29.getDate()]);
}
if(_27.length<6){
var _2d=_2c[_2c.length-1];
var _28=[];
for(var i=1;i<=7;i++){
var _29=new Date(_2d[0],_2d[1]-1,_2d[2]+i);
_28.push([_29.getFullYear(),_29.getMonth()+1,_29.getDate()]);
}
_27.push(_28);
}
return _27;
};
function _f(_2e){
var _2f=$.data(_2e,"calendar").options;
$(_2e).find(".calendar-title span").html(_2f.months[_2f.month-1]+" "+_2f.year);
var _30=$(_2e).find("div.calendar-body");
_30.find(">table").remove();
var t=$("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><thead></thead><tbody></tbody></table>").prependTo(_30);
var tr=$("<tr></tr>").appendTo(t.find("thead"));
for(var i=0;i<_2f.weeks.length;i++){
tr.append("<th>"+_2f.weeks[i]+"</th>");
}
var _31=_22(_2f.year,_2f.month);
for(var i=0;i<_31.length;i++){
var _32=_31[i];
var tr=$("<tr></tr>").appendTo(t.find("tbody"));
for(var j=0;j<_32.length;j++){
var day=_32[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^="+_2f.year+","+_2f.month+"]").removeClass("calendar-other-month");
var now=new Date();
var _33=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate();
t.find("td[abbr="+_33+"]").addClass("calendar-today");
if(_2f.current){
t.find(".calendar-selected").removeClass("calendar-selected");
var _34=_2f.current.getFullYear()+","+(_2f.current.getMonth()+1)+","+_2f.current.getDate();
t.find("td[abbr="+_34+"]").addClass("calendar-selected");
}
t.find("tr").find("td:first").addClass("calendar-sunday");
t.find("tr").find("td:last").addClass("calendar-saturday");
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 _35=$(this).attr("abbr").split(",");
_2f.current=new Date(_35[0],parseInt(_35[1])-1,_35[2]);
_2f.onSelect.call(_2e,_2f.current);
});
};
$.fn.calendar=function(_36){
_36=_36||{};
return this.each(function(){
var _37=$.data(this,"calendar");
if(_37){
$.extend(_37.options,_36);
}else{
var t=$(this);
_37=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,{width:(parseInt(t.css("width"))||undefined),height:(parseInt(t.css("height"))||undefined),fit:(t.attr("fit")?t.attr("fit")=="true":undefined),border:(t.attr("border")?t.attr("border")=="true":undefined)},_36)});
_7(this);
}
if(_37.options.border==false){
$(this).addClass("calendar-noborder");
}
_1(this);
_f(this);
$(this).find("div.calendar-menu").hide();
});
};
$.fn.calendar.defaults={width:180,height:180,fit:false,border:true,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(_38){
}};
})(jQuery);

View File

@@ -0,0 +1,367 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2,_3){
var _4=$.data(_2,"combobox").options;
var _5=$.data(_2,"combobox").combobox;
var _6=$.data(_2,"combobox").content;
if(_3){
_4.width=_3;
}
if(isNaN(_4.width)){
_4.width=_5.find("input.combobox-text").outerWidth();
}
var _7=_5.find(".combobox-arrow").outerWidth();
var _3=_4.width-_7-(_5.outerWidth()-_5.width());
_5.find("input.combobox-text").width(_3);
if(_4.listWidth){
_6.width(_4.listWidth);
}else{
_6.width($.boxModel==true?_5.outerWidth()-(_6.outerWidth()-_6.width()):_5.outerWidth());
}
if(_4.listHeight){
_6.height(_4.listHeight);
}
};
function _8(_9){
$(_9).hide();
var _a=$("<span class=\"combobox\"></span>").insertAfter(_9);
$("<input type=\"hidden\" class=\"combobox-value\"></input>").appendTo(_a);
var _b=$("<input type=\"text\" class=\"combobox-text\"></input>").appendTo(_a);
$("<span><span class=\"combobox-arrow\"></span></span>").appendTo(_a);
var _c=$("<div class=\"combobox-content\"></div>").appendTo("body");
var _d=$(_9).attr("name");
if(_d){
_a.find("input.combobox-value").attr("name",_d);
$(_9).removeAttr("name").attr("comboboxName",_d);
}
_b.attr("autocomplete","off");
return {combobox:_a,content:_c};
};
function _e(_f){
$.data(_f,"combobox").content.remove();
$.data(_f,"combobox").combobox.remove();
$(_f).remove();
};
function _10(_11){
var _12=$.data(_11,"combobox").options;
var _13=$.data(_11,"combobox").combobox;
var _14=$.data(_11,"combobox").content;
var _15=_13.find(".combobox-text");
var _16=_13.find(".combobox-arrow");
$(document).unbind(".combobox");
_14.unbind(".combobox");
_15.unbind(".combobox");
_16.unbind(".combobox");
if(!_12.disabled){
$(document).bind("mousedown.combobox",function(){
$("body>div.combobox-content").hide();
});
_14.bind("mousedown.combobox",function(){
return false;
});
_15.bind("focus.combobox",function(){
_45(_11,"");
}).bind("keyup.combobox",function(e){
var _17=_14.find("div.combobox-item-selected");
switch(e.keyCode){
case 38:
var _18=_17.prev();
if(_18.length){
_17.removeClass("combobox-item-selected");
_18.addClass("combobox-item-selected");
}
break;
case 40:
var _19=_17.next();
if(_19.length){
_17.removeClass("combobox-item-selected");
_19.addClass("combobox-item-selected");
}
break;
case 13:
_1a(_11,_17.attr("value"));
_14.hide();
break;
case 27:
_14.hide();
break;
default:
_45(_11,$(this).val());
}
return false;
});
_16.bind("click.combobox",function(){
_15.focus();
}).bind("mouseenter.combobox",function(){
$(this).addClass("combobox-arrow-hover");
}).bind("mouseleave.combobox",function(){
$(this).removeClass("combobox-arrow-hover");
});
}
};
function _1a(_1b,_1c){
var _1d=$.data(_1b,"combobox").data;
var _1e=$.data(_1b,"combobox").options;
var _1f=$.data(_1b,"combobox").combobox;
var _20=$.data(_1b,"combobox").content;
_20.find("div.combobox-item-selected").removeClass("combobox-item-selected");
for(var i=0;i<_1d.length;i++){
var rec=_1d[i];
if(rec[_1e.valueField]==_1c){
var _21=_1f.find("input.combobox-value").val();
_1f.find("input.combobox-value").val(rec[_1e.valueField]);
_1f.find("input.combobox-text").val(rec[_1e.textField]);
_20.find("div.combobox-item[value="+_1c+"]").addClass("combobox-item-selected");
_1e.onSelect.call(_1b,rec);
if(_21!=_1c){
_1e.onChange.call(_1b,_1c,_21);
}
_22(_1b,true);
return;
}
}
};
function _23(_24){
var _25=$.data(_24,"combobox").combobox;
_25.find("input.combobox-value").val("");
_25.find("input.combobox-text").val("");
};
function _26(_27,_28){
var _29=$.data(_27,"combobox").combobox;
var _2a=$.data(_27,"combobox").options;
var _2b=$.data(_27,"combobox").data;
var _2c,_2d;
var _2e=_29.find("input.combobox-value").val();
if(typeof _28=="object"){
_2c=_28[_2a.valueField];
_2d=_28[_2a.textField];
}else{
_2c=_28;
for(var i=0;i<_2b.length;i++){
if(_2b[i][_2a.valueField]==_2c){
_2d=_2b[i][_2a.textField];
break;
}
}
}
if(_2d==undefined){
_2d=_2c;
}
_29.find("input.combobox-value").val(_2c);
_29.find("input.combobox-text").val(_2d);
_22(_27,true);
if(_2e!=_2c){
_2a.onChange.call(_27,_2c,_2e);
}
};
function _2f(_30){
var _31=$.data(_30,"combobox").combobox;
return _31.find("input.combobox-value").val();
};
function _32(_33){
var _34=$.data(_33,"combobox").combobox;
return _34.find("input.combobox-text").val();
};
function _35(_36){
var _37=$.data(_36,"combobox").options;
var _38=[];
$(">option",_36).each(function(){
var _39={};
_39[_37.valueField]=$(this).attr("value")||$(this).html();
_39[_37.textField]=$(this).html();
_39["selected"]=$(this).attr("selected");
_38.push(_39);
});
return _38;
};
function _3a(_3b,_3c){
var _3d=$.data(_3b,"combobox").options;
$.data(_3b,"combobox").data=_3c;
var _3d=$.data(_3b,"combobox").options;
var _3e=$.data(_3b,"combobox").content;
var _3f=null;
_3e.empty();
for(var i=0;i<_3c.length;i++){
var _40=$("<div class=\"combobox-item\"></div>").appendTo(_3e);
_40.attr("value",_3c[i][_3d.valueField]);
_40.html(_3c[i][_3d.textField]);
if(_3c[i]["selected"]){
_3f=_3c[i];
}
}
if(_3f){
_26(_3b,_3f);
}
_3d.onLoadSuccess.call(_3b,_3c);
$(".combobox-item",_3e).hover(function(){
$(this).addClass("combobox-item-hover");
},function(){
$(this).removeClass("combobox-item-hover");
}).click(function(){
_3e.hide();
_1a(_3b,$(this).attr("value"));
});
};
function _41(_42,url){
var _43=$.data(_42,"combobox").options;
if(url){
_43.url=url;
}
if(!_43.url){
return;
}
$.ajax({url:_43.url,dataType:"json",success:function(_44){
_3a(_42,_44);
},error:function(){
_43.onLoadError.apply(this,arguments);
}});
};
function _45(_46,_47){
_47=_47||"";
var _48=$.data(_46,"combobox").combobox;
var _49=$.data(_46,"combobox").content;
var _4a=_48.find("input.combobox-text").val();
_49.find("div.combobox-item-selected").removeClass("combobox-item-selected");
_49.find("div.combobox-item").each(function(){
var _4b=$(this);
if(_4b.text().indexOf(_47)==0){
_4b.show();
if(_4b.text()==_4a){
_4b.addClass("combobox-item-selected");
}
}else{
_4b.hide();
}
});
if(_49.find("div.combobox-item-selected").length==0){
_49.find("div.combobox-item:visible:first").addClass("combobox-item-selected");
}
if($.fn.window){
_49.css("z-index",$.fn.window.defaults.zIndex++);
}
_49.show();
(function(){
if(_49.is(":visible")){
var top=_48.offset().top+_48.outerHeight();
if(top+_49.outerHeight()>$(window).height()+$(document).scrollTop()){
top=_48.offset().top-_49.outerHeight();
}
if(top<$(document).scrollTop()){
top=_48.offset().top+_48.outerHeight();
}
_49.css({display:"block",left:_48.offset().left,top:top});
setTimeout(arguments.callee,200);
}
})();
};
function _22(_4c,_4d){
if($.fn.validatebox){
var _4e=$.data(_4c,"combobox").options;
var _4f=$.data(_4c,"combobox").combobox.find("input.combobox-text");
_4f.validatebox(_4e);
if(_4d){
_4f.validatebox("validate");
_4f.trigger("mouseleave");
}
}
};
function _50(_51,_52){
var _53=$.data(_51,"combobox").options;
var _54=$.data(_51,"combobox").combobox;
if(_52){
_53.disabled=true;
$(_51).attr("disabled",true);
_54.find(".combobox-value").attr("disabled",true);
_54.find(".combobox-text").attr("disabled",true);
}else{
_53.disabled=false;
$(_51).removeAttr("disabled");
_54.find(".combobox-value").removeAttr("disabled");
_54.find(".combobox-text").removeAttr("disabled");
}
};
$.fn.combobox=function(_55,_56){
if(typeof _55=="string"){
switch(_55){
case "destroy":
return this.each(function(){
_e(this);
});
case "resize":
return this.each(function(){
_1(this,_56);
});
case "select":
return this.each(function(){
_1a(this,_56);
});
case "clear":
return this.each(function(){
_23(this);
});
case "setValue":
return this.each(function(){
_26(this,_56);
});
case "getValue":
return _2f(this[0]);
case "getText":
return _32(this[0]);
case "loadData":
return this.each(function(){
_3a(this,_56);
});
case "reload":
return this.each(function(){
_41(this,_56);
});
case "disable":
return this.each(function(){
_50(this,true);
_10(this);
});
case "enable":
return this.each(function(){
_50(this,false);
_10(this);
});
}
}
_55=_55||{};
return this.each(function(){
var _57=$.data(this,"combobox");
if(_57){
$.extend(_57.options,_55);
}else{
var r=_8(this);
var t=$(this);
_57=$.data(this,"combobox",{options:$.extend({},$.fn.combobox.defaults,{width:(parseInt(t.css("width"))||undefined),listWidth:t.attr("listWidth"),listHeight:t.attr("listHeight"),valueField:t.attr("valueField"),textField:t.attr("textField"),editable:(t.attr("editable")?t.attr("editable")=="true":undefined),disabled:(t.attr("disabled")?true:undefined),url:t.attr("url"),required:(t.attr("required")?(t.attr("required")=="true"||t.attr("required")==true):undefined),missingMessage:(t.attr("missingMessage")||undefined)},_55),combobox:r.combobox,content:r.content});
t.removeAttr("disabled");
_3a(this,_35(this));
}
$("input.combobox-text",_57.combobox).attr("readonly",!_57.options.editable);
if(_57.options.data){
_3a(this,_57.options.data);
}
_41(this);
_50(this,_57.options.disabled);
_10(this);
_1(this);
_22(this);
});
};
$.fn.combobox.defaults={width:"auto",listWidth:null,listHeight:null,valueField:"value",textField:"text",editable:true,disabled:false,url:null,data:null,required:false,missingMessage:"This field is required.",onLoadSuccess:function(){
},onLoadError:function(){
},onSelect:function(_58){
},onChange:function(_59,_5a){
}};
})(jQuery);

View File

@@ -0,0 +1,275 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2,_3){
var _4=$.data(_2,"combotree").options;
var _5=$.data(_2,"combotree").combotree;
var _6=$.data(_2,"combotree").content;
if(_3){
_4.width=_3;
}
if(isNaN(_4.width)){
_4.width=_5.find("input.combotree-text").outerWidth();
}
var _7=_5.find(".combotree-arrow").outerWidth();
var _3=_4.width-_7-(_5.outerWidth()-_5.width());
_5.find("input.combotree-text").width(_3);
if(_4.treeWidth){
_6.width(_4.treeWidth);
}else{
_6.width($.boxModel==true?_5.outerWidth()-(_6.outerWidth()-_6.width()):_5.outerWidth());
}
if(_4.treeHeight){
_6.height(_4.treeHeight);
}
};
function _8(_9){
$(_9).hide();
var _a=$("<span class=\"combotree\"></span>").insertAfter(_9);
$("<input type=\"hidden\" class=\"combotree-value\"></input>").appendTo(_a);
$("<input class=\"combotree-text\" readonly=\"true\"></input>").appendTo(_a);
$("<span><span class=\"combotree-arrow\"></span></span>").appendTo(_a);
var _b=$("<div class=\"combotree-content\"><ul></ul></div>").appendTo("body");
var _c=$(_9).attr("name");
if(_c){
_a.find("input.combotree-value").attr("name",_c);
$(_9).removeAttr("name").attr("combotreeName",_c);
}
return {combotree:_a,content:_b};
};
function _d(_e){
$.data(_e,"combotree").content.remove();
$.data(_e,"combotree").combotree.remove();
$(_e).remove();
};
function _f(_10){
var _11=$.data(_10,"combotree").options;
var _12=$.data(_10,"combotree").combotree;
var _13=$.data(_10,"combotree").content;
var _14=_12.find(".combotree-arrow");
$(document).unbind(".combotree");
_12.unbind(".combotree");
_13.unbind(".combotree");
_14.unbind(".combotree");
if(!_11.disabled){
$(document).bind("mousedown.combotree",function(){
$("body>div.combotree-content").hide();
});
_13.bind("mousedown.combotree",function(){
return false;
});
_12.bind("click.combotree",function(){
_15();
return false;
});
_14.bind("mouseenter.combotree",function(){
$(this).addClass("combotree-arrow-hover");
}).bind("mouseleave.combotree",function(){
$(this).removeClass("combotree-arrow-hover");
});
}
function _15(){
if($.fn.window){
_13.css("z-index",$.fn.window.defaults.zIndex++);
}
_13.show();
(function(){
if(_13.is(":visible")){
var top=_12.offset().top+_12.outerHeight();
if(top+_13.outerHeight()>$(window).height()+$(document).scrollTop()){
top=_12.offset().top-_13.outerHeight();
}
if(top<$(document).scrollTop()){
top=_12.offset().top+_12.outerHeight();
}
_13.css({display:"block",left:_12.offset().left,top:top});
setTimeout(arguments.callee,200);
}
})();
};
};
function _16(_17){
var _18=$.data(_17,"combotree").options;
var _19=$.data(_17,"combotree").combotree;
var _1a=$.data(_17,"combotree").content;
_1a.find(">ul").tree({onClick:function(_1b){
if(_18.onBeforeSelect.call(_17,_1b)==false){
return;
}
var _1c=_19.find("input.combotree-value").val();
_19.find("input.combotree-value").val(_1b.id);
_19.find("input.combotree-text").val(_1b.text);
_1a.hide();
_1d(_17,true);
_18.onSelect.call(_17,_1b);
if(_1c!=_1b.id){
_18.onChange.call(_17,_1b.id,_1c);
}
}});
};
function _1e(_1f){
var _20=$.data(_1f,"combotree").combotree;
_20.find("input.combotree-value").val("");
_20.find("input.combotree-text").val("");
};
function _21(_22,_23){
var _24=$.data(_22,"combotree").options;
var _25=$.data(_22,"combotree").combotree;
var _26=$.data(_22,"combotree").content.find(">ul");
var _27,_28;
var _29=_25.find("input.combotree-value").val();
if(typeof _23=="object"){
_27=_23.id;
_28=_23.text;
}else{
_27=_23;
}
var _2a=_26.find("div.tree-node[node-id="+_27+"]")[0];
_26.tree("select",_2a);
var _2b=_26.tree("getSelected");
if(_2b){
_27=_2b.id;
_28=_2b.text;
}
if(_28==undefined){
_28=_27;
}
_25.find("input.combotree-value").val(_27);
_25.find("input.combotree-text").val(_28);
_1d(_22,true);
if(_29!=_27){
_24.onChange.call(_22,_27,_29);
}
};
function _2c(_2d){
var _2e=$.data(_2d,"combotree").combotree;
return _2e.find("input.combotree-value").val();
};
function _2f(_30){
var _31=$.data(_30,"combotree").combotree;
return _31.find("input.combotree-text").val();
};
function _32(_33,_34){
var _35=$.data(_33,"combotree").content;
_35.find(">ul").tree("loadData",_34);
};
function _36(_37,url){
var _38=$.data(_37,"combotree").options;
var _39=$.data(_37,"combotree").content;
if(url){
_38.url=url;
}
_39.find(">ul").tree({url:_38.url}).tree("reload");
};
function _1d(_3a,_3b){
if($.fn.validatebox){
var _3c=$.data(_3a,"combotree").options;
var _3d=$.data(_3a,"combotree").combotree.find("input.combotree-text");
_3d.validatebox(_3c);
if(_3b){
_3d.validatebox("validate");
_3d.trigger("mouseleave");
}
}
};
function _3e(_3f){
var _40=$.data(_3f,"combotree").content;
return _40.find(">ul.tree");
};
function _41(_42,_43){
var _44=$.data(_42,"combotree").options;
var _45=$.data(_42,"combotree").combotree;
if(_43){
_44.disabled=true;
$(_42).attr("disabled",true);
_45.find("input.combotree-value").attr("disabled",true);
_45.find("input.combotree-text").attr("disabled",true);
}else{
_44.disabled=false;
$(_42).removeAttr("disabled");
_45.find("input.combotree-value").removeAttr("disabled");
_45.find("input.combotree-text").removeAttr("disabled");
}
};
$.fn.combotree=function(_46,_47){
if(typeof _46=="string"){
switch(_46){
case "destroy":
return this.each(function(){
_d(this);
});
case "resize":
return this.each(function(){
_1(this,_47);
});
case "tree":
return _3e(this[0]);
case "clear":
return this.each(function(){
_1e(this);
});
case "setValue":
return this.each(function(){
_21(this,_47);
});
case "getValue":
return _2c(this[0]);
case "getText":
return _2f(this[0]);
case "loadData":
return this.each(function(){
_32(this,_47);
});
case "reload":
return this.each(function(){
_36(this,_47);
});
case "disable":
return this.each(function(){
_41(this,true);
_f(this);
});
case "enable":
return this.each(function(){
_41(this,false);
_f(this);
});
}
}
_46=_46||{};
return this.each(function(){
var _48=$.data(this,"combotree");
if(_48){
$.extend(_48.options,_46);
}else{
var r=_8(this);
var t=$(this);
_48=$.data(this,"combotree",{options:$.extend({},$.fn.combotree.defaults,{width:(parseInt(t.css("width"))||undefined),treeWidth:t.attr("treeWidth"),treeHeight:t.attr("treeHeight"),url:t.attr("url"),disabled:(t.attr("disabled")?true:undefined),required:(t.attr("required")?(t.attr("required")=="true"||t.attr("required")==true):undefined),missingMessage:(t.attr("missingMessage")||undefined)},_46),combotree:r.combotree,content:r.content});
t.removeAttr("disabled");
}
_16(this);
if(_48.options.data){
_32(this,_48.options.data);
}
if(_48.options.url){
_36(this,_48.options.url);
}
_41(this,_48.options.disabled);
_f(this);
_1(this);
_1d(this);
});
};
$.fn.combotree.defaults={width:"auto",treeWidth:null,treeHeight:200,url:null,data:null,disabled:false,required:false,missingMessage:"This field is required.",onBeforeSelect:function(_49){
},onSelect:function(_4a){
},onChange:function(_4b,_4c){
}};
})(jQuery);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,160 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$(_2);
var _4=$("<div class=\"datebox-calendar\">"+"<div class=\"datebox-calendar-inner\">"+"<div></div>"+"</div>"+"<div class=\"datebox-button\"></div>"+"</div>").appendTo("body");
_4.find("div.datebox-calendar-inner>div").calendar({fit:true,border:false,onSelect:function(_5){
var _6=$.data(_2,"datebox").options;
var v=_6.formatter(_5);
$(_2).val(v);
_4.hide();
_1b(_2,true);
_6.onSelect.call(_2,_5);
}});
_4.hide().mousedown(function(){
return false;
});
return _4;
};
function _7(_8){
var _9=$(_8);
$(document).unbind(".datebox");
_9.unbind(".datebox");
$.data(_8,"datebox").calendar.remove();
_9.remove();
};
function _a(_b){
var _c=$.data(_b,"datebox").options;
var _d=$(_b);
$(document).unbind(".datebox");
_d.unbind(".datebox");
if(!_c.disabled){
$(document).bind("mousedown.datebox",function(){
$("body>div.datebox-calendar").hide();
});
_d.bind("focus.datebox",function(){
_e(_b);
}).bind("click.datebox",function(){
_e(_b);
});
}
};
function _f(_10){
var _11=$.data(_10,"datebox").options;
var _12=$.data(_10,"datebox").calendar;
var _13=_12.find("div.datebox-button");
_13.empty();
$("<a href=\"javascript:void(0)\" class=\"datebox-current\"></a>").html(_11.currentText).appendTo(_13);
$("<a href=\"javascript:void(0)\" class=\"datebox-close\"></a>").html(_11.closeText).appendTo(_13);
_13.find(".datebox-current,.datebox-close").hover(function(){
$(this).addClass("datebox-button-hover");
},function(){
$(this).removeClass("datebox-button-hover");
});
_13.find(".datebox-current").click(function(){
_12.find("div.datebox-calendar-inner>div").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
});
_13.find(".datebox-close").click(function(){
_12.hide();
});
};
function _e(_14){
var _15=$.data(_14,"datebox").options;
var _16=$.data(_14,"datebox").calendar;
_16.show();
if($.fn.window){
_16.css("z-index",$.fn.window.defaults.zIndex++);
}
(function(){
if(_16.is(":visible")){
_16.css({display:"block",left:$(_14).offset().left,top:$(_14).offset().top+$(_14).outerHeight()});
setTimeout(arguments.callee,200);
}
})();
var _17=_15.parser($(_14).val());
_16.find("div.datebox-calendar-inner>div").calendar({year:_17.getFullYear(),month:_17.getMonth()+1,current:_17});
};
function _18(_19){
var _1a=$.data(_19,"datebox").calendar;
_1a.hide();
};
function _1b(_1c,_1d){
if($.fn.validatebox){
var _1e=$.data(_1c,"datebox").options;
$(_1c).validatebox(_1e);
if(_1d){
$(_1c).validatebox("validate");
$(_1c).trigger("mouseleave");
}
}
};
function _1f(_20,_21){
var _22=$.data(_20,"datebox").options;
if(_21){
_22.disabled=true;
$(_20).attr("disabled",true);
}else{
_22.disabled=false;
$(_20).removeAttr("disabled");
}
};
$.fn.datebox=function(_23){
if(typeof _23=="string"){
switch(_23){
case "destroy":
return this.each(function(){
_7(this);
});
case "disable":
return this.each(function(){
_1f(this,true);
_a(this);
});
case "enable":
return this.each(function(){
_1f(this,false);
_a(this);
});
}
}
_23=_23||{};
return this.each(function(){
var _24=$.data(this,"datebox");
if(_24){
$.extend(_24.options,_23);
}else{
var _25=_1(this);
var t=$(this);
_24=$.data(this,"datebox",{options:$.extend({},$.fn.datebox.defaults,{disabled:(t.attr("disabled")?true:undefined),required:(t.attr("required")?(t.attr("required")=="true"||t.attr("required")==true):undefined),missingMessage:(t.attr("missingMessage")||undefined)},_23),calendar:_25});
t.removeAttr("disabled");
}
_f(this);
_1f(this,_24.options.disabled);
_a(this);
_1b(this);
});
};
$.fn.datebox.defaults={currentText:"Today",closeText:"Close",disabled:false,required:false,missingMessage:"This field is required.",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);

View File

@@ -0,0 +1,144 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var t=$(_2);
t.wrapInner("<div class=\"dialog-content\"></div>");
var _3=t.find(">div.dialog-content");
_3.css("padding",t.css("padding"));
t.css("padding",0);
_3.panel({border:false});
return _3;
};
function _4(_5){
var _6=$.data(_5,"dialog").options;
var _7=$.data(_5,"dialog").contentPanel;
$(_5).find("div.dialog-toolbar").remove();
$(_5).find("div.dialog-button").remove();
if(_6.toolbar){
var _8=$("<div class=\"dialog-toolbar\"></div>").prependTo(_5);
for(var i=0;i<_6.toolbar.length;i++){
var p=_6.toolbar[i];
if(p=="-"){
_8.append("<div class=\"dialog-tool-separator\"></div>");
}else{
var _9=$("<a href=\"javascript:void(0)\"></a>").appendTo(_8);
_9.css("float","left").text(p.text);
if(p.iconCls){
_9.attr("icon",p.iconCls);
}
if(p.handler){
_9[0].onclick=p.handler;
}
_9.linkbutton({plain:true,disabled:(p.disabled||false)});
}
}
_8.append("<div style=\"clear:both\"></div>");
}
if(_6.buttons){
var _a=$("<div class=\"dialog-button\"></div>").appendTo(_5);
for(var i=0;i<_6.buttons.length;i++){
var p=_6.buttons[i];
var _b=$("<a href=\"javascript:void(0)\"></a>").appendTo(_a);
if(p.handler){
_b[0].onclick=p.handler;
}
_b.linkbutton(p);
}
}
if(_6.href){
_7.panel({href:_6.href,onLoad:_6.onLoad});
_6.href=null;
}
$(_5).window($.extend({},_6,{onResize:function(_c,_d){
var _e=$(_5).panel("panel").find(">div.panel-body");
_7.panel("resize",{width:_e.width(),height:(_d=="auto")?"auto":_e.height()-_e.find(">div.dialog-toolbar").outerHeight()-_e.find(">div.dialog-button").outerHeight()});
if(_6.onResize){
_6.onResize.call(_5,_c,_d);
}
}}));
};
function _f(_10){
var _11=$.data(_10,"dialog").contentPanel;
_11.panel("refresh");
};
$.fn.dialog=function(_12,_13){
if(typeof _12=="string"){
switch(_12){
case "options":
return $(this[0]).window("options");
case "dialog":
return $(this[0]).window("window");
case "setTitle":
return this.each(function(){
$(this).window("setTitle",_13);
});
case "open":
return this.each(function(){
$(this).window("open",_13);
});
case "close":
return this.each(function(){
$(this).window("close",_13);
});
case "destroy":
return this.each(function(){
$(this).window("destroy",_13);
});
case "refresh":
return this.each(function(){
_f(this);
});
case "resize":
return this.each(function(){
$(this).window("resize",_13);
});
case "move":
return this.each(function(){
$(this).window("move",_13);
});
case "maximize":
return this.each(function(){
$(this).window("maximize");
});
case "minimize":
return this.each(function(){
$(this).window("minimize");
});
case "restore":
return this.each(function(){
$(this).window("restore");
});
case "collapse":
return this.each(function(){
$(this).window("collapse",_13);
});
case "expand":
return this.each(function(){
$(this).window("expand",_13);
});
}
}
_12=_12||{};
return this.each(function(){
var _14=$.data(this,"dialog");
if(_14){
$.extend(_14.options,_12);
}else{
var t=$(this);
var _15=$.extend({},$.fn.dialog.defaults,{title:(t.attr("title")?t.attr("title"):undefined),href:t.attr("href"),collapsible:(t.attr("collapsible")?t.attr("collapsible")=="true":undefined),minimizable:(t.attr("minimizable")?t.attr("minimizable")=="true":undefined),maximizable:(t.attr("maximizable")?t.attr("maximizable")=="true":undefined),resizable:(t.attr("resizable")?t.attr("resizable")=="true":undefined)},_12);
$.data(this,"dialog",{options:_15,contentPanel:_1(this)});
}
_4(this);
});
};
$.fn.dialog.defaults={title:"New Dialog",href:null,collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null};
})(jQuery);

View File

@@ -0,0 +1,231 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(e){
var _2=$.data(e.data.target,"draggable").options;
var _3=e.data;
var _4=_3.startLeft+e.pageX-_3.startX;
var _5=_3.startTop+e.pageY-_3.startY;
if(_2.deltaX!=null&&_2.deltaX!=undefined){
_4=e.pageX+_2.deltaX;
}
if(_2.deltaY!=null&&_2.deltaY!=undefined){
_5=e.pageY+_2.deltaY;
}
if(e.data.parnet!=document.body){
if($.boxModel==true){
_4+=$(e.data.parent).scrollLeft();
_5+=$(e.data.parent).scrollTop();
}
}
if(_2.axis=="h"){
_3.left=_4;
}else{
if(_2.axis=="v"){
_3.top=_5;
}else{
_3.left=_4;
_3.top=_5;
}
}
};
function _6(e){
var _7=$.data(e.data.target,"draggable").options;
var _8=$.data(e.data.target,"draggable").proxy;
if(_8){
_8.css("cursor",_7.cursor);
}else{
_8=$(e.data.target);
$.data(e.data.target,"draggable").handle.css("cursor",_7.cursor);
}
_8.css({left:e.data.left,top:e.data.top});
};
function _9(e){
var _a=$.data(e.data.target,"draggable").options;
var _b=$(".droppable").filter(function(){
return e.data.target!=this;
}).filter(function(){
var _c=$.data(this,"droppable").options.accept;
if(_c){
return $(_c).filter(function(){
return this==e.data.target;
}).length>0;
}else{
return true;
}
});
$.data(e.data.target,"draggable").droppables=_b;
var _d=$.data(e.data.target,"draggable").proxy;
if(!_d){
if(_a.proxy){
if(_a.proxy=="clone"){
_d=$(e.data.target).clone().insertAfter(e.data.target);
}else{
_d=_a.proxy.call(e.data.target,e.data.target);
}
$.data(e.data.target,"draggable").proxy=_d;
}else{
_d=$(e.data.target);
}
}
_d.css("position","absolute");
_1(e);
_6(e);
_a.onStartDrag.call(e.data.target,e);
return false;
};
function _e(e){
_1(e);
if($.data(e.data.target,"draggable").options.onDrag.call(e.data.target,e)!=false){
_6(e);
}
var _f=e.data.target;
$.data(e.data.target,"draggable").droppables.each(function(){
var _10=$(this);
var p2=$(this).offset();
if(e.pageX>p2.left&&e.pageX<p2.left+_10.outerWidth()&&e.pageY>p2.top&&e.pageY<p2.top+_10.outerHeight()){
if(!this.entered){
$(this).trigger("_dragenter",[_f]);
this.entered=true;
}
$(this).trigger("_dragover",[_f]);
}else{
if(this.entered){
$(this).trigger("_dragleave",[_f]);
this.entered=false;
}
}
});
return false;
};
function _11(e){
_1(e);
var _12=$.data(e.data.target,"draggable").proxy;
var _13=$.data(e.data.target,"draggable").options;
if(_13.revert){
if(_14()==true){
_15();
$(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop});
}else{
if(_12){
_12.animate({left:e.data.startLeft,top:e.data.startTop},function(){
_15();
});
}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});
_15();
_14();
}
_13.onStopDrag.call(e.data.target,e);
function _15(){
if(_12){
_12.remove();
}
$.data(e.data.target,"draggable").proxy=null;
};
function _14(){
var _16=false;
$.data(e.data.target,"draggable").droppables.each(function(){
var _17=$(this);
var p2=$(this).offset();
if(e.pageX>p2.left&&e.pageX<p2.left+_17.outerWidth()&&e.pageY>p2.top&&e.pageY<p2.top+_17.outerHeight()){
if(_13.revert){
$(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop});
}
$(this).trigger("_drop",[e.data.target]);
_16=true;
this.entered=false;
}
});
return _16;
};
$(document).unbind(".draggable");
return false;
};
$.fn.draggable=function(_18){
if(typeof _18=="string"){
switch(_18){
case "options":
return $.data(this[0],"draggable").options;
case "proxy":
return $.data(this[0],"draggable").proxy;
case "enable":
return this.each(function(){
$(this).draggable({disabled:false});
});
case "disable":
return this.each(function(){
$(this).draggable({disabled:true});
});
}
}
return this.each(function(){
var _19;
var _1a=$.data(this,"draggable");
if(_1a){
_1a.handle.unbind(".draggable");
_19=$.extend(_1a.options,_18);
}else{
_19=$.extend({},$.fn.draggable.defaults,_18||{});
}
if(_19.disabled==true){
$(this).css("cursor","default");
return;
}
var _1b=null;
if(typeof _19.handle=="undefined"||_19.handle==null){
_1b=$(this);
}else{
_1b=(typeof _19.handle=="string"?$(_19.handle,this):_1b);
}
$.data(this,"draggable",{options:_19,handle:_1b});
_1b.bind("mousedown.draggable",{target:this},_1c);
_1b.bind("mousemove.draggable",{target:this},_1d);
function _1c(e){
if(_1e(e)==false){
return;
}
var _1f=$(e.data.target).position();
var _20={startPosition:$(e.data.target).css("position"),startLeft:_1f.left,startTop:_1f.top,left:_1f.left,top:_1f.top,startX:e.pageX,startY:e.pageY,target:e.data.target,parent:$(e.data.target).parent()[0]};
$(document).bind("mousedown.draggable",_20,_9);
$(document).bind("mousemove.draggable",_20,_e);
$(document).bind("mouseup.draggable",_20,_11);
};
function _1d(e){
if(_1e(e)){
$(this).css("cursor",_19.cursor);
}else{
$(this).css("cursor","default");
}
};
function _1e(e){
var _21=$(_1b).offset();
var _22=$(_1b).outerWidth();
var _23=$(_1b).outerHeight();
var t=e.pageY-_21.top;
var r=_21.left+_22-e.pageX;
var b=_21.top+_23-e.pageY;
var l=e.pageX-_21.left;
return Math.min(t,r,b,l)>_19.edge;
};
});
};
$.fn.draggable.defaults={proxy:null,revert:false,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:false,edge:0,axis:null,onStartDrag:function(e){
},onDrag:function(e){
},onStopDrag:function(e){
}};
})(jQuery);

View File

@@ -0,0 +1,44 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(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){
_7=_7||{};
return this.each(function(){
var _8=$.data(this,"droppable");
if(_8){
$.extend(_8.options,_7);
}else{
_1(this);
$.data(this,"droppable",{options:$.extend({},$.fn.droppable.defaults,_7)});
}
});
};
$.fn.droppable.defaults={accept:null,onDragEnter:function(e,_9){
},onDragOver:function(e,_a){
},onDragLeave:function(e,_b){
},onDrop:function(e,_c){
}};
})(jQuery);

View File

@@ -0,0 +1,179 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2,_3){
_3=_3||{};
if(_3.onSubmit){
if(_3.onSubmit.call(_2)==false){
return;
}
}
var _4=$(_2);
if(_3.url){
_4.attr("action",_3.url);
}
var _5="easyui_frame_"+(new Date().getTime());
var _6=$("<iframe id="+_5+" name="+_5+"></iframe>").attr("src",window.ActiveXObject?"javascript:false":"about:blank").css({position:"absolute",top:-1000,left:-1000});
var t=_4.attr("target"),a=_4.attr("action");
_4.attr("target",_5);
try{
_6.appendTo("body");
_6.bind("load",cb);
_4[0].submit();
}
finally{
_4.attr("action",a);
t?_4.attr("target",t):_4.removeAttr("target");
}
var _7=10;
function cb(){
_6.unbind();
var _8=$("#"+_5).contents().find("body");
var _9=_8.html();
if(_9==""){
if(--_7){
setTimeout(cb,100);
return;
}
return;
}
var ta=_8.find(">textarea");
if(ta.length){
_9=ta.val();
}else{
var _a=_8.find(">pre");
if(_a.length){
_9=_a.html();
}
}
if(_3.success){
_3.success(_9);
}
setTimeout(function(){
_6.unbind();
_6.remove();
},100);
};
};
function _b(_c,_d){
if(!$.data(_c,"form")){
$.data(_c,"form",{options:$.extend({},$.fn.form.defaults)});
}
var _e=$.data(_c,"form").options;
if(typeof _d=="string"){
var _f={};
if(_e.onBeforeLoad.call(_c,_f)==false){
return;
}
$.ajax({url:_d,data:_f,dataType:"json",success:function(_10){
_11(_10);
},error:function(){
_e.onLoadError.apply(_c,arguments);
}});
}else{
_11(_d);
}
function _11(_12){
var _13=$(_c);
for(var _14 in _12){
var val=_12[_14];
$("input[name="+_14+"]",_13).val(val);
$("textarea[name="+_14+"]",_13).val(val);
$("select[name="+_14+"]",_13).val(val);
if($.fn.combobox){
$("select[comboboxName="+_14+"]",_13).combobox("setValue",val);
}
if($.fn.combotree){
$("select[combotreeName="+_14+"]",_13).combotree("setValue",val);
}
}
_e.onLoadSuccess.call(_c,_12);
_15(_c);
};
};
function _16(_17){
$("input,select,textarea",_17).each(function(){
var t=this.type,tag=this.tagName.toLowerCase();
if(t=="text"||t=="hidden"||t=="password"||tag=="textarea"){
this.value="";
}else{
if(t=="checkbox"||t=="radio"){
this.checked=false;
}else{
if(tag=="select"){
this.selectedIndex=-1;
}
}
}
});
if($.fn.combobox){
$("select[comboboxName]",_17).combobox("clear");
}
if($.fn.combotree){
$("select[combotreeName]",_17).combotree("clear");
}
};
function _18(_19){
var _1a=$.data(_19,"form").options;
var _1b=$(_19);
_1b.unbind(".form").bind("submit.form",function(){
setTimeout(function(){
_1(_19,_1a);
},0);
return false;
});
};
function _15(_1c){
if($.fn.validatebox){
var box=$(".validatebox-text",_1c);
if(box.length){
box.validatebox("validate");
box.trigger("blur");
var _1d=$(".validatebox-invalid:first",_1c).focus();
return _1d.length==0;
}
}
return true;
};
$.fn.form=function(_1e,_1f){
if(typeof _1e=="string"){
switch(_1e){
case "submit":
return this.each(function(){
_1(this,$.extend({},$.fn.form.defaults,_1f||{}));
});
case "load":
return this.each(function(){
_b(this,_1f);
});
case "clear":
return this.each(function(){
_16(this);
});
case "validate":
return _15(this[0]);
}
}
_1e=_1e||{};
return this.each(function(){
if(!$.data(this,"form")){
$.data(this,"form",{options:$.extend({},$.fn.form.defaults,_1e)});
}
_18(this);
});
};
$.fn.form.defaults={url:null,onSubmit:function(){
},success:function(_20){
},onBeforeLoad:function(_21){
},onLoadSuccess:function(_22){
},onLoadError:function(){
}};
})(jQuery);

View File

@@ -0,0 +1,480 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
var _1=false;
function _2(_3){
var _4=$.data(_3,"layout").options;
var _5=$.data(_3,"layout").panels;
var cc=$(_3);
if(_4.fit==true){
var p=cc.parent();
cc.width(p.width()).height(p.height());
}
var _6={top:0,left:0,width:cc.width(),height:cc.height()};
function _7(pp){
if(pp.length==0){
return;
}
pp.panel("resize",{width:cc.width(),height:pp.panel("options").height,left:0,top:0});
_6.top+=pp.panel("options").height;
_6.height-=pp.panel("options").height;
};
if(_b(_5.expandNorth)){
_7(_5.expandNorth);
}else{
_7(_5.north);
}
function _8(pp){
if(pp.length==0){
return;
}
pp.panel("resize",{width:cc.width(),height:pp.panel("options").height,left:0,top:cc.height()-pp.panel("options").height});
_6.height-=pp.panel("options").height;
};
if(_b(_5.expandSouth)){
_8(_5.expandSouth);
}else{
_8(_5.south);
}
function _9(pp){
if(pp.length==0){
return;
}
pp.panel("resize",{width:pp.panel("options").width,height:_6.height,left:cc.width()-pp.panel("options").width,top:_6.top});
_6.width-=pp.panel("options").width;
};
if(_b(_5.expandEast)){
_9(_5.expandEast);
}else{
_9(_5.east);
}
function _a(pp){
if(pp.length==0){
return;
}
pp.panel("resize",{width:pp.panel("options").width,height:_6.height,left:0,top:_6.top});
_6.left+=pp.panel("options").width;
_6.width-=pp.panel("options").width;
};
if(_b(_5.expandWest)){
_a(_5.expandWest);
}else{
_a(_5.west);
}
_5.center.panel("resize",_6);
};
function _c(_d){
var cc=$(_d);
if(cc[0].tagName=="BODY"){
$("html").css({height:"100%",overflow:"hidden"});
$("body").css({height:"100%",overflow:"hidden",border:"none"});
}
cc.addClass("layout");
cc.css({margin:0,padding:0});
function _e(_f){
var pp=$(">div[region="+_f+"]",_d).addClass("layout-body");
var _10=null;
if(_f=="north"){
_10="layout-button-up";
}else{
if(_f=="south"){
_10="layout-button-down";
}else{
if(_f=="east"){
_10="layout-button-right";
}else{
if(_f=="west"){
_10="layout-button-left";
}
}
}
}
var cls="layout-panel layout-panel-"+_f;
if(pp.attr("split")=="true"){
cls+=" layout-split-"+_f;
}
pp.panel({cls:cls,doSize:false,border:(pp.attr("border")=="false"?false:true),tools:[{iconCls:_10,handler:function(){
_1b(_d,_f);
}}]});
if(pp.attr("split")=="true"){
var _11=pp.panel("panel");
var _12="";
if(_f=="north"){
_12="s";
}
if(_f=="south"){
_12="n";
}
if(_f=="east"){
_12="w";
}
if(_f=="west"){
_12="e";
}
_11.resizable({handles:_12,onStartResize:function(e){
_1=true;
if(_f=="north"||_f=="south"){
var _13=$(">div.layout-split-proxy-v",_d);
}else{
var _13=$(">div.layout-split-proxy-h",_d);
}
var top=0,_14=0,_15=0,_16=0;
var pos={display:"block"};
if(_f=="north"){
pos.top=parseInt(_11.css("top"))+_11.outerHeight()-_13.height();
pos.left=parseInt(_11.css("left"));
pos.width=_11.outerWidth();
pos.height=_13.height();
}else{
if(_f=="south"){
pos.top=parseInt(_11.css("top"));
pos.left=parseInt(_11.css("left"));
pos.width=_11.outerWidth();
pos.height=_13.height();
}else{
if(_f=="east"){
pos.top=parseInt(_11.css("top"))||0;
pos.left=parseInt(_11.css("left"))||0;
pos.width=_13.width();
pos.height=_11.outerHeight();
}else{
if(_f=="west"){
pos.top=parseInt(_11.css("top"))||0;
pos.left=_11.outerWidth()-_13.width();
pos.width=_13.width();
pos.height=_11.outerHeight();
}
}
}
}
_13.css(pos);
$("<div class=\"layout-mask\"></div>").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc);
},onResize:function(e){
if(_f=="north"||_f=="south"){
var _17=$(">div.layout-split-proxy-v",_d);
_17.css("top",e.pageY-$(_d).offset().top-_17.height()/2);
}else{
var _17=$(">div.layout-split-proxy-h",_d);
_17.css("left",e.pageX-$(_d).offset().left-_17.width()/2);
}
return false;
},onStopResize:function(){
$(">div.layout-split-proxy-v",_d).css("display","none");
$(">div.layout-split-proxy-h",_d).css("display","none");
var _18=pp.panel("options");
_18.width=_11.outerWidth();
_18.height=_11.outerHeight();
_18.left=_11.css("left");
_18.top=_11.css("top");
pp.panel("resize");
_2(_d);
_1=false;
cc.find(">div.layout-mask").remove();
}});
}
return pp;
};
$("<div class=\"layout-split-proxy-h\"></div>").appendTo(cc);
$("<div class=\"layout-split-proxy-v\"></div>").appendTo(cc);
var _19={center:_e("center")};
_19.north=_e("north");
_19.south=_e("south");
_19.east=_e("east");
_19.west=_e("west");
$(_d).bind("_resize",function(){
var _1a=$.data(_d,"layout").options;
if(_1a.fit==true){
_2(_d);
}
return false;
});
return _19;
};
function _1b(_1c,_1d){
var _1e=$.data(_1c,"layout").panels;
var cc=$(_1c);
function _1f(dir){
var _20;
if(dir=="east"){
_20="layout-button-left";
}else{
if(dir=="west"){
_20="layout-button-right";
}else{
if(dir=="north"){
_20="layout-button-down";
}else{
if(dir=="south"){
_20="layout-button-up";
}
}
}
}
var p=$("<div></div>").appendTo(cc).panel({cls:"layout-expand",title:"&nbsp;",closed:true,doSize:false,tools:[{iconCls:_20,handler:function(){
_21(_1c,_1d);
}}]});
p.panel("panel").hover(function(){
$(this).addClass("layout-expand-over");
},function(){
$(this).removeClass("layout-expand-over");
});
return p;
};
if(_1d=="east"){
if(_1e.east.panel("options").onBeforeCollapse.call(_1e.east)==false){
return;
}
_1e.center.panel("resize",{width:_1e.center.panel("options").width+_1e.east.panel("options").width-28});
_1e.east.panel("panel").animate({left:cc.width()},function(){
_1e.east.panel("close");
_1e.expandEast.panel("open").panel("resize",{top:_1e.east.panel("options").top,left:cc.width()-28,width:28,height:_1e.east.panel("options").height});
_1e.east.panel("options").onCollapse.call(_1e.east);
});
if(!_1e.expandEast){
_1e.expandEast=_1f("east");
_1e.expandEast.panel("panel").click(function(){
_1e.east.panel("open").panel("resize",{left:cc.width()});
_1e.east.panel("panel").animate({left:cc.width()-_1e.east.panel("options").width});
return false;
});
}
}else{
if(_1d=="west"){
if(_1e.west.panel("options").onBeforeCollapse.call(_1e.west)==false){
return;
}
_1e.center.panel("resize",{width:_1e.center.panel("options").width+_1e.west.panel("options").width-28,left:28});
_1e.west.panel("panel").animate({left:-_1e.west.panel("options").width},function(){
_1e.west.panel("close");
_1e.expandWest.panel("open").panel("resize",{top:_1e.west.panel("options").top,left:0,width:28,height:_1e.west.panel("options").height});
_1e.west.panel("options").onCollapse.call(_1e.west);
});
if(!_1e.expandWest){
_1e.expandWest=_1f("west");
_1e.expandWest.panel("panel").click(function(){
_1e.west.panel("open").panel("resize",{left:-_1e.west.panel("options").width});
_1e.west.panel("panel").animate({left:0});
return false;
});
}
}else{
if(_1d=="north"){
if(_1e.north.panel("options").onBeforeCollapse.call(_1e.north)==false){
return;
}
var hh=cc.height()-28;
if(_b(_1e.expandSouth)){
hh-=_1e.expandSouth.panel("options").height;
}else{
if(_b(_1e.south)){
hh-=_1e.south.panel("options").height;
}
}
_1e.center.panel("resize",{top:28,height:hh});
_1e.east.panel("resize",{top:28,height:hh});
_1e.west.panel("resize",{top:28,height:hh});
if(_b(_1e.expandEast)){
_1e.expandEast.panel("resize",{top:28,height:hh});
}
if(_b(_1e.expandWest)){
_1e.expandWest.panel("resize",{top:28,height:hh});
}
_1e.north.panel("panel").animate({top:-_1e.north.panel("options").height},function(){
_1e.north.panel("close");
_1e.expandNorth.panel("open").panel("resize",{top:0,left:0,width:cc.width(),height:28});
_1e.north.panel("options").onCollapse.call(_1e.north);
});
if(!_1e.expandNorth){
_1e.expandNorth=_1f("north");
_1e.expandNorth.panel("panel").click(function(){
_1e.north.panel("open").panel("resize",{top:-_1e.north.panel("options").height});
_1e.north.panel("panel").animate({top:0});
return false;
});
}
}else{
if(_1d=="south"){
if(_1e.south.panel("options").onBeforeCollapse.call(_1e.south)==false){
return;
}
var hh=cc.height()-28;
if(_b(_1e.expandNorth)){
hh-=_1e.expandNorth.panel("options").height;
}else{
if(_b(_1e.north)){
hh-=_1e.north.panel("options").height;
}
}
_1e.center.panel("resize",{height:hh});
_1e.east.panel("resize",{height:hh});
_1e.west.panel("resize",{height:hh});
if(_b(_1e.expandEast)){
_1e.expandEast.panel("resize",{height:hh});
}
if(_b(_1e.expandWest)){
_1e.expandWest.panel("resize",{height:hh});
}
_1e.south.panel("panel").animate({top:cc.height()},function(){
_1e.south.panel("close");
_1e.expandSouth.panel("open").panel("resize",{top:cc.height()-28,left:0,width:cc.width(),height:28});
_1e.south.panel("options").onCollapse.call(_1e.south);
});
if(!_1e.expandSouth){
_1e.expandSouth=_1f("south");
_1e.expandSouth.panel("panel").click(function(){
_1e.south.panel("open").panel("resize",{top:cc.height()});
_1e.south.panel("panel").animate({top:cc.height()-_1e.south.panel("options").height});
return false;
});
}
}
}
}
}
};
function _21(_22,_23){
var _24=$.data(_22,"layout").panels;
var cc=$(_22);
if(_23=="east"&&_24.expandEast){
if(_24.east.panel("options").onBeforeExpand.call(_24.east)==false){
return;
}
_24.expandEast.panel("close");
_24.east.panel("panel").stop(true,true);
_24.east.panel("open").panel("resize",{left:cc.width()});
_24.east.panel("panel").animate({left:cc.width()-_24.east.panel("options").width},function(){
_2(_22);
_24.east.panel("options").onExpand.call(_24.east);
});
}else{
if(_23=="west"&&_24.expandWest){
if(_24.west.panel("options").onBeforeExpand.call(_24.west)==false){
return;
}
_24.expandWest.panel("close");
_24.west.panel("panel").stop(true,true);
_24.west.panel("open").panel("resize",{left:-_24.west.panel("options").width});
_24.west.panel("panel").animate({left:0},function(){
_2(_22);
_24.west.panel("options").onExpand.call(_24.west);
});
}else{
if(_23=="north"&&_24.expandNorth){
if(_24.north.panel("options").onBeforeExpand.call(_24.north)==false){
return;
}
_24.expandNorth.panel("close");
_24.north.panel("panel").stop(true,true);
_24.north.panel("open").panel("resize",{top:-_24.north.panel("options").height});
_24.north.panel("panel").animate({top:0},function(){
_2(_22);
_24.north.panel("options").onExpand.call(_24.north);
});
}else{
if(_23=="south"&&_24.expandSouth){
if(_24.south.panel("options").onBeforeExpand.call(_24.south)==false){
return;
}
_24.expandSouth.panel("close");
_24.south.panel("panel").stop(true,true);
_24.south.panel("open").panel("resize",{top:cc.height()});
_24.south.panel("panel").animate({top:cc.height()-_24.south.panel("options").height},function(){
_2(_22);
_24.south.panel("options").onExpand.call(_24.south);
});
}
}
}
}
};
function _25(_26){
var _27=$.data(_26,"layout").panels;
var cc=$(_26);
if(_27.east.length){
_27.east.panel("panel").bind("mouseover","east",_1b);
}
if(_27.west.length){
_27.west.panel("panel").bind("mouseover","west",_1b);
}
if(_27.north.length){
_27.north.panel("panel").bind("mouseover","north",_1b);
}
if(_27.south.length){
_27.south.panel("panel").bind("mouseover","south",_1b);
}
_27.center.panel("panel").bind("mouseover","center",_1b);
function _1b(e){
if(_1==true){
return;
}
if(e.data!="east"&&_b(_27.east)&&_b(_27.expandEast)){
_27.east.panel("panel").animate({left:cc.width()},function(){
_27.east.panel("close");
});
}
if(e.data!="west"&&_b(_27.west)&&_b(_27.expandWest)){
_27.west.panel("panel").animate({left:-_27.west.panel("options").width},function(){
_27.west.panel("close");
});
}
if(e.data!="north"&&_b(_27.north)&&_b(_27.expandNorth)){
_27.north.panel("panel").animate({top:-_27.north.panel("options").height},function(){
_27.north.panel("close");
});
}
if(e.data!="south"&&_b(_27.south)&&_b(_27.expandSouth)){
_27.south.panel("panel").animate({top:cc.height()},function(){
_27.south.panel("close");
});
}
return false;
};
};
function _b(pp){
if(!pp){
return false;
}
if(pp.length){
return pp.panel("panel").is(":visible");
}else{
return false;
}
};
$.fn.layout=function(_28,_29){
if(typeof _28=="string"){
switch(_28){
case "resize":
return this.each(function(){
_2(this);
});
case "panel":
return $.data(this[0],"layout").panels[_29];
case "collapse":
return this.each(function(){
_1b(this,_29);
});
case "expand":
return this.each(function(){
_21(this,_29);
});
}
}
return this.each(function(){
var _2a=$.data(this,"layout");
if(!_2a){
var _2b=$.extend({},{fit:$(this).attr("fit")=="true"});
$.data(this,"layout",{options:_2b,panels:_c(this)});
_25(this);
}
_2(this);
});
};
})(jQuery);

View File

@@ -0,0 +1,94 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"linkbutton").options;
$(_2).empty();
$(_2).addClass("l-btn");
if(_3.id){
$(_2).attr("id",_3.id);
}else{
$(_2).removeAttr("id");
}
if(_3.plain){
$(_2).addClass("l-btn-plain");
}else{
$(_2).removeClass("l-btn-plain");
}
if(_3.text){
$(_2).html(_3.text).wrapInner("<span class=\"l-btn-left\">"+"<span class=\"l-btn-text\">"+"</span>"+"</span>");
if(_3.iconCls){
$(_2).find(".l-btn-text").addClass(_3.iconCls).css("padding-left","20px");
}
}else{
$(_2).html("&nbsp;").wrapInner("<span class=\"l-btn-left\">"+"<span class=\"l-btn-text\">"+"<span class=\"l-btn-empty\"></span>"+"</span>"+"</span>");
if(_3.iconCls){
$(_2).find(".l-btn-empty").addClass(_3.iconCls);
}
}
_4(_2,_3.disabled);
};
function _4(_5,_6){
var _7=$.data(_5,"linkbutton");
if(_6){
_7.options.disabled=true;
var _8=$(_5).attr("href");
if(_8){
_7.href=_8;
$(_5).attr("href","javascript:void(0)");
}
var _9=$(_5).attr("onclick");
if(_9){
_7.onclick=_9;
$(_5).attr("onclick",null);
}
$(_5).addClass("l-btn-disabled");
}else{
_7.options.disabled=false;
if(_7.href){
$(_5).attr("href",_7.href);
}
if(_7.onclick){
_5.onclick=_7.onclick;
}
$(_5).removeClass("l-btn-disabled");
}
};
$.fn.linkbutton=function(_a){
if(typeof _a=="string"){
switch(_a){
case "options":
return $.data(this[0],"linkbutton").options;
case "enable":
return this.each(function(){
_4(this,false);
});
case "disable":
return this.each(function(){
_4(this,true);
});
}
}
_a=_a||{};
return this.each(function(){
var _b=$.data(this,"linkbutton");
if(_b){
$.extend(_b.options,_a);
}else{
var t=$(this);
$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,{id:t.attr("id"),disabled:(t.attr("disabled")?true:undefined),plain:(t.attr("plain")?t.attr("plain")=="true":undefined),text:$.trim(t.html()),iconCls:t.attr("icon")},_a)});
t.removeAttr("disabled");
}
_1(this);
});
};
$.fn.linkbutton.defaults={id:null,disabled:false,plain:false,text:"",iconCls:null};
})(jQuery);

View File

@@ -0,0 +1,200 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
$(_2).appendTo("body");
$(_2).addClass("menu-top");
var _3=[];
_4($(_2));
var _5=null;
for(var i=0;i<_3.length;i++){
var _6=_3[i];
_7(_6);
_6.find(">div.menu-item").each(function(){
_8($(this));
});
_6.find("div.menu-item").click(function(){
if(!this.submenu){
_16(_2);
var _9=$(this).attr("href");
if(_9){
location.href=_9;
}
}
});
_6.bind("mouseenter",function(){
if(_5){
clearTimeout(_5);
_5=null;
}
}).bind("mouseleave",function(){
_5=setTimeout(function(){
_16(_2);
},100);
});
}
function _4(_a){
_3.push(_a);
_a.find(">div").each(function(){
var _b=$(this);
var _c=_b.find(">div");
if(_c.length){
_c.insertAfter(_2);
_b[0].submenu=_c;
_4(_c);
}
});
};
function _8(_d){
_d.hover(function(){
_d.siblings().each(function(){
if(this.submenu){
_19(this.submenu);
}
$(this).removeClass("menu-active");
});
_d.addClass("menu-active");
var _e=_d[0].submenu;
if(_e){
var _f=_d.offset().left+_d.outerWidth()-2;
if(_f+_e.outerWidth()>$(window).width()){
_f=_d.offset().left-_e.outerWidth()+2;
}
_1d(_e,{left:_f,top:_d.offset().top-3});
}
},function(e){
_d.removeClass("menu-active");
var _10=_d[0].submenu;
if(_10){
if(e.pageX>=parseInt(_10.css("left"))){
_d.addClass("menu-active");
}else{
_19(_10);
}
}else{
_d.removeClass("menu-active");
}
});
_d.unbind(".menu").bind("mousedown.menu",function(){
return false;
});
};
function _7(_11){
_11.addClass("menu").find(">div").each(function(){
var _12=$(this);
if(_12.hasClass("menu-sep")){
_12.html("&nbsp;");
}else{
var _13=_12.addClass("menu-item").html();
_12.empty().append($("<div class=\"menu-text\"></div>").html(_13));
var _14=_12.attr("icon");
if(_14){
$("<div class=\"menu-icon\"></div>").addClass(_14).appendTo(_12);
}
if(_12[0].submenu){
$("<div class=\"menu-rightarrow\"></div>").appendTo(_12);
}
if($.boxModel==true){
var _15=_12.height();
_12.height(_15-(_12.outerHeight()-_12.height()));
}
}
});
_11.hide();
};
};
function _16(_17){
var _18=$.data(_17,"menu").options;
_19($(_17));
$(document).unbind(".menu");
_18.onHide.call(_17);
return false;
};
function _1a(_1b,pos){
var _1c=$.data(_1b,"menu").options;
if(pos){
_1c.left=pos.left;
_1c.top=pos.top;
}
_1d($(_1b),{left:_1c.left,top:_1c.top},function(){
$(document).unbind(".menu").bind("mousedown.menu",function(){
_16(_1b);
$(document).unbind(".menu");
return false;
});
_1c.onShow.call(_1b);
});
};
function _1d(_1e,pos,_1f){
if(!_1e){
return;
}
if(pos){
_1e.css(pos);
}
_1e.show(1,function(){
if(!_1e[0].shadow){
_1e[0].shadow=$("<div class=\"menu-shadow\"></div>").insertAfter(_1e);
}
_1e[0].shadow.css({display:"block",zIndex:$.fn.menu.defaults.zIndex++,left:_1e.css("left"),top:_1e.css("top"),width:_1e.outerWidth(),height:_1e.outerHeight()});
_1e.css("z-index",$.fn.menu.defaults.zIndex++);
if(_1f){
_1f();
}
});
};
function _19(_20){
if(!_20){
return;
}
_21(_20);
_20.find("div.menu-item").each(function(){
if(this.submenu){
_19(this.submenu);
}
$(this).removeClass("menu-active");
});
function _21(m){
if(m[0].shadow){
m[0].shadow.hide();
}
m.hide();
};
};
$.fn.menu=function(_22,_23){
if(typeof _22=="string"){
switch(_22){
case "show":
return this.each(function(){
_1a(this,_23);
});
case "hide":
return this.each(function(){
_16(this);
});
}
}
_22=_22||{};
return this.each(function(){
var _24=$.data(this,"menu");
if(_24){
$.extend(_24.options,_22);
}else{
_24=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,_22)});
_1(this);
}
$(this).css({left:_24.options.left,top:_24.options.top});
});
};
$.fn.menu.defaults={zIndex:110000,left:0,top:0,onShow:function(){
},onHide:function(){
}};
})(jQuery);

View File

@@ -0,0 +1,68 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"menubutton").options;
var _4=$(_2);
_4.removeClass("m-btn-active m-btn-plain-active");
_4.linkbutton(_3);
if(_3.menu){
$(_3.menu).menu({onShow:function(){
_4.addClass((_3.plain==true)?"m-btn-plain-active":"m-btn-active");
},onHide:function(){
_4.removeClass((_3.plain==true)?"m-btn-plain-active":"m-btn-active");
}});
}
_4.unbind(".menubutton");
if(_3.disabled==false&&_3.menu){
_4.bind("click.menubutton",function(){
_5();
return false;
});
var _6=null;
_4.bind("mouseenter.menubutton",function(){
_6=setTimeout(function(){
_5();
},_3.duration);
return false;
}).bind("mouseleave.menubutton",function(){
if(_6){
clearTimeout(_6);
}
});
}
function _5(){
var _7=_4.offset().left;
if(_7+$(_3.menu).outerWidth()+5>$(window).width()){
_7=$(window).width()-$(_3.menu).outerWidth()-5;
}
$(".menu-top").menu("hide");
$(_3.menu).menu("show",{left:_7,top:_4.offset().top+_4.outerHeight()});
_4.blur();
};
};
$.fn.menubutton=function(_8){
_8=_8||{};
return this.each(function(){
var _9=$.data(this,"menubutton");
if(_9){
$.extend(_9.options,_8);
}else{
var t=$(this);
$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,{disabled:(t.attr("disabled")?t.attr("disabled")=="true":undefined),plain:(t.attr("plain")?t.attr("plain")=="true":undefined),menu:t.attr("menu"),duration:t.attr("duration")},_8)});
$(this).removeAttr("disabled");
$(this).append("<span class=\"m-btn-downarrow\">&nbsp;</span>");
}
_1(this);
});
};
$.fn.menubutton.defaults={disabled:false,plain:true,menu:null,duration:100};
})(jQuery);

View File

@@ -0,0 +1,175 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(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,_d,_e){
var _f=$("<div class=\"messager-body\"></div>").appendTo("body");
_f.append(_d);
if(_e){
var tb=$("<div class=\"messager-button\"></div>").appendTo(_f);
for(var _10 in _e){
$("<a></a>").attr("href","javascript:void(0)").text(_10).css("margin-left",10).bind("click",eval(_e[_10])).appendTo(tb).linkbutton();
}
}
_f.window({title:_c,width:300,height:"auto",modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,onClose:function(){
setTimeout(function(){
_f.window("destroy");
},100);
}});
return _f;
};
$.messager={show:function(_11){
var _12=$.extend({showType:"slide",showSpeed:600,width:250,height:100,msg:"",title:"",timeout:4000},_11||{});
var win=$("<div class=\"messager-body\"></div>").html(_12.msg).appendTo("body");
win.window({title:_12.title,width:_12.width,height:_12.height,collapsible:false,minimizable:false,maximizable:false,shadow:false,draggable:false,resizable:false,closed:true,onBeforeOpen:function(){
_1(this,_12.showType,_12.showSpeed,_12.timeout);
return false;
},onBeforeClose:function(){
_7(this,_12.showType,_12.showSpeed);
return false;
}});
win.window("window").css({left:null,top:null,right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop});
win.window("open");
},alert:function(_13,msg,_14,fn){
var _15="<div>"+msg+"</div>";
switch(_14){
case "error":
_15="<div class=\"messager-icon messager-error\"></div>"+_15;
break;
case "info":
_15="<div class=\"messager-icon messager-info\"></div>"+_15;
break;
case "question":
_15="<div class=\"messager-icon messager-question\"></div>"+_15;
break;
case "warning":
_15="<div class=\"messager-icon messager-warning\"></div>"+_15;
break;
}
_15+="<div style=\"clear:both;\"/>";
var _16={};
_16[$.messager.defaults.ok]=function(){
win.dialog({closed:true});
if(fn){
fn();
return false;
}
};
_16[$.messager.defaults.ok]=function(){
win.window("close");
if(fn){
fn();
return false;
}
};
var win=_b(_13,_15,_16);
},confirm:function(_17,msg,fn){
var _18="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<div style=\"clear:both;\"/>";
var _19={};
_19[$.messager.defaults.ok]=function(){
win.window("close");
if(fn){
fn(true);
return false;
}
};
_19[$.messager.defaults.cancel]=function(){
win.window("close");
if(fn){
fn(false);
return false;
}
};
var win=_b(_17,_18,_19);
},prompt:function(_1a,msg,fn){
var _1b="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<br/>"+"<input class=\"messager-input\" type=\"text\"/>"+"<div style=\"clear:both;\"/>";
var _1c={};
_1c[$.messager.defaults.ok]=function(){
win.window("close");
if(fn){
fn($(".messager-input",win).val());
return false;
}
};
_1c[$.messager.defaults.cancel]=function(){
win.window("close");
if(fn){
fn();
return false;
}
};
var win=_b(_1a,_1b,_1c);
}};
$.messager.defaults={ok:"Ok",cancel:"Cancel"};
})(jQuery);

View File

@@ -0,0 +1,111 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"numberbox").options;
var _4=parseFloat($(_2).val()).toFixed(_3.precision);
if(isNaN(_4)){
$(_2).val("");
return;
}
if(_3.min!=null&&_3.min!=undefined&&_4<_3.min){
$(_2).val(_3.min.toFixed(_3.precision));
}else{
if(_3.max!=null&&_3.max!=undefined&&_4>_3.max){
$(_2).val(_3.max.toFixed(_3.precision));
}else{
$(_2).val(_4);
}
}
};
function _5(_6){
$(_6).unbind(".numberbox");
$(_6).bind("keypress.numberbox",function(e){
if(e.which==45){
return true;
}
if(e.which==46){
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;
}
}
}
}).bind("paste.numberbox",function(){
if(window.clipboardData){
var s=clipboardData.getData("text");
if(!/\D/.test(s)){
return true;
}else{
return false;
}
}else{
return false;
}
}).bind("dragenter.numberbox",function(){
return false;
}).bind("blur.numberbox",function(){
_1(_6);
});
};
function _7(_8){
if($.fn.validatebox){
var _9=$.data(_8,"numberbox").options;
$(_8).validatebox(_9);
}
};
function _a(_b,_c){
var _d=$.data(_b,"numberbox").options;
if(_c){
_d.disabled=true;
$(_b).attr("disabled",true);
}else{
_d.disabled=false;
$(_b).removeAttr("disabled");
}
};
$.fn.numberbox=function(_e){
if(typeof _e=="string"){
switch(_e){
case "disable":
return this.each(function(){
_a(this,true);
});
case "enable":
return this.each(function(){
_a(this,false);
});
}
}
_e=_e||{};
return this.each(function(){
var _f=$.data(this,"numberbox");
if(_f){
$.extend(_f.options,_e);
}else{
var t=$(this);
_f=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,{disabled:(t.attr("disabled")?true:undefined),min:(t.attr("min")=="0"?0:parseFloat(t.attr("min"))||undefined),max:(t.attr("max")=="0"?0:parseFloat(t.attr("max"))||undefined),precision:(parseInt(t.attr("precision"))||undefined)},_e)});
t.removeAttr("disabled");
$(this).css({imeMode:"disabled"});
}
_a(this,_f.options.disabled);
_5(this);
_7(this);
});
};
$.fn.numberbox.defaults={disabled:false,min:null,max:null,precision:0};
})(jQuery);

View File

@@ -0,0 +1,172 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"pagination").options;
var _4=$(_2).addClass("pagination").empty();
var t=$("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr></tr></table>").appendTo(_4);
var tr=$("tr",t);
if(_3.showPageList){
var ps=$("<select class=\"pagination-page-list\"></select>");
for(var i=0;i<_3.pageList.length;i++){
$("<option></option>").text(_3.pageList[i]).attr("selected",_3.pageList[i]==_3.pageSize?"selected":"").appendTo(ps);
}
$("<td></td>").append(ps).appendTo(tr);
_3.pageSize=parseInt(ps.val());
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
}
$("<td><a href=\"javascript:void(0)\" icon=\"pagination-first\"></a></td>").appendTo(tr);
$("<td><a href=\"javascript:void(0)\" icon=\"pagination-prev\"></a></td>").appendTo(tr);
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
$("<span style=\"padding-left:6px;\"></span>").html(_3.beforePageText).wrap("<td></td>").parent().appendTo(tr);
$("<td><input class=\"pagination-num\" type=\"text\" value=\"1\" size=\"2\"></td>").appendTo(tr);
$("<span style=\"padding-right:6px;\"></span>").wrap("<td></td>").parent().appendTo(tr);
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
$("<td><a href=\"javascript:void(0)\" icon=\"pagination-next\"></a></td>").appendTo(tr);
$("<td><a href=\"javascript:void(0)\" icon=\"pagination-last\"></a></td>").appendTo(tr);
if(_3.showRefresh){
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
$("<td><a href=\"javascript:void(0)\" icon=\"pagination-load\"></a></td>").appendTo(tr);
}
if(_3.buttons){
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
for(var i=0;i<_3.buttons.length;i++){
var _5=_3.buttons[i];
if(_5=="-"){
$("<td><div class=\"pagination-btn-separator\"></div></td>").appendTo(tr);
}else{
var td=$("<td></td>").appendTo(tr);
$("<a href=\"javascript:void(0)\"></a>").addClass("l-btn").css("float","left").text(_5.text||"").attr("icon",_5.iconCls||"").bind("click",eval(_5.handler||function(){
})).appendTo(td).linkbutton({plain:true});
}
}
}
$("<div class=\"pagination-info\"></div>").appendTo(_4);
$("<div style=\"clear:both;\"></div>").appendTo(_4);
$("a[icon^=pagination]",_4).linkbutton({plain:true});
_4.find("a[icon=pagination-first]").unbind(".pagination").bind("click.pagination",function(){
if(_3.pageNumber>1){
_a(_2,1);
}
});
_4.find("a[icon=pagination-prev]").unbind(".pagination").bind("click.pagination",function(){
if(_3.pageNumber>1){
_a(_2,_3.pageNumber-1);
}
});
_4.find("a[icon=pagination-next]").unbind(".pagination").bind("click.pagination",function(){
var _6=Math.ceil(_3.total/_3.pageSize);
if(_3.pageNumber<_6){
_a(_2,_3.pageNumber+1);
}
});
_4.find("a[icon=pagination-last]").unbind(".pagination").bind("click.pagination",function(){
var _7=Math.ceil(_3.total/_3.pageSize);
if(_3.pageNumber<_7){
_a(_2,_7);
}
});
_4.find("a[icon=pagination-load]").unbind(".pagination").bind("click.pagination",function(){
if(_3.onBeforeRefresh.call(_2,_3.pageNumber,_3.pageSize)!=false){
_a(_2,_3.pageNumber);
_3.onRefresh.call(_2,_3.pageNumber,_3.pageSize);
}
});
_4.find("input.pagination-num").unbind(".pagination").bind("keydown.pagination",function(e){
if(e.keyCode==13){
var _8=parseInt($(this).val())||1;
_a(_2,_8);
}
});
_4.find(".pagination-page-list").unbind(".pagination").bind("change.pagination",function(){
_3.pageSize=$(this).val();
_3.onChangePageSize.call(_2,_3.pageSize);
var _9=Math.ceil(_3.total/_3.pageSize);
_a(_2,_3.pageNumber);
});
};
function _a(_b,_c){
var _d=$.data(_b,"pagination").options;
var _e=Math.ceil(_d.total/_d.pageSize);
var _f=_c;
if(_c<1){
_f=1;
}
if(_c>_e){
_f=_e;
}
_d.onSelectPage.call(_b,_f,_d.pageSize);
_d.pageNumber=_f;
_10(_b);
};
function _10(_11){
var _12=$.data(_11,"pagination").options;
var _13=Math.ceil(_12.total/_12.pageSize);
var num=$(_11).find("input.pagination-num");
num.val(_12.pageNumber);
num.parent().next().find("span").html(_12.afterPageText.replace(/{pages}/,_13));
var _14=_12.displayMsg;
_14=_14.replace(/{from}/,_12.pageSize*(_12.pageNumber-1)+1);
_14=_14.replace(/{to}/,Math.min(_12.pageSize*(_12.pageNumber),_12.total));
_14=_14.replace(/{total}/,_12.total);
$(_11).find(".pagination-info").html(_14);
$("a[icon=pagination-first],a[icon=pagination-prev]",_11).linkbutton({disabled:(_12.pageNumber==1)});
$("a[icon=pagination-next],a[icon=pagination-last]",_11).linkbutton({disabled:(_12.pageNumber==_13)});
if(_12.loading){
$(_11).find("a[icon=pagination-load]").find(".pagination-load").addClass("pagination-loading");
}else{
$(_11).find("a[icon=pagination-load]").find(".pagination-load").removeClass("pagination-loading");
}
};
function _15(_16,_17){
var _18=$.data(_16,"pagination").options;
_18.loading=_17;
if(_18.loading){
$(_16).find("a[icon=pagination-load]").find(".pagination-load").addClass("pagination-loading");
}else{
$(_16).find("a[icon=pagination-load]").find(".pagination-load").removeClass("pagination-loading");
}
};
$.fn.pagination=function(_19){
if(typeof _19=="string"){
switch(_19){
case "options":
return $.data(this[0],"pagination").options;
case "loading":
return this.each(function(){
_15(this,true);
});
case "loaded":
return this.each(function(){
_15(this,false);
});
}
}
_19=_19||{};
return this.each(function(){
var _1a;
var _1b=$.data(this,"pagination");
if(_1b){
_1a=$.extend(_1b.options,_19);
}else{
_1a=$.extend({},$.fn.pagination.defaults,_19);
$.data(this,"pagination",{options:_1a});
}
_1(this);
_10(this);
});
};
$.fn.pagination.defaults={total:1,pageSize:10,pageNumber:1,pageList:[10,20,30,50],loading:false,buttons:null,showPageList:true,showRefresh:true,onSelectPage:function(_1c,_1d){
},onBeforeRefresh:function(_1e,_1f){
},onRefresh:function(_20,_21){
},onChangePageSize:function(_22){
},beforePageText:"Page",afterPageText:"of {pages}",displayMsg:"Displaying {from} to {to} of {total} items"};
})(jQuery);

View File

@@ -0,0 +1,456 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
_2.each(function(){
$(this).remove();
if($.browser.msie){
this.outerHTML="";
}
});
};
function _3(_4,_5){
var _6=$.data(_4,"panel").options;
var _7=$.data(_4,"panel").panel;
var _8=_7.find(">div.panel-header");
var _9=_7.find(">div.panel-body");
if(_5){
if(_5.width){
_6.width=_5.width;
}
if(_5.height){
_6.height=_5.height;
}
if(_5.left!=null){
_6.left=_5.left;
}
if(_5.top!=null){
_6.top=_5.top;
}
}
if(_6.fit==true){
var p=_7.parent();
_6.width=p.width();
_6.height=p.height();
}
_7.css({left:_6.left,top:_6.top});
_7.css(_6.style);
_7.addClass(_6.cls);
_8.addClass(_6.headerCls);
_9.addClass(_6.bodyCls);
if(!isNaN(_6.width)){
if($.boxModel==true){
_7.width(_6.width-(_7.outerWidth()-_7.width()));
_8.width(_7.width()-(_8.outerWidth()-_8.width()));
_9.width(_7.width()-(_9.outerWidth()-_9.width()));
}else{
_7.width(_6.width);
_8.width(_7.width());
_9.width(_7.width());
}
}else{
_7.width("auto");
_9.width("auto");
}
if(!isNaN(_6.height)){
if($.boxModel==true){
_7.height(_6.height-(_7.outerHeight()-_7.height()));
_9.height(_7.height()-_8.outerHeight()-(_9.outerHeight()-_9.height()));
}else{
_7.height(_6.height);
_9.height(_7.height()-_8.outerHeight());
}
}else{
_9.height("auto");
}
_7.css("height",null);
_6.onResize.apply(_4,[_6.width,_6.height]);
_7.find(">div.panel-body>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){
var _11=$(_10).addClass("panel-body").wrap("<div class=\"panel\"></div>").parent();
_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;
_1(_16.find(">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);
if(_15.closable){
$("<div class=\"panel-tool-close\"></div>").appendTo(_18).bind("click",_19);
}
if(_15.maximizable){
$("<div class=\"panel-tool-max\"></div>").appendTo(_18).bind("click",_1a);
}
if(_15.minimizable){
$("<div class=\"panel-tool-min\"></div>").appendTo(_18).bind("click",_1b);
}
if(_15.collapsible){
$("<div class=\"panel-tool-collapse\"></div>").appendTo(_18).bind("click",_1c);
}
if(_15.tools){
for(var i=_15.tools.length-1;i>=0;i--){
var t=$("<div></div>").addClass(_15.tools[i].iconCls).appendTo(_18);
if(_15.tools[i].handler){
t.bind("click",eval(_15.tools[i].handler));
}
}
}
_18.find("div").hover(function(){
$(this).addClass("panel-tool-over");
},function(){
$(this).removeClass("panel-tool-over");
});
_16.find(">div.panel-body").removeClass("panel-body-noheader");
}else{
_16.find(">div.panel-body").addClass("panel-body-noheader");
}
function _1c(){
if($(this).hasClass("panel-tool-expand")){
_38(_14,true);
}else{
_28(_14,true);
}
return false;
};
function _1b(){
_43(_14);
return false;
};
function _1a(){
if($(this).hasClass("panel-tool-restore")){
_47(_14);
}else{
_27(_14);
}
return false;
};
function _19(){
_1d(_14);
return false;
};
};
function _1e(_1f){
var _20=$.data(_1f,"panel");
if(_20.options.href&&(!_20.isLoaded||!_20.options.cache)){
_20.isLoaded=false;
var _21=_20.panel.find(">div.panel-body");
_21.html($("<div class=\"panel-loading\"></div>").html(_20.options.loadingMessage));
_21.load(_20.options.href,null,function(){
if($.parser){
$.parser.parse(_21);
}
_20.options.onLoad.apply(_1f,arguments);
_20.isLoaded=true;
});
}
};
function _22(_23,_24){
var _25=$.data(_23,"panel").options;
var _26=$.data(_23,"panel").panel;
if(_24!=true){
if(_25.onBeforeOpen.call(_23)==false){
return;
}
}
_26.show();
_25.closed=false;
_25.minimized=false;
_25.onOpen.call(_23);
if(_25.maximized==true){
_27(_23);
}
if(_25.collapsed==true){
_28(_23);
}
if(!_25.collapsed){
_1e(_23);
}
};
function _1d(_29,_2a){
var _2b=$.data(_29,"panel").options;
var _2c=$.data(_29,"panel").panel;
if(_2a!=true){
if(_2b.onBeforeClose.call(_29)==false){
return;
}
}
_2c.hide();
_2b.closed=true;
_2b.onClose.call(_29);
};
function _2d(_2e,_2f){
var _30=$.data(_2e,"panel").options;
var _31=$.data(_2e,"panel").panel;
if(_2f!=true){
if(_30.onBeforeDestroy.call(_2e)==false){
return;
}
}
_1(_31);
_30.onDestroy.call(_2e);
};
function _28(_32,_33){
var _34=$.data(_32,"panel").options;
var _35=$.data(_32,"panel").panel;
var _36=_35.find(">div.panel-body");
var _37=_35.find(">div.panel-header .panel-tool-collapse");
if(_37.hasClass("panel-tool-expand")){
return;
}
_36.stop(true,true);
if(_34.onBeforeCollapse.call(_32)==false){
return;
}
_37.addClass("panel-tool-expand");
if(_33==true){
_36.slideUp("normal",function(){
_34.collapsed=true;
_34.onCollapse.call(_32);
});
}else{
_36.hide();
_34.collapsed=true;
_34.onCollapse.call(_32);
}
};
function _38(_39,_3a){
var _3b=$.data(_39,"panel").options;
var _3c=$.data(_39,"panel").panel;
var _3d=_3c.find(">div.panel-body");
var _3e=_3c.find(">div.panel-header .panel-tool-collapse");
if(!_3e.hasClass("panel-tool-expand")){
return;
}
_3d.stop(true,true);
if(_3b.onBeforeExpand.call(_39)==false){
return;
}
_3e.removeClass("panel-tool-expand");
if(_3a==true){
_3d.slideDown("normal",function(){
_3b.collapsed=false;
_3b.onExpand.call(_39);
_1e(_39);
});
}else{
_3d.show();
_3b.collapsed=false;
_3b.onExpand.call(_39);
_1e(_39);
}
};
function _27(_3f){
var _40=$.data(_3f,"panel").options;
var _41=$.data(_3f,"panel").panel;
var _42=_41.find(">div.panel-header .panel-tool-max");
if(_42.hasClass("panel-tool-restore")){
return;
}
_42.addClass("panel-tool-restore");
$.data(_3f,"panel").original={width:_40.width,height:_40.height,left:_40.left,top:_40.top,fit:_40.fit};
_40.left=0;
_40.top=0;
_40.fit=true;
_3(_3f);
_40.minimized=false;
_40.maximized=true;
_40.onMaximize.call(_3f);
};
function _43(_44){
var _45=$.data(_44,"panel").options;
var _46=$.data(_44,"panel").panel;
_46.hide();
_45.minimized=true;
_45.maximized=false;
_45.onMinimize.call(_44);
};
function _47(_48){
var _49=$.data(_48,"panel").options;
var _4a=$.data(_48,"panel").panel;
var _4b=_4a.find(">div.panel-header .panel-tool-max");
if(!_4b.hasClass("panel-tool-restore")){
return;
}
_4a.show();
_4b.removeClass("panel-tool-restore");
var _4c=$.data(_48,"panel").original;
_49.width=_4c.width;
_49.height=_4c.height;
_49.left=_4c.left;
_49.top=_4c.top;
_49.fit=_4c.fit;
_3(_48);
_49.minimized=false;
_49.maximized=false;
_49.onRestore.call(_48);
};
function _4d(_4e){
var _4f=$.data(_4e,"panel").options;
var _50=$.data(_4e,"panel").panel;
if(_4f.border==true){
_50.find(">div.panel-header").removeClass("panel-header-noborder");
_50.find(">div.panel-body").removeClass("panel-body-noborder");
}else{
_50.find(">div.panel-header").addClass("panel-header-noborder");
_50.find(">div.panel-body").addClass("panel-body-noborder");
}
};
function _51(_52,_53){
$.data(_52,"panel").options.title=_53;
$(_52).panel("header").find("div.panel-title").html(_53);
};
$(window).unbind(".panel").bind("resize.panel",function(){
var _54=$("body.layout");
if(_54.length){
_54.layout("resize");
}else{
$("body>div.panel").triggerHandler("_resize");
}
});
$.fn.panel=function(_55,_56){
if(typeof _55=="string"){
switch(_55){
case "options":
return $.data(this[0],"panel").options;
case "panel":
return $.data(this[0],"panel").panel;
case "header":
return $.data(this[0],"panel").panel.find(">div.panel-header");
case "body":
return $.data(this[0],"panel").panel.find(">div.panel-body");
case "setTitle":
return this.each(function(){
_51(this,_56);
});
case "open":
return this.each(function(){
_22(this,_56);
});
case "close":
return this.each(function(){
_1d(this,_56);
});
case "destroy":
return this.each(function(){
_2d(this,_56);
});
case "refresh":
return this.each(function(){
$.data(this,"panel").isLoaded=false;
_1e(this);
});
case "resize":
return this.each(function(){
_3(this,_56);
});
case "move":
return this.each(function(){
_a(this,_56);
});
case "maximize":
return this.each(function(){
_27(this);
});
case "minimize":
return this.each(function(){
_43(this);
});
case "restore":
return this.each(function(){
_47(this);
});
case "collapse":
return this.each(function(){
_28(this,_56);
});
case "expand":
return this.each(function(){
_38(this,_56);
});
}
}
_55=_55||{};
return this.each(function(){
var _57=$.data(this,"panel");
var _58;
if(_57){
_58=$.extend(_57.options,_55);
}else{
var t=$(this);
_58=$.extend({},$.fn.panel.defaults,{width:(parseInt(t.css("width"))||undefined),height:(parseInt(t.css("height"))||undefined),left:(parseInt(t.css("left"))||undefined),top:(parseInt(t.css("top"))||undefined),title:t.attr("title"),iconCls:t.attr("icon"),cls:t.attr("cls"),headerCls:t.attr("headerCls"),bodyCls:t.attr("bodyCls"),href:t.attr("href"),cache:(t.attr("cache")?t.attr("cache")=="true":undefined),fit:(t.attr("fit")?t.attr("fit")=="true":undefined),border:(t.attr("border")?t.attr("border")=="true":undefined),noheader:(t.attr("noheader")?t.attr("noheader")=="true":undefined),collapsible:(t.attr("collapsible")?t.attr("collapsible")=="true":undefined),minimizable:(t.attr("minimizable")?t.attr("minimizable")=="true":undefined),maximizable:(t.attr("maximizable")?t.attr("maximizable")=="true":undefined),closable:(t.attr("closable")?t.attr("closable")=="true":undefined),collapsed:(t.attr("collapsed")?t.attr("collapsed")=="true":undefined),minimized:(t.attr("minimized")?t.attr("minimized")=="true":undefined),maximized:(t.attr("maximized")?t.attr("maximized")=="true":undefined),closed:(t.attr("closed")?t.attr("closed")=="true":undefined)},_55);
t.attr("title","");
_57=$.data(this,"panel",{options:_58,panel:_f(this),isLoaded:false});
}
if(_58.content){
$(this).html(_58.content);
if($.parser){
$.parser.parse(this);
}
}
_13(this);
_4d(this);
if(_58.doSize==true){
_57.panel.css("display","block");
_3(this);
}
if(_58.closed==true||_58.minimized==true){
_57.panel.hide();
}else{
_22(this);
}
});
};
$.fn.panel.defaults={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:[],href:null,loadingMessage:"Loading...",onLoad:function(){
},onBeforeOpen:function(){
},onOpen:function(){
},onBeforeClose:function(){
},onClose:function(){
},onBeforeDestroy:function(){
},onDestroy:function(){
},onResize:function(_59,_5a){
},onMove:function(_5b,top){
},onMaximize:function(){
},onRestore:function(){
},onMinimize:function(){
},onBeforeCollapse:function(){
},onBeforeExpand:function(){
},onCollapse:function(){
},onExpand:function(){
}};
})(jQuery);

View File

@@ -0,0 +1,36 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
$.parser={auto:true,plugins:["linkbutton","menu","menubutton","splitbutton","layout","tree","window","dialog","datagrid","combobox","combotree","numberbox","validatebox","calendar","datebox","panel","tabs","accordion"],parse:function(_1){
if($.parser.auto){
for(var i=0;i<$.parser.plugins.length;i++){
(function(){
var _2=$.parser.plugins[i];
var r=$(".easyui-"+_2,_1);
if(r.length){
if(r[_2]){
r[_2]();
}else{
if(window.easyloader){
easyloader.load(_2,function(){
r[_2]();
});
}
}
}
})();
}
}
}};
$(function(){
$.parser.parse();
});
})(jQuery);

View File

@@ -0,0 +1,142 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
$.fn.resizable=function(_1){
function _2(e){
var _3=e.data;
var _4=$.data(_3.target,"resizable").options;
if(_3.dir.indexOf("e")!=-1){
var _5=_3.startWidth+e.pageX-_3.startX;
_5=Math.min(Math.max(_5,_4.minWidth),_4.maxWidth);
_3.width=_5;
}
if(_3.dir.indexOf("s")!=-1){
var _6=_3.startHeight+e.pageY-_3.startY;
_6=Math.min(Math.max(_6,_4.minHeight),_4.maxHeight);
_3.height=_6;
}
if(_3.dir.indexOf("w")!=-1){
_3.width=_3.startWidth-e.pageX+_3.startX;
if(_3.width>=_4.minWidth&&_3.width<=_4.maxWidth){
_3.left=_3.startLeft+e.pageX-_3.startX;
}
}
if(_3.dir.indexOf("n")!=-1){
_3.height=_3.startHeight-e.pageY+_3.startY;
if(_3.height>=_4.minHeight&&_3.height<=_4.maxHeight){
_3.top=_3.startTop+e.pageY-_3.startY;
}
}
};
function _7(e){
var _8=e.data;
var _9=_8.target;
if($.boxModel==true){
$(_9).css({width:_8.width-_8.deltaWidth,height:_8.height-_8.deltaHeight,left:_8.left,top:_8.top});
}else{
$(_9).css({width:_8.width,height:_8.height,left:_8.left,top:_8.top});
}
};
function _a(e){
$.data(e.data.target,"resizable").options.onStartResize.call(e.data.target,e);
return false;
};
function _b(e){
_2(e);
if($.data(e.data.target,"resizable").options.onResize.call(e.data.target,e)!=false){
_7(e);
}
return false;
};
function _c(e){
_2(e,true);
_7(e);
$(document).unbind(".resizable");
$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e);
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,_1||{});
}
if(_d.disabled==true){
return;
}
$.data(this,"resizable",{options:_d});
var _f=this;
$(this).bind("mousemove.resizable",_10).bind("mousedown.resizable",_11);
function _10(e){
var dir=_12(e);
if(dir==""){
$(_f).css("cursor","default");
}else{
$(_f).css("cursor",dir+"-resize");
}
};
function _11(e){
var dir=_12(e);
if(dir==""){
return;
}
var _13={target:this,dir:dir,startLeft:_14("left"),startTop:_14("top"),left:_14("left"),top:_14("top"),startX:e.pageX,startY:e.pageY,startWidth:$(_f).outerWidth(),startHeight:$(_f).outerHeight(),width:$(_f).outerWidth(),height:$(_f).outerHeight(),deltaWidth:$(_f).outerWidth()-$(_f).width(),deltaHeight:$(_f).outerHeight()-$(_f).height()};
$(document).bind("mousedown.resizable",_13,_a);
$(document).bind("mousemove.resizable",_13,_b);
$(document).bind("mouseup.resizable",_13,_c);
};
function _12(e){
var dir="";
var _15=$(_f).offset();
var _16=$(_f).outerWidth();
var _17=$(_f).outerHeight();
var _18=_d.edge;
if(e.pageY>_15.top&&e.pageY<_15.top+_18){
dir+="n";
}else{
if(e.pageY<_15.top+_17&&e.pageY>_15.top+_17-_18){
dir+="s";
}
}
if(e.pageX>_15.left&&e.pageX<_15.left+_18){
dir+="w";
}else{
if(e.pageX<_15.left+_16&&e.pageX>_15.left+_16-_18){
dir+="e";
}
}
var _19=_d.handles.split(",");
for(var i=0;i<_19.length;i++){
var _1a=_19[i].replace(/(^\s*)|(\s*$)/g,"");
if(_1a=="all"||_1a==dir){
return dir;
}
}
return "";
};
function _14(css){
var val=parseInt($(_f).css(css));
if(isNaN(val)){
return 0;
}else{
return val;
}
};
});
};
$.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){
}};
})(jQuery);

View File

@@ -0,0 +1,69 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"splitbutton").options;
if(_3.menu){
$(_3.menu).menu({onShow:function(){
_4.addClass((_3.plain==true)?"s-btn-plain-active":"s-btn-active");
},onHide:function(){
_4.removeClass((_3.plain==true)?"s-btn-plain-active":"s-btn-active");
}});
}
var _4=$(_2);
_4.removeClass("s-btn-active s-btn-plain-active");
_4.linkbutton(_3);
var _5=_4.find(".s-btn-downarrow");
_5.unbind(".splitbutton");
if(_3.disabled==false&&_3.menu){
_5.bind("click.splitbutton",function(){
_6();
return false;
});
var _7=null;
_5.bind("mouseenter.splitbutton",function(){
_7=setTimeout(function(){
_6();
},_3.duration);
return false;
}).bind("mouseleave.splitbutton",function(){
if(_7){
clearTimeout(_7);
}
});
}
function _6(){
var _8=_4.offset().left;
if(_8+$(_3.menu).outerWidth()+5>$(window).width()){
_8=$(window).width()-$(_3.menu).outerWidth()-5;
}
$(".menu-top").menu("hide");
$(_3.menu).menu("show",{left:_8,top:_4.offset().top+_4.outerHeight()});
_4.blur();
};
};
$.fn.splitbutton=function(_9){
_9=_9||{};
return this.each(function(){
var _a=$.data(this,"splitbutton");
if(_a){
$.extend(_a.options,_9);
}else{
var t=$(this);
$.data(this,"splitbutton",{options:$.extend({},$.fn.splitbutton.defaults,{disabled:(t.attr("disabled")?t.attr("disabled")=="true":undefined),plain:(t.attr("plain")?t.attr("plain")=="true":undefined),menu:t.attr("menu"),duration:t.attr("duration")},_9)});
$(this).removeAttr("disabled");
$(this).append("<span class=\"s-btn-downarrow\">&nbsp;</span>");
}
_1(this);
});
};
$.fn.splitbutton.defaults={disabled:false,menu:null,plain:true,duration:100};
})(jQuery);

View File

@@ -0,0 +1,377 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$(">div.tabs-header",_2);
var _4=0;
$("ul.tabs li",_3).each(function(){
_4+=$(this).outerWidth(true);
});
var _5=$("div.tabs-wrap",_3).width();
var _6=parseInt($("ul.tabs",_3).css("padding-left"));
return _4-_5+_6;
};
function _7(_8){
var _9=$(">div.tabs-header",_8);
var _a=0;
$("ul.tabs li",_9).each(function(){
_a+=$(this).outerWidth(true);
});
if(_a>_9.width()){
$(".tabs-scroller-left",_9).css("display","block");
$(".tabs-scroller-right",_9).css("display","block");
$(".tabs-wrap",_9).addClass("tabs-scrolling");
if($.boxModel==true){
$(".tabs-wrap",_9).css("left",2);
}else{
$(".tabs-wrap",_9).css("left",0);
}
var _b=_9.width()-$(".tabs-scroller-left",_9).outerWidth()-$(".tabs-scroller-right",_9).outerWidth();
$(".tabs-wrap",_9).width(_b);
}else{
$(".tabs-scroller-left",_9).css("display","none");
$(".tabs-scroller-right",_9).css("display","none");
$(".tabs-wrap",_9).removeClass("tabs-scrolling").scrollLeft(0);
$(".tabs-wrap",_9).width(_9.width());
$(".tabs-wrap",_9).css("left",0);
}
};
function _c(_d){
var _e=$.data(_d,"tabs").options;
var cc=$(_d);
if(_e.fit==true){
var p=cc.parent();
_e.width=p.width();
_e.height=p.height();
}
cc.width(_e.width).height(_e.height);
var _f=$(">div.tabs-header",_d);
if($.boxModel==true){
_f.width(_e.width-(_f.outerWidth()-_f.width()));
}else{
_f.width(_e.width);
}
_7(_d);
var _10=$(">div.tabs-panels",_d);
var _11=_e.height;
if(!isNaN(_11)){
if($.boxModel==true){
var _12=_10.outerHeight()-_10.height();
_10.css("height",(_11-_f.outerHeight()-_12)||"auto");
}else{
_10.css("height",_11-_f.outerHeight());
}
}else{
_10.height("auto");
}
var _13=_e.width;
if(!isNaN(_13)){
if($.boxModel==true){
_10.width(_13-(_10.outerWidth()-_10.width()));
}else{
_10.width(_13);
}
}else{
_10.width("auto");
}
};
function _14(_15){
var _16=$.data(_15,"tabs").options;
var tab=_17(_15);
if(tab){
var _18=$(_15).find(">div.tabs-panels");
var _19=_16.width=="auto"?"auto":_18.width();
var _1a=_16.height=="auto"?"auto":_18.height();
tab.panel("resize",{width:_19,height:_1a});
}
};
function _1b(_1c){
var cc=$(_1c);
cc.addClass("tabs-container");
cc.wrapInner("<div class=\"tabs-panels\"/>");
$("<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(_1c);
var _1d=[];
var _1e=$(">div.tabs-header",_1c);
$(">div.tabs-panels>div",_1c).each(function(){
var pp=$(this);
_1d.push(pp);
_2b(_1c,pp);
});
$(".tabs-scroller-left, .tabs-scroller-right",_1e).hover(function(){
$(this).addClass("tabs-scroller-over");
},function(){
$(this).removeClass("tabs-scroller-over");
});
cc.bind("_resize",function(){
var _1f=$.data(_1c,"tabs").options;
if(_1f.fit==true){
_c(_1c);
_14(_1c);
}
return false;
});
return _1d;
};
function _20(_21){
var _22=$.data(_21,"tabs").options;
var _23=$(">div.tabs-header",_21);
var _24=$(">div.tabs-panels",_21);
if(_22.plain==true){
_23.addClass("tabs-header-plain");
}else{
_23.removeClass("tabs-header-plain");
}
if(_22.border==true){
_23.removeClass("tabs-header-noborder");
_24.removeClass("tabs-panels-noborder");
}else{
_23.addClass("tabs-header-noborder");
_24.addClass("tabs-panels-noborder");
}
$(".tabs-scroller-left",_23).unbind(".tabs").bind("click.tabs",function(){
var _25=$(".tabs-wrap",_23);
var pos=_25.scrollLeft()-_22.scrollIncrement;
_25.animate({scrollLeft:pos},_22.scrollDuration);
});
$(".tabs-scroller-right",_23).unbind(".tabs").bind("click.tabs",function(){
var _26=$(".tabs-wrap",_23);
var pos=Math.min(_26.scrollLeft()+_22.scrollIncrement,_1(_21));
_26.animate({scrollLeft:pos},_22.scrollDuration);
});
var _27=$.data(_21,"tabs").tabs;
for(var i=0,len=_27.length;i<len;i++){
var _28=_27[i];
var tab=_28.panel("options").tab;
var _29=_28.panel("options").title;
tab.unbind(".tabs").bind("click.tabs",{title:_29},function(e){
_39(_21,e.data.title);
});
tab.find("a.tabs-close").unbind(".tabs").bind("click.tabs",{title:_29},function(e){
_2a(_21,e.data.title);
return false;
});
}
};
function _2b(_2c,pp,_2d){
_2d=_2d||{};
pp.panel($.extend({},{selected:pp.attr("selected")=="true"},_2d,{border:false,noheader:true,closed:true,doSize:false,iconCls:(_2d.icon?_2d.icon:undefined),onLoad:function(){
$.data(_2c,"tabs").options.onLoad.call(_2c,pp);
}}));
var _2e=pp.panel("options");
var _2f=$(">div.tabs-header",_2c);
var _30=$("ul.tabs",_2f);
var tab=$("<li></li>").appendTo(_30);
var _31=$("<a href=\"javascript:void(0)\" class=\"tabs-inner\"></a>").appendTo(tab);
var _32=$("<span class=\"tabs-title\"></span>").html(_2e.title).appendTo(_31);
var _33=$("<span class=\"tabs-icon\"></span>").appendTo(_31);
if(_2e.closable){
_32.addClass("tabs-closable");
$("<a href=\"javascript:void(0)\" class=\"tabs-close\"></a>").appendTo(tab);
}
if(_2e.iconCls){
_32.addClass("tabs-with-icon");
_33.addClass(_2e.iconCls);
}
_2e.tab=tab;
};
function _34(_35,_36){
var _37=$.data(_35,"tabs").options;
var _38=$.data(_35,"tabs").tabs;
var pp=$("<div></div>").appendTo($(">div.tabs-panels",_35));
_38.push(pp);
_2b(_35,pp,_36);
_37.onAdd.call(_35,_36.title);
_7(_35);
_20(_35);
_39(_35,_36.title);
};
function _3a(_3b,_3c){
var pp=_3c.tab;
pp.panel($.extend({},_3c.options,{iconCls:(_3c.options.icon?_3c.options.icon:undefined)}));
var _3d=pp.panel("options");
var tab=_3d.tab;
tab.find("span.tabs-icon").attr("class","tabs-icon");
tab.find("a.tabs-close").remove();
tab.find("span.tabs-title").html(_3d.title);
if(_3d.closable){
tab.find("span.tabs-title").addClass("tabs-closable");
$("<a href=\"javascript:void(0)\" class=\"tabs-close\"></a>").appendTo(tab);
}else{
tab.find("span.tabs-title").removeClass("tabs-closable");
}
if(_3d.iconCls){
tab.find("span.tabs-title").addClass("tabs-with-icon");
tab.find("span.tabs-icon").addClass(_3d.iconCls);
}else{
tab.find("span.tabs-title").removeClass("tabs-with-icon");
}
_20(_3b);
$.data(_3b,"tabs").options.onUpdate.call(_3b,_3d.title);
};
function _2a(_3e,_3f){
var _40=$.data(_3e,"tabs").options;
var _41=$.data(_3e,"tabs").tabs;
var tab=_42(_3e,_3f,true);
if(!tab){
return;
}
if(_40.onBeforeClose.call(_3e,_3f)==false){
return;
}
tab.panel("options").tab.remove();
tab.panel("destroy");
_40.onClose.call(_3e,_3f);
_7(_3e);
var _43=_17(_3e);
if(_43){
_39(_3e,_43.panel("options").title);
}else{
if(_41.length){
_39(_3e,_41[0].panel("options").title);
}
}
};
function _42(_44,_45,_46){
var _47=$.data(_44,"tabs").tabs;
for(var i=0;i<_47.length;i++){
var tab=_47[i];
if(tab.panel("options").title==_45){
if(_46){
_47.splice(i,1);
}
return tab;
}
}
return null;
};
function _17(_48){
var _49=$.data(_48,"tabs").tabs;
for(var i=0;i<_49.length;i++){
var tab=_49[i];
if(tab.panel("options").closed==false){
return tab;
}
}
return null;
};
function _4a(_4b){
var _4c=$.data(_4b,"tabs").tabs;
for(var i=0;i<_4c.length;i++){
var tab=_4c[i];
if(tab.panel("options").selected){
_39(_4b,tab.panel("options").title);
return;
}
}
if(_4c.length){
_39(_4b,_4c[0].panel("options").title);
}
};
function _39(_4d,_4e){
var _4f=$.data(_4d,"tabs").options;
var _50=$.data(_4d,"tabs").tabs;
if(_50.length==0){
return;
}
var _51=_42(_4d,_4e);
if(!_51){
return;
}
var _52=_17(_4d);
if(_52){
_52.panel("close");
_52.panel("options").tab.removeClass("tabs-selected");
}
_51.panel("open");
var tab=_51.panel("options").tab;
tab.addClass("tabs-selected");
var _53=$(_4d).find(">div.tabs-header div.tabs-wrap");
var _54=tab.position().left+_53.scrollLeft();
var _55=_54-_53.scrollLeft();
var _56=_55+tab.outerWidth();
if(_55<0||_56>_53.innerWidth()){
var pos=Math.min(_54-(_53.width()-tab.width())/2,_1(_4d));
_53.animate({scrollLeft:pos},_4f.scrollDuration);
}else{
var pos=Math.min(_53.scrollLeft(),_1(_4d));
_53.animate({scrollLeft:pos},_4f.scrollDuration);
}
_14(_4d);
_4f.onSelect.call(_4d,_4e);
};
function _57(_58,_59){
return _42(_58,_59)!=null;
};
$.fn.tabs=function(_5a,_5b){
if(typeof _5a=="string"){
switch(_5a){
case "options":
return $.data(this[0],"tabs").options;
case "tabs":
return $.data(this[0],"tabs").tabs;
case "resize":
return this.each(function(){
_c(this);
_14(this);
});
case "add":
return this.each(function(){
_34(this,_5b);
});
case "close":
return this.each(function(){
_2a(this,_5b);
});
case "getTab":
return _42(this[0],_5b);
case "getSelected":
return _17(this[0]);
case "select":
return this.each(function(){
_39(this,_5b);
});
case "exists":
return _57(this[0],_5b);
case "update":
return this.each(function(){
_3a(this,_5b);
});
}
}
_5a=_5a||{};
return this.each(function(){
var _5c=$.data(this,"tabs");
var _5d;
if(_5c){
_5d=$.extend(_5c.options,_5a);
_5c.options=_5d;
}else{
var t=$(this);
_5d=$.extend({},$.fn.tabs.defaults,{width:(parseInt(t.css("width"))||undefined),height:(parseInt(t.css("height"))||undefined),fit:(t.attr("fit")?t.attr("fit")=="true":undefined),border:(t.attr("border")?t.attr("border")=="true":undefined),plain:(t.attr("plain")?t.attr("plain")=="true":undefined)},_5a);
var _5e=_1b(this);
_5c=$.data(this,"tabs",{options:_5d,tabs:_5e});
}
_20(this);
_c(this);
var _5f=this;
setTimeout(function(){
_4a(_5f);
},0);
});
};
$.fn.tabs.defaults={width:"auto",height:"auto",idSeed:0,plain:false,fit:false,border:true,scrollIncrement:100,scrollDuration:400,onLoad:function(_60){
},onSelect:function(_61){
},onBeforeClose:function(_62){
},onClose:function(_63){
},onAdd:function(_64){
},onUpdate:function(_65){
}};
})(jQuery);

View File

@@ -0,0 +1,613 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
var _3=$(_2);
_3.addClass("tree");
return _3;
};
function _4(_5){
var _6=[];
_7(_6,$(_5));
function _7(aa,_8){
_8.find(">li").each(function(){
var _9=$(this);
var _a={};
_a.text=_9.find(">span").html();
if(!_a.text){
_a.text=_9.html();
}
_a.id=_9.attr("id");
_a.iconCls=_9.attr("icon");
_a.checked=_9.attr("checked")=="true";
_a.state=_9.attr("state")||"open";
var _b=_9.find(">ul");
if(_b.length){
_a.children=[];
_7(_a.children,_b);
}
aa.push(_a);
});
};
return _6;
};
function _c(_d){
var _e=$.data(_d,"tree").options;
var _f=$.data(_d,"tree").tree;
$("div.tree-node",_f).unbind(".tree").bind("dblclick.tree",function(){
_86(_d,this);
_e.onDblClick.call(_d,_69(_d));
}).bind("click.tree",function(){
_86(_d,this);
_e.onClick.call(_d,_69(_d));
}).bind("mouseenter.tree",function(){
$(this).addClass("tree-node-hover");
return false;
}).bind("mouseleave.tree",function(){
$(this).removeClass("tree-node-hover");
return false;
});
$("span.tree-hit",_f).unbind(".tree").bind("click.tree",function(){
var _10=$(this).parent();
_44(_d,_10[0]);
return false;
}).bind("mouseenter.tree",function(){
if($(this).hasClass("tree-expanded")){
$(this).addClass("tree-expanded-hover");
}else{
$(this).addClass("tree-collapsed-hover");
}
}).bind("mouseleave.tree",function(){
if($(this).hasClass("tree-expanded")){
$(this).removeClass("tree-expanded-hover");
}else{
$(this).removeClass("tree-collapsed-hover");
}
});
$("span.tree-checkbox",_f).unbind(".tree").bind("click.tree",function(){
var _11=$(this).parent();
_12(_d,_11[0],!$(this).hasClass("tree-checkbox1"));
return false;
});
};
function _12(_13,_14,_15){
var _16=$.data(_13,"tree").options;
if(!_16.checkbox){
return;
}
var _17=$(_14);
var ck=_17.find(".tree-checkbox");
ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2");
if(_15){
ck.addClass("tree-checkbox1");
}else{
ck.addClass("tree-checkbox0");
}
_18(_17);
_19(_17);
function _19(_1a){
var _1b=_1a.next().find(".tree-checkbox");
_1b.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2");
if(_1a.find(".tree-checkbox").hasClass("tree-checkbox1")){
_1b.addClass("tree-checkbox1");
}else{
_1b.addClass("tree-checkbox0");
}
};
function _18(_1c){
var _1d=_51(_13,_1c[0]);
if(_1d){
var ck=$(_1d.target).find(".tree-checkbox");
ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2");
if(_1e(_1c)){
ck.addClass("tree-checkbox1");
}else{
if(_1f(_1c)){
ck.addClass("tree-checkbox0");
}else{
ck.addClass("tree-checkbox2");
}
}
_18($(_1d.target));
}
function _1e(n){
var ck=n.find(".tree-checkbox");
if(ck.hasClass("tree-checkbox0")||ck.hasClass("tree-checkbox2")){
return false;
}
var b=true;
n.parent().siblings().each(function(){
if(!$(this).find(">div.tree-node .tree-checkbox").hasClass("tree-checkbox1")){
b=false;
}
});
return b;
};
function _1f(n){
var ck=n.find(".tree-checkbox");
if(ck.hasClass("tree-checkbox1")||ck.hasClass("tree-checkbox2")){
return false;
}
var b=true;
n.parent().siblings().each(function(){
if(!$(this).find(">div.tree-node .tree-checkbox").hasClass("tree-checkbox0")){
b=false;
}
});
return b;
};
};
};
function _20(_21,ul,_22,_23){
var _24=$.data(_21,"tree").options;
if(!_23){
$(ul).empty();
}
var _25=$(ul).prev().find(">span.tree-indent,>span.tree-hit").length;
_26(ul,_22,_25);
_c(_21);
var _27=null;
if(_21!=ul){
var _28=$(ul).prev();
_27=$.extend({},$.data(_28[0],"tree-node"),{target:_28[0],checked:_28.find(".tree-checkbox").hasClass("tree-checkbox1")});
}
_24.onLoadSuccess.call(_21,_27,_22);
function _26(ul,_29,_2a){
for(var i=0;i<_29.length;i++){
var li=$("<li></li>").appendTo(ul);
var _2b=_29[i];
if(_2b.state!="open"&&_2b.state!="closed"){
_2b.state="open";
}
var _2c=$("<div class=\"tree-node\"></div>").appendTo(li);
_2c.attr("node-id",_2b.id);
$.data(_2c[0],"tree-node",{id:_2b.id,text:_2b.text,iconCls:_2b.iconCls,attributes:_2b.attributes});
$("<span class=\"tree-title\"></span>").html(_2b.text).appendTo(_2c);
if(_24.checkbox){
if(_2b.checked){
$("<span class=\"tree-checkbox tree-checkbox1\"></span>").prependTo(_2c);
}else{
$("<span class=\"tree-checkbox tree-checkbox0\"></span>").prependTo(_2c);
}
}
if(_2b.children&&_2b.children.length){
var _2d=$("<ul></ul>").appendTo(li);
if(_2b.state=="open"){
$("<span class=\"tree-icon tree-folder tree-folder-open\"></span>").addClass(_2b.iconCls).prependTo(_2c);
$("<span class=\"tree-hit tree-expanded\"></span>").prependTo(_2c);
}else{
$("<span class=\"tree-icon tree-folder\"></span>").addClass(_2b.iconCls).prependTo(_2c);
$("<span class=\"tree-hit tree-collapsed\"></span>").prependTo(_2c);
_2d.css("display","none");
}
_26(_2d,_2b.children,_2a+1);
}else{
if(_2b.state=="closed"){
$("<span class=\"tree-folder\"></span>").addClass(_2b.iconCls).prependTo(_2c);
$("<span class=\"tree-hit tree-collapsed\"></span>").prependTo(_2c);
}else{
$("<span class=\"tree-icon tree-file\"></span>").addClass(_2b.iconCls).prependTo(_2c);
$("<span class=\"tree-indent\"></span>").prependTo(_2c);
}
}
for(var j=0;j<_2a;j++){
$("<span class=\"tree-indent\"></span>").prependTo(_2c);
}
}
};
};
function _2e(_2f,ul,_30,_31){
var _32=$.data(_2f,"tree").options;
_30=_30||{};
var _33=null;
if(_2f!=ul){
var _34=$(ul).prev();
_33=$.extend({},$.data(_34[0],"tree-node"),{target:_34[0],checked:_34.find(".tree-checkbox").hasClass("tree-checkbox1")});
}
if(_32.onBeforeLoad.call(_2f,_33,_30)==false){
return;
}
if(!_32.url){
return;
}
var _35=$(ul).prev().find(">span.tree-folder");
_35.addClass("tree-loading");
$.ajax({type:"post",url:_32.url,data:_30,dataType:"json",success:function(_36){
_35.removeClass("tree-loading");
_20(_2f,ul,_36);
if(_31){
_31();
}
},error:function(){
_35.removeClass("tree-loading");
_32.onLoadError.apply(_2f,arguments);
if(_31){
_31();
}
}});
};
function _37(_38,_39){
var _3a=$.data(_38,"tree").options;
var _3b=$(_39);
var hit=_3b.find(">span.tree-hit");
if(hit.length==0){
return;
}
if(hit.hasClass("tree-expanded")){
return;
}
var _3c=$.extend({},$.data(_39,"tree-node"),{target:_39,checked:_3b.find(".tree-checkbox").hasClass("tree-checkbox1")});
if(_3a.onBeforeExpand.call(_38,_3c)==false){
return;
}
hit.removeClass("tree-collapsed tree-collapsed-hover").addClass("tree-expanded");
hit.next().addClass("tree-folder-open");
var ul=_3b.next();
if(ul.length){
if(_3a.animate){
ul.slideDown("normal",function(){
_3a.onExpand.call(_38,_3c);
});
}else{
ul.css("display","block");
_3a.onExpand.call(_38,_3c);
}
}else{
var _3d=$("<ul style=\"display:none\"></ul>").insertAfter(_3b);
_2e(_38,_3d[0],{id:_3c.id},function(){
if(_3a.animate){
_3d.slideDown("normal",function(){
_3a.onExpand.call(_38,_3c);
});
}else{
_3d.css("display","block");
_3a.onExpand.call(_38,_3c);
}
});
}
};
function _3e(_3f,_40){
var _41=$.data(_3f,"tree").options;
var _42=$(_40);
var hit=_42.find(">span.tree-hit");
if(hit.length==0){
return;
}
if(hit.hasClass("tree-collapsed")){
return;
}
var _43=$.extend({},$.data(_40,"tree-node"),{target:_40,checked:_42.find(".tree-checkbox").hasClass("tree-checkbox1")});
if(_41.onBeforeCollapse.call(_3f,_43)==false){
return;
}
hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed");
hit.next().removeClass("tree-folder-open");
if(_41.animate){
_42.next().slideUp("normal",function(){
_41.onCollapse.call(_3f,_43);
});
}else{
_42.next().css("display","none");
_41.onCollapse.call(_3f,_43);
}
};
function _44(_45,_46){
var hit=$(_46).find(">span.tree-hit");
if(hit.length==0){
return;
}
if(hit.hasClass("tree-expanded")){
_3e(_45,_46);
}else{
_37(_45,_46);
}
};
function _47(_48){
var _49=_4a(_48);
for(var i=0;i<_49.length;i++){
_37(_48,_49[i].target);
var _4b=_4c(_48,_49[i].target);
for(var j=0;j<_4b.length;j++){
_37(_48,_4b[j].target);
}
}
};
function _4d(_4e,_4f){
var _50=[];
var p=_51(_4e,_4f);
while(p){
_50.unshift(p);
p=_51(_4e,p.target);
}
for(var i=0;i<_50.length;i++){
_37(_4e,_50[i].target);
}
};
function _52(_53){
var _54=_4a(_53);
for(var i=0;i<_54.length;i++){
_3e(_53,_54[i].target);
var _55=_4c(_53,_54[i].target);
for(var j=0;j<_55.length;j++){
_3e(_53,_55[j].target);
}
}
};
function _56(_57){
var _58=_4a(_57);
if(_58.length){
return _58[0];
}else{
return null;
}
};
function _4a(_59){
var _5a=[];
$(_59).find(">li").each(function(){
var _5b=$(this).find(">div.tree-node");
_5a.push($.extend({},$.data(_5b[0],"tree-node"),{target:_5b[0],checked:_5b.find(".tree-checkbox").hasClass("tree-checkbox1")}));
});
return _5a;
};
function _4c(_5c,_5d){
var _5e=[];
if(_5d){
_5f($(_5d));
}else{
var _60=_4a(_5c);
for(var i=0;i<_60.length;i++){
_5e.push(_60[i]);
_5f($(_60[i].target));
}
}
function _5f(_61){
_61.next().find("div.tree-node").each(function(){
_5e.push($.extend({},$.data(this,"tree-node"),{target:this,checked:$(this).find(".tree-checkbox").hasClass("tree-checkbox1")}));
});
};
return _5e;
};
function _51(_62,_63){
var _64=$(_63).parent().parent().prev();
if(_64.length){
return $.extend({},$.data(_64[0],"tree-node"),{target:_64[0],checked:_64.find(".tree-checkbox").hasClass("tree-checkbox1")});
}else{
return null;
}
};
function _65(_66){
var _67=[];
$(_66).find(".tree-checkbox1").each(function(){
var _68=$(this).parent();
_67.push($.extend({},$.data(_68[0],"tree-node"),{target:_68[0],checked:_68.find(".tree-checkbox").hasClass("tree-checkbox1")}));
});
return _67;
};
function _69(_6a){
var _6b=$(_6a).find("div.tree-node-selected");
if(_6b.length){
return $.extend({},$.data(_6b[0],"tree-node"),{target:_6b[0],checked:_6b.find(".tree-checkbox").hasClass("tree-checkbox1")});
}else{
return null;
}
};
function _6c(_6d,_6e){
var _6f=$(_6e.parent);
var ul;
if(_6f.length==0){
ul=$(_6d);
}else{
ul=_6f.next();
if(ul.length==0){
ul=$("<ul></ul>").insertAfter(_6f);
}
}
if(_6e.data&&_6e.data.length){
var _70=_6f.find("span.tree-icon");
if(_70.hasClass("tree-file")){
_70.removeClass("tree-file").addClass("tree-folder");
var hit=$("<span class=\"tree-hit tree-expanded\"></span>").insertBefore(_70);
if(hit.prev().length){
hit.prev().remove();
}
}
}
_20(_6d,ul[0],_6e.data,true);
};
function _71(_72,_73){
var _74=$(_73);
var li=_74.parent();
var ul=li.parent();
li.remove();
if(ul.find(">li").length==0){
var _74=ul.prev();
_74.find(".tree-icon").removeClass("tree-folder").addClass("tree-file");
_74.find(".tree-hit").remove();
$("<span class=\"tree-indent\"></span>").prependTo(_74);
if(ul[0]!=_72){
ul.remove();
}
}
};
function _75(_76,_77){
function _78(aa,ul){
ul.find(">li").each(function(){
var _79=$(this).find(">div.tree-node");
var _7a=$.extend({},$.data(_79[0],"tree-node"),{target:_79[0],checked:_79.find(".tree-checkbox").hasClass("tree-checkbox1")});
if(!_7b(_76,_79[0])){
_7a.state=_79.find(".tree-hit").hasClass("tree-expanded")?"open":"closed";
}
var sub=$(this).find(">ul");
if(sub.length){
_7a.children=[];
_78(_7a.children,sub);
}
aa.push(_7a);
});
};
var _7c=$(_77);
var _7d=$.extend({},$.data(_77,"tree-node"),{target:_77,checked:_7c.find(".tree-checkbox").hasClass("tree-checkbox1"),children:[]});
_78(_7d.children,_7c.next());
_71(_76,_77);
return _7d;
};
function _7e(_7f,_80){
var _81=$(_80.target);
var _82=$.data(_80.target,"tree-node");
if(_82.iconCls){
_81.find(".tree-icon").removeClass(_82.iconCls);
}
$.extend(_82,_80);
$.data(_80.target,"tree-node",_82);
_81.attr("node-id",_82.id);
_81.find(".tree-title").html(_82.text);
if(_82.iconCls){
_81.find(".tree-icon").addClass(_82.iconCls);
}
var ck=_81.find(".tree-checkbox");
ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2");
if(_82.checked){
ck.addClass("tree-checkbox1");
}else{
ck.addClass("tree-checkbox0");
}
};
function _83(_84,id){
var _85=$(_84).find("div.tree-node[node-id="+id+"]");
if(_85.length){
return $.extend({},$.data(_85[0],"tree-node"),{target:_85[0],checked:_85.find(".tree-checkbox").hasClass("tree-checkbox1")});
}else{
return null;
}
};
function _86(_87,_88){
$("div.tree-node-selected",_87).removeClass("tree-node-selected");
$(_88).addClass("tree-node-selected");
};
function _7b(_89,_8a){
var _8b=$(_8a);
var hit=$(">span.tree-hit",_8b);
return hit.length==0;
};
$.fn.tree=function(_8c,_8d){
if(typeof _8c=="string"){
switch(_8c){
case "options":
return $.data(this[0],"tree").options;
case "loadData":
return this.each(function(){
_20(this,this,_8d);
});
case "reload":
return this.each(function(){
$(this).empty();
_2e(this,this);
});
case "getRoot":
return _56(this[0]);
case "getRoots":
return _4a(this[0]);
case "getParent":
return _51(this[0],_8d);
case "getChildren":
return _4c(this[0],_8d);
case "getChecked":
return _65(this[0]);
case "getSelected":
return _69(this[0]);
case "isLeaf":
return _7b(this[0],_8d);
case "find":
return _83(this[0],_8d);
case "select":
return this.each(function(){
_86(this,_8d);
});
case "check":
return this.each(function(){
_12(this,_8d,true);
});
case "uncheck":
return this.each(function(){
_12(this,_8d,false);
});
case "collapse":
return this.each(function(){
_3e(this,_8d);
});
case "expand":
return this.each(function(){
_37(this,_8d);
});
case "collapseAll":
return this.each(function(){
_52(this);
});
case "expandAll":
return this.each(function(){
_47(this);
});
case "expandTo":
return this.each(function(){
_4d(this,_8d);
});
case "toggle":
return this.each(function(){
_44(this,_8d);
});
case "append":
return this.each(function(){
_6c(this,_8d);
});
case "remove":
return this.each(function(){
_71(this,_8d);
});
case "pop":
return _75(this[0],_8d);
case "update":
return this.each(function(){
_7e(this,_8d);
});
}
}
var _8c=_8c||{};
return this.each(function(){
var _8e=$.data(this,"tree");
var _8f;
if(_8e){
_8f=$.extend(_8e.options,_8c);
_8e.options=_8f;
}else{
_8f=$.extend({},$.fn.tree.defaults,{url:$(this).attr("url"),checkbox:($(this).attr("checkbox")?$(this).attr("checkbox")=="true":undefined),animate:($(this).attr("animate")?$(this).attr("animate")=="true":undefined)},_8c);
$.data(this,"tree",{options:_8f,tree:_1(this)});
var _90=_4(this);
_20(this,this,_90);
}
if(_8f.data){
_20(this,this,_8f.data);
}
if(_8f.url){
_2e(this,this);
}
});
};
$.fn.tree.defaults={url:null,animate:false,checkbox:false,data:null,onBeforeLoad:function(_91,_92){
},onLoadSuccess:function(_93,_94){
},onLoadError:function(){
},onClick:function(_95){
},onDblClick:function(_96){
},onBeforeExpand:function(_97){
},onExpand:function(_98){
},onBeforeCollapse:function(_99){
},onCollapse:function(_9a){
}};
})(jQuery);

View File

@@ -0,0 +1,143 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2){
$(_2).addClass("validatebox-text");
};
function _3(_4){
var _5=$.data(_4,"validatebox").tip;
if(_5){
_5.remove();
}
$(_4).unbind(".validatebox");
$(_4).remove();
};
function _6(_7){
var _8=$(_7);
var _9=$.data(_7,"validatebox");
_9.validating=false;
_8.unbind(".validatebox").bind("focus.validatebox",function(){
_9.validating=true;
(function(){
if(_9.validating){
_11(_7);
setTimeout(arguments.callee,200);
}
})();
}).bind("blur.validatebox",function(){
_9.validating=false;
_a(_7);
}).bind("mouseenter.validatebox",function(){
if(_8.hasClass("validatebox-invalid")){
_b(_7);
}
}).bind("mouseleave.validatebox",function(){
_a(_7);
});
};
function _b(_c){
var _d=$(_c);
var _e=$.data(_c,"validatebox").message;
var _f=$.data(_c,"validatebox").tip;
if(!_f){
_f=$("<div class=\"validatebox-tip\">"+"<span class=\"validatebox-tip-content\">"+"</span>"+"<span class=\"validatebox-tip-pointer\">"+"</span>"+"</div>").appendTo("body");
$.data(_c,"validatebox").tip=_f;
}
_f.find(".validatebox-tip-content").html(_e);
_f.css({display:"block",left:_d.offset().left+_d.outerWidth(),top:_d.offset().top});
};
function _a(_10){
var tip=$.data(_10,"validatebox").tip;
if(tip){
tip.remove();
$.data(_10,"validatebox").tip=null;
}
};
function _11(_12){
var _13=$.data(_12,"validatebox").options;
var tip=$.data(_12,"validatebox").tip;
var box=$(_12);
var _14=box.val();
function _15(msg){
$.data(_12,"validatebox").message=msg;
};
var _16=box.attr("disabled");
if(_16==true||_16=="true"){
return true;
}
if(_13.required){
if(_14==""){
box.addClass("validatebox-invalid");
_15(_13.missingMessage);
_b(_12);
return false;
}
}
if(_13.validType){
var _17=/([a-zA-Z_]+)(.*)/.exec(_13.validType);
var _18=_13.rules[_17[1]];
if(_14&&_18){
var _19=eval(_17[2]);
if(!_18["validator"](_14,_19)){
box.addClass("validatebox-invalid");
var _1a=_18["message"];
if(_19){
for(var i=0;i<_19.length;i++){
_1a=_1a.replace(new RegExp("\\{"+i+"\\}","g"),_19[i]);
}
}
_15(_13.invalidMessage||_1a);
_b(_12);
return false;
}
}
}
box.removeClass("validatebox-invalid");
_a(_12);
return true;
};
$.fn.validatebox=function(_1b){
if(typeof _1b=="string"){
switch(_1b){
case "destroy":
return this.each(function(){
_3(this);
});
case "validate":
return this.each(function(){
_11(this);
});
case "isValid":
return _11(this[0]);
}
}
_1b=_1b||{};
return this.each(function(){
var _1c=$.data(this,"validatebox");
if(_1c){
$.extend(_1c.options,_1b);
}else{
_1(this);
var t=$(this);
_1c=$.data(this,"validatebox",{options:$.extend({},$.fn.validatebox.defaults,{required:(t.attr("required")?(t.attr("required")=="true"||t.attr("required")==true):undefined),validType:(t.attr("validType")||undefined),missingMessage:(t.attr("missingMessage")||undefined),invalidMessage:(t.attr("invalidMessage")||undefined)},_1b)});
}
_6(this);
});
};
$.fn.validatebox.defaults={required:false,validType:null,missingMessage:"This field is required.",invalidMessage:null,rules:{email:{validator:function(_1d){
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(_1d);
},message:"Please enter a valid email address."},url:{validator:function(_1e){
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(_1e);
},message:"Please enter a valid URL."},length:{validator:function(_1f,_20){
var len=$.trim(_1f).length;
return len>=_20[0]&&len<=_20[1];
},message:"Please enter a value between {0} and {1}."}}};
})(jQuery);

View File

@@ -0,0 +1,268 @@
/**
* jQuery EasyUI 1.1.2
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010 stworthy [ stworthy@gmail.com ]
*
*/
(function($){
function _1(_2,_3){
$(_2).panel("resize");
};
function _4(_5,_6){
var _7=$.data(_5,"window");
var _8;
if(_7){
_8=$.extend(_7.opts,_6);
}else{
var t=$(_5);
_8=$.extend({},$.fn.window.defaults,{title:t.attr("title"),collapsible:(t.attr("collapsible")?t.attr("collapsible")=="true":undefined),minimizable:(t.attr("minimizable")?t.attr("minimizable")=="true":undefined),maximizable:(t.attr("maximizable")?t.attr("maximizable")=="true":undefined),closable:(t.attr("closable")?t.attr("closable")=="true":undefined),closed:(t.attr("closed")?t.attr("closed")=="true":undefined),shadow:(t.attr("shadow")?t.attr("shadow")=="true":undefined),modal:(t.attr("modal")?t.attr("modal")=="true":undefined)},_6);
$(_5).attr("title","");
_7=$.data(_5,"window",{});
}
var _9=$(_5).panel($.extend({},_8,{border:false,doSize:true,closed:true,cls:"window",headerCls:"window-header",bodyCls:"window-body",onBeforeDestroy:function(){
if(_8.onBeforeDestroy){
if(_8.onBeforeDestroy.call(_5)==false){
return false;
}
}
var _a=$.data(_5,"window");
if(_a.shadow){
_a.shadow.remove();
}
if(_a.mask){
_a.mask.remove();
}
},onClose:function(){
var _b=$.data(_5,"window");
if(_b.shadow){
_b.shadow.hide();
}
if(_b.mask){
_b.mask.hide();
}
if(_8.onClose){
_8.onClose.call(_5);
}
},onOpen:function(){
var _c=$.data(_5,"window");
if(_c.mask){
_c.mask.css({display:"block",zIndex:$.fn.window.defaults.zIndex++});
}
if(_c.shadow){
_c.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:_c.options.left,top:_c.options.top,width:_c.window.outerWidth(),height:_c.window.outerHeight()});
}
_c.window.css("z-index",$.fn.window.defaults.zIndex++);
if(_8.onOpen){
_8.onOpen.call(_5);
}
},onResize:function(_d,_e){
var _f=$.data(_5,"window");
if(_f.shadow){
_f.shadow.css({left:_f.options.left,top:_f.options.top,width:_f.window.outerWidth(),height:_f.window.outerHeight()});
}
if(_8.onResize){
_8.onResize.call(_5,_d,_e);
}
},onMove:function(_10,top){
var _11=$.data(_5,"window");
if(_11.shadow){
_11.shadow.css({left:_11.options.left,top:_11.options.top});
}
if(_8.onMove){
_8.onMove.call(_5,_10,top);
}
},onMinimize:function(){
var _12=$.data(_5,"window");
if(_12.shadow){
_12.shadow.hide();
}
if(_12.mask){
_12.mask.hide();
}
if(_8.onMinimize){
_8.onMinimize.call(_5);
}
},onBeforeCollapse:function(){
if(_8.onBeforeCollapse){
if(_8.onBeforeCollapse.call(_5)==false){
return false;
}
}
var _13=$.data(_5,"window");
if(_13.shadow){
_13.shadow.hide();
}
},onExpand:function(){
var _14=$.data(_5,"window");
if(_14.shadow){
_14.shadow.show();
}
if(_8.onExpand){
_8.onExpand.call(_5);
}
}}));
_7.options=_9.panel("options");
_7.opts=_8;
_7.window=_9.panel("panel");
if(_7.mask){
_7.mask.remove();
}
if(_8.modal==true){
_7.mask=$("<div class=\"window-mask\"></div>").appendTo("body");
_7.mask.css({width:_15().width,height:_15().height,display:"none"});
}
if(_7.shadow){
_7.shadow.remove();
}
if(_8.shadow==true){
_7.shadow=$("<div class=\"window-shadow\"></div>").insertAfter(_7.window);
_7.shadow.css({display:"none"});
}
if(_7.options.left==null){
var _16=_7.options.width;
if(isNaN(_16)){
_16=_7.window.outerWidth();
}
_7.options.left=($(window).width()-_16)/2+$(document).scrollLeft();
}
if(_7.options.top==null){
var _17=_7.window.height;
if(isNaN(_17)){
_17=_7.window.outerHeight();
}
_7.options.top=($(window).height()-_17)/2+$(document).scrollTop();
}
_9.window("move");
if(_7.opts.closed==false){
_9.window("open");
}
};
function _18(_19){
var _1a=$.data(_19,"window");
_1a.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_1a.options.draggable==false,onStartDrag:function(e){
if(_1a.mask){
_1a.mask.css("z-index",$.fn.window.defaults.zIndex++);
}
if(_1a.shadow){
_1a.shadow.css("z-index",$.fn.window.defaults.zIndex++);
}
_1a.window.css("z-index",$.fn.window.defaults.zIndex++);
if(!_1a.proxy){
_1a.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_1a.window);
}
_1a.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:($.boxModel==true?(_1a.window.outerWidth()-(_1a.proxy.outerWidth()-_1a.proxy.width())):_1a.window.outerWidth()),height:($.boxModel==true?(_1a.window.outerHeight()-(_1a.proxy.outerHeight()-_1a.proxy.height())):_1a.window.outerHeight())});
setTimeout(function(){
if(_1a.proxy){
_1a.proxy.show();
}
},500);
},onDrag:function(e){
_1a.proxy.css({display:"block",left:e.data.left,top:e.data.top});
return false;
},onStopDrag:function(e){
_1a.options.left=e.data.left;
_1a.options.top=e.data.top;
$(_19).window("move");
_1a.proxy.remove();
_1a.proxy=null;
}});
_1a.window.resizable({disabled:_1a.options.resizable==false,onStartResize:function(e){
if(!_1a.proxy){
_1a.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_1a.window);
}
_1a.proxy.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:($.boxModel==true?(e.data.width-(_1a.proxy.outerWidth()-_1a.proxy.width())):e.data.width),height:($.boxModel==true?(e.data.height-(_1a.proxy.outerHeight()-_1a.proxy.height())):e.data.height)});
},onResize:function(e){
_1a.proxy.css({left:e.data.left,top:e.data.top,width:($.boxModel==true?(e.data.width-(_1a.proxy.outerWidth()-_1a.proxy.width())):e.data.width),height:($.boxModel==true?(e.data.height-(_1a.proxy.outerHeight()-_1a.proxy.height())):e.data.height)});
return false;
},onStopResize:function(e){
_1a.options.left=e.data.left;
_1a.options.top=e.data.top;
_1a.options.width=e.data.width;
_1a.options.height=e.data.height;
_1(_19);
_1a.proxy.remove();
_1a.proxy=null;
}});
};
function _15(){
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(){
$(".window-mask").css({width:$(window).width(),height:$(window).height()});
setTimeout(function(){
$(".window-mask").css({width:_15().width,height:_15().height});
},50);
});
$.fn.window=function(_1b,_1c){
if(typeof _1b=="string"){
switch(_1b){
case "options":
return $.data(this[0],"window").options;
case "window":
return $.data(this[0],"window").window;
case "setTitle":
return this.each(function(){
$(this).panel("setTitle",_1c);
});
case "open":
return this.each(function(){
$(this).panel("open",_1c);
});
case "close":
return this.each(function(){
$(this).panel("close",_1c);
});
case "destroy":
return this.each(function(){
$(this).panel("destroy",_1c);
});
case "refresh":
return this.each(function(){
$(this).panel("refresh");
});
case "resize":
return this.each(function(){
$(this).panel("resize",_1c);
});
case "move":
return this.each(function(){
$(this).panel("move",_1c);
});
case "maximize":
return this.each(function(){
$(this).panel("maximize");
});
case "minimize":
return this.each(function(){
$(this).panel("minimize");
});
case "restore":
return this.each(function(){
$(this).panel("restore");
});
case "collapse":
return this.each(function(){
$(this).panel("collapse",_1c);
});
case "expand":
return this.each(function(){
$(this).panel("expand",_1c);
});
}
}
_1b=_1b||{};
return this.each(function(){
_4(this,_1b);
_18(this);
});
};
$.fn.window.defaults={zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false};
})(jQuery);