Files
luos/gulliver/js/ext/min/ext-all.js

115 lines
930 KiB
JavaScript
Raw Normal View History

(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(k,m,l,r){var n=this,q,s,p;if(typeof k=="object"){r=k;for(q in r){s=r[q];if(!n.filterOptRe.test(q)){n.addListener(q,s.fn||s,s.scope||r.scope,s.fn?s:r)}}}else{k=k.toLowerCase();p=n.events[k]||g;if(typeof p=="boolean"){n.events[k]=p=new h.Event(n,k)}p.addListener(m,l,typeof r=="object"?r:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,function(){k.tasks.remove(l);n.apply(m,o)},m)}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{};n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return-1},isListening:function(l,k){return this.findListener(l,k)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o<k;o++){m=p[o];if(m&&m.fireFn.apply(m.scope||q.obj||window,n)===i){return(q.firing=i)}}}q.firing=i;return g}}})();Ext.DomHelper=function(){var x=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,d=/tag|children|cn|html$/i,t=/td|tr|tbody/i,o=/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,v=/end/i,r,n="afterbegin",p="afterend",c="beforebegin",q="beforeend",a="<table>",i
Ext.ns("Ext.ux.grid");Ext.ux.grid.BufferView=Ext.extend(Ext.grid.GridView,{rowHeight:19,borderHeight:2,scrollDelay:100,cacheSize:20,cleanDelay:500,initTemplates:function(){Ext.ux.grid.BufferView.superclass.initTemplates.call(this);var a=this.templates;a.rowHolder=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"></div>');a.rowHolder.disableFormats=true;a.rowHolder.compile();a.rowBody=new Ext.Template('<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table>");a.rowBody.disableFormats=true;a.rowBody.compile()},getStyleRowHeight:function(){return Ext.isBorderBox?(this.rowHeight+this.borderHeight):this.rowHeight},getCalculatedRowHeight:function(){return this.rowHeight+this.borderHeight},getVisibleRowCount:function(){var b=this.getCalculatedRowHeight(),a=this.scroller.dom.clientHeight;return(a<1)?0:Math.ceil(a/b)},getVisibleRows:function(){var a=this.getVisibleRowCount(),b=this.scroller.dom.scrollTop,c=(b===0?0:Math.floor(b/this.getCalculatedRowHeight())-1);return{first:Math.max(c,0),last:Math.min(c+a+2,this.ds.getCount()-1)}},doRender:function(g,k,u,a,s,A,l){var b=this.templates,f=b.cell,h=b.row,x=b.rowBody,n=s-1,t=this.getStyleRowHeight(),z=this.getVisibleRows(),d="width:"+this.getTotalWidth()+";height:"+t+"px;",D=[],w,E,v={},m={tstyle:d},q;for(var y=0,C=k.length;y<C;y++){q=k[y];w=[];var o=(y+a),e=o>=z.first&&o<=z.last;if(e){for(var B=0;B<s;B++){E=g[B];v.id=E.id;v.css=B===0?"x-grid3-cell-first ":(B==n?"x-grid3-cell-last ":"");v.attr=v.cellAttr="";v.value=E.renderer(q.data[E.name],v,q,o,B,u);v.style=E.style;if(v.value===undefined||v.value===""){v.value="&#160;"}if(q.dirty&&typeof q.modified[E.name]!=="undefined"){v.css+=" x-grid3-dirty-cell"}w[w.length]=f.apply(v)}}var F=[];if(A&&((o+1)%2===0)){F[0]="x-grid3-row-alt"}if(q.dirty){F[1]=" x-grid3-dirty-row"}m.cols=s;if(this.getRowClass){F[2]=this.getRowClass(q,o,m,u)}m.alt=F.join(" ");m.cells=w.join("");D[D.length]=!e?b.rowHolder.apply(m):(l?x.apply(m):h.apply(m))}return D.join("")},isRowRendered:function(a){var b=this.getRow(a);return b&&b.childNodes.length>0},syncScroll:function(){Ext.ux.grid.BufferView.superclass.syncScroll.apply(this,arguments);this.update()},update:function(){if(this.scrollDelay){if(!this.renderTask){this.renderTask=new Ext.util.DelayedTask(this.doUpdate,this)}this.renderTask.delay(this.scrollDelay)}else{this.doUpdate()}},onRemove:function(d,a,b,c){Ext.ux.grid.BufferView.superclass.onRemove.apply(this,arguments);if(c!==true){this.update()}},doUpdate:function(){if(this.getVisibleRowCount()>0){var f=this.grid,b=f.colModel,h=f.store,e=this.getColumnData(),a=this.getVisibleRows(),j;for(var d=a.first;d<=a.last;d++){if(!this.isRowRendered(d)&&(j=this.getRow(d))){var c=this.doRender(e,[h.getAt(d)],h,d,b.getColumnCount(),f.stripeRows,true);j.innerHTML=c}}this.clean()}},clean:function(){if(!this.cleanTask){this.cleanTask=new Ext.util.DelayedTask(this.doClean,this)}this.cleanTask.delay(this.cleanDelay)},doClean:function(){if(this.getVisibleRowCount()>0){var b=this.getVisibleRows();b.first-=this.cacheSize;b.last+=this.cacheSize;var c=0,d=this.getRows();if(b.first<=0){c=b.last+1}for(var a=this.ds.getCount();c<a;c++){if((c<b.first||c>b.last)&&d[c].innerHTML){d[c].innerHTML=""}}}},removeTask:function(b){var a=this[b];if(a&&a.cancel){a.cancel();this[b]=null}},destroy:function(){this.removeTask("cleanTask");this.removeTask("renderTask");Ext.ux.grid.BufferView.superclass.destroy.call(this)},layout:function(){Ext.ux.grid.BufferView.superclass.layout.call(this);this.update()}});Ext.ns("Ext.ux.layout");Ext.ux.layout.CenterLayout=Ext.extend(Ext.layout.FitLayout,{setItemSize:function(b,a){this.container.addClass("ux-layout-center");b.addClass("ux-layout-center-item");if(b&&a.height>0){if(b.width){a.width=b.width}b.setSize(a)}}});Ext.Container.LAYOUTS["ux.center"]=Ext.ux.layout.
PMExtJSCommon=function(){this.version='1.8';this.notify_time_out=3;this.confirm=function(title,msg,fnYes,fnNo)
{Ext.MessageBox.confirm(title,msg,function(btn,text){if(btn=='yes')
setTimeout(fnYes,0)
else if(fnNo!=undefined)
setTimeout(fnNo,0)});}
this.info=function(title,msg,fn){Ext.MessageBox.show({id:'infoMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.INFO});}
this.question=function(title,msg,fn){Ext.MessageBox.show({id:'questionMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.YESNO,animEl:'mb9',fn:function(btn,text){if(btn=='yes')
setTimeout(fn,0);},icon:Ext.MessageBox.QUESTION});}
this.warning=function(title,msg,fn){Ext.MessageBox.show({id:'warningMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.WARNING});}
this.error=function(title,msg,fn){Ext.MessageBox.show({id:'errorMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.ERROR});}
this.notify=function(title,msg,type,time)
{Ext.msgBoxSlider.msg(title,msg,type,time);}
this.getBrowser=function()
{var browsersList=new Array("opera","msie","firefox","chrome","safari");var browserMeta=navigator.userAgent.toLowerCase();var name='Unknown';var version='';var screen={width:Ext.getBody().getViewSize().width,height:Ext.getBody().getViewSize().height};var so=Ext.isLinux?'Linux':(Ext.isWindows?'Windows':(Ext.isMac?'Mac OS':'Unknown'));for(var i=0;i<browsersList.length;i++){if((name=="")&&(browserMeta.indexOf(browsersList[i])!=-1)){name=browsersList[i];version=String(parseFloat(browserMeta.substr(browserMeta.indexOf(browsersList[i])+browsersList[i].length+1)));break;}}
return{name:name,version:version,screen:screen}}
this.createInfoPanel=function(url,params,columnsSize){var labelColumnWidth=170;var valueColumnWidth=350;params=params||{};if(typeof columnsSize!=='undefined'){labelColumnWidth=columnsSize[0]||labelColumnWidth;valueColumnWidth=columnsSize[1]||valueColumnWidth;}
return new Ext.grid.GridPanel({store:new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:url,method:'POST'}),baseParams:params,reader:new Ext.data.JsonReader({fields:[{name:'label'},{name:'value'},{name:'section'}]}),groupField:'section'}),columns:[{width:labelColumnWidth,dataIndex:"label",renderer:function(v){return"<b><font class='selectText' color=\"#465070\">"+v+"</font></b>";},align:"right"},{width:valueColumnWidth,dataIndex:"value",renderer:function(v){return"<b class='selectText'>"+v+"</b>";}},{hidden:true,dataIndex:"section"}],autoHeight:true,columnLines:true,trackMouseOver:false,disableSelection:true,view:new Ext.grid.GroupingView({forceFit:true,headersDisabled:true,groupTextTpl:'{group}'}),loadMask:true});};this.cookie={create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;},erase:function(name){Tools.createCookie(name,"",-1);}}}
var PMExt=new PMExtJSCommon();Ext.msgBoxSlider=function(){var msgCt;function createBox(t,s){return['<div class="msg">','<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>','<div class="x-box-ml"><div class="x-box-mr"><div id="x-box-mc-inner" class="x-box-mc"><h3>',t,'</h3>',s,'</div></div></div>','<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>','</div>'].join('');}
return{msg:function(title,format,type,time){if(!msgCt){msgCt=Ext.DomHelper.insertFirst(document.body,{id:'msg-div',style:'position:absolute'},true);}
var s=String.format.apply(String,Array.prototype.slice.call(arguments,1));var m=Ext.DomHelper.append(msgCt,{html:createBox(title,s)},true);m.setWidth(400);m.position(null,5000);m.alignTo(document,'br-br');type=typeof type!='undefined'?type:'';time=typeof time!='undefined'?time:PMExt.notify_time_out;switch(type){case'alert':case'warning':case'tmp-warning':image='/images/alert.gif';break;case'error':case'tmp-error':image='/images/error.png';break;case'tmp-info':case'info':image='/images/info.png';break;case'success':case'ok':image='/images/select-icon.png';break;default:image='';}
leftPadding=35;if(image!=''){Ext.get('x-box-mc-inner').setStyle('background-image','url("'+image+'")');leftPadding=45;}
Ext.get('x-box-mc-inner').setStyle('background-position','5px 10px');Ext.get('x-box-mc-inner').setStyle('background-repeat','no-repeat');Ext.get('x-box-mc-inner').setStyle('padding-left',leftPadding+'px');m.slideIn('t').pause(time).ghost("t",{remove:true});},msgTopCenter:function(type,title,format,time){if(typeof remove=='undefined')
remove:true;time=typeof time!='undefined'?time:PMExt.notify_time_out;if(!msgCt){msgCt=Ext.DomHelper.insertFirst(document.body,{id:'msg-div',style:'position:absolute'},true);}
var s=String.format.apply(String,Array.prototype.slice.call(arguments,2));var m=Ext.DomHelper.append(msgCt,{html:createBox(title,s)},true);m.setWidth(400);m.position(null,5000);m.alignTo(document,'t-t');switch(type){case'alert':case'warning':case'tmp-warning':image='/images/alert.gif';break;case'error':case'tmp-error':image='/images/error.png';break;case'tmp-info':case'info':image='/images/info.png';break;case'success':case'ok':image='/images/select-icon.png';break;default:image='';}
if(image!=''){Ext.get('x-box-mc-inner').setStyle('background-image','url("'+image+'")');}
Ext.get('x-box-mc-inner').setStyle('background-position','5px 10px');Ext.get('x-box-mc-inner').setStyle('background-repeat','no-repeat');Ext.get('x-box-mc-inner').setStyle('padding-left','45px');m.slideIn('t').pause(time).ghost("t",{remove:true});}};}();function _()
{var argv=_.arguments;var argc=argv.length;if(typeof TRANSLATIONS!='undefined'&&TRANSLATIONS){if(typeof TRANSLATIONS[argv[0]]!='undefined'){if(argc>1){trn=TRANSLATIONS[argv[0]];for(i=1;i<argv.length;i++){trn=trn.replace('{'+(i-1)+'}',argv[i]);}}
else{trn=TRANSLATIONS[argv[0]];}}
else{trn=argv[0];}}
else{PMExt.error('Processmaker JS Core Error','The TRANSLATIONS global object is not loaded!');trn='';}
return trn;}
function __()
{var argv=__.arguments;var argc=argv.length;var existTranslations=true;var existIdLabel=true;eval("if( typeof TRANSLATIONS_"+argv[0].toUpperCase()+" != 'undefined' && TRANSLATIONS_"+argv[0].toUpperCase()+") { existTranslations = true; } else { existTranslations = false; }");if(existTranslations){eval("if( typeof TRANSLATIONS_"+argv[0].toUpperCase()+"[argv[1]] != 'undefined' ) { existIdLabel = true; } else { existIdLabel = false; }");if(existIdLabel){if(argc>2){eval("trn = TRANSLATIONS_"+argv[0].toUpperCase()+"[argv[0]];");for(i=2;i<argv.length;i++){trn=trn.replace('{'+(i-2)+'}',argv[i]);}}else{eval("trn = TRANSLATIONS_"+argv[0].toUpperCase()+"[argv[1]];");}}else{trn=argv[1];}}else{PMExt.error('Processmaker JS Core Error','The TRANSLATIONS '+argv[0].toUpperCase()+' global object is not loaded!');trn='';}
return trn;}
function _FNF(USER_NAME,FIRST_NAME,LAST_NAME,FN_FORMAT)
{if(USER_NAME==null){USER_NAME='';}
if(FIRST_NAME==null){FIRST_NAME='';}
if(LAST_NAME==null){LAST_NAME='';}
if(typeof FORMATS!='undefined'){if(USER_NAME!=''||FIRST_NAME!=''||LAST_NAME!=''){FN_FORMAT=FORMATS.format;}
else{FN_FORMAT='';}}
else{FN_FORMAT='(@lastName, @firstName) @userName';}
var aux=FN_FORMAT;aux=aux.replace('@userName',USER_NAME);aux=aux.replace('@firstName',FIRST_NAME);aux=aux.replace('@lastName',LAST_NAME);return aux;}
function _DF(DATE_TIME,D_FORMAT)
{function LZ(x){return(x<0||x>9?"":"0")+x;}
if(typeof D_FORMAT=='undefined'){if(typeof FORMATS!='undefined'){D_FORMAT=FORMATS.dateFormat;}
else{D_FORMAT='m/d/Y';}}
if(D_FORMAT.indexOf(' \\d\\e ')){D_FORMAT=D_FORMAT.replace(/ \\d\\e /gi," [of] ");}
if(!(DATE_TIME!='')){if(DATE_TIME=='')
return'';else
return'**'+DATE_TIME+'**';}
var arrD=DATE_TIME.split(' ');var arrF=arrD[0].split('-');if(arrD.length==2){var arrH=arrD[1].split(':');}
else{var arrH=new Array(0,0,0);}
var MONTH_NAMES=new Array(_('ID_MONTH_1'),_('ID_MONTH_2'),_('ID_MONTH_3'),_('ID_MONTH_4'),_('ID_MONTH_5'),_('ID_MONTH_6'),_('ID_MONTH_7'),_('ID_MONTH_8'),_('ID_MONTH_9'),_('ID_MONTH_10'),_('ID_MONTH_11'),_('ID_MONTH_12'),_('ID_MONTH_ABB_1'),_('ID_MONTH_ABB_2'),_('ID_MONTH_ABB_3'),_('ID_MONTH_ABB_4'),_('ID_MONTH_ABB_5'),_('ID_MONTH_ABB_6'),_('ID_MONTH_ABB_7'),_('ID_MONTH_ABB_8'),_('ID_MONTH_ABB_9'),_('ID_MONTH_ABB_10'),_('ID_MONTH_ABB_11'),_('ID_MONTH_ABB_12'));var DAY_NAMES=new Array(_('ID_WEEKDAY_0'),_('ID_WEEKDAY_1'),_('ID_WEEKDAY_2'),_('ID_WEEKDAY_3'),_('ID_WEEKDAY_4'),_('ID_WEEKDAY_5'),_('ID_WEEKDAY_6'),_('ID_WEEKDAY_ABB_0'),_('ID_WEEKDAY_ABB_1'),_('ID_WEEKDAY_ABB_2'),_('ID_WEEKDAY_ABB_3'),_('ID_WEEKDAY_ABB_4'),_('ID_WEEKDAY_ABB_5'),_('ID_WEEKDAY_ABB_6'));var date=new Date(arrF[0],parseFloat(arrF[1])-1,arrF[2],arrH[0],arrH[1],arrH[2],0);var y=date.getFullYear()+'';var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var values=new Object();values['Y']=y;values['y']=y.substring(2,4);values['F']=MONTH_NAMES[M-1];values['M']=MONTH_NAMES[M+11];values['m']=LZ(M);values['n']=M;values['d']=LZ(d);values['j']=d;values['D']=DAY_NAMES[E+7];values['l']=DAY_NAMES[E];values['G']=H;values['H']=LZ(H);if(H==0){values['g']=12;}
else if(H>12){values['g']=H-12;}
else{values['g']=H;}
values['h']=LZ(values['g']);values['i']=LZ(m);values['s']=LZ(s);if(H>11)values['a']='pm';else values['a']='am';if(H>11)values['A']='PM';else values['A']='AM';if(typeof FORMATS=='undefined')values['T']='**';else values['T']=FORMATS.TimeZone;var aDate=D_FORMAT.split('');var aux='';var xParts=new Array('Y','y','F','M','m','n','d','j','D','l','G','H','g','h','i','s','a','A','T');for(var i=0;i<aDate.length;i++){if(xParts.indexOf(aDate[i])==-1){aux=aux+aDate[i];}
else{aux=aux+values[aDate[i]];}}
if(aux.indexOf(" [of] ")){aux=aux.replace(/\[of\]/g,"de");}
return aux;}
Ext.util.Format.capitalize=(function(){var re=/(^|[^\w])([a-z])/g,fn=function(m,a,b){return a+b.toUpperCase();};return function(v){return v.toLowerCase().replace(re,fn);}})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.nl2br=function(){return this.replace(/\n/g,'<br />');}
function stringReplace(strSearch,strReplace,str)
{var expression=eval("/"+strSearch+"/g");return str.replace(expression,strReplace);}
function getBrowserTimeZoneOffset()
{return-1*((new Date()).getTimezoneOffset()*60);}
2016-02-25 17:52:40 -04:00
function setExtStateManagerSetProvider(cache,additionalPrefix){var workspace='ws-undefined';var pathname=location.pathname.split('/');var cookieProvider=new Ext.state.CookieProvider();var i;if(additionalPrefix===undefined){additionalPrefix='';}
if(pathname.length>1){workspace=pathname[1].replace('sys','');}
workspace=workspace+additionalPrefix;cookieProvider.on('statechange',function(provider,key,value){if(value!==null&&JSON.stringify(Ext.state.Manager.get(workspace+cache))!==JSON.stringify(value)){Ext.state.Manager.set(workspace+cache,value);}});Ext.state.Manager.setProvider(cookieProvider);Ext.state.Manager.clear(cache);try{if(window.extJsViewState!==undefined){for(i in extJsViewState){Ext.state.Manager.clear(i);}
Ext.state.Manager.set(cache,Ext.state.Manager.getProvider().decodeValue(extJsViewState[workspace+cache]));}}catch(e){}}
function downloadFile(method,url,headers,formData,callBack){var xhr,win=window,value='blob',loadingFile=new Ext.LoadMask(Ext.getBody(),{msg:_('ID_LOADING')});method=method||'POST';loadingFile.show();if(win.XMLHttpRequest){xhr=new XMLHttpRequest();}else if(win.ActiveXObject){xhr=new ActiveXObject('Microsoft.XMLHTTP');}
win.URL=win.URL||win.webkitURL;xhr.open(method,url,true);xhr.responseType=value;Object.keys(headers).forEach(function(key){xhr.setRequestHeader(key,headers[key]);});xhr.onload=function(e){loadingFile.hide();if(xhr.status===200){if(xhr.getResponseHeader("Content-Disposition")!==null){var fileName=xhr.getResponseHeader("Content-Disposition").match(/\sfilename="([^"]+)"(\s|$)/)[1];var blob=xhr.response;if((navigator.userAgent.indexOf("MSIE")!==-1)||(navigator.userAgent.indexOf("Trident")!==-1)||(navigator.userAgent.indexOf("Edge")!==-1)){win.navigator.msSaveBlob(blob,fileName);}else{var doc=win.document,a=doc.createElementNS('http://www.w3.org/1999/xhtml','a'),event=doc.createEvent('MouseEvents');event.initMouseEvent('click',true,false,win,0,0,0,0,0,false,false,false,false,0,null);a.href=win.URL.createObjectURL(blob);a.download=fileName;a.dispatchEvent(event);}
if(typeof(callBack)!=='undefined'){callBack(xhr);}}else{PMExt.error(_('ID_ERROR'),_('ID_UNEXPECTED_ERROR_OCCURRED_PLEASE'));}}else{PMExt.error(_('ID_ERROR'),xhr.statusText);}};xhr.send(formData);}
Ext.namespace("Ext.ux.plugin");Ext.onReady(function(){var a=Ext.util.CSS;if(a){a.getRule(".x-hide-nosize")||a.createStyleSheet(".x-hide-nosize{height:0px!important;width:0px!important;border:none!important;zoom:1;}.x-hide-nosize * {height:0px!important;width:0px!important;border:none!important;zoom:1;}");a.refreshCache()}});(function(){var g=Ext.Element,b=Ext.lib.Anim,a=g.prototype;var f="visibility",d="display",c="hidden",i="none";var e={};e.El={setDisplayed:function(k){var j=this;j.visibilityCls?(j[k!==false?"removeClass":"addClass"](j.visibilityCls)):a.setDisplayed.call(j,k);return j},isDisplayed:function(){return!(this.hasClass(this.visibilityCls)||this.isStyle(d,i))},fixDisplay:function(){var j=this;a.fixDisplay.call(j);j.visibilityCls&&j.removeClass(j.visibilityCls)},isVisible:function(k){var l=this.visible||(!this.isStyle(f,c)&&(this.visibilityCls?!this.hasClass(this.visibilityCls):!this.isStyle(d,i)));if(k!==true||!l){return l}var m=this.dom.parentNode,j=/^body/i;while(m&&!j.test(m.tagName)){if(!Ext.fly(m,"_isVisible").isVisible()){return false}m=m.parentNode}return true},isStyle:a.isStyle||function(j,k){return this.getStyle(j)==k}};Ext.override(g.Flyweight,e.El);Ext.ux.plugin.VisibilityMode=function(k){Ext.apply(this,k||{});var j=Ext.util.CSS;if(j&&!Ext.isIE&&this.fixMaximizedWindow!==false&&!Ext.ux.plugin.VisibilityMode.MaxWinFixed){j.updateRule(".x-window-maximized-ct","overflow","");Ext.ux.plugin.VisibilityMode.MaxWinFixed=true}};Ext.extend(Ext.ux.plugin.VisibilityMode,Object,{bubble:true,fixMaximizedWindow:true,elements:null,visibilityCls:"x-hide-nosize",hideMode:"nosize",ptype:"uxvismode",init:function(n){var k=this.hideMode||n.hideMode,m=this,j=Ext.Container.prototype.bubble,l=function(){var q=[this.collapseEl,this.actionMode].concat(m.elements||[]);Ext.each(q,function(r){m.extend(this[r]||r)},this);var p={visFixed:true,animCollapse:false,animFloat:false,hideMode:k,defaults:this.defaults||{}};p.defaults.hideMode=k;Ext.apply(this,p);Ext.apply(this.initialConfig||{},p)};n.on("render",function(){if(m.bubble!==false&&this.ownerCt){j.call(this.ownerCt,function(){this.visFixed||this.on("afterlayout",l,this,{single:true})})}l.call(this)},n,{single:true})},extend:function(j,k){j&&Ext.each([].concat(j),function(l){if(l&&l.dom){if("visibilityCls"in l){return}Ext.apply(l,e.El);l.visibilityCls=k||this.visibilityCls}},this);return this}});Ext.preg&&Ext.preg("uxvismode",Ext.ux.plugin.VisibilityMode);Ext.provide&&Ext.provide("uxvismode")})();(function(){var J=Ext.Element,n,u=Ext.lib.Dom,al=Ext.lib.Anim,m=Ext.EventManager,aj=Ext.lib.Event,an=document,t=function(){},ap=Object.prototype,aA=ap.toString,B=/^body/i,q="[object HTMLDocument]";if(!Ext.elCache||parseInt(Ext.version.replace(/\./g,""),10)<311){alert("Ext Release "+Ext.version+" is not supported")}Ext._documents={};Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var T=u.resolveDocumentCache=function(E,aF){Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var aE=e(E),aG=Ext.isDocument(aE)?Ext.id(aE):aF,A=Ext._documents[aG]||null;return A||(aG?Ext._documents[aG]={}:null)},aD=u.clearDocumentCache=function(A){delete Ext._documents[A]};J.addMethods||(J.addMethods=function(A){Ext.apply(J.prototype,A||{})});Ext.removeNode=function(aH){var aG=aH?aH.dom||aH:null,aE,aF,A=T(aG),E;if(aG&&(aF=A[aG.id])&&(aE=aF.el)){if(aE.dom){Ext.enableNestedListenerRemoval?m.purgeElement(aE.dom,true):m.removeAll(aE.dom)}delete A[aG.id];delete aE.dom;delete aE._context;aE=null}if(aG&&!aG.navigator&&!Ext.isDocument(aG)&&!B.test(aG.tagName)){(E=aG.parentElement||aG.parentNode)&&E.removeChild(aG)}aG=E=null};var f=function(aI,aG){var aH=typeof aI==="function"?aI:function aF(){};var aE=aH._ovl;if(!aE){aE={base:aH};aE[aH.length||0]=aH;aH=function aF(){var aL=arguments.callee._ovl;var aK=aL[arguments.length]||aL.base;return aK&&aK!=arguments.callee?aK.apply(this,arguments):undefined}}var aJ=[].concat(aG);for(var E=0,A=aJ.length;E<A;++E){aE[aJ[E].length]=aJ[E]}aH._ovl=aE;var aF=null;return aH};Ext.applyIf(Ext,{overload:f(f,[function(A){return f(null,A)},function(aE,E,A){return aE[E]=f(aE[E],A)}]),
Ext.ux.LocationBar=Ext.extend(Ext.Toolbar,{maxItems:15,emptyText:'No node selected.',noReload:false,selectHandler:null,reloadHandler:null,locationItems:[],folderIconCls:'x-locationbar-folder-icon',backwardIconCls:'x-locationbar-back-icon',forwardIconCls:'x-locationbar-forward-icon',reloadIconCls:'x-locationbar-reload-icon',tree:null,historyItemNodes:{},historyItems:[],currentItem:false,historyNext:true,initComponent:function(){if(this.tree){this.tree.getLoader().addListener('load',function(tl,node,resp){if(node){node.loaded=true;this.setNode(node);}},this);this.tree.getSelectionModel().addListener('selectionchange',function(sm,node){if(node&&node.id){chDir(node.id,true);}
if(node.isLeaf()==false&&node.childNodes.length==0){this.nodeJustLoaded=node;this.setNode(node);}else{this.setNode(node);}},this);}},autoCreate:{cls:'x-toolbar x-small-editor x-locationbar',html:'<table cellspacing="0"><tr></tr></table>'},onRender:function(ct,position){Ext.ux.LocationBar.superclass.onRender.call(this,ct,position);this.repaint();},onClick:function(node){if(this.selectHandler){this.selectHandler(node);}else{if(node.parentNode){node.parentNode.expand(false,true);node.ensureVisible();}
node.select();}},onReload:function(node){if(this.reloadHandler){this.reloadHandler(node);}else if(node.reload){node.reload();}},clear:function(){this.locationItems=[];this.repaint;},setNode:function(node){var path=[];var pNode=node;var i;do{var conf={text:pNode.attributes.text,node:pNode,handler:this.onClick.createDelegate(this,[pNode],false)};if(pNode.childNodes.length){var childs=[];for(i=0;i<pNode.childNodes.length;i++){childs[i]={text:pNode.childNodes[i].attributes.text,node:pNode.childNodes[i],iconCls:this.folderIconCls,handler:this.onClick.createDelegate(this,[pNode.childNodes[i]],false)};}
conf.xtype='tbsplit';conf.menu=childs;}
conf.fullPath=pNode.getPath('text').substr(1);path.unshift(conf);}while(pNode.parentNode&&(pNode=pNode.parentNode)&&pNode.id!='root');this.locationItems=[];for(i=0;i<path.length;i++){this.addPathItemRaw(path[i]);}
this.currentItem=path[path.length-1];this.addHistoryItemRaw(this.currentItem);this.repaint();},addHistoryItemRaw:function(item){if(this.historyItems.indexOf(item.text)!=-1){this.historyItems.remove(item.text);delete this.historyItemNodes[item.text];}
this.historyItems.push(item.text);this.historyItemNodes[item.text]=item;},addPathItemRaw:function(item){if(this.maxItems&&this.locationItems.length>this.maxItems){this.locationItems.pop();}
this.locationItems.push(item);},repaint:function(){if(this.items&&this.items.length){var _doLayout=true;this.items.each(function(item){this.items.remove(item);item.destroy();},this.items);}else{var _doLayout=false;}
try{this.items.each(function(item){this.items.remove(item);item.destroy();},this.items);}catch(e){}
this.add({cls:'x-btn-icon',iconCls:this.backwardIconCls,handler:function(){this.historyNext=this.historyItems.pop();var itemKey=this.historyItems.pop();var item=this.historyItemNodes[itemKey];this.onClick(item.node);},scope:this,disabled:this.historyItems.length>1?false:true});this.add({cls:'x-btn-icon',iconCls:this.forwardIconCls,handler:function(){var node=this.historyNext.node;this.historyNext=false;this.onClick(node);},scope:this,disabled:true});this.add(' ','-',' ');if(this.locationItems.length){this.add({cls:'x-btn-icon',iconCls:this.folderIconCls,ctCls:'x-locationbar-location x-locationbar-location-first',disabled:true});var text;for(var i=0;i<this.locationItems.length;i++){var locationItem=this.locationItems[i];var item={};if(typeof locationItem=='object'){item=locationItem;}
else{item.text=locationItem;}
if(!item.text){item.text='n/a';}
item.handler=this.onClick.createDelegate(this,[locationItem.node],false);item.ctCls='x-locationbar-location';this.add(item);}
this.addItem({cls:'x-locationbar-location x-locationbar-location-last',xtype:'tbfill'});menu=[];for(var i=this.historyItems.length-2;i>=0;i--){menu.push({text:this.historyItemNodes[this.historyItems[i]].fullPath,iconCls:this.folderIconCls,node:this.historyItemNodes[this.historyItems[i]].node,handler:function(item){this.onClick(item.node);},scope:this});}
this.add({cls:'x-btn-icon',ctCls:'x-locationbar-location x-locationbar-location-last',menuAlign:'tr-br?',menu:menu});if(!this.noReload){this.add(' ');this.add({cls:'x-btn-icon',iconCls:this.reloadIconCls,handler:function(){this.onReload(this.currentItem.node);},scope:this});}
this.add(' ');}else{this.add({cls:'x-btn-icon',iconCls:this.folderIconCls,ctCls:'x-locationbar-location x-locationbar-location-first',disabled:true});if(this.emptyText){this.add({xtype:'lbtext',text:this.emptyText});}
this.addItem(new Ext.ux.LocationBar.Fill());this.add({cls:'x-btn-icon',ctCls:'x-locationbar-location x-locationbar-location-last',menuAlign:'tr-br?',disabled:true});this.add(' ');this.add({cls:'x-btn-icon',iconCls:this.reloadIconCls,disabled:true});this.add(' ');}
if(_doLayout===true){this.doLayout();}}});Ext.reg('locationbar',Ext.ux.LocationBar);Ext.ux.Fill=Ext.extend(Ext.Toolbar.Spacer,{render:function(td){td.style.width='100%';Ext.fly(td).addClass('x-locationbar-location');Ext.ux.Fill.superclass.render.call(this,td);}});Ext.reg('tbfill',Ext.ux.Fill);Ext.ux.LocationBar.Fill=Ext.extend(Ext.Toolbar.Fill,{render:function(td){td.className='x-locationbar-location';var data=document.createTextNode('\u00a0');this.el.appendChild(data);Ext.ux.LocationBar.Fill.superclass.render.call(this,td);}});Ext.reg('lbfill',Ext.ux.LocationBar.Fill);Ext.ux.LocationBar.TextItem=Ext.extend(Ext.Toolbar.TextItem,{render:function(td){td.className='x-locationbar-location';Ext.ux.LocationBar.Fill.superclass.render.call(this,td);}});Ext.reg('lbtext',Ext.ux.LocationBar.TextItem);
Ext.ux.StatusBar=Ext.extend(Ext.Toolbar,{cls:'x-statusbar',busyIconCls:'x-status-busy',busyText:'Loading...',autoClear:5000,emptyText:'&nbsp;',activeThreadId:0,initComponent:function(){if(this.statusAlign=='right'){this.cls+=' x-status-right';}
Ext.ux.StatusBar.superclass.initComponent.call(this);},afterRender:function(){Ext.ux.StatusBar.superclass.afterRender.call(this);var right=this.statusAlign=='right';this.currIconCls=this.iconCls||this.defaultIconCls;this.statusEl=new Ext.Toolbar.TextItem({cls:'x-status-text '+(this.currIconCls||''),text:this.text||this.defaultText||''});if(right){this.add('->');this.add(this.statusEl);}else{this.insert(0,this.statusEl);this.insert(1,'->');}
this.doLayout();},setStatus:function(o){o=o||{};if(typeof o=='string'){o={text:o};}
if(o.text!==undefined){this.setText(o.text);}
if(o.iconCls!==undefined){this.setIcon(o.iconCls);}
if(o.clear){var c=o.clear,wait=this.autoClear,defaults={useDefaults:true,anim:true};if(typeof c=='object'){c=Ext.applyIf(c,defaults);if(c.wait){wait=c.wait;}}else if(typeof c=='number'){wait=c;c=defaults;}else if(typeof c=='boolean'){c=defaults;}
c.threadId=this.activeThreadId;this.clearStatus.defer(wait,this,[c]);}
return this;},clearStatus:function(o){o=o||{};if(o.threadId&&o.threadId!==this.activeThreadId){return this;}
var text=o.useDefaults?this.defaultText:this.emptyText,iconCls=o.useDefaults?(this.defaultIconCls?this.defaultIconCls:''):'';if(o.anim){this.statusEl.el.fadeOut({remove:false,useDisplay:true,scope:this,callback:function(){this.setStatus({text:text,iconCls:iconCls});this.statusEl.el.show();}});}else{this.statusEl.hide();this.setStatus({text:text,iconCls:iconCls});this.statusEl.show();}
return this;},setText:function(text){this.activeThreadId++;this.text=text||'';if(this.rendered){this.statusEl.setText(this.text);}
return this;},getText:function(){return this.text;},setIcon:function(cls){this.activeThreadId++;cls=cls||'';if(this.rendered){if(this.currIconCls){this.statusEl.removeClass(this.currIconCls);this.currIconCls=null;}
if(cls.length>0){this.statusEl.addClass(cls);this.currIconCls=cls;}}else{this.currIconCls=cls;}
return this;},showBusy:function(o){if(typeof o=='string'){o={text:o};}
o=Ext.applyIf(o||{},{text:this.busyText,iconCls:this.busyIconCls});return this.setStatus(o);}});Ext.reg('statusbar',Ext.ux.StatusBar);
Ext.ns('Ext.ux.tree');Ext.ux.tree.TreeFilterX=Ext.extend(Ext.tree.TreeFilter,{expandOnFilter:true,filter:function(value,attr,startNode){if(false!==this.expandOnFilter){startNode=startNode||this.tree.root;var animate=this.tree.animate;this.tree.animate=false;startNode.expand(true,false,function(){Ext.ux.tree.TreeFilterX.superclass.filter.call(this,value,attr,startNode);}.createDelegate(this));this.tree.animate=animate;}else{Ext.ux.tree.TreeFilterX.superclass.filter.apply(this,arguments);}},filterBy:function(fn,scope,startNode){startNode=startNode||this.tree.root;if(this.autoClear){this.clear();}
var af=this.filtered,rv=this.reverse;var f=function(n){if(n===startNode){return true;}
if(af[n.id]){return false;}
var m=fn.call(scope||n,n);if(!m||rv){af[n.id]=n;n.ui.hide();return true;}else{n.ui.show();var p=n.parentNode;while(p&&p!==this.root){p.ui.show();p=p.parentNode;}
return true;}
return true;};startNode.cascade(f);if(this.remove){for(var id in af){if(typeof id!="function"){var n=af[id];if(n&&n.parentNode){n.parentNode.removeChild(n);}}}}}});