diff --git a/publiccms-parent/publiccms/src/main/resources/templates/admin/index.html b/publiccms-parent/publiccms/src/main/resources/templates/admin/index.html index 6e81558a7..50f72ca6d 100644 --- a/publiccms-parent/publiccms/src/main/resources/templates/admin/index.html +++ b/publiccms-parent/publiccms/src/main/resources/templates/admin/index.html @@ -132,6 +132,7 @@ window.TIMYMCE_FILETYPES = "<@sys.configData code='safe'>${object.allow_files!}"; window.CKEDITOR_BASEPATH = "${(parentSite!site).dynamicPath}resource/plugins/ckeditor/"; window.CKEDITOR_LANGUAGE = "<@t.page 'ckeditor.lang'/>"; + window.LANGUAGE = "<@t.page 'lang'/>"; window.LOADSCRIPTS_BASE = "${base}"; @@ -141,8 +142,6 @@ - - diff --git a/publiccms-parent/publiccms/src/main/webapp/resource/js/jui.min.js b/publiccms-parent/publiccms/src/main/webapp/resource/js/jui.min.js index 8d3292288..14ee6c00c 100644 --- a/publiccms-parent/publiccms/src/main/webapp/resource/js/jui.min.js +++ b/publiccms-parent/publiccms/src/main/webapp/resource/js/jui.min.js @@ -1 +1 @@ -var JUI={version:"1.7.0",regPlugins:[],keyCode:{ENTER:13,ESC:27,END:35,HOME:36,SHIFT:16,TAB:9,LEFT:37,RIGHT:39,UP:38,DOWN:40,DELETE:46,BACKSPACE:8,CHAR_S:83},eventType:{pageClear:"pageClear",editorSync:"editorSync",resizeGrid:"resizeGrid",resizeChart:"resizeChart",initEnvAfter:"initEnvAfter"},isOverAxis:function(x,reference,size){return referenceHttp status: "+xhr.status+" "+xhr.statusText+"
ajaxOptions: "+ajaxOptions+"
thrownError: "+thrownError+"
"):alert("Http status: "+xhr.status+" "+xhr.statusText+"\najaxOptions: "+ajaxOptions+"\nthrownError:"+thrownError)},ajaxDone:function(json){json[JUI.keys.statusCode]==JUI.statusCode.error?(json[JUI.keys.message]&&alertMsg&&alertMsg.error(json[JUI.keys.message]),json.fields&&$.each(json.fields.split(","),function(index,field){$("[name="+escapeJquery(field)+"]",$.pdialog.getCurrent()?$.pdialog.getCurrent():navTab.getCurrentPanel()).addClass("error")})):json[JUI.keys.statusCode]==JUI.statusCode.timeout?alertMsg?alertMsg.error(json[JUI.keys.message]||JUI.msg("sessionTimout"),{okCall:JUI.loadLogin}):JUI.loadLogin():json[JUI.keys.statusCode]==JUI.statusCode.okAndRefresh?json[JUI.keys.message]&&alertMsg&&alertMsg.correct(json[JUI.keys.message],{callback:function(){window.location.reload()}}):json[JUI.keys.message]&&alertMsg&&alertMsg.correct(json[JUI.keys.message])},init:function(_doc,options){var op=$.extend({loginUrl:"login.html",loginTitle:null,callback:null,debug:!1,statusCode:{}},options);this._set.loginUrl=op.loginUrl,this._set.loginTitle=op.loginTitle,this._set.debug=op.debug,$.extend(JUI.statusCode,op.statusCode),$.extend(JUI.keys,op.keys),$.extend(JUI.pageInfo,op.pageInfo),$.ajax({type:"GET",url:_doc,dataType:"html",cache:!1,error:function(xhr){alert(xhr.statusText)},success:function(html){$($.parseHTML(html,document,!0)).each(function(){var fragId=$(this).attr("id");fragId&&(JUI.frag[fragId]=$(this).text())}),"function"==typeof op.callback&&op.callback()}}),$(window).isBind(JUI.eventType.resizeChart)||$(window).on(JUI.eventType.resizeChart,null,null,function(){$(".chart").each(function(){$chart=$(this),$chart.data("id")&&window[$chart.data("id")]&&"function"==typeof window[$chart.data("id")].resize&&window[$chart.data("id")].resize()})});_doc=$(document);_doc.isBind(JUI.eventType.editorSync)||_doc.on(JUI.eventType.editorSync,null,null,function($box){$box=$box.target,$box=$($box);$("textarea.editor",$box).each(function(){"ckeditor"==$(this).attr("editorType")?CKEDITOR.instances[$(this).data("id")]&&CKEDITOR.instances[$(this).data("id")].updateElement():"tinymce"==$(this).attr("editorType")?tinymce.get($(this).data("id"))&&tinymce.get($(this).data("id")).save():UE.instants[$(this).data("id")]&&UE.instants[$(this).data("id")].sync()}),$("textarea.code",$box).each(function(){JUI.instances[$(this).data("id")]&&JUI.instances[$(this).data("id")].save()}),$(".miscSortDrag",$box).each(function(){var $sortBox=$(this);$sortBox.data("result")&&$sortBox.find($sortBox.data("result")).val(JUI.obj2str($sortBox.miscSortDragData($sortBox)))})}),_doc.isBind(JUI.eventType.pageClear)||_doc.on(JUI.eventType.pageClear,null,null,function($box){$box=$box.target,$box=$($box);$("textarea.editor",$box).each(function(){"ckeditor"==$(this).attr("editorType")?CKEDITOR.instances[$(this).data("id")]&&CKEDITOR.instances[$(this).data("id")].destroy():"tinymce"==$(this).attr("editorType")?tinymce.remove("#"+$(this).data("id")):UE.instants[$(this).data("id")]&&UE.instants[$(this).data("id")].destroy()}),$("textarea.code",$box).each(function(){JUI.instances[$(this).data("id")]&&(JUI.instances[$(this).data("id")].toTextArea(),delete JUI.instances[$(this).data("id")])}),$(".image-editor",$box).each(function(){JUI.instances[$(this).data("id")]&&delete JUI.instances[$(this).data("id")]}),$("[close-url]",$box).each(function(){$.getJSON($(this).attr("close-url"),function(data){})})})}};function html2Escape(sHtml){return Base64.encode(sHtml)}function escapeJquery(srcString){for(var escapseResult=srcString,jsSpecialChars=["\\","^","$","*","?",".","+","(",")","[","]","|","{","}"],jquerySpecialChars=["~","`","@","#","%","&","=","'",'"'," ",":",";","<",">",",","/"],i=0;i]*>/gi,""),tabid=$this.attr("rel")||"_blank",fresh=eval($this.attr("fresh")||"true"),external=eval($this.attr("external")||"false"),url=$this.attr("href").replaceTmById($(event.target).parents(".unitBox:first")),newWindow=navigator.platform.match("Mac")?event.metaKey:event.ctrlKey;return(JUI.debug(url),url.isFinishedTm())?(navTab.openTab(tabid,url,{title:title,fresh:fresh,external:external,focusNewWindow:newWindow}),!1):(alertMsg.error($this.attr("warn")||JUI.msg("alertSelectMsg")),!1)})}),$("a[target=dialog]",$p).each(function(){$(this).click(function(event){var $this=$(this),title=$this.attr("title")||$this.text(),rel=$this.attr("rel")||"_blank",options={},w=$this.attr("width"),h=$this.attr("height");w&&(options.width=w),h&&(options.height=h),options.max=eval($this.attr("max")||"false"),options.mask=eval($this.attr("mask")||"false"),options.maxable=eval($this.attr("maxable")||"true"),options.minable=eval($this.attr("minable")||"true"),options.fresh=eval($this.attr("fresh")||"true"),options.resizable=eval($this.attr("resizable")||"true"),options.drawable=eval($this.attr("drawable")||"true"),options.close=eval($this.attr("close")||""),options.param=$this.attr("param")||"",options.focusNewWindow=navigator.platform.match("Mac")?event.metaKey:event.ctrlKey;var url=$this.attr("href").replaceTmById($(event.target).parents(".unitBox:first"));return(JUI.debug(url),url.isFinishedTm())?($.pdialog.open(url,rel,title,options),!1):(alertMsg.error($this.attr("warn")||JUI.msg("alertSelectMsg")),!1)})}),$("a[target=ajax]",$p).each(function(){$(this).click(function(){var $rel,$this=$(this),rel=$this.attr("rel");return rel&&($rel=$("#"+rel)).loadUrl($this.attr("href"),{},function(){$rel.find("[layoutH]").layoutH()}),!1})}),$.fn.ajaxTodo&&$("a[target=ajaxTodo]",$p).ajaxTodo(),$.fn.dwzExport&&$("a[target=dwzExport]",$p).dwzExport(),$.fn.lookup&&$("a[lookupGroup]",$p).lookup(),$.fn.selectedTodo&&$("a[target=selectedTodo]",$p).selectedTodo()}!function($){$.setRegional=function(key,value){$.regional||($.regional={}),$.regional[key]=value},$.setMessage=function(key,value){JUI._msg[key]=value},$.fn.extend({ajaxUrl:function(op){var $this=$(this);$this.trigger(JUI.eventType.pageClear),$.ajax({type:op.type||"GET",url:op.url,data:op.data,cache:!1,success:function(response){var json=JUI.jsonEval(response);json[JUI.keys.statusCode]==JUI.statusCode.error?json[JUI.keys.message]&&alertMsg.error(json[JUI.keys.message]):json[JUI.keys.statusCode]==JUI.statusCode.timeout?($this.html(response),$.pdialog&&$.pdialog.checkTimeout(),navTab&&navTab.checkTimeout(),alertMsg.error(json[JUI.keys.message]||JUI.msg("sessionTimout"),{okCall:function(){JUI.loadLogin()}})):($this.html(response).initUI(),"function"==typeof op.callback&&op.callback(response))},error:JUI.ajaxError,statusCode:{503:function(xhr,ajaxOptions,thrownError){alert(JUI.msg("statusCode_503")||thrownError)}}})},loadUrl:function(url,data,callback){$(this).ajaxUrl({url:url,data:data,callback:callback})},initUI:function(){return this.each(function(){"function"==typeof initUI&&initUI(this)})},layoutH:function($refBox){return this.each(function(){var $this=$(this),iH=($refBox=$refBox||$this.parents("div.layoutBox").first()).height(),iLayoutH=0;0!=$this.parents(".rightPageContent").length?iLayoutH=$this.getSiblingsElemsH($this.parents(".rightPageContent")):0!=$this.parents(".leftPageContent").length?iLayoutH=$this.getSiblingsElemsH($this.parents(".leftPageContent")):0!=$this.parents(".pageFormContent").length?iLayoutH=$this.getSiblingsElemsH($this.parents(".pageFormContent"))+30:0!=$this.parents(".page").length?iLayoutH=$this.getSiblingsElemsH($this.parents(".page")):0!=$this.parents(".dialogContent").length&&(iLayoutH=$this.getSiblingsElemsH($this.parents(".dialogContent")));iH=50'):$this.outerHeight(iH).css("overflow","auto")})},getSiblingsElemsH:function(tabsHeaderH){var $page=tabsHeaderH,headerH=this.getElemsH($page,".pageHeader"),formBarH=this.getElemsH($page,".formBar"),contentTitleH=this.getElemsH($page,".contentTitle"),gridHeaderH=this.getElemsH($page,".gridHeader"),tabsHeaderH=this.getElemsH($page,".tabsHeader");return headerH+this.getElemsH($page,".pageBar.panelBar")+gridHeaderH+this.getElemsH($page,".panelBar:not(.pageBar)")+formBarH+tabsHeaderH+contentTitleH},getElemsH:function($elem,elem){var h=0,$elem=$elem.find(elem),isSilbinsElem=!0;if(0!=$elem.length&&0==this.find(elem).length){for(var $silbingsElems=this.siblings(),i=0;i<$silbingsElems.length;i++)if(0!=$silbingsElems.eq(i).find(elem).length){isSilbinsElem=!1;break}isSilbinsElem&&(h=$elem.outerHeight(!0))}return h},isTag:function(tn){return!(!tn||null==$(this)[0])&&$(this)[0].tagName.toLowerCase()==tn},isBind:function(type){var _events=$(this).data("events");return _events&&type&&_events[type]}}),$.extend(String.prototype,{isPositiveInteger:function(){return new RegExp(/^[1-9]\d*$/).test(this)},isInteger:function(){return new RegExp(/^\d+$/).test(this)},isNumber:function(value,element){return new RegExp(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/).test(this)},trimstr:function(){return this.replace(/(^\s*)|(\s*$)|\r|\n/g,"")},startsWith:function(pattern){return 0===this.indexOf(pattern)},endsWith:function(pattern){var d=this.length-pattern.length;return 0<=d&&this.lastIndexOf(pattern)===d},replaceSuffix:function(index){var i=this.lastIndexOf("[");return this.substring(0,i)+this.substring(i).replace(/\[[0-9]+\]/,"["+index+"]").replace("#index#",index)},encodeTXT:function(){return this.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll(" "," ")},replaceAll:function(os,ns){return this.replace(new RegExp(os,"gm"),ns)},replaceTm:function(data){return data?this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){return data[$1.replace(/[{}]+/g,"")]}):this},replaceTmById:function(_box){var $parent=_box||$(document);return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){var $input=$parent.find("#"+$1.replace(/[{}]+/g,""));return $input.val()?$input.val():$1})},isFinishedTm:function(){return!new RegExp("{[A-Za-z_]+[A-Za-z0-9_]*}").test(this)},skipChar:function(ch){return this&&0!==this.length?this.charAt(0)===ch?this.substring(1).skipChar(ch):this:""},isValidPwd:function(){return new RegExp(/^([_]|[a-zA-Z0-9]){6,32}$/).test(this)},isValidMail:function(){return new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(this.trimstr())},isUrl:function(){return new RegExp(/^([a-zA-z]+:)?\/\/([a-zA-Z0-9\-\.]+)([-\w .\/?%&=:]*)$/).test(this)},isExternalUrl:function(){var domain=document.domain;return""==domain&&(domain="localhost"),this.isUrl()&&-1==this.indexOf("//"+domain)}})}(jQuery),function(){var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(x){return(x<0||9'+t+""}for(t=1;t<=dw.days;t++){var _ctrClass=minDate<=(_date=new Date(dw.year,dw.month-1,t))&&_date<=maxDate?"":"disabled";t==dw.day?dayStr+='
'+t+"
":dayStr+='
'+t+"
"}for(var _date,t=1;t<=42-startDay-dw.days;t++)dayStr+='
'+t+"
";var $hour,$minute,$second,$inputs,$days=$(setting.days$).html(dayStr).find("dd");$days.not(".disabled").click(function(){var $day=$(this);dp.hasTime()?($days.removeClass("slt"),$day.addClass("slt")):($this.val(dp.formatDate(dp.changeDay($day.attr("day"),$day.attr("chMonth")))),closeCalendar())}),dp.hasDate()||$(setting.main$).addClass("nodate"),dp.hasTime()&&($("#calendar .time").show(),$hour=dw.hour,$minute=dw.minute,$second=dw.second,dp.opts.defaultTime&&!$this.val()&&(timeStr=dp.opts.defaultTime.split(":"),$hour=parseInt(timeStr[0]),$minute=parseInt(timeStr[1]),$second=parseInt(timeStr[2])),$minute=parseInt($minute/dp.opts.mmStep)*dp.opts.mmStep,$second=dp.hasSecond()?$second:0,$hour=$(setting.hour$).val($hour).focus(function(){changeTmMenu("hh")}),$minute=$(setting.minute$).val($minute).attr("step",dp.opts.mmStep).focus(function(){changeTmMenu("mm")}),$second=$(setting.second$).val($second).attr("step",dp.opts.ssStep).focus(function(){changeTmMenu("ss")}),$hour.add($minute).add($second).click(function(){return!1}),clickTmMenu($hour,"hh"),clickTmMenu($minute,"mm"),clickTmMenu($second,"ss"),$(setting.box$).click(function(){changeTmMenu()}),($inputs=$(setting.tmInputs$)).keydown(keydownInt).each(function(){var $input=$(this);$input.keyup(function(){changeTm($input,0)})}),$(setting.tmUp$).click(function(){$inputs.filter(".slt").each(function(){changeTm($(this),1)})}),$(setting.tmDown$).click(function(){$inputs.filter(".slt").each(function(){changeTm($(this),-1)})}),dp.hasHour()||$hour.attr("disabled",!0),dp.hasMinute()||$minute.attr("disabled",!0),dp.hasSecond()||$second.attr("disabled",!0))}function closeCalendar(){$(setting.box$).remove(),$(document).off("click",null,closeCalendar)}$this.click(function(event){closeCalendar();var dp=new Datepicker($this.val(),opts),offset=$this.offset(),iTop=offset.top+this.offsetHeight;$($.parseHTML(JUI.frag.calendarFrag,document,!0)).appendTo("body").css({left:offset.left+"px",top:iTop+"px"}).show().click(function(event){event.stopPropagation()});var dayNames="";$.each($.regional.datepicker.dayNames,function(i,v){dayNames+="
"+v+"
"}),$(setting.dayNames$).html(dayNames);var dw=dp.getDateWrap(),$year=$(setting.year$),iBoxH=dp.getMinDate().getFullYear(),yearend=dp.getMaxDate().getFullYear();for(y=iBoxH;y<=yearend;y++)$year.append('");var $month=$(setting.month$);$.each($.regional.datepicker.monthNames,function(m,v){m+=1;$month.append('")}),generateCalendar(dp),$year.add($month).change(function(){dp.changeDate($year.val(),$month.val()),generateCalendar(dp)});iBoxH=$(setting.box$).outerHeight(!0);return iBoxH$(window).height()-iBoxH&&$(setting.box$).css("top",offset.top-iBoxH),$(setting.close$).click(function(){closeCalendar()}),$(setting.clearBut$).click(function(){$this.val(""),closeCalendar()}),$(setting.okBut$).click(function(){var date=$(setting.days$).find("dd.slt");if(date.hasClass("disabled"))return!1;date=dp.changeDay(date.attr("day"),date.attr("chMonth"));dp.hasTime()&&(date.setHours(parseInt($(setting.hour$).val())),date.setMinutes(parseInt($(setting.minute$).val())),date.setSeconds(parseInt($(setting.second$).val()))),$this.val(dp.formatDate(date)),closeCalendar()}),$(document).on("click",null,null,closeCalendar),!1}),$this.next().is(setting.calIcon$)&&$this.next().click(function(){return $this.trigger("click"),!1})})};var Datepicker=function(sDate,now){this.opts=$.extend({pattern:"yyyy-MM-dd",minDate:"1970-01-01",maxDate:"2099-12-31",mmStep:1,ssStep:1},now);now=new Date;this.opts.minDate=now.formatDateTm(this.opts.minDate),this.opts.maxDate=now.formatDateTm(this.opts.maxDate),this.sDate=sDate.trimstr()};$.extend(Datepicker.prototype,{get:function(name){return this.opts[name]},_getDays:function(y,m){return 2==m?y%4||!(y%100)&&y%400?28:29:/4|6|9|11/.test(m)?30:31},_minMaxDate:function(sDate){var _count=sDate.split("-").length-1,_format="y-M-d";return 1==_count?_format="y-M":0==_count&&(_format="y"),sDate.parseDate(_format)},getMinDate:function(){return this._minMaxDate(this.opts.minDate)},getMaxDate:function(){var _day=this.opts.maxDate,_count=_day.split("-").length-1,_date=this._minMaxDate(_day);return _count<2&&(_day=this._getDays(_date.getFullYear(),_date.getMonth()+1),_date.setDate(_day),0==_count&&_date.setMonth(11)),_date},getDateWrap:function(date){var y=(date=date||(this.parseDate(this.sDate)||new Date)).getFullYear(),m=date.getMonth()+1,days=this._getDays(y,m);return{year:y,month:m,day:date.getDate(),hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds(),days:days,date:date}},changeDate:function(y,m,date){date=new Date(y,m-1,date||1);return this.sDate=this.formatDate(date),date},changeDay:function(day,chMonth){chMonth=chMonth||0;var dw=this.getDateWrap();return this.changeDate(dw.year,dw.month+parseInt(chMonth),day)},parseDate:function(sDate){return sDate?sDate.parseDate(this.opts.pattern):null},formatDate:function(date){return date.formatDate(this.opts.pattern)},hasHour:function(){return-1!=this.opts.pattern.indexOf("H")},hasMinute:function(){return-1!=this.opts.pattern.indexOf("m")},hasSecond:function(){return-1!=this.opts.pattern.indexOf("s")},hasTime:function(){return this.hasHour()||this.hasMinute()||this.hasSecond()},hasDate:function(){for(var _dateKeys=["y","M","d","E"],i=0;i<_dateKeys.length;i++)if(-1!=this.opts.pattern.indexOf(_dateKeys[i]))return!0;return!1}})}(jQuery),function($){$.scrollPosParents=function($el){var $el=$($el),scrollPos={top:0,left:0};return $el.parents().each(function(){var $p=$(this);scrollPos.top+=$p.scrollTop(),scrollPos.left+=$p.scrollLeft()}),scrollPos},$.fn.jDrag=function(options){return"string"==typeof options&&"destroy"==options?this.each(function(){$(this).off("mousedown",$.rwdrag.start),$.data(this,"pp-rwdrag",null)}):this.each(function(){var select=$(this);$.data($.rwdrag,"pp-rwdrag",{options:$.extend({el:select,obj:select},options)}),options.event?$.rwdrag.start(options.event):(select=options.selector,$(select,obj).on("mousedown",$.rwdrag.start))})},$.rwdrag={start:function(e){document.onselectstart=function(e){return!1};var me=$.data(this,"pp-rwdrag"),el=me.options.el[0];$.data(el,"pp-rwdrag",{options:me.options}),$.rwdrag.current||((me=e).touches&&(me=me.touches[0]),$.rwdrag.current={el:el,oleft:parseInt(el.style.left)||0,otop:parseInt(el.style.top)||0,ox:me.pageX||me.screenX,oy:me.pageY||me.screenY},e.touches?$(document).on("touchend",$.rwdrag.stop).on("touchmove",$.rwdrag.drag):$(document).on("mouseup",$.rwdrag.stop).on("mousemove",$.rwdrag.drag))},drag:function(e){e=e||window.event;var current=$.rwdrag.current,data=$.data(current.el,"pp-rwdrag");me=e,me.touches&&(me=me.touches[0]);var selector,left=current.oleft+(me.pageX||me.clientX)-current.ox,top=current.otop+(me.pageY||me.clientY)-current.oy;return"horizontal"==data.options.move?(data.options.minW&&left>=$(data.options.obj).cssv("left")+data.options.minW&&data.options.maxW&&left<=$(data.options.obj).cssv("left")+data.options.maxW||data.options.scop&&(!data.options.relObj||left-parseInt(data.options.relObj.style.left)>data.options.cellMinW))&&(current.el.style.left=left+"px"):"vertical"==data.options.move?current.el.style.top=top+"px":left>=2*-(selector=data.options.selector?$(data.options.selector,data.options.obj):$(data.options.obj)).outerWidth()/3&&left+selector.outerWidth()/3<$(window).width()&&top+selector.outerHeight()<$(window).height()&&(current.el.style.left=left+"px",current.el.style.top=top+"px"),data.options.drag&&data.options.drag.apply(current.el,[current.el,e]),$.rwdrag.preventEvent(e)},stop:function(e){var current=$.rwdrag.current,data=$.data(current.el,"pp-rwdrag");return e.touches?$(document).off("touchmove",$.rwdrag.drag).off("touchend",$.rwdrag.stop):$(document).off("mousemove",$.rwdrag.drag).off("mouseup",$.rwdrag.stop),data.options.stop&&data.options.stop.apply(current.el,[current.el,e]),$.rwdrag.current=null,document.onselectstart=function(e){return!0},$.rwdrag.preventEvent(e)},preventEvent:function(e){return e.stopPropagation&&e.stopPropagation(),!!e.touches||(e.preventDefault&&e.preventDefault(),!1)}}}(jQuery),function($){var _op={cursor:"move",sortBoxs:"div.sortDrag",items:">.dragItem",selector:"",zIndex:1e3};JUI.sortDrag={_onDrag:!1,start:function($sortBox,$item,event,op){var me=this;if(me._onDrag)return setTimeout(function(){me._onDrag=!1},500),!1;me._onDrag=!0;var $placeholder=this._createPlaceholder($item),$helper=$item.clone(),position=$item.position();$.scrollPosParents($sortBox);return $helper.data("$sortBox",$sortBox).data("op",op).data("$item",$item).data("$placeholder",$placeholder),$helper.addClass("sortDragHelper").css({position:"absolute",top:position.top,left:position.left,zIndex:op.zIndex,width:$item.width()+"px",height:$item.height()+"px"}).jDrag({selector:op.selector,drag:this.drag,stop:this.stop,event:event}),$item.before($placeholder).before($helper).hide(),!1},drag:function(el,event){var $helper=$(el),$sortBox=$helper.data("$sortBox"),$placeholder=$helper.data("$placeholder"),$items=$sortBox.find($helper.data("op").items).filter(":visible").filter(":not(.sortDragPlaceholder, .sortDragHelper)"),helperPos=$helper.position(),$overBox=JUI.sortDrag._getOverSortBox($helper);if(1==$sortBox.data("over-sort")&&0<$overBox.length&&$overBox[0]!=$sortBox[0])$placeholder.appendTo($overBox),$helper.data("$sortBox",$overBox);else if($items.length)for(var i=0;i<$items.length;i++){var $this=$items.eq(i),position=$this.position();if(helperPos.top>position.top+10)$this.after($placeholder);else if(helperPos.top<=position.top||helperPos.left<=position.left){$this.before($placeholder);break}}},stop:function(){var $helper=$(arguments[0]),$item=$helper.data("$item"),$placeholder=$helper.data("$placeholder");$item.insertAfter($placeholder).show(),$placeholder.remove(),$helper.remove(),JUI.sortDrag._onDrag=!1},_createPlaceholder:function($item){return $("<"+$item[0].nodeName+' class="sortDragPlaceholder"/>').css({width:$item.outerWidth()+"px",height:$item.outerHeight()+"px",marginTop:$item.css("marginTop"),marginRight:$item.css("marginRight"),marginBottom:$item.css("marginBottom"),marginLeft:$item.css("marginLeft")})},_getOverSortBox:function($item){var op=$item.offset(),y=op.top,x=op.left+$item.width()/2,op=$.extend({},_op,$item.data("op"));return $(op.sortBoxs).filter(":visible").filter(function(){var $sortBox=$(this);return!$sortBox.data("accept")||-1<$sortBox.data("accept").split(",").indexOf($item.data("type"))}).filter(function(){var sortBoxW=$(this),sortBoxPos=sortBoxW.offset(),sortBoxH=sortBoxW.height(),sortBoxW=sortBoxW.width();return JUI.isOver(y,x,sortBoxPos.top,sortBoxPos.left,sortBoxH,sortBoxW)})}},$.fn.sortDrag=function(options){return this.each(function(){var op=$.extend({},_op,options),$sortBox=$(this);$sortBox.attr("selector")&&(op.selector=$sortBox.attr("selector")),$sortBox.find(op.items).each(function(i){var $item=$(this),$selector=$item;op.selector&&($selector=$item.find(op.selector).css({cursor:op.cursor})),op.refresh&&$selector.off("mousedown touchstart"),$selector.on("mousedown touchstart",function(event){$sortBox.hasClass("disabled")||$(event.target).is("input")||$(event.target).is("a")||(JUI.sortDrag.start($sortBox,$item,event,op),event.touchs||event.preventDefault())})}),$sortBox.find(".close").one("mousedown touchstart",function(event){return $(this).parent().remove(),!1})})}}(jQuery),function($){JUI.miscDrag={start:function($sortBox,$item,event,op){var $helper=$item.clone(),position=$item.position();return $helper.addClass("sortDragHelper").css({position:"absolute",top:position.top+$sortBox.scrollTop(),left:position.left,zIndex:op.zIndex,minWidth:$item.width()+"px",height:$item.height()+"px"}).jDrag({drag:this.drag,stop:this.stop,event:event}),$helper.data("$sortBox",$sortBox),$item.before($helper),!1},drag:function(el,event){},stop:function(el,event){var $dragBox,id,sequence,overBoxPos,$helper=$(el),rel=$helper.data("$sortBox"),dragBoxPos=JUI.miscDrag._getOverSortBox($helper);0 div").length,overBoxPos=dragBoxPos.position(),dragBoxPos=$dragBox.position(),$dragBox.css({height:"auto",top:dragBoxPos.top-overBoxPos.top+"px",left:dragBoxPos.left-overBoxPos.left+"px"}),(rel=rel.attr("rel"))&&$('

'+sequence+"

").appendTo(rel)):$helper.remove()},_getOverSortBox:function($item){var op=$item.offset(),y=op.top+$item.height()/2,x=op.left+$item.width()/2,op=$item.data("op");return $(op.sortBoxs).filter(":visible").filter(function(){var $sortBox=$(this);return!$sortBox.data("accept")||-1<$sortBox.data("accept").split(",").indexOf($item.data("type"))}).filter(function(){var sortBoxW=$(this),sortBoxPos=sortBoxW.offset(),sortBoxH=sortBoxW.height(),sortBoxW=sortBoxW.width();return JUI.isOver(y,x,sortBoxPos.top,sortBoxPos.left,sortBoxH,sortBoxW)})},_createPlaceholder:function($item){return $("<"+$item[0].nodeName+' class="sortDragPlaceholder"/>').css({height:$item.outerHeight()+"px",marginTop:$item.css("marginTop"),marginRight:$item.css("marginRight"),marginBottom:$item.css("marginBottom"),marginLeft:$item.css("marginLeft")})},startSortDrag:function($sortBox,$item,event,op){var $placeholder=this._createPlaceholder($item),$helper=$item.clone(),position=$item.position();return $helper.data("$sortBox",$sortBox).data("op",op).data("$item",$item).data("$placeholder",$placeholder),$helper.addClass("sortDragHelper").css({position:"absolute",top:position.top+$sortBox.scrollTop(),left:position.left,zIndex:op.zIndex,width:$item.width()+"px",height:$item.height()+"px"}).jDrag({drag:this.dragSortDrag,stop:this.stopSortDrag,event:event}),$item.before($helper).before($placeholder),!1},dragSortDrag:function(el,event){var $helper=$(el),$sortBox=$helper.data("$sortBox"),$placeholder=$helper.data("$placeholder"),$overBox=$helper.parents(".unitBox:first"),position=$helper.position();$helper.css({top:position.top+$overBox.scrollTop()});$overBox=JUI.miscDrag._getOverSortBox($helper);if(0<$overBox.length&&$overBox[0]!=$sortBox[0]){var $items=$overBox.find(">.dragItem").filter(":visible").filter(":not(.sortDragPlaceholder, .sortDragHelper)");if($items.length){helperPos=$helper.offset();for(var i=0;i<$items.length;i++){var $this=$items.eq(i),position=$this.offset();if(helperPos.top>position.top+10)$this.after($placeholder);else if(helperPos.top<=position.top||helperPos.left<=position.left){$this.before($placeholder);break}}}else $placeholder.appendTo($overBox)}},stopSortDrag:function(){var $destBox,$result,$helper=$(arguments[0]),$sortBox=$helper.data("$sortBox"),$placeholder=$helper.data("$placeholder"),$item=$helper.data("$item");$placeholder&&$placeholder.is(":visible")?($destBox=$placeholder.parents(".sortDrag:first"),$result=$helper.html(),($result=$('
'+$result+"
")).attr("data-id",$helper.data("id")),$result.attr("data-type",$helper.data("type")),$result.insertAfter($placeholder).show(),"function"==typeof initLink&&initLink($result),$placeholder.remove(),$helper.remove(),1!=$sortBox.data("duplicate")&&$item.remove(),$.fn.sortDrag&&$destBox.sortDrag({refresh:!0})):($placeholder.remove(),$helper.remove())}},$.fn.extend({miscDrag:function(options){var op=$.extend({cursor:"move",sortBoxs:"div.miscDrag",items:"> dt .dragBox",zIndex:1e3},options);return this.each(function(){var $box=$(this);$box.find(op.items).each(function(i){var $item=$(this);$item.on("mousedown touchstart",function(event){JUI.miscDrag.start($box,$item,event,op),event.touchs||event.preventDefault()})})})},miscDragData:function(){for(var $miscDrag=$(this),$miscSortDrag=$($miscDrag.attr("rel")),$dragBoxList=$miscDrag.find("dd .dragBox"),$sortDragList=$miscSortDrag.find(".sortDrag"),data=[],i=0;i<$dragBoxList.length;i++){var $dragBox=$dragBoxList.eq(i),$sortDrag=$sortDragList.eq(i),$dragBoxPos=$dragBox.position(),dataItem={id:$dragBox.data("id"),top:parseInt($dragBoxPos.top),left:parseInt($dragBoxPos.left),items:[]};$sortDrag.find(".dragItem").each(function(index){var $dragItem=$(this);$dragItem.position();dataItem.items.push({id:$dragItem.data("id")})}),data.push(dataItem)}return data},miscSortDragData:function(){var $miscSortDrag=$(this);return function fillData($sortDragList){for(var data=[],i=0;i<$sortDragList.length;i++){var $sortDrag=$sortDragList.eq(i),dataItem={items:[]};$sortDrag.data("id")&&(dataItem.id=$sortDrag.data("id")),$sortDrag.find(">.dragItem").each(function(){var $dragItem=$(this),itemData={id:$dragItem.data("id")};$dragItem.find(">.ctl-label>:input").each(function(){var $lable=$(this),lableName=$lable.data("name");lableName&&("checkbox"==$lable.attr("type")?itemData[lableName]=$lable.is(":checked"):itemData[lableName]=$lable.val())}),$dragItemSortDragList=$dragItem.find(">.ctl-label .sortDrag"),$dragItemSortDragList.length&&(itemData.items=fillData($dragItemSortDragList)),dataItem.items.push(itemData)}),data.push(dataItem)}return data}($miscSortDrag.find(".sortDrag[data-parent="+$miscSortDrag.data("id")+"]"))},miscSortDrag:function(options){var op=$.extend({cursor:"move",sortBoxs:"dl.miscSortDrag .sortDrag",items:"> dt .dragItem",zIndex:1e3},options);return this.each(function(){var $sortBox=$(this);$sortBox.find(op.items).each(function(i){var $item=$(this);$item.on("mousedown touchstart",function(event){JUI.miscDrag.startSortDrag($sortBox,$item,event,op),event.touchs||event.preventDefault()})})})}})}(jQuery),function($){$.extend($.fn,{jTree:function(options){var op=$.extend({checkFn:null,selected:"selected",exp:"expandable",coll:"collapsable",firstExp:"first_expandable",firstColl:"first_collapsable",lastExp:"last_expandable",lastColl:"last_collapsable",folderExp:"folder_expandable",folderColl:"folder_collapsable",endExp:"end_expandable",endColl:"end_collapsable",file:"file",ck:"checked",unck:"unchecked",async:"_src"},options);return this.each(function(){var $this=$(this),cnum=$this.children().length;$(">li",$this).each(function(){var $li=$(this),first=!$li.prev()[0],last=!$li.next()[0];$li.genTree({root:$this,icon:$this.hasClass("treeFolder"),ckbox:$this.hasClass("treeCheck"),excludeParent:$this.hasClass("excludeParent"),options:op,level:0,exp:1'),$("#"+sTarget,$this).val($li.attr("rel"))),$(".ckbox",parent).trigger("click"),event.stopPropagation(),$(document).trigger("click"),!$(this).attr("target"))return!1})},1)})},subTree:function(op,level){return this.each(function(){$(">li",this).each(function(){var $this=$(this),isLast=!$this.next()[0];$this.genTree({root:op.root,icon:op.icon,ckbox:op.ckbox,excludeParent:op.excludeParent,exp:isLast?op.options.lastExp:op.options.exp,coll:isLast?op.options.lastColl:op.options.coll,options:op.options,level:level,space:isLast?null:op.space,showSub:op.showSub,isLast:isLast})})})},genTree:function(options){var op=$.extend({root:options.root,icon:options.icon,ckbox:options.ckbox,excludeParent:options.excludeParent,exp:"",coll:"",showSub:!1,level:0,options:null,isLast:!1},options);return this.each(function(){var node=$(this),tree=$(">ul",node),showIcon=node.parent().prev(),checked="unchecked";op.ckbox&&$(">.checked",showIcon).length<0&&(checked="checked"),0"),showIcon=op.icon&&!tree.hasClass("noFolder"),$(">div",node).prepend((op.ckbox?'
':"")+(showIcon?'
':'
')),0div>div."+op.options.folderColl+",>div>div."+op.options.folderExp+",>div>a",node).click(function(){if(node.attr(op.options.async)&&($.ajax({type:"get",url:node.attr(op.options.async),async:!1,data:{},success:function(response){node.append(response),initLink(tree=$(">ul",node).hide()),$("a",tree).click(function(event){$("div."+op.options.selected,op.root).removeClass(op.options.selected);var parent=$(this).parent().addClass(op.options.selected),$li=$(this).parents("li:first"),sTarget=$li.attr("target");if(sTarget&&(0==$("#"+sTarget,op.root).length&&op.root.prepend(''),$("#"+sTarget,op.root).val($li.attr("rel"))),$(".ckbox",parent).trigger("click"),event.stopPropagation(),$(document).trigger("click"),!$(this).attr("target"))return!1}),node.removeAttr(op.options.async)},error:JUI.ajaxError}),node.attr(op.options.async)))return!1;$(">li:first",tree).children(":first").isTag("a")&&tree.subTree(op,op.level+1);var isA=$(this).isTag("a"),$this=$(">div>div."+op.coll+",>div>div."+op.exp,node);return isA&&!tree.is(":hidden")||($this.toggleClass(op.exp).toggleClass(op.coll),op.icon&&$(">div>div",node).last().toggleClass(op.options.folderExp).toggleClass(op.options.folderColl)),tree.is(":hidden")?tree.slideDown(100):isA||tree.slideUp(100),!1}),addSpace(op.level,node),op.showSub&&tree.subTree(op,op.level+1)):(node.children().wrap("
"),$(">div",node).prepend((op.ckbox?'
':"")+(op.icon?'
':'
')),op.icon&&$(">div>div."+op.options.file,node).click(function(){return $(this).next().click(),!1}),addSpace(op.level,node)),op.ckbox&&node._check(op),$.support.leadingWhitespace||$(">div",node).click(function(){return $("a",this).trigger("click"),!1})});function addSpace(level,node){if(0';if(1div>div",parent).filter(":first"),prev="";1',next=next.next(),level--;plist=prev+plist}$(">div",node).prepend(plist)}}},_check:function(op){var node=$(this),ckbox=$(">div>.ckbox",node),$input=node.find("a"),tname=$input.attr("tname"),tvalue=$input.attr("tvalue"),attrs="";tname&&(attrs+='name="'+tname+'" '),tvalue&&(attrs+='value="'+tvalue+'" '),ckbox.append('").click(function(){var cked=ckbox.hasClass("checked"),aClass=cked?"unchecked":"checked",rClass=cked?"checked":"unchecked";return ckbox.removeClass(rClass).removeClass(cked?"":"indeterminate").addClass(aClass),$("input",ckbox).prop("checked",!cked),$(">ul",node).find("li").each(function(){$("div.ckbox",this).removeClass(rClass).removeClass(cked?"":"indeterminate").addClass(aClass).find("input").prop("checked",!cked)}),$(node)._checkParent(op.excludeParent),!1}),$input.attr("checked")&&(ckbox.find("input").prop("checked",!0),ckbox.removeClass("unchecked").addClass("checked"),$(node)._checkParent(op.excludeParent))},_checkParent:function(excludeParent){var parent,ckbox,aClass,$checkbox;$(this).parent().hasClass("tree")||(parent=$(this).parent().parent(),ckbox=(aClass=$(">ul",parent)).find(">li>a").length+aClass.find("div.ckbox").length,aClass=($checkbox=aClass.find("div.checked").length)==ckbox?"checked":0!=$checkbox?"indeterminate":"unchecked",$checkbox=$checkbox!=ckbox&&0!=$checkbox?"checked":"indeterminate",$(">div>.ckbox",parent).removeClass("unchecked").removeClass("checked").removeClass($checkbox).addClass(aClass),$checkbox=$(":checkbox",parent),"checked"==aClass?($checkbox.prop("checked",!0),$(">div>.ckbox",parent).find("input").prop("checked",!0)):"unchecked"==aClass?$checkbox.removeAttr("checked"):"indeterminate"!=aClass||excludeParent||$(">div>.ckbox",parent).find("input").prop("checked",!0),parent._checkParent(excludeParent))}})}(jQuery),function($){var jmenus={};function completed(cancel){var options;$.data(this,"jui-accordion")&&((options=$.data(this,"jui-accordion").options).running=cancel?0:--options.running,options.running||(options.clearStyle&&options.toShow.add(options.toHide).css({height:"",overflow:""}),$(this).triggerHandler("change.jui-accordion",[options.data],options.change)))}function toggle(toShow,toHide,complete,clickedActive,down){var options=$.data(this,"jui-accordion").options;options.toShow=toShow,options.toHide=toHide,options.data=complete;var callback,scope,complete=(callback=completed,scope=this,function(){return callback.apply(scope,arguments)});options.running=(0==toHide.length?toShow:toHide).length,options.animated?!options.alwaysOpen&&clickedActive?$.jui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoheight:options.autoheight}):$.jui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoheight:options.autoheight}):(!options.alwaysOpen&&clickedActive?toShow.toggle():(toHide.hide(),toShow.show()),complete(!0))}function clickHandler(down){var options=$.data(this,"jui-accordion").options;if(options.disabled)return!1;if(!down.target&&!options.alwaysOpen){options.active.find("h2").toggleClass(options.selectedClass),options.active.find("h2 .icon").toggleClass(options.selectedIconClass);var toHide=options.active.next(),data={instance:this,options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=options.active=$([]);return toggle.call(this,toShow,toHide,data),!1}var clicked=$(down.target);if(clicked.parents(options.header).length)for(;!clicked.is(options.header);)clicked=clicked.parent();var clickedActive=clicked[0]==options.active[0];if(options.running||options.alwaysOpen&&clickedActive)return!1;if(clicked.is(options.header)){options.active.find("h2").toggleClass(options.selectedClass),options.active.find("h2 .icon").toggleClass(options.selectedIconClass),clickedActive||(clicked.find("h2").addClass(options.selectedClass),clicked.find("h2 .icon").toggleClass(options.selectedIconClass));toShow=clicked.next(),toHide=options.active.next(),data={instance:this,options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);return options.active=clickedActive?$([]):clicked,toggle.call(this,toShow,toHide,data,clickedActive,down),!1}}function findActive(headers,selector){return null!=selector?"number"==typeof selector?headers.eq(selector):headers.not(headers.not(selector)):!1===selector?$([]):headers.eq(0)}$.jui=$.jui||{},$.fn.extend({accordion:function(options,data){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var accordion;options.fillSpace&&(jmenus[options.fillSpace]=this),"string"==typeof options?(accordion=$.data(this,"jui-accordion"))[options].apply(accordion,args):$(this).is(".jui-accordion")||$.data(this,"jui-accordion",new $.jui.accordion(this,options))})},activate:function(index){return this.accordion("activate",index)}}),$.jui.accordion=function(container,options){var maxHeight,parent,height,os,obj;this.options=options=$.extend({},$.jui.accordion.defaults,options),this.element=container,$(container).addClass("jui-accordion"),options.headers=$(container).find(options.header),options.active=findActive(options.headers,options.active),options.fillSpace?(parent=options.fillSpace,(obj=jmenus[parent])&&(parent=$(obj).parent(),height=parent.height()-$(".accordionHeader",obj).length*$(".accordionHeader:first-child",obj).outerHeight(),os=parent.children().not(obj),$.each(os,function(i){height-=$(os[i]).outerHeight()}),$(".accordionContent",obj).height(height)),options.autoheight=!0):options.autoheight&&(maxHeight=0,options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)),options.headers.not(options.active||"").next().hide(),options.active.find("h2").addClass(options.selectedClass),options.active.find("h2 .icon").addClass(options.selectedIconClass),options.event&&$(container).on(options.event+".jui-accordion",null,null,clickHandler)},$.jui.accordion.prototype={activate:function(index){clickHandler.call(this.element,{target:findActive(this.options.headers,index)[0]})},enable:function(){this.options.disabled=!1},disable:function(){this.options.disabled=!0},destroy:function(){this.options.headers.next().css("display",""),(this.options.fillSpace||this.options.autoheight)&&this.options.headers.next().css("height",""),$.removeData(this.element,"jui-accordion"),$(this.element).removeClass("jui-accordion").off(".jui-accordion")}},$.extend($.jui.accordion,{defaults:{selectedClass:"collapsable",selectedIconClass:"icon-chevron-down",alwaysOpen:!0,animated:"slide",event:"click",header:".accordionHeader",autoheight:!1,running:0},animations:{slide:function(options,additions){var hideHeight,difference;(options=$.extend({easing:"swing",duration:100},options,additions)).toHide.length?(hideHeight=options.toHide.height(),difference=options.toShow.height()/hideHeight,options.toShow.css({height:"0px"}).show(),options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(current){current=(hideHeight-current)*difference;$.support.leadingWhitespace||(current=Math.ceil(current)),options.toShow.height(current)},duration:options.duration,easing:options.easing,complete:function(){options.autoheight||options.toShow.css({height:"auto"}),options.toShow.css({overflow:"auto"}),options.complete()}})):options.toShow.animate({height:"show"},options)},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?200:100})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:100})}}})}(jQuery),function($){$.fn.navMenu=function(){return this.each(function(){var $box=$(this);$box.find("li>a").click(function(){var $a=$(this);return $a.is("[href^=javascript]")||$("#sidebar #menu").ajaxUrl({type:"get",url:$a.attr("href"),callback:function(response){$box.find("li").removeClass("selected"),$a.parent().addClass("selected")}}),!1})})}}(jQuery),function($){var menu,hash;function hide(){menu.hide()}$.fn.extend({contextMenu:function(id,op){op=$.extend({bindings:{},ctrSub:null},op);menu=menu||$('
').appendTo("body").hide(),(hash=hash||[]).push({id:id,bindings:op.bindings||{},ctrSub:op.ctrSub});var index=hash.length-1;return $(this).on("contextmenu",null,null,function(e){return function(posX,trigger,posY){var cur=hash[posX],posX=$(JUI.frag[cur.id]);posX.find("li"),menu.html(posX),$.each(cur.bindings,function(id,func){$('[rel="'+id+'"]',menu).on("click",null,null,function(e){hide(),func($(trigger),$("#"+cur.id))})});posX=posY.pageX,posY=posY.pageY;$(window).width()'),jThemeLi=$(this).find(">li");return jThemeLi.each(function(index){var $this=$(this),themeName=$this.attr("class");themeName==op.defaultTheme&&($this.addClass("selected"),$(".theme").prop("class","theme "+themeName)),$this.addClass(themeName).click(function(){setTheme(themeName)})}),"function"==typeof $.cookie&&$.cookie("dwz_theme")&&setTheme($.cookie("dwz_theme")),$themeItem.appendTo($("head")),this}})}(jQuery);var navTab={componentBox:null,_tabBox:null,_prevBut:null,_nextBut:null,_panelBox:null,_moreBut:null,_moreBox:null,_currentIndex:0,_op:{id:"navTab",step:4,stTabBox:".navTab-tab",stPanelBox:".navTab-panel",mainTabId:"main",close$:"a.close",prevClass:"tabsLeft",nextClass:"tabsRight",stMore:".tabsMore",stMoreLi:"ul.tabsMoreList"},init:function(options){$.History&&$.History.init();var $this=this;$.extend(this._op,options),this.componentBox=$("#"+this._op.id),this.step=this._op.step,this._tabBox=this.componentBox.find(this._op.stTabBox),this._panelBox=this.componentBox.find(this._op.stPanelBox),this._prevBut=this.componentBox.find("."+this._op.prevClass),this._nextBut=this.componentBox.find("."+this._op.nextClass),this._moreBut=this.componentBox.find(this._op.stMore),this._moreBox=this.componentBox.find(this._op.stMoreLi),this._prevBut.click(function(event){$this._scrollPrev()}),this._nextBut.click(function(event){$this._scrollNext()}),this._moreBut.click(function(){return $this._moreBox.show(),!1}),$(document).click(function(){$this._moreBox.hide()}),this._contextmenu(this._tabBox),this._contextmenu(this._getTabs()),this._init(),this._ctrlScrollBut()},_init:function(){var $this=this;this._getTabs().each(function(iTabIndex){$(this).off("click").click(function(event){$this._switchTab(iTabIndex)}),$(this).find(navTab._op.close$).off("click").click(function(){$this._closeTab(iTabIndex)})}),this._getMoreLi().each(function(iTabIndex){$(this).find(">a").off("click").click(function(event){$this._switchTab(iTabIndex)})}),this._switchTab(this._currentIndex)},_contextmenu:function($obj){var $this=this;$obj.contextMenu("navTabCM",{bindings:{reload:function(t,m){$this._reload(t,!0)},closeCurrent:function(tabId,m){tabId=tabId.attr("tabid");tabId?$this.closeTab(tabId):$this.closeCurrentTab()},closeOther:function(index,m){index=$this._indexTabId(index.attr("tabid"));$this._closeOtherTab(0 li")},_getPanels:function(){return this._panelBox.find("> div")},_getMoreLi:function(){return this._moreBox.find("> li")},_getTab:function(index){index=this._indexTabId(index);if(0<=index)return this._getTabs().eq(index)},getPanel:function(index){index=this._indexTabId(index);if(0<=index)return this._getPanels().eq(index)},_getTabsW:function(iStart,iEnd){return this._tabsW(this._getTabs().slice(iStart,iEnd))},_tabsW:function($tabs){var iW=0;return $tabs.each(function(){iW+=$(this).outerWidth(!0)}),iW},_indexTabId:function(tabid){if(!tabid)return-1;var iOpenIndex=-1;return this._getTabs().each(function(index){$(this).attr("tabid")==tabid&&(iOpenIndex=index)}),iOpenIndex},_getLeft:function(){return this._tabBox.position().left},_getScrollBarW:function(){return this.componentBox.width()-90},_visibleStart:function(){for(var iLeft=this._getLeft(),iW=0,$tabs=this._getTabs(),i=0;i<$tabs.length;i++){if(0<=iW+iLeft)return i;iW+=$tabs.eq(i).outerWidth(!0)}return 0},_visibleEnd:function(){for(var iLeft=this._getLeft(),iW=0,$tabs=this._getTabs(),i=0;i<$tabs.length;i++)if((iW+=$tabs.eq(i).outerWidth(!0))+iLeft>this._getScrollBarW())return i;return $tabs.length},_scrollPrev:function(){var iStart=this._visibleStart();iStart>=this.step?this._scrollTab(-this._getTabsW(0,iStart-this.step)):0=this._visibleEnd()&&this._scrollTab(this._getScrollBarW()-this._getTabs().eq(this._currentIndex).outerWidth(!0)-this._getTabsW(0,this._currentIndex))},_ctrlScrollBut:function(){var iW=this._tabsW(this._getTabs());this._getScrollBarW()>iW?(this._prevBut.hide(),this._nextBut.hide(),this._tabBox.parent().removeClass("tabsPageHeaderMargin")):(this._prevBut.show().removeClass("tabsLeftDisabled"),this._nextBut.show().removeClass("tabsRightDisabled"),this._tabBox.parent().addClass("tabsPageHeaderMargin"),0<=this._getLeft()?this._prevBut.addClass("tabsLeftDisabled"):this._getLeft()<=this._getScrollBarW()-iW+.5&&this._nextBut.addClass("tabsRightDisabled"))},_switchTab:function(iTabIndex){var $tab=this._getTabs().removeClass("selected").eq(iTabIndex).addClass("selected");this._getPanels().each(function(){$(".iframe-box",$(this)).length?$(this).css("visibility","hidden").height(0):$(this).hide()});var currentPanel=this._getPanels().eq(iTabIndex);"hidden"===currentPanel.css("visibility")?currentPanel.css("visibility","visible").css("height","auto"):currentPanel.show(),this._getMoreLi().removeClass("selected").eq(iTabIndex).addClass("selected"),this._currentIndex=iTabIndex,this._scrollCurrent(),this._reload($tab)},_closeTab:function(index,openIndex){this._getTabs().eq(index).remove(),this._getPanels().eq(index).trigger(JUI.eventType.pageClear).remove(),this._getMoreLi().eq(index).remove(),this._currentIndex>=index&&this._currentIndex--,!openIndex||0<(openIndex=this._indexTabId(openIndex))&&(this._currentIndex=openIndex),this._init(),this._scrollCurrent(),this._reload(this._getTabs().eq(this._currentIndex))},closeTab:function(index){index=this._indexTabId(index);0'),this._getTabs().eq(this._currentIndex).after($('
  • ').attr("tabid",tabid).prepend($('').attr("title",op.title).text(op.title))),this._getMoreLi().eq(this._currentIndex).after($("
  • ").append($('').attr("title",op.title).text(op.title))),$tab=($tabs=this._getTabs()).eq(this._currentIndex+1),$panel=this._getPanels().eq(this._currentIndex+1),op.external||url.isExternalUrl()?($tab.addClass("external"),navTab.openExternal(url,$panel)):($tab.removeClass("external"),$panel.ajaxUrl({type:"GET",url:url,data:op.data,callback:function(){navTab._loadUrlCallback($panel)}})),$.History&&setTimeout(function(){$.History.addHistory(tabid,function(i){i=navTab._indexTabId(i);0<=i&&navTab._switchTab(i)},tabid)},10),this._currentIndex=this._currentIndex+1,this._contextmenu($tabs.eq(this._currentIndex))),this._init(),this._scrollCurrent(),this._getTabs().eq(this._currentIndex).attr("url",url)}};!function($){$.fn.extend({tabs:function(options){var op=$.extend({reverse:!1,eventType:"click",currentIndex:0,stTabHeader:"> .tabsHeader",stTab:">.tabsHeaderContent>ul",stTabPanel:"> .tabsContent",ajaxClass:"j-ajax",closeClass:"close",prevClass:"tabsLeft",nextClass:"tabsRight"},options);return this.each(function(){!function initTab(jT){var jSelector=jT.add($("> *",jT));var jTabHeader=$(op.stTabHeader,jSelector);var jTabs=$(op.stTab+" li",jTabHeader);var jGroups=$(op.stTabPanel+" > *",jSelector);jTabs.off().find("a").off();jTabHeader.find("."+op.prevClass).off();jTabHeader.find("."+op.nextClass).off();jTabs.each(function(iTabIndex){op.currentIndex==iTabIndex?$(this).addClass("selected"):$(this).removeClass("selected"),"hover"==op.eventType?$(this).on("mouseenter",function(event){switchTab(jT,iTabIndex)}):$(this).click(function(event){switchTab(jT,iTabIndex)}),$("a",this).each(function(){$(this).hasClass(op.ajaxClass)?$(this).click(function(event){var jGroup=jGroups.eq(iTabIndex);this.href&&!jGroup.attr("loaded")&&jGroup.loadUrl(this.href,{},function(){jGroup.find("[layoutH]").layoutH(),jGroup.attr("loaded",!0)}),event.preventDefault()}):$(this).hasClass(op.closeClass)&&$(this).click(function(event){return jTabs.eq(iTabIndex).remove(),jGroups.eq(iTabIndex).remove(),iTabIndex==op.currentIndex?op.currentIndex=iTabIndex+1 *",jTabs)),jGroups=$(op.stTabHeader,jTab),jTabs=$(op.stTab+" li",jGroups),jGroups=$(op.stTabPanel+" > *",jTab),jTab=jTabs.eq(iTabIndex);jGroups.eq(iTabIndex);op.reverse&&jTab.hasClass("selected")?(jTabs.removeClass("selected"),jGroups.hide()):(op.currentIndex=iTabIndex,jTabs.removeClass("selected"),jTab.addClass("selected"),jGroups.hide().eq(op.currentIndex).show())}}})}(jQuery),$.setRegional("alertMsg",{title:{error:"Error",info:"Information",warn:"Warning",correct:"Successful",confirm:"Confirmation"},butMsg:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"}});var alertMsg={_boxId:"#alertMsgBox",_bgId:"#alertBackground",_closeTimer:null,_types:{error:"error",info:"info",warn:"warn",correct:"correct",confirm:"confirm"},_getTitle:function(key){return $.regional.alertMsg.title[key]},_keydownOk:function(event){if(event.keyCode==JUI.keyCode.ENTER||event.keyCode==JUI.keyCode.BACKSPACE)return event.data.target.trigger("click"),!1},_keydownEsc:function(event){event.keyCode==JUI.keyCode.ESC&&event.data.target.trigger("click")},_open:function(type,boxHtml,buttons){$(this._boxId).remove();var butsHtml="";if(buttons)for(var i=0;i