if(typeof(ligeruimanagers)=="undefined")ligeruimanagers={};(function($) {$.fn.ligergetaccordionmanager=function() {return ligeruimanagers[this[0].id+"_accordion"];};$.fn.ligerremoveaccordionmanager=function() {return this.each(function() {ligeruimanagers[this.id+"_accordion"]=null;});};$.fn.ligeraccordion=function(p) {this.each(function() {p=$.extend({height:null,speed:"normal",changeheightonresize:false,heightdiff:0},p||{});if(this.usedaccordion)return;var g={onresize:function() {if(!p.height||typeof(p.height)!='string'||p.height.indexof('%')==-1)return false;if(g.accordion.parent()[0].tagname.tolowercase()=="body") {var windowheight=$(window).height();windowheight-=parseint(g.layout.parent().css('paddingtop'));windowheight-=parseint(g.layout.parent().css('paddingbottom'));g.height=p.heightdiff+windowheight*parsefloat(g.height)*0.01;} else {g.height=p.heightdiff+(g.accordion.parent().height()*parsefloat(p.height)*0.01);} g.accordion.height(g.height);g.setcontentheight(g.height-g.headerholdheight);},setheight:function(height) {g.accordion.height(height);height-=g.headerholdheight;$("> .l-accordion-content",g.accordion).height(height);}};g.accordion=$(this);if(!g.accordion.hasclass("l-accordion-panel"))g.accordion.addclass("l-accordion-panel");var selectedindex=0;if($("> div[lselected=true]",g.accordion).length>0) selectedindex=$("> div",g.accordion).index($("> div[lselected=true]",g.accordion));$("> div",g.accordion).each(function(i,box) {var header=$('
');if(i==selectedindex) $(".l-accordion-toggle",header).addclass("l-accordion-toggle-open");if($(box).attr("title")) {var iconbox="";if($(box).attr("iconcss")) {iconbox='';} $(".l-accordion-header-inner",header).html(iconbox+$(box).attr("title"));$(box).attr("title","");} $(box).before(header);if(!$(box).hasclass("l-accordion-content"))$(box).addclass("l-accordion-content");});$(".l-accordion-toggle",g.accordion).each(function() {if(!$(this).hasclass("l-accordion-toggle-open")&&!$(this).hasclass("l-accordion-toggle-close")) {$(this).addclass("l-accordion-toggle-close");} if($(this).hasclass("l-accordion-toggle-close")) {$(this).parent().next(".l-accordion-content:visible").hide();}});$(".l-accordion-header",g.accordion).hover(function() {$(this).addclass("l-accordion-header-over");},function() {$(this).removeclass("l-accordion-header-over");});$(".l-accordion-toggle",g.accordion).hover(function() {if($(this).hasclass("l-accordion-toggle-open")) $(this).addclass("l-accordion-toggle-open-over");else if($(this).hasclass("l-accordion-toggle-close")) $(this).addclass("l-accordion-toggle-close-over");},function() {if($(this).hasclass("l-accordion-toggle-open")) $(this).removeclass("l-accordion-toggle-open-over");else if($(this).hasclass("l-accordion-toggle-close")) $(this).removeclass("l-accordion-toggle-close-over");});$(">.l-accordion-header",g.accordion).click(function() {var togglebtn=$(".l-accordion-toggle:first",this);if(togglebtn.hasclass("l-accordion-toggle-close")) {togglebtn.removeclass("l-accordion-toggle-close").removeclass("l-accordion-toggle-close-over l-accordion-toggle-open-over") togglebtn.addclass("l-accordion-toggle-open");$(this).next(".l-accordion-content").show(p.speed).siblings(".l-accordion-content:visible").hide(p.speed);$(this).siblings(".l-accordion-header").find(".l-accordion-toggle").removeclass("l-accordion-toggle-open").addclass("l-accordion-toggle-close");} else {togglebtn.removeclass("l-accordion-toggle-open").removeclass("l-accordion-toggle-close-over l-accordion-toggle-open-over").addclass("l-accordion-toggle-close");$(this).next(".l-accordion-content").hide(p.speed);}});g.headerholdheight=0;$("> .l-accordion-header",g.accordion).each(function() {g.headerholdheight+=$(this).height();});if(p.height&&typeof(p.height)=='string'&&p.height.indexof('%')>0) {g.onresize();if(p.changeheightonresize) {$(window).resize(function() {g.onresize();});}} else {if(p.height) {g.height=p.heightdiff+p.height;g.accordion.height(g.height);g.setheight(p.height);} else {g.header=g.accordion.height();}} if(this.id==undefined)this.id="ligerui_"+new date().gettime();ligeruimanagers[this.id+"_accordion"]=g;this.usedaccordion=true;});if(this.length==0)return null;if(this.length==1)return ligeruimanagers[this[0].id+"_accordion"];var managers=[];this.each(function(){managers.push(ligeruimanagers[this.id+"_accordion"]);});return managers;};})(jquery);var ligerdialogimagepath="../../scripts/ui/skins/aqua/images/dialog/";(function($){$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.dialog={cls:null,id:null,buttons:null,isdrag:true,width:280,height:null,content:'',target:null,url:null,load:false,type:'warn',left:null,top:null,modal:true,name:null,isresize:false,allowclose:true,opener:null,timeparmname:null};$.ligerdefaults.dialogstring={titlemessage:'提示',waittingmessage:'正在等待中,请稍候...'};$.ligerdialog={};$.ligerdialog.open=function(p){p=$.extend({},$.ligerdefaults.dialog,$.ligerdefaults.dialogstring,p||{});var g={applywindowmask:function(){$(".l-window-mask").remove();$("
").height($(window).height()+$(window).scrolltop()).appendto('body');},removewindowmask:function(){$(".l-window-mask").remove();},applydrag:function(){if($.fn.ligerdrag) g.dialog.ligerdrag({handler:'.l-dialog-title'});},applyresize:function(){if($.fn.ligerresizable) {g.dialog.ligerresizable({onstopresize:function(current,e) {var top=0;var left=0;if(!isnan(parseint(g.dialog.css('top')))) top=parseint(g.dialog.css('top'));if(!isnan(parseint(g.dialog.css('left')))) left=parseint(g.dialog.css('left'));if(current.difftop!=undefined) {g.dialog.css({top:top+current.difftop,left:left+current.diffleft});g.dialog.body.css({width:current.newwidth-26});$(".l-dialog-content",g.dialog.body).height(current.newheight-46-$(".l-dialog-buttons",g.dialog).height());} return false;}});}},setimage:function(){if(p.type){if(p.type=='success'||p.type=='donne'||p.type=='ok'){$(".l-dialog-image",g.dialog).addclass("l-dialog-image-donne").show();$(".l-dialog-content",g.dialog).css({paddingleft:64,paddingbottom:30});} else if(p.type=='error'){$(".l-dialog-image",g.dialog).addclass("l-dialog-image-error").show();$(".l-dialog-content",g.dialog).css({paddingleft:64,paddingbottom:30});} else if(p.type=='warn'){$(".l-dialog-image",g.dialog).addclass("l-dialog-image-warn").show();$(".l-dialog-content",g.dialog).css({paddingleft:64,paddingbottom:30});} else if(p.type=='question'){$(".l-dialog-image",g.dialog).addclass("l-dialog-image-question").show();$(".l-dialog-content",g.dialog).css({paddingleft:64,paddingbottom:20});}}}};g.dialog=$('
');$('body').append(g.dialog);g.dialog.body=$(".l-dialog-body:first",g.dialog);g.dialog.close=function(){if(g.dialog.frame) {$(g.dialog.frame.document).ready(function(){g.removewindowmask();g.dialog.remove();});} else {g.removewindowmask();g.dialog.remove();}};g.dialog.doshow=function(){g.dialog.show();};if(p.allowclose==false)$(".l-dialog-close",g.dialog).remove();if(p.target||p.url||p.type=="none")p.type=null;if(p.cls)g.dialog.addclass(p.cls);if(p.id)g.dialog.attr("id",p.id);if(p.modal) g.applywindowmask();if(p.isdrag) g.applydrag();if(p.isresize) g.applyresize();if(p.type) g.setimage();else{$(".l-dialog-image",g.dialog).remove();$(".l-dialog-content",g.dialog.body).addclass("l-dialog-content-noimage");} if(p.target){$(".l-dialog-content",g.dialog.body).prepend(p.target);} else if(p.url){if(p.timeparmname) {p.url+=p.url.indexof('?')==-1?"?":"&";p.url+=p.timeparmname+"="+new date().gettime();} var iframe=$("");var framename=p.name?p.name:"ligerwindow"+new date().gettime();iframe.attr("name",framename);$(".l-dialog-content",g.dialog.body).prepend(iframe);$(".l-dialog-content",g.dialog.body).addclass("l-dialog-content-nopadding");settimeout(function(){iframe.attr("src",p.url);g.dialog.frame=window.frames[iframe.attr("name")];},0);} else if(p.content){$(".l-dialog-content",g.dialog.body).html(p.content);} if(p.opener)g.dialog.opener=p.opener;if(p.buttons){$(p.buttons).each(function(i,item){var btn=$('
');$(".l-dialog-btn-inner",btn).html(item.text);$(".l-dialog-buttons-inner",g.dialog.body).prepend(btn);item.width&&btn.width(item.width);item.onclick&&btn.click(function(){item.onclick(item,g.dialog,i)});});}else{$(".l-dialog-buttons",g.dialog).remove();} $(".l-dialog-buttons-inner",g.dialog).append("
");p.width&&g.dialog.body.width(p.width-26);if(p.height) {$(".l-dialog-content",g.dialog.body).height(p.height-46-$(".l-dialog-buttons",g.dialog).height());} p.title=p.title||p.titlemessage;p.title&&$(".l-dialog-title",g.dialog).html(p.title);$(".l-dialog-title",g.dialog).bind("selectstart",function(){return false;});$(".l-dialog-btn",g.dialog.body).hover(function(){$(this).addclass("l-dialog-btn-over");},function(){$(this).removeclass("l-dialog-btn-over");});$(".l-dialog-tc .l-dialog-close",g.dialog).hover(function(){$(this).addclass("l-dialog-close-over");},function(){$(this).removeclass("l-dialog-close-over");}).click(function(){g.dialog.close();});var ie55=(navigator.appname=="microsoft internet explorer"&&parseint(navigator.appversion)==4&&navigator.appversion.indexof("msie 5.5")!=-1);var ie6=(navigator.appname=="microsoft internet explorer"&&parseint(navigator.appversion)==4&&navigator.appversion.indexof("msie 6.0")!=-1);if($.browser.msie&&(ie55||ie6)){$(".l-dialog-tl:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"dialog-tl.png',sizingmethod='crop');"});$(".l-dialog-tc:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"ie6/dialog-tc.png',sizingmethod='crop');"});$(".l-dialog-tr:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"dialog-tr.png',sizingmethod='crop');"});$(".l-dialog-cl:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"ie6/dialog-cl.png',sizingmethod='crop');"});$(".l-dialog-cr:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"ie6/dialog-cr.png',sizingmethod='crop');"});$(".l-dialog-bl:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"dialog-bl.png',sizingmethod='crop');"});$(".l-dialog-bc:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"ie6/dialog-bc.png',sizingmethod='crop');"});$(".l-dialog-br:first",g.dialog).css({"background":"none","filter":"progid:dximagetransform.microsoft.alphaimageloader(src='"+ligerdialogimagepath+"dialog-br.png',sizingmethod='crop');"});} var left=0;var top=0;var width=p.width||g.dialog.width();if(p.left!=null)left=p.left;else left=0.5*($(window).width()-width);if(p.top!=null)top=p.top;else top=0.5*($(window).height()-g.dialog.height())+$(window).scrolltop()-10;g.dialog.css({left:left,top:top});g.dialog.doshow();return g.dialog;};$.ligerdialog.close=function() {$(".l-dialog,.l-window-mask").remove();};$.ligerdialog.alert=function(content,title,type,callback){content=content||"";if(typeof(title)=="function"){callback=title;type=null;} else if(typeof(type)=="function"){callback=type;} var btnclick=function(item,dialog,index){dialog.close();if(callback) callback(item,dialog,index);};p={content:content,buttons:[{text:'确定',onclick:btnclick}]};if(typeof(title)=="string"&&title!="")p.title=title;if(typeof(type)=="string"&&type!="")p.type=type;$.ligerdialog.open(p);};$.ligerdialog.confirm=function(content,title,callback){if(typeof(title)=="function"){callback=title;type=null;} var btnclick=function(item,dialog){dialog.close();if(callback){callback(item.type=='ok');}};p={type:'question',content:content,buttons:[{text:'是',onclick:btnclick,type:'ok'},{text:'否',onclick:btnclick,type:'no'}]};if(typeof(title)=="string"&&title!="")p.title=title;$.ligerdialog.open(p);};$.ligerdialog.warning=function(content,title,callback){if(typeof(title)=="function"){callback=title;type=null;} var btnclick=function(item,dialog){dialog.close();if(callback){callback(item.type);}};p={type:'question',content:content,buttons:[{text:'是',onclick:btnclick,type:'yes'},{text:'否',onclick:btnclick,type:'no'},{text:'取消',onclick:btnclick,type:'cancel'}]};if(typeof(title)=="string"&&title!="")p.title=title;$.ligerdialog.open(p);};$.ligerdialog.waitting=function(title) {title=title||$.ligerdefaults.dialog.waittingmessage;$.ligerdialog.open({cls:'l-dialog-waittingdialog',type:'none',content:'
'+title+'
',allowclose:false});};$.ligerdialog.closewaitting=function() {$(".l-dialog-waittingdialog,.l-window-mask").remove();};$.ligerdialog.success=function(content,title,onbtnclick){$.ligerdialog.alert(content,title,'success',onbtnclick);};$.ligerdialog.error=function(content,title,onbtnclick){$.ligerdialog.alert(content,title,'error',onbtnclick);};$.ligerdialog.warn=function(content,title,onbtnclick){$.ligerdialog.alert(content,title,'warn',onbtnclick);};$.ligerdialog.question=function(content,title){$.ligerdialog.alert(content,title,'question');};$.ligerdialog.prompt=function(title,value,multi,callback){var target=$('');if(typeof(multi)=="function"){callback=multi;} if(typeof(value)=="function"){callback=value;} else if(typeof(value)=="boolean"){multi=value;} if(typeof(multi)=="boolean"&&multi) {target=$('');} if(typeof(value)=="string"||typeof(value)=="int") {target.val(value);} var btnclick=function(item,dialog,index){dialog.close();if(callback){callback(item.type=='yes',target.val());}} p={title:title,target:target,width:320,buttons:[{text:'确定',onclick:btnclick,type:'yes'},{text:'取消',onclick:btnclick,type:'cancel'}]};$.ligerdialog.open(p);};})(jquery);(function($){$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.drag={onstartdrag:false,ondrag:false,onstopdrag:false};$.fn.ligerdrag=function(p){p=$.extend({},$.ligerdefaults.drag,p||{});return this.each(function(){if(this.usedrag)return;var g={start:function(e){$('body').css('cursor','move');g.current={target:g.target,left:g.target.offset().left,top:g.target.offset().top,startx:e.pagex||e.screenx,starty:e.pagey||e.clienty};$(document).bind('mouseup.drag',g.stop);$(document).bind('mousemove.drag',g.drag);if(p.onstartdrag)p.onstartdrag(g.current,e);},drag:function(e){if(!g.current)return;var pagex=e.pagex||e.screenx;var pagey=e.pagey||e.screeny;g.current.diffx=pagex-g.current.startx;g.current.diffy=pagey-g.current.starty;if(p.ondrag){if(p.ondrag(g.current,e)!=false){g.applydrag();}} else{g.applydrag();}},stop:function(e){$(document).unbind('mousemove.drag');$(document).unbind('mouseup.drag');$("body").css("cursor","");if(p.onstopdrag)p.onstopdrag(g.current,e);g.current=null;},applydrag:function(){if(g.current.diffx){g.target.css("left",(g.current.left+g.current.diffx));} if(g.current.diffy){g.target.css("top",(g.current.top+g.current.diffy));}}};g.target=$(this);if(p.handler==undefined||p.handler==null) g.handler=$(this);else g.handler=(typeof p.handler=='string'?$(p.handler,this):p.handle);g.handler.hover(function(){$('body').css('cursor','move');},function(){$("body").css("cursor","default");}).mousedown(function(e){g.start(e);return false;});this.usedrag=true;});};})(jquery);if(typeof(ligeruimenu)=="undefined")ligeruimenu={};(function($) {$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.menu={width:120,top:0,left:0,items:null,shadow:true};$.ligermenu=function(p) {p=$.extend({},$.ligerdefaults.menu,p||{});var g={show:function(options,menu) {if(menu==undefined)menu=g.menu;if(options&&options.left!=undefined) {menu.css({left:options.left});} if(options&&options.top!=undefined) {menu.css({top:options.top});} menu.show();g.updateshadow(menu);},updateshadow:function(menu) {if(!p.shadow)return;menu.shadow.css({left:menu.css('left'),top:menu.css('top'),width:menu.outerwidth(),height:menu.outerheight()});if(menu.is(":visible")) menu.shadow.show();else menu.shadow.hide();},hide:function(menu) {if(menu==undefined)menu=g.menu;g.hideallsubmenu(menu);menu.hide();g.updateshadow(menu);},toggle:function() {g.menu.toggle();g.updateshadow(g.menu);},removeitem:function(itemid) {$("> .l-menu-item[menuitemid="+itemid+"]",g.menu.items).remove();g.itemcount--;},setenable:function(itemid) {$("> .l-menu-item[menuitemid="+itemid+"]",g.menu.items).removeclass("l-menu-item-disable");},setdisable:function(itemid) {$("> .l-menu-item[menuitemid="+itemid+"]",g.menu.items).addclass("l-menu-item-disable");},isenable:function(itemid) {return!$("> .l-menu-item[menuitemid="+itemid+"]",g.menu.items).hasclass("l-menu-item-disable");},getitemcount:function() {return $("> .l-menu-item",g.menu.items).length;},additem:function(item,menu) {if(!item)return;if(menu==undefined)menu=g.menu;if(item.line) {menu.items.append('');return;} var ditem=$('');var itemcount=$("> .l-menu-item",menu.items).length;menu.items.append(ditem);item.id&&ditem.attr("menuitemid",item.id);item.text&&$(">.l-menu-item-text:first",ditem).html(item.text);item.icon&&ditem.prepend('');item.disable&&ditem.addclass("l-menu-item-disable");if(item.children) {if(ditem.attr("menuitemid")==undefined)ditem.attr("menuitemid",new date().gettime());ditem.append('');var newmenu=g.createmenu(ditem.attr("menuitemid"));ligeruimenu[ditem.attr("menuitemid")]=newmenu;newmenu.width(p.width);newmenu.hover(null,function(){if(!newmenu.showedsubmenu) g.hide(newmenu);});$(item.children).each(function() {g.additem(this,newmenu);});} item.click&&ditem.click(function() {if($(this).hasclass("l-menu-item-disable"))return;item.click(item,itemcount);});item.dblclick&&ditem.dblclick(function() {if($(this).hasclass("l-menu-item-disable"))return;item.dblclick(item,itemcount);});var menuover=$("> .l-menu-over:first",menu);ditem.hover(function() {if($(this).hasclass("l-menu-item-disable"))return;var itemtop=$(this).offset().top;var top=itemtop-menu.offset().top;menuover.css({top:top});g.hideallsubmenu(menu);if(item.children) {var meniitemid=$(this).attr("menuitemid");if(!meniitemid)return;if(ligeruimenu[meniitemid]) {g.show({top:itemtop,left:$(this).offset().left+$(this).width()-5},ligeruimenu[meniitemid]);menu.showedsubmenu=true;}}},function() {if($(this).hasclass("l-menu-item-disable"))return;var meniitemid=$(this).attr("menuitemid");if(item.children) {var meniitemid=$(this).attr("menuitemid");if(!meniitemid)return;};});},hideallsubmenu:function(menu) {if(menu==undefined)menu=g.menu;$("> .l-menu-item",menu.items).each(function(){if($("> .l-menu-item-arrow",this).length>0) {var meniitemid=$(this).attr("menuitemid");if(!meniitemid)return;ligeruimenu[meniitemid]&&g.hide(ligeruimenu[meniitemid]);}});menu.showedsubmenu=false;},createmenu:function(parentmenuitemid) {var menu=$('');parentmenuitemid&&menu.attr("parentmenuitemid",parentmenuitemid);menu.items=$("> .l-menu-inner:first",menu);menu.appendto('body');if(p.shadow) {menu.shadow=$('').insertafter(menu);g.updateshadow(menu);} menu.hover(null,function(){if(!menu.showedsubmenu) $("> .l-menu-over:first",menu).css({top:-24});});return menu;}};g.menu=g.createmenu();g.menu.css({top:p.top,left:p.left,width:p.width});p.items&&$(p.items).each(function(i,item) {g.additem(item);});return g;};$(document).click(function() {$(".l-menu,.l-menu-shadow").hide();});})(jquery);(function($){$.fn.ligergetlayoutmanager=function(){return ligeruimanagers[this[0].id+"_layout"];};$.fn.ligerremovelayoutmanager=function(){return this.each(function(){ligeruimanagers[this.id+"_layout"]=null;});};$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.layout={topheight:65,bottomheight:65,leftwidth:110,centerwidth:300,rightwidth:170,inwindow:true,heightdiff:0,height:'100%',onheightchanged:null,isleftcollapse:false,isrightcollapse:false,allowleftcollapse:true,allowrightcollapse:true,allowleftresize:true,allowrightresize:true,allowtopresize:true,allowbottomresize:true,space:5};$.fn.ligerlayout=function(p){this.each(function(){p=$.extend({},$.ligerdefaults.layout,p||{});if(this.usedlayout)return;var g={init:function(){$("> .l-layout-left .l-layout-header,> .l-layout-right .l-layout-header",g.layout).hover(function(){$(this).addclass("l-layout-header-over");},function(){$(this).removeclass("l-layout-header-over");});$(".l-layout-header-toggle",g.layout).hover(function(){$(this).addclass("l-layout-header-toggle-over");},function(){$(this).removeclass("l-layout-header-toggle-over");});$(".l-layout-header-toggle",g.left).click(function(){g.setleftcollapse(true);});$(".l-layout-header-toggle",g.right).click(function(){g.setrightcollapse(true);});g.middletop=0;if(g.top){g.middletop+=g.top.height();g.middletop+=parseint(g.top.css('bordertopwidth'));g.middletop+=parseint(g.top.css('borderbottomwidth'));} if(g.left){g.left.css({top:g.middletop});g.leftcollapse.css({top:g.middletop});} if(g.center){g.center.css({top:g.middletop});} if(g.right){g.right.css({top:g.middletop});g.rightcollapse.css({top:g.middletop});} if(g.left)g.left.css({left:0});g.onresize();g.onresize();},setcollapse:function(){g.leftcollapse.hover(function(){$(this).addclass("l-layout-collapse-left-over");},function(){$(this).removeclass("l-layout-collapse-left-over");});g.leftcollapse.toggle.hover(function(){$(this).addclass("l-layout-collapse-left-toggle-over");},function(){$(this).removeclass("l-layout-collapse-left-toggle-over");});g.rightcollapse.hover(function(){$(this).addclass("l-layout-collapse-right-over");},function(){$(this).removeclass("l-layout-collapse-right-over");});g.rightcollapse.toggle.hover(function(){$(this).addclass("l-layout-collapse-right-toggle-over");},function(){$(this).removeclass("l-layout-collapse-right-toggle-over");});g.leftcollapse.toggle.click(function(){g.setleftcollapse(false);});g.rightcollapse.toggle.click(function(){g.setrightcollapse(false);});if(g.left&&g.isleftcollapse){g.leftcollapse.show();g.leftdrophandle&&g.leftdrophandle.hide();g.left.hide();} if(g.right&&g.isrightcollapse){g.rightcollapse.show();g.rightdrophandle&&g.rightdrophandle.hide();g.right.hide();}},setleftcollapse:function(iscollapse){if(!g.left)return false;g.isleftcollapse=iscollapse;if(g.isleftcollapse){g.leftcollapse.show();g.leftdrophandle&&g.leftdrophandle.hide();g.left.hide();} else{g.leftcollapse.hide();g.leftdrophandle&&g.leftdrophandle.show();g.left.show();} g.onresize();},setrightcollapse:function(iscollapse){if(!g.right)return false;g.isrightcollapse=iscollapse;g.onresize();if(g.isrightcollapse){g.rightcollapse.show();g.rightdrophandle&&g.rightdrophandle.hide();g.right.hide();} else{g.rightcollapse.hide();g.rightdrophandle&&g.rightdrophandle.show();g.right.show();} g.onresize();},adddrophandle:function(){if(g.left&&p.allowleftresize){g.leftdrophandle=$("
");g.layout.append(g.leftdrophandle);g.leftdrophandle&&g.leftdrophandle.show();g.leftdrophandle.mousedown(function(e){g.start('leftresize',e);});} if(g.right&&p.allowrightresize){g.rightdrophandle=$("
");g.layout.append(g.rightdrophandle);g.rightdrophandle&&g.rightdrophandle.show();g.rightdrophandle.mousedown(function(e){g.start('rightresize',e);});} if(g.top&&p.allowtopresize){g.topdrophandle=$("
");g.layout.append(g.topdrophandle);g.topdrophandle.show();g.topdrophandle.mousedown(function(e){g.start('topresize',e);});} if(g.bottom&&p.allowbottomresize){g.bottomdrophandle=$("
");g.layout.append(g.bottomdrophandle);g.bottomdrophandle.show();g.bottomdrophandle.mousedown(function(e){g.start('bottomresize',e);});} g.draggingxline=$("
");g.draggingyline=$("
");g.layout.append(g.draggingxline).append(g.draggingyline);},setdrophandleposition:function(){if(g.leftdrophandle){g.leftdrophandle.css({left:g.left.width()+parseint(g.left.css('left')),height:g.middleheight,top:g.middletop});} if(g.rightdrophandle){g.rightdrophandle.css({left:parseint(g.right.css('left'))-p.space,height:g.middleheight,top:g.middletop});} if(g.topdrophandle){g.topdrophandle.css({top:g.top.height()+parseint(g.top.css('top')),width:g.top.width()});} if(g.bottomdrophandle){g.bottomdrophandle.css({top:parseint(g.bottom.css('top'))-p.space,width:g.bottom.width()});}},onresize:function(){var oldheight=g.layout.height();var h=0;var windowheight=$(window).height();var parentheight=null;if(typeof(p.height)=="string"&&p.height.indexof('%')>0) {var layoutparent=g.layout.parent();if(p.inwindow||layoutparent[0].tagname.tolowercase()=="body"){parentheight=windowheight;parentheight-=parseint($('body').css('paddingtop'));parentheight-=parseint($('body').css('paddingbottom'));} else{parentheight=layoutparent.height();} h=parentheight*parsefloat(p.height)*0.01;if(p.inwindow||layoutparent[0].tagname.tolowercase()=="body") h-=(g.layout.offset().top-parseint($('body').css('paddingtop')));} else {h=parseint(p.height);} h+=p.heightdiff;g.layout.height(h);g.layoutheight=g.layout.height();g.middlewidth=g.layout.width();g.middleheight=g.layout.height();if(g.top){g.middleheight-=g.top.height();g.middleheight-=parseint(g.top.css('bordertopwidth'));g.middleheight-=parseint(g.top.css('borderbottomwidth'));g.middleheight-=p.space;} if(g.bottom){g.middleheight-=g.bottom.height();g.middleheight-=parseint(g.bottom.css('bordertopwidth'));g.middleheight-=parseint(g.bottom.css('borderbottomwidth'));} g.middleheight-=2;if(p.onheightchanged&&g.layoutheight!=oldheight){p.onheightchanged({layoutheight:g.layoutheight,diff:g.layoutheight-oldheight,middleheight:g.middleheight});} if(g.center){g.centerwidth=g.middlewidth;if(g.left){if(g.isleftcollapse){g.centerwidth-=g.leftcollapse.width()+2;g.centerwidth-=parseint(g.leftcollapse.css('borderleftwidth'));g.centerwidth-=parseint(g.leftcollapse.css('borderrightwidth'));g.centerwidth-=parseint(g.leftcollapse.css('left'));g.centerwidth-=p.space;} else{g.centerwidth-=g.leftwidth+2;g.centerwidth-=parseint(g.left.css('borderleftwidth'));g.centerwidth-=parseint(g.left.css('borderrightwidth'));g.centerwidth-=parseint(g.left.css('left'));g.centerwidth-=p.space;}} if(g.right){if(g.isrightcollapse){g.centerwidth-=g.rightcollapse.width();g.centerwidth-=parseint(g.rightcollapse.css('borderleftwidth'));g.centerwidth-=parseint(g.rightcollapse.css('borderrightwidth'));g.centerwidth-=parseint(g.rightcollapse.css('right'));g.centerwidth-=p.space;} else{g.centerwidth-=g.rightwidth;g.centerwidth-=parseint(g.right.css('borderleftwidth'));g.centerwidth-=parseint(g.right.css('borderrightwidth'));g.centerwidth-=p.space;}} g.centerleft=0;if(g.left){if(g.isleftcollapse){g.centerleft+=g.leftcollapse.width();g.centerleft+=parseint(g.leftcollapse.css('borderleftwidth'));g.centerleft+=parseint(g.leftcollapse.css('borderrightwidth'));g.centerleft+=parseint(g.leftcollapse.css('left'));g.centerleft+=p.space;} else{g.centerleft+=g.left.width();g.centerleft+=parseint(g.left.css('borderleftwidth'));g.centerleft+=parseint(g.left.css('borderrightwidth'));g.centerleft+=p.space;}} g.center.css({left:g.centerleft});g.center.width(g.centerwidth);g.center.height(g.middleheight);var contentheight=g.middleheight;if(g.center.header)contentheight-=g.center.header.height();g.center.content.height(contentheight);} if(g.left){g.leftcollapse.height(g.middleheight);g.left.height(g.middleheight);} if(g.right){g.rightcollapse.height(g.middleheight);g.right.height(g.middleheight);g.rightleft=0;if(g.left){if(g.isleftcollapse){g.rightleft+=g.leftcollapse.width();g.rightleft+=parseint(g.leftcollapse.css('borderleftwidth'));g.rightleft+=parseint(g.leftcollapse.css('borderrightwidth'));g.rightleft+=p.space;} else{g.rightleft+=g.left.width();g.rightleft+=parseint(g.left.css('borderleftwidth'));g.rightleft+=parseint(g.left.css('borderrightwidth'));g.rightleft+=parseint(g.left.css('left'));g.rightleft+=p.space;}} if(g.center){g.rightleft+=g.center.width();g.rightleft+=parseint(g.center.css('borderleftwidth'));g.rightleft+=parseint(g.center.css('borderrightwidth'));g.rightleft+=p.space;} g.right.css({left:g.rightleft});} if(g.bottom){g.bottomtop=g.layoutheight-g.bottom.height()-2;g.bottom.css({top:g.bottomtop});} g.setdrophandleposition();},start:function(dragtype,e){g.dragtype=dragtype;if(dragtype=='leftresize'||dragtype=='rightresize'){g.xresize={startx:e.pagex};g.draggingyline.css({left:e.pagex-g.layout.offset().left,height:g.middleheight,top:g.middletop}).show();$('body').css('cursor','col-resize');} else if(dragtype=='topresize'||dragtype=='bottomresize'){g.yresize={starty:e.pagey};g.draggingxline.css({top:e.pagey-g.layout.offset().top,width:g.layout.width()}).show();$('body').css('cursor','row-resize');} else{return;} g.layout.lock.width(g.layout.width());g.layout.lock.height(g.layout.height());g.layout.lock.show();if($.browser.msie||$.browser.safari)$('body').bind('selectstart',function(){return false;});$(document).bind('mouseup',g.stop);$(document).bind('mousemove',g.drag);},drag:function(e){if(g.xresize){g.xresize.diff=e.pagex-g.xresize.startx;g.draggingyline.css({left:e.pagex-g.layout.offset().left});$('body').css('cursor','col-resize');} else if(g.yresize){g.yresize.diff=e.pagey-g.yresize.starty;g.draggingxline.css({top:e.pagey-g.layout.offset().top});$('body').css('cursor','row-resize');}},stop:function(e){if(g.xresize&&g.xresize.diff!=undefined){if(g.dragtype=='leftresize'){g.leftwidth+=g.xresize.diff;g.left.width(g.leftwidth);if(g.center) g.center.width(g.center.width()-g.xresize.diff).css({left:parseint(g.center.css('left'))+g.xresize.diff});else if(g.right) g.right.width(g.left.width()-g.xresize.diff).css({left:parseint(g.right.css('left'))+g.xresize.diff});} else if(g.dragtype=='rightresize'){g.rightwidth-=g.xresize.diff;g.right.width(g.rightwidth).css({left:parseint(g.right.css('left'))+g.xresize.diff});if(g.center) g.center.width(g.center.width()+g.xresize.diff);else if(g.left) g.left.width(g.left.width()+g.xresize.diff);}} else if(g.yresize&&g.yresize.diff!=undefined){if(g.dragtype=='topresize'){g.top.height(g.top.height()+g.yresize.diff);g.middletop+=g.yresize.diff;g.middleheight-=g.yresize.diff;if(g.left){g.left.css({top:g.middletop}).height(g.middleheight);g.leftcollapse.css({top:g.middletop}).height(g.middleheight);} if(g.center)g.center.css({top:g.middletop}).height(g.middleheight);if(g.right){g.right.css({top:g.middletop}).height(g.middleheight);g.rightcollapse.css({top:g.middletop}).height(g.middleheight);}} else if(g.dragtype=='bottomresize'){g.bottom.height(g.bottom.height()-g.yresize.diff);g.middleheight+=g.yresize.diff;g.bottomtop+=g.yresize.diff;g.bottom.css({top:g.bottomtop});if(g.left){g.left.height(g.middleheight);g.leftcollapse.height(g.middleheight);} if(g.center)g.center.height(g.middleheight);if(g.right){g.right.height(g.middleheight);g.rightcollapse.height(g.middleheight);}}} g.setdrophandleposition();g.draggingxline.hide();g.draggingyline.hide();g.xresize=g.yresize=g.dragtype=false;g.layout.lock.hide();if($.browser.msie||$.browser.safari) $('body').unbind('selectstart');$(document).unbind('mousemove',g.drag);$(document).unbind('mouseup',g.stop);$('body').css('cursor','');}};g.layout=$(this);if(!g.layout.hasclass("l-layout")) g.layout.addclass("l-layout");g.width=g.layout.width();if($("> div[position=top]",g.layout).length>0){g.top=$("> div[position=top]",g.layout).wrap('
').parent();g.top.content=$("> div[position=top]",g.top);if(!g.top.content.hasclass("l-layout-content")) g.top.content.addclass("l-layout-content");g.topheight=p.topheight;if(g.topheight){g.top.height(g.topheight);}} if($("> div[position=bottom]",g.layout).length>0){g.bottom=$("> div[position=bottom]",g.layout).wrap('
').parent();g.bottom.content=$("> div[position=bottom]",g.top);if(!g.bottom.content.hasclass("l-layout-content")) g.bottom.content.addclass("l-layout-content");g.bottomheight=p.bottomheight;if(g.bottomheight){g.bottom.height(g.bottomheight);}} if($("> div[position=left]",g.layout).length>0){g.left=$("> div[position=left]",g.layout).wrap('
').parent();g.left.header=$('
');g.left.prepend(g.left.header);g.left.header.toggle=$(".l-layout-header-toggle",g.left.header);g.left.content=$("> div[position=left]",g.left);if(!g.left.content.hasclass("l-layout-content")) g.left.content.addclass("l-layout-content");if(!p.allowleftcollapse)$(".l-layout-header-toggle",g.left.header).remove();var lefttitle=g.left.content.attr("title");if(lefttitle){g.left.content.attr("title","");$(".l-layout-header-inner",g.left.header).html(lefttitle);} g.leftwidth=p.leftwidth;if(g.leftwidth) g.left.width(g.leftwidth);} if($("> div[position=center]",g.layout).length>0){g.center=$("> div[position=center]",g.layout).wrap('
').parent();g.center.content=$("> div[position=center]",g.center);g.center.content.addclass("l-layout-content");var centertitle=g.center.content.attr("title");if(centertitle){g.center.content.attr("title","");g.center.header=$('
');g.center.prepend(g.center.header);g.center.header.html(centertitle);} g.centerwidth=p.centerwidth;if(g.centerwidth) g.center.width(g.centerwidth);} if($("> div[position=right]",g.layout).length>0){g.right=$("> div[position=right]",g.layout).wrap('
').parent();g.right.header=$('
');g.right.prepend(g.right.header);g.right.header.toggle=$(".l-layout-header-toggle",g.right.header);if(!p.allowrightcollapse)$(".l-layout-header-toggle",g.right.header).remove();g.right.content=$("> div[position=right]",g.right);if(!g.right.content.hasclass("l-layout-content")) g.right.content.addclass("l-layout-content");var righttitle=g.right.content.attr("title");if(righttitle){g.right.content.attr("title","");$(".l-layout-header-inner",g.right.header).html(righttitle);} g.rightwidth=p.rightwidth;if(g.rightwidth) g.right.width(g.rightwidth);} g.layout.lock=$("
");g.layout.append(g.layout.lock);g.adddrophandle();g.isleftcollapse=p.isleftcollapse;g.isrightcollapse=p.isrightcollapse;g.leftcollapse=$('');g.rightcollapse=$('');g.layout.append(g.leftcollapse).append(g.rightcollapse);g.leftcollapse.toggle=$("> .l-layout-collapse-left-toggle",g.leftcollapse);g.rightcollapse.toggle=$("> .l-layout-collapse-right-toggle",g.rightcollapse);g.setcollapse();g.init();$(window).resize(function(){g.onresize();});if(this.id==undefined)this.id="ligerui_"+new date().gettime();ligeruimanagers[this.id+"_layout"]=g;this.usedlayout=true;});if(this.length==0)return null;if(this.length==1)return ligeruimanagers[this[0].id+"_layout"];var managers=[];this.each(function(){managers.push(ligeruimanagers[this.id+"_layout"]);});return managers;};})(jquery);(function($) {$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.resizable={handles:'n, e, s, w, ne, se, sw, nw',maxwidth:2000,maxheight:2000,minwidth:20,minheight:20,onstartresize:function(e){},onresize:function(e){},onstopresize:function(e){},onendresize:null};$.fn.ligerresizable=function(p) {return this.each(function() {p=$.extend({},$.ligerdefaults.resizable,p||{});var g={init:function() {g.target.append('
');var handles=p.handles.split(',');for(var i=0;i');break;case"ne":g.target.append('
');break;case"n":g.target.append('
');break;case"w":g.target.append('
');break;case"e":g.target.append('
');break;case"sw":g.target.append('
');break;case"se":g.target.append('
');break;case"s":g.target.append('
');break;}} $("> .l-resizable-h-c , > .l-resizable-f-c",g.target).width(g.target.width());$("> .l-resizable-c-l , > .l-resizable-c-r",g.target).height(g.target.height());g.target.resizable=$("> .l-resizable",g.target);},start:function(e,dir) {if($.browser.msie||$.browser.safari) $('body').bind('selectstart',function(){return false;});$(".l-window-mask-nobackground").remove();$("
").appendto($("body"));g.target.resizable.css({width:g.target.width(),height:g.target.height(),left:0,top:0});g.current={dir:dir,left:g.target.offset().left,top:g.target.offset().top,width:g.target.width(),height:g.target.height()};$(document).bind('mouseup',g.stop);$(document).bind('mousemove',g.drag);g.target.resizable.show();if(p.onstartresize)p.onstartresize(g.current,e);},drag:function(e) {var dir=g.current.dir;var resizableobj=g.target.resizable[0];var width=g.current.width;var height=g.current.height;var movewidth=(e.pagex||e.screenx)-g.current.left;var moveheight=(e.pagey||e.clienty)-g.current.top;if(dir.indexof("e")>=0)movewidth-=width;if(dir.indexof("s")>=0)moveheight-=height;if(dir!="n"&&dir!="s") {width+=(dir.indexof("w")>=0)?-movewidth:movewidth;} if(width>=p.minwidth) {if(dir.indexof("w")>=0) {resizableobj.style.left=movewidth+'px';} if(dir!="n"&&dir!="s") {resizableobj.style.width=width+'px';}} if(dir!="w"&&dir!="e") {height+=(dir.indexof("n")>=0)?-moveheight:moveheight;} if(height>=p.minheight) {if(dir.indexof("n")>=0) {resizableobj.style.top=moveheight+'px';} if(dir!="w"&&dir!="e") {resizableobj.style.height=height+'px';}} g.current.newwidth=width;g.current.newheight=height;g.current.difftop=parseint(resizableobj.style.top);if(isnan(g.current.difftop))g.current.difftop=0;g.current.diffleft=parseint(resizableobj.style.left);if(isnan(g.current.diffleft))g.current.diffleft=0;$("body").css("cursor",dir+'-resize');if(p.onresize)p.onresize(g.current,e);},stop:function(e) {if($.browser.msie||$.browser.safari) $('body').unbind('selectstart');$(".l-window-mask-nobackground").remove();if(!p.onstopresize)g.applyresize();else if(p.onstopresize(g.current,e)!=false)g.applyresize();p.onendresize&&p.onendresize(g.current,e);$("body").css("cursor","");g.target.resizable.hide();$(document).unbind('mousemove',g.drag);$(document).unbind('mouseup',g.stop);},applyresize:function() {var top=0;var left=0;if(!isnan(parseint(g.target.css('top')))) top=parseint(g.target.css('top'));if(!isnan(parseint(g.target.css('left')))) left=parseint(g.target.css('left'));if(g.current.difftop!=undefined) {if(g.current.difftop!=0) g.target.css({top:top+g.current.difftop});if(g.current.diffleft!=0) g.target.css({left:left+g.current.diffleft});g.target.css({width:g.current.newwidth,height:g.current.newheight});}}};g.target=$(this);g.init();$(">div",g.target).mousedown(function(e) {if(!$(this).attr("direction"))return;g.start(e,$(this).attr("direction"));return false;});});};})(jquery);(function($){$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.tip={content:null,callback:null,width:150,height:null,distancex:7,distancey:0,appendidto:null};$.fn.ligertip=function(p){p=$.extend({},$.ligerdefaults.tip,p||{});this.each(function(){var tip=null;var tipid=$(this).attr("ligertipid");if(tipid){tip=$("#"+tipid);if(p.content=="")tip.remove();else $(".l-verify-tip-content",tip).html(p.content);} else if(p.content){tip=$('
'+p.content+'
');tip.attr("id","ligerui"+new date().gettime());tip.fadeto(0,0.85);$(this).after(tip);} if(!tip)return;tip.css({left:$(this).position().left+$(this).width()+p.distancex,top:$(this).position().top+p.distancey}).show();$(this).attr("ligertipid",tip.attr("id"));p.width&&$("> .l-verify-tip-content",tip).width(p.width-8);p.height&&$("> .l-verify-tip-content",tip).width(p.height);p.appendidto&&p.appendidto.attr("ligertipid",tip.attr("id"));p.callback&&p.callback(tip);});if(this.length==0)return null;if(this.length==1)return this[0].ligertip;var tips=[];this.each(function(){tips.push(this.ligertip);});return tips;};$.fn.ligerhidetip=function(p){return this.each(function(){var tipid=$(this).attr("ligertipid");if(tipid){$("#"+tipid).remove();$("[ligertipid="+tipid+"]").removeattr("ligertipid");}});};})(jquery);(function($) {$.fn.ligergettabmanager=function() {return ligeruimanagers[this[0].id+"_tab"];};$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.tab={height:null,heightdiff:0,marginleft:3,changeheightonresize:false,contextmenu:true,closemessage:"关闭当前页",closeothermessage:"关闭其他",closeallmessage:"关闭所有",reloadmessage:"刷新",onbeforeoverridetabitem:null,onafteroverridetabitem:null,onbeforeremovetabitem:null,onafterremovetabitem:null,onbeforeaddtabitem:null,onafteraddtabitem:null,onbeforeselecttabitem:null,onafterselecttabitem:null};$.fn.ligertab=function(p) {p=$.extend({},$.ligerdefaults.tab,p||{});this.each(function() {if(this.usedtab)return;if($(this).hasclass('l-hidden')){return;} var g={settabbutton:function() {var sumwidth=0;$("li",g.tab.links.ul).each(function() {sumwidth+=($(this).width()+p.marginleft);});var mainwidth=g.tab.width();if(sumwidth>mainwidth) {$(".l-tab-links-left,.l-tab-links-right",g.tab.links).remove();g.tab.links.append('');if($(g.tab).attr("toolsid")) {$(".l-tab-links-right",g.tab.links).css("right","17px");} g.settabbuttoneven();return true;}else {g.tab.links.ul.animate({left:0});$(".l-tab-links-left,.l-tab-links-right",g.tab.links).remove();return false;}},settabbuttoneven:function() {$(".l-tab-links-left",g.tab.links).hover(function() {$(this).addclass("l-tab-links-left-over");},function() {$(this).removeclass("l-tab-links-left-over");}).click(function() {g.movetoprevtabitem();});$(".l-tab-links-right",g.tab.links).hover(function() {$(this).addclass("l-tab-links-right-over");},function() {$(this).removeclass("l-tab-links-right-over");}).click(function() {g.movetonexttabitem();});},movetoprevtabitem:function() {var btnwitdth=$(".l-tab-links-left",g.tab.links).width();var leftlist=new array();$("li",g.tab.links.ul).each(function(i,item) {var currentitemleft=-1*btnwitdth;if(i>0) {currentitemleft=parseint(leftlist[i-1])+$(this).prev().width()+p.marginleft;} leftlist.push(currentitemleft);});var currentleft=-1*parseint(g.tab.links.ul.css("left"));for(var i=0;i=currentleft) {g.tab.links.ul.animate({left:-1*parseint(leftlist[i])});return;}}},movetonexttabitem:function() {var btnwitdth=$(".l-tab-links-right",g.tab).width()+$(".l-tab-links-tools",g.tab.links).width();var sumwidth=0;var tabitems=$("li",g.tab.links.ul);tabitems.each(function() {sumwidth+=$(this).width()+p.marginleft;});var mainwidth=g.tab.width();var leftlist=new array();for(var i=tabitems.length-1;i>=0;i--) {var currentitemleft=sumwidth-mainwidth+btnwitdth+p.marginleft;if(i!=tabitems.length-1) {currentitemleft=parseint(leftlist[tabitems.length-2-i])-($(tabitems[i+1]).width()+p.marginleft);} leftlist.push(currentitemleft);} var currentleft=-1*parseint(g.tab.links.ul.css("left"));for(var i=1;icurrentleft) {g.tab.links.ul.animate({left:-1*parseint(leftlist[i-1])});return;}}},gettabitemcount:function() {return $("li",g.tab.links.ul).length;},getselectedtabitemid:function() {return $("li.l-selected",g.tab.links.ul).attr("tabid");},removeselectedtabitem:function() {g.removetabitem(g.getselectedtabitemid());},overrideselectedtabitem:function(options){g.overridetabitem(g.getselectedtabitemid(),options);},overridetabitem:function(targettabid,options){if(p.onbeforeoverridetabitem&&p.onbeforeoverridetabitem(targettabid)==false)return false;var tabid=options.tabid;if(tabid==undefined)tabid=g.getnewtabid();var url=options.url;var content=options.content;var target=options.target;var text=options.text;var showclose=options.showclose;var height=options.height;if(g.istabitemexist(tabid)) {return;} var tabitem=$("li[tabid="+targettabid+"]",g.tab.links.ul);var contentitem=$(".l-tab-content-item[tabid="+targettabid+"]",g.tab.content);if(!tabitem||!contentitem)return;tabitem.attr("tabid",tabid);contentitem.attr("tabid",tabid);if($("iframe",contentitem).length==0&&url) {contentitem.html("");} else if(content) {contentitem.html(content);} $("iframe",contentitem).attr("name",tabid);if(showclose==undefined)showclose=true;if(showclose==false)$(".l-tab-links-item-close",tabitem).remove();else{if($(".l-tab-links-item-close",tabitem).length==0) tabitem.append("");} if(text==undefined)text=tabid;if(height)contentitem.height(height);$("a",tabitem).text(text);$("iframe",contentitem).attr("src",url);p.onafteroverridetabitem&&p.onafteroverridetabitem(targettabid);},selecttabitem:function(tabid) {if(p.onbeforeselecttabitem&&p.onbeforeselecttabitem(tabid)==false)return false;g.selectedtabid=tabid;$("> .l-tab-content-item[tabid="+tabid+"]",g.tab.content).show().siblings().hide();$("li[tabid="+tabid+"]",g.tab.links.ul).addclass("l-selected").siblings().removeclass("l-selected");p.onafterselecttabitem&&p.onafterselecttabitem(tabid);},movetocurrtabitem:function(tabid) {var btnwitdth=$(".l-tab-links-left",g.tab.links).width();var mainwidth=g.tab.width();var selecttableftwidth=0;var selecttabrightwidth=0;$("li",g.tab.links.ul).each(function() {selecttabrightwidth+=$(this).width()+p.marginleft;if($(this).attr("tabid")==tabid) {return false;} selecttableftwidth+=$(this).width()+p.marginleft;});var tableftnum=parseint($(g.tab.links.ul).css("left"));if(selecttableftwidth<(0-tableftnum)) {g.tab.links.ul.animate({left:-1*(selecttableftwidth-btnwitdth)});} else if((selecttabrightwidth+tableftnum)>mainwidth) {btnwitdth+=$(".l-tab-links-tools",g.tab.links).width();g.tab.links.ul.animate({left:(-1*(selecttabrightwidth-mainwidth+btnwitdth+p.marginleft))});}},movetolasttabitem:function() {var sumwidth=0;$("li",g.tab.links.ul).each(function() {sumwidth+=$(this).width()+p.marginleft;});var mainwidth=g.tab.width();if(sumwidth>mainwidth) {var btnwitdth=$(".l-tab-links-right",g.tab.links).width()+$(".l-tab-links-tools",g.tab.links).width();g.tab.links.ul.animate({left:-1*(sumwidth-mainwidth+btnwitdth+p.marginleft)});}},istabitemexist:function(tabid) {return $("li[tabid="+tabid+"]",g.tab.links.ul).length>0;},addtabitem:function(options) {if(p.onbeforeaddtabitem&&p.onbeforeaddtabitem(tabid)==false)return false;var tabid=options.tabid;if(tabid==undefined)tabid=g.getnewtabid();var url=options.url;var iconcss=options.iconcss;var content=options.content;var text=options.text;var showclose=options.showclose;var height=options.height;if(g.istabitemexist(tabid)) {g.selecttabitem(tabid);g.movetocurrtabitem(tabid);g.reload(tabid);return;} var tabitem=$("
  • ");var contentitem=$("
    ");if(g.makefullheight) {var newheight=g.tab.height()-g.tab.links.height();contentitem.height(newheight);} tabitem.attr("tabid",tabid);contentitem.attr("tabid",tabid);$("iframe",contentitem).attr("name",tabid);if(showclose==undefined)showclose=true;if(showclose==false)$(".l-tab-links-item-close",tabitem).remove();if(text==undefined)text=tabid;if(height)contentitem.height(height);$("a",tabitem).text(text);if(iconcss)$("a",tabitem).addclass(iconcss);$("iframe",contentitem).attr("src",url);g.tab.links.ul.append(tabitem);g.tab.content.append(contentitem);g.selecttabitem(tabid);if(g.settabbutton()) {g.movetolasttabitem();} g.addtabitemevent(tabitem);p.onafteraddtabitem&&p.onafteraddtabitem(tabid);},addtabitemevent:function(tabitem) {tabitem.click(function() {var tabid=$(this).attr("tabid");g.selecttabitem(tabid);});g.tab.menu&&po.addtabitemcontextmenueven(tabitem);$(".l-tab-links-item-close",tabitem).hover(function() {$(this).addclass("l-tab-links-item-close-over");},function() {$(this).removeclass("l-tab-links-item-close-over");}).click(function() {var tabid=$(this).parent().attr("tabid");g.removetabitem(tabid);});},removetabitem:function(tabid) {if(p.onbeforeremovetabitem&&p.onbeforeremovetabitem(tabid)==false)return false;var currentisselected=$("li[tabid="+tabid+"]",g.tab.links.ul).hasclass("l-selected");if(currentisselected) {$(".l-tab-content-item[tabid="+tabid+"]",g.tab.content).prev().show();$("li[tabid="+tabid+"]",g.tab.links.ul).prev().addclass("l-selected").siblings().removeclass("l-selected");} $(".l-tab-content-item[tabid="+tabid+"]",g.tab.content).remove();$("li[tabid="+tabid+"]",g.tab.links.ul).remove();g.settabbutton();p.onafterremovetabitem&&p.onafterremovetabitem(tabid);},addheight:function(heightdiff) {var newheight=g.tab.height()+heightdiff;g.setheight(newheight);},setheight:function(height) {g.tab.height(height);g.setcontentheight();},setcontentheight:function() {var newheight=g.tab.height()-g.tab.links.height();g.tab.content.height(newheight);$("> .l-tab-content-item",g.tab.content).height(newheight);},getnewtabid:function() {var now=new date();return now.gettime();},gettabidlist:function(notabid,noclose) {var tabidlist=[];$("> li",g.tab.links.ul).each(function(){if($(this).attr("tabid")&&$(this).attr("tabid")!=notabid&&(!noclose||$(".l-tab-links-item-close",this).length>0)) {tabidlist.push($(this).attr("tabid"));}});return tabidlist;},removeother:function(tabid,compel) {var tabidlist=g.gettabidlist(tabid,true);$(tabidlist).each(function(){g.removetabitem(this);});},reload:function(tabid) {$(".l-tab-content-item[tabid="+tabid+"] iframe",g.tab.content).each(function(i,iframe){$(iframe).attr("src",$(iframe).attr("src"));});},removeall:function(compel) {var tabidlist=g.gettabidlist(null,true);$(tabidlist).each(function(){g.removetabitem(this);});},onresize:function() {if(!p.height||typeof(p.height)!='string'||p.height.indexof('%')==-1)return false;if(g.tab.parent()[0].tagname.tolowercase()=="body") {var windowheight=$(window).height();windowheight-=parseint(g.tab.parent().css('paddingtop'));windowheight-=parseint(g.tab.parent().css('paddingbottom'));g.height=p.heightdiff+windowheight*parsefloat(g.height)*0.01;} else {g.height=p.heightdiff+(g.tab.parent().height()*parsefloat(p.height)*0.01);} g.tab.height(g.height);g.setcontentheight();}};var po={menuitemclick:function(item) {if(!item.id||!g.actiontabid)return;switch(item.id) {case"close":g.removetabitem(g.actiontabid);g.actiontabid=null;break;case"closeother":g.removeother(g.actiontabid);break;case"closeall":g.removeall();g.actiontabid=null;break;case"reload":g.selecttabitem(g.actiontabid);g.reload(g.actiontabid);break;}},addtabitemcontextmenueven:function(tabitem) {tabitem.bind("contextmenu",function(e){if(!g.tab.menu)return;g.actiontabid=tabitem.attr("tabid");g.tab.menu.show({top:e.pagey,left:e.pagex});if($(".l-tab-links-item-close",this).length==0) {g.tab.menu.setdisable('close');} else {g.tab.menu.setenable('close');} return false;});}};if(p.height)g.makefullheight=true;g.tab=$(this);if(!g.tab.hasclass("l-tab"))g.tab.addclass("l-tab");if(p.contextmenu&&$.ligermenu) {g.tab.menu=$.ligermenu({width:100,items:[{text:p.closemessage,id:'close',click:po.menuitemclick},{text:p.closeothermessage,id:'closeother',click:po.menuitemclick},{text:p.closeallmessage,id:'closeall',click:po.menuitemclick},{text:p.reloadmessage,id:'reload',click:po.menuitemclick}]});} g.tab.content=$('
    ');$("> div",g.tab).appendto(g.tab.content);g.tab.content.appendto(g.tab);g.tab.links=$('');g.tab.links.prependto(g.tab);if($(g.tab).attr("toolsid")) {g.tab.links.append('');} g.tab.links.ul=$("ul",g.tab.links);var haslselected=$("> div[lselected=true]",g.tab.content).length>0;g.selectedtabid=$("> div[lselected=true]",g.tab.content).attr("tabid");$("> div",g.tab.content).each(function(i,box) {var li=$('
  • ');if($(box).attr("title")) {$("> a",li).html($(box).attr("title"));} if($(box).attr("iconcss")) {$("> a",li).addclass($(box).attr("iconcss"));} var tabid=$(box).attr("tabid");if(tabid==undefined) {tabid=g.getnewtabid();$(box).attr("tabid",tabid);if($(box).attr("lselected")) {g.selectedtabid=tabid;}} li.attr("tabid",tabid);if(!haslselected&&i==0)g.selectedtabid=tabid;var showclose=$(box).attr("showclose");if(showclose) {li.append("");} $("> ul",g.tab.links).append(li);if(!$(box).hasclass("l-tab-content-item"))$(box).addclass("l-tab-content-item");});g.selecttabitem(g.selectedtabid);if(p.height) {if(typeof(p.height)=='string'&&p.height.indexof('%')>0) {g.onresize();if(p.changeheightonresize) {$(window).resize(function() {g.onresize();});}}else {g.setheight(p.height);}} if(g.makefullheight) g.setcontentheight();$("li",g.tab.links).each(function() {g.addtabitemevent($(this));});if(this.id==undefined)this.id="ligerui_"+new date().gettime();ligeruimanagers[this.id+"_tab"]=g;this.usedtab=true;});if(this.length==0)return null;if(this.length==1)return ligeruimanagers[this[0].id+"_tab"];var managers=[];this.each(function(){managers.push(ligeruimanagers[this.id+"_tab"]);});return managers;};})(jquery);(function($) {$.fn.ligergettreemanager=function() {return ligeruimanagers[this[0].id+"_tree"];};$.ligerdefaults=$.ligerdefaults||{};$.ligerdefaults.tree={url:null,data:null,checkbox:true,autocheckboxeven:true,parenticon:'folder',childicon:'leaf',textfieldname:'text',attribute:['id','url'],treeline:true,nodewidth:90,statusname:'__status',isleaf:null,onbeforeexpand:null,oncontextmenu:null,onexpand:null,onbeforecollapse:null,oncollapse:null,onbeforeselect:null,onselect:null,onbeforecancelselect:null,oncancelselect:null,oncheck:null,onsuccess:null,onerror:null,onclick:null,idfieldname:null,parentidfieldname:null,topparentidvalue:0};$.fn.ligertree=function(p) {this.each(function() {p=$.extend({},$.ligerdefaults.tree,p||{});if(this.usedtree)return;if($(this).hasclass('l-hidden')){return;} var g={getdata:function() {return g.data;},haschildren:function(treenodedata) {if(p.isleaf)return p.isleaf(treenodedata);return treenodedata.children?true:false;},getparenttreeitem:function(treenode,level) {var treeitem=$(treenode);if(treeitem.parent().hasclass("l-tree")) return null;if(level==undefined) {if(treeitem.parent().parent("li").length==0) return null;return treeitem.parent().parent("li")[0];} var currentlevel=parseint(treeitem.attr("outlinelevel"));var currenttreeitem=treeitem;for(var i=currentlevel-1;i>=level;i--) {currenttreeitem=currenttreeitem.parent().parent("li");} return currenttreeitem[0];},getchecked:function() {if(!p.checkbox)return null;var nodes=[];$(".l-checkbox-checked",g.tree).parent().parent("li").each(function() {var treedataindex=parseint($(this).attr("treedataindex"));nodes.push({target:this,data:po.getdatanodebytreedataindex(g.data,treedataindex)});});return nodes;},getselected:function() {var node={};node.target=$(".l-selected",g.tree).parent("li")[0];if(node.target) {var treedataindex=parseint($(node.target).attr("treedataindex"));node.data=po.getdatanodebytreedataindex(g.data,treedataindex);return node;} return null;},upgrade:function(treenode) {$(".l-note",treenode).each(function() {$(this).removeclass("l-note").addclass("l-expandable-open");});$(".l-note-last",treenode).each(function() {$(this).removeclass("l-note-last").addclass("l-expandable-open");});$("."+po.getchildnodeclassname(),treenode).each(function() {$(this).removeclass(po.getchildnodeclassname()).addclass(po.getparentnodeclassname(true));});},demotion:function(treenode) {if(!treenode&&treenode[0].tagname.tolowercase()!='li')return;var islast=$(treenode).hasclass("l-last");$(".l-expandable-open",treenode).each(function() {$(this).removeclass("l-expandable-open").addclass(islast?"l-note-last":"l-note");});$(".l-expandable-close",treenode).each(function() {$(this).removeclass("l-expandable-close").addclass(islast?"l-note-last":"l-note");});$("."+po.getparentnodeclassname(true),treenode).each(function() {$(this).removeclass(po.getparentnodeclassname(true)).addclass(po.getchildnodeclassname());});},collapseall:function() {$(".l-expandable-open",g.tree).click();},expandall:function() {$(".l-expandable-close",g.tree).click();},loaddata:function(node,url,param) {g.loading.show();param=param||{};$.ajax({type:'post',url:url,data:param,datatype:'json',success:function(data) {g.loading.hide();g.append(node,data);if(p.onsuccess)p.onsuccess(data);},error:function(xmlhttprequest,textstatus,errorthrown) {try {g.loading.hide();if(p.onerror) p.onerror(xmlhttprequest,textstatus,errorthrown);} catch(e) {}}});},clear:function() {$("> li",g.tree).each(function(){g.remove(this);});},remove:function(treenode) {var treedataindex=parseint($(treenode).attr("treedataindex"));var treenodedata=po.getdatanodebytreedataindex(g.data,treedataindex);if(treenodedata)po.settreedatastatus([treenodedata],'delete');var parentnode=g.getparenttreeitem(treenode);if(p.checkbox) {$(".l-checkbox",treenode).remove();po.setparentcheckboxstatus($(treenode));} $(treenode).remove();if(parentnode==null) {parentnode=g.tree.parent();} var treeitemlength=$("> ul > li",parentnode).length;if(treeitemlength>0) {$("> ul > li",parentnode).each(function(i,item) {if(i==0&&!$(this).hasclass("l-first")) $(this).addclass("l-first");if(i==treeitemlength-1&&!$(this).hasclass("l-last")) $(this).addclass("l-last");if(i==0&&i==treeitemlength-1&&!$(this).hasclass("l-onlychild")) $(this).addclass("l-onlychild");$("> div .l-note,> div .l-note-last",this).removeclass("l-note l-note-last").addclass(i==treeitemlength-1?"l-note-last":"l-note");po.settreeitem(this,{islast:i==treeitemlength-1});});}},append:function(parentnode,newdata) {if(!newdata||!newdata.length)return false;if(p.idfieldname&&p.parentidfieldname) newdata=po.convertdata(newdata);po.addtreedataindextodata(newdata);po.settreedatastatus(newdata,'add');po.appenddata(parentnode,newdata);if(!parentnode) {if($("> li:last",g.tree).length>0) po.settreeitem($("> li:last",g.tree)[0],{islast:false});var gridhtmlarr=po.gettreehtmlbydata(newdata,1,[],true);gridhtmlarr[gridhtmlarr.length-1]=gridhtmlarr[0]="";g.tree.append(gridhtmlarr.join(''));$(".l-body",g.tree).hover(function() {$(this).addclass("l-over");},function() {$(this).removeclass("l-over");});po.upadtetreewidth();return;} var treeitem=$(parentnode);var outlinelevel=parseint(treeitem.attr("outlinelevel"));var haschildren=$("> ul",treeitem).length>0;if(!haschildren) {treeitem.append("
      ");g.upgrade(parentnode);} if($("> .l-children > li:last",treeitem).length>0) po.settreeitem($("> .l-children > li:last",treeitem)[0],{islast:false});var islast=[];for(var i=1;i<=outlinelevel-1;i++) {var currentparenttreeitem=$(g.getparenttreeitem(parentnode,i));islast.push(currentparenttreeitem.hasclass("l-last"));} islast.push(treeitem.hasclass("l-last"));var gridhtmlarr=po.gettreehtmlbydata(newdata,outlinelevel+1,islast,true);gridhtmlarr[gridhtmlarr.length-1]=gridhtmlarr[0]="";$(">.l-children",parentnode).append(gridhtmlarr.join(''));po.upadtetreewidth();$(">.l-children .l-body",parentnode).hover(function() {$(this).addclass("l-over");},function() {$(this).removeclass("l-over");});}};var po={getdatanodebytreedataindex:function(data,treedataindex) {for(var i=0;i div .l-note",treeitem).removeclass("l-note").addclass("l-note-last");$(".l-children li",treeitem).find(".l-box:eq("+(outlinelevel-1)+")").removeclass("l-line");} else if(options.islast==false) {treeitem.removeclass("l-last");$("> div .l-note-last",treeitem).removeclass("l-note-last").addclass("l-note");$(".l-children li",treeitem).find(".l-box:eq("+(outlinelevel-1)+")").removeclass("l-line").addclass("l-line");}}},upadtetreewidth:function() {var treewidth=g.maxoutlinelevel*22;if(p.checkbox)treewidth+=22;if(p.parenticon||p.childicon)treewidth+=22;treewidth+=p.nodewidth;g.tree.width(treewidth);},getchildnodeclassname:function() {return'l-tree-icon-'+p.childicon;},getparentnodeclassname:function(isopen) {var nodeclassname='l-tree-icon-'+p.parenticon;if(isopen)nodeclassname+='-open';return nodeclassname;},gettreehtmlbydata:function(data,outlinelevel,islast,isexpand) {if(g.maxoutlinelevel