Ext.ns("ExtPortal");ExtPortal.NavigationController=function(){var b=Ext.apply(new Ext.util.Observable(),{menu:null,itemArray:null,mappingArray:null,menuPanel:null,youAreHerePanel:null,contentPanel:null,localTrxId:null,requestedId:null,currentDisplayedId:null,isHiding:false,clickTheRootMenu:function(d){if(this.itemArray[d]){this.isHiding=true;var c={duration:0.35,easing:"easeOut",callback:function(){this.isHiding=false},scope:this};this.menuPanel.body.hide(c);this.composeTheMenu(d)}},clickTheGroupTitleMenu:function(f){if(this.itemArray[f]){var c=false;for(var e=0;e<this.itemArray[f].submenu.length;e++){if(this.itemArray[this.itemArray[f].submenu[e]]&&this.itemArray[this.itemArray[f].submenu[e]].hasChildren){c=true;break}}if(c){this.isHiding=true;var d={duration:0.35,easing:"easeOut",callback:function(){this.isHiding=false},scope:this};this.menuPanel.body.hide(d);this.composeTheMenu(f)}else{this.navigateToItem(f,true)}}},clickTheRegularItemMenu:function(d){if(this.itemArray[d]&&this.itemArray[d].hasChildren){this.isHiding=true;var c={duration:0.35,easing:"easeOut",callback:function(){this.isHiding=false},scope:this};this.menuPanel.body.hide(c);this.composeTheMenu(d)}else{this.navigateToItem(d,true)}},composeTheMenu:function(e,d){if(this.itemArray[e].twoLevelsLoaded){this.renderMenuPanels(e);this.navigateToItem(e)}else{var c=true;if(this.localTrxId!=null){if(requestedId!=e||d==true){Ext.Ajax.abort(this.localTrxId)}else{c=false}}if(c){this.localTrxId=Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ContentService.svc/GetTextAndSubmenu",method:"POST",params:Ext.util.JSON.encode({id:e,lang:"RO"}),success:function(g,h){this.localTrxId=null;if(!g.responseText||g.responseText.length==0){return}var f=Ext.decode(g.responseText);this.populateItemArray(f,e);this.renderMenuPanels(e);this.navigateToItem(e)},failure:function(f,g){this.localTrxId=null;this.menuPanel.body.show(true)}});this.requestedId=e}}},populateItemArray:function(c,f){var e=c.dataItem.submenu;for(var d=0;d<e.length;d++){if(!this.itemArray[e[d].id]||!this.itemArray[e[d].id].twoLevelsLoaded){this.itemArray[e[d].id]=e[d];this.mappingArray[e[d].historyPathName]=e[d].id}if(e[d].id==f){this.itemArray[e[d].id].text=c.dataItem.text}}},navigateToItem:function(d,c){if(c==true){if(!this.itemArray[d]||!this.itemArray[d].twoLevelsLoaded){if(this.localTrxId){Ext.Ajax.abort(this.localTrxId)}this.localTrxId=Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ContentService.svc/GetTextAndSubmenu",method:"POST",params:Ext.util.JSON.encode({id:d,lang:"RO"}),success:function(f,g){this.localTrxId=null;if(!f.responseText||f.responseText.length==0){return}var e=Ext.decode(f.responseText);this.populateItemArray(e,d);this.showItemContent(d)},failure:function(e,f){this.localTrxId=null;this.menuPanel.body.show(true)}})}else{this.showItemContent(d)}}else{this.showItemContent(d)}this.composeYouAreHerePanel(d)},navigateToPath:function(c){var d=this.mappingArray[c];if(!d||!this.itemArray[d]||!this.itemArray[d].twoLevelsLoaded){if(this.localTrxId){Ext.Ajax.abort(this.localTrxId)}this.localTrxId=Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ContentService.svc/GetTextAndSubmenuByPath",method:"POST",params:Ext.util.JSON.encode({path:c,lang:"RO"}),success:function(f,g){this.localTrxId=null;if(!f.responseText||f.responseText.length==0){return}var e=Ext.decode(f.responseText);this.populateItemArray(e,e.dataItem.id);this.composeTheMenu(e.dataItem.id);this.composeYouAreHerePanel(d)},failure:function(e,f){this.localTrxId=null;this.menuPanel.body.show(true)}})}else{this.showItemContent(d);this.composeYouAreHerePanel(d)}},composeYouAreHerePanel:function(e){if(this.youAreHerePanel.items&&this.youAreHerePanel.items.length>0){this.youAreHerePanel.remove(this.youAreHerePanel.getComponent(0),true)}var c=null;var d=e;while(d>0){if(d==e){c="<b>"+this.itemArray[d].title+"</b>"}else{c='<a href="javascript:ExtPortal.NavigationController.clickTheGroupTitleMenu('+d+')" style="text-decoration:none">'+this.itemArray[d].title+"</a>"+(c?"&nbsp;&gt;&nbsp;"+c:"")}d=this.itemArray[d].parent}if(c){c='<span style="font-size:12px;font-family:tahoma,arial,verdana,sans-serif">'+c+"</span>"}this.youAreHerePanel.add({html:c});this.youAreHerePanel.doLayout();this.youAreHerePanel.body.frame("green",1)},showItemContent:function(c){this.fireEvent("navigate",{id:c,path:this.itemArray[c].historyPathName});this.contentPanel.body.hide({duration:0.35,easing:"easeOut",scope:this,callback:function(){if(this.contentPanel.items&&this.contentPanel.items.length>0){this.contentPanel.remove(this.contentPanel.getComponent(0),true)}if(this.initializerArray[c]){this.initializerArray[c]({item:c,contentPanel:this.contentPanel,itemHtml:this.itemArray[c].text})}else{this.contentPanel.add({html:this.itemArray[c].text});this.contentPanel.doLayout()}this.contentPanel.body.show(true)}})},renderMenuPanels:function(d){if(this.isHiding){var c=this;setTimeout(function(){c.renderMenuPanels(d)},100)}else{if(this.menuPanel.items){while(this.menuPanel.items.length>0){this.menuPanel.remove(this.menuPanel.getComponent(0),true)}}if(this.itemArray[d].submenu&&this.itemArray[d].submenu.length>0){Ext.each(this.itemArray[d].submenu,function(f){if(f>0){var h=[];if(this.itemArray[f]){Ext.each(this.itemArray[f].submenu,function(i){h.push({html:'<a href="javascript:ExtPortal.NavigationController.clickTheRegularItemMenu('+i+')" style="text-decoration:none;font-size:15px;font-family:tahoma,arial,verdana,sans-serif">'+this.itemArray[i].title+"</a><br/>",border:false})},this)}if(h.length>0){var e={title:'<a href="javascript:ExtPortal.NavigationController.clickTheGroupTitleMenu('+f+')" style="text-decoration:none;font-size:12px;font-family:tahoma,arial,verdana,sans-serif">'+this.itemArray[f].title+"</a>",collapsible:true,items:h.length>0?h:null,border:true};if(this.menuBaseCls){e.baseCls=this.menuBaseCls}var g=new Ext.Panel(e);this.menuPanel.add(g);this.menuPanel.add({html:"<br/>",border:false})}else{this.menuPanel.add({html:'<a href="javascript:ExtPortal.NavigationController.clickTheRegularItemMenu('+f+')" style="text-decoration:none;font-size:16px;font-family:tahoma,arial,verdana,sans-serif;">'+this.itemArray[f].title+"</a><br/>",border:false})}}},this)}else{this.menuPanel.add({html:"&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;</br>&nbsp;</br>&nbsp;<br/>",border:false})}this.menuPanel.doLayout();this.menuPanel.body.show(true)}},createFirstMenuLevel:function(){Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ContentService.svc/GetTextAndSubmenu",method:"POST",params:Ext.util.JSON.encode({id:0,lang:"RO"}),success:function(c,d){if(!c.responseText||c.responseText.length==0){return}var e=Ext.decode(c.responseText);this.populateItemArray(e,0);this.itemArray[0].twoLevelsLoaded=true;var f="";Ext.each(this.itemArray[0].submenu,function(g){f+='<a href="#" '+(g==0?'class="first active" ':"")+'onclick="ExtPortal.NavigationController.clickTheRootMenu('+g+');return false;">'+this.itemArray[g].title+"</a>"},this);this.topButtonsPanel.innerHTML=f},failure:function(c,d){var e='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(e,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(e).length?360:600})}})},setOutputElements:function(c){this.topButtonsPanel=document.getElementById(c.topButtonsId);if(c.menuPanel){this.menuPanel=c.menuPanel}else{this.menuPanel=new Ext.Panel(Ext.applyIf({border:false,bodyBorder:false,width:270,renderTo:c.menuId,baseCls:c.menuBaseCls},c.menuPanelConfig))}this.menuBaseCls=this.menuPanel.initialConfig.baseCls||c.menuBaseCls;if(c.youAreHerePanel){this.youAreHerePanel=c.youAreHerePanel}else{this.youAreHerePanel=new Ext.Panel(Ext.applyIf({border:false,bodyBorder:false,bodyStyle:"background:transparent",renderTo:c.youAreHereId,baseCls:c.youAreHereBaseCls},c.youAreHerePanelConfig))}if(c.contentPanel){this.contentPanel=c.contentPanel}else{this.contentPanel=new Ext.Panel(Ext.applyIf({border:false,bodyBorder:false,bodyStyle:"background:transparent",renderTo:c.contentId,baseCls:c.contentBaseCls},c.contentPanelConfig))}},refreshMenu:function(){this.menu=[];this.itemArray=[];this.mappingArray=[];this.createFirstMenuLevel()},addItemInitializer:function(c,d){this.initializerArray[c]=d}});b.menu=[];b.itemArray=[];b.mappingArray=[];b.initializerArray=[];b.addEvents("navigate");return b}();Ext.namespace("Ext.ux","Ext.ux.Crypto");Ext.ux.Crypto.SHA1=function(){var c=function(e,d,g,f){switch(e){case 0:return(d&g)^(~d&f);case 1:return d^g^f;case 2:return(d&g)^(d&f)^(g&f);case 3:return d^g^f}};var b=function(d,e){return(d<<e)|(d>>>(32-e))};return{hash:function(h){var n=[1518500249,1859775393,2400959708,3395469782];h+=String.fromCharCode(128);var y=Math.ceil(h.length/4)+2;var k=Math.ceil(y/16);var m=new Array(k);for(var B=0;B<k;B++){m[B]=new Array(16);for(var A=0;A<16;A++){m[B][A]=(h.charCodeAt(B*64+A*4)<<24)|(h.charCodeAt(B*64+A*4+1)<<16)|(h.charCodeAt(B*64+A*4+2)<<8)|(h.charCodeAt(B*64+A*4+3))}}m[k-1][14]=((h.length-1)*8)/Math.pow(2,32);m[k-1][14]=Math.floor(m[k-1][14]);m[k-1][15]=((h.length-1)*8)&4294967295;var u=1732584193;var r=4023233417;var q=2562383102;var p=271733878;var o=3285377520;var f=new Array(80);var G,F,E,D,C;for(var B=0;B<k;B++){for(var w=0;w<16;w++){f[w]=m[B][w]}for(var w=16;w<80;w++){f[w]=b(f[w-3]^f[w-8]^f[w-14]^f[w-16],1)}G=u;F=r;E=q;D=p;C=o;for(var w=0;w<80;w++){var x=Math.floor(w/20);var g=(b(G,5)+c(x,F,E,D)+C+n[x]+f[w])&4294967295;C=D;D=E;E=b(F,30);F=G;G=g}u=(u+G)&4294967295;r=(r+F)&4294967295;q=(q+E)&4294967295;p=(p+D)&4294967295;o=(o+C)&4294967295}return u.toHexStr()+r.toHexStr()+q.toHexStr()+p.toHexStr()+o.toHexStr()}}}();Ext.applyIf(Number.prototype,{toHexStr:function(){var d="",b;for(var c=7;c>=0;c--){b=(this>>>(c*4))&15;d+=b.toString(16)}return d}});Ext.ns("Ext.ux.form");Ext.ux.form.XCheckbox=Ext.extend(Ext.form.Checkbox,{submitOffValue:"false",submitOnValue:"true",onRender:function(){this.inputValue=this.submitOnValue;Ext.ux.form.XCheckbox.superclass.onRender.apply(this,arguments);this.hiddenField=this.wrap.insertFirst({tag:"input",type:"hidden"});if(this.tooltip){this.imageEl.set({qtip:this.tooltip})}this.updateHidden()},setValue:function(b){b=this.convertValue(b);this.updateHidden(b);Ext.ux.form.XCheckbox.superclass.setValue.apply(this,arguments)},updateHidden:function(b){b=undefined!==b?b:this.checked;b=this.convertValue(b);if(this.hiddenField){this.hiddenField.dom.value=b?this.submitOnValue:this.submitOffValue;this.hiddenField.dom.name=b?"":this.el.dom.name}},convertValue:function(b){return(b===true||b==="true"||b===this.submitOnValue||String(b).toLowerCase()==="on")}});Ext.reg("xcheckbox",Ext.ux.form.XCheckbox);Ext.namespace("Ext.ux");Ext.ux.InputTextMask=function(b,e){if(e===undefined){this.clearWhenInvalid=true}else{this.clearWhenInvalid=e}this.rawMask=b;this.viewMask="";this.maskArray=new Array();var d=0;var f="";for(var c=0;c<b.length;c++){if(f){if(f=="X"){f=""}if(b.charAt(c)=="X"){this.maskArray[d]=f;d++;f=""}else{f+=b.charAt(c)}}else{if(b.charAt(c)=="X"){f+="X";this.viewMask+="_"}else{if(b.charAt(c)=="9"||b.charAt(c)=="L"||b.charAt(c)=="l"||b.charAt(c)=="A"){this.viewMask+="_";this.maskArray[d]=b.charAt(c);d++}else{this.viewMask+=b.charAt(c);this.maskArray[d]=RegExp.escape(b.charAt(c));d++}}}}this.specialChars=this.viewMask.replace(/(L|l|9|A|_|X)/g,"")};Ext.ux.InputTextMask.prototype={init:function(b){this.field=b;if(b.rendered){this.assignEl()}else{b.on("render",this.assignEl,this)}b.on("blur",this.removeValueWhenInvalid,this);b.on("focus",this.processMaskFocus,this)},assignEl:function(){this.inputTextElement=this.field.getEl().dom;this.field.getEl().on("keypress",this.processKeyPress,this);this.field.getEl().on("keydown",this.processKeyDown,this);if(Ext.isSafari||Ext.isIE){this.field.getEl().on("paste",this.startTask,this);this.field.getEl().on("cut",this.startTask,this)}if(Ext.isGecko||Ext.isOpera){this.field.getEl().on("mousedown",this.setPreviousValue,this)}if(Ext.isGecko){this.field.getEl().on("input",this.onInput,this)}if(Ext.isOpera){this.field.getEl().on("input",this.onInputOpera,this)}},onInput:function(){this.startTask(false)},onInputOpera:function(){if(!this.prevValueOpera){this.startTask(false)}else{this.manageBackspaceAndDeleteOpera()}},manageBackspaceAndDeleteOpera:function(){this.inputTextElement.value=this.prevValueOpera.cursorPos.previousValue;this.manageTheText(this.prevValueOpera.keycode,this.prevValueOpera.cursorPos);this.prevValueOpera=null},setPreviousValue:function(b){this.oldCursorPos=this.getCursorPosition()},getValidatedKey:function(c,b){var d=this.maskArray[b.start];if(d=="9"){return c.pressedKey.match(/[0-9]/)}else{if(d=="L"){return(c.pressedKey.match(/[A-Za-z]/))?c.pressedKey.toUpperCase():null}else{if(d=="l"){return(c.pressedKey.match(/[A-Za-z]/))?c.pressedKey.toLowerCase():null}else{if(d=="A"){return c.pressedKey.match(/[A-Za-z0-9]/)}else{if(d){return(c.pressedKey.match(new RegExp(d)))}}}}}return(null)},removeValueWhenInvalid:function(){if(this.clearWhenInvalid&&this.inputTextElement.value.indexOf("_")>-1){this.inputTextElement.value=""}},managePaste:function(){if(this.oldCursorPos==null){return}var d=this.inputTextElement.value.substring(this.oldCursorPos.start,this.inputTextElement.value.length-(this.oldCursorPos.previousValue.length-this.oldCursorPos.end));if(this.oldCursorPos.start<this.oldCursorPos.end){this.oldCursorPos.previousValue=this.oldCursorPos.previousValue.substring(0,this.oldCursorPos.start)+this.viewMask.substring(this.oldCursorPos.start,this.oldCursorPos.end)+this.oldCursorPos.previousValue.substring(this.oldCursorPos.end,this.oldCursorPos.previousValue.length);d=d.substr(0,this.oldCursorPos.end-this.oldCursorPos.start)}this.inputTextElement.value=this.oldCursorPos.previousValue;keycode={unicode:"",isShiftPressed:false,isTab:false,isBackspace:false,isLeftOrRightArrow:false,isDelete:false,pressedKey:""};var c=false;for(var b=0;b<d.length;b++){keycode.pressedKey=d.substr(b,1);keycode.unicode=d.charCodeAt(b);this.oldCursorPos=this.skipMaskCharacters(keycode,this.oldCursorPos);if(this.oldCursorPos===false){break}if(this.injectValue(keycode,this.oldCursorPos)){c=true;this.moveCursorToPosition(keycode,this.oldCursorPos);this.oldCursorPos.previousValue=this.inputTextElement.value;this.oldCursorPos.start=this.oldCursorPos.start+1}}if(!c&&this.oldCursorPos!==false){this.moveCursorToPosition(null,this.oldCursorPos)}this.oldCursorPos=null},processKeyDown:function(b){this.processMaskFormatting(b,"keydown")},processKeyPress:function(b){this.processMaskFormatting(b,"keypress")},startTask:function(b){if(this.task==undefined){this.task=new Ext.util.DelayedTask(this.managePaste,this)}if(b!==false){this.oldCursorPos=this.getCursorPosition()}this.task.delay(0)},skipMaskCharacters:function(b,c){if(c.start!=c.end&&(b.isDelete||b.isBackspace)){return(c)}while(this.specialChars.match(RegExp.escape(this.viewMask.charAt(((b.isBackspace)?c.start-1:c.start))))){if(b.isBackspace){c.dec()}else{c.inc()}if(c.start>=c.previousValue.length||c.start<0){return false}}return(c)},isManagedByKeyDown:function(b){if(b.isDelete||b.isBackspace){return(true)}return(false)},processMaskFormatting:function(d,c){this.oldCursorPos=null;var f=this.getCursorPosition();var b=this.getKeyCode(d,c);if(b.unicode==0){return}if((b.unicode==67||b.unicode==99)&&d.ctrlKey){return}if((b.unicode==88||b.unicode==120)&&d.ctrlKey){this.startTask();return}if((b.unicode==86||b.unicode==118)&&d.ctrlKey){this.startTask();return}if((b.isBackspace||b.isDelete)&&Ext.isOpera){this.prevValueOpera={cursorPos:f,keycode:b};return}if(c=="keydown"&&!this.isManagedByKeyDown(b)){return true}if(c=="keypress"&&this.isManagedByKeyDown(b)){return true}if(this.handleEventBubble(d,b,c)){return true}return(this.manageTheText(b,f))},manageTheText:function(b,c){if(this.inputTextElement.value.length===0){this.inputTextElement.value=this.viewMask}c=this.skipMaskCharacters(b,c);if(c===false){return false}if(this.injectValue(b,c)){this.moveCursorToPosition(b,c)}return(false)},processMaskFocus:function(){if(this.inputTextElement.value.length==0){var b=this.getCursorPosition();this.inputTextElement.value=this.viewMask;this.moveCursorToPosition(null,b)}},isManagedByBrowser:function(d,b,c){if(((c=="keypress"&&d.charCode===0)||c=="keydown")&&(b.unicode==Ext.EventObject.TAB||b.unicode==Ext.EventObject.RETURN||b.unicode==Ext.EventObject.ENTER||b.unicode==Ext.EventObject.SHIFT||b.unicode==Ext.EventObject.CONTROL||b.unicode==Ext.EventObject.ESC||b.unicode==Ext.EventObject.PAGEUP||b.unicode==Ext.EventObject.PAGEDOWN||b.unicode==Ext.EventObject.END||b.unicode==Ext.EventObject.HOME||b.unicode==Ext.EventObject.LEFT||b.unicode==Ext.EventObject.UP||b.unicode==Ext.EventObject.RIGHT||b.unicode==Ext.EventObject.DOWN)){return(true)}return(false)},handleEventBubble:function(d,b,c){try{if(b&&this.isManagedByBrowser(d,b,c)){return true}d.stopEvent();return false}catch(f){alert(f.message)}},getCursorPosition:function(){var b,d,c;if(this.inputTextElement.createTextRange){c=document.selection.createRange().duplicate();c.moveEnd("character",this.inputTextElement.value.length);if(c.text===""){b=this.inputTextElement.value.length}else{b=this.inputTextElement.value.lastIndexOf(c.text)}c=document.selection.createRange().duplicate();c.moveStart("character",-this.inputTextElement.value.length);d=c.text.length}else{b=this.inputTextElement.selectionStart;d=this.inputTextElement.selectionEnd}return this.CursorPosition(b,d,c,this.inputTextElement.value)},moveCursorToPosition:function(c,b){var d=(!c||(c&&c.isBackspace))?b.start:b.start+1;if(this.inputTextElement.createTextRange){b.range.move("character",d);b.range.select()}else{this.inputTextElement.selectionStart=d;this.inputTextElement.selectionEnd=d}},injectValue:function(c,b){if(!c.isDelete&&c.unicode==b.previousValue.charCodeAt(b.start)){return true}var d;if(!c.isDelete&&!c.isBackspace){d=this.getValidatedKey(c,b)}else{if(b.start==b.end){d="_";if(c.isBackspace){b.dec()}}else{d=this.viewMask.substring(b.start,b.end)}}if(d){this.inputTextElement.value=b.previousValue.substring(0,b.start)+d+b.previousValue.substring(b.start+d.length,b.previousValue.length);return true}return false},getKeyCode:function(c,d){var b={};b.unicode=c.getKey();b.isShiftPressed=c.shiftKey;b.isDelete=((c.getKey()==Ext.EventObject.DELETE&&d=="keydown")||(d=="keypress"&&c.charCode===0&&c.keyCode==Ext.EventObject.DELETE))?true:false;b.isTab=(c.getKey()==Ext.EventObject.TAB)?true:false;b.isBackspace=(c.getKey()==Ext.EventObject.BACKSPACE)?true:false;b.isLeftOrRightArrow=(c.getKey()==Ext.EventObject.LEFT||c.getKey()==Ext.EventObject.RIGHT)?true:false;b.pressedKey=String.fromCharCode(b.unicode);return(b)},CursorPosition:function(f,d,e,c){var b={};b.start=isNaN(f)?0:f;b.end=isNaN(d)?0:d;b.range=e;b.previousValue=c;b.inc=function(){b.start++;b.end++};b.dec=function(){b.start--;b.end--};return(b)}};Ext.applyIf(RegExp,{escape:function(b){return new String(b).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}});Ext.ux.InputTextMask=Ext.ux.InputTextMask;Ext.ux.FileTreeMenu=function(c){c=c||{};var b={contextmenu:this,buttonsAt:c.buttonsAt||"tbar",singleUpload:c.singleUpload||false,maxFileSize:c.maxFileSize,enableProgress:c.enableProgress};if(c.baseParams){c.baseParams.cmd=c.baseParams.cmd||"upload";c.baseParams.dir=c.baseParams.dir||".";b.baseParams=c.baseParams}Ext.apply(c,{items:[{text:"&#160",cls:"ux-ftm-nodename",disabledClass:"",disabled:true,cmd:"nodename"},{text:this.openText+" (Enter)",iconCls:this.openIconCls,cmd:"open",menu:{items:[{text:this.openSelfText,iconCls:this.openSelfIconCls,cmd:"open-self"},{text:this.openPopupText,iconCls:this.openPopupIconCls,cmd:"open-popup"},{text:this.openBlankText,iconCls:this.openBlankIconCls,cmd:"open-blank"},{text:this.openDwnldText,iconCls:this.openDwnldIconCls,cmd:"open-dwnld"}]}},new Ext.menu.Separator({cmd:"sep-open"}),{text:this.reloadText+" (Ctrl+E)",iconCls:this.reloadIconCls,cmd:"reload"},{text:this.expandText+" (Ctrl+&nbsp;&rarr;)",iconCls:this.expandIconCls,cmd:"expand"},{text:this.collapseText+" (Ctrl+&nbsp;&larr;)",iconCls:this.collapseIconCls,cmd:"collapse"},new Ext.menu.Separator({cmd:"sep-collapse"}),{text:this.renameText+" (F2)",iconCls:this.renameIconCls,cmd:"rename"},{text:this.deleteText+" ("+this.deleteKeyName+")",iconCls:this.deleteIconCls,cmd:"delete"},{text:this.newdirText+"... (Ctrl+N)",iconCls:this.newdirIconCls,cmd:"newdir"},new Ext.menu.Separator({cmd:"sep-upload"}),{text:this.uploadFileText+" (Ctrl+U)",iconCls:this.uploadIconCls,hideOnClick:false,cmd:"upload"},new Ext.menu.Adapter(new Ext.ux.UploadPanel(b),{hideOnClick:false,cmd:"upload-panel"})]});Ext.ux.FileTreeMenu.superclass.constructor.call(this,c);this.relayEvents(this.getItemByCmd("open").menu,["click","itemclick"])};Ext.extend(Ext.ux.FileTreeMenu,Ext.menu.Menu,{collapseIconCls:"icon-collapse-all",collapseText:"Collapse all",deleteIconCls:"icon-cross",deleteKeyName:"Delete Key",deleteText:"Delete",expandIconCls:"icon-expand-all",expandText:"Expand all",newdirIconCls:"icon-folder-add",newdirText:"New folder",openBlankIconCls:"icon-open-blank",openBlankText:"Open in new window",openDwnldIconCls:"icon-open-download",openDwnldText:"Download",openIconCls:"icon-open",openPopupIconCls:"icon-open-popup",openPopupText:"Open in popup",openSelfIconCls:"icon-open-self",openSelfText:"Open in this window",openText:"Open",reloadIconCls:"icon-refresh",reloadText:'R<span style="text-decoration:underline">e</span>load',renameIconCls:"icon-pencil",renameText:"Rename",uploadFileText:'<span style="text-decoration:underline">U</span>pload file',uploadIconCls:"icon-upload",uploadText:"Upload",width:190,getItemByCmd:function(d){var b;var c=this.items.find(function(e){return d===e.cmd});if(!c){b=this.items.find(function(e){return"open"===e.cmd});if(!b){return null}c=b.menu.items.find(function(e){return d===e.cmd})}return c},setItemDisabled:function(d,b){var c=this.getItemByCmd(d);if(c){c.setDisabled(b)}},beforeDestroy:function(){var b=this.getItemByCmd("upload-panel");if(b&&b.component){b.component.purgeListeners();b.component.destroy();b.component=null}}});Ext.reg("filetreemenu",Ext.ux.FileTreeMenu);Ext.ux.FileTreePanel=Ext.extend(Ext.tree.TreePanel,{confirmText:"Confirm",containerScroll:true,deleteText:"Delete",enableDD:true,enableDelete:true,enableNewDir:true,enableOpen:true,enableProgress:true,enableRename:true,enableSort:true,enableUpload:true,errorText:"Error",existsText:"File <b>{0}</b> already exists",expandOnRender:true,fileCls:"file",fileText:"File",focusPopup:true,folderSort:true,hrefPrefix:"",hrefSuffix:"",layout:"fit",loadingText:"Loading",loadMask:false,maxFileSize:524288,maxMsgLen:2000,method:"post",newdirText:"New Folder",openMode:"popup",overwriteText:"Do you want to overwrite it?",popupFeatures:"width=800,height=600,dependent=1,scrollbars=1,resizable=1,toolbar=1",readOnly:false,reallyWantText:"Do you really want to",rootPath:"root",rootText:"Tree Root",rootVisible:true,selectOnEdit:true,singleUpload:false,topMenu:false,url:"./BrowseFiles.aspx",initComponent:function(){Ext.apply(this,{root:new Ext.tree.AsyncTreeNode({text:this.rootText,path:this.rootPath,rootVisible:this.rootVisible,allowDrag:false}),treeEditor:!this.readOnly?new Ext.tree.TreeEditor(this,{allowBlank:false,cancelOnEsc:true,completeOnEnter:true,ignoreNoChange:true,selectOnFocus:this.selectOnEdit}):undefined,dropConfig:this.dropConfig?this.dropConfig:{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.enableSort,expandDelay:3600000},treeSorter:this.enableSort?new Ext.tree.TreeSorter(this,{folderSort:this.folderSort}):undefined,keys:[{key:Ext.EventObject.ENTER,scope:this,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c&&0!==c.getDepth()&&c.isLeaf()){this.openNode(c)}}},{key:113,scope:this,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c&&0!==c.getDepth()&&this.enableRename&&this.readOnly!==true){this.treeEditor.triggerEdit(c)}}},{key:46,stopEvent:true,scope:this,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c&&0!==c.getDepth()&&this.enableDelete&&this.readOnly!==true){this.deleteNode(c)}}},{key:69,ctrl:true,stopEvent:true,scope:this,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c){c=c.isLeaf()?c.parentNode:c;f.select(c);c.reload()}}},{key:39,ctrl:true,stopEvent:true,scope:this,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c&&!c.isLeaf()){f.select(c);c.expand.defer(1,c,[true])}}},{key:37,ctrl:true,scope:this,stopEvent:true,fn:function(b,d){var f=this.getSelectionModel();var c=f.getSelectedNode();if(c&&!c.isLeaf()){f.select(c);c.collapse.defer(1,c,[true])}}},{key:78,ctrl:true,scope:this,stopEvent:true,fn:function(b,d){var f,c;f=this.getSelectionModel();c=f.getSelectedNode();if(c&&this.enableNewDir&&this.readOnly!==true){c=c.isLeaf()?c.parentNode:c;this.createNewDir(c)}}}]});if(!this.loader){this.loader=new Ext.tree.TreeLoader({url:this.url,baseParams:{cmd:"get"},listeners:{beforeload:{scope:this,fn:function(b,c){b.baseParams.path=this.getPath(c)}}}})}if(true===this.topMenu){this.tbar=[{text:this.fileText,disabled:true,scope:this,menu:this.getContextMenu()}]}Ext.ux.FileTreePanel.superclass.initComponent.apply(this,arguments);if(this.treeEditor){this.treeEditor.beforeNodeClick=function(b,c){return true};this.treeEditor.on({complete:{scope:this,fn:this.onEditComplete},beforecomplete:{scope:this,fn:this.onBeforeEditComplete}})}this.on({contextmenu:{scope:this,fn:this.onContextMenu,stopEvent:true},dblclick:{scope:this,fn:this.onDblClick},beforenodedrop:{scope:this,fn:this.onBeforeNodeDrop},nodedrop:{scope:this,fn:this.onNodeDrop},nodedragover:{scope:this,fn:this.onNodeDragOver}});this.addEvents("beforeopen","open","beforerename","rename","renamefailure","beforedelete","delete","deletefailure","beforenewdir","newdir","newdirfailure")},onRender:function(){Ext.ux.FileTreePanel.superclass.onRender.apply(this,arguments);if(true===this.topMenu){this.topMenu=Ext.getCmp(this.getTopToolbar().items.itemAt(0).id);this.getSelectionModel().on({scope:this,selectionchange:function(d,c){var b=c?false:true;b=b||this.readOnly;this.topMenu.setDisabled(b)}});Ext.apply(this.topMenu,{showMenu:function(){this.showContextMenu(false)}.createDelegate(this)})}if(this.expandOnRender){this.root.expand()}this.el.on({contextmenu:{fn:function(){return false},stopEvent:true}});if(true===this.loadMask){this.loader.on({scope:this.el,beforeload:this.el.mask.createDelegate(this.el,[this.loadingText+"..."]),load:this.el.unmask,loadexception:this.el.unmask})}},cmdCallback:function(c,j,b){var e,h,f;var g=true;if(true===j){try{h=Ext.decode(b.responseText)}catch(d){this.showError(b.responseText)}if(true===h.success){switch(c.params.cmd){case"delete":if(true!==this.eventsSuspended){this.fireEvent("delete",this,this.getPath(c.node))}c.node.parentNode.removeChild(c.node);break;case"newdir":if(true!==this.eventsSuspended){this.fireEvent("newdir",this,c.node)}break;case"rename":this.updateCls(c.node,c.params.oldname);if(true!==this.eventsSuspended){this.fireEvent("rename",this,c.node,c.params.newname,c.params.oldname)}break}}else{switch(c.params.cmd){case"rename":if(c.oldParent){c.oldParent.appendChild(c.node)}else{c.node.setText(c.oldName)}if(c.e){c.e.failure=true}if(true!==this.eventsSuspended){this.fireEvent("renamefailure",this,c.node,c.params.newname,c.params.oldname)}break;case"newdir":if(false!==this.eventsSuspended){this.fireEvent("newdirfailure",this,c.params.dir)}c.node.parentNode.removeChild(c.node);break;case"delete":if(true!==this.eventsSuspended){this.fireEvent("deletefailure",this,c.node)}c.node.parentNode.reload.defer(1,c.node.parentNode);break;default:this.root.reload();break}this.showError(h.error||b.responseText)}}else{this.showError(b.responseText)}},confirmOverwrite:function(b,d,c){Ext.Msg.show({title:this.confirmText,msg:String.format(this.existsText,b)+". "+this.overwriteText,icon:Ext.Msg.QUESTION,buttons:Ext.Msg.YESNO,fn:d.createDelegate(c||this)})},createNewDir:function(e){if(true!==this.eventsSuspended&&false===this.fireEvent("beforenewdir",this,e)){return}var c=this.treeEditor;var b;var d=e.isLeaf()?e.parentNode:e;d.expand(false,false,function(f){b=f.appendChild(new Ext.tree.AsyncTreeNode({text:this.newdirText,iconCls:"folder"}));c.on({complete:{scope:this,single:true,fn:this.onNewDir}});c.creatingNewDir=true;(function(){c.triggerEdit(b)}.defer(10))}.createDelegate(this))},deleteNode:function(b){if(true!==this.eventsSuspended&&false===this.fireEvent("beforedelete",this,b)){return}Ext.Msg.show({title:this.deleteText,msg:this.reallyWantText+" "+this.deleteText.toLowerCase()+" <b>"+b.text+"</b>?",icon:Ext.Msg.WARNING,buttons:Ext.Msg.YESNO,scope:this,fn:function(c){if("yes"!==c){this.getEl().dom.focus();return}var d={url:this.deleteUrl||this.url,method:this.method,scope:this,callback:this.cmdCallback,node:b,params:Ext.util.JSON.encode({cmd:"delete",file:this.getPath(b)})};Ext.Ajax.request(d)}})},downloadFile:function(d){var g=Ext.id();var e=document.createElement("iframe");e.id=g;e.name=g;e.className="x-hidden";if(Ext.isIE){e.src=Ext.SSL_SECURE_URL}document.body.appendChild(e);if(Ext.isIE){document.frames[g].name=g}var b=Ext.DomHelper.append(document.body,{tag:"form",method:"post",action:this.downloadUrl||this.url,target:g});document.body.appendChild(b);var c;c=document.createElement("input");c.type="hidden";c.name="cmd";c.value="download";b.appendChild(c);c=document.createElement("input");c.type="hidden";c.name="path";c.value=d;b.appendChild(c);var f=function(){Ext.EventManager.removeListener(e,"load",f,this);setTimeout(function(){document.body.removeChild(b)},100);setTimeout(function(){document.body.removeChild(e)},110)};Ext.EventManager.on(e,"load",f,this);b.submit()},getContextMenu:function(){if(!this.contextmenu){var b={singleUpload:this.singleUpload,maxFileSize:this.maxFileSize,enableProgress:this.enableProgress};if(this.baseParams){b.baseParams=this.baseParams}this.contextmenu=new Ext.ux.FileTreeMenu(b);this.contextmenu.on({click:{scope:this,fn:this.onContextClick}});this.uploadPanel=this.contextmenu.getItemByCmd("upload-panel").component;this.uploadPanel.on({beforeupload:{scope:this,fn:this.onBeforeUpload},allfinished:{scope:this,fn:this.onAllFinished}});this.uploadPanel.setUrl(this.uploadUrl||this.url)}return this.contextmenu},getFileCls:function(b){var c=b.split(".");if(1===c.length){return this.fileCls}else{return this.fileCls+"-"+c.pop().toLowerCase()}},getPath:function(c){var e,d,b;if(c!==this.root){d=c.parentNode;b=[c.text];while(d&&d!==this.root){b.unshift(d.text);d=d.parentNode}b.unshift(this.root.attributes.path||"");e=b.join(this.pathSeparator)}else{e=c.attributes.path||""}return e},hasChild:function(c,b){return(c.isLeaf()?c.parentNode:c).findChild("text",b)!==null},hideContextMenu:function(){if(this.contextmenu&&this.contextmenu.isVisible()){this.contextmenu.hide()}return this},onBeforeEditComplete:function(d,b,c){if(d.cancellingEdit){d.cancellingEdit=false;return}var f=this.getPath(d.editNode);var e=f.replace(/\/[^\\]+$/,"/"+b);if(false===this.fireEvent("beforerename",this,d.editNode,e,f)){d.cancellingEdit=true;d.cancelEdit();return false}},onBeforeNodeDrop:function(h){var g=h.dropNode;var i=h.target.leaf?h.target.parentNode:h.target;if(g.parentNode===i){return false}if(this.hasChild(i,g.text)&&undefined===h.confirmed){this.confirmOverwrite(g.text,function(d){h.confirmed="yes"===d;this.onBeforeNodeDrop(h)});return false}if(false===h.confirmed){return false}h.confirmed=undefined;h.oldParent=g.parentNode;var f=this.getPath(g);var b=this.getPath(i)+"/"+g.text;if(true!==this.eventsSuspended&&false===this.fireEvent("beforerename",this,g,b,f)){return false}var c={url:this.renameUrl||this.url,method:this.method,scope:this,callback:this.cmdCallback,node:g,oldParent:g.parentNode,e:h,params:Ext.util.JSON.encode({cmd:"rename",oldname:f,newname:b})};Ext.Ajax.request(c);return true},onBeforeUpload:function(d){var c=this.getContextMenu();var b=this.getPath(c.node);if(c.node.isLeaf()){b=b.replace(/\/[^\/]+$/,"",b)}d.setPath(b)},onAllFinished:function(b){var c=this.getContextMenu();(c.node.isLeaf()?c.node.parentNode:c.node).reload()},onContextClick:function(f,c,d){if(c.disabled){return}var b=f.node;if(!b){b=f.parentMenu.node}switch(c.cmd){case"reload":b.reload();break;case"expand":b.expand(true);break;case"collapse":b.collapse(true);break;case"open":this.openNode(b);break;case"open-self":this.openNode(b,"_self");break;case"open-popup":this.openNode(b,"popup");break;case"open-blank":this.openNode(b,"_blank");break;case"open-dwnld":this.openNode(b,"download");break;case"rename":this.treeEditor.triggerEdit(b);break;case"delete":this.deleteNode(b);break;case"newdir":this.createNewDir(b);break;default:break}},onContextMenu:function(b,c){if(this.readOnly){return false}this.showContextMenu(b);return false},onDblClick:function(b,c){this.openNode(b)},onDestroy:function(){if(this.contextmenu){this.contextmenu.purgeListeners();this.contextmenu.destroy();this.contextmenu=null}if(this.treeEditor){this.treeEditor.purgeListeners();this.treeEditor.destroy();this.treeEditor=null}if(this.treeSorter){this.treeSorter=null}Ext.ux.FileTreePanel.superclass.onDestroy.call(this)},onEditComplete:function(e,b,d){var f=e.editNode;if(b===d||e.creatingNewDir){e.creatingNewDir=false;return}var g=this.getPath(f.parentNode);var c={url:this.renameUrl||this.url,method:this.method,scope:this,callback:this.cmdCallback,node:f,oldName:d,params:Ext.util.JSON.encode({cmd:"rename",oldname:g+"/"+d,newname:g+"/"+b})};Ext.Ajax.request(c)},onNewDir:function(c){var d=this.getPath(c.editNode);var b={url:this.newdirUrl||this.url,method:this.method,scope:this,node:c.editNode,callback:this.cmdCallback,params:Ext.util.JSON.encode({cmd:"newdir",dir:d})};Ext.Ajax.request(b)},onNodeDragOver:function(b){b.cancel=b.target.disabled||b.dropNode.parentNode===b.target.parentNode&&b.target.isLeaf()},onNodeDrop:function(c){if(true===c.failure){c.oldParent.appendChild(c.dropNode);return}var b=c.dropNode.parentNode.findChild("text",c.dropNode.text);if(b&&b!==c.dropNode){b.parentNode.removeChild(b)}},openNode:function(c,e){if(!this.enableOpen){return}e=e||this.openMode;var b;var d;if(c.isLeaf()){d=this.getPath(c);b=this.hrefPrefix+d+this.hrefSuffix;if(true!==this.eventsSuspended&&false===this.fireEvent("beforeopen",this,c.text,b,e)){return}switch(e){case"popup":if(!this.popup||this.popup.closed){this.popup=window.open(b,this.hrefTarget,this.popupFeatures)}this.popup.location=b;if(this.focusPopup){this.popup.focus()}break;case"_self":window.location=b;break;case"_blank":window.open(b);break;case"download":this.downloadFile(d);break}if(true!==this.eventsSuspended){this.fireEvent("open",this,c.text,b,e)}}},setDeleteDisabled:function(b){b=!(!b);if(!this.enableDelete===b){return this}this.hideContextMenu();this.enableDelete=!b},setNewdirDisabled:function(b){b=!(!b);if(!this.enableNewDir===b){return this}this.hideContextMenu();this.enableNewDir=!b},setOpenDisabled:function(b){b=!(!b);if(!this.enableOpen===b){return this}this.hideContextMenu();this.enableOpen=!b;return this},setReadOnly:function(b){b=!(!b);if(this.readOnly===b){return this}this.hideContextMenu();if(this.dragZone){this.dragZone.locked=b}this.readOnly=b;return this},setRenameDisabled:function(b){b=!(!b);if(!this.enableRename===b){return this}this.hideContextMenu();if(this.dragZone){this.dragZone.locked=b}this.enableRename=!b;return this},setUploadDisabled:function(b){b=!(!b);if(!this.enableUpload===b){return this}this.hideContextMenu();this.enableUpload=!b;return this},showContextMenu:function(d){var b=false;var c=this.topMenu?this.topMenu.getEl():this.body;if(!d){d=this.getSelectionModel().getSelectedNode();b=true}else{c=d.getUI().getEl()}if(!d){return}var e=this.getContextMenu();e.node=d;e.getItemByCmd("nodename").setText(Ext.util.Format.ellipsis(d.text,22));e.setItemDisabled("open",!d.isLeaf());e.setItemDisabled("reload",d.isLeaf());e.setItemDisabled("expand",d.isLeaf());e.setItemDisabled("collapse",d.isLeaf());e.setItemDisabled("delete",d===this.root||d.disabled);e.setItemDisabled("rename",this.readOnly||d===this.root||d.disabled);e.setItemDisabled("newdir",this.readOnly||(d.isLeaf()?d.parentNode.disabled:d.disabled));e.setItemDisabled("upload",d.isLeaf()?d.parentNode.disabled:d.disabled);e.setItemDisabled("upload-panel",d.isLeaf()?d.parentNode.disabled:d.disabled);e.getItemByCmd("open").setVisible(this.enableOpen);e.getItemByCmd("delete").setVisible(this.enableDelete);e.getItemByCmd("newdir").setVisible(this.enableNewDir);e.getItemByCmd("rename").setVisible(this.enableRename);e.getItemByCmd("upload").setVisible(this.enableUpload);e.getItemByCmd("upload-panel").setVisible(this.enableUpload);e.getItemByCmd("sep-upload").setVisible(this.enableUpload);e.getItemByCmd("sep-collapse").setVisible(this.enableNewDir||this.enableDelete||this.enableRename);d.select();if(b){e.showAt(e.getEl().getAlignToXY(c,"tl-bl?"))}else{e.showAt(e.getEl().getAlignToXY(c,"tl-tl?",[0,18]))}},showError:function(c,b){Ext.Msg.show({title:b||this.errorText,msg:Ext.util.Format.ellipsis(c,this.maxMsgLen),fixCursor:true,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(c).length?360:600})},updateCls:function(c,b){if(c.isLeaf()){Ext.fly(c.getUI().iconNode).removeClass(this.getFileCls(b));Ext.fly(c.getUI().iconNode).addClass(this.getFileCls(c.text))}}});Ext.reg("filetreepanel",Ext.ux.FileTreePanel);Ext.ux.FileTreePanelImages=Ext.extend(Ext.ux.FileTreePanel,{store:null,callback:null,initComponent:function(){this.on({click:{scope:this,fn:this.onClick}});Ext.ux.FileTreePanelImages.superclass.initComponent.apply(this,arguments)},onClick:function(b,c){if(this.store){this.store.proxy.thePath=this.getPath(b);this.store.reload()}}});Ext.ux.FileUploader=function(b){Ext.apply(this,b);Ext.ux.FileUploader.superclass.constructor.apply(this,arguments);this.addEvents("beforeallstart","allfinished","beforefilestart","filefinished","progress")};Ext.extend(Ext.ux.FileUploader,Ext.util.Observable,{baseParams:{cmd:"upload",dir:"."},concurrent:true,enableProgress:true,jsonErrorText:"Cannot decode JSON object",maxFileSize:524288,progressIdName:"UPLOAD_IDENTIFIER",progressInterval:2000,progressUrl:"progress.php",progressMap:{bytes_total:"bytesTotal",bytes_uploaded:"bytesUploaded",est_sec:"estSec",files_uploaded:"filesUploaded",speed_average:"speedAverage",speed_last:"speedLast",time_last:"timeLast",time_start:"timeStart"},singleUpload:false,unknownErrorText:"Unknown error",upCount:0,createForm:function(b){var d=parseInt(Math.random()*10000000000,10);var c=Ext.getBody().createChild({tag:"form",action:this.url,method:"post",cls:"x-hidden",id:Ext.id(),cn:[{tag:"input",type:"hidden",name:"APC_UPLOAD_PROGRESS",value:d},{tag:"input",type:"hidden",name:this.progressIdName,value:d},{tag:"input",type:"hidden",name:"MAX_FILE_SIZE",value:this.maxFileSize}]});if(b){b.set("form",c);b.set("progressId",d)}else{this.progressId=d}return c},deleteForm:function(c,b){c.remove();if(b){b.set("form",null)}},fireFinishEvents:function(b){if(true!==this.eventsSuspended&&!this.singleUpload){this.fireEvent("filefinished",this,b&&b.record)}if(true!==this.eventsSuspended&&0===this.upCount){this.stopProgress();this.fireEvent("allfinished",this)}},getIframe:function(b){var c=null;var d=b.get("form");if(d&&d.dom&&d.dom.target){c=Ext.get(d.dom.target)}return c},getOptions:function(b,d){var c={url:this.url,method:"post",isUpload:true,scope:this,callback:this.uploadCallback,record:b,params:this.getParams(b,d)};return c},getParams:function(b,d){var c={path:this.path};Ext.apply(c,this.baseParams||{},d||{});return c},processSuccess:function(d,c,e){var b=false;if(this.singleUpload){this.store.each(function(f){f.set("state","done");f.set("error","");f.commit()})}else{b=d.record;b.set("state","done");b.set("error","");b.commit()}this.deleteForm(d.form,b)},processFailure:function(f,d,e){var b=f.record;var c;if(this.singleUpload){c=this.store.queryBy(function(g){return"done"!==g.get("state")});c.each(function(g){var h=e.errors?e.errors[g.id]:this.unknownErrorText;if(h){g.set("state","failed");g.set("error",h);Ext.getBody().appendChild(g.get("input"))}else{g.set("state","done");g.set("error","")}g.commit()},this);this.deleteForm(f.form)}else{if(e&&"object"===Ext.type(e)){b.set("error",e.errors&&e.errors[b.id]?e.errors[b.id]:this.unknownErrorText)}else{if(e){b.set("error",e)}else{if(d&&d.responseText){b.set("error",d.responseText)}else{b.set("error",this.unknownErrorText)}}}b.set("state","failed");b.commit()}},requestProgress:function(){var b,c;var d={url:this.progressUrl,method:"post",params:{},scope:this,callback:function(g,j,f){var i;if(true!==j){return}try{i=Ext.decode(f.responseText)}catch(h){return}if("object"!==Ext.type(i)||true!==i.success){return}if(this.singleUpload){this.progress={};for(c in i){if(this.progressMap[c]){this.progress[this.progressMap[c]]=parseInt(i[c],10)}}if(true!==this.eventsSuspended){this.fireEvent("progress",this,this.progress)}}else{for(c in i){if(this.progressMap[c]&&g.record){g.record.set(this.progressMap[c],parseInt(i[c],10))}}if(g.record){g.record.commit();if(true!==this.eventsSuspended){this.fireEvent("progress",this,g.record.data,g.record)}}}this.progressTask.delay(this.progressInterval)}};if(this.singleUpload){d.params[this.progressIdName]=this.progressId;d.params.APC_UPLOAD_PROGRESS=this.progressId;Ext.Ajax.request(d)}else{b=this.store.query("state","uploading");b.each(function(e){d.params[this.progressIdName]=e.get("progressId");d.params.APC_UPLOAD_PROGRESS=d.params[this.progressIdName];d.record=e;(function(){Ext.Ajax.request(d)}).defer(250)},this)}},setPath:function(b){this.path=b},setUrl:function(b){this.url=b},startProgress:function(){if(!this.progressTask){this.progressTask=new Ext.util.DelayedTask(this.requestProgress,this)}this.progressTask.delay.defer(this.progressInterval/2,this.progressTask,[this.progressInterval])},stopProgress:function(){if(this.progressTask){this.progressTask.cancel()}},stopAll:function(){var b=this.store.query("state","uploading");b.each(this.stopUpload,this)},stopUpload:function(b){var c=false;if(b){c=this.getIframe(b);this.stopIframe(c);this.upCount--;this.upCount=0>this.upCount?0:this.upCount;b.set("state","stopped");this.fireFinishEvents({record:b})}else{if(this.form){c=Ext.fly(this.form.dom.target);this.stopIframe(c);this.upCount=0;this.fireFinishEvents()}}},stopIframe:function(b){if(b){try{b.dom.contentWindow.stop();b.remove.defer(250,b)}catch(c){}}},upload:function(){var b=this.store.queryBy(function(c){return"done"!==c.get("state")});if(!b.getCount()){return}if(true!==this.eventsSuspended&&false===this.fireEvent("beforeallstart",this)){return}if(this.singleUpload){this.uploadSingle()}else{b.each(this.uploadFile,this)}if(true===this.enableProgress){this.startProgress()}},uploadCallback:function(c,g,b){var f;this.upCount--;this.form=false;if(true===g){try{f=Ext.decode(b.responseText)}catch(d){this.processFailure(c,b,this.jsonErrorText);this.fireFinishEvents(c);return}if(true===f.success){this.processSuccess(c,b,f)}else{this.processFailure(c,b,f)}}else{this.processFailure(c,b)}this.fireFinishEvents(c)},uploadFile:function(b,f){if(true!==this.eventsSuspended&&false===this.fireEvent("beforefilestart",this,b)){return}var d=this.createForm(b);var c=b.get("input");c.set({name:c.id});d.appendChild(c);var e=this.getOptions(b,f);e.form=d;b.set("state","uploading");b.set("pctComplete",0);this.upCount++;Ext.Ajax.request(e);this.getIframe.defer(100,this,[b])},uploadSingle:function(){var b=this.store.queryBy(function(e){return"done"!==e.get("state")});if(!b.getCount()){return}var c=this.createForm();b.each(function(e){var f=e.get("input");f.set({name:f.id});c.appendChild(f);e.set("state","uploading")},this);var d=this.getOptions();d.form=c;this.form=c;this.upCount++;Ext.Ajax.request(d)}});Ext.reg("fileuploader",Ext.ux.FileUploader);Ext.namespace("Ext.ux.form");Ext.ux.form.BrowseButton=Ext.extend(Ext.Button,{inputFileName:"file",debug:false,FLOAT_EL_WIDTH:60,FLOAT_EL_HEIGHT:18,buttonCt:null,clipEl:null,floatEl:null,inputFileEl:null,originalHandler:null,originalScope:null,initComponent:function(){Ext.ux.form.BrowseButton.superclass.initComponent.call(this);this.originalHandler=this.handler;this.originalScope=this.scope;this.handler=null;this.scope=null},onRender:function(e,c){Ext.ux.form.BrowseButton.superclass.onRender.call(this,e,c);this.buttonCt=this.el.child(".x-btn-center em");this.buttonCt.position("relative");var d={position:"absolute",overflow:"hidden",top:"0px",left:"0px"};if(Ext.isIE){Ext.apply(d,{left:"-3px",top:"-3px"})}else{if(Ext.isGecko){Ext.apply(d,{left:"-3px",top:"-3px"})}else{if(Ext.isSafari){Ext.apply(d,{left:"-4px",top:"-2px"})}}}this.clipEl=this.buttonCt.createChild({tag:"div",style:d});this.setClipSize();this.clipEl.on({mousemove:this.onButtonMouseMove,mouseover:this.onButtonMouseMove,scope:this});this.floatEl=this.clipEl.createChild({tag:"div",style:{position:"absolute",width:this.FLOAT_EL_WIDTH+"px",height:this.FLOAT_EL_HEIGHT+"px",overflow:"hidden"}});if(this.debug){this.clipEl.applyStyles({"background-color":"green"});this.floatEl.applyStyles({"background-color":"red"})}else{this.clipEl.setOpacity(0)}var b=this.el.child(this.buttonSelector);b.on("focus",this.onButtonFocus,this);if(Ext.isIE){this.el.on("keydown",this.onButtonKeyDown,this)}this.createInputFile()},setClipSize:function(){if(this.clipEl){var c=this.buttonCt.getWidth();var b=this.buttonCt.getHeight();if(c===0||b===0){this.setClipSize.defer(100,this)}else{if(Ext.isIE){c=c+5;b=b+5}else{if(Ext.isGecko){c=c+6;b=b+6}else{if(Ext.isSafari){c=c+6;b=b+6}}}this.clipEl.setSize(c,b)}}},createInputFile:function(){this.floatEl.select("em").each(function(c){c.remove()});var b=null;if(Ext.isIE){b={position:"absolute",cursor:"pointer",right:"0px",top:"0px"}}else{b={position:"absolute",cursor:"pointer"}}this.inputFileEl=this.floatEl.createChild({tag:"input",type:"file",size:1,name:this.inputFileName||Ext.id(this.el),tabindex:this.tabIndex,style:b});this.inputFileEl=this.inputFileEl.child("input")||this.inputFileEl;this.inputFileEl.on({click:this.onInputFileClick,change:this.onInputFileChange,focus:this.onInputFileFocus,select:this.onInputFileFocus,blur:this.onInputFileBlur,scope:this});if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:this.inputFileEl},this.tooltip))}else{this.inputFileEl.dom[this.tooltipType]=this.tooltip}}},onButtonFocus:function(b){if(this.inputFileEl){this.inputFileEl.focus();b.stopEvent()}},onButtonKeyDown:function(b){if(this.inputFileEl&&b.getKey()==Ext.EventObject.SPACE){this.inputFileEl.dom.click();b.stopEvent()}},onButtonMouseMove:function(c){var b=c.getXY();b[0]-=this.FLOAT_EL_WIDTH/2;b[1]-=this.FLOAT_EL_HEIGHT/2;this.floatEl.setXY(b)},onInputFileFocus:function(b){if(!this.isDisabled){this.el.addClass("x-btn-over")}},onInputFileBlur:function(b){this.el.removeClass("x-btn-over")},onInputFileClick:function(b){b.stopPropagation()},onInputFileChange:function(){if(this.originalHandler){this.originalHandler.call(this.originalScope,this)}},detachInputFile:function(c){var b=this.inputFileEl;if(typeof this.tooltip=="object"){Ext.QuickTips.unregister(this.inputFileEl)}else{this.inputFileEl.dom[this.tooltipType]=null}this.inputFileEl.removeAllListeners();this.inputFileEl=null;if(!c){this.createInputFile()}return b},getInputFile:function(){return this.inputFileEl},disable:function(){Ext.ux.form.BrowseButton.superclass.disable.call(this);this.inputFileEl.dom.disabled=true},enable:function(){Ext.ux.form.BrowseButton.superclass.enable.call(this);this.inputFileEl.dom.disabled=false}});Ext.reg("browsebutton",Ext.ux.form.BrowseButton);Ext.ux.IconCombo=Ext.extend(Ext.form.ComboBox,{initComponent:function(){Ext.apply(this,{tpl:'<tpl for="."><div class="x-combo-list-item ux-icon-combo-item {'+this.iconClsField+'}">{'+this.displayField+"}</div></tpl>"});Ext.ux.IconCombo.superclass.initComponent.apply(this,arguments)},onRender:function(c,b){Ext.ux.IconCombo.superclass.onRender.apply(this,arguments);this.wrap.applyStyles({position:"relative"});this.el.addClass("ux-icon-combo-input");this.icon=Ext.DomHelper.append(this.el.up("div.x-form-field-wrap"),{tag:"div",style:"position:absolute"})},afterRender:function(){Ext.ux.IconCombo.superclass.afterRender.apply(this,arguments);if(undefined!==this.value){this.setValue(this.value)}},setIconCls:function(){var b=this.store.query(this.valueField,this.getValue()).itemAt(0);if(b&&this.icon){this.icon.className="ux-icon-combo-icon "+b.get(this.iconClsField)}},setValue:function(b){Ext.ux.IconCombo.superclass.setValue.call(this,b);this.setIconCls()},clearValue:function(){Ext.ux.IconCombo.superclass.clearValue.call(this);if(this.icon){this.icon.className=""}}});Ext.reg("iconcombo",Ext.ux.IconCombo);Ext.ux.LangSelectCombo=Ext.extend(Ext.ux.IconCombo,{selectLangText:"Select Language",lazyRender:true,lazyInit:true,langVariable:"locale",typeAhead:true,initComponent:function(){var b=Ext.state.Manager.getProvider()?Ext.state.Manager.get(this.langVariable):"en_US";b=b?b:"en_US";Ext.apply(this,{store:new Ext.data.SimpleStore({id:0,fields:[{name:"langCode",type:"string"},{name:"langName",type:"string"},{name:"langCls",type:"string"}],data:[["cs_CZ","Český","ux-flag-cz"],["de_DE","Deutsch","ux-flag-de"],["fr_FR","French","ux-flag-fr"],["nl_NL","Dutch","ux-flag-nl"],["en_US","English","ux-flag-us"],["ru_RU","Russian","ux-flag-ru"],["sk_SK","Slovenský","ux-flag-sk"],["es_ES","Spanish","ux-flag-es"],["tr_TR","Turkish","ux-flag-tr"]]}),valueField:"langCode",displayField:"langName",iconClsField:"langCls",triggerAction:"all",mode:"local",forceSelection:true,value:b});Ext.ux.LangSelectCombo.superclass.initComponent.apply(this,arguments)},onSelect:function(b){Ext.ux.LangSelectCombo.superclass.onSelect.apply(this,arguments);var c=b.get("langCode");if(Ext.state.Manager.getProvider()){Ext.state.Manager.set(this.langVariable,c)}window.location.search=this.langVariable+"="+c}});Ext.ns("Ext.ux.tree");Ext.ux.tree.ArrayTree=Ext.extend(Ext.tree.TreePanel,{collapseAllText:"Collapse All",defaultRootConfig:{loaded:true,expanded:true,leaf:false,id:Ext.id()},defaultTools:true,expandAllText:"Expand All",expandedNodes:{},stateEvents:["expandnode","collapsenode"],initComponent:function(){var b=Ext.apply(this.defaultRootConfig,this.rootConfig,{children:this.children});Ext.apply(this,{root:new Ext.tree.AsyncTreeNode(b),loader:new Ext.tree.TreeLoader({preloadChildren:true,clearOnLoad:false}),sorter:this.sort?new Ext.tree.TreeSorter(this):undefined});if(this.defaultTools){Ext.apply(this,{tools:[{id:"minus",qtip:this.collapseAllText,scope:this,handler:this.collapseAll},{id:"plus",qtip:this.expandAllText,scope:this,handler:this.expandAll}]})}Ext.ux.tree.ArrayTree.superclass.initComponent.apply(this,arguments);if(false!==this.stateful){this.on({scope:this,beforeexpandnode:this.beforeExpandNode,beforecollapsenode:this.beforeCollapseNode})}},afterRender:function(){Ext.ux.tree.ArrayTree.superclass.afterRender.apply(this,arguments);for(var b in this.expandedNodes){if(this.expandedNodes.hasOwnProperty(b)){this.expandPath(this.expandedNodes[b])}}},beforeExpandNode:function(b){if(b.id){this.expandedNodes[b.id]=b.getPath()}},beforeCollapseNode:function(b){if(b.id){delete (this.expandedNodes[b.id]);b.cascade(function(c){if(c.id){delete (this.expandedNodes[c.id])}},this)}},getState:function(){return{expandedNodes:this.expandedNodes}}});Ext.reg("arraytree",Ext.ux.tree.ArrayTree);Ext.ux.UploadPanel=Ext.extend(Ext.Panel,{addIconCls:"icon-plus",addText:"Add",bodyStyle:"padding:2px",buttonsAt:"tbar",clickRemoveText:"Click to remove",clickStopText:"Click to stop",emptyText:"No files",enableProgress:true,errorText:"Error",fileCls:"file",fileQueuedText:"File <b>{0}</b> is queued for upload",fileDoneText:"File <b>{0}</b> has been successfully uploaded",fileFailedText:"File <b>{0}</b> failed to upload",fileStoppedText:"File <b>{0}</b> stopped by user",fileUploadingText:"Uploading file <b>{0}</b>",maxFileSize:524288,maxLength:18,removeAllIconCls:"icon-cross",removeAllText:"Remove All",removeIconCls:"icon-minus",removeText:"Remove",selectedClass:"ux-up-item-selected",singleUpload:false,stopAllText:"Stop All",stopIconCls:"icon-stop",uploadText:"Upload",uploadIconCls:"icon-upload",workingIconCls:"icon-working",initComponent:function(){var e={xtype:"browsebutton",text:this.addText+"...",iconCls:this.addIconCls,scope:this,handler:this.onAddFile};var c={xtype:"button",iconCls:this.uploadIconCls,text:this.uploadText,scope:this,handler:this.onUpload,disabled:true};var f={xtype:"button",iconCls:this.removeAllIconCls,tooltip:this.removeAllText,scope:this,handler:this.onRemoveAllClick,disabled:true};if("body"!==this.buttonsAt){this[this.buttonsAt]=[e,c,"->",f]}var b=[{name:"id",type:"text",system:true},{name:"shortName",type:"text",system:true},{name:"fileName",type:"text",system:true},{name:"filePath",type:"text",system:true},{name:"fileCls",type:"text",system:true},{name:"input",system:true},{name:"form",system:true},{name:"state",type:"text",system:true},{name:"error",type:"text",system:true},{name:"progressId",type:"int",system:true},{name:"bytesTotal",type:"int",system:true},{name:"bytesUploaded",type:"int",system:true},{name:"estSec",type:"int",system:true},{name:"filesUploaded",type:"int",system:true},{name:"speedAverage",type:"int",system:true},{name:"speedLast",type:"int",system:true},{name:"timeLast",type:"int",system:true},{name:"timeStart",type:"int",system:true},{name:"pctComplete",type:"int",system:true}];if(Ext.isArray(this.customFields)){b.push(this.customFields)}this.store=new Ext.data.SimpleStore({id:0,fields:b,data:[]});Ext.apply(this,{items:[{xtype:"dataview",itemSelector:"div.ux-up-item",store:this.store,selectedClass:this.selectedClass,singleSelect:true,emptyText:this.emptyText,tpl:this.tpl||new Ext.XTemplate('<tpl for="."><div class="ux-up-item"><div class="ux-up-icon-file {fileCls}">&#160;</div><div class="ux-up-text x-unselectable" qtip="{fileName}">{shortName}</div><div id="remove-{[values.input.id]}" class="ux-up-icon-state ux-up-icon-{state}"qtip="{[this.scope.getQtip(values)]}">&#160;</div></div></tpl>',{scope:this}),listeners:{click:{scope:this,fn:this.onViewClick}}}]});Ext.ux.UploadPanel.superclass.initComponent.apply(this,arguments);this.view=this.items.itemAt(0);this.addEvents("beforefileadd","fileadd","beforefileremove","fileremove","beforequeueclear","queueclear","beforeupload");this.relayEvents(this.view,["beforeclick","beforeselect","click","containerclick","contextmenu","dblclick","selectionchange"]);var d={store:this.store,singleUpload:this.singleUpload,maxFileSize:this.maxFileSize,enableProgress:this.enableProgress,url:this.url,path:this.path};if(this.baseParams){d.baseParams=this.baseParams}this.uploader=new Ext.ux.FileUploader(d);this.relayEvents(this.uploader,["beforeallstart","allfinished","progress"]);this.on({beforeallstart:{scope:this,fn:function(){this.uploading=true;this.updateButtons()}},allfinished:{scope:this,fn:function(){this.uploading=false;this.updateButtons()}},progress:{fn:this.onProgress.createDelegate(this)}})},onRender:function(){Ext.ux.UploadPanel.superclass.onRender.apply(this,arguments);var b="tbar"===this.buttonsAt?this.getTopToolbar():this.getBottomToolbar();this.addBtn=Ext.getCmp(b.items.first().id);this.uploadBtn=Ext.getCmp(b.items.itemAt(1).id);this.removeAllBtn=Ext.getCmp(b.items.last().id)},getQtip:function(b){var c="";switch(b.state){case"queued":c=String.format(this.fileQueuedText,b.fileName);c+="<br>"+this.clickRemoveText;break;case"uploading":c=String.format(this.fileUploadingText,b.fileName);c+="<br>"+b.pctComplete+"% done";c+="<br>"+this.clickStopText;break;case"done":c=String.format(this.fileDoneText,b.fileName);c+="<br>"+this.clickRemoveText;break;case"failed":c=String.format(this.fileFailedText,b.fileName);c+="<br>"+this.errorText+":"+b.error;c+="<br>"+this.clickRemoveText;break;case"stopped":c=String.format(this.fileStoppedText,b.fileName);c+="<br>"+this.clickRemoveText;break}return c},getFileName:function(b){return b.getValue().split(/[\/\\]/).pop()},getFilePath:function(b){return b.getValue().replace(/[^\/\\]+$/,"")},getFileCls:function(b){var c=b.split(".");if(1===c.length){return this.fileCls}else{return this.fileCls+"-"+c.pop().toLowerCase()}},onAddFile:function(d){if(true!==this.eventsSuspended&&false===this.fireEvent("beforefileadd",this,d.getInputFile())){return}var b=d.detachInputFile();b.addClass("x-hidden");var e=this.getFileName(b);var c=new this.store.recordType({input:b,fileName:e,filePath:this.getFilePath(b),shortName:Ext.util.Format.ellipsis(e,this.maxLength),fileCls:this.getFileCls(e),state:"queued"},b.id);c.commit();this.store.add(c);this.syncShadow();this.uploadBtn.enable();this.removeAllBtn.enable();if(true!==this.eventsSuspended){this.fireEvent("fileadd",this,this.store,c)}},onDestroy:function(){if(this.uploader){this.uploader.stopAll();this.uploader.purgeListeners();this.uploader=null}if(this.view){this.view.purgeListeners();this.view.destroy();this.view=null}if(this.store){this.store.purgeListeners();this.store.destroy();this.store=null}},onProgress:function(i,g,h){var f,e,j,b,k,l,c,d;if(h){b=h.get("state");f=h.get("bytesTotal")||1;e=h.get("bytesUploaded")||0;if("uploading"===b){j=Math.round(1000*e/f)/10}else{if("done"==="state"){j=100}else{j=0}}h.set("pctComplete",j);k=this.store.indexOf(h);l=Ext.get(this.view.getNode(k));if(l){c=l.getWidth();l.applyStyles({"background-position":c*j/100+"px"})}}},onRemoveFile:function(b){if(true!==this.eventsSuspended&&false===this.fireEvent("beforefileremove",this,this.store,b)){return}var e=b.get("input");var c=e.up("em");e.remove();if(c){c.remove()}this.store.remove(b);var d=this.store.getCount();this.uploadBtn.setDisabled(!d);this.removeAllBtn.setDisabled(!d);if(true!==this.eventsSuspended){this.fireEvent("fileremove",this,this.store);this.syncShadow()}},onRemoveAllClick:function(b){if(true===this.uploading){this.stopAll()}else{this.removeAll()}},stopAll:function(){this.uploader.stopAll()},onViewClick:function(b,c,f,g){var d=g.getTarget("div:any(.ux-up-icon-queued|.ux-up-icon-failed|.ux-up-icon-done|.ux-up-icon-stopped)");if(d){this.onRemoveFile(this.store.getAt(c))}d=g.getTarget("div.ux-up-icon-uploading");if(d){this.uploader.stopUpload(this.store.getAt(c))}},onUpload:function(){if(true!==this.eventsSuspended&&false===this.fireEvent("beforeupload",this)){return false}this.uploader.upload()},setUrl:function(b){this.url=b;this.uploader.setUrl(b)},setPath:function(b){this.uploader.setPath(b)},updateButtons:function(){if(true===this.uploading){this.addBtn.disable();this.uploadBtn.disable();this.removeAllBtn.setIconClass(this.stopIconCls);this.removeAllBtn.getEl().child(this.removeAllBtn.buttonSelector).dom[this.removeAllBtn.tooltipType]=this.stopAllText}else{this.addBtn.enable();this.uploadBtn.enable();this.removeAllBtn.setIconClass(this.removeAllIconCls);this.removeAllBtn.getEl().child(this.removeAllBtn.buttonSelector).dom[this.removeAllBtn.tooltipType]=this.removeAllText}},removeAll:function(){var b=this.eventsSuspended;if(false!==this.eventsSuspended&&false===this.fireEvent("beforequeueclear",this,this.store)){return false}this.suspendEvents();this.store.each(this.onRemoveFile,this);this.eventsSuspended=b;if(true!==this.eventsSuspended){this.fireEvent("queueclear",this,this.store)}this.syncShadow()},syncShadow:function(){if(this.contextmenu&&this.contextmenu.shadow){this.contextmenu.getEl().shadow.show(this.contextmenu.getEl())}}});Ext.reg("uploadpanel",Ext.ux.UploadPanel);Ext.ux.FileBrowserPanel=Ext.extend(Ext.Panel,{mainStore:null,view:null,treePanel:null,images:null,imagesUrl:"/services/ExtPortal/BrowseFilesService.svc/BrowseFiles",imagesTitle:"",treepanel:null,treeUrl:"/BrowseFiles.aspx",treeTitle:"",treeRootPath:"TestUpload",ParentWindow:null,width:650,height:400,lookup:{},initComponent:function(){var g=function(i){i.shortName=i.name.ellipse(15);i.sizeString=e(i);i.dateString=new Date(i.lastmod).format("m/d/Y g:i a");this.lookup[i.name]=i;return i};var e=function(i){if(i.size<1024){return i.size+" bytes"}else{return(Math.round(((i.size*10)/1024))/10)+" KB"}};this.buttons=[{id:"ok-btn",text:"OK",handler:this.doCallback,scope:this},{text:"Cancel",handler:function(){if(this.ParentWindow!=null&&this.ParentWindow!=undefined){this.ParentWindow.hide()}},scope:this}];var f=new Ext.data.JsonStore({url:this.imagesUrl,autoLoad:true,root:"Rows",id:"mainStore",fields:["name","url","path",{name:"shortName",mapping:"name",convert:shortName}],listeners:{load:{fn:function(){this.view.select(0)},scope:this,single:true}}});this.mainStore=f;var c=new Ext.DataView({itemSelector:"div.thumb-wrap",style:"overflow:auto",multiSelect:true,plugins:new Ext.DataView.DragSelector({dragSafe:true}),store:f,closeAction:"hide",tpl:new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="{name}">','<div class="thumb"><img src="{url}" class="thumb-img"></div>',"<span>{shortName}</span></div>","</tpl>"),listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(i){return i.store.getRange().length>0}}},prepareData:g.createDelegate(this)});var h=new Ext.Toolbar([{text:"Filter:"},{xtype:"textfield",id:"filter",selectOnFocus:true,width:75,listeners:{render:{fn:function(){Ext.getCmp("filter").getEl().on("keyup",function(){this.filter()},this,{buffer:500})},scope:this}}}," ","-",{text:"Sort By:"},{id:"sortSelect",xtype:"combo",typeAhead:true,triggerAction:"all",width:100,editable:false,mode:"local",displayField:"desc",valueField:"name",lazyInit:false,value:"name",store:new Ext.data.SimpleStore({fields:["name","desc"],data:[["name","Name"],["size","File Size"],["lastmod","Last Modified"]]}),listeners:{select:{fn:this.sortImages,scope:this}}}],{region:"center",margins:"5 5 5 0",margins:"5 0 5 5"});this.view=c;var b=new Ext.Panel({id:"imagesPanel",title:this.imagesTitle,region:"center",margins:"5 5 5 0",items:[h,c],listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(i){return i.store.getRange().length>0}}}});this.images=b;var d=new Ext.ux.FileTreePanelImages({renameUrl:"/services/ExtPortal/BrowseFilesService.svc/renameTreeNode",deleteUrl:"/services/ExtPortal/BrowseFilesService.svc/deleteTreeNode",uploadUrl:this.treeUrl,newdirUrl:"/services/ExtPortal/BrowseFilesService.svc/newdirTreeNode",url:"/services/ExtPortal/BrowseFilesService.svc/getTreeNodes",loader:new Ext.tree.WCFTreeLoader({renameUrl:"/services/ExtPortal/BrowseFilesService.svc/renameTreeNode",deleteUrl:"/services/ExtPortal/BrowseFilesService.svc/deleteTreeNode",uploadUrl:this.treeUrl,newdirUrl:"/services/ExtPortal/BrowseFilesService.svc/newdirTreeNode",url:"/services/ExtPortal/BrowseFilesService.svc/getTreeNodes",baseParams:{path:this.treeRootPath},listeners:{beforeload:{scope:this,fn:function(i,j){i.baseParams.path=d.getPath(j)}}}}),animate:true,enableDD:true,containerScroll:true,ddGroup:"organizerDD",rootVisible:true,url:this.treeUrl,region:"west",width:150,split:true,margins:"5 0 5 5",store:f,autoWidth:false,id:"ftp",title:this.treeTitle,rootPath:this.treeRootPath,topMenu:true,autoScroll:true,enableProgress:false});this.treePanel=d;this.items=[d,b];f.proxy.thePath="TestUpload";f.proxy.theFilter="*.*";f.proxy.on("beforeload",function(i,j){j.path=this.thePath;j.filter=this.theFilter});Ext.ux.FileBrowserPanel.superclass.initComponent.apply(this,arguments)},doCallback:function(){var b=this.view.getSelectedNodes()[0];var d=this.callback;var c=this.lookup;this.ParentWindow.hide(this.animateTarget,function(){if(b&&d){var e=c[b.id];d(e)}})},onLoadException:function(b,c){this.view.getEl().update('<div style="padding:10px;">Error loading images.</div>')},filter:function(){var b=Ext.getCmp("filter");this.view.store.filter("name",b.getValue());this.view.select(0)},sortImages:function(){var b=Ext.getCmp("sortSelect").getValue();this.view.store.sort(b,b=="name"?"asc":"desc");this.view.select(0)},reset:function(){if(this.win.rendered){Ext.getCmp("filter").reset();this.view.getEl().dom.scrollTop=0}this.view.store.clearFilter();this.view.select(0)}});String.prototype.ellipse=function(b){if(this.length>b){return this.substr(0,b-3)+"..."}return this};Ext.namespace("Ext.ux","Ext.ux.Crypto");Ext.ux.Crypto.SHA1=function(){var c=function(e,d,g,f){switch(e){case 0:return(d&g)^(~d&f);case 1:return d^g^f;case 2:return(d&g)^(d&f)^(g&f);case 3:return d^g^f}};var b=function(d,e){return(d<<e)|(d>>>(32-e))};return{hash:function(h){var n=[1518500249,1859775393,2400959708,3395469782];h+=String.fromCharCode(128);var y=Math.ceil(h.length/4)+2;var k=Math.ceil(y/16);var m=new Array(k);for(var B=0;B<k;B++){m[B]=new Array(16);for(var A=0;A<16;A++){m[B][A]=(h.charCodeAt(B*64+A*4)<<24)|(h.charCodeAt(B*64+A*4+1)<<16)|(h.charCodeAt(B*64+A*4+2)<<8)|(h.charCodeAt(B*64+A*4+3))}}m[k-1][14]=((h.length-1)*8)/Math.pow(2,32);m[k-1][14]=Math.floor(m[k-1][14]);m[k-1][15]=((h.length-1)*8)&4294967295;var u=1732584193;var r=4023233417;var q=2562383102;var p=271733878;var o=3285377520;var f=new Array(80);var G,F,E,D,C;for(var B=0;B<k;B++){for(var w=0;w<16;w++){f[w]=m[B][w]}for(var w=16;w<80;w++){f[w]=b(f[w-3]^f[w-8]^f[w-14]^f[w-16],1)}G=u;F=r;E=q;D=p;C=o;for(var w=0;w<80;w++){var x=Math.floor(w/20);var g=(b(G,5)+c(x,F,E,D)+C+n[x]+f[w])&4294967295;C=D;D=E;E=b(F,30);F=G;G=g}u=(u+G)&4294967295;r=(r+F)&4294967295;q=(q+E)&4294967295;p=(p+D)&4294967295;o=(o+C)&4294967295}return u.toHexStr()+r.toHexStr()+q.toHexStr()+p.toHexStr()+o.toHexStr()}}}();Ext.applyIf(Number.prototype,{toHexStr:function(){var d="",b;for(var c=7;c>=0;c--){b=(this>>>(c*4))&15;d+=b.toString(16)}return d}});Ext.menu.EditableItem=Ext.extend(Ext.menu.BaseItem,{itemCls:"x-menu-item",hideOnClick:false,initComponent:function(){Ext.menu.EditableItem.superclass.initComponent.call(this);this.addEvents("keyup");this.editor=this.editor||new Ext.form.TextField();if(this.text){this.editor.setValue(this.text)}},onRender:function(b){var c=b.createChild({cls:this.itemCls,html:'<img src="'+this.icon+'" class="x-menu-item-icon" style="margin: 3px 3px 2px 2px;" />'});Ext.apply(this.config,{width:125});this.editor.render(c);this.el=c;this.relayEvents(this.editor.el,["keyup"]);if(Ext.isGecko){c.setStyle("overflow","auto")}Ext.menu.EditableItem.superclass.onRender.call(this,b)},getValue:function(){return this.editor.getValue()},setValue:function(b){this.editor.setValue(b)},isValid:function(b){return this.editor.isValid(b)}});var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64pad="=";function hex2b64(e){var d;var f;var b="";for(d=0;d+3<=e.length;d+=3){f=parseInt(e.substring(d,d+3),16);b+=b64map.charAt(f>>6)+b64map.charAt(f&63)}if(d+1==e.length){f=parseInt(e.substring(d,d+1),16);b+=b64map.charAt(f<<2)}else{if(d+2==e.length){f=parseInt(e.substring(d,d+2),16);b+=b64map.charAt(f>>2)+b64map.charAt((f&3)<<4)}}while((b.length&3)>0){b+=b64pad}return b}function b64tohex(f){var d="";var e;var b=0;var c;for(e=0;e<f.length;++e){if(f.charAt(e)==b64pad){break}v=b64map.indexOf(f.charAt(e));if(v<0){continue}if(b==0){d+=int2char(v>>2);c=v&3;b=1}else{if(b==1){d+=int2char((c<<2)|(v>>4));c=v&15;b=2}else{if(b==2){d+=int2char(c);d+=int2char(v>>2);c=v&3;b=3}else{d+=int2char((c<<2)|(v>>4));d+=int2char(v&15);b=0}}}}if(b==1){d+=int2char(c<<2)}return d}function b64toBA(e){var d=b64tohex(e);var c;var b=new Array();for(c=0;2*c<d.length;++c){b[c]=parseInt(d.substring(2*c,2*c+2),16)}return b}var dbits;var canary=244837814094590;var j_lm=((canary&16777215)==15715070);function BigInteger(e,d,f){if(e!=null){if("number"==typeof e){this.fromNumber(e,d,f)}else{if(d==null&&"string"!=typeof e){this.fromString(e,256)}else{this.fromString(e,d)}}}}function nbi(){return new BigInteger(null)}function am1(g,b,d,f,k,h){while(--h>=0){var e=b*this[g++]+d[f]+k;k=Math.floor(e/67108864);d[f++]=e&67108863}return k}function am2(g,r,s,f,p,b){var o=r&32767,q=r>>15;while(--b>=0){var e=this[g]&32767;var k=this[g++]>>15;var d=q*e+k*o;e=o*e+((d&32767)<<15)+s[f]+(p&1073741823);p=(e>>>30)+(d>>>15)+q*k+(p>>>30);s[f++]=e&1073741823}return p}function am3(g,r,s,f,p,b){var o=r&16383,q=r>>14;while(--b>=0){var e=this[g]&16383;var k=this[g++]>>14;var d=q*e+k*o;e=o*e+((d&16383)<<14)+s[f]+p;p=(e>>28)+(d>>14)+q*k;s[f++]=e&268435455}return p}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<<dbits)-1);BigInteger.prototype.DV=(1<<dbits);var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array();var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv){BI_RC[rr++]=vv}rr="a".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}rr="A".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}function int2char(b){return BI_RM.charAt(b)}function intAt(d,b){var e=BI_RC[d.charCodeAt(b)];return(e==null)?-1:e}function bnpCopyTo(c){for(var b=this.t-1;b>=0;--b){c[b]=this[b]}c.t=this.t;c.s=this.s}function bnpFromInt(b){this.t=1;this.s=(b<0)?-1:0;if(b>0){this[0]=b}else{if(b<-1){this[0]=b+DV}else{this.t=0}}}function nbv(b){var c=nbi();c.fromInt(b);return c}function bnpFromString(j,d){var f;if(d==16){f=4}else{if(d==8){f=3}else{if(d==256){f=8}else{if(d==2){f=1}else{if(d==32){f=5}else{if(d==4){f=2}else{this.fromRadix(j,d);return}}}}}}this.t=0;this.s=0;var h=j.length,e=false,g=0;while(--h>=0){var c=(f==8)?j[h]&255:intAt(j,h);if(c<0){if(j.charAt(h)=="-"){e=true}continue}e=false;if(g==0){this[this.t++]=c}else{if(g+f>this.DB){this[this.t-1]|=(c&((1<<(this.DB-g))-1))<<g;this[this.t++]=(c>>(this.DB-g))}else{this[this.t-1]|=c<<g}}g+=f;if(g>=this.DB){g-=this.DB}}if(f==8&&(j[0]&128)!=0){this.s=-1;if(g>0){this[this.t-1]|=((1<<(this.DB-g))-1)<<g}}this.clamp();if(e){BigInteger.ZERO.subTo(this,this)}}function bnpClamp(){var b=this.s&this.DM;while(this.t>0&&this[this.t-1]==b){--this.t}}function bnToString(e){if(this.s<0){return"-"+this.negate().toString(e)}var f;if(e==16){f=4}else{if(e==8){f=3}else{if(e==2){f=1}else{if(e==32){f=5}else{if(e==4){f=2}else{return this.toRadix(e)}}}}}var h=(1<<f)-1,n,c=false,j="",g=this.t;var l=this.DB-(g*this.DB)%f;if(g-->0){if(l<this.DB&&(n=this[g]>>l)>0){c=true;j=int2char(n)}while(g>=0){if(l<f){n=(this[g]&((1<<l)-1))<<(f-l);n|=this[--g]>>(l+=this.DB-f)}else{n=(this[g]>>(l-=f))&h;if(l<=0){l+=this.DB;--g}}if(n>0){c=true}if(c){j+=int2char(n)}}}return c?j:"0"}function bnNegate(){var b=nbi();BigInteger.ZERO.subTo(this,b);return b}function bnAbs(){return(this.s<0)?this.negate():this}function bnCompareTo(b){var d=this.s-b.s;if(d!=0){return d}var c=this.t;d=c-b.t;if(d!=0){return d}while(--c>=0){if((d=this[c]-b[c])!=0){return d}}return 0}function nbits(b){var d=1,c;if((c=b>>>16)!=0){b=c;d+=16}if((c=b>>8)!=0){b=c;d+=8}if((c=b>>4)!=0){b=c;d+=4}if((c=b>>2)!=0){b=c;d+=2}if((c=b>>1)!=0){b=c;d+=1}return d}function bnBitLength(){if(this.t<=0){return 0}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM))}function bnpDLShiftTo(d,c){var b;for(b=this.t-1;b>=0;--b){c[b+d]=this[b]}for(b=d-1;b>=0;--b){c[b]=0}c.t=this.t+d;c.s=this.s}function bnpDRShiftTo(d,c){for(var b=d;b<this.t;++b){c[b-d]=this[b]}c.t=Math.max(this.t-d,0);c.s=this.s}function bnpLShiftTo(k,f){var d=k%this.DB;var b=this.DB-d;var h=(1<<b)-1;var g=Math.floor(k/this.DB),j=(this.s<<d)&this.DM,e;for(e=this.t-1;e>=0;--e){f[e+g+1]=(this[e]>>b)|j;j=(this[e]&h)<<d}for(e=g-1;e>=0;--e){f[e]=0}f[g]=j;f.t=this.t+g+1;f.s=this.s;f.clamp()}function bnpRShiftTo(h,e){e.s=this.s;var f=Math.floor(h/this.DB);if(f>=this.t){e.t=0;return}var c=h%this.DB;var b=this.DB-c;var g=(1<<c)-1;e[0]=this[f]>>c;for(var d=f+1;d<this.t;++d){e[d-f-1]|=(this[d]&g)<<b;e[d-f]=this[d]>>c}if(c>0){e[this.t-f-1]|=(this.s&g)<<b}e.t=this.t-f;e.clamp()}function bnpSubTo(d,f){var e=0,g=0,b=Math.min(d.t,this.t);while(e<b){g+=this[e]-d[e];f[e++]=g&this.DM;g>>=this.DB}if(d.t<this.t){g-=d.s;while(e<this.t){g+=this[e];f[e++]=g&this.DM;g>>=this.DB}g+=this.s}else{g+=this.s;while(e<d.t){g-=d[e];f[e++]=g&this.DM;g>>=this.DB}g-=d.s}f.s=(g<0)?-1:0;if(g<-1){f[e++]=this.DV+g}else{if(g>0){f[e++]=g}}f.t=e;f.clamp()}function bnpMultiplyTo(c,e){var b=this.abs(),f=c.abs();var d=b.t;e.t=d+f.t;while(--d>=0){e[d]=0}for(d=0;d<f.t;++d){e[d+b.t]=b.am(0,f[d],e,d,0,b.t)}e.s=0;e.clamp();if(this.s!=c.s){BigInteger.ZERO.subTo(e,e)}}function bnpSquareTo(e){var b=this.abs();var d=e.t=2*b.t;while(--d>=0){e[d]=0}for(d=0;d<b.t-1;++d){var f=b.am(d,b[d],e,2*d,0,1);if((e[d+b.t]+=b.am(d+1,2*b[d],e,2*d+1,f,b.t-d-1))>=b.DV){e[d+b.t]-=b.DV;e[d+b.t+1]=1}}if(e.t>0){e[e.t-1]+=b.am(d,b[d],e,2*d,0,1)}e.s=0;e.clamp()}function bnpDivRemTo(o,k,h){var A=o.abs();if(A.t<=0){return}var l=this.abs();if(l.t<A.t){if(k!=null){k.fromInt(0)}if(h!=null){this.copyTo(h)}return}if(h==null){h=nbi()}var f=nbi(),b=this.s,n=o.s;var x=this.DB-nbits(A[A.t-1]);if(x>0){A.lShiftTo(x,f);l.lShiftTo(x,h)}else{A.copyTo(f);l.copyTo(h)}var s=f.t;var c=f[s-1];if(c==0){return}var p=c*(1<<this.F1)+((s>1)?f[s-2]>>this.F2:0);var D=this.FV/p,C=(1<<this.F1)/p,B=1<<this.F2;var w=h.t,u=w-s,g=(k==null)?nbi():k;f.dlShiftTo(u,g);if(h.compareTo(g)>=0){h[h.t++]=1;h.subTo(g,h)}BigInteger.ONE.dlShiftTo(s,g);g.subTo(f,f);while(f.t<s){f[f.t++]=0}while(--u>=0){var d=(h[--w]==c)?this.DM:Math.floor(h[w]*D+(h[w-1]+B)*C);if((h[w]+=f.am(0,d,h,u,0,s))<d){f.dlShiftTo(u,g);h.subTo(g,h);while(h[w]<--d){h.subTo(g,h)}}}if(k!=null){h.drShiftTo(s,k);if(b!=n){BigInteger.ZERO.subTo(k,k)}}h.t=s;h.clamp();if(x>0){h.rShiftTo(x,h)}if(b<0){BigInteger.ZERO.subTo(h,h)}}function bnMod(b){var c=nbi();this.abs().divRemTo(b,null,c);if(this.s<0&&c.compareTo(BigInteger.ZERO)>0){b.subTo(c,c)}return c}function Classic(b){this.m=b}function cConvert(b){if(b.s<0||b.compareTo(this.m)>=0){return b.mod(this.m)}else{return b}}function cRevert(b){return b}function cReduce(b){b.divRemTo(this.m,null,b)}function cMulTo(b,d,c){b.multiplyTo(d,c);this.reduce(c)}function cSqrTo(b,c){b.squareTo(c);this.reduce(c)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0}var b=this[0];if((b&1)==0){return 0}var c=b&3;c=(c*(2-(b&15)*c))&15;c=(c*(2-(b&255)*c))&255;c=(c*(2-(((b&65535)*c)&65535)))&65535;c=(c*(2-b*c%this.DV))%this.DV;return(c>0)?this.DV-c:-c}function Montgomery(b){this.m=b;this.mp=b.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(b.DB-15))-1;this.mt2=2*b.t}function montConvert(b){var c=nbi();b.abs().dlShiftTo(this.m.t,c);c.divRemTo(this.m,null,c);if(b.s<0&&c.compareTo(BigInteger.ZERO)>0){this.m.subTo(c,c)}return c}function montRevert(b){var c=nbi();b.copyTo(c);this.reduce(c);return c}function montReduce(b){while(b.t<=this.mt2){b[b.t++]=0}for(var d=0;d<this.m.t;++d){var c=b[d]&32767;var e=(c*this.mpl+(((c*this.mph+(b[d]>>15)*this.mpl)&this.um)<<15))&b.DM;c=d+this.m.t;b[c]+=this.m.am(0,e,b,d,0,this.m.t);while(b[c]>=b.DV){b[c]-=b.DV;b[++c]++}}b.clamp();b.drShiftTo(this.m.t,b);if(b.compareTo(this.m)>=0){b.subTo(this.m,b)}}function montSqrTo(b,c){b.squareTo(c);this.reduce(c)}function montMulTo(b,d,c){b.multiplyTo(d,c);this.reduce(c)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0}function bnpExp(j,k){if(j>4294967295||j<1){return BigInteger.ONE}var h=nbi(),b=nbi(),f=k.convert(this),d=nbits(j)-1;f.copyTo(h);while(--d>=0){k.sqrTo(h,b);if((j&(1<<d))>0){k.mulTo(b,f,h)}else{var c=h;h=b;b=c}}return k.revert(h)}function bnModPowInt(c,b){var d;if(c<256||b.isEven()){d=new Classic(b)}else{d=new Montgomery(b)}return this.exp(c,d)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var b=nbi();this.copyTo(b);return b}function bnIntValue(){if(this.s<0){if(this.t==1){return this[0]-this.DV}else{if(this.t==0){return -1}}}else{if(this.t==1){return this[0]}else{if(this.t==0){return 0}}}return((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0]}function bnByteValue(){return(this.t==0)?this.s:(this[0]<<24)>>24}function bnShortValue(){return(this.t==0)?this.s:(this[0]<<16)>>16}function bnpChunkSize(b){return Math.floor(Math.LN2*this.DB/Math.log(b))}function bnSigNum(){if(this.s<0){return -1}else{if(this.t<=0||(this.t==1&&this[0]<=0)){return 0}else{return 1}}}function bnpToRadix(c){if(c==null){c=10}if(this.signum()==0||c<2||c>36){return"0"}var f=this.chunkSize(c);var e=Math.pow(c,f);var i=nbv(e),j=nbi(),h=nbi(),g="";this.divRemTo(i,j,h);while(j.signum()>0){g=(e+h.intValue()).toString(c).substr(1)+g;j.divRemTo(i,j,h)}return h.intValue().toString(c)+g}function bnpFromRadix(n,k){this.fromInt(0);if(k==null){k=10}var g=this.chunkSize(k);var h=Math.pow(k,g),f=false,c=0,m=0;for(var e=0;e<n.length;++e){var l=intAt(n,e);if(l<0){if(n.charAt(e)=="-"&&this.signum()==0){f=true}continue}m=k*m+l;if(++c>=g){this.dMultiply(h);this.dAddOffset(m,0);c=0;m=0}}if(c>0){this.dMultiply(Math.pow(k,c));this.dAddOffset(m,0)}if(f){BigInteger.ZERO.subTo(this,this)}}function bnpFromNumber(f,e,h){if("number"==typeof e){if(f<2){this.fromInt(1)}else{this.fromNumber(f,h);if(!this.testBit(f-1)){this.bitwiseTo(BigInteger.ONE.shiftLeft(f-1),op_or,this)}if(this.isEven()){this.dAddOffset(1,0)}while(!this.isProbablePrime(e)){this.dAddOffset(2,0);if(this.bitLength()>f){this.subTo(BigInteger.ONE.shiftLeft(f-1),this)}}}}else{var d=new Array(),g=f&7;d.length=(f>>3)+1;e.nextBytes(d);if(g>0){d[0]&=((1<<g)-1)}else{d[0]=0}this.fromString(d,256)}}function bnToByteArray(){var c=this.t,e=new Array();e[0]=this.s;var f=this.DB-(c*this.DB)%8,g,b=0;if(c-->0){if(f<this.DB&&(g=this[c]>>f)!=(this.s&this.DM)>>f){e[b++]=g|(this.s<<(this.DB-f))}while(c>=0){if(f<8){g=(this[c]&((1<<f)-1))<<(8-f);g|=this[--c]>>(f+=this.DB-8)}else{g=(this[c]>>(f-=8))&255;if(f<=0){f+=this.DB;--c}}if((g&128)!=0){g|=-256}if(b==0&&(this.s&128)!=(g&128)){++b}if(b>0||g!=this.s){e[b++]=g}}}return e}function bnEquals(b){return(this.compareTo(b)==0)}function bnMin(b){return(this.compareTo(b)<0)?this:b}function bnMax(b){return(this.compareTo(b)>0)?this:b}function bnpBitwiseTo(c,h,e){var d,g,b=Math.min(c.t,this.t);for(d=0;d<b;++d){e[d]=h(this[d],c[d])}if(c.t<this.t){g=c.s&this.DM;for(d=b;d<this.t;++d){e[d]=h(this[d],g)}e.t=this.t}else{g=this.s&this.DM;for(d=b;d<c.t;++d){e[d]=h(g,c[d])}e.t=c.t}e.s=h(this.s,c.s);e.clamp()}function op_and(b,c){return b&c}function bnAnd(b){var c=nbi();this.bitwiseTo(b,op_and,c);return c}function op_or(b,c){return b|c}function bnOr(b){var c=nbi();this.bitwiseTo(b,op_or,c);return c}function op_xor(b,c){return b^c}function bnXor(b){var c=nbi();this.bitwiseTo(b,op_xor,c);return c}function op_andnot(b,c){return b&~c}function bnAndNot(b){var c=nbi();this.bitwiseTo(b,op_andnot,c);return c}function bnNot(){var c=nbi();for(var b=0;b<this.t;++b){c[b]=this.DM&~this[b]}c.t=this.t;c.s=~this.s;return c}function bnShiftLeft(c){var b=nbi();if(c<0){this.rShiftTo(-c,b)}else{this.lShiftTo(c,b)}return b}function bnShiftRight(c){var b=nbi();if(c<0){this.lShiftTo(-c,b)}else{this.rShiftTo(c,b)}return b}function lbit(b){if(b==0){return -1}var c=0;if((b&65535)==0){b>>=16;c+=16}if((b&255)==0){b>>=8;c+=8}if((b&15)==0){b>>=4;c+=4}if((b&3)==0){b>>=2;c+=2}if((b&1)==0){++c}return c}function bnGetLowestSetBit(){for(var b=0;b<this.t;++b){if(this[b]!=0){return b*this.DB+lbit(this[b])}}if(this.s<0){return this.t*this.DB}return -1}function cbit(b){var c=0;while(b!=0){b&=b-1;++c}return c}function bnBitCount(){var d=0,b=this.s&this.DM;for(var c=0;c<this.t;++c){d+=cbit(this[c]^b)}return d}function bnTestBit(c){var b=Math.floor(c/this.DB);if(b>=this.t){return(this.s!=0)}return((this[b]&(1<<(c%this.DB)))!=0)}function bnpChangeBit(d,c){var b=BigInteger.ONE.shiftLeft(d);this.bitwiseTo(b,c,b);return b}function bnSetBit(b){return this.changeBit(b,op_or)}function bnClearBit(b){return this.changeBit(b,op_andnot)}function bnFlipBit(b){return this.changeBit(b,op_xor)}function bnpAddTo(d,f){var e=0,g=0,b=Math.min(d.t,this.t);while(e<b){g+=this[e]+d[e];f[e++]=g&this.DM;g>>=this.DB}if(d.t<this.t){g+=d.s;while(e<this.t){g+=this[e];f[e++]=g&this.DM;g>>=this.DB}g+=this.s}else{g+=this.s;while(e<d.t){g+=d[e];f[e++]=g&this.DM;g>>=this.DB}g+=d.s}f.s=(g<0)?-1:0;if(g>0){f[e++]=g}else{if(g<-1){f[e++]=this.DV+g}}f.t=e;f.clamp()}function bnAdd(b){var c=nbi();this.addTo(b,c);return c}function bnSubtract(b){var c=nbi();this.subTo(b,c);return c}function bnMultiply(b){var c=nbi();this.multiplyTo(b,c);return c}function bnDivide(b){var c=nbi();this.divRemTo(b,c,null);return c}function bnRemainder(b){var c=nbi();this.divRemTo(b,null,c);return c}function bnDivideAndRemainder(b){var d=nbi(),c=nbi();this.divRemTo(b,d,c);return new Array(d,c)}function bnpDMultiply(b){this[this.t]=this.am(0,b-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(c,b){while(this.t<=b){this[this.t++]=0}this[b]+=c;while(this[b]>=this.DV){this[b]-=this.DV;if(++b>=this.t){this[this.t++]=0}++this[b]}}function NullExp(){}function nNop(b){return b}function nMulTo(b,d,c){b.multiplyTo(d,c)}function nSqrTo(b,c){b.squareTo(c)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(b){return this.exp(b,new NullExp())}function bnpMultiplyLowerTo(b,f,e){var d=Math.min(this.t+b.t,f);e.s=0;e.t=d;while(d>0){e[--d]=0}var c;for(c=e.t-this.t;d<c;++d){e[d+this.t]=this.am(0,b[d],e,d,0,this.t)}for(c=Math.min(b.t,f);d<c;++d){this.am(0,b[d],e,d,0,f-d)}e.clamp()}function bnpMultiplyUpperTo(b,e,d){--e;var c=d.t=this.t+b.t-e;d.s=0;while(--c>=0){d[c]=0}for(c=Math.max(e-this.t,0);c<b.t;++c){d[this.t+c-e]=this.am(e-c,b[c],d,0,0,this.t+c-e)}d.clamp();d.drShiftTo(1,d)}function Barrett(b){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*b.t,this.r2);this.mu=this.r2.divide(b);this.m=b}function barrettConvert(b){if(b.s<0||b.t>2*this.m.t){return b.mod(this.m)}else{if(b.compareTo(this.m)<0){return b}else{var c=nbi();b.copyTo(c);this.reduce(c);return c}}}function barrettRevert(b){return b}function barrettReduce(b){b.drShiftTo(this.m.t-1,this.r2);if(b.t>this.m.t+1){b.t=this.m.t+1;b.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(b.compareTo(this.r2)<0){b.dAddOffset(1,this.m.t+1)}b.subTo(this.r2,b);while(b.compareTo(this.m)>=0){b.subTo(this.m,b)}}function barrettSqrTo(b,c){b.squareTo(c);this.reduce(c)}function barrettMulTo(b,d,c){b.multiplyTo(d,c);this.reduce(c)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(s,h){var p=s.bitLength(),l,c=nbv(1),y;if(p<=0){return c}else{if(p<18){l=1}else{if(p<48){l=3}else{if(p<144){l=4}else{if(p<768){l=5}else{l=6}}}}}if(p<8){y=new Classic(h)}else{if(h.isEven()){y=new Barrett(h)}else{y=new Montgomery(h)}}var q=new Array(),f=3,u=l-1,b=(1<<l)-1;q[1]=y.convert(this);if(l>1){var C=nbi();y.sqrTo(q[1],C);while(f<=b){q[f]=nbi();y.mulTo(C,q[f-2],q[f]);f+=2}}var o=s.t-1,A,x=true,d=nbi(),B;p=nbits(s[o])-1;while(o>=0){if(p>=u){A=(s[o]>>(p-u))&b}else{A=(s[o]&((1<<(p+1))-1))<<(u-p);if(o>0){A|=s[o-1]>>(this.DB+p-u)}}f=l;while((A&1)==0){A>>=1;--f}if((p-=f)<0){p+=this.DB;--o}if(x){q[A].copyTo(c);x=false}else{while(f>1){y.sqrTo(c,d);y.sqrTo(d,c);f-=2}if(f>0){y.sqrTo(c,d)}else{B=c;c=d;d=B}y.mulTo(d,q[A],c)}while(o>=0&&(s[o]&(1<<p))==0){y.sqrTo(c,d);B=c;c=d;d=B;if(--p<0){p=this.DB-1;--o}}}return y.revert(c)}function bnGCD(c){var b=(this.s<0)?this.negate():this.clone();var h=(c.s<0)?c.negate():c.clone();if(b.compareTo(h)<0){var e=b;b=h;h=e}var d=b.getLowestSetBit(),f=h.getLowestSetBit();if(f<0){return b}if(d<f){f=d}if(f>0){b.rShiftTo(f,b);h.rShiftTo(f,h)}while(b.signum()>0){if((d=b.getLowestSetBit())>0){b.rShiftTo(d,b)}if((d=h.getLowestSetBit())>0){h.rShiftTo(d,h)}if(b.compareTo(h)>=0){b.subTo(h,b);b.rShiftTo(1,b)}else{h.subTo(b,h);h.rShiftTo(1,h)}}if(f>0){h.lShiftTo(f,h)}return h}function bnpModInt(f){if(f<=0){return 0}var e=this.DV%f,c=(this.s<0)?f-1:0;if(this.t>0){if(e==0){c=this[0]%f}else{for(var b=this.t-1;b>=0;--b){c=(e*c+this[b])%f}}}return c}function bnModInverse(f){var j=f.isEven();if((this.isEven()&&j)||f.signum()==0){return BigInteger.ZERO}var i=f.clone(),h=this.clone();var g=nbv(1),e=nbv(0),l=nbv(0),k=nbv(1);while(i.signum()!=0){while(i.isEven()){i.rShiftTo(1,i);if(j){if(!g.isEven()||!e.isEven()){g.addTo(this,g);e.subTo(f,e)}g.rShiftTo(1,g)}else{if(!e.isEven()){e.subTo(f,e)}}e.rShiftTo(1,e)}while(h.isEven()){h.rShiftTo(1,h);if(j){if(!l.isEven()||!k.isEven()){l.addTo(this,l);k.subTo(f,k)}l.rShiftTo(1,l)}else{if(!k.isEven()){k.subTo(f,k)}}k.rShiftTo(1,k)}if(i.compareTo(h)>=0){i.subTo(h,i);if(j){g.subTo(l,g)}e.subTo(k,e)}else{h.subTo(i,h);if(j){l.subTo(g,l)}k.subTo(e,k)}}if(h.compareTo(BigInteger.ONE)!=0){return BigInteger.ZERO}if(k.compareTo(f)>=0){return k.subtract(f)}if(k.signum()<0){k.addTo(f,k)}else{return k}if(k.signum()<0){return k.add(f)}else{return k}}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];var lplim=(1<<26)/lowprimes[lowprimes.length-1];function bnIsProbablePrime(f){var e,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(e=0;e<lowprimes.length;++e){if(c[0]==lowprimes[e]){return true}}return false}if(c.isEven()){return false}e=1;while(e<lowprimes.length){var b=lowprimes[e],d=e+1;while(d<lowprimes.length&&b<lplim){b*=lowprimes[d++]}b=c.modInt(b);while(e<d){if(b%lowprimes[e++]==0){return false}}}return c.millerRabin(f)}function bnpMillerRabin(f){var g=this.subtract(BigInteger.ONE);var c=g.getLowestSetBit();if(c<=0){return false}var h=g.shiftRight(c);f=(f+1)>>1;if(f>lowprimes.length){f=lowprimes.length}var b=nbi();for(var e=0;e<f;++e){b.fromInt(lowprimes[e]);var l=b.modPow(h,this);if(l.compareTo(BigInteger.ONE)!=0&&l.compareTo(g)!=0){var d=1;while(d++<c&&l.compareTo(g)!=0){l=l.modPowInt(2,this);if(l.compareTo(BigInteger.ONE)==0){return false}}if(l.compareTo(g)!=0){return false}}}return true}BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;function Arcfour(){this.i=0;this.j=0;this.S=new Array()}function ARC4init(e){var d,b,c;for(d=0;d<256;++d){this.S[d]=d}b=0;for(d=0;d<256;++d){b=(b+this.S[d]+e[d%e.length])&255;c=this.S[d];this.S[d]=this.S[b];this.S[b]=c}this.i=0;this.j=0}function ARC4next(){var b;this.i=(this.i+1)&255;this.j=(this.j+this.S[this.i])&255;b=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=b;return this.S[(b+this.S[this.i])&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour()}var rng_psize=256;var rng_state;var rng_pool;var rng_pptr;function rng_seed_int(b){rng_pool[rng_pptr++]^=b&255;rng_pool[rng_pptr++]^=(b>>8)&255;rng_pool[rng_pptr++]^=(b>>16)&255;rng_pool[rng_pptr++]^=(b>>24)&255;if(rng_pptr>=rng_psize){rng_pptr-=rng_psize}}function rng_seed_time(){rng_seed_int(new Date().getTime())}if(rng_pool==null){rng_pool=new Array();rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t){rng_pool[rng_pptr++]=z.charCodeAt(t)&255}}while(rng_pptr<rng_psize){t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=t>>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr){rng_pool[rng_pptr]=0}rng_pptr=0}return rng_state.next()}function rng_get_bytes(c){var b;for(b=0;b<c.length;++b){c[b]=rng_get_byte()}}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;function parseBigInt(c,b){return new BigInteger(c,b)}function linebrk(d,e){var b="";var c=0;while(c+e<d.length){b+=d.substring(c,c+e)+"\n";c+=e}return b+d.substring(c,d.length)}function byte2Hex(c){if(c<16){return"0"+c.toString(16)}else{return c.toString(16)}}function pkcs1pad2(e,g){if(g<e.length+11){alert("Message too long for RSA");return null}var f=new Array();var d=e.length-1;while(d>=0&&g>0){f[--g]=e.charCodeAt(d--)}f[--g]=0;var c=new SecureRandom();var b=new Array();while(g>2){b[0]=0;while(b[0]==0){c.nextBytes(b)}f[--g]=b[0]}f[--g]=2;f[--g]=0;return new BigInteger(f)}function RSAKey(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null}function RSASetPublic(c,b){if(c!=null&&b!=null&&c.length>0&&b.length>0){this.n=parseBigInt(c,16);this.e=parseBigInt(b,16)}else{alert("Invalid RSA public key")}}function RSADoPublic(b){return b.modPow(this.e,this.n)}function RSAEncrypt(e){var b=pkcs1pad2(e,(this.n.bitLength()+7)>>3);if(b==null){return null}var f=this.doPublic(b);if(f==null){return null}var d=f.toString(16);if((d.length&1)==0){return d}else{return"0"+d}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;Ext.menu.RangeMenu=function(e){Ext.menu.RangeMenu.superclass.constructor.call(this,e);this.updateTask=new Ext.util.DelayedTask(this.fireUpdate,this);var d=this.fieldCfg;var c=this.fieldCls;var b=this.fields=Ext.applyIf(this.fields||{},{gt:new Ext.menu.EditableItem({icon:this.icons.gt,editor:new c(typeof d=="object"?d.gt||"":d)}),lt:new Ext.menu.EditableItem({icon:this.icons.lt,editor:new c(typeof d=="object"?d.lt||"":d)}),eq:new Ext.menu.EditableItem({icon:this.icons.eq,editor:new c(typeof d=="object"?d.gt||"":d)})});this.add(b.gt,b.lt,"-",b.eq);for(var f in b){b[f].on("keyup",this.onKeyUp.createDelegate(this,[b[f]],true),this)}this.addEvents("update")};Ext.extend(Ext.menu.RangeMenu,Ext.menu.Menu,{fieldCls:Ext.form.NumberField,fieldCfg:"",updateBuffer:500,icons:{gt:"/img/small_icons/greater_then.png",lt:"/img/small_icons/less_then.png",eq:"/img/small_icons/equals.png"},fireUpdate:function(){this.fireEvent("update",this)},setValue:function(c){for(var b in this.fields){this.fields[b].setValue(c[b]!==undefined?c[b]:"")}this.fireEvent("update",this)},getValue:function(){var b={};for(var c in this.fields){var d=this.fields[c];if(d.isValid()&&String(d.getValue()).length>0){b[c]=d.getValue()}}return b},onKeyUp:function(c,b,e,d){if(c.getKey()==c.ENTER&&d.isValid()){this.hide(true);return}if(d==this.fields.eq){this.fields.gt.setValue(null);this.fields.lt.setValue(null)}else{this.fields.eq.setValue(null)}this.updateTask.delay(this.updateBuffer)}});Ext.grid.GridFilters=function(c){this.filters=new Ext.util.MixedCollection();this.filters.getKey=function(e){return e?e.dataIndex:null};for(var d=0,b=c.filters.length;d<b;d++){this.addFilter(c.filters[d])}this.deferredUpdate=new Ext.util.DelayedTask(this.reload,this);delete c.filters;Ext.apply(this,c)};Ext.extend(Ext.grid.GridFilters,Ext.util.Observable,{updateBuffer:500,paramPrefix:"filter",filterCls:"ux-filtered-column",local:false,autoReload:true,stateId:undefined,showMenu:true,init:function(b){if(b instanceof Ext.grid.GridPanel){this.grid=b;this.store=this.grid.getStore();if(this.local){this.store.on("load",function(c){c.filterBy(this.getRecordFilter())},this)}else{this.store.on("beforeload",this.onBeforeLoad,this)}this.grid.filters=this;this.grid.addEvents("filterupdate");b.on("render",this.onRender,this);b.on("beforestaterestore",this.applyState,this);b.on("beforestatesave",this.saveState,this)}else{if(b instanceof Ext.PagingToolbar){this.toolbar=b}}},applyState:function(c,e){this.suspendStateStore=true;this.clearFilters();if(e.filters){for(var b in e.filters){var d=this.filters.get(b);if(d){d.setValue(e.filters[b]);d.setActive(true)}}}this.deferredUpdate.cancel();if(this.local){this.reload()}this.suspendStateStore=false},saveState:function(b,d){var c={};this.filters.each(function(e){if(e.active){c[e.dataIndex]=e.getValue()}});return d.filters=c},onRender:function(){var b;if(this.showMenu){b=this.grid.getView().hmenu;this.sep=b.addSeparator();this.menu=b.add(new Ext.menu.CheckItem({text:"Filters",menu:new Ext.menu.Menu()}));this.menu.on("checkchange",this.onCheckChange,this);this.menu.on("beforecheckchange",this.onBeforeCheck,this);b.on("beforeshow",this.onMenu,this)}this.grid.getView().on("refresh",this.onRefresh,this);this.updateColumnHeadings(this.grid.getView())},onMenu:function(c){var b=this.getMenuFilter();if(b){this.menu.menu=b.menu;this.menu.setChecked(b.active,false)}this.menu.setVisible(b!==undefined);this.sep.setVisible(b!==undefined)},onCheckChange:function(b,c){this.getMenuFilter().setActive(c)},onBeforeCheck:function(b,c){return !c||this.getMenuFilter().isActivatable()},onStateChange:function(d,c){if(d=="serialize"){return}if(c==this.getMenuFilter()){this.menu.setChecked(c.active,false)}if(this.autoReload||this.local){this.deferredUpdate.delay(this.updateBuffer)}var b=this.grid.getView();this.updateColumnHeadings(b);this.grid.saveState();this.grid.fireEvent("filterupdate",this,c)},onBeforeLoad:function(b,c){c.params=c.params||{};this.cleanParams(c.params);var d=this.buildQuery(this.getFilterData());Ext.apply(c.params,d)},onRefresh:function(b){this.updateColumnHeadings(b)},getMenuFilter:function(){var b=this.grid.getView();if(!b||b.hdCtxIndex===undefined){return null}return this.filters.get(b.cm.config[b.hdCtxIndex].dataIndex)},updateColumnHeadings:function(c){if(!c||!c.mainHd){return}var f=c.mainHd.select("td").removeClass(this.filterCls);for(var d=0,b=c.cm.config.length;d<b;d++){var e=this.getFilter(c.cm.config[d].dataIndex);if(e&&e.active){f.item(d).addClass(this.filterCls)}}},reload:function(){if(this.local){this.grid.store.clearFilter(true);this.grid.store.filterBy(this.getRecordFilter())}else{this.deferredUpdate.cancel();var b=this.grid.store;if(this.toolbar){var c=this.toolbar.paramNames.start;if(b.lastOptions&&b.lastOptions.params&&b.lastOptions.params[c]){b.lastOptions.params[c]=0}}b.reload()}},getRecordFilter:function(){var c=[];this.filters.each(function(d){if(d.active){c.push(d)}});var b=c.length;return function(d){for(var e=0;e<b;e++){if(!c[e].validateRecord(d)){return false}}return true}},addFilter:function(b){var c=b.menu?b:new (this.getFilterClass(b.type))(b);this.filters.add(c);Ext.util.Observable.capture(c,this.onStateChange,this);return c},getFilter:function(b){return this.filters.get(b)},clearFilters:function(){this.filters.each(function(b){b.setActive(false)})},getFilterData:function(){var b=[];this.filters.each(function(g){if(g.active){var h=[].concat(g.serialize());for(var e=0,c=h.length;e<c;e++){b.push({field:g.dataIndex,data:h[e]})}}});return b},buildQuery:function(g){var j={};for(var e=0,b=g.length;e<b;e++){var h=g[e];var c=[this.paramPrefix,"[",e,"]"].join("");j[c+"[field]"]=h.field;var k=c+"[data]";for(var d in h.data){j[[k,"[",d,"]"].join("")]=h.data[d]}}return j},cleanParams:function(d){var c=new RegExp("^"+this.paramPrefix+"[[0-9]+]");for(var b in d){if(c.test(b)){delete d[b]}}},getFilterClass:function(b){return Ext.grid.filter[b.substr(0,1).toUpperCase()+b.substr(1)+"Filter"]}});Ext.ns("Ext.grid.filter");Ext.grid.filter.Filter=function(b){Ext.apply(this,b);this.events={activate:true,deactivate:true,update:true,serialize:true};Ext.grid.filter.Filter.superclass.constructor.call(this);this.menu=new Ext.menu.Menu();this.init();if(b&&b.value){this.setValue(b.value);this.setActive(b.active!==false,true);delete b.value}};Ext.extend(Ext.grid.filter.Filter,Ext.util.Observable,{active:false,dataIndex:null,menu:null,init:Ext.emptyFn,fireUpdate:function(){this.value=this.item.getValue();if(this.active){this.fireEvent("update",this)}this.setActive(this.value.length>0)},isActivatable:function(){return true},setActive:function(c,b){if(this.active!=c){this.active=c;if(b!==true){this.fireEvent(c?"activate":"deactivate",this)}}},getValue:Ext.emptyFn,setValue:Ext.emptyFn,serialize:Ext.emptyFn,validateRecord:function(){return true}});Ext.grid.filter.StringFilter=Ext.extend(Ext.grid.filter.Filter,{updateBuffer:500,icon:"/img/small_icons/famfamfam/find.png",init:function(){var b=this.value=new Ext.menu.EditableItem({icon:this.icon});b.on("keyup",this.onKeyUp,this);this.menu.add(b);this.updateTask=new Ext.util.DelayedTask(this.fireUpdate,this)},onKeyUp:function(b){if(b.getKey()==b.ENTER){this.menu.hide(true);return}this.updateTask.delay(this.updateBuffer)},isActivatable:function(){return this.value.getValue().length>0},fireUpdate:function(){if(this.active){this.fireEvent("update",this)}this.setActive(this.isActivatable())},setValue:function(b){this.value.setValue(b);this.fireEvent("update",this)},getValue:function(){return this.value.getValue()},serialize:function(){var b={type:"string",value:this.getValue()};this.fireEvent("serialize",b,this);return b},validateRecord:function(b){var c=b.get(this.dataIndex);if(typeof c!="string"){return this.getValue().length==0}return c.toLowerCase().indexOf(this.getValue().toLowerCase())>-1}});Ext.grid.filter.DateFilter=Ext.extend(Ext.grid.filter.Filter,{dateFormat:"m/d/Y",pickerOpts:{},init:function(){var d=Ext.apply(this.pickerOpts,{minDate:this.minDate,maxDate:this.maxDate,format:this.dateFormat});var e=this.dates={before:new Ext.menu.CheckItem({text:"Before",menu:new Ext.menu.DateMenu(d)}),after:new Ext.menu.CheckItem({text:"After",menu:new Ext.menu.DateMenu(d)}),on:new Ext.menu.CheckItem({text:"On",menu:new Ext.menu.DateMenu(d)})};this.menu.add(e.before,e.after,"-",e.on);for(var c in e){var b=e[c];b.menu.on("select",this.onSelect.createDelegate(this,[b]),this);b.on("checkchange",function(){this.setActive(this.isActivatable())},this)}},onSelect:function(c,d,e,b){c.setChecked(true);var f=this.dates;if(c==f.on){f.before.setChecked(false,true);f.after.setChecked(false,true)}else{f.on.setChecked(false,true);if(c==f.after&&f.before.menu.picker.value<e){f.before.setChecked(false,true)}else{if(c==f.before&&f.after.menu.picker.value>e){f.after.setChecked(false,true)}}}this.fireEvent("update",this)},getFieldValue:function(b){return this.dates[b].menu.picker.getValue()},getPicker:function(b){return this.dates[b].menu.picker},isActivatable:function(){return this.dates.on.checked||this.dates.after.checked||this.dates.before.checked},setValue:function(c){for(var b in this.dates){if(c[b]){this.dates[b].menu.picker.setValue(c[b]);this.dates[b].setChecked(true)}else{this.dates[b].setChecked(false)}}},getValue:function(){var b={};for(var c in this.dates){if(this.dates[c].checked){b[c]=this.dates[c].menu.picker.getValue()}}return b},serialize:function(){var b=[];if(this.dates.before.checked){b=[{type:"date",comparison:"lt",value:this.getFieldValue("before").format(this.dateFormat)}]}if(this.dates.after.checked){b.push({type:"date",comparison:"gt",value:this.getFieldValue("after").format(this.dateFormat)})}if(this.dates.on.checked){b={type:"date",comparison:"eq",value:this.getFieldValue("on").format(this.dateFormat)}}this.fireEvent("serialize",b,this);return b},validateRecord:function(b){var c=b.get(this.dataIndex).clearTime(true).getTime();if(this.dates.on.checked&&c!=this.getFieldValue("on").clearTime(true).getTime()){return false}if(this.dates.before.checked&&c>=this.getFieldValue("before").clearTime(true).getTime()){return false}if(this.dates.after.checked&&c<=this.getFieldValue("after").clearTime(true).getTime()){return false}return true}});Ext.grid.filter.ListFilter=Ext.extend(Ext.grid.filter.Filter,{labelField:"text",loadingText:"Loading...",loadOnShow:true,value:[],loaded:false,phpMode:false,init:function(){this.menu.add('<span class="loading-indicator">'+this.loadingText+"</span>");if(this.store&&this.loadOnShow){this.menu.on("show",this.onMenuLoad,this)}else{if(this.options){var c=[];for(var d=0,b=this.options.length;d<b;d++){var e=this.options[d];switch(Ext.type(e)){case"array":c.push(e);break;case"object":c.push([e.id,e[this.labelField]]);break;case"string":c.push([e,e]);break}}this.store=new Ext.data.Store({reader:new Ext.data.ArrayReader({id:0},["id",this.labelField])});this.options=c;this.menu.on("show",this.onMenuLoad,this)}}this.store.on("load",this.onLoad,this);this.bindShowAdapter()},bindShowAdapter:function(){var c=this.menu.show;var b=null;this.menu.show=function(){if(arguments.length==0){c.apply(this,b)}else{b=arguments;c.apply(this,arguments)}}},onMenuLoad:function(){if(!this.loaded){if(this.options){this.store.loadData(this.options)}else{this.store.load()}}},onLoad:function(d,c){var h=this.menu.isVisible();this.menu.hide(false);this.menu.removeAll();var f=this.single?Ext.id():null;for(var e=0,b=c.length;e<b;e++){var g=new Ext.menu.CheckItem({text:c[e].get(this.labelField),group:f,checked:this.value.indexOf(c[e].id)>-1,hideOnClick:false});g.itemId=c[e].id;g.on("checkchange",this.checkChange,this);this.menu.add(g)}this.setActive(this.isActivatable());this.loaded=true;if(h){this.menu.show()}},checkChange:function(c,b){var d=[];this.menu.items.each(function(e){if(e.checked){d.push(e.itemId)}},this);this.value=d;this.setActive(this.isActivatable());this.fireEvent("update",this)},isActivatable:function(){return this.value.length>0},setValue:function(b){var b=this.value=[].concat(b);if(this.loaded){this.menu.items.each(function(e){e.setChecked(false,true);for(var d=0,c=b.length;d<c;d++){if(e.itemId==b[d]){e.setChecked(true,true)}}},this)}this.fireEvent("update",this)},getValue:function(){return this.value},serialize:function(){var b={type:"list",value:this.phpMode?this.value.join(","):this.value};this.fireEvent("serialize",b,this);return b},validateRecord:function(b){return this.getValue().indexOf(b.get(this.dataIndex))>-1}});Ext.grid.filter.NumericFilter=Ext.extend(Ext.grid.filter.Filter,{init:function(){this.menu=new Ext.menu.RangeMenu();this.menu.on("update",this.fireUpdate,this)},fireUpdate:function(){this.setActive(this.isActivatable());this.fireEvent("update",this)},isActivatable:function(){var b=this.menu.getValue();return b.eq!==undefined||b.gt!==undefined||b.lt!==undefined},setValue:function(b){this.menu.setValue(b)},getValue:function(){return this.menu.getValue()},serialize:function(){var c=[];var b=this.menu.getValue();for(var d in b){c.push({type:"numeric",comparison:d,value:b[d]})}this.fireEvent("serialize",c,this);return c},validateRecord:function(b){var d=b.get(this.dataIndex),c=this.menu.getValue();if(c.eq!=undefined&&d!=c.eq){return false}if(c.lt!=undefined&&d>=c.lt){return false}if(c.gt!=undefined&&d<=c.gt){return false}return true}});Ext.grid.filter.BooleanFilter=Ext.extend(Ext.grid.filter.Filter,{defaultValue:false,init:function(){var c=Ext.id();this.options=[new Ext.menu.CheckItem({text:"Yes",group:c,checked:this.defaultValue===true}),new Ext.menu.CheckItem({text:"No",group:c,checked:this.defaultValue===false})];this.menu.add(this.options[0],this.options[1]);for(var b=0;b<this.options.length;b++){this.options[b].on("click",this.fireUpdate,this);this.options[b].on("checkchange",this.fireUpdate,this)}},isActivatable:function(){return true},fireUpdate:function(){this.fireEvent("update",this);this.setActive(true)},setValue:function(b){this.options[b?0:1].setChecked(true)},getValue:function(){return this.options[0].checked},serialize:function(){var b={type:"boolean",value:this.getValue()};this.fireEvent("serialize",b,this);return b},validateRecord:function(b){return b.get(this.dataIndex)==this.getValue()}});Ext.grid.RowExpander=function(b){Ext.apply(this,b);this.addEvents({beforeexpand:true,expand:true,beforecollapse:true,collapse:true});Ext.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if(typeof this.tpl=="string"){this.tpl=new Ext.Template(this.tpl)}this.tpl.compile()}this.state={};this.bodyContent={}};Ext.extend(Ext.grid.RowExpander,Ext.util.Observable,{header:"",width:20,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"expander",lazyRender:true,enableCaching:true,getRowClass:function(b,f,e,d){e.cols=e.cols-1;var c=this.bodyContent[b.id];if(!c&&!this.lazyRender){c=this.getBodyContent(b,f)}if(c){e.body=c}return this.state[b.id]?"x-grid3-row-expanded":"x-grid3-row-collapsed"},init:function(c){this.grid=c;var b=c.getView();b.getRowClass=this.getRowClass.createDelegate(this);b.enableRowBody=true;c.on("render",function(){b.mainBody.on("mousedown",this.onMouseDown,this)},this)},getBodyContent:function(b,c){if(!this.enableCaching){return this.tpl.apply(b.data)}var d=this.bodyContent[b.id];if(!d){d=this.tpl.apply(b.data);this.bodyContent[b.id]=d}return d},onMouseDown:function(c,b){if(b.className=="x-grid3-row-expander"){c.stopEvent();var d=c.getTarget(".x-grid3-row");this.toggleRow(d)}},renderer:function(c,d,b){d.cellAttr='rowspan="2"';return'<div class="x-grid3-row-expander">&#160;</div>'},beforeExpand:function(c,b,d){if(this.fireEvent("beforeexpand",this,c,b,d)!==false){if(this.tpl&&this.lazyRender){b.innerHTML=this.getBodyContent(c,d)}return true}else{return false}},toggleRow:function(b){if(typeof b=="number"){b=this.grid.view.getRow(b)}this[Ext.fly(b).hasClass("x-grid3-row-collapsed")?"expandRow":"collapseRow"](b)},expandRow:function(d){if(typeof d=="number"){d=this.grid.view.getRow(d)}var c=this.grid.store.getAt(d.rowIndex);var b=Ext.DomQuery.selectNode("tr:nth(2) div.x-grid3-row-body",d);if(this.beforeExpand(c,b,d.rowIndex)){this.state[c.id]=true;Ext.fly(d).replaceClass("x-grid3-row-collapsed","x-grid3-row-expanded");this.fireEvent("expand",this,c,b,d.rowIndex)}},collapseRow:function(d){if(typeof d=="number"){d=this.grid.view.getRow(d)}var c=this.grid.store.getAt(d.rowIndex);var b=Ext.fly(d).child("tr:nth(1) div.x-grid3-row-body",true);if(this.fireEvent("beforecollapse",this,c,b,d.rowIndex)!==false){this.state[c.id]=false;Ext.fly(d).replaceClass("x-grid3-row-expanded","x-grid3-row-collapsed");this.fireEvent("collapse",this,c,b,d.rowIndex)}}});Ext.override(Ext.form.Field,{showContainer:function(){this.show();var b=this.getEl().up(".x-form-item");if(b){b.setDisplayed(true)}},hideContainer:function(){this.hide();var b=this.getEl().up(".x-form-item");if(b){b.setDisplayed(false)}},setContainerVisible:function(b){if(b){this.showContainer()}else{this.hideContainer()}return this},setLabel:function(b){var c=this.getEl().up("div.x-form-item");c.dom.firstChild.firstChild.nodeValue=b}});Ext.override(Ext.form.RadioGroup,{getValue:function(){return this.items.first().getGroupValue()},setValue:function(b){this.items.first().setValue(b)}});Ext.ns("ExtPortal");ExtPortal.JSON=new (function(){this.encode=function(o){if(Ext.isDate(o)){return this.encodeDate(o)}else{return Ext.util.JSON.encode(o)}};this.encodeDate=function(o){return'"\\/Date('+o.getTime()+')\\/"'};this.fixDate=function(obj){for(property in obj){var type=typeof obj[property];switch(type){case"string":if(obj[property].indexOf("/Date(")>-1){var ms=obj[property].substring(6);ms=ms.substring(0,ms.indexOf(")/"));obj[property]=new Date(parseInt(ms))}break;case"object":this.fixDate(obj[property]);break}}};this.decode=function(json){var obj=json;var type=typeof json;if(type=="string"){if(json.indexOf("{")==0){return eval("("+json+")")}else{return eval("('"+json+"')")}}this.fixDate(obj);return obj};this.convertDateToString=function(obj){return encodeDate(obj)}})();Ext.apply(Ext.form.VTypes,{password:function(d,c){if(c.initialPassField){var b=Ext.getCmp(c.initialPassField);return(d==b.getValue())}return true},passwordText:"Passwords do not match"});Ext.grid.CheckColumn=function(b){Ext.apply(this,b);if(!this.id){this.id=Ext.id()}this.renderer=this.renderer.createDelegate(this)};Ext.grid.CheckColumn.prototype={init:function(b){this.grid=b;this.grid.on("render",function(){var c=this.grid.getView();c.mainBody.on("mousedown",this.onMouseDown,this)},this)},onMouseDown:function(f,d){if(d.className&&d.className.indexOf("x-grid3-cc-"+this.id)!=-1){f.stopEvent();var c=this.grid.getView().findRowIndex(d);var b=this.grid.store.getAt(c);b.set(this.dataIndex,!b.data[this.dataIndex])}},renderer:function(c,d,b){d.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(c?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'}};Ext.override(Ext.Element,{findParentBy:function(g,d){var e=this.dom,c=document.body,f=Ext.DomQuery;while(e&&e.nodeType==1&&e!=c){if(g(e,this)){return d?Ext.get(e):e}e=e.parentNode}return null},mask:function(f,c){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);var d=Ext.fly(this.dom.parentNode,"_internal");var b=d.findParentBy(function(g){var h=Ext.fly(g).getStyle("z-index");return h!="auto"&&h!=null},true);if(b){this._mask.setStyle("z-index",b.getStyle("z-index")+1)}else{this._mask.setStyle("z-index",100)}this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof f=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var e=this._maskMsg;e.dom.className=c?"ext-el-mask-msg "+c:"ext-el-mask-msg";e.dom.firstChild.innerHTML=f;e.setDisplayed(true);e.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask}});Ext.override(Ext.Button,{setTooltip:function(b){this.el.child(this.buttonSelector).dom[this.tooltipType]=b}});Ext.override(Ext.Window,{scale:function(b,c){a=Ext.lib.Anim.motion(this.el,{height:{to:c},width:{to:b}});a.onTween.addListener(function(){if(this.fixedCenter){this.center()}this.syncSize();this.syncShadow()},this);a.animate()}});Ext.override(Ext.ToolTip,{onTargetOver:function(c){if(this.disabled||c.within(this.target.dom,true)){return}var b=c.getTarget(this.delegate);if(b){this.triggerElement=b;this.clearTimer("hide");this.targetXY=c.getXY();this.delayShow()}},onMouseMove:function(c){var b=c.getTarget(this.delegate);if(b){this.targetXY=c.getXY();if(b===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(c)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},hide:function(){this.clearTimer("dismiss");this.lastActive=new Date();delete this.triggerElement;Ext.ToolTip.superclass.hide.call(this)}});Ext.ns("ExtPortal");ExtPortal.WCFFormPanel=Ext.extend(Ext.form.FormPanel,{url:"Test.svc",svcSubmitMethodName:"formtest",svcLoadMethodName:"loadtest",method:"POST",standardSubmit:false,dataUpdateMode:false,referenceDataItem:null,parentWin:null,loadResult:null,dataItemLoadMask:null,isShown:false,setIsShown:function(){this.isShown=true},masterValueData:null,masterValues:null,loadedStoreItemArray:[],storeItems:[],isLayoutComplete:false,listeners:{afterlayout:{single:true,fn:function(){this.isLayoutComplete=true;if(this.masterValues){for(var b in this.masterValues){this.setMasterValue(b,this.masterValues[b])}}}}},initComponent:function(){var b=this.getTranslations();this.insertTitle=b.InsertTitle;this.updateTitle=b.UpdateTitle;ExtPortal.WCFFormPanel.superclass.initComponent.call(this);this.addEvents("beforeDataItemLoad");this.addEvents("afterSetValues");this.addEvents("afterError");this.addEvents("resetToNewItem","info","error")},setParentWindow:function(b){this.parentWin=b},submit:function(){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.getForm().isValid()){this.showLoadMask(b.sendingMask);Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcSubmitMethodName,method:"POST",params:Ext.util.JSON.encode({updateMode:this.dataUpdateMode,data:this.getForm().getValues()}),success:function(d,e){var c=Ext.decode(d.responseText);var f;if(c.success){this.doSetValues(c.dataItem);this.onSuccess()}else{if(c.dbOperationError!=null&&c.dbOperationError!=""){f='<p style="font-weight:700">'+b.formMightNotSubmit+"</p><p>"+b.followingErrorOccurred+"</p><br>"+c.dbOperationError;this.showError(f)}else{f=b.formNotSubmitted;this.fireEvent("error",{title:b.error,msg:f});this.getForm().markInvalid(c.errors);this.fireEvent("afterError",c.errors)}}this.hideLoadMask()},failure:function(c,d){var e='<p style="font-weight:700">'+b.formCouldNotBeSent+"</p><p>"+b.pleaseTryAgain+"</p>";this.showError(e);this.hideLoadMask()}})}},load:function(){if(this.referenceDataItem!=null){Ext.lib.Ajax.defaultPostHeader="application/json";this.showLoadMask();Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcLoadMethodName,method:"POST",params:Ext.util.JSON.encode({dataItem:this.referenceDataItem}),success:function(c,d){var b=(c.responseText!=""?Ext.decode(c.responseText):null);if(b){if(this.parentWin){this.parentWin.setTitle(this.updateTitle)}this.doSetValues(b)}else{this.onLoadFailure(c,d)}},failure:this.onLoadFailure})}else{this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}}return true},doSetValues:function(b){var c=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.fireEvent("beforeDataItemLoad",b)!==false){this.loadResult=b;this.actualSetValues()}else{if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}var d="<p>"+c.unableToLoadItem+"</p>"+c.willWorkInInsertMode;this.showError(d);this.hideLoadMask()}},actualSetValues:function(){if(this.isLayoutComplete&&this.dataItemLoadReady()){this.getForm().setValues(this.loadResult);this.dataUpdateMode=true;this.fireEvent("afterSetValues",this.loadResult);this.hideLoadMask()}else{var b=this;setTimeout(function(){b.actualSetValues()},100)}},dataItemLoadReady:function(){return true},showLoadMask:function(c){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.dataItemLoadMask){this.dataItemLoadMask.hide()}this.dataItemLoadMask=new Ext.LoadMask(this.parentWin.body,{msg:(c?c:b.loadingMask)});this.dataItemLoadMask.show()},hideLoadMask:function(){if(this.dataItemLoadMask){this.dataItemLoadMask.hide()}},onSuccess:function(c,d){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);var e=b.formSubmittedSuccessfully;this.fireEvent("info",{title:b.success,msg:e});this.dataUpdateMode=true;if(this.parentWin){this.parentWin.setTitle(this.updateTitle)}},onLoadFailure:function(c,f){var e=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);var h=false;var d;if(c){if(c.responseText){var b=Ext.util.JSON.decode(c.responseText);var g=b.ErrorCode;if(g){if(g>1){d=String.format("<b>{0}</b></p><p><b><i>{1}</i></b> {2}</p><p><b><i>{3}</i></b> {4}</p><p><b><i>{5}</i></b> {6}</p>",e.couldNotLoadData,e.errorCode,b.ErrorCode,e.exceptionMessage,b.FaultMessage,e.exceptionLocation,b.Location)}else{d=String.format("<b>{0}</b>",e.accessDenied);h=true}}else{d=String.format("<b>{0}</b></p><p>{1}</p>",e.couldNotLoadData,c.responseText)}}else{if(c.status==200){d=String.format("<b>{0}</b></p>",e.doesNotExist)}else{d=String.format("<b>{0}</b></p>",e.noTimelyServerResponse)}}d=String.format("<p><b>{0}</b> {1}",e.details,d)}else{d=""}if(!h){this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}this.showError(String.format("<p><b>{0}</b></p><p>{1}</p>{2}",e.unableToLoadItem,e.willWorkInInsertMode,d));this.hideLoadMask()}else{this.showError(e.accessDenied+" "+e.unableToLoadItem,e.accessDenied);this.close()}},showError:function(e,d){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.isShown){d=d||b.error;Ext.Msg.show({title:d,msg:e,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});this.fireEvent("error",{title:d,msg:e})}else{var c=this;setTimeout(function(){c.showError(e,d)},100)}},onRender:function(){ExtPortal.WCFFormPanel.superclass.onRender.apply(this,arguments);this.getForm().waitMsgTarget=this.getEl()},setMasterValue:function(c,d){if(this.masterValueData&&this.masterValueData[c]!==undefined){this.masterValueData[c]=d;var b=this.getForm().findField(c);if(b){b.setValue(d);b.hideContainer()}}},clearMasterValue:function(c){if(this.masterValueData&&this.masterValueData[c]!==undefined){this.masterValueData[c]=null;if(this.masterValueData[c]!==undefined){this.masterValueData[c].value=val;var b=this.getForm().findField(c);if(b){b.setValue(null);b.showContainer()}}}},close:function(){if(this.parentWin){if(this.isShown){this.parentWin.close();this.parentWin.destroy()}else{var b=this;setTimeout(function(){b.close()},100)}}else{this.destroy()}},resetToNewItem:function(){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);this.getForm().reset();if(this.masterValueData){for(var c in this.masterValueData){if(this.masterValueData[c]&&typeof this.masterValueData[c]!="function"){this.setMasterValue(c,this.masterValueData[c],true)}}}this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(b.InsertTitle)}if(this.buttons[0]!=null){this.buttons[0].setText(b.Submit_buttonText)}this.fireEvent("resetToNewItem")},getTranslations:function(){var b=ExtPortal.WCFFormPanel.translations;if(!b){b=ExtPortal.WCFFormPanel.referenceTranslations}return b},langChange:function(){var b=this.getTranslations();this.updateTitle.setTitle(b.UpdateTitle);this.insertTitle.setTitle(b.UpdateTitle)}});Ext.apply(ExtPortal.WCFFormPanel,new Ext.util.Observable());ExtPortal.WCFFormPanel.addEvents("langChange");ExtPortal.WCFFormPanel.referenceTranslations={InsertTitle:"Insert new item",UpdateTitle:"Update item",Submit_buttonText:"Submit",Update_buttonText:"Update",Close_buttonText:"Close",sendingMask:"Sending...",loadingMask:"Loading...",formMightNotSubmit:"Este posibil ca formularul sa nu fi ajuns la server.",followingErrorOccurred:"A aparut urmatoarea eroare:",formNotSubmitted:"Formularul nu a putut fi salvat datorita unor date incorecte.",formCouldNotBeSent:"Formularul nu a ajuns la server.",formSubmittedSuccessfully:"Datele au fost trimise cu succes",pleaseTryAgain:"Please try again",unableToLoadItem:"Unable to load the update item.",willWorkInInsertMode:"The form will work in insert mode.",couldNotLoadData:"Could not load data.",errorCode:"Error code:",exceptionMessage:"Message:",exceptionLocation:"Location:",doesNotExist:"Requested item doesn't exist.",noTimelyServerResponse:"The server did not respond in time.",details:"Details:",accessDenied:"Access Denied.",error:"Error",success:"Success"};ExtPortal.WCFFormPanel.getTranslation=function(c){var b=ExtPortal.WCFFormPanel.translations;if(!b){b=ExtPortal.WCFFormPanel.referenceTranslations}return b[c]};Ext.data.WCFProxy=function(b){Ext.data.WCFProxy.superclass.constructor.call(this,b)};Ext.extend(Ext.data.WCFProxy,Ext.data.HttpProxy,{load:function(f,c,g,d,b){if(this.fireEvent("beforeload",this,f)!==false){var e={params:Ext.util.JSON.encode(f||{}),request:{callback:g,scope:d,arg:b},reader:c,callback:this.loadResponse,scope:this};if(this.useAjax){Ext.applyIf(e,this.conn);if(this.activeRequest){Ext.Ajax.abort(this.activeRequest)}this.activeRequest=Ext.Ajax.request(e)}else{this.conn.request(e)}}else{g.call(d||this,null,b,false)}}});Ext.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:"Browse...",buttonOnly:false,buttonOffset:3,readOnly:true,autoSize:Ext.emptyFn,initComponent:function(){Ext.form.FileUploadField.superclass.initComponent.call(this);this.addEvents("fileselected")},onRender:function(d,b){Ext.form.FileUploadField.superclass.onRender.call(this,d,b);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-file-wrap"});this.el.addClass("x-form-file-text");this.el.dom.removeAttribute("name");this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:"x-form-file",tag:"input",type:"file",size:1});var c=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText});this.button=new Ext.Button(Ext.apply(c,{renderTo:this.wrap,cls:"x-form-file-btn"+(c.iconCls?" x-btn-icon":"")}));if(this.buttonOnly){this.el.hide();this.wrap.setWidth(this.button.getEl().getWidth())}this.fileInput.on("change",function(){var e=this.fileInput.dom.value;this.setValue(e);this.fireEvent("fileselected",this,e)},this)},getFileInputId:function(){return this.id+"-file"},onResize:function(b,c){Ext.form.FileUploadField.superclass.onResize.call(this,b,c);this.wrap.setWidth(b);if(!this.buttonOnly){var b=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset;this.el.setWidth(b)}},preFocus:Ext.emptyFn,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}});Ext.reg("fileuploadfield",Ext.form.FileUploadField);Ext.ns("ExtPortal");ExtPortal.ButtonField=Ext.extend(Ext.form.Field,{defaultAutoCreate:{tag:"div"},onRender:function(d,b){if(!this.el){var c=this.getAutoCreate();if(!c.name){c.name=this.name||this.id}if(this.inputType){c.type=this.inputType}this.el=d.createChild(c,b)}this.button=new Ext.Button({renderTo:this.el,text:this.text,iconCls:this.iconCls||null,handler:this.handler||Ext.emptyFn,scope:this.scope||this})},getValue:Ext.emptyFn,setValue:Ext.emptyFn,initValue:Ext.emptyFn});Ext.reg("buttonfield",ExtPortal.ButtonField);ExtPortal.TextHiddenButtonField=Ext.extend(Ext.form.Field,{buttonText:null,text:null,allowBlank:true,isMarkedInvalid:false,defaultAutoCreate:{tag:"input",type:"hidden"},onRender:function(c,b){ExtPortal.TextHiddenButtonField.superclass.onRender.call(this,c,b);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.labelDiv=this.wrap.createChild({tag:"div",style:"float:left; padding-right:10px;"});var d=this.wrap.createChild({tag:"div"});this.textLabel=new Ext.form.Label({cls:"x-form-item x-form-item-label",autoWidth:true,text:this.text,renderTo:this.labelDiv});this.button=new Ext.Button({renderTo:d,text:this.buttonText,iconCls:this.iconCls||null,handler:this.handler||Ext.emptyFn,scope:this.scope||this})},setText:function(b){this.text=b;this.textLabel.setText(this.text)},getButtonEl:function(){return this.button.getEl()},validateValue:function(b){if(!this.allowBlank&&(!b||b=="")){if(!this.isMarkedInvalid){this.isMarkedInvalid=true;this.markInvalid()}return false}if(this.isMarkedInvalid){this.clearInvalid();this.isMarkedInvalid=false}return true},markInvalid:function(){ExtPortal.TextHiddenButtonField.superclass.markInvalid.call(this);this.labelDiv.addClass(this.invalidClass)},clearInvalid:function(){ExtPortal.TextHiddenButtonField.superclass.clearInvalid.call(this);this.labelDiv.removeClass(this.invalidClass)}});Ext.reg("texthiddenbutton",ExtPortal.TextHiddenButtonField);ExtPortal.TextHiddenField=Ext.extend(Ext.form.Field,{text:null,defaultAutoCreate:{tag:"input",type:"hidden"},onRender:function(c,b){ExtPortal.TextHiddenField.superclass.onRender.call(this,c,b);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});var d=this.wrap.createChild({tag:"div",style:"float:left"});this.textLabel=new Ext.form.Label({cls:"x-form-item x-form-item-label",text:this.text,autoWidth:true,renderTo:d})},setText:function(b){this.text=b;this.textLabel.setText(this.text)},setValue:function(b){ExtPortal.TextHiddenField.superclass.setValue.call(this,b);this.setText(b)}});Ext.reg("texthidden",ExtPortal.TextHiddenField);ExtPortal.AutoUploadButton=Ext.extend(Ext.form.TextField,{savePath:null,saveName:null,FullFilePath:null,FileID:null,FileName:null,uploadingState:"none",buttonTextUpload:"...",text:null,renderTo:"",cls:"x-form-field-wrap",labelStyle:" visibility :hidden",uploadingMessage:"<b>Please wait .... </b><img src='/img/loader.gif' alt='Loading...'/>",emptyTextUpload:"Select a file",allowBlank:true,urlUpload:"",urlDelete:null,waitMsg:"Uploading file...",isMarkedInvalid:false,defaultAutoCreate:{tag:"input",type:"hidden"},uploadingState:null,onRender:function(c,b){ExtPortal.AutoUploadButton.superclass.onRender.call(this,c,b);if(this.ownerCt&&this.ownerCt.parentWin){this.ownerCt.parentWin.on("move",function(g,f,h){this.formUpload.setPosition(this.container.getX(),this.container.getY());this.formUpload.show()},this)}this.on("resize",function(g,f,h){this.formUpload.setWidth(this.container.getSize().width)},this);this.on("hide",function(g,f,h){this.formUpload.hide()},this);this.on("destroy",function(g,f,h){this.formUpload.destroy()},this);this.on("close",function(g,f,h){this.formUpload.destroy()},this);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});var e=this.wrap.createChild({tag:"div",style:"float:left"});var d=this.wrap.createChild({tag:"div"});this.cancelButton=new Ext.Button({text:"Cancel",scope:this,style:"position:absolute;float:right;top:0px;right:8%",hidden:true,handler:function(){this.showUpload();this.iframe=Ext.get(document.body).select("iframe.x-hidden").item(0);if(this.iframe){try{this.iframe.dom.contentWindow.stop()}catch(f){}}this.uploadingState="none"}});this.deleteButton=new Ext.Button({text:"Delete",scope:this,hidden:true,style:"position:absolute;float:right;top:0px;right:8%",scope:this,handler:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.urlDelete,method:"POST",params:Ext.util.JSON.encode({deleteItems:[{IDUploadFisiere:this.FileID,FullFilePath:this.FullFilePath}]}),success:function(g,h){var f=Ext.util.JSON.decode(g.responseText);if(f.totalDeleted==1){this.showUpload();this.setValue("")}else{this.showDelete();this.showErrorMessage('<p style="font-weight:700">The form might not have been submitted.</p><p>Please try again.</p><br>')}},failure:function(f,g){this.showErrorMessage('<p style="font-weight:700">The form could not be submitted.</p><p>Please try again.</p>');this.showDelete()}})}});this.uploadButton=new Ext.form.FileUploadField({emptyText:this.emptyTextUpload,fieldLabel:this.fieldLabel,buttonText:this.buttonTextUpload,allowBlank:this.allowBlank,anchor:"95%",uploadingState:"none",setUploadVisible:function(f){this.setVisible(f);this.button.setVisible(f);return this},listeners:{fileselected:{fn:function(g,f){this.showCancel();if(this.formUpload.getForm().isValid()){var h=this.urlUpload+((this.savePath)?("?savePath="+this.savePath):"");this.formUpload.getForm().submit({scope:this,method:"POST",url:h,success:function(k,j){SessionData.useEncode=true;var i=Ext.decode(j.response.responseText);if(i.success){if(i.id){this.FileID=i.id}else{this.FullFilePath=i.FullFilePath}this.FileName=i.FileName;this.stateLabel.setText("Uploaded: "+i.FileName);this.setValue(i.id);this.showDelete();if(this.saveName){Ext.getCmp(this.saveName).setValue(i.FileName)}}else{this.showUpload();this.showErrorMessage('<p style="font-weight:700">The form might not have been submitted.</p><p>Please try again.</p><br>')}},failure:function(){this.showUpload();this.showErrorMessage("The file could not be uploaded! Please try again.")}})}},scope:this}}});this.stateLabel=new Ext.form.Label({cls:"x-form-item x-form-item-label",hidden:true,autoWidth:true,html:this.uploadingMessage});this.formUpload=new Ext.form.FormPanel({renderTo:Ext.getBody(),fileUpload:true,url:this.urlUpload||this.url,border:false,baseCls:"x-form",width:this.width,shadow:false,shim:true,labelWidth:this.labelWidth||null,floating:true,items:[this.uploadButton,this.cancelButton,this.deleteButton,this.stateLabel],listeners:{render:{fn:function(g){var f=this;setTimeout(function(){g.setPosition(f.container.getX(),f.container.getY());g.setWidth(f.container.getSize().width);g.getEl().setStyle("z-index",f.ownerCt.ownerCt.getEl().getStyle("z-index"))},300)},scope:this}}})},showCancel:function(){this.uploadingState="start";this.uploadButton.hideContainer();this.stateLabel.setText(this.uploadingMessage,false);this.stateLabel.setVisible(true);this.cancelButton.setVisible(true)},showDelete:function(){this.deleteButton.setVisible(true);this.cancelButton.setVisible(false);this.uploadingState="end"},showUpload:function(){this.uploadingState="none";this.uploadButton.showContainer();this.deleteButton.setVisible(false);this.cancelButton.setVisible(false);this.stateLabel.setVisible(false)},showErrorMessage:function(b){Ext.Msg.show({title:"Notificare",msg:b,modal:true,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK})}});Ext.reg("autouploadbutton",ExtPortal.AutoUploadButton);Ext.ns("ExtPortal");ExtPortal.BaseGrid=Ext.extend(Ext.grid.GridPanel,{border:false,stateful:false,url:null,delUrl:null,deleteMethodResultName:"DeleteResult",formClass:null,pickMode:false,editMode:true,usePaging:true,pageSize:10,storeAutoLoad:true,checkboxMode:false,masterValueData:null,masterValues:[],btnAdd:null,btnDel:null,btnSel:null,btnEdit:null,btnClear:null,delMask:null,filterArray:[],jsonReaderRoot:null,jsonReaderTotalProperty:null,jsonReaderFields:[],gridColumns:[],tooltipDataIndexes:null,descriptiveRecordProperty:null,defaultSortDir:"ASC",onRowDoubleClick:function(b,d,c){if(this.pickMode){this.fireSelectEvent()}else{if(this.editMode){this.editRecord()}}},constructor:function(b){Ext.applyIf(this,b,{border:false,stateful:false,url:null,delUrl:null,deleteMethodResultName:"DeleteResult",formClass:null,pickMode:false,editMode:true,usePaging:true,pageSize:10,checkboxMode:false,masterValueData:null,masterValues:[],jsonReaderRoot:null,jsonReaderTotalProperty:null,jsonReaderFields:[],descriptiveRecordProperty:null});if(!b||!b.masterValues){this.masterValues=[]}ExtPortal.BaseGrid.superclass.constructor.call(this,b);this.addEvents("info","error","dataItemSelected","selectionCleared");this.on("info",function(c){ExtPortal.BaseGrid.fireEvent("info",c)});this.on("error",function(c){ExtPortal.BaseGrid.fireEvent("error",c)})},initComponent:function(){var c=ExtPortal.BaseGrid.prototype.getTranslations.call(this);if(this.checkboxMode){this.pickMode=false;this.editMode=false;this.usePaging=false}this.filters=new Ext.grid.WCFGridFilters({filters:this.filterArray});this.store=new Ext.data.Store({reader:new Ext.data.JsonReader({root:"Rows",totalProperty:"Count",fields:this.jsonReaderFields}),proxy:new Ext.data.WCFProxy({url:this.url,method:"POST"}),sortInfo:{field:this.defaultSortField,direction:this.defaultSortDir||"ASC"},remoteSort:true,listeners:{beforeload:{scope:this,fn:this.onStoreBeforeLoad},loadexception:{scope:this,fn:this.onStoreLoadException}}});var b=[];if(this.editMode){this.btnAdd=new Ext.Toolbar.Button({text:c.Add_buttonText,tooltip:c.Add_buttonTooltip,iconCls:"addItem",listeners:{click:{scope:this,fn:this.addRecord}}});this.btnEdit=new Ext.Toolbar.Button({text:c.Edit_buttonText,tooltip:c.Edit_buttonTooltip,iconCls:"edit",listeners:{click:{scope:this,fn:this.editRecord}},disabled:true});this.btnDel=new Ext.Toolbar.Button({text:c.Delete_buttonText,tooltip:c.Delete_buttonTooltip,iconCls:"remove",listeners:{click:{scope:this,fn:this.deleteSelection}},disabled:true});b.push(this.btnAdd,"-",this.btnEdit,"-",this.btnDel)}if(this.pickMode){if(b.length>0){b.push("-")}this.btnSel=new Ext.Toolbar.Button({text:c.Select_buttonText,tooltip:c.Select_buttonTooltip,iconCls:"select",listeners:{click:{scope:this,fn:this.fireSelectEvent}},disabled:true});b.push(this.btnSel)}if(b.length>0){b.push("-")}this.btnClear=new Ext.Toolbar.Button({text:c.ClearSelection_buttonText,tooltip:c.ClearSelection_buttonTooltip,iconCls:"clearsel",listeners:{click:{scope:this,fn:this.clearSelected}},disabled:true});b.push(this.btnClear);if(this.usePaging){this.pagingBar=new Ext.PagingToolbar({store:this.store,plugins:this.filters,displayInfo:true,pageSize:10})}else{this.pagingBar=null}var e=new Ext.grid.CheckboxSelectionModel({singleSelect:false,listeners:{selectionchange:{scope:this,fn:function(f){var g=f.getSelections().length;if(g>0){if(this.btnClear){this.btnClear.enable()}if(this.btnDel){this.btnDel.enable()}if(g==1){if(this.btnSel){this.btnSel.enable()}if(this.btnEdit){this.btnEdit.enable()}}else{if(this.btnSel){this.btnSel.disable()}if(this.btnEdit){this.btnEdit.disable()}}}else{if(this.btnDel){this.btnDel.disable()}if(this.btnSel){this.btnSel.disable()}if(this.btnEdit){this.btnEdit.disable()}if(this.btnClear){this.btnClear.disable()}}}}}});if(this.checkboxMode){this.gridColumns=[e].concat(this.gridColumns)}this.plugins=this.plugins||[];this.plugins=this.plugins.concat(this.filters);Ext.apply(this,{store:this.store,columns:this.gridColumns,viewConfig:{forceFit:true},sm:e,tbar:b,plugins:this.plugins,bbar:this.pagingBar});this.on("rowdblclick",this.onRowDoubleClick,this);this.on("rowclick",function(f,i,h){if(!this.pickMode){var g=this.getSelectionModel().getSelections();if(g.length==1){this.fireSelectEvent()}else{this.fireEvent("selectionCleared")}}},this);ExtPortal.BaseGrid.superclass.initComponent.call(this,arguments);if(this.isTranslatable){this.translateColumnHeaders()}ExtPortal.BaseGrid.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.BaseGrid.un("langChange",this.langChange,this)});if(this.masterValues){for(var d in this.masterValues){if(this.masterValues[d]&&typeof this.masterValues[d]!="function"){this.setMasterValue(d,this.masterValues[d],true)}}}},onStoreBeforeLoad:function(d,f){if(this.masterValues){var b=[];for(var e in this.masterValues){var c=this.masterValues[e];if(c){b.push({name:e,value:c})}}if(b.length>0){d.baseParams.masterValues=b}}},onStoreLoadException:function(h,g,c,i){var f=ExtPortal.BaseGrid.prototype.getTranslations.call(this);var d;if(c.responseText){var b=Ext.util.JSON.decode(c.responseText);if(b.ErrorCode){d=String.format("<b>{0}</b><p><b><i>{1}</i></b> {2}</p><p><b><i>{3}</i></b> {4}</p><p><b><i>{5}</i></b> {6}",f.couldNotLoadData,f.errorCode,b.ErrorCode,f.faultMessage,b.FaultMessage,f.faultLocation,b.Location)}else{d=String.format("<b>{0}</b><p>{1}</p>",f.couldNotLoadData,c.responseText)}}else{d=String.format("<b>{0}</b>",f.didNotRespondInTime)}Ext.Msg.show({title:f.couldNotLoadData,msg:d,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});this.fireEvent("error",{title:f.couldNotLoadData,msg:d})},onRender:function(){ExtPortal.BaseGrid.superclass.onRender.apply(this,arguments);this.tooltip=new Ext.ToolTip({view:this.getView(),target:this.getView().mainBody,trackMouse:true,renderTo:document.body,listeners:{beforeshow:function b(g){var d=this.getView();if(d){var h=d.findRowIndex(g.triggerElement);var c=d.findCellIndex(g.triggerElement);if(this.store.data.items[h]&&this.getColumnModel().config[c]){var f=this.getColumnModel().config[c].dataIndex;if(this.tooltipDataIndexes){var e=false;Ext.each(this.tooltipDataIndexes,function(i){if(i==f){e=true}});if(!e){return false}}g.body.update(this.store.data.items[h].data[f])}}},scope:this}});if(this.storeAutoLoad){this.store.load({params:{start:0,limit:this.usePaging?this.pageSize:0}})}},setMasterValue:function(g,h,f){if(this.masterValueData&&this.masterValueData[g]!==undefined){if(!f){this.masterValues[g]=h}var c=this.getColumnModel();for(var d=0;d<this.masterValueData[g].columns.length;d++){var e=this.masterValueData[g].columns[d];var b=c.getIndexById(e);if(b>=0){c.setHidden(b,true)}}if(!f){this.resetResults()}}},clearMasterValue:function(g,f){if(this.masterValueData&&this.masterValueData[g]!==undefined){this.masterValues[g]=null;var c=this.getColumnModel();for(var d=0;d<this.masterValueData[g].columns.length;d++){var e=this.masterValueData[g].columns[d];var b=c.getIndexById(e);if(b>=0){c.setHidden(b,false)}}if(!f){this.resetResults()}}},getMasterValues:function(){var b=[];for(var d in this.masterValues){var c=this.masterValues[d];if(c){b[d]=c}}return b},getDeleteRecordDescription:function(b){return b[this.descriptiveRecordProperty?this.descriptiveRecordProperty:this.defaultSortField]},deleteSelection:function(){var c=this.getSelectionModel().getSelections();if(c.length>0){var d="";this.delItems=[];Ext.each(c,function(f){var e=f.data;d+=this.getDeleteRecordDescription(e)+", ";this.delItems.push(f.data)},this);d=d.substring(0,d.length-2);var b=ExtPortal.BaseGrid.prototype.getTranslations.call(this);Ext.Msg.show({title:b.delConfTitleDelete+" "+(this.delItems.length>1?this.delItems.length+" "+b.delConfTitleManyItems:b.delConfTitleOneItem),msg:String.format((this.delItems.length>1?b.delConfMessageQuestionManyItems:b.delConfMessageQuestionOneItem)+"<br/>"+b.delConfMessageNoUndo,d),icon:Ext.Msg.QUESTION,buttons:Ext.Msg.YESNO,scope:this,animEl:this.btnDel.getEl(),fn:function(e){var f=ExtPortal.BaseGrid.prototype.getTranslations.call(this);if("yes"!==e){return}if(!this.delMask){this.delMask=new Ext.LoadMask(this.getEl(),{msg:f.deletingMask})}this.delMask.show();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.delUrl,method:"POST",params:Ext.util.JSON.encode({deleteItems:this.delItems}),success:function(i,j){this.delItems=null;this.delMask.hide();var g=Ext.decode(i.responseText);if(g){if(g.totalDeleted==c.length){this.fireEvent("info",{title:f.deleteSuccessfulTitle,msg:f.deleteSuccessfulMessage})}else{var h="";Ext.each(g.errors,function(n){h+='<tr><td style=""font-weight: 700"">'+this.getDeleteRecordDescription(n.item)+"</td><td>&nbsp;-&nbsp;</td><td>"+n.message+"</td></tr>"},this);h=f.deleteFailedMessage+" <b>"+h+"</b>";this.msgMask=Ext.getBody().mask();this.msgMask.show();Ext.Msg.show({title:f.deleteFailedTitle,msg:h,modal:true,icon:Ext.Msg.ERROR,fn:function(){this.msgMask.hide()},scope:this,buttons:Ext.Msg.OK});this.fireEvent("error",{title:f.deleteFailedTitle,msg:h})}if(this.usePaging){var m=this.pagingBar.getPageData();var k=m.activePage;var l=m.pages;if(g.totalDeleted==this.store.getCount()){this.pagingBar.changePage((k>1&&k==l?k-1:k))}else{this.pagingBar.changePage(k)}}else{this.store.reload()}}else{this.onDelFailure(i,j)}},failure:this.onDelFailure})}})}},onDelFailure:function(c,f){var e=ExtPortal.BaseGrid.prototype.getTranslations.call(this);this.delItems=null;var d;if(c.responseText){var b=Ext.decode(c.responseText);if(b.ErrorCode!==undefined){d=String.format("{0} ({1} {2}, {3} {4})",b.FaultMessage,e.errorCode,b.ErrorCode,e.faultLocation,b.Location)}else{d=c.responseText}}d="<b>"+e.couldNotPerformDelete+"</b><p>"+d+"</p>";Ext.Msg.show({title:e.unableToDelete,msg:d,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});this.delMask.hide();this.fireEvent("error",{title:e.unableToDelete,msg:d})},addRecord:function(){var b=new ExtPortal.WindowFormController(this.formClass,{masterValues:this.getMasterValues()},this.descriptiveRecordProperty);b.on("close",this.refreshResults,this);b.show(this.btnAdd.getEl())},editRecord:function(){var b=this.getSelectionModel().getSelections();if(b.length>0){var c=new ExtPortal.WindowFormController(this.formClass,{referenceDataItem:b[0].data,masterValues:this.getMasterValues()},this.descriptiveRecordProperty);c.on("close",this.refreshResults,this);c.show(this.btnEdit.getEl())}},refreshResults:function(){if(this.usePaging){var b=this.pagingBar.getPageData().activePage;this.pagingBar.changePage(b)}else{this.store.reload()}},resetResults:function(){if(this.usePaging){this.pagingBar.changePage(1)}else{this.store.reload()}},fireSelectEvent:function(){var b=this.getSelectionModel().getSelections();if(b.length==1){this.fireEvent("dataItemSelected",b[0].data)}},getSelectedItems:function(){var b=[];Ext.each(this.getSelectionModel().getSelections(),function(c){b.push(c.data)});return b},clearSelected:function(){this.getSelectionModel().clearSelections();this.fireEvent("selectionCleared")},getTranslations:function(){var b=ExtPortal.BaseGrid.translations;if(!b){b=ExtPortal.BaseGrid.referenceTranslations}return b},langChange:function(){if(this.isTranslatable){this.translateColumnHeaders()}this.translateButtons()},translateColumnHeaders:function(){var c=this.getTranslations();var b=this.getColumnModel();for(var d=0;d<b.getColumnCount();d++){var e=b.getColumnId(d);b.setColumnHeader(d,c[e+"_headerText"])}},translateButtons:function(){var b=ExtPortal.BaseGrid.prototype.getTranslations.call(this);if(this.btnAdd){this.btnAdd.setText(b.Add_buttonText);this.btnAdd.setTooltip(b.Add_buttonTooltip)}if(this.btnDel){this.btnDel.setText(b.Delete_buttonText);this.btnDel.setTooltip(b.Delete_buttonTooltip)}if(this.btnSel){this.btnSel.setText(b.Select_buttonText);this.btnSel.setTooltip(b.Select_buttonTooltip)}if(this.btnEdit){this.btnEdit.setText(b.Edit_buttonText);this.btnEdit.setTooltip(b.Edit_buttonTooltip)}if(this.btnClear){this.btnClear.setText(b.ClearSelection_buttonText);this.btnClear.setTooltip(b.ClearSelection_buttonTooltip)}}});Ext.apply(ExtPortal.BaseGrid,new Ext.util.Observable());ExtPortal.BaseGrid.addEvents("info","error","langChange");ExtPortal.BaseGrid.referenceTranslations={Add_buttonText:"Add",Add_buttonTooltip:"Add a new record",Delete_buttonText:"Delete",Delete_buttonTooltip:"Delete the selected item(s)",Select_buttonText:"Select",Select_buttonTooltip:"Select highlighted item",Edit_buttonText:"Edit",Edit_buttonTooltip:"Edit the selected item",ClearSelection_buttonText:"Clear Selection",ClearSelection_buttonTooltip:"Clear current selection",couldNotLoadData:"Could not load data.",errorCode:"Error Code:",faultMessage:"Message:",faultLocation:"Location:",didNotRespondInTime:"The server did not respond in time.",delConfTitleDelete:"Delete",delConfTitleManyItems:"items",delConfTitleOneItem:"item",delConfMessageQuestionManyItems:"Do you really want to delete the following items: {0}?",delConfMessageQuestionOneItem:"Do you really want to delete the following item: {0}?",delConfMessageNoUndo:"There is no undo.",deletingMask:"Deleting...",deleteSuccessfulTitle:"Delete successful",deleteSuccessfulMessage:"The items were successfully deleted.",deleteFailedMessage:"The following items might not have been deleted:",deleteFailedTitle:"Delete failed",couldNotPerformDelete:"Could not perform delete",unableToDelete:"Unable to delete"};Ext.ns("ExtPortal");ExtPortal.CrossGridController=function(f,b,d,c,e){this.gridClass=f;this.getUrl=b;this.updateUrl=d;this.dataConfig=c;this.gridConfig=e;this.dataConfig.refFormMasterValues=this.dataConfig.refMasterValues;this.dataConfig.colFormMasterValues=this.dataConfig.colMasterValues;this.dataConfig.refMasterValues=this.translateMasterValuesArray(this.dataConfig.refMasterValues);this.dataConfig.colMasterValues=this.translateMasterValuesArray(this.dataConfig.colMasterValues);this.dataConfig.crossMasterValues=this.translateMasterValuesArray(this.dataConfig.crossMasterValues);this.beginCreateGrid()};Ext.extend(ExtPortal.CrossGridController,Ext.util.Observable,{translateMasterValuesArray:function(e){if(e){var b=[];for(var d in e){var c=e[d];if(c){b.push({name:d,value:c})}}return b}else{return null}},beginCreateGrid:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.getUrl,method:"POST",params:Ext.util.JSON.encode(this.dataConfig),success:this.endCreateGrid,failure:function(b,c){alert(b.responseText)}})},endCreateGrid:function(b,c){var d=Ext.decode(b.responseText);this.crossGrid=new this.gridClass({dataConfig:this.dataConfig,updateUrl:this.updateUrl,gridConfig:this.gridConfig,columnHeaders:d.columnHeaders,dataRows:d.rows})}});Ext.grid.WCFGridFilters=function(b){Ext.grid.WCFGridFilters.superclass.constructor.call(this,b)};Ext.extend(Ext.grid.WCFGridFilters,Ext.grid.GridFilters,{buildQuery:function(filters){var p;eval(["p = {",this.paramPrefix,": filters}"].join(""));return p},reload:function(){if(this.local){this.grid.store.clearFilter(true);this.grid.store.filterBy(this.getRecordFilter())}else{this.deferredUpdate.cancel();var b=this.grid.store;if(this.toolbar){var c=this.toolbar.paramNames.start;if(b.lastOptions&&b.lastOptions.params){b.lastOptions.params[c]=0}}b.reload()}}});Ext.ns("ExtPortal");ExtPortal.WindowFormController=function(b,d,c){if(!d){d={}}this.addEvents("close");this.formClass=b;this.descriptiveRecordProperty=c;this.formConfig=d;this.win=new Ext.Window({title:"",layout:"fit",width:this.formClass.winWidth?this.formClass.winWidth:350,height:this.formClass.winHeight?this.formClass.winHeight:240,closable:true,border:false,modal:true});this.win.on("close",function(){this.fireLastEditedItemEvent();this.fireEvent("close")},this);this.stores=this.formClass.getStores();this.loadStores()};Ext.extend(ExtPortal.WindowFormController,Ext.util.Observable,{stores:[],formClass:null,formConfig:null,lastEditedItem:null,fireLastEditedItemEvent:function(){var b=1;if(this.lastEditedItem&&this.descriptiveRecordProperty){var c={dataItem:this.lastEditedItem,formClass:this.formClass,descriptiveRecordProperty:this.descriptiveRecordProperty};ExtPortal.WindowFormController.fireEvent("endedit",c)}},loadStores:function(){Ext.each(this.stores,function(b){b.doneLoading=false;b.on("datachanged",function(c){c.doneLoading=true});b.load()})},endLoadStores:function(){var d=true;var c=this.getTranslations();Ext.each(this.stores,function(i){if(!i.doneLoading){d=false}});if(d){var g="";Ext.each(this.stores,function(i){if(i.getCount()==0){g+="<li>"+i.storePropId+"</li>"}});if(g!=""){this.cannotLoadForm=true;var h=c.cannotLoad_messageBody+" <ul>"+g+"</ul>";Ext.Msg.show({title:c.cannotLoad_messageTitle,msg:h,modal:true,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});ExtPortal.WindowFormController.fireEvent("error",h)}else{var f=this.formClass;var b=[];Ext.each(this.stores,function(i){b[i.storePropId]=i},this);this.formConfig.loadedStoreItemArray=b;this.formConfig.parentWin=this.win;this.form=new f(this.formConfig);this.form.on("afterSetValues",function(i){this.lastEditedItem=i},this);this.form.on("resetToNewItem",function(){this.fireLastEditedItemEvent();this.lastEditedItem=null;this.win.remove(this.form,true);this.formConfig.referenceDataItem=null;this.isFormReset=true;this.loadMask=new Ext.LoadMask(this.win.body,c.loadingMessage);this.loadMask.show();this.loadStores();this.endLoadStores()},this);this.form.on("info",function(i){ExtPortal.WindowFormController.fireEvent("info",i)});this.form.on("error",function(i){ExtPortal.WindowFormController.fireEvent("error",i)});this.win.add(this.form);this.loadMask.hide();this.form.load();this.win.doLayout();this.form.setIsShown()}}else{var e=this;setTimeout(function(){e.endLoadStores()},100)}},show:function(b){if(b){this.hasTriggerItem=true}else{this.hasTriggerItem=false}this.win.on("show",function(){},this);this.win.show();this.loadMask=new Ext.LoadMask(this.win.body,this.getTranslations().loadingMessage);this.loadMask.show();this.endLoadStores()},notifyFormShow:function(){if(this.cannotLoadForm){this.win.close()}else{if(this.win.el.getStyle("display")!="none"){this.form.setIsShown()}else{var b=this;setTimeout(function(){b.notifyFormShow()},100)}}},getTranslations:function(){var b=ExtPortal.WindowFormController.translations;if(!b){b=ExtPortal.WindowFormController.referenceTranslations}return b}});Ext.apply(ExtPortal.WindowFormController,new Ext.util.Observable());ExtPortal.WindowFormController.addEvents("endedit","error","info","langChange");ExtPortal.WindowFormController.referenceTranslations={cannotLoad_messageBody:"Cannot load form due to empty database table(s):",cannotLoad_title:"Cannot load form",loadingMessage:"Loading..."};Ext.tree.WCFTreeLoader=function(b){this.methodName=null;Ext.tree.WCFTreeLoader.superclass.constructor.call(this,b)};Ext.extend(Ext.tree.WCFTreeLoader,Ext.tree.TreeLoader,{methodName:null,getParams:function(b){var c={node:b.id};Ext.apply(c,this.baseParams);return Ext.util.JSON.encode(c)},processResponse:function(f,d,k){var l=Ext.decode(f.responseText);try{var b=l.Rows;if(b.error){throw b.error.message}d.beginUpdate();for(var g=0,h=b.length;g<h;g++){var c=this.createNode(b[g]);if(c){d.appendChild(c)}}d.endUpdate();if(typeof k=="function"){k(this,d)}}catch(j){this.handleFailure(f)}}});Ext.JsonRpcProxy=function(e,c){var b=null;var d=null;Ext.JsonRpcProxy.superclass.constructor.call(this);this.load=function(i,g,j,h,f){b[c](i.start,i.limit,i.sort,i.dir,this.loadResponse.createDelegate(this,[g,j,h,f],true)).call(Ext.JsonRpcProxy.ext_channel1)};this.loadResponse=function(i,h,k,j,g){var f;f=h.read(i);k.call(j||this,f,g,true)};this.setRpcProxy=function(g,f){if(g){b=g.rpc||g}d=f||"list"};this.setRpcProxy(e,c)};Ext.JsonRpcProxy.ext_channel1=function(b){if(typeof(b.callback)!=="function"){throw new Error("The EXT channel does not support synchronous methods.")}b.yuiconn=Ext.Ajax.request({url:b.url,params:{"JSON-RPC":Ext.util.JSON.encode(b.request)},success:function(c,d){b.callback(c)},failure:function(c,d){b.callback({xhr:c})}});return b};Ext.extend(Ext.JsonRpcProxy,Ext.data.DataProxy,{});Ext.data.WCFProxy=function(b){Ext.data.WCFProxy.superclass.constructor.call(this,b)};Ext.extend(Ext.data.WCFProxy,Ext.data.HttpProxy,{load:function(f,c,g,d,b){if(this.fireEvent("beforeload",this,f)!==false){var e={params:Ext.util.JSON.encode(f||{}),request:{callback:g,scope:d,arg:b},reader:c,callback:this.loadResponse,scope:this};if(this.useAjax){Ext.applyIf(e,this.conn);if(this.activeRequest){Ext.Ajax.abort(this.activeRequest)}this.activeRequest=Ext.Ajax.request(e)}else{this.conn.request(e)}}else{g.call(d||this,null,b,false)}}});ExtPortal.ContentTreeLoader=Ext.extend(Ext.tree.WCFTreeLoader,{createNode:function(b){b.allowChildren=true;if(b.leaf){b.expanded=true;b.children=[]}b.iconCls="x-hide-display";var c=ExtPortal.ContentTreeLoader.superclass.createNode.call(this,b);c.isCategory=b.IsCategory;c.groups=b.Groups;return c}});ImageDragZone=function(b,c,d){this.view=b;this.parent=d;ImageDragZone.superclass.constructor.call(this,this.view.getEl(),c)};Ext.extend(ImageDragZone,Ext.dd.DragZone,{getDragData:function(j){var k=j.getTarget(".thumb-wrap");if(k){var l=this.view;if(j.ctrlKey==false){if(!l.isSelected(k)){l.onClick(j)}}var c=l.getSelectedNodes();var d={nodes:c};if(c.length==1){if(j.ctrlKey!=false){return false}d.ddel=k;d.single=true}else{var b=document.createElement("div");b.className="multi-proxy";for(var f=0,h=c.length;f<h;f++){b.appendChild(c[f].firstChild.firstChild.cloneNode(true));if((f+1)%3==0){b.appendChild(document.createElement("br"))}}var g=document.createElement("div");g.innerHTML=f+" images selected";b.appendChild(g);d.ddel=b;d.multi=true}return d}return false},getTreeNode:function(d,h,l,j){if(h==this.parent.galleryTree.getSelectionModel().getSelectedNode()){var c=new Ext.Action({text:"Action 1",handler:function(){Ext.Msg.show({title:"INFO",msg:"Please choose a different gallery!",icon:Ext.Msg.INFO,buttons:Ext.Msg.OK})},iconCls:"blist",renderTo:Ext.getBody()});c.execute();c.show()}else{var k=[];var b=this.view.getRecords(this.dragData.nodes);for(var f=0,g=b.length;f<g;f++){var d=b[f].data;k.push(d.id)}if(this.parent.moveImages){this.parent.moveImages(k,d,h,l,j)}}return null},afterRepair:function(){for(var c=0,b=this.dragData.nodes.length;c<b;c++){Ext.fly(this.dragData.nodes[c]).frame("#8db2e3",1)}this.dragging=false},getRepairXY:function(c){if(!this.dragData.multi){var b=Ext.Element.fly(this.dragData.ddel).getXY();b[0]+=3;b[1]+=3;return b}return false}});function shortName(b){if(b.length>15){return b.substr(0,12)+"..."}return b}Ext.DataView.LabelEditor=function(b,c){Ext.DataView.LabelEditor.superclass.constructor.call(this,c||new Ext.form.TextField({allowBlank:false,growMin:90,growMax:240,grow:true,selectOnFocus:true}),b)};Ext.extend(Ext.DataView.LabelEditor,Ext.Editor,{alignment:"tl-tl",hideEl:false,cls:"x-small-editor",shim:false,completeOnEnter:true,cancelOnEsc:true,labelSelector:"span.x-editable",init:function(b){this.view=b;b.on("render",this.initEditor,this);this.on("complete",this.onSave,this)},initEditor:function(){this.view.getEl().on("mousedown",this.onMouseDown,this,{delegate:this.labelSelector})},onMouseDown:function(f,d){if(!f.ctrlKey&&!f.shiftKey){var c=this.view.findItemFromChild(d);f.stopEvent();var b=this.view.store.getAt(this.view.indexOf(c));this.startEdit(d,b.data[this.dataIndex]);this.activeRecord=b}else{f.preventDefault()}},onSave:function(b,c){this.activeRecord.set(this.dataIndex,c)}});Ext.DataView.DragSelector=function(h){h=h||{};var k,e,j,m;var f,l,n=new Ext.lib.Region(0,0,0,0);var c=h.dragSafe===true;this.init=function(r){k=r;k.on("render",q)};function o(){f=[];k.all.each(function(r){f[f.length]=r.getRegion()});l=k.el.getRegion()}function g(){return false}function i(r){return !c||r.target==k.el.dom}function p(r){k.on("containerclick",g,k,{single:true});if(!j){j=k.el.createChild({cls:"x-view-selector"})}else{j.setDisplayed("block")}o();k.clearSelections()}function d(D){var E=m.startXY;var I=m.getXY();var G=Math.min(E[0],I[0]);var F=Math.min(E[1],I[1]);var H=Math.abs(E[0]-I[0]);var B=Math.abs(E[1]-I[1]);n.left=G;n.top=F;n.right=G+H;n.bottom=F+B;n.constrainTo(l);j.setRegion(n);for(var A=0,C=f.length;A<C;A++){var s=f[A],u=n.intersect(s);if(u&&!s.selected){s.selected=true;k.select(A,true)}else{if(!u&&s.selected){s.selected=false;k.deselect(A)}}}}function b(r){if(j){j.setDisplayed(false)}}function q(r){m=new Ext.dd.DragTracker({onBeforeStart:i,onStart:p,onDrag:d,onEnd:b});m.initEl(r.el)}};var chooserImages,chooserFiles,panelBrowserImages,panelBrowserFiles,chooserFlv,panelBrowserFLV;var baseDir=(siteName+"/")||"new-site/";function chooseImage(c,d){if(!chooserImages){panelBrowserImages=new Ext.ux.FileBrowserPanel({width:450,layout:"border",treeRootPath:baseDir+"Uploads/Images",height:350});panelBrowserImages.callback=d;var b={title:"Choose an Image",id:"img-chooser-dlg",modal:true,closeAction:"hide",width:470,height:370,border:false,items:[panelBrowserImages],keys:{key:27,handler:function(){this.win.hide()},scope:this}};chooserImages=new Ext.Window(b);panelBrowserImages.ParentWindow=chooserImages}else{panelBrowserImages.callback=d}chooserImages.show()}function chooseFile(c,d){if(!chooserFiles){panelBrowserFiles=new Ext.ux.FileBrowserPanel({width:450,layout:"border",treeRootPath:baseDir+"Uploads/Links",height:350});panelBrowserFiles.callback=d;var b={title:"Choose a file",id:"file-chooser-dlg",modal:true,closeAction:"hide",width:470,height:370,border:false,items:[panelBrowserFiles],keys:{key:27,handler:function(){this.win.hide()},scope:this}};chooserFiles=new Ext.Window(b);panelBrowserFiles.ParentWindow=chooserFiles}else{panelBrowserFiles.callback=d}chooserFiles.show()}function chooseFLV(c,d){if(!chooserFlv){panelBrowserFLV=new Ext.ux.FileBrowserPanel({width:450,layout:"border",treeRootPath:baseDir+"Uploads/Media",height:350});panelBrowserFLV.callback=d;var b={title:"Choose a FLV",id:"flv-chooser-dlg",modal:true,closeAction:"hide",width:470,height:370,border:false,items:[panelBrowserFLV],keys:{key:27,handler:function(){this.win.hide()},scope:this}};chooserFlv=new Ext.Window(b);panelBrowserFLV.ParentWindow=chooserFlv}else{panelBrowserFLV.callback=d}chooserFlv.show()}Ext.DataView.LabelEditor=function(b,c){Ext.DataView.LabelEditor.superclass.constructor.call(this,c||new Ext.form.TextField({allowBlank:false,growMin:90,growMax:240,grow:true,selectOnFocus:true}),b)};Ext.extend(Ext.DataView.LabelEditor,Ext.Editor,{alignment:"tl-tl",hideEl:false,cls:"x-small-editor",shim:false,completeOnEnter:true,cancelOnEsc:true,labelSelector:"span.x-editable",init:function(b){this.view=b;b.on("render",this.initEditor,this);this.on("complete",this.onSave,this)},initEditor:function(){this.view.getEl().on("mousedown",this.onMouseDown,this,{delegate:this.labelSelector})},onMouseDown:function(f,d){if(!f.ctrlKey&&!f.shiftKey){var c=this.view.findItemFromChild(d);f.stopEvent();var b=this.view.store.getAt(this.view.indexOf(c));this.startEdit(d,b.data[this.dataIndex]);this.activeRecord=b}else{f.preventDefault()}},onSave:function(b,c){this.activeRecord.set(this.dataIndex,c)}});Ext.DataView.DragSelector=function(h){h=h||{};var k,e,j,m;var f,l,n=new Ext.lib.Region(0,0,0,0);var c=h.dragSafe===true;this.init=function(r){k=r;k.on("render",q)};function o(){f=[];k.all.each(function(r){f[f.length]=r.getRegion()});l=k.el.getRegion()}function g(){return false}function i(r){return !c||r.target==k.el.dom}function p(r){k.on("containerclick",g,k,{single:true});if(!j){j=k.el.createChild({cls:"x-view-selector"})}else{j.setDisplayed("block")}o();k.clearSelections()}function d(D){var E=m.startXY;var I=m.getXY();var G=Math.min(E[0],I[0]);var F=Math.min(E[1],I[1]);var H=Math.abs(E[0]-I[0]);var B=Math.abs(E[1]-I[1]);n.left=G;n.top=F;n.right=G+H;n.bottom=F+B;n.constrainTo(l);j.setRegion(n);for(var A=0,C=f.length;A<C;A++){var s=f[A],u=n.intersect(s);if(u&&!s.selected){s.selected=true;k.select(A,true)}else{if(!u&&s.selected){s.selected=false;k.deselect(A)}}}}function b(r){if(j){j.setDisplayed(false)}}function q(r){m=new Ext.dd.DragTracker({onBeforeStart:i,onStart:p,onDrag:d,onEnd:b});m.initEl(r.el)}};Ext.ns("ExtPortal.plugins");ExtPortal.plugins.SortableDataView=function(b){Ext.apply(this,b||{},{dragCls:"x-view-sortable-drag",viewDragCls:"x-view-sortable-dragging"});ExtPortal.plugins.SortableDataView.superclass.constructor.call(this)};Ext.extend(ExtPortal.plugins.SortableDataView,Ext.util.Observable,{events:{drop:true},init:function(b){window.sdv=this;this.view=b;b.on("render",this.onRender,this)},onRender:function(){var e=this,d=this.view,f=d.store,c=new Ext.dd.DragDrop(d.el),b=this.dragCls;viewDragCls=this.viewDragCls;c.onMouseDown=function(k){var j,g,h;this.dragData=null;try{j=k.getTarget(d.itemSelector);g=d.indexOf(j);h=f.getAt(g);if(j&&h){this.dragData={origIdx:g,lastIdx:g,record:h};return true}}catch(i){this.dragData=null}return false};c.startDrag=function(g,h){if(!this.dragData){return false}Ext.fly(d.getNode(this.dragData.origIdx)).addClass(b);d.el.addClass(viewDragCls)};c.endDrag=function(g){if(!this.dragData){return true}Ext.fly(d.getNode(this.dragData.lastIdx)).removeClass(b);d.el.removeClass(viewDragCls);e.fireEvent("drop",this.dragData.origIdx,this.dragData.lastIdx,this.dragData.record);return true};c.onDrag=function(l){var j,g,h,k=this.dragData;if(!k){return false}try{j=l.getTarget(d.itemSelector);g=d.indexOf(j);h=f.getAt(g);if(g===k.lastIdx){return true}if(j&&h){k.lastIdx=g;f.remove(k.record);f.insert(g,[k.record]);Ext.fly(d.getNode(g)).addClass(b);return true}}catch(i){return false}return false};this.dd=c}});Ext.ns("ExtPortal");ExtPortal.ImagesGallery=Ext.extend(Ext.Panel,{url:"/services/ExtPortal/ImagesGallery.svc",uploadImageUrl:"UploadGalleryImage.aspx",svcDeleteGalleryMethodName:"DeleteGallery",svcDeleteImageMethodName:"DeleteImage",svcReorderGalleryMethodName:"SortGallery",svcEditGalleryMethodName:"EditGallery",svcRenameGalleryMethodName:"RenameGallery",svcAddGalleryMethodName:"AddGallery",svcEditImageMethodName:"EditImage",svcMoveImagesMethodName:"MoveImages",svcSortImagesMethodName:"SortImages",svcLoadImagesMethodName:"ImagesGalleryList",svcTreeLoadMethodName:"GalleryList",method:"POST",standardSubmit:false,Title:"Lista Albume",galleryToolbar:null,galleryTreeMenu:null,galleryTree:null,treeEditor:null,treeRoot:null,bigImage:null,bigImageDescription:null,bigImageWindow:null,storeProxy:null,imagesStore:null,imagesViewMenu:null,imagesView:null,imagesPanel:null,addEditImageForm:null,addEditImageWindow:null,bigImageHeight:600,bigImageWidth:800,canvasWidth:700,canvasHeight:450,imageIdToEdit:null,customBgcolor:null,layout:"fit",border:false,width:950,height:600,autoHeight:false,initComponent:function(){var b=this.getCurrentTranslations();this.title=this.title||b.Images_titleText;SessionData.on("logout",function(){this.onLoginChanged(false)},this);SessionData.on("login",function(){this.onLoginChanged(true)},this);this.addEvents("info","endedit","error");this.on("info",function(c){ExtPortal.PageItem.fireEvent("info",c)});this.on("error",function(c){ExtPortal.PageItem.fireEvent("error",c)});this.on("endedit",function(c){ExtPortal.PageItem.fireEvent("endedit",c)});this.galleryTreeLoader=new Ext.tree.WCFTreeLoader({dataUrl:this.url+"/"+this.svcTreeLoadMethodName,requestMethod:"POST",methodName:this.svcTreeLoadMethodName,handleFailure:function(c){},listeners:{beforeload:{fn:function(c,d){c.baseParams.Lang=Manager.getCurrentLang()},scope:this},load:{fn:function(){if(this.LastSelectedGallery){var c=this.galleryTree.getRootNode().findChild("id",this.LastSelectedGallery.id)}if(c){this.galleryTreeClick(c)}},scope:this}}});this.btnGalleryMenu=new Ext.Button({text:b.GalleryMenu_buttonText,iconCls:"album-btn",handler:function(c,d){this.setTreeMenuFields(d,this.galleryTree.getSelectionModel().getSelectedNode())},scope:this});this.galleryToolbar=new Ext.Toolbar({hidden:!SessionData.isMemberOf("Admins"),items:[this.btnGalleryMenu]});this.galleryTreeMenu=new Ext.menu.Menu({items:[{id:"delete-gallery",text:b.btnDeleteGallery_buttonText,langName:"btnDeleteGallery_buttonText",iconCls:"delete"},{id:"edit-gallery",text:b.btnEditGallery_buttonText,langName:"btnEditGallery_buttonText",iconCls:"edit"},{id:"add-gallery",text:b.btnAddGallery_buttonText,langName:"btnAddGallery_buttonText",iconCls:"add"},"-",{id:"add-image",text:b.btnAddNewImage_buttonText,langName:"btnAddNewImage_buttonText",iconCls:"galleryfolder"}],listeners:{itemclick:{fn:function(c){this.ownerCt.galleryMenuClick(c)}},scope:this}});this.galleryTreeMenu.ownerCt=this;this.galleryTree=new Ext.tree.TreePanel({animate:true,enableDD:true,containerScroll:true,ddGroup:"organizerDD",rootVisible:false,region:"west",collapsible:true,useArrows:true,width:200,split:true,title:this.Title,autoScroll:true,tbar:this.galleryToolbar,margins:"0 0 0 0",loader:this.galleryTreeLoader,contextMenu:this.galleryTreeMenu,bodyStyle:"background:transparent",listeners:{contextmenu:{fn:function(c,d){this.setTreeMenuFields(d,c)},scope:this}}});this.galleryTreeSorter=new Ext.tree.TreeSorter(this.galleryTree,{folderSort:true,dir:"ASC",sortType:function(c){return c.attributes.Merit}});this.treeRoot=new Ext.tree.AsyncTreeNode({text:"All",draggable:false,id:"-100",childNodes:[]});this.galleryTree.setRootNode(this.treeRoot);this.galleryTree.expandAll();this.galleryTree.on("click",this.galleryTreeClick,this);this.galleryTree.treeNodeOldPosition=null;this.galleryTree.treeNodeOldNextSibling=null;this.galleryTree.on("startdrag",function(c,e,d){c.treeNodeOldPosition=e.parentNode.indexOf(e);c.treeNodeOldNextSibling=e.nextSibling},this);this.galleryTree.on("movenode",function(d,g,e,f,c){this.galleryTreeSort(d,g,e,f,c)},this);this.bigImage=new Ext.form.Label({html:b.Loading_text,anchor:"100%",layout:"anchor"});this.bigImageDescription=new Ext.Toolbar.TextItem({id:"description",text:" "});this.bigImageWindowEditBtn=new Ext.Toolbar.Button({text:b.bigImageWindowEditBtn_buttonText,scope:this,hidden:!SessionData.isMemberOf("Admins"),handler:function(){var c=this.imagesStore.getAt(this.bigImageWindow.currentIndex);this.editImage(c);this.bigImageWindow.hide()}});this.btnPreviewImage=new Ext.Button({text:b.Preview_buttonText,scope:this,handler:function(){this.changeImage(-1)}});this.btnNextImage=new Ext.Button({text:b.Next_buttonText,scope:this,handler:function(){this.changeImage(+1)}});this.bigImageWindow=new Ext.Window({layout:"fit",height:this.bigImageHeight,width:this.bigImageWidth,closeAction:"hide",modal:true,id:"bigImageWindow",plain:true,maximizable:true,currentIndex:0,items:[this.bigImage],keys:[{key:Ext.EventObject.ESC,scope:this,fn:function(){this.bigImageWindow.hide()}},{key:Ext.EventObject.LEFT,scope:this,fn:function(){this.changeImage(-1)}},{key:Ext.EventObject.RIGHT,scope:this,fn:function(){this.changeImage(+1)}},{key:Ext.EventObject.UP,scope:this,fn:function(){var c=this.bigImageWindow.getSize();this.bigImageWindow.setSize(c.width*1.1,c.height*1.1)}},{key:Ext.EventObject.DOWN,scope:this,fn:function(){var c=this.bigImageWindow.getSize();this.bigImageWindow.setSize(c.width*0.9,c.height*0.9)}}],bbar:[this.bigImageDescription,"  ","->",this.bigImageWindowEditBtn,"  ","-"," ",this.btnPreviewImage,"  ","-"," ",this.btnNextImage]});this.storeProxy=new Ext.data.WCFProxy({url:this.url+"/"+this.svcLoadImagesMethodName});this.imagesStore=new Ext.data.JsonStore({url:this.url+"/"+this.svcLoadImagesMethodName,proxy:this.storeProxy,autoLoad:false,root:"Rows",id:"id",listeners:{beforeload:{fn:function(c,d){c.baseParams.Lang=Manager.getCurrentLang()},scope:this}},fields:["name","urlThumb","urlBig","id","description","Merit","IDGallery",{name:"shortName",mapping:"name",convert:shortName}]});this.imagesStore.proxy.on("beforeload",function(c,d){d.filter="*.*";d.galleryId=this.theGalleryId});this.imagesStore.on("datachanged",function(c,d){if(this.imageIdToEdit!=null){this.editImage(this.imagesView.store.getById(this.imageIdToEdit));this.imageIdToEdit=null}},this);this.imagesStore.setDefaultSort("Merit","ASC");this.imagesViewMenu=new Ext.menu.Menu({items:[{id:"delete-selected",langName:"btnDeleteSelected_buttonText",text:b.btnDeleteSelected_buttonText,iconCls:"delete"},{id:"edit-image",langName:"btnEditImage_buttonText",text:b.btnEditImage_buttonText,iconCls:"edit"},{id:"add-image",langName:"btnAddNewImage_buttonText",text:b.btnAddNewImage_buttonText,iconCls:"add"},{id:"view-big",langName:"btnViewBigImage_buttonText",text:b.btnViewBigImage_buttonText,iconCls:"preview"}],listeners:{itemclick:{fn:function(c){this.ownerCt.viewMenuClick(c)}},scope:this}});this.imagesViewMenu.ownerCt=this;this.imagesViewSortPlugin;this.imagesView=new Ext.DataView({itemSelector:"div.thumb-wrap",style:"overflow:auto;background:transparent",enableDD:true,ddGroup:"organizerDD",height:600,emptyText:b.NoImages_text,loadingText:b.Loading_text,multiSelect:true,plugins:[new Ext.DataView.DragSelector({dragSafe:true}),this.imagesViewSortPlugin=new ExtPortal.plugins.SortableDataView()],store:this.imagesStore,tpl:new Ext.XTemplate('<tpl for="."><div class="thumb-wrap" id="{id}"><div class="thumb"><img src="{urlThumb}" class="thumb-img"></div><span>{shortName}</span></div></tpl>'),bigImageWindow:this.bigImageWindow,bigImage:this.bigImage,bigImageDescription:this.bigImageDescription,contextMenu:this.imagesViewMenu,listeners:{dblclick:{fn:function(g,c,d,f){this.showBigImage(d)},scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(c){return c.store.getRange().length>0}},contextmenu:{fn:function(d,c,f,g){this.imagesView.select(f);this.setViewMenuFields(g)},scope:this}}});this.imagesViewSortPlugin.on("drop",function(d,e,c){this.imagesViewSort(d,e,c)},this);this.imagesViewDescription=new Ext.Toolbar.TextItem({width:400,height:150,id:"description",text:b.PleaseSelect_text});this.imagesPanelMenuBtn=new Ext.Toolbar.Button({text:b.Menu_buttonText,hidden:!SessionData.isMemberOf("Admins"),scope:this,handler:function(c,d){this.setViewMenuFields(d)},scope:this});this.imagesPanel=new Ext.Panel({bodyStyle:((this.customBgcolor)?("background:"+this.customBgcolor):""),id:"imagesPanel",region:"center",margins:"0 0 0 0",layout:"fit",height:600,border:false,autoScroll:true,tbar:[this.imagesPanelMenuBtn,"-",this.imagesViewDescription],items:[this.imagesView]});this.items=[{bodyStyle:"background:transparent",items:[this.galleryTree,this.imagesPanel],layout:"border",border:false,autoWidth:true,height:600}];this.imagesView.on("render",function(){if(!this.dragZone){this.dragZone=new ImageDragZone(this.imagesView,{containerScroll:true,ddGroup:"organizerDD"},this)}},this);ExtPortal.ImagesGallery.superclass.initComponent.call(this);ExtPortal.ImagesGallery.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.ImagesGallery.un("langChange",this.langChange,this)})},langChange:function(){var b=this.getCurrentTranslations();this.translateMenu(this.galleryTreeMenu.items.items);this.translateMenu(this.imagesViewMenu.items.items);this.galleryTree.setTitle(b.Images_titleText);if(this.imagesPanelMenuBtn){this.imagesPanelMenuBtn.setText(b.Menu_buttonText)}this.btnGalleryMenu.setText(b.GalleryMenu_buttonText);this.imagesView.emptyText=b.NoImages_text;this.imagesView.loadingText=b.Loading_text;if(this.imagesViewDescription){this.imagesViewDescription.getEl().innerHTML=b.PleaseSelect_text}this.galleryTree.getRootNode().reload()},setTreeMenuFields:function(f,d){if(!this.hasPermissions()){return}var g=this.galleryTree.contextMenu;if(d){d.select();g.contextNode=d;this.setContextMenuDisablebFields(g,"",true)}else{g.contextNode=null;var b="add-gallery";this.setContextMenuDisablebFields(g,b,false)}f.stopEvent();g.showAt(f.getXY())},setViewMenuFields:function(f){if(!this.hasPermissions()){return}var g=this.imagesViewMenu;var b=this.imagesView.getSelectedNodes();g.contextNodeCount=this.imagesView.getSelectionCount();g.contextNode=b;if(g.contextNodeCount==0){var d="";if(this.galleryTree.getSelectionModel().getSelectedNode()){d="add-image"}this.setContextMenuDisablebFields(g,d,false)}else{if(g.contextNodeCount==1){this.setContextMenuDisablebFields(g,"",true)}else{var d="delete-selected,add-image";this.setContextMenuDisablebFields(g,d,false)}}f.stopEvent();g.showAt(f.getXY())},translateMenu:function(e){var c=this.getCurrentTranslations();if(!e){alert("translateMenu ln 662: no buttons ")}for(var d=0;d<e.length;d++){var b=e[d];if(b.setText){b.setText(c[b.langName])}if(b.menu){this.doTranslations(b.menu.items.items)}}},galleryTreeClick:function(c,b){this.LastSelectedGallery=c;this.imagesViewDescription.getEl().innerHTML=c.attributes.description;this.imagesStore.proxy.theGalleryId=c.attributes.id;this.imagesStore.reload();this.setHeight(this.getSize().height+1);this.setHeight(this.getSize().height-1)},galleryMenuClick:function(e){if(!this.hasPermissions()){return}var b=this.getCurrentTranslations();switch(e.id){case"delete-gallery":var d=e.parentMenu.contextNode;var c=this;Ext.MessageBox.confirm(b.ConfirmTitle_text,b.ConfirmDeleteGallery_text,function(f){if(f=="yes"){c.deleteGallery(e)}});break;case"edit-gallery":var d=e.parentMenu.contextNode;this.editGallery(d);break;case"add-gallery":this.createNewGallery();break;case"add-image":this.addImage();break}},viewMenuClick:function(f){if(!this.hasPermissions()){return}switch(f.id){case"delete-selected":var e=f.parentMenu.contextNode;var d=this;var c=this.getCurrentTranslations();Ext.MessageBox.confirm(c.ConfirmTitle_text,c.ConfirmDeleteImage_text,function(g){if(g=="yes"){d.deleteImage(f)}});break;case"edit-image":var e=this.imagesStore.getAt(f.parentMenu.contextNode[0].viewIndex);this.editImage(e);break;case"add-image":this.addImage();break;case"view-big":var b=f.parentMenu.contextNode;this.showBigImage(b[0]);break}},showBigImage:function(b){if(b){this.imagesView.bigImageWindow.currentIndex=b.viewIndex-1;this.imagesView.bigImageWindow.show();this.changeImage(+1)}},changeImage:function(e){this.bigImageWindow.currentIndex=this.changeImageIndex(this.bigImageWindow.currentIndex,e);var d=this.imagesStore.getAt(this.bigImageWindow.currentIndex);var b=new Image();b.src=d.data.urlBig;this.bigImageDescription.getEl().innerHTML=d.data.description;var c=this;setTimeout(function(){var f=c.getResizeImageSize(b);c.bigImage.setText('<div class="bigImage" width="'+f.width+'" height="'+f.height+'" ><img width="'+f.width+'" height="'+f.height+'"  src="'+d.data.urlBig+'" class="bigImage-img"></div>',false);c.bigImage.setWidth(f.width);c.bigImage.setHeight(f.height);c.bigImageWindow.setWidth(f.width);c.bigImageWindow.setHeight(f.height);c.bigImageWindow.doLayout();c.bigImageWindow.scale(f.width+100,f.height+100)},200)},changeImageIndex:function(b,c){this.imagesStore.getCount();if(b==-1){return 0}else{if((b==this.imagesStore.getCount()-1)&&(c==1)){return 0}else{if((b==0)&&(c==-1)){return(this.imagesStore.getCount()-1)}else{return b+c}}}},doEditGallery:function(b,d){var c=this.currentNode;Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcEditGalleryMethodName,method:"POST",params:Ext.util.JSON.encode({galleryId:this.editGalleryForm.getForm().getValues().galleryId,newName:this.editGalleryForm.getForm().getValues().text,description:this.editGalleryForm.getForm().getValues().description,Lang:Manager.getCurrentLang()}),success:function(g,i){var f=Ext.decode(g.responseText);var e=f;if(e&&e.success){c.setText(e.dataItem.text);if((e.dataItem)&&(typeof c.attributes.id=="string")){this.galleryTree.getLoader().load(this.treeRoot)}c.attributes.description=e.dataItem.description;this.imagesViewDescription.getEl().innerHTML=e.dataItem.description;var h=this.getCurrentTranslations();this.showSuccessMsg(h.GalleryEditedSuccessfully)}else{i.failure.call(this,g,i)}},failure:function(e,g){var f=this.getCurrentTranslations();msg=(theResult)?('<p style="font-weight:700">'+f.GalleryCouldNotBeEdited_text+"</p><p>"+f.TheFollowingError_text+"</p><br>"+theResult.dbOperationError):('<p style="font-weight:700">'+f.GalleryCouldNotBeEdited_text+"</p><br><p>"+f.PleaseTryAgain_text+"</p>");this.showErrorMsg(msg)}});this.editGalleryWindow.close()},editGallery:function(c,d){if(!this.hasPermissions()){return}c.select();this.currentNode=c;var b=this.getCurrentTranslations();this.txtGalleryID=new Ext.form.TextField({fieldLabel:b.txtGalleryID_fieldLabel,name:"galleryId",hidden:true,hideLabel:true,value:c.attributes.id});this.txtGalleryDescription=new Ext.form.TextArea({fieldLabel:b.txtGalleryDescription_fieldLabel,name:"description",value:c.attributes.description});this.txtGalleryName=new Ext.form.TextField({fieldLabel:b.txtGalleryName_fieldLabel,name:"text",value:c.attributes.text});this.btnGallerySave=new Ext.Button({text:b.btnGallerySave_buttonText,handler:this.doEditGallery,scope:this});this.btnGalleryCancelEdit=new Ext.Button({text:b.btnGalleryCancelEdit_buttonText,handler:function(){if(d){c.remove()}this.editGalleryWindow.close()},scope:this});this.editGalleryForm=new Ext.FormPanel({fileUpload:true,width:500,frame:true,autoHeight:true,bodyStyle:"padding: 10px 10px 0 10px;",labelWidth:65,defaults:{anchor:"95%",allowBlank:false,msgTarget:"side"},items:[this.txtGalleryName,this.txtGalleryDescription,this.txtGalleryID],buttons:[this.btnGallerySave,this.btnGalleryCancelEdit]});this.editGalleryWindow=new Ext.Window({layout:"fit",closable:true,width:500,autoHeight:true,plain:true,modal:true,items:[this.editGalleryForm],keys:[{key:Ext.EventObject.ESC,scope:this,fn:function(){this.bigImageWindow.hide()}}]});this.editGalleryWindow.show(c)},renameGallery:function(d,c,e){if(c==e){return false}var f=this.galleryTree.getSelectionModel().getSelectedNode();if(!this.hasPermissions()){return false}var b=(typeof f.id=="string")?this.svcAddGalleryMethodName:this.svcRenameGalleryMethodName;var g=(typeof f.id=="string")?Ext.util.JSON.encode({newName:c}):Ext.util.JSON.encode({galleryId:f.id,newName:c,Lang:Manager.getCurrentLang()});Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+b,method:"POST",params:g,success:function(j,l){var i=Ext.decode(j.responseText);var h=i;if(h&&h.success){var k=this.getCurrentTranslations();if(!h.dataItem&&(typeof f.id=="string")){m='<p style="font-weight:700">'+k.GalleryCouldNotBeCreated_text+"</p>"+h.dbOperationError;this.showErrorMsg(m);f.remove()}else{if(h.dataItem){this.galleryTree.getLoader().load(this.treeRoot)}var m=(typeof f.id=="string")?k.GalleryCreatedSuccesfully:k.GalleryRenamedSuccesfully;this.showSuccessMsg(m)}}else{var k=this.getCurrentTranslations();if(typeof f.id=="string"){f.remove();m=(h)?('<p style="font-weight:700">'+k.GalleryCouldNotBeCreated_text+"</p>"+h.dbOperationError):('<p style="font-weight:700">'+k.GalleryCouldNotBeCreated_text+"</p><p>"+k.PleaseTryAgain_text+"</p>")}else{f.setText(e);m=(h)?('<p style="font-weight:700">'+k.GalleryCouldNotBeRenamed_text+"</p>"+h.dbOperationError):('<p style="font-weight:700">'+k.GalleryCouldNotBeRenamed_text+"</p><p>"+k.PleaseTryAgain_text+"</p>")}this.showErrorMsg(m)}},failure:function(h,i){var j=(typeof f.id=="string")?('<p style="font-weight:700">'+_tran.GalleryCouldNotBeCreated_text+"</p><p>"+_tran.PleaseTryAgain_text+"</p>"):('<p style="font-weight:700">'+_tran.GalleryCouldNotBeRenamed_text+"</p><p>"+_tran.PleaseTryAgain_text+"</p>");this.showErrorMsg(j)}})},deleteGallery:function(c){if(!this.hasPermissions()){return}var b=c.parentMenu.contextNode;Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcDeleteGalleryMethodName,method:"POST",params:Ext.util.JSON.encode({galleryId:b.id,Lang:Manager.getCurrentLang()}),success:function(f,h){var e=Ext.decode(f.responseText);var d=e;if(d&&d.success){if(b.parentNode){b.remove()}var g=this.getCurrentTranslations();this.showSuccessMsg(g.GalleryDeletedSuccessfully)}else{var g=this.getCurrentTranslations();var i=(d)?('<p style="font-weight:700">'+g.GalleryCouldNotBeDeleted_text+"</p><br>"+d.dbOperationError):('<p style="font-weight:700">'+g.GalleryCouldNotBeDeleted_text+"</p><br><p>"+g.PleaseTryAgain_text+"</p>");this.showErrorMsg(i)}},failure:function(d,e){this.showErrorMsg('<p style="font-weight:700">'+_tran.GalleryCouldNotBeDeleted_text+"</p><p>"+_tran.PleaseTryAgain_text+"</p>")}})},createNewGallery:function(){if(!this.hasPermissions()){return}var b=this.getCurrentTranslations();var c=this.treeRoot.appendChild(new Ext.tree.TreeNode({text:b.NewNode_text,allowDrag:false}));this.galleryTree.getSelectionModel().select(c);this.editGallery(c,true)},deleteImage:function(e){if(!this.hasPermissions()){return}var b=e.parentMenu.contextNode;var f=[];var c=this.getCurrentTranslations();for(var d=0;d<e.parentMenu.contextNodeCount;d++){f.push(b[d].id)}Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcDeleteImageMethodName,method:"POST",params:Ext.util.JSON.encode({imageId:f,Lang:Manager.getCurrentLang()}),success:function(j,l){var h=Ext.decode(j.responseText);var g=h;if(g&&g.success){var k=this.getCurrentTranslations();for(var m=0;m<e.parentMenu.contextNodeCount;m++){this.imagesView.store.remove(this.imagesView.store.getAt(b[0].viewIndex))}this.showSuccessMsg(k.ImageDeleteSuccessfully_text)}else{var k=this.getCurrentTranslations();var n=(g)?('<p style="font-weight:700">'+k.ImageCouldNotBeDeleted_text+"</p><br>"+g.dbOperationError):('<p style="font-weight:700">'+k.ImageCouldNotBeDeleted_text+"</p><br>");this.showErrorMsg(n)}},failure:function(g,i){var h=this.getCurrentTranslations();this.showErrorMsg('<p style="font-weight:700">'+h.ImageCouldNotBeDeleted_text+"</p><p>"+h.PleaseTryAgain_text+"</p>")}})},addImage:function(){if(!this.hasPermissions()){return}var b=this.getCurrentTranslations();this.txtImage_GalleryID=new Ext.form.TextField({fieldLabel:b.txtImage_GalleryID_fieldLabel,name:"galleryId",hidden:true,hideLabel:true,value:this.galleryTree.getSelectionModel().getSelectedNode().id});this.txtLang=new Ext.form.TextField({fieldLabel:b.txtLang_fieldLabel,name:"Lang",hidden:true,hideLabel:true,value:Manager.getCurrentLang()});this.ImageFileUpload=new Ext.form.FileUploadField({id:"upload-image-file",emptyText:b.ImageFileUpload_emptyText,fieldLabel:b.ImageFileUpload_fieldLabel,name:"photo-path",listeners:{fileselected:{fn:function(e,c){var d=this.addImageForm;if(d.getForm().isValid()){d.getForm().submit({scope:this,params:Ext.util.JSON.encode({Lang:Manager.getCurrentLang()}),url:this.uploadImageUrl,waitMsg:b.addImageForm_waitMsg,success:function(g,h){var f=Ext.decode(h.response.responseText);if(f.id){this.imageIdToEdit=f.id;this.galleryTreeClick(this.galleryTree.getSelectionModel().getSelectedNode(),null)}this.addImageWindow.close()},failure:function(h,i){var g=this.getCurrentTranslations();var f=Ext.decode(i.response.responseText);this.showErrorMsg(f.error||g.ImageCouldNotBeUploaded_text);this.addImageWindow.close()}})}},scope:this}},buttonCfg:{text:"",iconCls:"upload-icon"}});this.addImageForm=new Ext.FormPanel({fileUpload:true,width:500,frame:true,autoHeight:true,bodyStyle:"padding: 10px 10px 0 10px;",labelWidth:50,defaults:{anchor:"95%",allowBlank:false,msgTarget:"side"},items:[this.txtImage_GalleryID,this.ImageFileUpload]});this.addImageWindow=new Ext.Window({width:500,title:b.addImageWindow_titleText,modal:true,items:[this.addImageForm],keys:[{key:Ext.EventObject.ESC,scope:this,fn:function(){this.bigImageWindow.hide()}}]});this.addImageWindow.show()},editImage:function(c){if(!this.hasPermissions()){return}var b=this.getCurrentTranslations();this.txtImageId=new Ext.form.TextField({fieldLabel:b.txtImageId_fieldLabel,name:"id",hideLabel:true,value:c.data.id,hidden:true});this.txtImage_GalleryID=new Ext.form.TextField({fieldLabel:b.txtImageId_fieldLabel,name:"galleryId",hideLabel:true,hidden:true,value:this.LastSelectedGallery.attributes.id});this.txtImageName=new Ext.form.TextField({fieldLabel:b.txtImageName_fieldLabel,name:"name",anchor:"90%",value:c.data.name});this.taImageDescription=new Ext.form.TextArea({fieldLabel:b.taImageDescription_fieldLabel,name:"description",anchor:"90%",value:c.data.description});this.fieldsetImage=new Ext.form.FieldSet({fieldLabel:b.fieldsetImage_fieldLabel,title:b.fieldsetImage_titleText,name:"image",autoHeight:true,html:"<img src='"+c.data.urlThumb+"'/>"});this.editImageForm=new Ext.form.FormPanel({baseCls:"x-plain",url:this.svcEditImageMethodName,defaultType:"textfield",defaults:{sallowBlank:false},bodyStyle:"padding:5px 5px 0",layout:"column",frame:true,width:650,items:[{columnWidth:0.6,xtype:"fieldset",border:false,autoHeight:true,defaultType:"textfield",defaults:{width:300},labelWidth:65,bodyStyle:Ext.isIE?"padding:0 0 5px 15px;":"padding:10px 15px;",style:{"margin-left":"10px","margin-right":Ext.isIE6?(Ext.isStrict?"-10px":"-13px"):"0"},items:[this.txtImageId,this.txtImage_GalleryID,this.txtImageName,this.taImageDescription]},{columnWidth:0.4,xtype:"fieldset",border:false,autoHeight:true,defaults:{width:210},items:[this.fieldsetImage]}],buttons:[{text:b.SaveEditImage_butttonText,handler:function(d,f){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcEditImageMethodName,method:"POST",params:Ext.util.JSON.encode({imageId:this.editImageForm.getForm().getValues().id,name:this.editImageForm.getForm().getValues().name,description:this.editImageForm.getForm().getValues().description,Lang:Manager.getCurrentLang()}),success:function(h,j){var g=Ext.decode(h.responseText);var i=this.getCurrentTranslations();var e=g;if(e&&e.success){this.galleryTreeClick(this.galleryTree.getSelectionModel().getSelectedNode(),null);this.showSuccessMsg("Image edited successfully")}else{var k=(e)?('<p style="font-weight:700">'+i.ImageCouldNotBeEdited_text+"</p><br>"+e.dbOperationError):('<p style="font-weight:700">'+i.ImageCouldNotBeEdited_text+"</p><br>");this.showErrorMsg(k)}},failure:function(e,h){var g=this.getCurrentTranslations();this.showErrorMsg('<p style="font-weight:700">'+g.ImageCouldNotBeEdited_text+"</p><p>"+g.PleaseTryAgain_text+"</p>")}});this.editImageWindow.close()},scope:this},{text:b.CancelEditImage_buttonText,handler:function(){this.editImageWindow.close()},scope:this}]});this.editImageWindow=new Ext.Window({height:300,width:700,modal:true,currentIndex:0,items:[this.editImageForm],keys:[{key:Ext.EventObject.ESC,scope:this,fn:function(){this.bigImageWindow.hide()}}]});this.editImageWindow.show()},showSuccessMsg:function(e,d,c){var b=this.getCurrentTranslations();this.fireEvent("info",{title:d||b.Success_text,msg:e})},showErrorMsg:function(e,d,c){var b=this.getCurrentTranslations();Ext.Msg.show({title:d||b.Error_text,msg:Ext.util.Format.ellipsis(e,2000),modal:true,icon:c||Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(e).length?360:600});this.fireEvent("error",{title:d||b.Error_text,msg:e})},setContextMenuDisablebFields:function(b,c,d){b.items.each(function(e){if(c.indexOf(e.getId())>-1){e.setDisabled(d)}else{e.setDisabled(!d)}})},onLoginChanged:function(b){this.galleryToolbar.setVisible(b);this.bigImageWindowEditBtn.setVisible(b);this.imagesPanelMenuBtn.setVisible(b)},imagesViewSort:function(c,d,b){if(!this.hasPermissions()){return}if(c==d){return}Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcSortImagesMethodName,method:"POST",params:Ext.util.JSON.encode({imageId:b.data.id,oldPosition:b.data.Merit,delta:(d-c),galleryId:b.data.IDGallery,Lang:Manager.getCurrentLang()}),success:function(g,i){var f=Ext.decode(g.responseText);var e=f;if(e&&e.success){var h=this.getCurrentTranslations();this.galleryTreeClick(this.galleryTree.getSelectionModel().getSelectedNode(),null);this.showSuccessMsg(h.ImagesMovedSuccessfully_text)}else{var h=this.getCurrentTranslations();this.imagesView.store.sort("Merit","ASC");var j=(e)?'<p style="font-weight:700">'+h.ImagesCouldNotBeMoved_text+"</p><br>"+e.dbOperationError:'<p style="font-weight:700">'+h.ImagesCouldNotBeMoved_text+"</p><br>";this.showErrorMsg(j)}},failure:function(e,g){var f=this.getCurrentTranslations();this.imagesView.store.sort("Merit","ASC");this.showErrorMsg('<p style="font-weight:700">'+f.ImagesCouldNotBeMoved_text+"</p><p>"+f.PleaseTryAgain_text+"</p>")}})},moveImages:function(c,d,g,b,f){if(!this.hasPermissions()){return}Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcMoveImagesMethodName,method:"POST",params:Ext.util.JSON.encode({imageId:c,galleryId:g.id,Lang:Manager.getCurrentLang()}),success:function(j,l){var h=Ext.decode(j.responseText);var e=h;if(e&&e.success){for(var m=0;m<c.length;m++){this.imagesView.store.remove(this.imagesView.store.getById(c[m]))}var k=this.getCurrentTranslations();this.showSuccessMsg("Images moved successfully")}else{var k=this.getCurrentTranslations();var n=(e)?'<p style="font-weight:700">'+k.ImagesCouldNotBeMoved_text+"</p><br>"+e.dbOperationError:'<p style="font-weight:700">'+k.ImagesCouldNotBeMoved_text+"</p><br>";this.showErrorMsg(n)}},failure:function(e,i){var h=this.getCurrentTranslations();this.showErrorMsg('<p style="font-weight:700">'+h.ImagesCouldNotBeMoved_text+"</p><p>"+h.PleaseTryAgain_text+"</p>")}})},galleryTreeSort:function(c,g,e,f,b){if(!this.hasPermissions()){return}var d=this.url+"/"+this.svcReorderGalleryMethodName;var h=Ext.encode({galleryId:g.id,oldPosition:c.treeNodeOldPosition,delta:(b-c.treeNodeOldPosition),Lang:Manager.getCurrentLang()});c.disable();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({url:d,params:h,method:"POST",scope:this,success:function(k,l){var j=Ext.decode(k.responseText);var i=j;if(i&&i.success){c.getLoader().load(c.getRootNode());c.enable()}else{l.failure(k,l)}},failure:function(i,k){var j=this.getCurrentTranslations();c.suspendEvents();e.appendChild(g);if(c.treeNodeOldNextSibling){e.insertBefore(g,c.treeNodeOldNextSibling)}c.resumeEvents();c.enable();c.ownerCt.showErrorMsg('<p style="font-weight:700">'+j.ChangesCouldNotBeSaved_text+"</p><p>"+j.PleaseTryAgain_text+"</p>")}})},getImageWidth:function(d){var b,e;if(document.layers){var c=getImage(d);return c.width}else{return d.width}return -1},getImageHeight:function(c){var e,d;if(document.layers){var b=getImage(c);return b.height}else{return c.height}return -1},getResizeImageSize:function(d){var e={};var c=d.width;var b=d.height;if((c<this.canvasWidth)&&(b<this.canvasHeight)){return{width:c,height:b}}if((c/b)>=(this.canvasWidth/this.canvasHeight)){e.width=this.canvasWidth;e.height=(b*this.canvasWidth/c)}else{e.width=(c*this.canvasHeight/b);e.height=this.canvasHeight}d.width=e.width;d.height=e.height;return e},hasPermissions:function(){return SessionData.isMemberOf("Admins")},getCurrentTranslations:function(){var b=ExtPortal.ImagesGallery.translations;if(!b){b=ExtPortal.ImagesGallery.referenceTranslations}return b},lastEditedItem:null,fireLastEditedItemEvent:function(d,e){var b=1;if(this.lastEditedItem&&this.descriptiveRecordProperty){var c={dataItem:this.lastEditedItem,formClass:this.formClass,descriptiveRecordProperty:this.descriptiveRecordProperty};ExtPortal.ImagesGallery.fireEvent("endedit",{editItem:this.lastEditedItem,callback:e})}}});ExtPortal.ImagesGallery.referenceTranslations={Images_titleText:"Images",btnDeleteGallery_buttonText:"Delete Gallery",btnEditGallery_buttonText:"Edit Gallery",btnAddGallery_buttonText:"Add Gallery",Loading_text:"<b> loading... </b>",bigImageWindowEditBtn_buttonText:"Edit",Preview_buttonText:"Prev",Next_buttonText:"Next",btnDeleteSelected_buttonText:"Delete Image",btnViewBigImage_buttonText:"View Image",btnAddNewImage_buttonText:"Add new Image",btnEditImage_buttonText:"Edit Image",NoImages_text:"No images to display.",PleaseSelect_text:"<br> &nbsp;&nbsp; Please select a gallery<br> ",Menu_buttonText:"Menu",GalleryMenu_buttonText:"Menu",ConfirmTitle_text:"Confirm",ConfirmDeleteGallery_text:"Are you sure you want to delete gallery?",ConfirmDeleteImage_text:"Are you sure you want to delete image?",txtGalleryID_fieldLabel:"Gallery",txtGalleryDescription_fieldLabel:"Description",txtGalleryID_fieldLabel:"Gallery",txtGalleryName_fieldLabel:"Name",GalleryEditedSuccessfully:"Gallery edited successfully",GalleryCouldNotBeEdited_text:" The gallery could not be edited.",TheFollowingError:"The following error occurred:",btnGalleryCancelEdit_buttonText:"Cancel",btnGallerySave_buttonText:"Save",GalleryCouldNotBeCreated_text:"The gallery could not be created.",GalleryCreatedSuccesfully:"Gallery created successfully",GalleryCouldNotBeRenamed_text:"The Gallery Could Not Be Renamed",PleaseTryAgain_text:"Please Try Again",GalleryRenamedSuccesfully:"Gallery renamed successfully",GalleryCouldNotBeDeleted_text:"The gallery could not be deleted.",GalleryDeletedSuccessfully:"Gallery deleted successfully",NewNode_text:"New Album",ImageDeleteSuccessfully_text:"Image deleted successfully",ImageCouldNotBeDeleted_text:"The image could not be deleted.",txtImage_GalleryID_fieldLabel:"Gallery",ImageFileUpload_emptyText:"Select an image",ImageFileUpload_fieldLabel:"Photo",addImageForm_waitMsg:"Uploading your image...",ImageCouldNotBeUploaded_text:"The image could not be uploaded",addImageWindow_titleText:"Upload Image",txtImageId_fieldLabel:"Id",txtImageName_fieldLabel:"Name",taImageDescription_fieldLabel:"Description",fieldsetImage_titleText:"Image:",fieldsetImage_fieldLabel:"image",ImageCouldNotBeEdited_text:"The image could not be edited.",CancelEditImage_buttonText:"Cancel",SaveEditImage_butttonText:"Save",ImagesMovedSuccessfully_text:"Images moved successfully",ImagesCouldNotBeMoved_text:"The images could not be moved.",ChangesCouldNotBeSaved_text:"Your changes could not be saved! ",txtLang_fieldLabel:"Lang",Error_text:"Error",Success_text:"Success"};Ext.apply(ExtPortal.ImagesGallery,new Ext.util.Observable());ExtPortal.ImagesGallery.addEvents("langChange");Ext.reg("imagesgallery",ExtPortal.ImagesGallery);ExtPortal.ImagesGallery.addEvents("info","error","endedit","langChange");if((window.location.href.indexOf("admin")>-1)){ExtPortal.ImagesGallery.on("info",showInfo);ExtPortal.ImagesGallery.on("error",showError)}Ext.ns("ExtPortal");ExtPortal.WCFFormPanel=Ext.extend(Ext.form.FormPanel,{url:"Test.svc",svcSubmitMethodName:"formtest",svcLoadMethodName:"loadtest",method:"POST",standardSubmit:false,dataUpdateMode:false,referenceDataItem:null,parentWin:null,loadResult:null,dataItemLoadMask:null,isShown:false,setIsShown:function(){this.isShown=true},masterValueData:null,masterValues:null,loadedStoreItemArray:[],storeItems:[],isLayoutComplete:false,listeners:{afterlayout:{single:true,fn:function(){this.isLayoutComplete=true;if(this.masterValues){for(var b in this.masterValues){this.setMasterValue(b,this.masterValues[b])}}}}},initComponent:function(){var b=this.getTranslations();this.insertTitle=b.InsertTitle;this.updateTitle=b.UpdateTitle;ExtPortal.WCFFormPanel.superclass.initComponent.call(this);this.addEvents("beforeDataItemLoad");this.addEvents("afterSetValues");this.addEvents("afterError");this.addEvents("resetToNewItem","info","error")},setParentWindow:function(b){this.parentWin=b},submit:function(){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.getForm().isValid()){this.showLoadMask(b.sendingMask);Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcSubmitMethodName,method:"POST",params:Ext.util.JSON.encode({updateMode:this.dataUpdateMode,data:this.getForm().getValues()}),success:function(d,e){var c=Ext.decode(d.responseText);var f;if(c.success){this.doSetValues(c.dataItem);this.onSuccess()}else{if(c.dbOperationError!=null&&c.dbOperationError!=""){f='<p style="font-weight:700">'+b.formMightNotSubmit+"</p><p>"+b.followingErrorOccurred+"</p><br>"+c.dbOperationError;this.showError(f)}else{f=b.formNotSubmitted;this.fireEvent("error",{title:b.error,msg:f});this.getForm().markInvalid(c.errors);this.fireEvent("afterError",c.errors)}}this.hideLoadMask()},failure:function(c,d){var e='<p style="font-weight:700">'+b.formCouldNotBeSent+"</p><p>"+b.pleaseTryAgain+"</p>";this.showError(e);this.hideLoadMask()}})}},load:function(){if(this.referenceDataItem!=null){Ext.lib.Ajax.defaultPostHeader="application/json";this.showLoadMask();Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcLoadMethodName,method:"POST",params:Ext.util.JSON.encode({dataItem:this.referenceDataItem}),success:function(c,d){var b=(c.responseText!=""?Ext.decode(c.responseText):null);if(b){if(this.parentWin){this.parentWin.setTitle(this.updateTitle)}this.doSetValues(b)}else{this.onLoadFailure(c,d)}},failure:this.onLoadFailure})}else{this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}}return true},doSetValues:function(b){var c=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.fireEvent("beforeDataItemLoad",b)!==false){this.loadResult=b;this.actualSetValues()}else{if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}var d="<p>"+c.unableToLoadItem+"</p>"+c.willWorkInInsertMode;this.showError(d);this.hideLoadMask()}},actualSetValues:function(){if(this.isLayoutComplete&&this.dataItemLoadReady()){this.getForm().setValues(this.loadResult);this.dataUpdateMode=true;this.fireEvent("afterSetValues",this.loadResult);this.hideLoadMask()}else{var b=this;setTimeout(function(){b.actualSetValues()},100)}},dataItemLoadReady:function(){return true},showLoadMask:function(c){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.dataItemLoadMask){this.dataItemLoadMask.hide()}this.dataItemLoadMask=new Ext.LoadMask(this.parentWin.body,{msg:(c?c:b.loadingMask)});this.dataItemLoadMask.show()},hideLoadMask:function(){if(this.dataItemLoadMask){this.dataItemLoadMask.hide()}},onSuccess:function(c,d){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);var e=b.formSubmittedSuccessfully;this.fireEvent("info",{title:b.success,msg:e});this.dataUpdateMode=true;if(this.parentWin){this.parentWin.setTitle(this.updateTitle)}},onLoadFailure:function(c,f){var e=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);var h=false;var d;if(c){if(c.responseText){var b=Ext.util.JSON.decode(c.responseText);var g=b.ErrorCode;if(g){if(g>1){d=String.format("<b>{0}</b></p><p><b><i>{1}</i></b> {2}</p><p><b><i>{3}</i></b> {4}</p><p><b><i>{5}</i></b> {6}</p>",e.couldNotLoadData,e.errorCode,b.ErrorCode,e.exceptionMessage,b.FaultMessage,e.exceptionLocation,b.Location)}else{d=String.format("<b>{0}</b>",e.accessDenied);h=true}}else{d=String.format("<b>{0}</b></p><p>{1}</p>",e.couldNotLoadData,c.responseText)}}else{if(c.status==200){d=String.format("<b>{0}</b></p>",e.doesNotExist)}else{d=String.format("<b>{0}</b></p>",e.noTimelyServerResponse)}}d=String.format("<p><b>{0}</b> {1}",e.details,d)}else{d=""}if(!h){this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(this.insertTitle)}this.showError(String.format("<p><b>{0}</b></p><p>{1}</p>{2}",e.unableToLoadItem,e.willWorkInInsertMode,d));this.hideLoadMask()}else{this.showError(e.accessDenied+" "+e.unableToLoadItem,e.accessDenied);this.close()}},showError:function(e,d){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);if(this.isShown){d=d||b.error;Ext.Msg.show({title:d,msg:e,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});this.fireEvent("error",{title:d,msg:e})}else{var c=this;setTimeout(function(){c.showError(e,d)},100)}},onRender:function(){ExtPortal.WCFFormPanel.superclass.onRender.apply(this,arguments);this.getForm().waitMsgTarget=this.getEl()},setMasterValue:function(c,d){if(this.masterValueData&&this.masterValueData[c]!==undefined){this.masterValueData[c]=d;var b=this.getForm().findField(c);if(b){b.setValue(d);b.hideContainer()}}},clearMasterValue:function(c){if(this.masterValueData&&this.masterValueData[c]!==undefined){this.masterValueData[c]=null;if(this.masterValueData[c]!==undefined){this.masterValueData[c].value=val;var b=this.getForm().findField(c);if(b){b.setValue(null);b.showContainer()}}}},close:function(){if(this.parentWin){if(this.isShown){this.parentWin.close();this.parentWin.destroy()}else{var b=this;setTimeout(function(){b.close()},100)}}else{this.destroy()}},resetToNewItem:function(){var b=ExtPortal.WCFFormPanel.prototype.getTranslations.call(this);this.getForm().reset();if(this.masterValueData){for(var c in this.masterValueData){if(this.masterValueData[c]&&typeof this.masterValueData[c]!="function"){this.setMasterValue(c,this.masterValueData[c],true)}}}this.dataUpdateMode=false;if(this.parentWin){this.parentWin.setTitle(b.InsertTitle)}if(this.buttons[0]!=null){this.buttons[0].setText(b.Submit_buttonText)}this.fireEvent("resetToNewItem")},getTranslations:function(){var b=ExtPortal.WCFFormPanel.translations;if(!b){b=ExtPortal.WCFFormPanel.referenceTranslations}return b},langChange:function(){var b=this.getTranslations();this.updateTitle.setTitle(b.UpdateTitle);this.insertTitle.setTitle(b.UpdateTitle)}});Ext.apply(ExtPortal.WCFFormPanel,new Ext.util.Observable());ExtPortal.WCFFormPanel.addEvents("langChange");ExtPortal.WCFFormPanel.referenceTranslations={InsertTitle:"Insert new item",UpdateTitle:"Update item",Submit_buttonText:"Submit",Update_buttonText:"Update",Close_buttonText:"Close",sendingMask:"Sending...",loadingMask:"Loading...",formMightNotSubmit:"Este posibil ca formularul sa nu fi ajuns la server.",followingErrorOccurred:"A aparut urmatoarea eroare:",formNotSubmitted:"Formularul nu a putut fi salvat datorita unor date incorecte.",formCouldNotBeSent:"Formularul nu a ajuns la server.",formSubmittedSuccessfully:"Datele au fost trimise cu succes",pleaseTryAgain:"Please try again",unableToLoadItem:"Unable to load the update item.",willWorkInInsertMode:"The form will work in insert mode.",couldNotLoadData:"Could not load data.",errorCode:"Error code:",exceptionMessage:"Message:",exceptionLocation:"Location:",doesNotExist:"Requested item doesn't exist.",noTimelyServerResponse:"The server did not respond in time.",details:"Details:",accessDenied:"Access Denied.",error:"Error",success:"Success"};ExtPortal.WCFFormPanel.getTranslation=function(c){var b=ExtPortal.WCFFormPanel.translations;if(!b){b=ExtPortal.WCFFormPanel.referenceTranslations}return b[c]};Ext.ns("ExtPortal");ExtPortal.WCFLoginPanel=Ext.extend(Ext.form.FormPanel,{labelWidth:80,width:450,height:200,url:"/services/ExtPortal/LoginService.svc",svcLoadMethodName:"loadlogin",svcSubmitMethodName:"submitlogin",frame:true,defaultType:"textfield",monitorValid:true,Seed:null,Challenge:null,DoubleEncrypt:null,SessionId:null,getTranslations:function(){var b=ExtPortal.WCFLoginPanel.translations;if(!b){b=ExtPortal.WCFLoginPanel.referenceTranslations}return b},initComponent:function(){this.LanguagesStore=new Ext.data.JsonStore({fields:["IDLanguage","LanguageName","LangStatus","Lang","Flag"],autoLoad:true,root:"Languages",baseParams:{start:0,limit:0},proxy:new Ext.data.WCFProxy({url:"/services/ExtPortal/ExtPortalManager.svc/LoadMainData",method:"POST"}),listeners:{load:{fn:function(){var d=Ext.getCmp("LanguagesCombo");var c=(d)?d.getValue():Manager.getCurrentLang();this.LanguagesCombo.setValue(c);if(c!=Manager.getCurrentLang()){ExtPortal.Translator.performTranslation(c)}},scope:this}}});this.LanguagesCombo=new Ext.ux.IconCombo({fieldLabel:"Language",hideLabel:true,valueField:"Lang",displayField:"Lang",iconClsField:"Flag",triggerAction:"all",mode:"local",forceSelection:true,selectOnFocus:true,border:false,width:62,height:10,style:"background:transparent;font-size:10px; border:none;",store:this.LanguagesStore,listeners:{select:function(f,c,d){if(c.data.Lang!=Manager.getCurrentLang()){if(Manager){Manager.fireLanguageChanged(c.data.Lang)}ExtPortal.Translator.performTranslation(c.data.Lang);var e=Ext.getCmp("LanguagesCombo");e.setValue(c.data.Lang)}}}});var b=this.getTranslations();ExtPortal.WCFLoginPanel.on("langChange",this.langChange,this);this.addEvents("logincomplete");this.tbUser=new Ext.form.TextField({name:"loginUsername",id:"loginUsername",fieldLabel:b.User_fieldLabel,allowBlank:false});this.tbPassword=new Ext.form.TextField({name:"loginPassword",fieldLabel:b.Password_fieldLabel,allowBlank:false,inputType:"password"});this.btnLogin=new Ext.Button({text:b.Login_fieldLabel,formBind:true,scope:this,handler:function(){this.showLoadMask();this.doLogin()}});this.btnNewAccount=new Ext.Button({text:b.NewAccount_fieldLabel,scope:this,handler:function(){var c=new ExtPortal.WindowFormController(ExtPortal.RegistrationForm);c.show(this.getEl())}});this.btnRecoverPassword=new Ext.Button({text:b.RecoverPassword_fieldLabel,scope:this,handler:function(){var c=new ExtPortal.WindowFormController(ExtPortal.PasswordRecoveryForm);c.show(this.getEl())}});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[this.tbUser,this.tbPassword],buttons:[this.LanguagesCombo,this.btnLogin,this.btnNewAccount,this.btnRecoverPassword]});ExtPortal.WCFLoginPanel.superclass.initComponent.call(this,arguments)},doLogin:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcLoadMethodName,method:"POST",params:Ext.util.JSON.encode({}),success:function(c,d){var b=Ext.util.JSON.decode(c.responseText);if(b){this.Seed=b.Seed;this.Challenge=b.Challenge;this.DoubleEncrypt=b.DoubleEncrypt;this.EntryId=b.EntryId;this.sendLoginData()}else{this.doLoginFailed()}},failure:function(b,c){this.doLoginFailed(b,c)}})},doLoginFailed:function(b,d){var c=this.getTranslations();this.hideLoadMask();this.showError('<p style="font-weight:700">'+c.AuthFailed+"</p><p>"+c.Retry+"</p>");this.getForm().reset()},crypt:function(b){if(this.DoubleEncrypt){return Ext.ux.Crypto.SHA1.hash(Ext.ux.Crypto.SHA1.hash(b+this.Seed)+this.Challenge)}else{return Ext.ux.Crypto.SHA1.hash(b+this.Challenge)}},sendLoginData:function(){var b=this.getTranslations();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcSubmitMethodName,method:"POST",params:Ext.util.JSON.encode({data:{LoginUsername:this.getForm().getValues().loginUsername,LoginPassword:this.crypt(this.getForm().getValues().loginPassword),EntryId:this.EntryId}}),success:function(d,e){this.hideLoadMask();var c=Ext.decode(d.responseText);if(c.success){SessionData.login(c.dataItem);this.parentWin.close()}else{this.showError('<p style="font-weight:700">'+b.IncorectDetails+"</p><p>"+b.Retry+"</p>")}},failure:function(c,d){alert(c.responseText);this.hideLoadMask();this.showError('<p style="font-weight:700">'+b.IncorectDetails+"</p><p>"+b.Retry+"</p>")}})},showLoadMask:function(){var b=this.getTranslations();if(!this.dataItemLoadMask){this.dataItemLoadMask=new Ext.LoadMask(this.getEl(),{msg:b.Loading})}this.dataItemLoadMask.show()},hideLoadMask:function(){if(this.dataItemLoadMask){this.dataItemLoadMask.hide()}},showError:function(c,b){b=b||"Error";Ext.Msg.show({title:b,msg:c,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,fn:function(){if(this.parentWin){this.parentWin.map.enable()}},scope:this});if(this.parentWin){this.parentWin.map.disable()}},destroy:function(){ExtPortal.WCFLoginPanel.un("langChange",this.langChange,this);ExtPortal.WCFLoginPanel.superclass.destroy.call(this,arguments)},langChange:function(){var b=this.getTranslations();this.tbPassword.setLabel(b.Password_fieldLabel);this.tbUser.setLabel(b.User_fieldLabel);this.btnLogin.setText(b.Login_fieldLabel);this.btnNewAccount.setText(b.NewAccount_fieldLabel);this.btnRecoverPassword.setText(b.RecoverPassword_fieldLabel)}});ExtPortal.WCFLoginPanel.referenceTranslations={Password_fieldLabel:"Password",User_fieldLabel:"User",Login_fieldLabel:"Login",NewAccount_fieldLabel:"Create New Account",RecoverPassword_fieldLabel:"Forgot Password",Retry:"Please try again.",AuthFailed:"Authentication failed",IncorectDetails:"Incorrect username or password.",Loading:"Loading..."};Ext.apply(ExtPortal.WCFLoginPanel,new Ext.util.Observable());ExtPortal.WCFLoginPanel.addEvents("langChange");Ext.ns("ExtPortal");ExtPortal.WindowLogin=Ext.extend(Ext.Window,{layout:"fit",closable:false,resizable:false,plain:true,border:false,loginForm:null,getTranslations:function(){var b=ExtPortal.WindowLogin.translations;if(!b){b=ExtPortal.WindowLogin.referenceTranslations}return b},initComponent:function(){var b=this.getTranslations();this.title=b.AuthTitle_fieldLabel;Ext.form.Field.prototype.msgTarget="side";this.panelLogin=new ExtPortal.WCFLoginPanel({parentWin:this});this.items=[this.panelLogin];this.on("show",function(){Ext.getCmp("loginUsername").focus("",10)},this);this.map=new Ext.KeyMap(document,{key:13,scope:this,fn:function(){if(this.panelLogin.getForm().isValid()){this.panelLogin.showLoadMask();this.panelLogin.doLogin()}}});this.on("close",function(){this.map.disable()},this);ExtPortal.WindowLogin.superclass.initComponent.call(this);ExtPortal.WindowLogin.on("langChange",this.langChange,this)},destroy:function(){ExtPortal.WindowLogin.un("langChange",this.langChange,this);ExtPortal.WindowLogin.superclass.destroy.call(this,arguments)},langChange:function(){var b=this.getTranslations();this.setTitle(b.AuthTitle_fieldLabel)}});ExtPortal.WindowLogin.referenceTranslations={AuthTitle_fieldLabel:"Please Login"};Ext.apply(ExtPortal.WindowLogin,new Ext.util.Observable());ExtPortal.WindowLogin.addEvents("langChange");Ext.ns("ExtPortal");ExtPortal.RegistrationForm=Ext.extend(ExtPortal.WCFFormPanel,{border:false,frame:true,labelWidth:120,url:"/services/ExtPortal/UsersService.svc",svcSubmitMethodName:"UsersPendingSubmit",svcLoadMethodName:"UsersPendingLoad",lblUserId:null,lblTitleUserId:null,getCurrentTranslations:function(){var b=ExtPortal.RegistrationForm.translations;if(!b){b=ExtPortal.RegistrationForm.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();ExtPortal.RegistrationForm.on("langChange",this.langChange,this);this.insertTitle=b.TitleForm_fieldLabel;this.tbAdditionalInformation=new Ext.form.TextField({name:"AdditionalInformation",fieldLabel:b.AdditionalInformation_fieldLabel,allowBlank:true,maxLength:2000});this.dtBirthDate=new Ext.form.DateField({name:"BirthDate",id:"BirthDate",fieldLabel:b.BirthDate_fieldLabel,allowBlank:true,format:"M/d/Y"});this.tbDomainUserName=new Ext.form.TextField({name:"DomainUserName",fieldLabel:b.DomainUserName_fieldLabel,allowBlank:true,maxLength:100});this.tbEmail=new Ext.form.TextField({name:"Email",fieldLabel:b.Email_fieldLabel,allowBlank:false,vtype:"email",maxLength:50});this.tbFax=new Ext.form.TextField({name:"Fax",fieldLabel:b.Fax_fieldLabel,allowBlank:true,maxLength:50});this.tbFirstName=new Ext.form.TextField({name:"FirstName",fieldLabel:b.FirstName_fieldLabel,allowBlank:false,maxLength:50});this.tbLastName=new Ext.form.TextField({name:"LastName",fieldLabel:b.LastName_fieldLabel,allowBlank:false,maxLength:50});this.tbMobile=new Ext.form.TextField({name:"Mobile",fieldLabel:b.Mobile_fieldLabel,allowBlank:true,maxLength:50,plugins:[new Ext.ux.InputTextMask("9999-999-999",false)]});this.tbPassword1=new Ext.form.TextField({id:"Password1",name:"Password1",fieldLabel:b.Password_fieldLabel,inputType:"password",allowBlank:false,vtype:"password",minLength:6,maxLength:30});this.tbPassword=new Ext.form.TextField({name:"ConfirmPassword",fieldLabel:b.ConfirmPassword_fieldLabel,inputType:"password",allowBlank:false,vtype:"password",minLength:6,maxLength:30,initialPassField:"Password1"});this.tbPhone=new Ext.form.TextField({name:"Phone",fieldLabel:b.Phone_fieldLabel,allowBlank:true,maxLength:50,plugins:[new Ext.ux.InputTextMask("9999-999-999",false)]});this.tbUserName=new Ext.form.TextField({name:"UserName",fieldLabel:b.UserName_fieldLabel,allowBlank:false,maxLength:50});this.lblUserId=new Ext.form.Label({cls:"x-form-item x-form-item-label"});this.lblTitleUserId=new Ext.form.Label({cls:"x-form-item x-form-item-label",width:120,hidden:true,text:b.UserId_fieldLabel});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[{name:"UserId",xtype:"hidden"},{xtype:"fieldset",layout:"table",style:"padding: 0px; padding-top:4px;",autoHeight:true,border:false,layoutConfig:{columns:2},items:[this.lblTitleUserId,this.lblUserId]},this.tbUserName,this.tbDomainUserName,{name:"Password",id:"Password",xtype:"hidden"},this.tbPassword1,this.tbPassword,this.tbFirstName,this.tbLastName,this.dtBirthDate,this.tbAdditionalInformation,this.tbEmail,this.tbFax,this.tbMobile,this.tbPhone],buttons:[{text:ExtPortal.WCFFormPanel.getTranslation("Submit_buttonText"),formBind:true,scope:this,handler:this.submit},{text:ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"),scope:this,handler:this.close}]});ExtPortal.RegistrationForm.superclass.initComponent.apply(this,arguments);this.on("afterError",function(d){var c=this.getCurrentTranslations();Ext.each(d,function(e){if(e.id=="UserId"){this.showError(c.UserError);return false}return true},this)},this)},submit:function(){var b=this.getCurrentTranslations();this.showLoadMask("Se proceseaza...");if(this.getForm().isValid()){if(typeof(RSA_M)!="undefined"&&typeof(RSA_E)!="undefined"){rsa=new RSAKey();rsa.setPublic(RSA_M,RSA_E);var d=this.getForm().findField("Password1").getValue();var c=rsa.encrypt(d);this.getForm().findField("Password").setValue(c);ExtPortal.RegistrationForm.superclass.submit.apply(this,arguments)}else{this.showError("<b>"+b.KeyUndefined+"</b>"+b.NoCrypt)}}},onSuccess:function(c,d){var b=this.getCurrentTranslations();Ext.Msg.show({title:b.Success,msg:b.RegistrationSuccess,icon:Ext.Msg.INFO,buttons:Ext.Msg.OK});if(this.parentWin){this.parentWin.close()}else{this.destroy()}},destroy:function(){ExtPortal.RegistrationForm.un("langChange",this.langChange,this);ExtPortal.RegistrationForm.superclass.destroy.call(this,arguments)},langChange:function(){var b=ExtPortal.RegistrationForm.translations;if(!b){b=ExtPortal.RegistrationForm.referenceTranslations}this.tbAdditionalInformation.setLabel(b.AdditionalInformation_fieldLabel);this.dtBirthDate.setLabel(b.BirthDate_fieldLabel);this.tbDomainUserName.setLabel(b.DomainUserName_fieldLabel);this.tbEmail.setLabel(b.Email_fieldLabel);this.tbFax.setLabel(b.Fax_fieldLabel);this.tbFirstName.setLabel(b.FirstName_fieldLabel);this.tbLastName.setLabel(b.LastName_fieldLabel);this.tbMobile.setLabel(b.Mobile_fieldLabel);this.tbPassword.setLabel(b.Password_fieldLabel);this.tbPassword1.setLabel(b.ConfirmPassword_fieldLabel);this.tbPhone.setLabel(b.Phone_fieldLabel);this.lblTitleUserId.setText(b.UserId_fieldLabel);this.tbUserName.setLabel(b.UserName_fieldLabel);this.insertTitle.setTitle(b.TitleForm_fieldLabel);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation(this.dataUpdateMode?"Update_buttonText":"Submit_buttonText"));this.buttons[1].setText(ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"))}});ExtPortal.RegistrationForm.getStores=function(){return[]};ExtPortal.RegistrationForm.winWidth=500;ExtPortal.RegistrationForm.winHeight=400;ExtPortal.RegistrationForm.referenceTranslations={AdditionalInformation_fieldLabel:"Additional Information",BirthDate_fieldLabel:"Birth Date",DomainUserName_fieldLabel:"Domain User Name",Email_fieldLabel:"Email",Fax_fieldLabel:"Fax",FirstName_fieldLabel:"First Name",LastName_fieldLabel:"Last Name",Mobile_fieldLabel:"Mobile",Password_fieldLabel:"Password",ConfirmPassword_fieldLabel:"Confirm Password",Phone_fieldLabel:"Phone",UserId_fieldLabel:"User Id",UserName_fieldLabel:"User Name",TitleForm_fieldLabel:"Registration Form",RegistrationSuccess:"Registration successful. The account should be approved by the Administrator. You will receive a mail confirmation.",UserError:"Invalid value for User Id",KeyUndefined:"Public key is not defined.",NoCrypt:"Cannot encrypt passwords.",Success:"Success"};Ext.apply(ExtPortal.RegistrationForm,new Ext.util.Observable());ExtPortal.RegistrationForm.addEvents("langChange");Ext.ns("ExtPortal");ExtPortal.PasswordRecoveryForm=Ext.extend(ExtPortal.WCFFormPanel,{border:false,frame:true,labelWidth:100,url:"/services/ExtPortal/LoginService.svc",svcSubmitMethodName:"PasswordRecovery",svcLoadMethodName:"fake",getCurrentTranslations:function(){var b=ExtPortal.PasswordRecoveryForm.translations;if(!b){b=ExtPortal.PasswordRecoveryForm.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();ExtPortal.PasswordRecoveryForm.on("langChange",this.langChange,this);this.insertTitle=b.InsertTitle_fieldLabel,this.lblUserId=new Ext.form.Label({cls:"x-form-item x-form-item-label"});this.tbEmail=new Ext.form.TextField({fieldLabel:b.Email_fieldLabel,name:"email",vtype:"email",allowBlank:false});this.tbNote=new Ext.form.FieldSet({title:b.Title_fieldLabel,autoHeight:true,html:b.HTML_fieldLabel});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[this.tbNote,this.tbEmail],buttons:[{text:ExtPortal.WCFFormPanel.getTranslation("Submit_buttonText"),formBind:true,scope:this,handler:this.submit},{text:ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"),scope:this,handler:this.close}]});ExtPortal.PasswordRecoveryForm.superclass.initComponent.apply(this,arguments)},onSuccess:function(c,d){var b=this.getCurrentTranslations();Ext.Msg.show({title:b.MessageTitle,msg:"<b>"+b.PasswordSent+"</b>",icon:Ext.Msg.INFO,buttons:Ext.Msg.OK});if(this.parentWin){this.parentWin.close()}else{this.destroy()}},destroy:function(){ExtPortal.PasswordRecoveryForm.un("langChange",this.langChange,this);ExtPortal.PasswordRecoveryForm.superclass.destroy.call(this,arguments)},langChange:function(){var b=this.getCurrentTranslations();this.tbTitle.setLabel(b.CityName_fieldLabel);this.tbNote.setLabel(b.County_fieldLabel);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation(this.dataUpdateMode?"Update_buttonText":"Submit_buttonText"));this.buttons[1].setText(ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"))}});ExtPortal.PasswordRecoveryForm.getStores=function(){return[]};ExtPortal.PasswordRecoveryForm.winWidth=450;ExtPortal.PasswordRecoveryForm.winHeight=200;ExtPortal.PasswordRecoveryForm.referenceTranslations={Email_fieldLabel:"Email",HTML_fieldLabel:"Note: You must enter the email address associated with your account.",Title_fieldLabel:"Email Address",InsertTitle_fieldLabel:"Password Recovery",MessageTitle:"Success",PasswordSent:"The password was emailed successfully"};Ext.apply(ExtPortal.PasswordRecoveryForm,new Ext.util.Observable());ExtPortal.PasswordRecoveryForm.addEvents("langChange");Ext.ns("ExtPortal");SessionData=function(){var d="";var c=false;var b=Ext.apply(new Ext.util.Observable,{isLoggedIn:false});b.addEvents("login");b.addEvents("logout");b.addEvents("initComplete");b.addEvents("langChange");this.sessionData={};b=Ext.apply(b,{TimeLastRequest:null,timeout:0,CloseSessionHandle:null,CurrentPage:0,init:function(){b.on("langChange",b.langChange,this);this.sessionData={};Ext.Ajax.on("beforerequest",this.beforeRequest,this);var e=this.getCookie("sessionId");if(e){this.TimeLastRequest=new Date();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:"/services/ExtPortal/LoginService.svc/loadSessionData",method:"POST",params:Ext.util.JSON.encode({sessionId:e}),success:this.loadSessionDataCallback,failure:this.closeSession})}else{this.fireEvent("initComplete")}},loadSessionDataCallback:function(f,g){var e=Ext.util.JSON.decode(f.responseText);if(e.success){this.login(e.dataItem)}else{this.closeSession()}this.fireEvent("initComplete")},baseParams:function(){return(SessionData.isLoggedIn?{SessionId:this.sessionData.SessionId}:null)},refreshCloseSessionHandle:function(){if(this.CloseSessionHandle){clearTimeout(this.CloseSessionHandle)}this.CloseSessionHandle=setTimeout(function(){SessionData.closeSession()},this.getTimeoutPeriod()*1000)},login:function(i){var f=this.getTranslations();SessionData.isLoggedIn=true;this.sessionData=i;if(this.getTimeoutPeriod()>0){this.timeout=new Date(this.TimeLastRequest.getTime()+(this.getTimeoutPeriod()*1000));this.refreshCloseSessionHandle()}else{this.timeout=null}Ext.Ajax.on("requestexception",this.requestException,this);Ext.Ajax.on("requestcomplete",this.requestComplete,this);var e=Ext.getCmp("loginButton");if(e){e.setText(f.LogOff_buttonText)}var g=Ext.getCmp("LoginMessage");var h=SessionData.getUserFullName();h+="["+SessionData.getUserGroups().join(",")+"]";if(g){g.setText(h)}this.setCookie("sessionId",this.sessionData.SessionId,this.timeout,this.sessionData.CookiePath,this.sessionData.CookieDomain,this.sessionData.CookieSecure);this.fireEvent("login")},getSessionId:function(){return SessionData.isLoggedIn?this.sessionData.SessionId:null},getUserGroups:function(){return SessionData.isLoggedIn?this.sessionData.UserGroups:null},getUserFullName:function(){return SessionData.isLoggedIn?(this.sessionData.FirstName+" "+this.sessionData.LastName):""},getUserId:function(){return SessionData.isLoggedIn?(this.sessionData.UserId):""},isMemberOf:function(g){if(SessionData.isLoggedIn){var e=false;if(this.sessionData.UserGroups&&this.sessionData.UserGroups.length>0){for(var f=0;f<this.sessionData.UserGroups.length;f++){if(this.sessionData.UserGroups[f]==g){e=true;break}}}return e}return false},closeSession:function(){var f=this.getTranslations();if(this.CloseSessionHandle){clearTimeout(this.CloseSessionHandle)}var e=Ext.getCmp("loginButton");if(e){e.setText(f.Login_buttonText)}var g=Ext.getCmp("LoginMessage");if(g){g.setText(f.NotLoggedIn)}this.sessionData=null;SessionData.isLoggedIn=false;this.TimeLastRequest=0;Ext.Ajax.un("requestexception",this.requestException,this);Ext.Ajax.un("requestcomplete",this.requestComplete,this);this.deleteCookie("sessionId");this.fireEvent("logout")},setCookie:function(g,i,e,k,h,j){var f=g+"="+escape(i)+((e)?"; expires="+e.toGMTString():"")+((k)?"; path="+k:"")+((h)?"; domain="+h:"")+((j)?"; secure":"");document.cookie=f;this.cookieDomain=h;this.cookiePath=k;this.cookieSecure=j},getCookie:function(g){var f=document.cookie;var i=g+"=";var h=f.indexOf("; "+i);if(h==-1){h=f.indexOf(i);if(h!=0){return null}}else{h+=2}var e=document.cookie.indexOf(";",h);if(e==-1){e=f.length}return unescape(f.substring(h+i.length,e))},deleteCookie:function(e){if(this.getCookie(e)){document.cookie=e+"="+((this.cookiePath)?"; path="+this.cookiePath:"")+((this.cookieDomain)?"; domain="+this.cookieDomain:"")+((this.cookieSecure)?"; secure":"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}},showLogin:function(){var e=Ext.getCmp("loginButton");if(!e||(e&&!e.disabled)){if(e){e.disable()}var f=new ExtPortal.WindowLogin({width:400,height:170,closable:((window.location.href.indexOf("admin")>-1)?false:true),resizable:false,plain:true,border:false,modal:true,loginButton:e,listeners:{beforeclose:{fn:function(){if(e){e.enable()}},scope:this}}});f.show(e?e.getEl():null)}},beforeRequest:function(i,g){var f=new Date();if(SessionData.isLoggedIn){var k={};var e=false;if(g.params){switch(g.method){case"GET":k=g.params;break;case"POST":k=Ext.util.JSON.decode(g.params);break;default:try{k=Ext.util.JSON.decode(g.params)}catch(h){k=g.params;e=true}break}}if(!e){k.sessionId=SessionData.getSessionId();switch(g.method){case"GET":g.params=k;break;case"POST":if(g.isUpload==true){g.params=k}else{g.params=Ext.util.JSON.encode(k)}break;default:try{if(g.isUpload==true){g.params=k}else{g.params=Ext.util.JSON.encode(k)}}catch(h){g.params=k}break}}else{k.sessionId=SessionData.getSessionId();try{if(g.isUpload==true){g.params=k}else{g.params=Ext.util.JSON.encode(k)}}catch(h){g.params=k}}var j=SessionData.getTimeoutPeriod();if(j!=0){if((SessionData.TimeLastRequest!=0)&&(f.getElapsed(SessionData.TimeLastRequest)>SessionData.getTimeoutPeriod()*1000)){SessionData.closeSession()}else{this.refreshCloseSessionHandle()}}}SessionData.TimeLastRequest=f},requestException:function(g,e,f){if(e.status!=-1){var h=Ext.util.JSON.decode(e.responseText);if(h&&h.ErrorCode==0){SessionData.closeSession()}}},requestComplete:function(g,e,f){var h=null;if(e.responseText){h=Ext.util.JSON.decode(e.responseText)}if(h&&h.SessionOK!==undefined){if(h.SessionOK){if(this.getTimeoutPeriod()>0){this.timeout=new Date(this.TimeLastRequest.getTime()+(this.getTimeoutPeriod()*1000));this.setCookie("sessionId",this.sessionData.SessionId,this.timeout,this.sessionData.CookiePath,this.sessionData.CookieDomain,this.sessionData.CookieSecure)}}else{this.closeSession()}}},getTimeoutPeriod:function(){return SessionData.isLoggedIn?this.sessionData.TimeoutPeriod:null},logout:function(f){var e=this.getTranslations();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:"/services/ExtPortal/LoginService.svc/logout",method:"POST",params:Ext.util.JSON.encode({SessionData:SessionData.baseParams()}),success:function(h,i){var g=Ext.decode(h.responseText);if(g.success){if(f){f.setText(e.Login_buttonText)}SessionData.closeSession()}else{var j='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(j,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(j).length?360:600})}},failure:function(g,h){var i='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(i,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(i).length?360:600})}})},getTranslations:function(){var e=SessionData.translations;if(!e){e=SessionData.referenceTranslations}return e},langChange:function(){var f=this.getTranslations();var e=Ext.getCmp("loginButton");if(e){if(SessionData.isLoggedIn){e.setText(f.LogOff_buttonText)}else{e.setText(f.Login_buttonText)}}var g=Ext.getCmp("LoginMessage");if(g){var h;if(SessionData.isLoggedIn){h=SessionData.getUserFullName();h+="["+SessionData.getUserGroups().join(",")+"]"}else{h=f.NotLoggedIn}g.setText(h)}}});return b}();Ext.apply(SessionData,new Ext.util.Observable());SessionData.referenceTranslations={Login_buttonText:"Login",LogOff_buttonText:"Log off",NotLoggedIn:"Not Logged In"};ExtPortal.SessionData=SessionData;Ext.ns("ExtPortal");Manager=function(){return Ext.apply(new Ext.util.Observable,{LanguagesStore:null,restrictions:[],ContentTreeOpendTabs:{},ContentTreeExpandedPahts:{},ContentTreeExpandedPahtsInitial:{},CustomComponents:{},init:function(){this.settings=this.settings||ExtPortal.Settings||Settings;this.restrictions=this.restrictions.concat([{compID:"usersNode",parentID:"SettingsTree",groups:["Admins"]},{compID:"143",parentID:"SettingsTree",groups:["Admins"]}]);this.addEvents("langChange");this.currentLang=SessionData.getCookie("Lang")||"RO";Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ExtPortalManager.svc/LoadMainData",method:"POST",params:Ext.util.JSON.encode({Lang:this.getCurrentLang()}),success:function(response,options){var theResult=Ext.decode(response.responseText);this.managerData=theResult;if(this.LanguagesStore){this.LanguagesStore.loadData(theResult)}},failure:function(response,options){var msg='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(msg,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})}});SessionData.on("login",function(){this.applyRestrictions(true);this.filterContent(true)},this);SessionData.on("logout",function(){this.applyRestrictions(false);this.filterContent(false)},this);this.applyRestrictions(true);this.filterContent(Boolean(SessionData.isLoggedIn))},fireLanguageChanged:function(value){this.currentLang=value;var today=new Date();today.setTime(today.getTime());var days=365;var expires_date=new Date(today.getTime()+(1000*60*60*24*days));SessionData.setCookie("Lang",value,expires_date,"/");this.fireEvent("LanguageChanged")},getTokenValues:function(pToken){var pLang,pIsTokenNew,initToken;initToken="";if((!pToken)||pToken.length==0){if((window.location.href.indexOf("#")>-1)&&(window.location.href.lastIndexOf("/")>window.location.href.indexOf("#"))){pToken=window.location.href.substring(window.location.href.lastIndexOf("#")+1,window.location.href.length);pToken=pToken.substring(pToken.indexOf("/")+1,pToken.length);pLang=(window.location.href.indexOf("#")>0)?(window.location.href.substring(window.location.href.indexOf("#")+1,window.location.href.indexOf("#")+3)):null;if(pLang){pLang=pLang.toUpperCase()}}if((!pToken)||pToken.length==0){pToken=(Manager.isAdminPage())?"welcomeTab":"home";if(!pLang){pLang=Manager.getCurrentLang()}}}else{pToken=pToken.substring(pToken.indexOf("/")+1,pToken.length);pLang=(window.location.href.indexOf("#")>0)?(window.location.href.substring(window.location.href.indexOf("#")+1,window.location.href.indexOf("#")+3)):null;if(pLang){pLang=pLang.toUpperCase()}}pIsTokenNew=(Ext.History.oldToken)?(Ext.History.oldToken!==Ext.History.getToken()):true;return{token:pToken,lang:pLang,isTokenNew:pIsTokenNew}},getLanguages:function(){return this.managerData.Languages},isAdminPage:function(){return((window.location.href.indexOf("admin")>-1)?true:false)},addCustomComponent:function(comp,type){if(!this.CustomComponents[type]){this.CustomComponents[type]=[]}this.CustomComponents[type].push(comp);comp.ManagerIndex=this.CustomComponents[type].length-1},removeCustomComponent:function(comp,type){if(!this.CustomComponents[type]){this.CustomComponents[type]=[]}with(this.CustomComponents[type]){delete comp}comp.ManagerIndex=this.CustomComponents[type].length-1},removeAllCustomComponent:function(type){this.CustomComponents[type]=[]},addRestriction:function(compID,groups,type,parentID){this.restrictions.push({compID:compID,groups:groups,type:type,parentID:parentID})},removeRestriction:function(compID,groups,type,parentID){alert("not tested");var index=this.restrictions.indexOf(compID);this.restrictions.splice(index,1)},applyRestrictions:function(show){for(var r=0;r<this.restrictions.length;r++){var restr=this.restrictions[r];if(restr.groups&&(show==true)){var allOK=Manager.hasPermissions(restr.groups);this.setComponentVisible(this.getComponentById(restr),allOK)}else{this.setComponentVisible(this.getComponentById(restr),show)}}},hasPermissions:function(restrictionGroups){restrictionGroups=restrictionGroups||[];var allOK=restrictionGroups.length==0;for(var i=0;i<restrictionGroups.length;i++){if(SessionData.isMemberOf(restrictionGroups[i])){allOK=true}}return allOK},getRestrictions:function(id){var tempRestr=[];for(var r=0;r<this.restrictions.length;r++){var restr=this.restrictions[r];if(restr.compID==id){tempRestr.concat(restr.groups)}}return tempRestr},filterContentTreeOnLogin:function(show){var tmp=this.clone(this.ContentTreeExpandedPahtsInitial);if(this.CustomComponents&&this.CustomComponents.tree){for(var k=0;k<this.CustomComponents.tree.length;k++){if(!this.CustomComponents.tree[k].filterContentTreeNodes){this.CustomComponents.tree[k].getRootNode().reload()}else{}}this.ContentTreeExpandedPahts=tmp;this.rebuildTreeStructure()}},rebuildTreeStructure:function(){for(var id in this.ContentTreeExpandedPahts){if(this.ContentTreeExpandedPahts[id]&&this.ContentTreeExpandedPahts[id].path){this.CustomComponents.tree[this.ContentTreeExpandedPahts[id].treeIndex].expandPath(this.ContentTreeExpandedPahts[id].path)}}},filterContentTabs:function(show){if(show==true){if(this.CustomComponents&&this.CustomComponents.tab){for(var k=0;k<this.CustomComponents.tab.length;k++){var pTab=this.CustomComponents.tab[k];var j=0;while(j<pTab.items.items.length&&pTab.items.items.length>=0){var item=pTab.items.items[j];var allOK=Manager.hasPermissions(item.groups);if(!(allOK==true)){pTab.remove(item)}else{j++}}}}}},filterContent:function(show){if(show==false){this.ContentTreeExpandedPahtsInitial=this.clone(this.ContentTreeExpandedPahts);if(window.location.href.indexOf("default")>-1){Manager.removeAllCustomComponent("tree");Loader.refreshMenuOnLogin();Manager.initCustomEventsForTree()}else{if(this.CustomComponents&&this.CustomComponents.tree){for(var k=0;k<this.CustomComponents.tree.length;k++){var tempRoot=this.CustomComponents.tree[k].getRootNode();tempRoot.collapse()}}}if(this.CustomComponents&&this.CustomComponents.tab){for(var k=0;k<this.CustomComponents.tab.length;k++){var comp=this.CustomComponents.tab[k];comp.setActiveTab(this.CustomComponents.tab[k].items.items[0].id)}}}else{this.filterContentTabs(show);if(window.location.href.indexOf("default")>-1){Manager.removeAllCustomComponent("tree");Loader.refreshMenuOnLogin()}else{this.filterContentTreeOnLogin(show)}}},initCustomEvents:function(){Manager.initCustomEventsForTree();Manager.initCustomEventsForTab()},initCustomEventsForTab:function(){this.CenterTabPanel.on("add",function(pTabPanel,pNewTab,index){this.ContentTreeOpendTabs[pNewTab.id]=pNewTab},this);this.CenterTabPanel.on("remove",function(pTabPanel,pNewTab){delete this.ContentTreeOpendTabs[pNewTab.id]},this)},initCustomEventsForTree:function(){if(this.CustomComponents&&this.CustomComponents.tree){for(var k=0;k<this.CustomComponents.tree.length;k++){var theTree=this.CustomComponents.tree[k];theTree.on("click",function(node){if(this.oldSelectedNode){node.getUI().removeClass("searchItem")}node.getUI().addClass("searchItem");this.oldSelectedNode=node},this);theTree.on("collapsenode",function(node){var path=node.getPath();Manager.ContentTreeExpandedPahts[node.id]="";for(var id in Manager.ContentTreeExpandedPahts){if((this.ContentTreeExpandedPahts[id].path)&&(this.ContentTreeExpandedPahts[id].path.indexOf(path)>-1)){this.ContentTreeExpandedPahts[id]=""}}},this);theTree.on("expandnode",function(node){this.ContentTreeExpandedPahts[node.id]={path:node.getPath(),treeIndex:theTree.ManagerIndex}},this);theTree.getRootNode().on("expand",function(){this.ContentTreeExpandedPahts=this.ContentTreeExpandedPahtsInitial;this.rebuildTreeStructure(true)},this);theTree.getRootNode().on("beforecollapse",function(){this.ContentTreeExpandedPahtsInitial=this.clone(this.ContentTreeExpandedPahts)},this)}}},setComponentVisible:function(comp,visible){if(!comp){return false}if(comp.setVisible){if(comp.targetXY){comp.setVisible(visible)}}else{if(comp.ui){if(visible==true){comp.ui.show()}else{comp.ui.hide()}}else{if(comp.show||comp.hide){if(visible==true){comp.show()}else{comp.hide()}}}}},getComponentById:function(info){var comp=Ext.getCmp(info.compID);var index=0;while((!comp)&&(this.CustomComponents.tab)&&(index<this.CustomComponents.tab.length)){comp=this.CustomComponents.tab[index].findById(info.compID);index++}index=0;while((!comp)&&(this.CustomComponents.tree)&&(index<this.CustomComponents.tree.length)){var tree=this.CustomComponents.tree[index];comp=tree.getRootNode().findChild("id",info.compID);index++}return comp},getCurrentLang:function(){return this.currentLang},loadResource:function(url,onload,cache){url=(cache)?url+"&nocache="+Math.random():url;url=url.split("?").length>1?url:url.replace(/\&/,"?");onload=typeof onload=="function"?onload:function(){};var js;if(url.indexOf(".css")>-1){js=document.createElement("link");js.rel="stylesheet";js.type="text/css";js.href=url}else{js=document.createElement("script");js.type="text/javascript";js.src=url}js.addEventListener&&function(){js.addEventListener("load",onload,false)}();js.onreadystatechange=function(){this.readyState=="complete"&&onload.call()};document.getElementsByTagName("head").item(0).appendChild(js)},getCurrentTranslations:function(){var _tran=Manager.translations;if(!_tran){_tran=Manage.rreferenceTranslations}return _tran},showSuccessMsg:function(msg,title,icon){var _tran=this.getCurrentTranslations();Ext.Msg.show({title:title||_tran.Success_text,msg:Ext.util.Format.ellipsis(msg,2000),icon:icon||Ext.Msg.INFO,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})},showErrorMsg:function(msg,title,icon){var _tran=this.getCurrentTranslations();Ext.Msg.show({title:title||_tran.Error_text,msg:Ext.util.Format.ellipsis(msg,2000),icon:icon||Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})},showQuestionMsg:function(msg,title,callback,scope){var _tran=this.getCurrentTranslations();Ext.Msg.show({title:title||_tran.PleaseConfirm_text,msg:msg,icon:Ext.Msg.QUESTION,buttons:Ext.Msg.YESNO,fn:callback,scope:scope})},clone:function(o){return Ext.util.JSON.decode(Ext.util.JSON.encode(o));if(!o||"object"!==typeof o){return o}if("function"===typeof o.clone){return o.clone()}var c="function"===typeof o.pop?[]:{};var p,v;for(p in o){if(o.hasOwnProperty(p)){v=o[p];if(v&&"object"===typeof v){c[p]=this.clone(v)}else{c[p]=v}}}return c},getNodeByPath:function(path){var node=null;if(this.CustomComponents&&this.CustomComponents.tree){for(var k=0;k<this.CustomComponents.tree.length;k++){if(this.CustomComponents.tree[k].searchNodeByPath){node=this.CustomComponents.tree[k].searchNodeByPath(path,this.CustomComponents.tree[k].getRootNode(),true);if(node){return node}}}}if(this.CustomComponents&&this.CustomComponents.menu){for(var k=0;k<this.CustomComponents.menu.length;k++){if(this.CustomComponents.menu[k].searchNodeByPath){node=this.CustomComponents.menu[k].searchNodeByPath(null,path);if(node){return node}}}}if(!node){this.getNodeFromDB(path,null,true)}},getNodeFromDB:function(pID,callback,getFullPath){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:"/services/ExtPortal/ContentService.svc/GetNodeByPath",method:"POST",params:Ext.util.JSON.encode({node:pID,Lang:Manager.getCurrentLang(),getFullPath:getFullPath}),success:function(response,options){if(!response.responseText||response.responseText.length==0){return}var pNode=Ext.decode(response.responseText);var index=0;if(pNode.PathToExpand.length>0){var id=pNode.PathToExpand.split("/")[1];while(index<this.CustomComponents.tree.length){var curentId=this.CustomComponents.tree[index].getRootNode().id;if(curentId==id){var currentTree=this.CustomComponents.tree[index]}index++}var pathToExpand=pNode.PathToExpand;currentTree.expandPath(pathToExpand,"",function(bSuccess,oLastNode){var currentNode=oLastNode.findChild("id",pNode.id);if(currentNode){currentNode.fireEvent("click",currentNode)}})}if(callback){callback()}return false},failure:function(response,options){var msg='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(msg,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})}});return false},OpenForum:function(){var tools="resizable,toolbar=yes,location=yes,scrollbars=yes ,menubar=yes,target=_blank";newWindow=window.open(this.settings.ForumPath);newWindow.focus();return false}})}();Manager.referenceTranslations={PleaseConfirm_text:"Please Confirm",Success_text:"Success",Error_text:"Error"};Ext.apply(Manager,new Ext.util.Observable());ExtPortal.Manager=Manager;ExtPortal.Manager.addEvents("langChange");Ext.ns("ExtPortal");ExtPortal.NewsCommentForm=Ext.extend(ExtPortal.WCFFormPanel,{border:false,frame:false,labelWidth:120,url:"/services/Tools/NewsCommentService.svc",svcSubmitMethodName:"Submit",svcLoadMethodName:"Load",txtIDNewsArticle:null,lblIDNewsComment:null,lblTitleIDNewsComment:null,txtReplyToIDNewsComment:null,masterValueData:{IDNewsArticle:null,Lang:null,ReplyToIDNewsComment:null,UserId:null},initComponent:function(){var b=this.getCurrentTranslations();this.title=b.AddTitle;ExtPortal.NewsCommentForm.on("langChange",this.langChange,this);this.tbDetails=new Ext.form.TextField({name:"Details",hidden:true,hideLabel:true,fieldLabel:b.Details_fieldLabel,allowBlank:true,maxLength:500});this.tbEmail=new Ext.form.Hidden({name:"Email",vtype:"email",fieldLabel:b.Email_fieldLabel,allowBlank:true,maxLength:50});this.txtLang=new Ext.form.Hidden({name:"Lang",fieldLabel:b.Lang_fieldLabel,allowBlank:false,width:570,value:Manager.getCurrentLang()});this.chkApproved=new Ext.ux.form.XCheckbox({name:"Approved",hideLabel:!Manager.isAdminPage(),hidden:!Manager.isAdminPage(),fieldLabel:b.Active_fieldLabel});if(Manager.isAdminPage()){this.txtLang=new Ext.form.TextField({name:"Lang",fieldLabel:b.Lang_fieldLabel,allowBlank:false,width:570,readOnly:true})}this.txtReplyToIDNewsComment=new Ext.form.Hidden({name:"ReplyToIDNewsComment",fieldLabel:b.ReplyToIDNewsComment_fieldLabel,allowBlank:true,width:570});this.txtIDNewsArticle=new Ext.form.Hidden({name:"IDNewsArticle",fieldLabel:b.IDNewsArticle_fieldLabel,allowBlank:false,width:570,value:this.IDNewsArticle});this.tbTitle=new Ext.form.TextField({name:"Title",fieldLabel:b.Title_fieldLabel,allowBlank:false,maxLength:300});this.tbNickName=new Ext.form.TextField({name:"NickName",fieldLabel:b.NickName_fieldLabel,allowBlank:false,maxLength:150});this.taBody=new Ext.form.HtmlEditor({name:"Body",fieldLabel:b.Body_fieldLabel,maxLength:50000,height:150,allowBlank:false});this.tbURL=new Ext.form.Hidden({name:"URL",fieldLabel:b.URL_fieldLabel,allowBlank:true,maxLength:250});this.on("afterError",function(f){var c=this.getCurrentTranslations();var e=c.ErrorText_text+'<p style="text-align:left"><br/>';for(var d=0;d<f.length;d++){e+="<br/> <b>"+f[d].id+"</b>"+f[d].msg}e+="</p>";Ext.Msg.show({title:c.ErrorTitle_text,msg:e,modal:true,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK})},this);this.lblIDNewsComment=new Ext.form.Label({cls:"x-form-item x-form-item-label"});this.lblTitleIDNewsComment=new Ext.form.Label({cls:"x-form-item x-form-item-label",width:120,text:b.IDNewsComment_fieldLabel});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[{name:"IDNewsComment",xtype:"hidden"},{xtype:"fieldset",layout:"table",hidden:true,style:"padding: 0px; padding-top:4px;",autoHeight:true,border:false,layoutConfig:{columns:2},items:[this.lblTitleIDNewsComment,this.lblIDNewsComment]},this.txtLang,this.chkApproved,this.txtReplyToIDNewsComment,this.txtIDNewsArticle,this.tbTitle,this.tbDetails,this.tbEmail,this.tbNickName,this.tbURL,this.taBody],buttons:[{text:ExtPortal.WCFFormPanel.getTranslation("Submit_buttonText"),formBind:true,scope:this,handler:this.submit}]});ExtPortal.NewsCommentForm.superclass.initComponent.apply(this,arguments);this.on("afterSetValues",function(c){this.lblIDNewsComment.setText(c.IDNewsComment);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation("Update_buttonText"))},this);this.on("afterError",function(c){Ext.each(c,function(d){if(d.id=="IDNewsComment"){this.showError("<b>Invalid value for ID News Comment.</b>The form could not be submitted.");return false}return true},this)},this)},getCurrentTranslations:function(){var b=ExtPortal.NewsCommentForm.translations;if(!b){b=ExtPortal.NewsCommentForm.referenceTranslations}return b},destroy:function(){ExtPortal.NewsCommentForm.un("langChange",this.langChange,this);ExtPortal.NewsCommentForm.superclass.destroy.call(this,arguments)},langChange:function(){var b=this.getCurrentTranslations();this.taBody.setLabel(b.Body_fieldLabel);this.tbDetails.setLabel(b.Details_fieldLabel);this.tbEmail.setLabel(b.Email_fieldLabel);this.lblTitleIDNewsComment.setText(b.IDNewsComment_fieldLabel);this.tbTitle.setLabel(b.Title_fieldLabel);this.tbNickName.setLabel(b.NickName_fieldLabel);this.tbURL.setLabel(b.URL_fieldLabel);this.setTitle(b.AddTitle)}});ExtPortal.NewsCommentForm.getStores=function(){return[]};ExtPortal.NewsCommentForm.winWidth=700;ExtPortal.NewsCommentForm.winHeight=600;ExtPortal.NewsCommentForm.referenceTranslations={ErrorText_text:"Error on following items :",Active_fieldLabel:"Approved ",ErrorTitle_text:"Error on submitting the comment",Body_fieldLabel:"Body",Details_fieldLabel:"Details",Email_fieldLabel:"Email",IDNewsArticle_fieldLabel:"ID News Article",IDNewsArticle_pickWinTitle:"Select ID News Article ",IDNewsComment_fieldLabel:"ID News Comment",Lang_fieldLabel:"Lang",Lang_emptyText:"Select Lang ...",Lang_loadingText:"Searching...",ReplyToIDNewsComment_fieldLabel:"Reply To ID News Comment",ReplyToIDNewsComment_pickWinTitle:"Select Reply To ID News Comment",Title_fieldLabel:"Title ",UserId_fieldLabel:"User Id ",NickName_fieldLabel:"Nick Name",URL_fieldLabel:"URL",AddTitle:"Add Comments:"};Ext.apply(ExtPortal.NewsCommentForm,new Ext.util.Observable());ExtPortal.NewsCommentForm.addEvents("langChange");Ext.reg("newscomment-form",ExtPortal.NewsCommentForm);Ext.ns("ExtPortal");expanderNewsCommentGrid=new Ext.grid.RowExpander({tpl:new Ext.Template("<p> {Body}</p>")});ExtPortal.NewsCommentGrid=Ext.extend(ExtPortal.BaseGrid,{url:"/services/Tools/NewsCommentService.svc/List",delUrl:"/services/Tools/NewsCommentService.svc/Delete",approveUrl:"/services/Tools/NewsCommentService.svc/Approve",deleteMethodResultName:"DeleteResult",formClass:ExtPortal.NewsCommentForm,isTranslatable:true,masterValueData:{IDNewsArticle:{columns:["IDNewsArticle"]},Approved:{columns:["Approved"]},Lang:{columns:["Lang"]},ReplyToIDNewsComment:{columns:["ReplyToIDNewsComment"]},UserId:{columns:["UserId","FKUserId_FirstName","FKUserId_LastName","FKUserId_UserName"]}},filterArray:[{dataIndex:"Approved",type:"boolean"},{dataIndex:"Body",type:"string"},{type:"date",dataIndex:"CreationDate"},{type:"string",dataIndex:"Details"},{type:"string",dataIndex:"Email"},{type:"numeric",dataIndex:"IDNewsArticle"},{type:"numeric",dataIndex:"IDNewsComment"},{type:"string",dataIndex:"Lang"},{type:"numeric",dataIndex:"ReplyToIDNewsComment"},{type:"string",dataIndex:"Title"},{type:"string",dataIndex:"NickName"},{type:"string",dataIndex:"URL"},{type:"string",dataIndex:"UserId"},{type:"string",dataIndex:"FKUserId_FirstName"},{type:"string",dataIndex:"FKUserId_LastName"},{type:"string",dataIndex:"FKUserId_UserName"}],jsonReaderFields:[{name:"Approved",type:"bool"},{name:"CreationDate",type:"date",dateFormat:"n/j/Y"},{name:"Details",type:"string"},{name:"Email",type:"string"},{name:"IDNewsArticle",type:"int"},{name:"IDNewsComment",type:"int"},{name:"Lang",type:"string"},{name:"ReplyToIDNewsComment",type:"int"},{name:"Title",type:"string"},{name:"NickName",type:"string"},{name:"URL",type:"string"},{name:"UserId",type:"string"},{name:"FKUserId_FirstName",type:"string"},{name:"FKUserId_LastName",type:"string"},{name:"FKUserId_UserName",type:"string"},{name:"Body",type:"string"}],defaultSortField:"Title",gridColumns:[expanderNewsCommentGrid,{id:"CreationDate",dataIndex:"CreationDate",width:150,sortable:true,hidden:true,renderer:Ext.util.Format.dateRenderer("M/d/Y")},{id:"Details",dataIndex:"Details",width:150,hidden:true,sortable:true},{id:"Body",dataIndex:"Body",width:150,hidden:true,sortable:true},{id:"Email",dataIndex:"Email",width:150,hidden:true,sortable:true},{id:"IDNewsArticle",dataIndex:"IDNewsArticle",width:150,hidden:true,sortable:true},{id:"IDNewsComment",dataIndex:"IDNewsComment",width:150,hidden:true,sortable:true},{id:"ReplyToIDNewsComment",dataIndex:"ReplyToIDNewsComment",width:150,hidden:true,sortable:true},{id:"Title",dataIndex:"Title",width:150,renderer:function(b){return"<b> TITLE:"+b+"</b>"},sortable:true},{id:"NickName",dataIndex:"NickName",width:150,renderer:function(b){return"<b> NICKNAME:"+b+"</b>"},sortable:true},{id:"UserId",dataIndex:"UserId",width:150,hidden:true,sortable:true},{id:"FKUserId_FirstName",dataIndex:"FKUserId_FirstName",width:150,hidden:true,sortable:true},{id:"FKUserId_LastName",dataIndex:"FKUserId_LastName",width:150,hidden:true,sortable:true},{id:"FKUserId_UserName",dataIndex:"FKUserId_UserName",width:150,hidden:true,sortable:true},{id:"Approved",dataIndex:"Approved",width:150,hidden:!Manager.isAdminPage(),sortable:true},{id:"URL",dataIndex:"URL",width:250,hidden:true,sortable:true}],plugins:[expanderNewsCommentGrid],descriptiveRecordProperty:"Title",initComponent:function(){if(Manager.isAdminPage()){this.gridColumns.push({id:"Lang",dataIndex:"Lang",width:150,hidden:true,sortable:true})}ExtPortal.NewsCommentGrid.superclass.initComponent.call(this);ExtPortal.NewsCommentGrid.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.NewsCommentGrid.un("langChange",this.langChange,this)});if(!Manager.isAdminPage()){this.getStore().baseParams.filter=[{field:"Approved",data:{type:"boolean",value:true}}]}if(this.editMode){var b=this.getTranslations();this.btnApprove=new Ext.Button({text:b.Approve_buttonText,scope:this,disabled:true,handler:this.approveComment});this.topToolbar.push("-");this.topToolbar.push(this.btnApprove);this.on("dataItemSelected",function(c){if(c.Approved==true){this.btnApprove.disable()}else{this.btnApprove.enable()}},this)}},approveComment:function(){var b=this.getSelectionModel().getSelected();if(!b){alert("oo");return}Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.approveUrl,method:"POST",params:Ext.util.JSON.encode({IDNewsComment:b.data.IDNewsComment}),success:function(d,f){var c=Ext.decode(d.responseText);if(c.success){var e=this.getTranslations();this.fireEvent("info",{title:e.ApprovedWithSuccess_title,msg:e.ApprovedWithSuccess_text})}else{f.failure.call(this,d,f)}},failure:function(c,d){this.onLoadFailure(c,d)}})},getTranslations:function(){var b=ExtPortal.NewsCommentGrid.translations;if(!b){b=ExtPortal.NewsCommentGrid.referenceTranslations}return b}});ExtPortal.NewsCommentGrid.referenceTranslations={Approve_buttonText:"Approve",Approved_headerText:"Approved",Body_headerText:"Body",CreationDate_headerText:"Creation Date",Details_headerText:"Details",Email_headerText:"Email ",IDNewsArticle_headerText:"ID News Article",IDNewsComment_headerText:"ID News Comment",Lang_headerText:"Lang",ReplyToIDNewsComment_headerText:"Reply To ID News Comment",Title_headerText:"Title",UserId_headerText:"User Id",FKUserId_FirstName_headerText:"First Name",FKUserId_LastName_headerText:"Last Name",FKUserId_UserName_headerText:"User Name",ApprovedWithSuccess_text:"Comment approved with success",ApprovedWithSuccess_title:"Comment approved",NickName_headerText:"NickName",URL_headerText:"URL"};Ext.apply(ExtPortal.NewsCommentGrid,new Ext.util.Observable());ExtPortal.NewsCommentGrid.addEvents("langChange");Ext.reg("newscomment-grid",ExtPortal.NewsCommentGrid);Ext.ns("ExtPortal");ExtPortal.OpisDocumenteForm=Ext.extend(ExtPortal.WCFFormPanel,{border:false,frame:true,labelWidth:120,url:"/services/Tools/OpisDocumenteService.svc",svcSubmitMethodName:"Submit",svcLoadMethodName:"Load",lblIDOpisDocumente:null,lblTitleIDOpisDocumente:null,masterValueData:{PageItem:null},initComponent:function(){var b=ExtPortal.OpisDocumenteForm.translations;if(!b){b=ExtPortal.OpisDocumenteForm.referenceTranslations}ExtPortal.OpisDocumenteForm.on("langChange",this.langChange,this);this.dtDataEmitereDocument=new Ext.form.DateField({name:"DataEmitereDocument",id:"DataEmitereDocument",fieldLabel:b.DataEmitereDocument_fieldLabel,allowBlank:false,format:"M/d/Y"});this.tbDenumire=new Ext.form.TextField({name:"Denumire",fieldLabel:b.Denumire_fieldLabel,allowBlank:false,maxLength:50});this.tbDescriere=new Ext.form.TextField({name:"Descriere",fieldLabel:b.Descriere_fieldLabel,allowBlank:false,maxLength:200});this.tbIDDocument=new Ext.form.NumberField({name:"IDDocument",maxLength:10,decimalPrecision:0,fieldLabel:b.IDDocument_fieldLabel,allowBlank:false});this.tbIDFolder=new Ext.form.NumberField({name:"IDFolder",maxLength:10,decimalPrecision:0,fieldLabel:b.IDFolder_fieldLabel,allowBlank:true});this.tbIDOrganizatie=new Ext.form.NumberField({name:"IDOrganizatie",maxLength:10,decimalPrecision:0,fieldLabel:b.IDOrganizatie_fieldLabel,allowBlank:true});this.tbIDTipDocument=new Ext.form.NumberField({name:"IDTipDocument",maxLength:10,decimalPrecision:0,fieldLabel:b.IDTipDocument_fieldLabel,allowBlank:false});this.tbLocArhivare=new Ext.form.TextField({name:"LocArhivare",fieldLabel:b.LocArhivare_fieldLabel,allowBlank:false,maxLength:500});this.tbNrDocExtern=new Ext.form.TextField({name:"NrDocExtern",fieldLabel:b.NrDocExtern_fieldLabel,allowBlank:true,maxLength:50});this.tbNrInregistrareDocument=new Ext.form.TextField({name:"NrInregistrareDocument",fieldLabel:b.NrInregistrareDocument_fieldLabel,allowBlank:true,maxLength:50});this.tbNrOrdine=new Ext.form.NumberField({name:"NrOrdine",maxLength:10,decimalPrecision:0,fieldLabel:b.NrOrdine_fieldLabel,allowBlank:false});this.storPageItem=new Ext.data.Store({reader:new Ext.data.JsonReader({root:"Rows",totalProperty:"Count",fields:[{name:"CreationDate",type:"date",dateFormat:"n/j/Y"},{name:"PageItem",type:"int"},{name:"Item",type:"int"},{name:"FKPageItem_PathName",type:"string"},{name:"Lang",type:"string"},{name:"Published",type:"bool"},{name:"Text",type:"string"},{name:"FKPageItem_Title",type:"string"}]}),proxy:new Ext.data.WCFProxy({url:"/services/Tools/OpisPagesService.svc/Query",method:"POST"}),baseParams:{qField:"FKPageItem_Title"},sortInfo:{field:"FKPageItem_Title",direction:"ASC"},remoteSort:true});this.cmbPageItem=new Ext.form.ComboBox({name:"",hiddenName:"PageItem",fieldLabel:b.PageItem_fieldLabel,allowBlank:false,emptyText:b.PageItem_emptyText,minChars:0,forceSelection:true,store:this.storPageItem,displayField:"FKPageItem_Title",valueField:"PageItem",typeAhead:false,loadingText:b.PageItem_loadingText,width:570,pageSize:10,hideTrigger:false,tpl:new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">',"<span style='font-weight:bold;'>{FKPageItem_PathName}  {FKPageItem_Title}</span><br />({PageItem})","</div></tpl>"),itemSelector:"div.x-combo-list-item"});this.lblIDOpisDocumente=new Ext.form.Label({cls:"x-form-item x-form-item-label"});this.lblTitleIDOpisDocumente=new Ext.form.Label({cls:"x-form-item x-form-item-label",width:120,text:b.IDOpisDocumente_fieldLabel});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[this.dtDataEmitereDocument,this.tbDenumire,this.tbDescriere,this.tbIDDocument,this.tbIDFolder,{name:"IDOpisDocumente",xtype:"hidden"},{xtype:"fieldset",layout:"table",style:"padding: 0px; padding-top:4px;",autoHeight:true,border:false,layoutConfig:{columns:2},items:[this.lblTitleIDOpisDocumente,this.lblIDOpisDocumente]},this.tbIDOrganizatie,this.tbIDTipDocument,this.tbLocArhivare,this.tbNrDocExtern,this.tbNrInregistrareDocument,this.tbNrOrdine,this.cmbPageItem],buttons:[{text:ExtPortal.WCFFormPanel.getTranslation("Submit_buttonText"),formBind:true,scope:this,handler:this.submit},{text:ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"),scope:this,handler:this.close}]});ExtPortal.OpisDocumenteForm.superclass.initComponent.apply(this,arguments);this.on("afterSetValues",function(c){this.lblIDOpisDocumente.setText(c.IDOpisDocumente);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation("Update_buttonText"))},this);this.on("afterError",function(c){Ext.each(c,function(d){if(d.id=="IDOpisDocumente"){this.showError("<b>Invalid value for ID Opis Documente.</b>The form could not be submitted.");return false}return true},this)},this);this.on("beforeDataItemLoad",function(c){this.storPageItem.add(new Ext.data.Record({EntryNr:c.PageItem,Title:c.FKPageItem_Title}));return true},this)},destroy:function(){ExtPortal.OpisDocumenteForm.un("langChange",this.langChange,this);ExtPortal.OpisDocumenteForm.superclass.destroy.call(this,arguments)},langChange:function(){var b=ExtPortal.OpisDocumenteForm.translations;if(!b){b=ExtPortal.OpisDocumenteForm.referenceTranslations}this.dtDataEmitereDocument.setLabel(b.DataEmitereDocument_fieldLabel);this.tbDenumire.setLabel(b.Denumire_fieldLabel);this.tbDescriere.setLabel(b.Descriere_fieldLabel);this.tbIDDocument.setLabel(b.IDDocument_fieldLabel);this.tbIDFolder.setLabel(b.IDFolder_fieldLabel);this.lblTitleIDOpisDocumente.setText(b.IDOpisDocumente_fieldLabel);this.tbIDOrganizatie.setLabel(b.IDOrganizatie_fieldLabel);this.tbIDTipDocument.setLabel(b.IDTipDocument_fieldLabel);this.tbLocArhivare.setLabel(b.LocArhivare_fieldLabel);this.tbNrDocExtern.setLabel(b.NrDocExtern_fieldLabel);this.tbNrInregistrareDocument.setLabel(b.NrInregistrareDocument_fieldLabel);this.tbNrOrdine.setLabel(b.NrOrdine_fieldLabel);this.cmbPageItem.setLabel(b.PageItem_fieldLabel);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation(this.dataUpdateMode?"Update_buttonText":"Submit_buttonText"));this.buttons[1].setText(ExtPortal.WCFFormPanel.getTranslation("Close_buttonText"))}});ExtPortal.OpisDocumenteForm.getStores=function(){return[]};ExtPortal.OpisDocumenteForm.winWidth=500;ExtPortal.OpisDocumenteForm.winHeight=400;ExtPortal.OpisDocumenteForm.referenceTranslations={DataEmitereDocument_fieldLabel:"Data Emitere Document",DataIntroducerii_fieldLabel:"Data Introducerii ",DataModificarii_fieldLabel:"Data Modificarii ",Denumire_fieldLabel:"Denumire ",Descriere_fieldLabel:"Descriere ",IDDocument_fieldLabel:"ID Document ",IDFolder_fieldLabel:"ID Folder",IDOpisDocumente_fieldLabel:"ID Opis Documente",IDOrganizatie_fieldLabel:"ID Organizatie ",IDTipDocument_fieldLabel:"ID Tip Document",IntrodusDe_fieldLabel:"Introdus De",LocArhivare_fieldLabel:"Loc Arhivare ",ModificatDe_fieldLabel:"Modificat De ",NrDocExtern_fieldLabel:"Nr Doc Extern ",NrInregistrareDocument_fieldLabel:"Nr Inregistrare Document ",NrOrdine_fieldLabel:"Nr Ordine ",PageItem_fieldLabel:"Page Entry Nr ",PageItem_emptyText:"Select Page Item ...",PageItem_loadingText:"Searching..."};Ext.apply(ExtPortal.OpisDocumenteForm,new Ext.util.Observable());ExtPortal.OpisDocumenteForm.addEvents("langChange");Ext.reg("opisdocumente-form",ExtPortal.OpisDocumenteForm);Ext.ns("ExtPortal");ExtPortal.OpisDocumenteGrid=Ext.extend(ExtPortal.BaseGrid,{url:"/services/Tools/OpisDocumenteService.svc/List",delUrl:"/services/Tools/OpisDocumenteService.svc/Delete",deleteMethodResultName:"DeleteResult",formClass:ExtPortal.OpisDocumenteForm,isTranslatable:true,masterValueData:{PageItem:{columns:["PageItem","FKPageItem_PathName","FKPageItem_Title"]}},filterArray:[{type:"date",dataIndex:"DataEmitereDocument"},{type:"date",dataIndex:"DataIntroducerii"},{type:"date",dataIndex:"DataModificarii"},{type:"string",dataIndex:"Denumire"},{type:"string",dataIndex:"Descriere"},{type:"numeric",dataIndex:"IDDocument"},{type:"numeric",dataIndex:"IDFolder"},{type:"numeric",dataIndex:"IDOpisDocumente"},{type:"numeric",dataIndex:"IDOrganizatie"},{type:"numeric",dataIndex:"IDTipDocument"},{type:"string",dataIndex:"IntrodusDe"},{type:"string",dataIndex:"LocArhivare"},{type:"string",dataIndex:"ModificatDe"},{type:"string",dataIndex:"NrDocExtern"},{type:"string",dataIndex:"NrInregistrareDocument"},{type:"numeric",dataIndex:"NrOrdine"},{type:"numeric",dataIndex:"PageItem"},{type:"string",dataIndex:"FKPageItem_PathName"},{type:"string",dataIndex:"FKPageItem_Title"}],jsonReaderFields:[{name:"DataEmitereDocument",type:"date",dateFormat:"n/j/Y"},{name:"DataIntroducerii",type:"date",dateFormat:"n/j/Y"},{name:"DataModificarii",type:"date",dateFormat:"n/j/Y"},{name:"Denumire",type:"string"},{name:"Descriere",type:"string"},{name:"IDDocument",type:"int"},{name:"IDFolder",type:"int"},{name:"IDOpisDocumente",type:"int"},{name:"IDOrganizatie",type:"int"},{name:"IDTipDocument",type:"int"},{name:"IntrodusDe",type:"string"},{name:"LocArhivare",type:"string"},{name:"ModificatDe",type:"string"},{name:"NrDocExtern",type:"string"},{name:"NrInregistrareDocument",type:"string"},{name:"NrOrdine",type:"int"},{name:"PageItem",type:"int"},{name:"FKPageItem_PathName",type:"string"},{name:"FKPageItem_Title",type:"string"}],defaultSortField:"Denumire",gridColumns:[{id:"DataEmitereDocument",dataIndex:"DataEmitereDocument",width:150,sortable:true,hidden:true,renderer:Ext.util.Format.dateRenderer("M/d/Y")},{id:"DataIntroducerii",dataIndex:"DataIntroducerii",width:150,sortable:true,hidden:true,renderer:Ext.util.Format.dateRenderer("M/d/Y")},{id:"DataModificarii",dataIndex:"DataModificarii",width:150,hidden:true,sortable:true,renderer:Ext.util.Format.dateRenderer("M/d/Y")},{id:"Denumire",dataIndex:"Denumire",width:150,sortable:true},{id:"Descriere",dataIndex:"Descriere",width:150,hidden:true,sortable:true},{id:"IDDocument",dataIndex:"IDDocument",width:150,hidden:true,sortable:true},{id:"IDFolder",dataIndex:"IDFolder",width:150,hidden:true,sortable:true},{id:"IDOpisDocumente",dataIndex:"IDOpisDocumente",width:150,sortable:true},{id:"IDOrganizatie",dataIndex:"IDOrganizatie",width:150,hidden:true,sortable:true},{id:"IDTipDocument",dataIndex:"IDTipDocument",width:150,hidden:true,sortable:true},{id:"IntrodusDe",dataIndex:"IntrodusDe",width:150,hidden:true,sortable:true},{id:"LocArhivare",dataIndex:"LocArhivare",width:150,sortable:true},{id:"ModificatDe",dataIndex:"ModificatDe",width:150,hidden:true,sortable:true},{id:"NrDocExtern",dataIndex:"NrDocExtern",width:150,sortable:true},{id:"NrInregistrareDocument",dataIndex:"NrInregistrareDocument",width:150,sortable:true},{id:"NrOrdine",dataIndex:"NrOrdine",width:150,sortable:true},{id:"PageItem",dataIndex:"PageItem",width:150,hidden:true,sortable:true},{id:"FKPageItem_PathName",dataIndex:"FKPageItem_PathName",width:150,hidden:true,sortable:true},{id:"FKPageItem_Title",dataIndex:"FKPageItem_Title",width:150,hidden:true,sortable:true}],descriptiveRecordProperty:"Denumire",initComponent:function(){ExtPortal.OpisDocumenteGrid.superclass.initComponent.call(this);ExtPortal.OpisDocumenteGrid.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.OpisDocumenteGrid.un("langChange",this.langChange,this)})},getTranslations:function(){var b=ExtPortal.OpisDocumenteGrid.translations;if(!b){b=ExtPortal.OpisDocumenteGrid.referenceTranslations}return b}});ExtPortal.OpisDocumenteGrid.referenceTranslations={DataEmitereDocument_headerText:"Data Emitere Document",DataIntroducerii_headerText:"Data Introducerii",DataModificarii_headerText:"Data Modificarii",Denumire_headerText:"Denumire",Descriere_headerText:"Descriere ",IDDocument_headerText:"ID Document",IDFolder_headerText:"ID Folder",IDOpisDocumente_headerText:"ID Opis Documente",IDOrganizatie_headerText:"ID Organizatie ",IDTipDocument_headerText:"ID Tip Document ",IntrodusDe_headerText:"Introdus De",LocArhivare_headerText:"Loc Arhivare ",ModificatDe_headerText:"Modificat De",NrDocExtern_headerText:"Nr Doc Extern",NrInregistrareDocument_headerText:"Nr Inregistrare Document ",NrOrdine_headerText:"Nr Ordine ",PageItem_headerText:"Page Item",FKPageEntryNr_Item_headerText:"Item ",FKPageItem_PathName_headerText:"Path Name ",FKPageItem_Title_headerText:"Title"};Ext.apply(ExtPortal.OpisDocumenteGrid,new Ext.util.Observable());ExtPortal.OpisDocumenteGrid.addEvents("langChange");Ext.reg("opisdocumente-grid",ExtPortal.OpisDocumenteGrid);Ext.ns("ExtPortal");ExtPortal.NewsletterRegistrationListForm=Ext.extend(ExtPortal.WCFFormPanel,{border:false,frame:true,autoHeight:true,labelWidth:150,parentWin:null,url:"/services/Tools/NewsletterRegistrationListService.svc",svcSubmitMethodName:"Submit",svcLoadMethodName:"Load",publicAdd:false,lblIDNewsletterRegistrationList:null,pickLang:null,masterValueData:{IDList:null,Lang:null},getCurrentTranslations:function(){var b=ExtPortal.NewsletterRegistrationListForm.translations;if(!b){b=ExtPortal.NewsletterRegistrationListForm.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();this.title=b.RegisterTitle;this.loadIDList();this.cmbIDList=new Ext.form.Label({html:"Nu avem liste disponibile"});this.cmbIDListHolder=new Ext.form.FieldSet({layout:"form",style:"padding: 0px; padding-top:4px;",autoWidth:true,id:"x-form-el-cmbIDListHolder",border:false,autoHeight:true,items:[this.cmbIDList]});this.lblIDNewsletterRegistrationList=new Ext.form.Label({cls:"x-form-item x-form-item-label"});this.lblTitleIDNewsletterRegistrationList=new Ext.form.Label({id:"lblTitleIDNewsletterRegistrationList",cls:"x-form-item x-form-item-label",width:this.labelWidth+5,text:b.TitleIDNewsletterRegistrationList_fieldLabel});this.tbFirstName=new Ext.form.TextField({name:"FirstName",fieldLabel:b.FirstName_fieldLabel,allowBlank:false,maxLength:75});this.tbLastName=new Ext.form.TextField({name:"LastName",fieldLabel:b.LastName_fieldLabel,allowBlank:false,maxLength:75});this.tbEmail=new Ext.form.TextField({name:"Email",fieldLabel:b.Email_fieldLabel,vtype:"email",allowBlank:false,maxLength:100});this.tbAddress=new Ext.form.TextField({name:"Address",fieldLabel:b.Address_fieldLabel,allowBlank:true,maxLength:100});this.txtLang=new Ext.form.TextField({name:"Lang",label:b.Lang_fieldLabel,allowBlank:false,hideLabel:true,hidden:true,maxLength:25,value:Manager.getCurrentLang()});this.tbPhone=new Ext.form.TextField({name:"Phone",plugins:[new Ext.ux.InputTextMask("9999-999-999",false)],fieldLabel:b.Phone_fieldLabel,allowBlank:true,maxLength:20});this.tbCity=new Ext.form.TextField({name:"City",fieldLabel:b.City_fieldLabel,allowBlank:true,maxLength:50});this.tbCompany=new Ext.form.TextField({name:"Company",fieldLabel:b.Company_fieldLabel,allowBlank:true,maxLength:50});Ext.apply(this,{defaultType:"textfield",defaults:{anchor:"-24"},monitorValid:true,items:[{xtype:"fieldset",autoHeight:true,border:false,defaults:{anchor:"-24"},items:[{name:"IDNewsletterRegistrationList",xtype:"hidden"},{xtype:"fieldset",layout:"table",style:"padding: 0px; padding-top:4px;",autoHeight:true,border:false,layoutConfig:{columns:2},items:[this.lblTitleIDNewsletterRegistrationList]},this.tbFirstName,this.tbLastName,this.tbEmail,this.tbCity,this.tbAddress,this.tbPhone,this.tbCompany,this.txtLang,this.cmbIDListHolder]}],buttons:[{text:ExtPortal.WCFFormPanel.getTranslation("Submit_buttonText"),formBind:true,scope:this,handler:this.submit}]});ExtPortal.NewsletterRegistrationListForm.superclass.initComponent.apply(this,arguments);ExtPortal.WCFFormPanel.un("langChange",this.langChange,this);ExtPortal.NewsletterRegistrationListForm.on("langChange",this.langChange,this);if(!this.parentWin){this.publicAdd=true}this.parentWin=this.parentWin||this;if(this.publicAdd){this.on("beforeDataItemLoad",function(c){Loader.openControl("home")},this)}this.on("afterSetValues",function(c){this.lblIDNewsletterRegistrationList.setText(c.IDNewsletterRegistrationList);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation("Update_buttonText"))},this);this.on("afterError",function(c){Ext.each(c,function(d){if(d.id=="IDNewsletterRegistrationList"){this.showError("<b>"+b.InvalidValue+"</b>"+b.CouldNotSubmit);return false}return true},this)},this)},loadIDList:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:"/services/Tools/NewsletterListTranslationService.svc/List",method:"POST",params:Ext.util.JSON.encode({masterValues:[{name:"Lang",value:Manager.getCurrentLang()}]}),success:function(c,d){var b=Ext.decode(c.responseText);this.loadIDListData(b.Rows,b.Count)},failure:function(b,c){this.onLoadFailure(b,c)}})},loadIDListData:function(c,g){var d=this.getCurrentTranslations();if(g>0){if(this.cmbIDList.hideContainer){this.cmbIDList.hideContainer()}this.cmbIDListHolder.remove(this.cmbIDList);this.cmbIDList.destroy();var f=[];for(var e=0;e<g;e++){var b=new Ext.ux.form.XCheckbox({id:"newsletterRegistrationList_"+c[e].IDList,dataIndex:c[e].Name,header:c[e].Name,width:100,name:c[e].Name,boxLabel:c[e].Name});f.push(b)}this.cmbIDList=new Ext.form.CheckboxGroup({layout:"table",fieldLabel:d.ChooseList_fieldLabel,name:"IDListInit",id:"cmbIDListHolder",autoHeight:true,width:560,border:false,columns:2,items:f});this.cmbIDListHolder.add(this.cmbIDList);this.cmbIDListHolder.doLayout(true)}},langChange:function(){var b=this.getCurrentTranslations();this.setTitle(b.RegisterTitle);this.tbFirstName.setLabel(b.FirstName_fieldLabel);this.tbLastName.setLabel(b.LastName_fieldLabel);this.tbEmail.setLabel(b.Email_fieldLabel);this.tbAddress.setLabel(b.Address_fieldLabel);this.tbPhone.setLabel(b.Phone_fieldLabel);this.tbCity.setLabel(b.City_fieldLabel);this.tbCompany.setLabel(b.Company_fieldLabel);this.txtLang.setValue(Manager.getCurrentLang());this.lblTitleIDNewsletterRegistrationList.setText(b.TitleIDNewsletterRegistrationList_fieldLabel);this.buttons[0].setText(ExtPortal.WCFFormPanel.getTranslation(this.dataUpdateMode?"Update_buttonText":"Submit_buttonText"))},destroy:function(){ExtPortal.NewsletterRegistrationListForm.un("langChange",this.langChange,this);ExtPortal.NewsletterRegistrationListForm.superclass.destroy.call(this,arguments)},close:function(){Loader.openControl("home")},onSuccess:function(d,e){var c=this.getCurrentTranslations();var b=c.formSubmittedSuccessfully;Ext.Msg.show({title:c.success,msg:b,icon:Ext.Msg.INFO,buttons:Ext.Msg.OK})},submit:function(){var b=this.getCurrentTranslations();if(this.getForm().isValid()){var c=this.getForm().getValues();c.IDListInit=[];this.cmbIDList.items.each(function(d){if(d.checked){c.IDListInit.push(d.id.split("_")[1])}},this);this.showLoadMask(b.Sending);Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url+"/"+this.svcSubmitMethodName,method:"POST",params:Ext.util.JSON.encode({updateMode:this.dataUpdateMode,data:c}),success:function(e,g){var f=this.getCurrentTranslations();var d=Ext.decode(e.responseText);if(d.success){this.doSetValues(d.dataItem);this.onSuccess()}else{if(d.dbOperationError!=null&&d.dbOperationError!=""){this.showError('<p style="font-weight:700">'+f.NotSubmit+"</p><p>"+f.ErrorOccured+"</p><br>"+d.dbOperationError)}else{this.getForm().markInvalid(d.errors);this.fireEvent("afterError",d.errors)}}this.hideLoadMask()},failure:function(d,e){this.showError('<p style="font-weight:700">'+b.NotSent+"</p><p>"+b.Retry+"</p>");this.hideLoadMask()}})}}});ExtPortal.NewsletterRegistrationListForm.winWidth=500;ExtPortal.NewsletterRegistrationListForm.winHeight=500;ExtPortal.NewsletterRegistrationListForm.referenceTranslations={FirstName_fieldLabel:"First Name ",LastName_fieldLabel:"Last Name",TitleIDNewsletterRegistrationList_fieldLabel:"Newsletter List ",Email_fieldLabel:"Email",City_fieldLabel:"City ",Phone_fieldLabel:"Phone",Company_fieldLabel:"Company ",Address_fieldLabel:"Address ",NotSent:"The request might not have been sent.",CouldNotSubmit:"The form could not be submitted.",Retry:"Please try again.",Error:"Error",InvalidValue:"Invalid value for ID Newsletter Registration List",Sending:"Sending...",NotSubmit:"The form might not have been submitted.",ErrorOccured:"The following error occurred:",RegisterTitle:"Register to our lists",ChooseList_fieldLabel:"Choose List",Company_fieldLabel:"Company ",formSubmittedSuccessfully:"shdgshfhgffh",success:"Success"};Ext.apply(ExtPortal.NewsletterRegistrationListForm,new Ext.util.Observable());ExtPortal.NewsletterRegistrationListForm.addEvents("langChange");Ext.reg("newsletterregistrationlist-form",ExtPortal.NewsletterRegistrationListForm);Ext.ns("ExtPortal");ExtPortal.PreviewPage=Ext.extend(Ext.Panel,{border:false,labelWidth:120,iconCls:"tabs",enableTabScroll:true,animScroll:true,autoScroll:true,closable:true,autoHeight:true,url:"/services/ExtPortal/ContentService.svc/GetContent",urlLoadItem:"/services/ExtPortal/ContentService.svc/LoadContentItems",parentTab:null,Node:null,settings:null,allowRemove:true,initComponent:function(){this.Manager=Manager;this.loadPage();if(this.Manager&&this.Manager.isAdminPage()){this.iconCls="preview"}this.title=((this.title!=undefined&&this.title!=null)&&(this.title.length==0))?"":this.Node.text;this.content=new Ext.form.Label({html:"Loading..."});this.opisDocuments=new ExtPortal.OpisDocumenteGrid({border:false,masterValues:{PageItem:this.Node.id},hideHeaders:true,editMode:false,gridColumns:[{id:"Denumire",dataIndex:"Denumire",width:150,sortable:true}],usePaging:false});this.opisDocuments.btnClear.hidden=null;this.opisDocuments.topToolbar=null;this.items=[this.content,{html:"<br/>",border:false},this.opisDocuments];ExtPortal.PreviewPage.superclass.initComponent.apply(this,arguments);ExtPortal.PreviewPage.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.PreviewPage.un("langChange",this.langChange,this)})},loadPage:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({Item:this.Node.id,Lang:Manager.getCurrentLang()}),success:function(c,d){var b=Ext.decode(c.responseText);this.ContentText=b;var e=this.ContentText;if(this.settings.TplPageItems){e=this.settings.TplPageItems.applyTemplate({Text:b})}this.content.setText(e,false)},failure:function(c,e){var d=this.getCurrentTranslations();var b=(c&&c.responseText)?Ext.util.JSON.decode(c.responseText):"";var f=b.ErrorCode;msg=d.Error_messageText+f;Ext.Msg.show({title:d.Error_titleText,msg:Ext.util.Format.ellipsis(msg,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})}})},loadPageTitle:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.urlLoadItem,method:"POST",params:Ext.util.JSON.encode({Item:this.Node.id,Lang:Manager.getCurrentLang()}),success:function(c,d){var b=Ext.decode(c.responseText);if(b&&b.Title){this.setTitle(b.Title)}},failure:function(c,e){var d=this.getCurrentTranslations();var b=(c&&c.responseText)?Ext.util.JSON.decode(c.responseText):"";var f=b.ErrorCode;msg=d.Error_messageText+f;Ext.Msg.show({title:title||d.Error_titleText,msg:Ext.util.Format.ellipsis(msg,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(msg).length?360:600})}})},langChange:function(){this.loadPage();this.loadPageTitle()},getCurrentTranslations:function(){var b=ExtPortal.SiteMap.translations;if(!b){b=ExtPortal.SiteMap.referenceTranslations}return b},closePage:function(){if(this.parentTab){this.parentTab.remove(this)}return true},refreshPage:function(){this.loadPage();this.loadPageTitle()},editPage:function(){this.Node.select();viewport.contentTree.editPageItem.call(viewport.contentTree)}});ExtPortal.PreviewPage.referenceTranslations={Titile_fake_fieldLabel:"Preview",Error_titleText:"",Error_messageText:""};Ext.apply(ExtPortal.PreviewPage,new Ext.util.Observable());ExtPortal.PreviewPage.addEvents("langChange");Ext.reg("preview-page",ExtPortal.PreviewPage);Ext.ns("ExtPortal");ExtPortal.BaseDataView=Ext.extend(Ext.DataView,{border:false,stateful:false,url:null,delUrl:null,deleteMethodResultName:"DeleteResult",autoLoad:true,formClass:null,pickMode:false,editMode:true,useFilter:true,useSort:true,usePaging:false,useBBar:true,pageSize:10,checkboxMode:false,masterValueData:null,masterValues:[],btnAdd:null,btnDel:null,btnSel:null,btnEdit:null,btnClear:null,delMask:null,bottombar:null,jsonReaderRoot:null,jsonReaderTotalProperty:null,jsonReaderFields:[],sortData:null,filterField:null,defaultSortDir:"ASC",descriptiveRecordProperty:null,title:"Categories",urlArticle:"/services/Tools/NewsArticleTranslationService.svc/List",overClass:"x-view-over",itemSelector:"div.title",emptyText:'<div style="padding:12px;">No Article was found</div>',loadingText:"Please wait, Loading ...",constructor:function(b){Ext.applyIf(this,b,{border:false,stateful:false,url:null,delUrl:null,deleteMethodResultName:"DeleteResult",formClass:null,pickMode:false,editMode:true,usePaging:true,pageSize:10,store:null,useFilter:true,useSort:true,useBBar:true,checkboxMode:false,masterValueData:null,masterValues:[],jsonReaderRoot:null,jsonReaderTotalProperty:null,jsonReaderFields:[],descriptiveRecordProperty:null});if(!b||!b.masterValues){this.masterValues=[]}ExtPortal.BaseDataView.superclass.constructor.call(this,b)},initComponent:function(){this.addEvents("dataItemSelected","selectionCleared");if(this.checkboxMode){this.pickMode=false;this.editMode=false;this.usePaging=false}if(!this.store){this.store=new Ext.data.Store({basePrams:this.baseParams||{},reader:new Ext.data.JsonReader({root:this.root||"Rows",totalProperty:"Count",autoLoad:this.autoLoad,fields:this.jsonReaderFields}),proxy:new Ext.data.WCFProxy({url:this.url,method:"POST"}),sortInfo:{field:this.defaultSortField,direction:"ASC"},remoteSort:true,listeners:{beforeload:{scope:this,fn:function(e,g){if((!e.baseParams.filter)&&(this.baseParams&&this.baseParams.filter)){e.baseParams.filter=this.baseParams.filter}if(this.masterValues){var c=[];for(var f in this.masterValues){var d=this.masterValues[f];if(d){c.push({name:f,value:d})}}if(c.length>0){e.baseParams.masterValues=c}}}},loadexception:{scope:this,fn:function(h,g,d,i){var f;if(d.responseText){var c=Ext.util.JSON.decode(d.responseText);if(c.ErrorCode){f="<b>Could not load data</b>.<p><b><i>Error Code:</i></b> "+c.ErrorCode+"</p><p><b><i>Message:</i></b> "+c.FaultMessage+"</p><p><b><i>Location:</i></b> "+c.Location}else{f="<b>Could not load data</b>.<p>"+d.responseText+"</p>"}}else{f="<b>The server did not respond in time.</b>"}Ext.Msg.show({title:"Unable to load data",msg:f,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK})}}}})}if(this.useBBar){this.bottombar=[];if(this.editMode){this.btnAdd=new Ext.Toolbar.Button({text:"Add",tooltip:"Add a new record",iconCls:"addItem",listeners:{click:{scope:this,fn:this.addRecord}}});this.btnEdit=new Ext.Toolbar.Button({text:"Edit",tooltip:"Edit the selected item",iconCls:"edit",listeners:{click:{scope:this,fn:this.editRecord}},disabled:true});this.btnDel=new Ext.Toolbar.Button({text:"Delete",tooltip:"Remove the selected item(s)",iconCls:"remove",listeners:{click:{scope:this,fn:this.deleteSelection}},disabled:true});this.bottombar.push(this.btnAdd,"-",this.btnEdit,"-",this.btnDel)}if(this.pickMode){if(this.bottombar.length>0){this.bottombar.push("-")}this.btnSel=new Ext.Toolbar.Button({text:"Select",tooltip:"Select current item",iconCls:"select",listeners:{click:{scope:this,fn:this.fireSelectEvent}},disabled:true});this.bottombar.push(this.btnSel)}if(this.bottombar.length>0){this.bottombar.push("-")}this.btnClear=new Ext.Toolbar.Button({text:"Clear Sel",tooltip:"Clear current selection",iconCls:"clearsel",listeners:{click:{scope:this,fn:this.clearSelected}},disabled:true});this.bottombar.push(this.btnClear);if(this.usePaging){this.pagingBar=new Ext.PagingToolbar({store:this.store,displayInfo:true,pageSize:10})}else{this.pagingBar=null}if(this.useSort){this.bottombar.push({text:"Sort By:"});this.bottombar.push({id:"sortSelectView",xtype:"combo",triggerAction:"all",width:100,editable:false,mode:"local",displayField:"desc",valueField:"name",lazyInit:false,store:new Ext.data.SimpleStore({fields:["name","desc"],data:this.sortData||[["name","Name"],["size","File Size"],["lastmod","Last Modified"]]}),listeners:{select:{fn:this.sortValues,scope:this}}});this.bottombar.push(" ");this.bottombar.push("-")}if(this.useFilter){this.bottombar.push({text:"Filter:"});this.bottombar.push({xtype:"textfield",id:"filterView",selectOnFocus:true,width:100,listeners:{render:{fn:function(){Ext.getCmp("filterView").getEl().on("keyup",function(){this.filterValues()},this,{buffer:500})},scope:this}}})}}Ext.apply(this,{store:this.store,viewConfig:{forceFit:true},bbar:this.pagingBar});this.on("dblclick",this.onDoubleClick,this);this.on("selectionchange",function(){var c=this.getSelectionCount();if(c>0){if(this.btnClear){this.btnClear.enable()}if(this.btnDel){this.btnDel.enable()}if(c==1){if(this.btnSel){this.btnSel.enable()}if(this.btnEdit){this.btnEdit.enable()}}else{if(this.btnSel){this.btnSel.disable()}if(this.btnEdit){this.btnEdit.disable()}}}else{if(this.btnDel){this.btnDel.disable()}if(this.btnSel){this.btnSel.disable()}if(this.btnEdit){this.btnEdit.disable()}if(this.btnClear){this.btnClear.disable()}}},this);this.on("click",function(e,c){if(!this.pickMode){var d=this.getSelectedNodes();if(d.length==1){this.fireSelectEvent()}else{this.fireEvent("selectionCleared")}}},this);ExtPortal.BaseDataView.superclass.initComponent.apply(this,arguments);if(this.masterValues){for(var b in this.masterValues){if(this.masterValues[b]){this.setMasterValue(b,this.masterValues[b],true)}}}},filterValues:function(){var b=Ext.getCmp("filterView");this.store.filter(this.filterField||"name",b.getValue());this.select(0)},sortValues:function(){var b=Ext.getCmp("sortSelectView").getValue();this.lastSortValue=b;this.store.sort(b,b==this.lastSortValue?"asc":"desc");this.select(0)},onDoubleClick:function(b,d,c){if(this.pickMode){this.fireSelectEvent()}else{if(this.editMode){this.editRecord()}}},onRender:function(c,b){ExtPortal.BaseDataView.superclass.onRender.apply(this,arguments);this.store.load({params:{start:0,limit:this.usePaging?this.pageSize:0}});this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.labelDiv=this.wrap.createChild({tag:"div",style:"float:left; padding-right:10px;"});var d=this.wrap.createChild({tag:"div"});if(this.useBBar){this.bbar=new Ext.Toolbar({cls:"x-form-item x-form-item-label",items:this.bottombar,autoWidth:true,renderTo:d})}if(this.storeAutoLoad){this.store.load({params:{start:0,limit:this.usePaging?this.pageSize:0}})}},setMasterValue:function(f,g,e){if(this.masterValueData&&this.masterValueData[f]!==undefined){if(!e){this.masterValues[f]=g}var b=this.getSelectedNodes();for(var c=0;c<this.masterValueData[f].columns.length;c++){var d=this.masterValueData[f].columns[c]}if(!e){this.resetResults()}}},clearMasterValue:function(g,f){if(this.masterValueData&&this.masterValueData[g]!==undefined){this.masterValues[g]=null;var c=this.getColumnModel();for(var d=0;d<this.masterValueData[g].columns.length;d++){var e=this.masterValueData[g].columns[d];var b=c.getIndexById(e);if(b>=0){c.setHidden(b,false)}}if(!f){this.resetResults()}}},getMasterValues:function(){var b=[];for(var d in this.masterValues){var c=this.masterValues[d];if(c){b[d]=c}}return b},getDeleteRecordDescription:function(b){return b[this.descriptiveRecordProperty?this.descriptiveRecordProperty:this.defaultSortField]},deleteSelection:function(){var b=this.getSelectedNodes();if(b.length>0){var d="";var c=[];Ext.each(b,function(f){var e=f.data;d+=this.getDeleteRecordDescription(e)+", ";c.push(f.data)},this);d=d.substring(0,d.length-2);Ext.Msg.show({title:"Delete "+(c.length>1?c.length+" items":"one item"),msg:"Do you really want to delete <b>"+d+"</b>?<br/>There is no undo.",icon:Ext.Msg.QUESTION,buttons:Ext.Msg.YESNO,scope:this,animEl:this.btnDel.getEl(),fn:function(e){if("yes"!==e){return}if(!this.delMask){this.delMask=new Ext.LoadMask(this.getEl(),{msg:"Deleting..."})}this.delMask.show();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.delUrl,method:"POST",params:Ext.util.JSON.encode({deleteItems:c}),success:function(h,i){this.delMask.hide();var f=Ext.decode(h.responseText);if(f){if(f.totalDeleted==b.length){Ext.Msg.show({title:"Delete successful",msg:"Items have been successfully deleted.",icon:Ext.Msg.INFO,buttons:Ext.Msg.OK})}else{var g="";Ext.each(f.errors,function(m){g+='<tr><td style=""font-weight: 700"">'+this.getDeleteRecordDescription(m.item)+"</td><td>&nbsp;-&nbsp;</td><td>"+m.message+"</td></tr>"},this);Ext.Msg.show({title:"Delete failed",msg:"The following items might not have been deleted:<table>"+g+"</table>",icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK})}if(this.usePaging){var l=this.pagingBar.getPageData();var j=l.activePage;var k=l.pages;if(f.totalDeleted==this.store.getCount()){this.pagingBar.changePage((j>1&&j==k?j-1:j))}else{this.pagingBar.changePage(j)}}else{this.store.reload()}}else{this.onDelFailure(h,i)}},failure:this.onDelFailure})}})}},onDelFailure:function(c,e){var d;if(c.responseText){var b=Ext.decode(c.responseText);if(b.ErrorCode!==undefined){d=String.format("{0} (Error Code: {1}, Location: {2})",b.FaultMessage,b.ErrorCode,b.Location)}else{d=c.responseText}}Ext.Msg.show({title:"Unable to delete",msg:"<b>Could not perform delete</b><p>"+d+"</p>",icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});this.delMask.hide()},addRecord:function(){var b=new ExtPortal.WindowFormController(this.formClass,{masterValues:this.getMasterValues(),renderTo:this.el},{isPanel:false,title:"Add new Category",maximizable:true,closable:false,border:false,modal:false,renderTo:this.el});b.on("beforerender",function(){alert("render");b.maximize();b.setPosition(0,0)},this);b.on("close",this.refreshResults,this);b.show(this.btnAdd.getEl())},editRecord:function(){var b=this.getSelectedNodes();if(b.length>0){var c=new ExtPortal.WindowFormController(this.formClass,{referenceDataItem:b[0].data,masterValues:this.getMasterValues()});c.on("close",this.refreshResults,this);c.show(this.btnEdit.getEl())}},refreshResults:function(){this.store.reload()},resetResults:function(){this.store.reload()},fireSelectEvent:function(){var b=this.getSelectedRecords();var b=this.getSelectedNodes();if(b.length==1){this.fireEvent("dataItemSelected",b[0].data)}},getSelectedItems:function(){var b=[];Ext.each(this.getSelectedNodes(),function(c){b.push(c.data)});return b},clearSelected:function(){this.getSelectedNodes();this.fireEvent("selectionCleared");this.btnClear.disable()}});Ext.ns("ExtPortal");ExtPortal.ArticlesIntroList=Ext.extend(Ext.Panel,{editMode:false,useBBar:false,url:"/services/Tools/NewsArticleTranslationService.svc/List",singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",autoLoad:false,tpl:null,listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(b){return b.store.getRange().length>0}}},jsonReaderFields:null,masterValueData:{IDNewsArticle:{columns:["IDNewsArticle","FKIDNewsArticle_ValidityEndDateTime","FKIDNewsArticle_ValidityStartDateTime"]},Lang:{columns:["Lang"]},IDNewsCategory:{columns:["IDNewsCategory"]}},getCurrentTranslations:function(){var b=ExtPortal.ArticlesIntroList.translations;if(!b){b=ExtPortal.ArticlesIntroList.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();this.title=b.ArticleTitle;this.emptyText='<div style="padding:10px;">'+b.NotArticle+"</div>";this.setTemplate();this.baseCls="site-content";this.tplBack='<p style="width:90%; text-align:left;font-size:13px"><a href="#" onclick="return Loader.registerOpenControl(\'categories\', ExtPortal.CategoriesDataView);"><b>'+b.BackCategories_linkText+"</b></a></p>";this.labelBack=new Ext.form.Label({html:this.tplBack,border:true});this.jsonReaderFields=this.jsonReaderFields||[{name:"AddedBy",type:"string"},{name:"AddedDateTime",type:"date",dateFormat:"n/j/Y"},{name:"Body",type:"string"},{name:"EditedBy",type:"string"},{name:"EditedDateTime",type:"date",dateFormat:"n/j/Y"},{name:"IDNewsArticle",type:"int"},{name:"FKIDNewsArticle_ValidityEndDateTime",type:"date",dateFormat:"n/j/Y"},{name:"FKIDNewsArticle_ValidityStartDateTime",type:"date",dateFormat:"d/m/Y"},{name:"IDNewsArticleTranslation",type:"int"},{name:"Intro",type:"string"},{name:"Lang",type:"string"},{name:"Published",type:"bool"},{name:"Title",type:"string"}];this.sortData=this.sortData||[["Title","Title"],["Intro","Intro"],["Body","Body"]];this.filterField="Title";this.dvArticles=new ExtPortal.BaseDataView({listeners:this.listeners,masterValueData:this.masterValueData,masterValues:{Lang:Manager.getCurrentLang(),SelectedDate:new Date().format("m/d/Y")},jsonReaderFields:this.jsonReaderFields,sortData:this.sortData,filterField:this.filterField,tpl:this.tpl,editMode:this.editMode,useBBar:this.useBBar,url:this.url,overClass:this.overClass,itemSelector:this.itemSelector,emptyText:this.emptyText,autoLoad:this.autoLoad});this.items=[this.dvArticles,this.labelBack];ExtPortal.ArticlesIntroList.superclass.initComponent.call(this);ExtPortal.ArticlesIntroList.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.ArticlesIntroList.un("langChange",this.langChange,this);this.dvArticles.destroy()});this.dvArticles.setMasterValue("IDNewsCategory",this.IDNewsCategory);if(this.dvArticles.store){this.dvArticles.store.on("load",function(d,c){if(c.length>0){this.labelBack.hide()}else{this.labelBack.show()}},this);this.dvArticles.store.on("beforeload",function(c,d){c.baseParams.limit=this.NumberOfItems||0},this)}},changeBack:function(){var b=this.getCurrentTranslations();var c=Manager.clone(this.tplBack);c=c.replace("Back",b.BackCategories_linkText);this.labelBack.setText(c,false)},setTemplate:function(){var b=this.getCurrentTranslations();var c;if(this.IDNewsCategory){c=this.settings.TplArticlesIntroList;c=Manager.clone(c);c=new Ext.XTemplate(c.html.replace("[*IDNewsCategory*]",this.IDNewsCategory));c=new Ext.XTemplate(c.html.replace("[*IDNewsCategory*]",this.IDNewsCategory))}else{this.tpl=this.settings.TplArticlesIntroList}c=new Ext.XTemplate(c.html.replace("[*BackCategories_linkText*]",b.BackCategories_linkText));c=new Ext.XTemplate(c.html.replace("[*MoreDetails_linkText*]",b.MoreDetails_linkText));this.tpl=c;if(this.dvArticles){this.dvArticles.tpl=c}},loadArticlesIntroByLang:function(){var b=this.getCurrentTranslations();this.setTemplate();this.dvArticles.setMasterValue("Lang",Manager.getCurrentLang())},langChange:function(){var b=this.getCurrentTranslations();this.loadArticlesIntroByLang();this.setTitle(b.ArticleTitle);this.dvArticles.emptyText='<div style="padding:10px;">'+b.NotArticle+"</div>";this.changeBack()}});ExtPortal.ArticlesIntroList.referenceTranslations={NotArticle:"There are no articles",ArticleTitle:"Articles",MoreDetails_linkText:"more details&gt;",BackCategories_linkText:"&lt;Back"};Ext.apply(ExtPortal.ArticlesIntroList,new Ext.util.Observable());ExtPortal.ArticlesIntroList.addEvents("langChange");Ext.reg("articlesintro-list",ExtPortal.ArticlesIntroList);Ext.ns("ExtPortal");ExtPortal.ContactPage=Ext.extend(Ext.Panel,{border:false,labelWidth:120,autoHeight:true,buttonAlign:"center",url:"/services/ExtPortal/ExtPortalManager.svc/SendContactEmail",form:null,initComponent:function(){this.width=550;this.style="padding:10px";var b=this.getTranslations();this.store=new Ext.data.JsonStore({fields:["Name","Value","Mail"],data:this.settings.ContactPageMails});this.SendTo=new Ext.form.ComboBox({fieldLabel:b.SendTo_fieldLabel,name:"SendTo",xtype:"combo",store:this.store,anchor:"95%",tpl:'<tpl for="."><div ext:qtip="{Name}" class="x-combo-list-item" align="left">{Name}</div></tpl>',valueField:"Mail",displayField:"Name",typeAhead:true,mode:"local",triggerAction:"all",allowBlank:false,emptyText:b.SendTo_emptyText,selectOnFocus:true});if(!this.form){this.txtSubject=new Ext.form.TextField({fieldLabel:b.txtSubject_fieldLabel,name:"Subject",allowBlank:false,anchor:"95%"})}this.htmlBody=new Ext.form.HtmlEditor({cls:"x-plain",fieldLabel:b.htmlBody_fieldLabel,allowBlank:false,hideLabel:true,autoScroll:true,name:"Body",anchor:"95% -53"});this.form=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[this.SendTo,this.txtSubject,this.htmlBody]});this.content={html:this.itemHtml||this.settings.TplContactPage.applyTemplate(),bodyStyle:"background:transparent",border:false};this.items=[this.content,this.form];this.btnSend=new Ext.Button({text:b.btnSend_fieldLabel,scope:this,handler:this.sendMessage});this.btnClose=new Ext.Button({text:b.btnClose_fieldLabel,ctCls:"x-btn-black",handler:function(){Loader.openControl("home")}});this.buttons=[this.btnSend,this.btnClose];ExtPortal.ContactPage.superclass.initComponent.apply(this,arguments);ExtPortal.ContactPage.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.ContactPage.un("langChange",this.langChange,this)})},sendMessage:function(){if(this.form.getForm().isValid()){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({Body:this.form.getForm().getValues().Body,Subject:this.form.getForm().getValues().Subject,SendTo:this.SendTo.getValue()}),success:function(c,d){var b=Ext.decode(c.responseText);if(b.success){if(this.form.getForm().isValid()){this.remove(this.form);this.insert(1,{html:this.settings.ContactPageSuccessMsg,border:false,bodyStyle:"padding:10px;background:transparent"});this.doLayout()}}else{this.onLoadFailure(c,d)}},failure:function(b,c){this.onLoadFailure(b,c)}})}},langChange:function(){var b=this.getTranslations();this.SendTo.setLabel(b.SendTo_fieldLabel);this.txtSubject.setLabel(b.txtSubject_fieldLabel);this.htmlBody.setLabel(b.htmlBody_fieldLabel);this.btnSend.setText(b.btnSend_fieldLabel);this.btnClose.setText(b.btnClose_fieldLabel);this.setTitle(b.ContactPage_Title)},getTranslations:function(){var b=ExtPortal.ContactPage.translations;if(!b){b=ExtPortal.ContactPage.referenceTranslations}return b}});ExtPortal.ContactPage.referenceTranslations={ContactPage_Title:"Coordonate de contact:",SendTo_emptyText:"Please select ...",SendTo_loadingText:"Loading...",SendTo_fieldLabel:"Send To",txtSubject_fieldLabel:"Subject",htmlBody_fieldLabel:"Body",btnSend_fieldLabel:"Send",btnClose_fieldLabel:"Close"};Ext.apply(ExtPortal.ContactPage,new Ext.util.Observable());ExtPortal.ContactPage.addEvents("langChange");Ext.reg("contact-page",ExtPortal.ContactPage);Ext.ns("ExtPortal");ExtPortal.PreviewArticle=Ext.extend(Ext.Panel,{border:false,labelWidth:120,iconCls:"tabs",enableTabScroll:true,animScroll:true,autoScroll:true,layout:"form",closable:true,autoHeight:true,url:"/services/Tools/NewsArticleTranslationService.svc/Load",IDNewsCategory:null,ArticleID:null,initComponent:function(){var b=this.getCurrentTranslations();this.title=b.ArticleTitle;this.loadArticle();this.id="article"+this.ArticleID;this.content=new Ext.form.Label({html:b.LoadingMessage});this.gridCommentsList=new ExtPortal.NewsCommentGrid({editMode:false,cls:"x-grid3-hd-expander-on",autoHeight:true,hideHeaders:true,usePaging:false,masterValues:{IDNewsArticle:this.IDNewsArticle},viewConfig:{forceFit:true,enableRowBody:true,showPreview:false}});this.gridCommentsList.topToolbar=[];this.formNewComment=new ExtPortal.NewsCommentForm({parentWin:this,IDNewsArticle:this.IDNewsArticle,usePaging:false,frame:false});this.chkShowOnlyForTheSelectedLang=new Ext.ux.form.XCheckbox({name:"ShowOnlyForTheSelectedLang",fieldLabel:b.chkShowOnlyForTheSelectedLang_fieldLabel,listeners:{check:{fn:function(d,c){if(c==true){this.gridCommentsList.setMasterValue("Lang",Manager.getCurrentLang())}else{this.gridCommentsList.clearMasterValue("Lang",true)}},scope:this}}});this.formNewComment.on("afterSetValues",function(c){this.gridCommentsList.getStore().load();this.formNewComment.getForm().reset()},this);this.items=[this.content,this.gridCommentsList,{html:"<br/>",border:false},this.chkShowOnlyForTheSelectedLang,this.formNewComment];ExtPortal.PreviewArticle.superclass.initComponent.apply(this,arguments);ExtPortal.PreviewArticle.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.PreviewArticle.un("langChange",this.langChange,this)})},langChange:function(){var b=this.getCurrentTranslations();this.chkShowOnlyForTheSelectedLang.setLabel(b.chkShowOnlyForTheSelectedLang_fieldLabel);this.loadArticleByLang()},loadArticle:function(){var b=this.getCurrentTranslations();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({dataItem:{IDNewsArticleTranslation:this.ArticleID}}),success:function(d,f){var c=Ext.decode(d.responseText);this.ContentText=c.Body;if(c){c.IDNewsCategory=this.IDNewsCategory;var e=this.getCurrentTranslations();var g=this.settings.TplPreviewArticle;c.Back_linkText=e.Back_linkText;this.content.setText(g.applyTemplate(c),false)}else{this.content.setText("",false)}this.setTitle(c.Title)},failure:function(d,f){var e="";if(d.responseText){var c=Ext.decode(d.responseText);if(c.ErrorCode!==undefined){e=String.format("{0} (Error Code: {1}, Location: {2})",c.FaultMessage,c.ErrorCode,c.Location)}else{e=d.responseText}}var g='<p style="font-weight:700">'+b.NotSent+"</p><p>"+b.Retry+"</p><br/>"+e;Ext.Msg.show({title:b.TitleError,msg:Ext.util.Format.ellipsis(g,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(g).length?360:600});this.content.setText("",false)}})},loadArticleByLang:function(){var b=this.getCurrentTranslations();Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({dataItem:{IDNewsArticle:this.IDNewsArticle,Lang:Manager.getCurrentLang()}}),success:function(d,f){var c=Ext.decode(d.responseText);this.ContentText=c.Body;if(c){this.ContentText=c.Body;c.IDNewsCategory=this.IDNewsCategory;var e=this.getCurrentTranslations();var g=this.settings.TplPreviewArticle;c.Back_linkText=e.Back_linkText;this.content.setText(g.applyTemplate(c),false)}else{this.content.setText("",false)}this.setTitle(c.Title)},failure:function(d,f){var e="";if(d.responseText){var c=Ext.decode(d.responseText);if(c.ErrorCode!==undefined){e=String.format("{0} (Error Code: {1}, Location: {2})",c.FaultMessage,c.ErrorCode,c.Location)}else{e=d.responseText}}var g='<p style="font-weight:700">'+b.NotSent+"</p><p>"+b.Retry+"</p><br/>"+e;Ext.Msg.show({title:b.TitleError,msg:Ext.util.Format.ellipsis(g,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(g).length?360:600});this.content.setText("",false)}})},getCurrentTranslations:function(){var b=ExtPortal.PreviewArticle.translations;if(!b){b=ExtPortal.PreviewArticle.referenceTranslations}return b}});ExtPortal.PreviewArticle.referenceTranslations={LoadingMessage:"Loading...",Retry:"Please try again.",NotSent:"NotSent",TitleError:"Error",ArticleTitle:"Article",Back_linkText:"&lt;Back",chkShowOnlyForTheSelectedLang_fieldLabel:"Show Only For The Selected Lang"};Ext.apply(ExtPortal.PreviewArticle,new Ext.util.Observable());ExtPortal.PreviewArticle.addEvents("langChange");Ext.reg("preview-article",ExtPortal.PreviewArticle);Ext.ns("ExtPortal");ExtPortal.SiteMap=Ext.extend(Ext.Panel,{border:false,closable:true,autoHeight:true,title:"Site Map",url:"/services/ExtPortal/ContentService.svc",tree:null,initComponent:function(){this.width=550;this.style="padding:10px";var b=this.getTranslations();this.contentTreeLoader=new ExtPortal.ContentTreeLoader({dataUrl:this.url+"/GetNode",requestMethod:"POST",methodName:"GetNode",listeners:{beforeload:{fn:function(d,c){d.baseParams.Lang=Manager.getCurrentLang()},scope:this}}});this.tree=new Ext.tree.TreePanel({collapsible:false,animCollapse:false,border:false,enableDD:false,id:((this.id)?("tree-"+this.id):"SiteMapTree"),autoScroll:true,useArrows:true,bodyStyle:"background:transparent",animate:true,rootVisible:false,containerScroll:true,height:"90%",width:400,loader:this.contentTreeLoader});this.tree.on("click",Loader.loadMenuItem,Loader);this.contentRoot=new Ext.tree.AsyncTreeNode({text:"Home",draggable:false,expanded:true,id:"0"});this.tree.setRootNode(this.contentRoot);this.tree.on("load",function(){this.tree.getRootNode().expand(true)},this);this.title=b.SiteMap_Title;this.id=((this.id)?(this.id):"SiteMap");this.content=new Ext.form.Label({html:"Loading..."});this.items=[this.tree];ExtPortal.SiteMap.superclass.initComponent.apply(this,arguments);ExtPortal.SiteMap.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.SiteMap.un("langChange",this.langChange,this)})},langChange:function(){var b=this.getTranslations();this.tree.getRootNode().reload();this.setTitle(b.SiteMap_Title)},getTranslations:function(){var b=ExtPortal.SiteMap.translations;if(!b){b=ExtPortal.SiteMap.referenceTranslations}return b}});ExtPortal.SiteMap.referenceTranslations={SiteMap_Title:"Site Map"};Ext.apply(ExtPortal.SiteMap,new Ext.util.Observable());ExtPortal.SiteMap.addEvents("langChange");Ext.reg("site-map",ExtPortal.SiteMap);Ext.ns("ExtPortal");ExtPortal.Search=Ext.extend(Ext.Panel,{border:false,autoScroll:true,frame:true,autoHeight:true,SearchFieldID:"SearchTop",url:"/services/ExtPortal/SearchService.svc/Search",SearchFieldID:null,SearchField:null,SearchText:null,initComponent:function(){this.width=610;var b=this.getTranslations();this.title=b.SearchTitle_text||"Cauta";this.settings=this.settings||ExtPortal.Settings;this.searchContentItems=this.settings.SearchContentItemsDefault;this.searchNewsComment=this.settings.SearchNewsCommentDefault;this.searchNewsArticleTranslation=this.settings.SearchNewsArticleTranslationDefault;this.searchEventListTranslation=this.settings.SearchEventListTranslationDefault;this.chkSearchByLang=false;this.SearchField=(Ext.get(this.SearchFieldID))?Ext.get(this.SearchFieldID).dom:null;this.SearchText=this.SearchText||((this.SearchField)?this.SearchField.value:"");if(this.SearchField){this.SearchField.value=""}this.on("destroy",this.onDestroy,this);this.gridResults=new ExtPortal.SearchGrid({editMode:false,autoWidth:true,autoHeight:true,hideHeaders:true,cls:"noborder",border:false,storeAutoLoad:false,viewConfig:{forceFit:true}});this.gridResults.btnClear.hidden=true;this.gridResults.topToolbar=[this.gridResults.btnClear];this.gridResults.getStore().autoLoad=false;this.gridResults.getStore().on("beforeload",function(c,d){c.baseParams.SearchOptions={SearchText:this.SearchText,Lang:Manager.getCurrentLang(),SearchByLang:this.searchByLang,SearchText:this.SearchText,SearchContentItems:this.searchContentItems,SearchNewsComment:this.searchNewsComment,SearchNewsArticleTranslation:this.searchNewsArticleTranslation,SearchEventListTranslation:this.searchEventListTranslation,SearchNewsCategoryTranslation:(this.chkSearchNewsCategoryTranslation)?this.chkSearchNewsCategoryTranslation.getValue():this.settings.SearchNewsCategoryTranslationDefault}},this);this.on("afterlayout",function(){if(this.SearchText.length>0){this.search("render")}},this);this.chkSearchByLang=new Ext.ux.form.XCheckbox({name:"SearchByLang",listeners:{check:{fn:function(c,d){this.searchByLang=d},scope:this}},fieldLabel:b.SearchByLang_fieldLabel});this.chkSearchContentItems=new Ext.ux.form.XCheckbox({name:"SearchContentItems",checked:this.settings.SearchContentItemsDefault,listeners:{check:{fn:function(c,d){this.searchContentItems=d},scope:this}},fieldLabel:b.SearchContentItems_fieldLabel});this.chkSearchNewsComment=new Ext.ux.form.XCheckbox({name:"SearchNewsComment",checked:this.settings.SearchNewsCommentDefault,listeners:{check:{fn:function(c,d){this.searchNewsComment=d},scope:this}},fieldLabel:b.SearchNewsComment_fieldLabel});this.chkSearchNewsArticleTranslation=new Ext.ux.form.XCheckbox({name:"SearchNewsArticleTranslation",checked:this.settings.SearchNewsArticleTranslationDefault,listeners:{check:{fn:function(c,d){this.searchNewsArticleTranslation=d},scope:this}},fieldLabel:b.SearchNewsArticleTranslation_fieldLabel});this.chkSearchEventListTranslation=new Ext.ux.form.XCheckbox({name:"SearchEventListTranslation",checked:this.settings.SearchEventListTranslationDefault,listeners:{check:{fn:function(c,d){this.searchEventListTranslation=d},scope:this}},fieldLabel:b.SearchEventListTranslation_fieldLabel});this.chkSearchNewsCategoryTranslation=new Ext.ux.form.XCheckbox({name:"SearchNewsCategoryTranslation",checked:this.settings.SearchNewsCategoryTranslationDefault,listeners:{check:{fn:function(c,d){this.searchNewsCategoryTranslation=d},scope:this}},fieldLabel:b.SearchNewsCategoryTranslation_fieldLabel});this.fieldsetOptions=new Ext.form.FieldSet({title:b.AdvancedOptions_fieldLabel,autoHeight:true,layout:"table",collapsible:true,collapsed:true,items:[{columnWidth:0.5,layout:"form",border:false,bodyStyle:"padding:0;padding-right:25px",items:[this.chkSearchByLang,this.chkSearchContentItems,this.chkSearchEventListTranslation]},{columnWidth:0.5,layout:"form",border:false,items:[this.chkSearchNewsCategoryTranslation,this.chkSearchNewsArticleTranslation,this.chkSearchNewsComment]}]});this.txtSearch=new Ext.form.TextField({name:"SearchText",value:this.SearchText,listeners:{specialkey:{fn:function(c,d){if(d.getKey()==13){this.SearchText=this.txtSearch.getValue();this.search("key")}},scope:this}}});this.txtSearchLabel=new Ext.form.Label({html:b.SearchText_fieldLabel});this.btnSearch=new Ext.Button({text:b.Search_buttonText,handler:function(){this.SearchText=this.txtSearch.getValue();this.search("same text")},scope:this});this.formSearch=new Ext.form.FormPanel({defaultType:"textfield",border:false,autoHeight:true,bodyStyle:"padding:0px 0px 0px 7px",defaults:{anchor:"-24"},labelWidth:200,monitorValid:true,items:[{xtype:"fieldset",border:false,layout:"table",bodyStyle:"padding: 5px; ",autoHeight:true,autoWidth:true,layoutConfig:{columns:3},items:[this.txtSearchLabel,this.txtSearch,this.btnSearch]},this.fieldsetOptions]});this.on("render",function(){this.map2=new Ext.KeyMap(this.id,{key:13,ctrl:true,scope:this,fn:function(){alert("key map");this.SearchText=this.txtSearch.getValue();this.search("key")}})},this);SessionData.on("login",this.onLogin,this);SessionData.on("logout",this.onLogout,this);this.items=[this.formSearch,this.gridResults];ExtPortal.Search.superclass.initComponent.apply(this,arguments);ExtPortal.Search.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.Search.un("langChange",this.langChange,this);SessionData.un("login",this.onLogin);SessionData.un("logout",this.onLogout)})},onLogout:function(){this.search("logout")},onLogin:function(){this.search("login")},langChange:function(){if(this.chkSearchByLang.getValue()==true){this.search("langChange")}var b=this.getTranslations();this.chkSearchByLang.setLabel(b.SearchByLang_fieldLabel);this.btnSearch.setText(b.Search_buttonText);this.txtSearchLabel.setText(b.SearchText_fieldLabel);this.fieldsetOptions.setTitle(b.AdvancedOptions_fieldLabel);this.chkSearchNewsComment.setLabel(b.SearchNewsComment_fieldLabel);this.chkSearchContentItems.setLabel(b.SearchContentItems_fieldLabel);this.chkSearchNewsArticleTranslation.setLabel(b.SearchNewsArticleTranslation_fieldLabel);this.chkSearchEventListTranslation.setLabel(b.SearchEventListTranslation_fieldLabel);this.chkSearchNewsCategoryTranslation.setLabel(b.SearchNewsCategoryTranslation_fieldLabel)},search:function(b){Ext.History.add(Manager.getCurrentLang()+"/search:"+this.SearchText);if(this.SearchText.length>0){if(this.gridResults.usePaging){this.gridResults.pagingBar.changePage(1)}else{this.gridResults.getStore().reload()}}},getTranslations:function(){var b=ExtPortal.Search.translations;if(!b){b=ExtPortal.Search.referenceTranslations}return b}});ExtPortal.Search.referenceTranslations={Search_buttonText:"Search",SearchTitle_text:"Cauta",SearchByLang_fieldLabel:"Search only in the selected language",SearchText_fieldLabel:"Enter search terms &nbsp;",AdvancedOptions_fieldLabel:"Advanced Options",SearchContentItems_fieldLabel:"Search Pages",SearchNewsComment_fieldLabel:"Search News Comments",SearchNewsArticleTranslation_fieldLabel:"Search News Article Translations",SearchEventListTranslation_fieldLabel:"Search Event List Translation",SearchContentTree_fieldLabel:"Search Content Tree",SearchNewsCategoryTranslation_fieldLabel:"Search News Category Translation"};Ext.apply(ExtPortal.Search,new Ext.util.Observable());ExtPortal.Search.addEvents("langChange");Ext.reg("search-panel",ExtPortal.Search);Ext.ns("ExtPortal");ExtPortal.WeatherDataView=Ext.extend(Ext.Panel,{editMode:false,useBBar:false,url:"/services/ExtPortal/ContentService.svc/getRssWeather",singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(b){return b.store.getRange().length>0}}},initComponent:function(){var b=this.getCurrentTranslations();this.emptyText='<div style="padding:10px;">'+b.NoWeather+"</div>";this.tpl=this.settings.TplRssWeather;this.jsonReaderFields=[{name:"Date",type:"date",dateFormat:"d/m/Y"},{name:"Title",type:"string"},{name:"Description",type:"string"},{name:"Link",type:"string"}];this.sortData=[["Date","Date"],["Title","Title"],["Description","Description"],["Link","Link"]];this.filterField="Title";this.title=b.TitleWeather;this.dvWeather=new ExtPortal.BaseDataView({filterField:this.filterField,sortData:this.sortData,jsonReaderFields:this.jsonReaderFields,tpl:this.tpl,mptyText:this.emptyText,store:this.store,editMode:this.editMode,useBBar:this.useBBar,url:this.url,singleSelect:this.singleSelect,overClass:this.overClass,itemSelector:this.itemSelector},this.initConfig);this.items=[this.dvWeather];ExtPortal.WeatherDataView.superclass.initComponent.apply(this,arguments);ExtPortal.WeatherDataView.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.WeatherDataView.un("langChange",this.langChange,this)})},getCurrentTranslations:function(){var b=ExtPortal.WeatherDataView.translations;if(!b){b=ExtPortal.WeatherDataView.referenceTranslations}return b},langChange:function(){var b=this.getCurrentTranslations();this.setTitle(b.TitleWeather);this.dvWeather.emptyText='<div style="padding:10px;">'+b.NoWeather+"</div>"}});ExtPortal.WeatherDataView.referenceTranslations={TitleWeather:"Weather",NoWeather:"There are no weather information"};Ext.apply(ExtPortal.WeatherDataView,new Ext.util.Observable());ExtPortal.WeatherDataView.addEvents("langChange");Ext.reg("weather-dataview",ExtPortal.WeatherDataView);Ext.ns("ExtPortal");ExtPortal.TraficDataView=Ext.extend(Ext.Panel,{editMode:false,useBBar:false,url:"/services/ExtPortal/ContentService.svc/getRssTrafic",singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(b){return b.store.getRange().length>0}}},initComponent:function(){var b=this.getCurrentTranslations();this.title=b.InfoTitle;this.emptyText='<div style="padding:10px;">'+b.NoData+"</div>";this.tpl=this.settings.TplRssTrafic;this.jsonReaderFields=[{name:"Date",type:"date",dateFormat:"d/m/Y"},{name:"Title",type:"string"},{name:"Description",type:"string"},{name:"Link",type:"string"}];this.sortData=[["Date","Date"],["Title","Title"],["Description","Description"],["Link","Link"]];this.filterField="Title";this.dwTrafic=new ExtPortal.BaseDataView({filterField:this.filterField,sortData:this.sortData,jsonReaderFields:this.jsonReaderFields,tpl:this.tpl,store:this.store,emptyText:this.emptyText,width:"95%",editMode:this.editMode,useBBar:this.useBBar,url:this.url,singleSelect:this.singleSelect,overClass:this.overClass,itemSelector:this.itemSelector},this.initConfig);this.items=[this.dwTrafic];ExtPortal.TraficDataView.superclass.initComponent.apply(this,arguments);ExtPortal.TraficDataView.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.TraficDataView.un("langChange",this.langChange,this)})},langChange:function(){var b=this.getCurrentTranslations();this.setTitle(b.InfoTitle)},getCurrentTranslations:function(){var b=ExtPortal.TraficDataView.translations;if(!b){b=ExtPortal.TraficDataView.referenceTranslations}return b}});ExtPortal.TraficDataView.referenceTranslations={NoData:"There are no data from Trafic",InfoTitle:"Info Trafic"};Ext.apply(ExtPortal.TraficDataView,new Ext.util.Observable());ExtPortal.TraficDataView.addEvents("langChange");Ext.reg("trafic-dataview",ExtPortal.TraficDataView);Ext.ns("ExtPortal");ExtPortal.SesizariPage=Ext.extend(Ext.Panel,{border:false,labelWidth:120,autoHeight:true,buttonAlign:"center",url:"/services/ExtPortal/ExtPortalManager.svc/SendSesizariEmail",form:null,initComponent:function(){Manager.on("LanguageChanged",this.languageChanged,this);this.on("destroy",this.onDestroy,this);this.storeSubject=new Ext.data.JsonStore({fields:["Name","Value"],data:this.settings.SesizariPageSubjects});this.Subject=new Ext.form.ComboBox({fieldLabel:"Subject",name:"Subject",xtype:"combo",store:this.storeSubject,anchor:"95%",tpl:'<tpl for="."><div ext:qtip="{Name}" class="x-combo-list-item" align="left">{Name}</div></tpl>',valueField:"Value",displayField:"Name",typeAhead:true,mode:"local",triggerAction:"all",allowBlank:false,emptyText:"Please select ...",selectOnFocus:true});if(!this.form){this.form=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[this.Subject,{fieldLabel:"SendTo",name:"SendTo",allowBlank:false,value:this.settings.SesizariPageMails[0].Mail,anchor:"95%",hidden:true,hideLabel:true},{fieldLabel:"From",name:"From",vtype:"email",allowBlank:false,anchor:"95%"},{cls:"x-plain",xtype:"htmleditor",fieldLabel:"Body",allowBlank:false,hideLabel:true,autoScroll:true,name:"Body",anchor:"95% -53"}]})}this.content={html:this.settings.TplSesizariPage.applyTemplate(),bodyStyle:"background:transparent",border:false};this.items=[this.content,this.form];this.buttons=[{text:"Send",scope:this,handler:this.sendMessage},{text:"Cancel"}];ExtPortal.SesizariPage.superclass.initComponent.apply(this,arguments)},sendMessage:function(){Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({Body:this.form.getForm().getValues().Body,From:this.form.getForm().getValues().From,Subject:this.form.getForm().getValues().Subject,SendTo:this.SendTo.getValue()}),success:function(c,d){var b=Ext.decode(c.responseText);if(b.success){if(this.form.getForm().isValid()){this.remove(this.form);this.insert(1,{html:this.settings.SesizariPageSuccessMsg,bodyStyle:"padding:10px;background:transparent"});this.doLayout()}}else{var e='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(e,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(e).length?360:600})}},failure:function(b,c){var d='<p style="font-weight:700"> The request might not have been sent.</p><p>Please try again.</p>';Ext.Msg.show({title:"Error",msg:Ext.util.Format.ellipsis(d,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(d).length?360:600})}})},languageChanged:function(){},onDestroy:function(b){Manager.un("LanguageChanged",this.languageChanged,this)}});Ext.reg("sesizari-page",ExtPortal.SesizariPage);Ext.ns("ExtPortal");ExtPortal.CategoriesDataView=Ext.extend(Ext.Panel,{editMode:false,useBBar:false,url:"/services/Tools/NewsCategoryTranslationService.svc/List",singleSelect:true,multiSelect:true,overClass:"x-view-over",itemSelector:"div.title",tpl:null,dvNotice:null,listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(b){return b.store.getRange().length>0}}},initComponent:function(){var b=this.getTranslations();this.title=b.CategoriesTitle;this.emptyText='<div style="padding:10px;">'+b.NoCategories+"</div>";var b=this.getTranslations();this.setTemplate();this.jsonReaderFields=[{name:"IDNewsCategory",type:"int"},{name:"Name",type:"string"},{name:"Description",type:"string"}];this.sortData=[["Name","Name"],["Description","Description"]];this.filterField="Name";this.dvNotice=new ExtPortal.BaseDataView({listeners:this.listeners,masterValueData:this.masterValueData,jsonReaderFields:this.jsonReaderFields,sortData:this.sortData,filterField:this.filterField,masterValueData:{IDNewsCategory:{columns:["IDNewsCategory"]},Lang:{columns:["Lang"]}},masterValues:{Lang:Manager.getCurrentLang()},tpl:this.tpl,editMode:this.editMode,useBBar:this.useBBar,url:this.url,overClass:this.overClass,itemSelector:this.itemSelector,emptyText:this.emptyText,autoLoad:this.autoLoad});this.items=[this.dvNotice];ExtPortal.CategoriesDataView.superclass.initComponent.apply(this,arguments);ExtPortal.CategoriesDataView.on("langChange",this.langChange,this);this.on("destroy",function(){this.dvNotice.suspendEvents();this.dvNotice.destroy();ExtPortal.CategoriesDataView.un("langChange",this.langChange,this)})},setTemplate:function(){var b=this.getTranslations();if(this.IDNewsCategory){var c=this.tpl||this.settings.TplCategoriesDataView;this.tpl=new Ext.XTemplate(c.html.replace("[*IDNewsCategory*]",this.IDNewsCategory))}else{this.tpl=this.settings.TplCategoriesDataView}this.tpl=Manager.clone(this.tpl);this.tpl=new Ext.XTemplate(this.tpl.html.replace("[*ViewArticles_linkText*]",b.ViewArticles_linkText))},loadCategoriesByLang:function(){var b=this.getTranslations();this.setTemplate();this.tpl=this.tpl||this.settings.TplCategoriesDataView;this.dvNotice.tpl=this.tpl;this.dvNotice.setMasterValue("Lang",Manager.getCurrentLang())},getTranslations:function(){var b=ExtPortal.CategoriesDataView.translations;if(!b){b=ExtPortal.CategoriesDataView.referenceTranslations}return b},langChange:function(){this.loadCategoriesByLang();var b=this.getTranslations();this.setTitle(b.CategoriesTitle)}});ExtPortal.CategoriesDataView.referenceTranslations={NoCategories:"There are no categories",Loading:"Please wait.Loading...",CategoriesTitle:"Categories",ViewArticles_linkText:"View Articles ghgfdgh",Retry:"Please try again.",NotSent:"Not Sent"};Ext.apply(ExtPortal.CategoriesDataView,new Ext.util.Observable());ExtPortal.CategoriesDataView.addEvents("langChange");Ext.reg("categories-dataview",ExtPortal.CategoriesDataView);Ext.ns("ExtPortal");ExtPortal.PreviewEvent=Ext.extend(Ext.Panel,{border:false,labelWidth:120,animScroll:true,autoScroll:true,autoHeight:true,title:null,url:"/services/Tools/EventListTranslationService.svc/List",overClass:"x-view-over",itemSelector:"div.thumb-wrap",initComponent:function(){var b=this.getCurrentTranslations();this.title=b.EventTitle;ExtPortal.PreviewEvent.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.PreviewEvent.un("langChange",this.langChange,this)});this.tpl=this.settings.TplPreviewEvent;this.sortData=[["Name","Name"],["Text","Text"]];this.filterField="Name";this.jsonReaderFields=[{name:"Name",type:"string"},{name:"Text",type:"string"},{name:"FKIDEventList_ValidityStartDateTime",type:"string"},{name:"FKIDEventList_ValidityEndDateTime",type:"string"}];this.tplBack='<p style="width:90%; text-align:left;font-size:13px"><b><a href="#" onclick= "return Ext.History.add(\'home\');">'+b.PreviewEventBack_linkText+"</b></a></p>";this.labelBack=new Ext.form.Label({html:this.tplBack,border:true});this.emptyText='<div style="padding:10px;font-weight:bold;font-family:Verdana">'+b.NoEvents_emptyText+"</div>";this.dwEvenimente=new ExtPortal.BaseDataView({filterField:this.filterField,root:"Rows",masterValueData:{Lang:{columns:["Lang"]}},masterValues:{SelectedDate:this.Data.format("m/d/Y"),Lang:Manager.getCurrentLang()},sortData:this.sortData,jsonReaderFields:this.jsonReaderFields,tpl:this.tpl,emptyText:this.emptyText,width:"95%",autoHeight:true,editMode:false,useBBar:false,url:this.url,singleSelect:true,overClass:this.overClass,itemSelector:this.itemSelector,prepareData:this.formatData.createDelegate(this)},this.initConfig);this.items=[this.dwEvenimente,this.labelBack];ExtPortal.PreviewEvent.superclass.initComponent.apply(this,arguments)},formatData:function(b){b.FKIDEventList_ValidityEndDateTime=new Date(b.FKIDEventList_ValidityEndDateTime).format("d-M-Y");b.FKIDEventList_ValidityStartDateTime=new Date(b.FKIDEventList_ValidityStartDateTime).format("d-M-Y");return b},loadEvent:function(){this.dwEvenimente.store.load()},getCurrentTranslations:function(){var b=ExtPortal.PreviewEvent.translations;if(!b){b=ExtPortal.PreviewEvent.referenceTranslations}return b},langChange:function(){var b=this.getCurrentTranslations();this.loadEvent();this.setTitle(b.EventTitle);var c=Manager.clone(this.tplBack);c=c.replace("Back",b.PreviewEventBack_linkText);this.labelBack.setText(c,false);this.dwEvenimente.tpl=this.tpl;this.dwEvenimente.setMasterValue("Lang",Manager.getCurrentLang())}});ExtPortal.PreviewEvent.referenceTranslations={EventTitle:"Events",NoEvents_emptyText:"There are no events for the selected day",PreviewEventBack_linkText:"&lt;Back"};Ext.apply(ExtPortal.PreviewEvent,new Ext.util.Observable());ExtPortal.PreviewEvent.addEvents("langChange");Ext.reg("preview-event",ExtPortal.PreviewEvent);Ext.ns("ExtPortal");ExtPortal.ConfirmRegistration=Ext.extend(Ext.Panel,{border:false,labelWidth:120,iconCls:"tabs",enableTabScroll:true,animScroll:true,autoScroll:true,closable:true,autoHeight:true,getCurrentTranslations:function(){var b=ExtPortal.ConfirmRegistration.translations;if(!b){b=ExtPortal.ConfirmRegistration.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();ExtPortal.ConfirmRegistration.on("langChange",this.langChange,this);var c=b[SessionData.getCookie("ServerResponse")];this.title=b.RegistrationTitle;this.id="about";this.content=new Ext.form.Label({html:'<div style="float:left; margin-left:10%"><br/> <br/> <br/> <p>     <b style=""><span style="font-size: 10pt; line-height: 115%; font-family: Verdana"> '+c+"</span><b/> </p> <br/> <br/></div>"});SessionData.deleteCookie("ConfirmRegistration");this.items=[this.content];ExtPortal.ConfirmRegistration.superclass.initComponent.apply(this,arguments)},langChange:function(){this.setTitle(_tran.RegistrationTitle)},destroy:function(){ExtPortal.ConfirmRegistration.un("langChange",this.langChange,this);ExtPortal.ConfirmRegistration.superclass.destroy.call(this,arguments)}});ExtPortal.ConfirmRegistration.referenceTranslations={reluati_procesul_de_inregistrare:"Ne pare rau, dar contul dvs. nu a putut fi activat. Va rugam sa reluati procesul de inregistrare.",cont_activat:"Contul a fost activat cu succes.",felicitari:"Felicitari",RegistrationTitle:"Registration",ContNeactivat_Text:"Ne pare rau, dar contul dvs. nu a putut fi activat. Va rugam sa reluati procesul de inregistrare.",ContDejaActivat_text:"Contul dvs. a fost deja activat. Va rugam folositi casuta de login din partea stanga a paginii pentru a va autentifica.",ContDezactivat_Text:"contul tau a fost dezactivat cu succes."};Ext.apply(ExtPortal.ConfirmRegistration,new Ext.util.Observable());ExtPortal.ConfirmRegistration.addEvents("langChange");Ext.reg("confirmregistration-panel",ExtPortal.ConfirmRegistration);Ext.ns("ExtPortal");ExtPortal.SearchGrid=Ext.extend(ExtPortal.BaseGrid,{url:"/services/ExtPortal/SearchService.svc/Search",isTranslatable:true,masterValueData:{Lang:{columns:["Lang"]},SearchOptions:{columns:[]},SearchText:{columns:[]}},filterArray:[{dataIndex:"Lang",type:"string"},{dataIndex:"Title",type:"string"},{dataIndex:"ShortDescription",type:"string"},{dataIndex:"DirectLink",type:"string"},{dataIndex:"Component",type:"string"}],jsonReaderFields:[{name:"Lang",type:"string"},{name:"Title",type:"string"},{name:"ShortDescription",type:"string"},{name:"DirectLink",type:"string"},{name:"Component",type:"string"}],viewConfig:{forceFit:true,enableRowBody:true,showPreview:true},defaultSortField:"Title",gridColumns:[{id:"SeatchItem",dataIndex:"SeatchItem",width:150,sortable:true,renderer:function(d,e,c){var b=String.format('<b><a href="#" onclick="Loader.navigateToPath(\'{2}\'); return false;">{0}</a></b> <br/><span style="display: block!IMPORTANT; white-space: pre-wrap!IMPORTANT ;width : 400px!IMPORTANT; overflow:vizible" class="Article"> {1}</span><br/><br/>',c.data.Title,c.data.ShortDescription,c.data.DirectLink,c.data.Lang);return b}},{id:"Lang",dataIndex:"Lang",width:150,hidden:true,sortable:true}],descriptiveRecordProperty:"Title",initComponent:function(){ExtPortal.SearchGrid.superclass.initComponent.call(this);ExtPortal.SearchGrid.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.SearchGrid.un("langChange",this.langChange,this)})},getTranslations:function(){var b=ExtPortal.SearchGrid.translations;if(!b){b=ExtPortal.SearchGrid.referenceTranslations}return b}});ExtPortal.SearchGrid.referenceTranslations={Lang_headerText:"Lang",SeatchItem_headerText:"Search results "};Ext.apply(ExtPortal.SearchGrid,new Ext.util.Observable());ExtPortal.SearchGrid.addEvents("langChange");Ext.reg("search-grid",ExtPortal.SearchGrid);Ext.ns("ExtPortal");ExtPortal.HomeDatePicker=Ext.extend(Ext.DatePicker,{style:"border:none;padding:0px",ctCls:"homepicker",disabledDates:["."],showToday:false,url:"/services/Tools/EventListTranslationService.svc/List",getCurrentTranslations:function(){var b=ExtPortal.HomeDatePicker.translations;if(!b){b=ExtPortal.HomeDatePicker.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();this.disabledDatesText=b.NoEvent;this.value=new Date();ExtPortal.HomeDatePicker.superclass.initComponent.apply(this,arguments);this.on("select",function(c,d){Loader.registerOpenControl("preview-event-"+d.format("d.m.y"),ExtPortal.PreviewEvent,{Data:d})},this)},update:function(b,c){ExtPortal.HomeDatePicker.superclass.update.apply(this,arguments);this.loadMonthEvents(b)},loadMonthEvents:function(d){var c=d;if(this.currentMonth==c.getMonth()){return}this.currentMonth=d.getMonth();this.setValue(d);var b=c.clone();b=b.add(Date.DAY,-6-c.getDate());var e=c.clone();e=e.add(Date.DAY,9+c.getDaysInMonth()-c.getDate());Ext.lib.Ajax.defaultPostHeader="application/json";Ext.Ajax.request({scope:this,url:this.url,method:"POST",params:Ext.util.JSON.encode({start:0,limit:0,sort:"IDEvent",dir:"ASC",filter:[{field:"FKIDEventList_ValidityStartDateTime",data:{value:b.format("m/d/Y"),type:"DateTime",comparison:"gt"}},{field:"FKIDEventList_ValidityEndDateTime",data:{value:e.format("m/d/Y"),type:"DateTime",comparison:"lt"}},{field:"Lang",data:{value:Manager.getCurrentLang(),type:"string"}}]}),success:function(m,q){var o=Ext.decode(m.responseText);var l=o.Rows;var h=[];var g=b.clone();while(g<=e){var i=false;for(var n=0;n<o.Count;n++){var p=l[n];var f=new Date(p.FKIDEventList_ValidityStartDateTime);var k=new Date(p.FKIDEventList_ValidityEndDateTime);if((f<=g)&&(g<=k)){i=true}}if(i==false){h.push(g.format("m/d/y"))}g=g.add(Date.DAY,1)}this.setDisabledDates(h)},failure:function(g,i){var h=this.getCurrentTranslations();var f=Ext.util.JSON.decode(g.responseText);var j=f.ErrorCode;var k='<p style="font-weight:700">'+h.NotSubmit+"</p><p>"+h.Retry+"</p><br/>"+j;Ext.Msg.show({title:h.ErrorTitle,msg:Ext.util.Format.ellipsis(k,2000),icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(k).length?360:600})}})}});ExtPortal.HomeDatePicker.referenceTranslations={NoEvent:"No Event",ErrorTitle:"Error",NotSubmit:"The request might not have been sent.",Retry:"Please try again."};Ext.apply(ExtPortal.HomeDatePicker,new Ext.util.Observable());ExtPortal.HomeDatePicker.addEvents("langChange");Ext.reg("homedate-picker",ExtPortal.HomeDatePicker);Ext.ns("ExtPortal");ExtPortal.HomeIntroList=Ext.extend(Ext.Panel,{editMode:false,useBBar:false,url:"/services/Tools/NewsArticleTranslationService.svc/List",singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",autoLoad:false,tpl:null,listeners:{dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(b){return b.store.getRange().length>0}}},jsonReaderFields:null,masterValueData:{IDNewsArticle:{columns:["IDNewsArticle","FKIDNewsArticle_ValidityEndDateTime","FKIDNewsArticle_ValidityStartDateTime"]},Lang:{columns:["Lang"]},IDNewsCategory:{columns:["IDNewsCategory"]}},getCurrentTranslations:function(){var b=ExtPortal.HomeIntroList.translations;if(!b){b=ExtPortal.HomeIntroList.referenceTranslations}return b},initComponent:function(){var b=this.getCurrentTranslations();this.title=b.HomeTitle;this.emptyText='<div style="padding:10px;">'+b.NotHomeArticles+"</div>";this.setTemplate();this.width=510;this.baseCls="home-site-content";this.jsonReaderFields=this.jsonReaderFields||[{name:"AddedBy",type:"string"},{name:"AddedDateTime",type:"date",dateFormat:"n/j/Y"},{name:"Body",type:"string"},{name:"EditedBy",type:"string"},{name:"EditedDateTime",type:"date",dateFormat:"n/j/Y"},{name:"IDNewsArticle",type:"int"},{name:"FKIDNewsArticle_ValidityEndDateTime",type:"date",dateFormat:"n/j/Y"},{name:"FKIDNewsArticle_ValidityStartDateTime",type:"date",dateFormat:"d/m/Y"},{name:"IDNewsArticleTranslation",type:"int"},{name:"Intro",type:"string"},{name:"Lang",type:"string"},{name:"Published",type:"bool"},{name:"Title",type:"string"}];this.sortData=this.sortData||[["Title","Title"],["Intro","Intro"],["Body","Body"]];this.filterField="Title";this.dvHome=new ExtPortal.BaseDataView({listeners:this.listeners,masterValueData:this.masterValueData,masterValues:{Lang:Manager.getCurrentLang(),SelectedDate:new Date().format("m/d/Y")},jsonReaderFields:this.jsonReaderFields,sortData:this.sortData,filterField:this.filterField,tpl:this.tpl,editMode:this.editMode,useBBar:this.useBBar,url:this.url,overClass:this.overClass,itemSelector:this.itemSelector,emptyText:this.emptyText,autoLoad:this.autoLoad});this.items=[this.dvHome];ExtPortal.HomeIntroList.superclass.initComponent.call(this);ExtPortal.HomeIntroList.on("langChange",this.langChange,this);this.on("destroy",function(){ExtPortal.HomeIntroList.un("langChange",this.langChange,this)});if(this.dvHome.setMasterValue("IDNewsCategory",this.IDNewsCategory)){this.store.on("beforeload",function(c,d){c.baseParams.limit=this.NumberOfItems||0;this.setMasterValue("IDNewsCategory",this.IDNewsCategory)},this)}},setTemplate:function(){var b=this.getCurrentTranslations();var c;if((this.IDNewsCategory==this.settings.HomeIDNewsCategory)){c=this.settings.TplHomeIntroList;c=Manager.clone(c);c=new Ext.XTemplate(c.html.replace("[*IDNewsCategory*]",this.IDNewsCategory));c=new Ext.XTemplate(c.html.replace("[*IDNewsCategory*]",this.IDNewsCategory))}c=new Ext.XTemplate(c.html.replace("[*HomeMoreInformation_linkText*]",b.HomeMoreInformation_linkText));this.tpl=c;if(this.dvHome){this.dvHome.tpl=c}},loadHomeArticlesIntroByLang:function(){var b=this.getCurrentTranslations();this.setTemplate();this.dvHome.setMasterValue("Lang",Manager.getCurrentLang())},langChange:function(){var b=this.getCurrentTranslations();this.loadHomeArticlesIntroByLang();this.setTitle(b.HomeTitle);this.dvHome.emptyText='<div style="padding:10px;">'+b.NotHomeArticles+"</div>"}});ExtPortal.HomeIntroList.referenceTranslations={NotHomeArticles:"There are no news",HomeTitle:"News",HomeMoreInformation_linkText:"more details&gt;"};Ext.apply(ExtPortal.HomeIntroList,new Ext.util.Observable());ExtPortal.HomeIntroList.addEvents("langChange");Ext.reg("homeintro-list",ExtPortal.HomeIntroList);Settings=function(){return Ext.apply(new Ext.util.Observable,{version:"portalmaramures",SearchContentItemsDefault:true,SearchNewsCommentDefault:true,SearchNewsArticleTranslationDefault:true,SearchEventListTranslationDefault:true,SearchNewsCategoryTranslationDefault:false,HistoryControlList:{home__:{className:ExtPortal.HomeIntroList,args:{NumberOfItems:5,IDNewsCategory:6},path:"home",fn:null,init:"home",initialized:false},196:{className:ExtPortal.ImagesGallery,args:{},path:"196",fn:null,init:"ImagesGallery",initialized:false},198:{className:ExtPortal.CategoriesDataView,args:{},path:"198",fn:null,init:"categories",initialized:false},172:{className:ExtPortal.ContactPage,args:{},id:"172",path:"172",fn:null,init:"ContactPage",initialized:false},TraficDataView:{className:ExtPortal.TraficDataView,args:{},path:"InfoTrafic",fn:null,init:"TraficDataView",initialized:false},WeatherDataView:{className:ExtPortal.WeatherDataView,args:{},path:"Vremea",fn:null,init:"WeatherDataView",initialized:false},NewsletterRegistrationForm:{className:ExtPortal.NewsletterRegistrationListForm,args:{height:500},path:"Newsletter",fn:null,init:"NewsletterRegistrationForm",initialized:false},SiteMap:{className:ExtPortal.SiteMap,args:{},path:"SiteMap",fn:null,init:"SiteMap",initialized:false},Search:{className:ExtPortal.Search,args:{SearchFieldID:"SearchTop"},path:"Search",fn:null,init:"Search",initialized:false},ConfirmRegistration:{className:ExtPortal.ConfirmRegistration,args:{},path:"ConfirmRegistration",fn:null,init:"ConfirmRegistration",initialized:false},ConfirmUnsubscribe:{className:ExtPortal.ConfirmRegistration,args:{},path:"ConfirmUnsubscribe",fn:null,init:"ConfirmUnsubscribe",initialized:false}},HistoryToken:":",MenuLeftStyles:["meniu-gri","meniu-albastru","meniu-verde","meniu-verde","meniu-albastru","meniu-gri","meniu-gri","meniu-albastru","meniu-verde","meniu-verde","meniu-albastru","meniu-gri"],MenuLeftOpend:[false,false,true,false,false,false,false],PagesBGColor:"#FFFFFF",PagesCustomBGColor:"#FFFFFF",ForumPath:"http://forum.magic-mm.ro/",CenterHolderID:"CenterHolder",CenterHolderWidth:540,LeftHolderID:"SidebarLeft",EvenimenteHolderID:"Evenimente",HomeIDNewsCategory:6,NumberOfItemsOnHome:5,ButtonArray:["ImagesGallery","categories","Forum","ContactPage"],TinyMCEAdvancedStyles:"Title=Titles;Subtitle=SubTitles;Content=Content;ContentBold=ContentBold;SmallText=SmallText;Italic=Italic;ItalicBold=ItalicBold;Underline=Underline;UnderlineBold=UnderlineBold;TitleUnderline=TitleUnderline;SubTitleUnderline=SubTitleUnderline;ContentUnderline=ContentUnderline;BigTitle=BigTitle",SesizariPageMails:[{Name:"petitii@cjgorj.ro",Value:"",Mail:"petitii@cjgorj.ro"}],SesizariPageSubjects:[{Name:"Petitie",Value:"Petitie"},{Name:"Reclamatie",Value:"Reclamatie"},{Name:"Sesizare ",Value:"Sesizare "}],TplSesizariPageMsg:"<br/><br/><b/>Message sent successfully</b><br/><br/>",ContactPageSuccessMsg:"<br/><br/><b/>Message sent successfully</b><br/><br/>",ContactPageMails:[{Name:"Administrator site",Value:"Administrator",Mail:"administrator@magicmm.ro"},{Name:"Dezvoltare regionala",Value:"Dezvoltareregionala",Mail:"administrator@magicmm.ro"},{Name:"Relatii internationale",Value:"Relatiiinternationale",Mail:"administrator@magicmm.ro"},{Name:"Purtator de cuvant",Value:"Purtator de cuvant",Mail:"administrator@magicmm.ro"}],TplHomeIntroList:new Ext.XTemplate('<tpl for=".">','<p  class="Article"><font face="Verdana" size="3" color="#3D4461" font-weight="bold">{Title} {FKIDNewsArticle_ValidityStartDateTime}</font></p>','<br/><table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top">',"{Intro}</td><tr><td>",'<p style=" width:90%; text-align:right; font-size:13px"><a href="#" onclick="return Loader.registerOpenControl(\'article_{IDNewsArticle}:news_{IDNewsArticle}\', ExtPortal.PreviewArticle ,{ArticleID :{IDNewsArticleTranslation},IDNewsArticle :{IDNewsArticle}, IDNewsCategory:[*IDNewsCategory*]});"><b>[*HomeMoreInformation_linkText*]</b></a></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:90%;height:5"></div>',"</td>","</tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplCategoriesDataView:new Ext.XTemplate('<tpl for=".">','<div id="Category"><div class="title" id="{Name}">','<span class="title"><br/>{Name}</span>','<table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top">',"{Description}</td><tr><td>",'<p style=" width:90%; text-align:right; font-size:13px"><a href="#" onclick="return Loader.registerOpenControl(\'categories:category_{IDNewsCategory}\', ExtPortal.ArticlesIntroList, {NumberOfItems : 5,IDNewsCategory:{IDNewsCategory}})"><b>[*ViewArticles_linkText*]</b></a></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:91%;height:5"></div>',"</td>","</tr>","</table>","</div></div></tpl>",'<div class="x-clear"></div>'),TplArticlesIntroList:new Ext.XTemplate('<tpl for=".">','<p  class="Article"><font face="Verdana" size="3" color="#3D4461" font-weight="bold" >{Title} {FKIDNewsArticle_ValidityStartDateTime}</font></p>','<br/><table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top">',"{Intro}</td><tr><td>",'<p style=" width:90%; text-align:right; font-size:13px"><a href="#" onclick=" Loader.registerOpenControl(\'categories:category_[*IDNewsCategory*]:art_{IDNewsArticleTranslation}:news_{IDNewsArticle}\', ExtPortal.PreviewArticle ,{ArticleID :{IDNewsArticleTranslation},IDNewsArticle :{IDNewsArticle}, IDNewsCategory:[*IDNewsCategory*]});return false;"><b>[*MoreDetails_linkText*]</b></a></p>','<p style="width:90%; text-align:left; font-size:13px"><a href="#" onclick="return Loader.registerOpenControl(\'categories\', ExtPortal.CategoriesDataView);"><b>[*BackCategories_linkText*]</b></a></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:90%;height:5"></div>',"</td>","</tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplPreviewArticle:new Ext.XTemplate('<tpl for=".">','<p><font face="Verdana" size="3" color="#3D4461" font-weight="bold">{Title} {FKIDNewsArticle_ValidityStartDateTime}</font></p>','<table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top">',"{Body}</td><tr><td>",'<p style="width:90%; text-align:left; font-size:13px"><a href="#" onclick="return Loader.registerOpenControl(\'categories:category_{IDNewsCategory}\', ExtPortal.ArticlesIntroList, {NumberOfItems : 5,IDNewsCategory:{IDNewsCategory}});"><b>{Back_linkText}</b></a></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:90%;height:5"></div>',"</td>","</tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplContactPage:new Ext.XTemplate("<b>Consiliul Judeţean Maramureş</b><br/><br/>","Sediul: Str. Gh. Sincai nr. 46 <br/>430311, Baia Mare <br/>Maramures, Romania <br/>","Telefon: 0262 212.110<br/><br/>","Fax: 0262 213.945<br/><br/>","<br/><br/>"),TplSesizariPage:new Ext.XTemplate("<br/><b>Va rugam completati urmaoarele detalii:</b><br/><br/>","","<br/><br/>"),TplRssWeather:new Ext.XTemplate('<tpl for=".">','<table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<p><font face="Verdana" size="3" color="5D92B4"><b><font size="2">{Title}</font></b></font></p>','<p><font face="Verdana" size="2"><b>{Description}</b></font></p><br/>','<p style=" width:95%; text-align:right; font-size:13px"></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:90%;height:5;margin-left:10px"></div>',"</td>","  </tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplRssTrafic:new Ext.XTemplate('<tpl for=".">','<p><img src="/portalmaramures/img/theme-gorj/Trafic.gif" width="32px" height="32px"><font face="Verdana" size="3" color="5D92B4"><b>{Title}</b></font></p>','<table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top" style="padding:10px">',"{Description}</td><tr><td>",'<p><font face="Verdana" size="2"><b>{Date}</b></font></p>','<p style=" width:95%; text-align:right; font-size:13px"></p>','<div style="background:url(img/theme-gorj/linie.gif) repeat-x;width:90%;height:5;margin-left:10px"></div>',"</td>","  </tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplPageItems:new Ext.XTemplate('<tpl for=".">','<table width="90%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="90%" valign="top">',"{Text}</td><tr><td>","</td>","</tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),TplPreviewEvent:new Ext.XTemplate('<tpl for=".">','<p><font face="Verdana" size="3" color="#3D4461"><b><font size="3">{Name}&mdash;&gt;</font></b>{FKIDEventList_ValidityStartDateTime} : {FKIDEventList_ValidityEndDateTime}</font></p>','<table width="100%" border="0" cellspacing="0" cellpadding="0">',"<tr>",'<td width="100%" valign="top">','<p><font face="Verdana" size="2"margin-left="10px"><b><font size="2">{Text}</font></b></font></p>','<div style="background:url(/portalmaramures/img/theme-gorj/linie.gif) repeat-x;width:90%;height:5;margin-left:10px"></div>',"</td>","</tr>","</table>","</tpl>",'<div class="x-clear"></div><br/>'),init:function(){this.addEvents("myEvent")}})}();var RSA_M="2a9a1a5f6b70cd54a2f4cce89de72112690846576b792cb7425a59c31e11d45f29e2d9135fa239ca0599243cb46b55c7361aed108059c388f1b56035171f4a3e0a133c92a452a39546d19f4ae81fad3e25b9483fd8771a6f65f3e628184172042a65f2a8b7cbd0492e002512dc9b12ca37279de7515c3bd3b4b5d03a12c44ec3";var RSA_E="10001";Ext.BLANK_IMAGE_URL="/ext-2.2/resources/images/default/s.gif";Ext.lib.Ajax.defaultPostHeader="application/json";Ext.BLANK_IMAGE_URL="/ext-2.2/resources/images/default/s.gif";Ext.menu.RangeMenu.prototype.icons={gt:"/js/img/greater_then.png",lt:"/js/img/less_then.png",eq:"/js/img/equals.png"};Ext.grid.filter.StringFilter.prototype.icon="/js/img/find.png";var SidebarLeft,LanguagesCombo;function historyChangeControls(c){if(Ext.History.oldToken){return}var b=Manager.getTokenValues(c);if(Ext.History.oldToken==Ext.History.getToken()){return}if(b.isTokenNew==false){return}c=b.token;if(!c){c="home"}var e=c.split(Settings.HistoryToken);if(c.indexOf(":")>-1&&(!Settings.HistoryControlList[c])){if(e[0]=="search"){var f=Settings.HistoryControlList.Search;f.args.SearchText=e[1];Loader.initializeControl.call(Loader,f.init,f.args,f);var d=new f.className(f.args);Loader.changeCenterHolderTo(d,f.init);return}else{if(e[0]=="categories"){var i=e[1];var j=e[2];var k=e[3];var f={};f.init=c;if(!j){var l=i.split("_")[1];f.className=ExtPortal.ArticlesIntroList;f.args={IDNewsCategory:l}}else{var l=i.split("_")[1];var h=j.split("_")[1];var g=k.split("_")[1];f.className=ExtPortal.PreviewArticle;f.args={ArticleID:h,IDNewsCategory:l,IDNewsArticle:g}}Loader.initializeControl.call(Loader,f.init,f.args,f);var d=new f.className(f.args);Loader.changeCenterHolderTo(d,f.init)}}}else{var m=c;if(b.lang&&b.lang!=Manager.getCurrentLang()){Manager.LanguagesCombo.setValue(b.lang)}Loader.navigateToPath(c)}}Ext.onReady(function(){var b=Ext.get("current_year");b.dom.innerHTML=new Date().getFullYear();SessionData.on("initComplete",function(){Loader.init();Manager.init();Loader.on("initComplete",function(){historyChangeControls()});PublicMenu.init();Ext.History.init();Ext.History.on("change",historyChangeControls)});SessionData.init();Ext.QuickTips.init();var c=new Ext.data.JsonStore({fields:["Lang","LangName","LangStatus","RowNumber","Flag"],root:"Languages",baseParams:{test:0},proxy:new Ext.data.WCFProxy({url:"/services/ExtPortal/ExtPortalManager.svc/LoadMainData",method:"POST"}),listeners:{load:{fn:function(){var e=Manager.getTokenValues(Ext.History.getToken());var d=e.lang;d=d||Manager.getCurrentLang();if(!d||d.length==0){d=Manager.getCurrentLang()}this.LanguagesCombo.setValue(d);ExtPortal.Translator.performTranslation(d);historyChangeControls()},scope:this}}});LanguagesCombo=new Ext.ux.IconCombo({fieldLabel:"Language",hideLabel:true,valueField:"Lang",displayField:"Lang",iconClsField:"Flag",triggerAction:"all",applyTo:"Language",mode:"local",forceSelection:true,selectOnFocus:true,border:false,width:62,height:10,style:"background:transparent;font-size:10px; border:none;",store:c,view:new Ext.DataView(),listeners:{select:function(g,d,e){if(d.data.Lang!=Manager.getCurrentLang()){var f=Manager.getTokenValues(Ext.History.getToken()).token;Ext.History.add(d.data.Lang+"/"+f);if(Manager){Manager.fireLanguageChanged(d.data.Lang)}ExtPortal.Translator.performTranslation(d.data.Lang)}}}});Manager.LanguagesCombo=LanguagesCombo;Manager.LanguagesStore=c});Ext.ns("ExtPortal");Loader=function(){return Ext.apply(new Ext.util.Observable,{LoaderUrl:"/services/ExtPortal/ContentService.svc",settings:Settings,LeftMenuHolder:null,CenterHolder:null,LastBtnId:"btnhome",treeArray:[],init:function(){this.treeArray=[];this.addEvents("myEvent");this.addEvents("initComplete");this.settings=Settings;this.initEvents(this.settings.EvenimenteHolderID);this.initAllPanels(this.settings.CenterHolderID);ExtPortal.NavigationController.sidemenuBaseCls="meniu-albastru";bodyStyle:"background:transparent; padding:0px 0px 0px 0px",ExtPortal.NavigationController.setOutputElements({topButtonsId:"mainmenu",youAreHerePanel:this.YouAreHereHolderPanel,contentPanel:this.CenterHolder,menuPanel:this.SideMenuPanel});ExtPortal.NavigationController.createFirstMenuLevel();ExtPortal.NavigationController.on("navigate",this.onNavigate,this);for(var b in Settings.HistoryControlList){var c=Settings.HistoryControlList[b];if(c.id){ExtPortal.NavigationController.addItemInitializer(c.id,function(d){Loader.navigateToPath(d.item||d.id,d.itemHtml)})}}this.on("destroy",function(){ExtPortal.NavigationController.un("navigate",this.onNavigate)},this)},initAllPanels:function(b){this.CenterHolder=new Ext.Panel({autoScroll:false,autoHeight:true,bodyStyle:"background:transparent; padding:0px 0px 0px 0px",border:false,baseCls:"site-content",id:"Pnl"+b,renderTo:b});this.CenterHolder.on("afterlayout",function(){if(this.CenterHolder.getInnerWidth()>750){this.CenterHolder.setWidth(750)}if(Ext.History.getToken().indexOf("home")>0){this.CenterHolder.setWidth(this.settings.CenterHolderWidth||540)}},this);this.SideMenuPanel=new Ext.Panel({width:290,autoScroll:false,autoHeight:true,bodyStyle:"background:transparent; padding:0px 0px 0px 0px",border:false,footer:true,baseCls:"meniu-albastru",id:"PnlSideMenuPanel",renderTo:"sidemenu"});this.YouAreHereHolderPanel=new Ext.Panel({autoScroll:false,autoHeight:true,defaults:{border:false},width:500,bodyStyle:"background:transparent; padding:5px 0px 0px 5px",border:false,id:"PnlYouAreHereHolder",renderTo:"youAreHereHolder"})},initLang:function(){},onNavigate:function(b){this.changeHistory(b.path);this.changeButtonBackgroud(b.id);this.changeLayout(b.path)},loginClick:function(){if(!SessionData.getSessionId()){SessionData.showLogin()}else{SessionData.logout()}},refreshMenuOnLogin:function(){ExtPortal.NavigationController.refreshMenu()},initEvents:function(d,c){var b=new Ext.FormPanel({renderTo:d,border:false,width:173,layout:"table",items:[{style:"border:none;padding:0px",id:c||"Evenimente",xtype:"homedate-picker",value:new Date(),ctCls:"homepicker",disabledDatesText:"No Event",disabledDates:["."],showToday:false}]});b.on("select",function(){},this);return b},navigateToPath:function(e,d){Loader.changeHistory(e);var c=Settings.HistoryControlList[e];if(c){if(c.initialized==false){c=Loader.initializeControl.call(Loader,c.init,{},c)}c.args.itemHtml=d;var b=new c.className(c.args);Loader.changeCenterHolderTo(b,c.init)}else{if(!e||(e.length==0)){alert(e+" path nu exista..")}else{ExtPortal.NavigationController.navigateToPath(e)}}return false},changeCenterHolderTo:function(e,b){var d=Loader;this.changeButtonBackgroud(b);this.changeLayout(b);this.CenterHolder.body.hide({duration:0.35,easing:"easeOut",scope:this,callback:function(){if(this.CenterHolder.items&&this.CenterHolder.items.length>0){this.CenterHolder.remove(this.CenterHolder.getComponent(0),true)}this.CenterHolder.add(e);try{this.CenterHolder.doLayout()}catch(g){var f=1}this.CenterHolder.body.show(true)}});try{ExtPortal.NavigationController.renderMenuPanels(0)}catch(c){}},openControl:function(b,d,c){Ext.History.add(Manager.getCurrentLang()+"/"+b);this.navigateToPath(b);return false},changeHistory:function(c){var b=Manager.getCurrentLang()+"/"+c;if(Ext.History.oldToken==b){return}if(!Ext.History.oldToken){Ext.History.oldToken=b}else{Ext.History.oldToken=Ext.History.getToken()}Ext.History.add(b);return false},initializeControl:function(c,f,d){var b=d.args;if(!b){b={}}b.id=c;b.width=((c=="home")?this.settings.CenterHolderWidth:(750));b.settings=this.settings;b.bodyStyle="anchor:0 0 ;background:"+this.settings.PagesBGColor+";font-family:Verdana";b.customBgcolor=this.settings.PagesCustomBGColor;b.footer=true;b.baseCls="site-content";d.args=b;d.initialized=true;d.className=d.className;this.settings.HistoryControlList[c]=d;return d},registerOpenControl:function(c,e,b){var d=Settings.HistoryControlList[c];if(!d){d={className:e,args:b,path:c,settings:this.settings,fn:this.openControl,init:c};Settings.HistoryControlList[c]=d}this.openControl(c,{},d);return false},changeButtonBackgroud:function(d){if(typeof d!="string"){return}d=d.split(":")[0];if(this.settings.ButtonArray.indexOf(d)>-1){if(this.LastBtnId){var c=Ext.get(this.LastBtnId);if(c){c.dom.style.backgroundImage="url(/portalmaramures/img/theme-new/buton_alb.gif)";c.dom.className="unselected"}}var b="btn"+d;var c=Ext.get(b);if(c){c.dom.style.backgroundImage="url(/portalmaramures/img/theme-new/buton_negru.gif)";c.dom.className="selected";this.LastBtnId=b}}else{this.changeButtonBackgroud(this.settings.ButtonArray[0])}},changeLayout:function(b){if(b==="home"){Ext.get("RightSidebar").dom.style.display="inline";if(Ext.get("SearchTop")&&Ext.get("SearchTop").dom.style.backgroundImage!="url(/portalmaramures/img/theme-new/camp_cautare.gif)"){Ext.get("SearchTop").dom.style.backgroundImage="url(/portalmaramures/img/theme-new/camp_cautare.gif)"}}else{if(Ext.get("SearchTop")&&Ext.get("SearchTop").dom.style.backgroundImage!="url(/portalmaramures/img/theme-new/camp_cautare.gif)"){Ext.get("SearchTop").dom.style.backgroundImage="url(/portalmaramures/img/theme-new/camp_cautare.gif)"}Ext.get("RightSidebar").dom.style.display="none"}},getCurrentTranslations:function(){var b=Loader.translations;if(!b){b=Loader.rreferenceTranslations}return b},showSuccessMsg:function(e,d,c){var b=this.getCurrentTranslations();Ext.Msg.show({title:d||b.Success_text,msg:Ext.util.Format.ellipsis(e,2000),icon:c||Ext.Msg.INFO,buttons:Ext.Msg.OK,minWidth:1200>String(e).length?360:600})},showErrorMsg:function(e,d,c){var b=this.getCurrentTranslations();Ext.Msg.show({title:d||b.Error_text,msg:Ext.util.Format.ellipsis(e,2000),icon:c||Ext.Msg.ERROR,buttons:Ext.Msg.OK,minWidth:1200>String(e).length?360:600})},showQuestionMsg:function(e,d,f,c){var b=this.getCurrentTranslations();Ext.Msg.show({title:d||b.PleaseConfirm_text,msg:e,icon:Ext.Msg.QUESTION,buttons:Ext.Msg.YESNO,fn:f,scope:c})},OpenForum:function(){var b="resizable,toolbar=yes,location=yes,scrollbars=yes ,menubar=yes,target=_blank";newWindow=window.open(this.settings.ForumPath);newWindow.focus();return false}})}();Loader.referenceTranslations={PleaseConfirm_text:"Please Confirm",Success_text:"Success",Error_text:"Error"};Ext.apply(Loader,new Ext.util.Observable());Loader.addEvents("langChange");ExtPortal.Loader=Loader;Ext.ns("ExtPortal");PublicMenu=function(){return Ext.apply(new Ext.util.Observable,{ButtonArray:["tran_home","tran_ImagesGallery","tran_categories","tran_publicInformations","tran_Forum","tran_ContactPage","tran_Locations","tran_SiteMap","tran_Login","tran_Search"],init:function(){this.on("langChange",this.langChange,this);SessionData.on("login",function(){var b=this.getCurrentTranslations();if(Ext.get("tran_Login")){Ext.get("tran_Login").dom.innerHTML=b.tran_Logoff_text}},this);SessionData.on("logout",function(){var b=this.getCurrentTranslations();if(Ext.get("tran_Login")){Ext.get("tran_Login").dom.innerHTML=b.tran_Login_text}},this)},langChange:function(){var b=this.getCurrentTranslations();for(var d=0;d<this.ButtonArray.length;d++){var c=Ext.get(this.ButtonArray[d]);if(c){Ext.get(this.ButtonArray[d]).dom.innerHTML=b[this.ButtonArray[d]+"_text"]}}var e;if(SessionData.isLoggedIn==true){e=b.tran_Logoff_text}else{e=b.tran_Login_text}Ext.get("tran_Login").dom.innerHTML=e},getCurrentTranslations:function(){var b=PublicMenu.translations;if(!b){b=PublicMenu.referenceTranslations}return b}})}();PublicMenu.referenceTranslations={tran_home_text:"Home",tran_ImagesGallery_text:"Images Gallery",tran_categories_text:"News",tran_publicInformations_text:"Public Informations",tran_Forum_text:"Forum",tran_ContactPage_text:"Contact Page",tran_Search_text:"Search",tran_Login_text:"Login",tran_SiteMap_text:"Site Map",tran_Locations_text:"Locations",tran_Logoff_text:"Log Off"};Ext.apply(PublicMenu,new Ext.util.Observable());PublicMenu.addEvents("langChange");ExtPortal.PublicMenu=PublicMenu;Ext.ns("ExtPortal");ExtPortal.TranslationHelper=function(b){return Ext.apply({relatedClass:null,fields:null,performTranslation:function(h){if(this.relatedClass&&this.relatedClass.referenceTranslations){var g=this.fields;var e=this.relatedClass;var d={};for(var c in g){d[c]=(g[c][h]?g[c][h]:e.referenceTranslations[c])}this.relatedClass.translations=d;this.relatedClass.fireEvent("langChange")}}},b)};ExtPortal.Translator=function(){return Ext.apply(new Ext.util.Observable(),{items:[{relatedClass:ExtPortal.AboutPanel,fields:{Title_fieldLabel:{RO:"Despre",EN:"About"}}},{relatedClass:ExtPortal.ArticlesIntroList,fields:{ArticleTitle:{RO:"Noutati",EN:"Articles"},BackCategories_linkText:{RO:"&lt;Inapoi",EN:"&lt;Back"},MoreDetails_linkText:{RO:"mai multe detalii&gt;",EN:"more details&gt;"},NotArticle:{RO:"Nu exista noutati",EN:"There are no articles"}}},{relatedClass:ExtPortal.BaseGrid,fields:{Add_buttonText:{RO:"Adauga",EN:"Add"},Add_buttonTooltip:{RO:"Adauga inregistrare noua",EN:"Add a new record"},ClearSelection_buttonText:{RO:"Anuleaza selectia",EN:"Clear Selection"},ClearSelection_buttonTooltip:{RO:"Anuleaza selectia curenta",EN:"Clear current selection"},couldNotLoadData:{RO:"Nu se pot incarca datele.",EN:"Could not load data."},couldNotPerformDelete:{RO:"Stergerea nu se poate efectua",EN:"Could not perform delete"},delConfMessageNoUndo:{RO:"Operatia este ireversibila.",EN:"There is no undo."},delConfMessageQuestionManyItems:{RO:"Sunteti sigur ca doriti stergerea urmatoarelor inregistrari: {0}?",EN:"Do you really want to delete the following items: {0}?"},delConfMessageQuestionOneItem:{RO:"Sunteti sigur ca doriti stergerea inregistrarii: {0}?",EN:"Do you really want to delete the following item: {0}?"},delConfTitleDelete:{RO:"Stergere",EN:"Delete"},delConfTitleManyItems:{RO:"Inregistrari",EN:"Items"},delConfTitleOneItem:{RO:"Inregistrare",EN:"Item"},Delete_buttonText:{RO:"Sterge",EN:"Delete"},Delete_buttonTooltip:{RO:"Sterge elementele selectate",EN:"Delete the selected item(s)"},deleteFailedMessage:{RO:"Urmatoarele inregistrari este posibil sa nu se fi sters:",EN:"The following items might not have been deleted:"},deleteFailedTitle:{RO:"Stergere esuata",EN:"Delete failed"},deleteSuccessfulMessage:{RO:"Inregistrarile au fost sterse cu succes",EN:"The items were successfully deleted."},deleteSuccessfulTitle:{RO:"Stergere reusita",EN:"Delete successful"},deletingMask:{RO:"Stergere...",EN:"Deleting..."},didNotRespondInTime:{RO:"Serverul nu a raspuns in timp.",EN:"The server did not respond in time."},Edit_buttonText:{RO:"Editeaza",EN:"Edit"},Edit_buttonTooltip:{RO:"Editeaza elementul selectat",EN:"Edit the selected item"},errorCode:{RO:"Cod eroare:",EN:"Error Code:"},faultLocation:{RO:"Locatia:",EN:"Location:"},faultMessage:{RO:"Mesaj:",EN:"Message:"},Select_buttonText:{RO:"Selecteaza",EN:"Select"},Select_buttonTooltip:{RO:"Selecteaza elementele subliniate",EN:"Select highlighted item"},unableToDelete:{RO:"Nu se poate sterge",EN:"Unable to delete"}}},{relatedClass:ExtPortal.CategoriesDataView,fields:{CategoriesTitle:{RO:"Categorii de Noutati",EN:"Categories"},Loading:{RO:"Se incarca...",EN:"Loading..."},NoCategories:{RO:"Nu exista categorii de noutati",EN:"There are no categories"},NotSent:{RO:"Nu s-a trimis",EN:"Not Sent"},Retry:{RO:"Reincercati",EN:"Please Try Again"},ViewArticles_linkText:{RO:"Vizualizeaza Articolele",EN:"View Articles"}}},{relatedClass:ExtPortal.CommentFilterForm,fields:{Active_fieldLabel:{RO:"Activ",EN:"Active"},CommentInformations_text:{},IDCommentFilter_fieldLabel:{RO:"ID Filtru pentru comentarii",EN:"ID Comment Filter"},Value_fieldLabel:{RO:"Valoare",EN:"Value"}}},{relatedClass:ExtPortal.CommentFilterGrid,fields:{Active_headerText:{RO:"Activ",EN:"Active"},CreatedBy_headerText:{RO:"Creat De - ID",EN:"Created By - ID"},CreatedByCustom_headerText:{RO:"Creat De",EN:"Created By"},CreationDate_headerText:{RO:"Data crearii",EN:"Creation Date"},FKCreatedBy_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKCreatedBy_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKCreatedBy_UserName_headerText:{RO:"Nume Utilizator",EN:"UserName"},IDCommentFilter_headerText:{RO:"ID Filtru pentru comentarii",EN:"ID Comment Filter"},Value_headerText:{RO:"Valoare",EN:"Value"}}},{relatedClass:ExtPortal.ConfirmRegistration,fields:{cont_activat:{RO:"Contul a fost activat cu succes.",EN:"The account was successfully activated."},ContDejaActivat_text:{RO:"Contul dvs. a fost deja activat. Va rugam folositi casuta de login din partea stanga a paginii pentru a va autentifica.",EN:"Your account was already activated. Please use the login form to log in."},ContDezactivat_Text:{RO:"contul tau a fost dezactivat cu succes.",EN:"your account was successfully  deactivate."},ContNeactivat_Text:{RO:"Ne pare rau, dar contul dvs. nu a putut fi activat. Va rugam sa reluati procesul de inregistrare.",EN:"We’re apologies , but your account could not be activated. Please register again."},felicitari:{RO:"Felicitari",EN:"Congratulations"},RegistrationTitle:{RO:"Inregistrare",EN:"Registration"},reluati_procesul_de_inregistrare:{RO:"Ne pare rau, dar contul dvs. nu a putut fi activat. Va rugam sa reluati procesul de inregistrare.",EN:"We’re apologies , but your account could not be activated. Please register again."}}},{relatedClass:ExtPortal.ContactPage,fields:{btnClose_fieldLabel:{RO:"Inchide",EN:"Close"},btnSend_fieldLabel:{RO:"Trimite",EN:"Send"},ContactPage_Title:{RO:"Contactati-ne",EN:"Contact us"},htmlBody_fieldLabel:{RO:"Corp",EN:"Body"},SendTo_emptyText:{RO:"Selectare...",EN:"Please select ..."},SendTo_fieldLabel:{RO:"Trimite catre",EN:"Send To"},SendTo_loadingText:{RO:"Se incarca...",EN:"Loading..."},txtSubject_fieldLabel:{RO:"Subiect",EN:"Subject"}}},{relatedClass:ExtPortal.ContentHistoryForm,fields:{AddedDate_fieldLabel:{RO:"Data Adaugarii",EN:"Added Date"},ContentHistoryID_fieldLabel:{RO:"ID Istoric Continut",EN:"Content History ID"},EntryNr_fieldLabel:{RO:"Numar intrare",EN:"Entry Number"},EntryNr_pickWinTitle:{RO:"Selectare Numar intrare",EN:"Select Entry Number"},Text_fieldLabel:{RO:"Text",EN:"Text"},UserId_fieldLabel:{RO:"ID Utilizator",EN:"User ID"},UserId_pickWinTitle:{RO:"Selectare ID Utilizator",EN:"Select User ID"}}},{relatedClass:ExtPortal.ContentHistoryGrid,fields:{AddedDate_headerText:{RO:"Data Adaugarii",EN:"Added Date"},ContentHistoryID_headerText:{RO:"ID Istoric Continut",EN:"Content History ID"},EntryNr_headerText:{RO:"Numar Identificare",EN:"Entry Number"},FKEntryNr_CreationDate_headerText:{RO:"Data creare",EN:"Creation Date"},FKEntryNr_Item_headerText:{RO:"Element",EN:"Item"},FKEntryNr_Item_PathName_headerText:{RO:"Cale",EN:"Path Name"},FKEntryNr_Lang_headerText:{RO:"Limba",EN:"Language"},FKEntryNr_Text_headerText:{RO:"Text",EN:"Text"},FKEntryNr_Title_headerText:{RO:"Titlu",EN:"Title"},FKUserId_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKUserId_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKUserId_UserName_headerText:{RO:"Nume Utilizator",EN:"User Name"},Text_headerText:{RO:"Text",EN:"Text"},UserId_headerText:{RO:"Id Utilizator",EN:"User Id"}}},{relatedClass:ExtPortal.ContentHistoryPanel,fields:{btnRevert_buttonText:{RO:"Revenire la varianta selectata",EN:"Revert to the selected item"},btnRevert_tooltipText:{RO:"Revenire la varianta selectata",EN:"Revert to the selected item additional details."},ContentHistory_titleText:{RO:"Istoric Continut",EN:"Content History"},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru detalii",EN:"Please select a record to see additional details."}}},{relatedClass:ExtPortal.ContentLanguagesForm,fields:{Lang_fieldLabel:{RO:"Limba",EN:"Lang"},LangName_fieldLabel:{RO:"Limba",EN:"Lang Name"},LangStatus_fieldLabel:{RO:"Status Limba",EN:"Lang Status"}}},{relatedClass:ExtPortal.ContentLanguagesGrid,fields:{Lang_headerText:{RO:"Limba",EN:"Lang"},LangName_headerText:{RO:"Limba",EN:"Lang Name"},LangStatus_headerText:{RO:"Status Limba",EN:"Lang Status"}}},{relatedClass:ExtPortal.ContentTree,fields:{btnAddPageHere:{RO:"Adauga Pagina Aici",EN:"Add Page Here"},btnCollapseAll:{},btnDeletePage:{RO:"Sterge Pagina",EN:"Delete Page"},btnEditPage:{RO:"Edit Page",EN:"Edit Page"},btnExpandAllChildrenPages:{},btnPreview:{RO:"Vizualizeaza",EN:"Preview"},Error_text:{RO:"Eroare",EN:"Error"},PleaseConfirm_text:{RO:"Va rugam confirmati",EN:"Please Confirm"},Success_text:{RO:"Succes",EN:"Success"}}},{relatedClass:ExtPortal.CSSForm,fields:{IDCSS_fieldLabel:{RO:"ID CSS",EN:"ID CSS"},InvalidValue:{RO:"Valoare incorecta pentru ID CSS",EN:"Invalid value for ID CSS"},Name_fieldLabel:{RO:"Nume CSS",EN:"CSS Name"},NotSubmit:{RO:"Formularul nu a putut fi trimis.",EN:"The form could not be submitted."},Text_fieldLabel:{RO:"Text",EN:"Text"}}},{relatedClass:ExtPortal.CSSGrid,fields:{AddedBy_headerText:{RO:"Adaugat de",EN:"Added By"},AddedDateTime_headerText:{RO:"Data Adaugarii",EN:"Added Date Time"},CSSList_titleText:{RO:"Lista CSS",EN:"CSS List"},EditedBy_headerText:{},EditedDateTime_headerText:{RO:"Data Editarii",EN:"Edited Date Time"},FKAddedBy_UserName_headerText:{RO:"Nume utilizator (adaugat de)",EN:"User Name (added by)"},FKEditedBy_UserName_headerText:{RO:"Nume Utilizator (editat de)",EN:"User Name (edited by)"},IDCSS_headerText:{RO:"ID CSS",EN:"ID CSS"},Name_headerText:{},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},Text_headerText:{}}},{relatedClass:ExtPortal.EventListForm,fields:{IDEventList_fieldLabel:{RO:"ID Lista Evenimente",EN:"ID Event List"},InternalName_fieldLabel:{RO:"Nume",EN:"Name"},InvalidMessage:{RO:"Valoare necorespunzatoare pentru ID Event List.",EN:"Invalid value for ID Event List."},NotSubmitMessage:{RO:"Datele nu au putut fi salvate.",EN:"The form could not be submitted."},StartMustBeLessThanEnd_text:{RO:"Data de inceput trebuie sa fie mai mica decat data de sfarsit.",EN:"Start Date must be less than the End Date"},ValidityEndDateTime_fieldLabel:{RO:"Data Sfarsit",EN:"Validity End Date"},ValidityStartDateTime_fieldLabel:{RO:"Data Inceput",EN:"Validity Start Date"}}},{relatedClass:ExtPortal.EventListGrid,fields:{AddedDateTime_headerText:{RO:"Data adaugare",EN:"Added Date Time"},FKAddedBy_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKAddedBy_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKAddedBy_UserName_headerText:{RO:"Nume Utilizator",EN:"UserName"},IDEventList_headerText:{RO:"ID Lista Evenimente",EN:"ID Event List"},InternalName_headerText:{RO:"Nume Lista Evenimente",EN:"Event List Name"},ValidityEndDateTime_headerText:{RO:"Data sfarsit",EN:"Validity End Date"},ValidityStartDateTime_headerText:{RO:"Data inceput",EN:"Validity Start Date"}}},{relatedClass:ExtPortal.EventListTranslationForm,fields:{IDEventList_fieldLabel:{RO:"Lista Evenimente",EN:"Event List"},IDEventList_pickWinTitle:{RO:"Selecteaza ID Lista Evenimente",EN:"Select ID Event List"},IDEventListTranslation_fieldLabel:{RO:"ID Traducere Lista Evenimente",EN:"ID Event List Translation"},Lang_fieldLabel:{RO:"Limba",EN:"Lang"},Name_fieldLabel:{RO:"Nume Traducere Lista Evenimente",EN:"Event List Translation Name"},Text_fieldLabel:{RO:"Text",EN:"Text"}}},{relatedClass:ExtPortal.EventListTranslationGrid,fields:{FKIDEventList_InternalName_headerText:{RO:"Nume Lista Evenimente",EN:"Event List Name"},FKIDEventList_ValidityEndDateTime_headerText:{RO:"Data sfarsit",EN:"Validity End Date Time"},FKIDEventList_ValidityStartDateTime_headerText:{RO:"Data inceput",EN:"Validity Start Date Time"},FKLang_LangName_headerText:{RO:"Limba",EN:"Lang Name"},IDEventList_headerText:{RO:"ID Lista Evenimente",EN:"ID Event List"},IDEventListTranslation_headerText:{RO:"ID Traducere Lista Evenimete",EN:"ID Event List Translation"},Intro_headerText:{RO:"Intro",EN:"Intro"},Lang_headerText:{RO:"limba",EN:"Lang"},Name_headerText:{RO:"Nume Traducere Lista Evenimete",EN:"Event List Translation Name"},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},Text_headerText:{RO:"Text",EN:"Text"}}},{relatedClass:ExtPortal.ExceptionLogGrid,fields:{Date_headerText:{RO:"Data",EN:"Date"},ExceptionText_headerText:{RO:"Exceptie",EN:"Exception"},IDException_headerText:{RO:"ID Exceptie",EN:"ID Exception"},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},Title:{RO:"Jurnal Exceptii",EN:"Exception Log"}}},{relatedClass:ExtPortal.HomeDatePicker,fields:{ErrorTitle:{RO:"Eroare",EN:"Error"},NoEvent:{RO:"Nu sunt evenimente",EN:"No Event"},NotSubmit:{RO:"Cererea nu a putut fi trimisa.",EN:"The request might not have been sent."},Retry:{RO:"Reincercati.",EN:"Please try again."}}},{relatedClass:ExtPortal.HomeIntroList,fields:{HomeMoreInformation_linkText:{RO:"mai multe informatii&gt;",EN:"more details&gt;"},HomeTitle:{RO:"Noutati",EN:"News"},NotHomeArticles:{RO:"Nu exista noutati",EN:"There are no news"}}},{relatedClass:ExtPortal.ImagesGallery,fields:{addImageForm_waitMsg:{RO:"Se incarca imaginea...",EN:"Uploading your image..."},addImageWindow_titleText:{RO:"Adauga imagine",EN:"Upload Image"},bigImageWindowEditBtn_buttonText:{RO:"Editeaza Imaginea",EN:"Edit Image"},btnAddGallery_buttonText:{RO:"Adauga Galerie",EN:"Add New Gallery"},btnAddNewImage_buttonText:{RO:"Adauga Imagine",EN:"Add New Image"},btnDeleteGallery_buttonText:{RO:"Sterge Galeria",EN:"Delete Gallery"},btnDeleteSelected_buttonText:{RO:"Sterge Imagine",EN:"Delete Image"},btnEditGallery_buttonText:{RO:"Editeaza Galeria",EN:"Edit Gallery"},btnEditImage_buttonText:{RO:"Editeaza Imaginea",EN:"Edit Image"},btnGalleryCancelEdit_buttonText:{RO:"Anuleaza",EN:"Cancel"},btnGallerySave_buttonText:{RO:"Salveaza",EN:"Save"},btnViewBigImage_buttonText:{RO:"Vizualizare Imagine",EN:"View Image"},CancelEditImage_buttonText:{RO:"Anuleaza",EN:"Cancel"},ChangesCouldNotBeSaved_text:{RO:"Modificarile nu au putut fi salvate",EN:"Your changes could not be saved!"},ConfirmDeleteGallery_text:{RO:"Sunteti sigur ca doriti stergerea galeriei?",EN:"Are you sure you want to delete gallery?"},ConfirmDeleteImage_text:{RO:"Sunteti sigur ca doriti stergerea imaginii?",EN:"Are you sure you want to delete image?"},ConfirmTitle_text:{RO:"Confirmare",EN:"Confirm"},Error_text:{RO:"Eroare",EN:"Error"},fieldsetImage_fieldLabel:{RO:"imagine",EN:"image"},fieldsetImage_titleText:{RO:"Imagine:",EN:"Image:"},GalleryCouldNotBeCreated_text:{RO:"Galeria nu a fost creata.",EN:"The gallery could not be created."},GalleryCouldNotBeDeleted_text:{RO:"Galeria nu a putut fi stearsa.",EN:"The gallery could not be deleted."},GalleryCouldNotBeEdited_text:{RO:"Galeria nu a putut fi editata.",EN:"The gallery could not be edited."},GalleryCouldNotBeRenamed_text:{RO:"Galeria nu a putut fi redenumita",EN:"The Gallery Could Not Be Renamed"},GalleryCreatedSuccesfully:{RO:"Galeria a fost creata cu succes",EN:"Gallery created successfully"},GalleryDeletedSuccessfully:{RO:"Galerie stearsa cu succes.",EN:"Gallery deleted successfully."},GalleryEditedSuccessfully:{RO:"Galerie ediatata cu succes.",EN:"Gallery edited successfully"},GalleryMenu_buttonText:{RO:"Meniu Galerie",EN:"Gallery Menu"},GalleryRenamedSuccesfully:{RO:"Galeria a fost redenumita cu succes.",EN:"Gallery renamed successfully."},ImageCouldNotBeDeleted_text:{RO:"Imaginea nu a putut fi stearsa.",EN:"The image could not be deleted."},ImageCouldNotBeEdited_text:{RO:"Imaginea nu a putut fi editata.",EN:"The image could not be edited."},ImageCouldNotBeUploaded_text:{RO:"Imaginea nu a putut fi incarcata",EN:"The image could not be uploaded"},ImageDeleteSuccessfully_text:{RO:"Imagine stearsa cu succes.",EN:"Image deleted successfully."},ImageFileUpload_emptyText:{RO:"Selectati o imagine",EN:"Select an image"},ImageFileUpload_fieldLabel:{RO:"Imagine",EN:"Photo"},Images_titleText:{RO:"Imagini",EN:"Images"},ImagesCouldNotBeMoved_text:{RO:"Imaginile nu au putut fi mutate.",EN:"The images could not be moved."},ImagesMovedSuccessfully_text:{RO:"Imagini mutate cu succes.",EN:"Images moved successfully."},Loading_text:{RO:"Se Incarca ...",EN:"Loading..."},Menu_buttonText:{RO:"Meniu",EN:"Menu"},NewNode_text:{RO:"Album Nou",EN:"New Album"},Next_buttonText:{RO:"Urmator",EN:"Next"},NoImages_text:{RO:"Nu sunt imagini.",EN:"No images to display."},PleaseSelect_text:{RO:"Selectati o Galerie",EN:"Please Select a Gallery"},PleaseTryAgain_text:{RO:"Va rugam reincercati.",EN:"Please Try Again."},Preview_buttonText:{RO:"Anterior",EN:"Preview"},SaveEditImage_butttonText:{RO:"Salveaza",EN:"Save"},Success_text:{RO:"Succes",EN:"Success"},taImageDescription_fieldLabel:{RO:"Descriere",EN:"Description"},TheFollowingError:{RO:"A aparut urmatoarea eroare:",EN:"The following error occurred:"},txtGalleryDescription_fieldLabel:{RO:"Descriere",EN:"Description"},txtGalleryID_fieldLabel:{RO:"Galerie",EN:"Gallery"},txtGalleryName_fieldLabel:{RO:"Nume Galerie",EN:"Gallery Name"},txtImage_GalleryID_fieldLabel:{RO:"Galerie",EN:"Gallery"},txtImageId_fieldLabel:{RO:"ID",EN:"ID"},txtImageName_fieldLabel:{RO:"Nume Imagine",EN:"Image Name"},txtLang_fieldLabel:{RO:"Limba",EN:"Language"}}},{relatedClass:ExtPortal.LANG_NomLanguagesGrid,fields:{Active_headerText:{RO:"Activ",EN:"Active"},IDLanguage_headerText:{RO:"ID Limba",EN:"ID Language"},Lang_FieldName_headerText:{RO:"Abreviere",EN:"Abbreviation"},LanguageName_headerText:{RO:"Nume Limba",EN:"Language Name"}}},{relatedClass:ExtPortal.LANG_StringContainersGrid,fields:{ContainerName_headerText:{RO:"Nume Continut",EN:"Container Name"},IDContainer_headerText:{RO:"ID Continut",EN:"ID Container"}}},{relatedClass:ExtPortal.LANG_StringsForm,fields:{Container_emptyText:{RO:"Selecteaza Componenta...",EN:"Select Container..."},Container_fieldLabel:{RO:"Componenta",EN:"Container"},County_loadingText:{RO:"Cautare...",EN:"Searching..."},Default_fieldLabel:{RO:"Traducere Implicita",EN:"Default Translation"},FieldName_fieldLabel:{RO:"Nume camp",EN:"Field Name"},IDString_fieldLabel:{RO:"ID String",EN:"ID String"},InvalidMessage:{RO:"Valoare incorecta pentru ID String",EN:"Invalid value for ID String."}}},{relatedClass:ExtPortal.LANG_StringsGrid,fields:{DefaultTranslation_headerText:{RO:"Traducere implicita",EN:"Default Translation"},FieldName_headerText:{RO:"Nume Camp",EN:"Field Name"},FKIDContainer_ContainerName_headerText:{RO:"Nume Continut",EN:"Container Name"},IDContainer_headerText:{RO:"ID Continut",EN:"ID Container"},IDString_headerText:{RO:"ID String",EN:"ID String"}}},{relatedClass:ExtPortal.LANG_TranslationsGrid,fields:{FKLanguage_Lang_headerText:{RO:"Abreviere",EN:"Abbreviation"},FKStringId_DefaultTranslation_headerText:{RO:"Traducere Implicita",EN:"Default Translation"},FKStringId_FieldName_headerText:{RO:"Nume Camp",EN:"Field Name"},Language_headerText:{RO:"Limba",EN:"Language"},StringId_headerText:{RO:"ID String",EN:"String ID"},Translation_headerText:{RO:"Traducere",EN:"Translation"}}},{relatedClass:ExtPortal.Main,fields:{btnCloseAll:{},btnCloseCurrent:{},btnEditPage:{},btnPreviewPage:{},btnRefreshCurrent:{},MenuPanel_fieldLabel:{RO:"Meniu",EN:"Menu"},NavigationPanel_fieldLabel:{RO:"Navigare",EN:"Navigation"},Search_nodeText:{RO:"Cauta",EN:"Search"},SettingsPanel_fieldLabel:{RO:"Setari",EN:"Settings"},SouthPanel_fieldLabel:{RO:"Jurnal Actiuni",EN:"Actions Log"}}},{relatedClass:ExtPortal.Manager,fields:{Error_text:{RO:"Eroare",EN:"Error"},PleaseConfirm_text:{RO:"Confirmati",EN:"Please Confirm"},Success_text:{RO:"Succes",EN:"Success"}}},{relatedClass:ExtPortal.MenuGroupsForm,fields:{GroupId_emptyText:{RO:"Selecteaza Grupul/ Grupurile",EN:"Select Group/ Groups..."},GroupId_fieldLabel:{RO:"Grupuri",EN:"Groups"},GroupId_loadingText:{RO:"Cauta...",EN:"Searching..."},IDMenu_fieldLabel:{RO:"Meniu",EN:"Menu"},IDMenu_pickWinTitle:{RO:"Selecteaza Id-ul Meniului",EN:"Select Menu Id"},IDMenuGroup_fieldLabel:{RO:"Id Meniu Grup",EN:"Menu Group Id"}}},{relatedClass:ExtPortal.MenuGroupsGrid,fields:{Add_buttonText:{RO:"Adauga Grupuri pentru Meniu",EN:"Add Groups to Menu"},Add_buttonTooltip:{},FKGroupId_Name_headerText:{RO:"Nume Grup",EN:"Group Name"},FKIDMenu_TitleDefault_headerText:{RO:"Meniu",EN:"Menu"},GroupId_headerText:{RO:"Id Grup",EN:"Group Id"},IDMenu_headerText:{RO:"Id Meniu",EN:"Menu Id"},IDMenuGroup_headerText:{RO:"Id Meniu Grup",EN:"Menu Group Id"},MenuGroupsTitle:{RO:"Alegeti grupurile care vor avea dreptul sa vada acest meniu:",EN:"Choose the group wich will be able to see this meni:"}}},{relatedClass:ExtPortal.MenuItemsForm,fields:{Action_fieldLabel:{RO:"Actiune",EN:"Action"},Expanded_fieldLabel:{RO:"Expandat",EN:"Expanded"},IconCls_fieldLabel:{RO:"Iconita",EN:"IconCls"},IDMenu_fieldLabel:{RO:"Id Meniu",EN:"Menu Id"},Merit_fieldLabel:{},ParentId_fieldLabel:{RO:"Id Parinte",EN:"Parent Id"},ParentId_pickWinTitle:{RO:"Selecteaza Parintele",EN:"Select Parent"},PathName_fieldLabel:{RO:"Cale",EN:"PathName"},TitleDefault_fieldLabel:{RO:"Titlu Referinta",EN:"Title Default"},Xtype_fieldLabel:{RO:"Xtype",EN:"Xtype"}}},{relatedClass:ExtPortal.MenuItemsGrid,fields:{Action_headerText:{RO:"Actiune",EN:"Action"},Expanded_headerText:{RO:"Expandat",EN:"Expanded"},FKMenu_AllGroups_headerText:{RO:"Grup",EN:"Group"},FKMenu_LangTitle_headerText:{RO:"Nume Meniu",EN:"Menu Name"},FKParentId_PathName_headerText:{RO:"Cale Parinte",EN:"Parent Path Name"},FKParentId_TitleDefault_headerText:{RO:"Titlu Parinte",EN:"Parent Titlle Default"},IconCls_headerText:{RO:"Iconita",EN:"Icon Cls"},IDMenu_headerText:{RO:"Id Meniu",EN:"Menu Id"},Merit_headerText:{},ParentId_headerText:{RO:"Id Parinte",EN:"Parent Id"},PathName_headerText:{RO:"Cale",EN:"PathName"},TitleDefault_headerText:{RO:"Titlu Referinta",EN:"Title Default"},Xtype_headerText:{RO:"Xtype",EN:"Xtype"}}},{relatedClass:ExtPortal.MenuPanel,fields:{CreateMenu_buttonText:{RO:"Creeaza  Meniu",EN:"Create  Menu"},CreateMenu_buttonTooltip:{RO:"Creeaza  Meniu",EN:"Create  Menu"},ErrorCreated:{RO:"Nu a putut fi creat meniul.",EN:"Unable to create the translation file."},ErrorTitle:{RO:"EROARE",EN:"ERROR"},MenuListTitle:{RO:"Lista Meniuri",EN:"Menu List"},SuccessCreated:{RO:"A fost creat meniul cu succes",EN:"Translation file successfully created. Please refresh the page."},SuccessTitle:{RO:"Succes",EN:"Success"}}},{relatedClass:ExtPortal.MenuTranslationsForm,fields:{IDMenu_fieldLabel:{RO:"Id Meniu",EN:"Menu Id"},IDMenu_pickWinTitle:{RO:"Selecteaza Id-ul Meniului",EN:"Select Menu Id"},Lang_emptyText:{RO:"Selecteaza limba...",EN:"Select Lang..."},Lang_fieldLabel:{RO:"Limba",EN:"Lang"},Lang_loadingText:{RO:"Cauta...",EN:"Searching..."},Title_fieldLabel:{RO:"Titlu",EN:"Title"}}},{relatedClass:ExtPortal.MenuTranslationsGrid,fields:{Add_buttonText:{RO:"Adauga Traducere pentru Meniu",EN:"Add Menu Translation"},FKIDMenu_TitleDefault_headerText:{RO:"Titlu Referinta",EN:"Title Default"},FKLang_Lang_headerText:{RO:"Limba",EN:"Lang"},IDMenu_headerText:{RO:"Id Meniu",EN:"Menu Id"},Lang_headerText:{RO:"Limba",EN:"Lang"},MenuTranslationsTitle:{RO:"Traduceti meniul:",EN:"Translate the menu:"},Title_headerText:{RO:"Titlu Meniu",EN:"Menu Title"}}},{relatedClass:ExtPortal.NewsArticleForm,fields:{IDNewsArticle_fieldLabel:{RO:"ID Articol Stiri",EN:"ID News Article"},IDNewsCategory_emptyText:{RO:"Selectare ID Categorie Stiri...",EN:"Select ID News Category..."},IDNewsCategory_fieldLabel:{RO:"ID Categorie Stiri",EN:"ID News Category"},IDNewsCategory_loadingText:{RO:"Cautare...",EN:"Searching..."},Name_fieldLabel:{RO:"Nume Articol",EN:"Article Name"},StartMustBeLessThanEnd_text:{},ValidityEndDateTime_fieldLabel:{RO:"Data sfarsit",EN:"Validity End Date Time"},ValidityStartDateTime_fieldLabel:{RO:"Data inceput",EN:"Validity Start Date Time"}}},{relatedClass:ExtPortal.NewsArticleGrid,fields:{FKIDNewsCategory_Name_headerText:{RO:"Nume Categorie Stiri",EN:"News Cateory Name"},IDNewsArticle_headerText:{RO:"ID Articol Stiri",EN:"ID News Article"},IDNewsCategory_headerText:{RO:"ID Categorie Stiri",EN:"ID News Category"},Name_headerText:{RO:"Nume Articol",EN:"Article Name"},ValidityEndDateTime_headerText:{RO:"Data sfarsit",EN:"Validity End Date Time"},ValidityStartDateTime_headerText:{RO:"Data inceput",EN:"Validity Start Date Time"}}},{relatedClass:ExtPortal.NewsArticleTranslationForm,fields:{AddedBy_fieldLabel:{RO:"Adaugat de",EN:"Added By"},AddedDateTime_fieldLabel:{RO:"Data adaugarii",EN:"Added Date Time"},Body_fieldLabel:{RO:"Corp",EN:"Body"},EditedBy_fieldLabel:{RO:"Editat de",EN:"Edited By"},EditedDateTime_fieldLabel:{RO:"Data editarii",EN:"Edited Date Time"},IDNewsArticle_fieldLabel:{RO:"Articol de Referinta",EN:"Reference Article"},IDNewsArticle_pickWinTitle:{RO:"Selectare Articol Referinta",EN:"Select ReferenceArticle..."},IDNewsArticleTranslation_fieldLabel:{RO:"ID Traducere Articol Stiri",EN:"ID News Article Translation"},Intro_fieldLabel:{RO:"Introducere",EN:"Intro"},InvalidMessage:{RO:"Valoare incorecta pentru ID Traducere Articol Stiri",EN:"Invalid value for ID News Article Translation."},Lang_fieldLabel:{RO:"Limba",EN:"Language"},Lang_pickWinTitle:{RO:"Selectare Limba",EN:"Select Language"},NotSubmitMessage:{RO:"Formularul nu a putut fi transmis.",EN:"The form could not be submitted."},Published_fieldLabel:{RO:"Publicat",EN:"Published"},Title_fieldLabel:{RO:"Titlu",EN:"Title"}}},{relatedClass:ExtPortal.NewsArticleTranslationGrid,fields:{Articles_headerText:{RO:"Lista Articole",EN:"Articles List"},Body_headerText:{RO:"Text",EN:"Body"},EditedBy_headerText:{RO:"Editat de",EN:"Edited By"},EditedDateTime_headerText:{RO:"Data/ora editarii",EN:"Edited Date Time"},FKIDNewsArticle_ValidityEndDateTime_headerText:{RO:"Data sfarsit",EN:"Validity End Date Time"},FKIDNewsArticle_ValidityStartDateTime_headerText:{RO:"Data inceput",EN:"Validity Start Date Time"},IDNewsArticle_headerText:{RO:"ID Articol Stiri",EN:"ID News Article"},IDNewsArticleTranslation_headerText:{RO:"ID Traducere Articol Stiri",EN:"ID News Article Translation"},Intro_headerText:{RO:"Intro",EN:"Intro"},Lang_headerText:{RO:"Limba",EN:"Lang"},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},Published_headerText:{RO:"Publicat",EN:"Published"},Title_headerText:{RO:"Titlu",EN:"Title"}}},{relatedClass:ExtPortal.NewsCategoryForm,fields:{IDNewsCategory_fieldLabel:{RO:"ID Categorie Stiri",EN:"ID News Category"},InvalidMessage:{RO:"Valoare necorespunzatoare pentru ID News Category",EN:"Invalid value for ID News Category"},Name_fieldLabel:{RO:"Denumire",EN:"Name"},SubmitMessage:{RO:"Datele nu pot fi salvate.",EN:"The form could not be submitted."}}},{relatedClass:ExtPortal.NewsCategoryGrid,fields:{IDNewsCategory_headerText:{RO:"ID Categorie Stiri",EN:"ID News Category"},Name_headerText:{RO:"Denumire",EN:"Name"}}},{relatedClass:ExtPortal.NewsCategoryTranslationForm,fields:{Description_fieldLabel:{RO:"Descriere",EN:"Description"},IDNewsCategory_fieldLabel:{RO:"Categorie Stiri",EN:"News Category"},IDNewsCategory_pickWinTitle:{RO:"Selectare Categorie Stiri",EN:"Select News category"},IDNewsCategoryTranslation_fieldLabel:{RO:"ID Traducere Categorie Stiri",EN:"ID News Category Translation"},InvalidMessage:{RO:"Valoare incorecta pentru  ID News Category Translation",EN:"Invalid value for ID News Category Translation"},Lang_fieldLabel:{RO:"Limba",EN:"Language"},Name_fieldLabel:{RO:"Nume Traducere Categorie Stiri",EN:"News Category Translation Name"},SubmitMessage:{RO:"Datele nu au putut fi salvate.",EN:"The form could not be submitted."}}},{relatedClass:ExtPortal.NewsCategoryTranslationGrid,fields:{Categories_headerText:{RO:"Lista Categorii",EN:"Categories List"},Description_headerText:{RO:"Descriere",EN:"Description"},FKIDNewsCategory_Name_headerText:{RO:"Denumire Categorie Stiri",EN:"News Category Name"},IDNewsCategory_headerText:{RO:"ID Categorie Stiri",EN:"ID News Category"},IDNewsCategoryTranslation_headerText:{RO:"ID Traducere Categorie Stiri",EN:"ID News Category Translation"},Lang_headerText:{RO:"Limba",EN:"Language"},Name_headerText:{RO:"Nume Traducere Categorie Stiri",EN:"News Category Translation Name"},NewsTitle:{RO:"Stiri",EN:"News"}}},{relatedClass:ExtPortal.NewsCommentForm,fields:{Active_fieldLabel:{RO:"Activ",EN:"Active"},AddTitle:{RO:"Adauga Comentarii:",EN:"Add Comments:"},Body_fieldLabel:{RO:"Corp",EN:"Body"},Details_fieldLabel:{RO:"Detalii",EN:"Details"},Email_fieldLabel:{RO:"Email",EN:"Email"},ErrorText_text:{RO:"Eroare la urmatoarele inregistrari :",EN:"Error on following items :"},ErrorTitle_text:{RO:"Eroare la trimiterea comentariului",EN:"Error on submitting the comment"},IDNewsArticle_fieldLabel:{RO:"ID Articol Stiri",EN:"ID News Article"},IDNewsArticle_pickWinTitle:{RO:"Selectare ID Articol Stiri",EN:"Select ID News Article"},IDNewsComment_fieldLabel:{RO:"ID Comentariu Stiri",EN:"ID News Comment"},Lang_emptyText:{RO:"Selecteaza limba...",EN:"Select language..."},Lang_fieldLabel:{RO:"Limba",EN:"Language"},Lang_loadingText:{RO:"Cautare...",EN:"Searching..."},NickName_fieldLabel:{RO:"Nume",EN:"Nick name"},ReplyToIDNewsComment_fieldLabel:{RO:"Raspuns la ID Comentariu Stiri",EN:"Reply to ID News Comment"},ReplyToIDNewsComment_pickWinTitle:{RO:"Selectare Raspuns la ID Comentariu Stiri",EN:"Select Reply To ID News Comment"},Title_fieldLabel:{RO:"Titlu",EN:"Title"},URL_fieldLabel:{},UserId_fieldLabel:{RO:"ID Utilizator",EN:"User ID"}}},{relatedClass:ExtPortal.NewsCommentGrid,fields:{Approve_buttonText:{RO:"Aproba",EN:"Approve"},Approved_headerText:{RO:"Aprobat",EN:"Approved"},ApprovedWithSuccess_text:{RO:"Comentariu aprobat cu succes",EN:"Comment approved with success"},ApprovedWithSuccess_title:{RO:"Comentariu aprobat",EN:"Comment approved"},Body_headerText:{RO:"Corp",EN:"Body"},CreationDate_headerText:{RO:"Data Crearii",EN:"Creation Date"},Details_headerText:{RO:"Detalii",EN:"Details"},Email_headerText:{RO:"Email",EN:"Email"},FKUserId_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKUserId_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKUserId_UserName_headerText:{RO:"Nume Utilizator",EN:"UserName"},IDNewsArticle_headerText:{RO:"ID Articol Stiri",EN:"ID News Article"},IDNewsComment_headerText:{RO:"ID Comentariu Stiri",EN:"ID News Comment"},Lang_headerText:{RO:"Limba",EN:"Language"},NickName_headerText:{},ReplyToIDNewsComment_headerText:{RO:"Raspuns la ID Comentariu Stiri",EN:"Reply To ID News Comment"},Title_headerText:{RO:"Titlu",EN:"Title"},URL_headerText:{},UserId_headerText:{RO:"ID Utilizator",EN:"User ID"}}},{relatedClass:ExtPortal.NewsCommentPanel,fields:{ComboArticles_emptyText:{RO:"Va rugam alegeti...",EN:"Please select"},ComboArticles_fieldLabel:{RO:"Va rugam alegeti articolul",EN:"Please choose the article"},ComboArticles_loadingText:{RO:"Se incarca...",EN:"Loading..."},ComboCategories_emptyText:{RO:"Va rugam alegeti...",EN:"Please select ..."},ComboCategories_fieldLabel:{RO:"Alegeti o categorie",EN:"Please choose category"},GridCommentsHeader_fieldLabel:{RO:"Lista comentarii pentru articolul",EN:"Comments List for Article"},ManageTitle:{RO:"Comentarii",EN:"Manage Comments"}}},{relatedClass:ExtPortal.NewsletterForm,fields:{Body_fieldLabel:{RO:"Corp",EN:"Body"},Completed:{RO:"Terminat...",EN:"Completed..."},ErrorTitle:{RO:"Eroare",EN:"Error"},IDList_fieldLabel:{RO:"ID Lista",EN:"ID List"},IDList_pickWinTitle:{RO:"Selectare Lista",EN:"Select List"},IDSendingInfo_labelField:{RO:"ID Informatii Trimitere",EN:"ID Sending Info"},Lang_fieldLabel:{RO:"Limba",EN:"Language"},LoadingMask:{RO:"Se incarca...",EN:"Loading..."},LoadingMessage:{RO:"Se incarca...",EN:"Loading..."},NotSubmit:{RO:"Formularul nu a putut fi trimis.",EN:"The form could not be submitted."},NrOfEmailsToSend_fieldLabel:{RO:"Cate Email-uri se trimit odata",EN:"Nr Of Emails To Send Once"},Retry:{RO:"Va rugam reincercati.",EN:"Please try again."},SecondsBetween_fieldLabel:{RO:"Secunde intre trimiteri",EN:"Seconds Between"},SendingEmail_fieldLabel:{RO:"Trimis de",EN:"Sending Email"},SendingMessage:{RO:"Trimitere...",EN:"Sending..."},SendingName_fieldLabel:{RO:"Nume cu care se trimite",EN:"Sending Name"},Subject_fieldLabel:{RO:"Subiect",EN:"Subject"}}},{relatedClass:ExtPortal.NewsletterListForm,fields:{IDList_fieldLabel:{RO:"ID Lista",EN:"ID List"},InternalName_fieldLabel:{RO:"Nume",EN:"Name"}}},{relatedClass:ExtPortal.NewsletterListGrid,fields:{AddDateTime_headerText:{RO:"Data adaugarii",EN:"Add Date Time"},AddedBy_headerText:{RO:"Adaugat de",EN:"Added by"},CreatedByCustom_headerText:{RO:"Creat de",EN:"Created by"},FKAddedBy_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKAddedBy_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKAddedBy_UserName_headerText:{RO:"Nume Utilizator",EN:"User Name"},IDList_headerText:{RO:"ID Lista",EN:"ID List"},InternalName_headerText:{RO:"Lista Newsletter",EN:"Newsletter List"}}},{relatedClass:ExtPortal.NewsletterListTranslationForm,fields:{Details_fieldLabel:{RO:"Detalii",EN:"Details"},IDList_fieldLabel:{RO:"ID Lista",EN:"ID List"},IDList_pickWinTitle:{RO:"Selectare ID Lista",EN:"Select ID List"},IDListTranslation_fieldLabel:{RO:"ID Traducere Lista",EN:"ID List Translation"},Lang_fieldLabel:{RO:"Limba",EN:"Language"},Name_fieldLabel:{RO:"Nume",EN:"Name"}}},{relatedClass:ExtPortal.NewsletterListTranslationGrid,fields:{Details_headerText:{RO:"Detalii",EN:"Details"},FKIDList_InternalName_headerText:{RO:"Nume Referinta",EN:"Reference Name"},IDList_headerText:{RO:"ID Lista",EN:"ID List"},IDListTranslation_headerText:{RO:"ID Lista Traducere",EN:"ID List Translation"},Lang_headerText:{RO:"Limba",EN:"Language"},Name_headerText:{RO:"Nume Traducere Lista",EN:"List Translation Name"}}},{relatedClass:ExtPortal.NewsletterLogs,fields:{Back_buttonText:{RO:"Inapoi",EN:"Back"},Notification:{RO:"Notificare",EN:"Notification"},PleaseSelect:{RO:"Va rugam selectati un rand",EN:"Please select a row"},View_buttonText:{RO:"Vizualizare",EN:"View"}}},{relatedClass:ExtPortal.NewsletterRegistrationListForm,fields:{Address_fieldLabel:{RO:"Adresa",EN:"Adress"},ChooseList_fieldLabel:{RO:"Alegeti lista",EN:"Choose List"},City_fieldLabel:{RO:"Oras",EN:"City"},Company_fieldLabel:{RO:"Companie",EN:"Company"},CouldNotSubmit:{RO:"Formularul nu a putut fi salvat.",EN:"The form could not be submitted."},Email_fieldLabel:{RO:"Email",EN:"Email"},Error:{RO:"Eroare",EN:"Error"},ErrorOccured:{RO:"A aparut urmatoarea eroare:",EN:"The following error occurred:"},FirstName_fieldLabel:{RO:"Prenume",EN:"First Name"},formSubmittedSuccessfully:{RO:"Inregistrarea este completa numai dupa ce confirmati mailul de abonare.",EN:"To complete the the registration ,you should confirm the subscription mail."},InvalidValue:{RO:"Valoare incorecta pentru Lista Inregistrare Newsletter",EN:"Invalid value for ID Newsletter Registration List"},LastName_fieldLabel:{RO:"Nume",EN:"Last Name"},NotSent:{RO:"Cererea nu a fost trimisa.",EN:"The request might not have been sent."},NotSubmit:{RO:"Formularul nu a putut fi salvat.",EN:"The form might not have been submitted."},Phone_fieldLabel:{RO:"Telefon",EN:"Phone"},RegisterTitle:{RO:"Abonati-va la listele noastre",EN:"Register to our lists"},Retry:{RO:"Va rugam reincercati.",EN:"Please try again."},Sending:{RO:"Se trimite...",EN:"Sending..."},success:{RO:"Abonare cu succes.",EN:"Success"},TitleIDNewsletterRegistrationList_fieldLabel:{RO:"Lista Newsletter",EN:"Newsletter List"}}},{relatedClass:ExtPortal.NewsletterRegistrationListGrid,fields:{Active_headerText:{RO:"Activ",EN:"Active"},Address_headerText:{RO:"Adresa",EN:"Address"},City_headerText:{RO:"Oras",EN:"City"},Company_headerText:{RO:"Companie",EN:"Company"},Email_headerText:{RO:"Email",EN:"Email"},FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKIDList_InternalName_headerText:{RO:"Nume Newsletter",EN:"Newsletter Name"},IDList_headerText:{RO:"ID Lista",EN:"ID List"},IDNewsletterRegistrationList_headerText:{RO:"ID Lista Inregistrare Newsletter",EN:"ID Newsletter Registration List"},IPAddress_headerText:{RO:"Adresa IP",EN:"IP Address"},Lang_headerText:{RO:"Limba",EN:"Language"},LastName_headerText:{RO:"Nume",EN:"Last Name"},Phone_headerText:{RO:"Telefon",EN:"Phone"},RegistrationDateTime_headerText:{RO:"Data Inregistrarii",EN:"Registration Date Time"},UnsubscribeDateTime_headerText:{RO:"Data Dezabonarii",EN:"Unsubscribe Date Time"},User_headerText:{RO:"Utilizator",EN:"User"}}},{relatedClass:ExtPortal.NewsletterRegistrationListPanel,fields:{ComboNewsletterList_emptyText:{RO:"Alegeti...",EN:"Please select..."},ComboNewsletterList_fieldLabel:{RO:"Alegeti Lista dorita",EN:"Please Choose Newletter List"},ComboNewsletterList_loadingText:{RO:"Se incarca...",EN:"Loading..."},GridRegistrationListHeader_fieldLabel:{RO:"Abonatii pentru lista"},NewsletterTitle:{RO:"Lista Newsletter",EN:"Newsletter List"}}},{relatedClass:ExtPortal.NewsletterSendingInfoForm,fields:{Body_fieldLabel:{RO:"Corp",EN:"Body"},ContentType_fieldLabel:{RO:"Tip Continut",EN:"Content Type"},IDList_fieldLabel:{RO:"ID Lista",EN:"ID List"},IDList_pickWinTitle:{RO:"Selectare Lista...",EN:"Select List..."},IDSendingInfo_fieldLabel:{RO:"ID Informatii trimitere",EN:"ID Sending Info"},NrOfEmailsToSend_fieldLabel:{RO:"Cate emailuri se trimit",EN:"Nr Of Emails To Send"},SecondsBetween_fieldLabel:{RO:"Secunde intre trimiteri",EN:"Seconds Between"},SendingEmail_fieldLabel:{RO:"Trimis de",EN:"Sending Email"},SendingName_fieldLabel:{RO:"Nume cu care se trimite",EN:"Sending Name"},StartTime_fieldLabel:{RO:"Ora inceput",EN:"Start Time"},Subject_fieldLabel:{RO:"Subiect",EN:"Subject"}}},{relatedClass:ExtPortal.NewsletterSendingInfoGrid,fields:{Body_headerText:{RO:"Corp",EN:"Body"},ContentType_headerText:{RO:"Tip Continut",EN:"Content Type"},FKIDList_InternalName_headerText:{RO:"Denumire interna",EN:"Internal Name"},IDList_headerText:{RO:"ID Lista",EN:"ID List"},IDSendingInfo_headerText:{RO:"ID Informatii trimitere",EN:"ID Sending Info"},Lang_headerText:{RO:"Limba",EN:"Language"},NrOfEmailsToSend_headerText:{RO:"Cate emailuri se trimit",EN:"Nr Of Emails To Send"},SecondsBetween_headerText:{RO:"Secunde intre trimiteri",EN:"Seconds Between"},SendingEmail_headerText:{RO:"Trimis de",EN:"Sending Email"},SendingName_headerText:{RO:"Nume cu care se trimite",EN:"Sending Name"},StartTime_headerText:{RO:"Ora inceput",EN:"Start Time"},Subject_headerText:{RO:"Subiect",EN:"Subject"}}},{relatedClass:ExtPortal.NewsletterSendingLogForm,fields:{Details_fieldLabel:{RO:"Detalii",EN:"Details"},Errors_fieldLabel:{RO:"Erori",EN:"Errors"},IDSendingInfo_fieldLabel:{RO:"ID Trimiteri Informatii",EN:"ID Sending Info"},IDSendingInfo_pickWinTitle:{RO:"Selectare ID Trimiteri Informatii",EN:"Select ID Sending Info"},IDSendingLog_fieldLabel:{RO:"ID Jurnal Trimiteri",EN:"ID Sending Log"},ListIndex_fieldLabel:{RO:"Index Lista",EN:"List Index"},SendingLogDateTime_fieldLabel:{RO:"Data/Ora Jurnal Trimiteri",EN:"Sending Log Date/Time"},TotalSend_fieldLabel:{RO:"Total Trimiteri",EN:"Total Send"}}},{relatedClass:ExtPortal.NewsletterSendingLogGrid,fields:{Details_headerText:{RO:"Detalii",EN:"Details"},Errors_headerText:{RO:"Erori",EN:"Errors"},FKIDSendingInfo_IDList_headerText:{RO:"ID Lista",EN:"ID List"},FKIDSendingInfo_IDList_InternalName_headerText:{RO:"Denumire Interna",EN:"Internal Name"},FKIDSendingInfo_Lang_headerText:{RO:"Limba",EN:"Language"},IDSendingInfo_headerText:{RO:"ID Informatii Expeditor",EN:"ID Sender Info"},IDSendingLog_headerText:{RO:"ID Jurnal Expeditor",EN:"ID Sender Log"},ListIndex_headerText:{RO:"Index Lista",EN:"List Index"},PleaseSelect_messageText:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},SendingLogDateTime_headerText:{RO:"Data/Ora Autentificare Expeditor",EN:"Sender Log Date/Time"},TotalSend_headerText:{RO:"Total Trimiteri",EN:"Total Send"}}},{relatedClass:ExtPortal.NewsPanel,fields:{BackToCategories_buttonText:{RO:"Inapoi la Categorii",EN:"Back To Categories"},ViewArticles_buttonText:{RO:"Vizualizeaza Articole",EN:"View Articles"},ViewArticles_buttonTooltip:{RO:"Vizualizeaza Articole",EN:"View Articles"}}},{relatedClass:ExtPortal.NomGroupsForm,fields:{Description_fieldLabel:{RO:"Descriere",EN:"Description"},GroupID_fieldLabel:{RO:"ID grup",EN:"Group ID"},Name_fieldLabel:{RO:"Nume Grup",EN:"Group Name"},SecurityLevel_fieldLabel:{RO:"Nivel de Securitate",EN:"Security Level"}}},{relatedClass:ExtPortal.NomGroupsGrid,fields:{Description_headerText:{RO:"Descriere",EN:"Description"},GroupId_headerText:{RO:"ID Grup",EN:"Group ID"},Name_headerText:{RO:"Nume Grup",EN:"Group Name"},SecurityLevel_headerText:{RO:"Nivel de Securitate",EN:"Security Level"}}},{relatedClass:ExtPortal.NomNotificariForm,fields:{Active_fieldLabel:{RO:"Activ",EN:"Active"},BodyMail_fieldLabel:{RO:"Continut Email",EN:"Mail Body"},NotificationDescription_fieldLabel:{RO:"Descriere Notificare",EN:"Notification Description"},NotificationName_fieldLabel:{RO:"Nume Notificare",EN:"Notification Name"},SubjectMail_fieldLabel:{RO:"Subiect Mail",EN:"Mail Subject"}}},{relatedClass:ExtPortal.NomNotificariGrid,fields:{Activat_headerText:{RO:"Activ",EN:"Active"},CorpMail_headerText:{RO:"Corp Mail",EN:"Mail Body"},DenumireNotificare_headerText:{RO:"Denumire Notificare",EN:"Notification Name"},DescriereNotificare_headerText:{RO:"Descriere Notificare",EN:"Notification Description"},IDNotificare_headerText:{RO:"ID Notificare",EN:"Notification ID"},SubiectMail_headerText:{RO:"Subiect",EN:"Subject"}}},{relatedClass:ExtPortal.NomNotificationsForm,fields:{Actions_fieldLabel:{RO:"Actiuni",EN:"Actions"},Active_fieldLabel:{RO:"Activ",EN:"Active"},IDNotification_fieldLabel:{RO:"ID Notificare",EN:"ID Notification"},Lang_emptyText:{RO:"Selectare Limba...",EN:"Select Language..."},Lang_fieldLabel:{RO:"Limba",EN:"Language"},Lang_loadingText:{RO:"Cautare...",EN:"Searching..."},MailBody_fieldLabel:{RO:"Corp Mail",EN:"Mail Body"},MailSubject_fieldLabel:{RO:"Subiect Mail",EN:"Mail Subject"},NotificationDescription_fieldLabel:{RO:"Descriere Notificare",EN:"Notification Description"},NotificationName_fieldLabel:{RO:"Nume Notificare",EN:"Notification Name"}}},{relatedClass:ExtPortal.NomNotificationsGrid,fields:{Actions_headerText:{RO:"Actiuni",EN:"Actions"},Active_headerText:{RO:"Activ",EN:"Active"},IDNotification_headerText:{RO:"ID Notificare",EN:"ID Notification"},Lang_headerText:{RO:"Limba",EN:"Language"},MailBody_headerText:{RO:"Corp Mail",EN:"Mail Body"},MailSubject_headerText:{RO:"Subiect Mail",EN:"Mail Subject"},NotificationDescription_headerText:{RO:"Descriere Notificare",EN:"Notification Description"},NotificationName_headerText:{RO:"Nume Notificare",EN:"Notification Name"}}},{relatedClass:ExtPortal.OpisDocumenteForm,fields:{DataEmitereDocument_fieldLabel:{},DataIntroducerii_fieldLabel:{},DataModificarii_fieldLabel:{},Denumire_fieldLabel:{},Descriere_fieldLabel:{},IDDocument_fieldLabel:{},IDFolder_fieldLabel:{},IDOpisDocumente_fieldLabel:{},IDOrganizatie_fieldLabel:{},IDTipDocument_fieldLabel:{},IntrodusDe_fieldLabel:{},LocArhivare_fieldLabel:{},ModificatDe_fieldLabel:{},NrDocExtern_fieldLabel:{},NrInregistrareDocument_fieldLabel:{},NrOrdine_fieldLabel:{},PageItem_emptyText:{},PageItem_fieldLabel:{},PageItem_loadingText:{}}},{relatedClass:ExtPortal.OpisDocumenteGrid,fields:{DataEmitereDocument_headerText:{},DataIntroducerii_headerText:{},DataModificarii_headerText:{},Denumire_headerText:{},Descriere_headerText:{},FKPageEntryNr_Item_headerText:{},FKPageItem_PathName_headerText:{},FKPageItem_Title_headerText:{},IDDocument_headerText:{},IDFolder_headerText:{},IDOpisDocumente_headerText:{},IDOrganizatie_headerText:{},IDTipDocument_headerText:{},IntrodusDe_headerText:{},LocArhivare_headerText:{},ModificatDe_headerText:{},NrDocExtern_headerText:{},NrInregistrareDocument_headerText:{},NrOrdine_headerText:{},PageItem_headerText:{}}},{relatedClass:ExtPortal.OpisPagesForm,fields:{IDOpisPages_fieldLabel:{},PageEntryNr_fieldLabel:{},PageEntryNr_pickWinTitle:{}}},{relatedClass:ExtPortal.OpisPagesGrid,fields:{FKPageItem_PathName_headerText:{},FKPageItem_Title_headerText:{},IDOpisPages_headerText:{},PageItem_headerText:{}}},{relatedClass:ExtPortal.OpisPagesPanel,fields:{CollapseAll_buttonText:{},CollapseAll_tooltipText:{},Details_labelText:{},Error_text:{},ExpandAll_buttonText:{},ExpandAll_tooltipText:{},Loading_text:{},LoadingMessage:{},RequestFailure_text:{},SavedSuccessfully_text:{},Success_text:{}}},{relatedClass:ExtPortal.PageItem,fields:{chkPublished_fieldLabel:{RO:"Publicat",EN:"Published"},chkShowInMenu_fieldLabel:{},ClosePage_buttonText:{RO:"Inchideti",EN:"Close"},ClosePage_buttonTooltip:{RO:"Inchideti",EN:"Close"},CompleteAllRequiredFields_text:{RO:"Completati toate",EN:"Please complete all required fields"},ConfirmationContinueClosingPage_text:{RO:"Daca inchideti pagina pierdeti toate modificarile facute",EN:"If you close the page then all your changes will be lost. Continue?"},ConfirmChangeTemplate_text:{RO:"Daca schimbati sablonul tot continutul existent se va pierde.Sigur doriti sa continuati?",EN:"If you change the template all the existing content will be lost. Are you sure you want to continue?"},ConfirmChangeTemplate_title:{RO:"Va rugam confirmati",EN:"Please confirm"},ContentDetails_titleText:{RO:"Detalii Continut",EN:"Content Details"},ContentPermissions_title_text:{RO:"Permisiuni Continut",EN:"Content Permissions"},daCreationDate_fieldLabel:{RO:"Data Crearii",EN:"Creation Date"},daEditedDate_fieldLabel:{RO:"Data Editarii",EN:"Edit Date"},daPublishDate_fieldLabel:{RO:"Data Publicarii",EN:"Publish Date"},EditPageContent_titleText:{RO:"Editati Continutul Paginii",EN:"Edit Page Content"},Error_text:{RO:"Eroare",EN:"Error"},General_titleText:{RO:"General",EN:"General"},lblIDItemText_labelText:{RO:"Detalii Continut",EN:"Item"},lblPleaseChoosePermissions_text:{RO:"Propagarea Vizibilitatii",EN:"Choose the propagation type:"},Loading_text:{RO:"Se incarca",EN:"Loading..."},NotificationTitle_text:{RO:"Notificari",EN:"Notification"},opisDocuments_titleText:{},pickIDTemplate_fieldLabel:{RO:"Alegeti Sablonul",EN:"Select Template"},pickwin_pickIDTemplate_titleText:{RO:"Alegeti Sablonul",EN:"Select Template"},PleaseConfirm_text:{RO:"Confirmati",EN:"Please Confirm"},rdoDifferentialPropagationToChildren_boxLabel:{RO:"Propagare diferentiala la fii ( aceasta exclude de la fii grupurile excluse de aici si adauga la fii grupurile adaugate aici)",EN:"Differential propagation to children: exclude children from excluded groups here and add to children groups added here"},rdoPropagationOnlyVisibilityRestrictions_boxLabel:{RO:"Propagarea doar a restirctiilor de vizibilitate catre copii ( aceasta exclude de la fii grupurile excluse aici)",EN:"Propagation only visibility restrictions to the children: only exclude children from excluded groups here"},rdoSamePropagationToChildren_boxLabel:{RO:"Propagare identica la toti fii.",EN:"Same propagation to child pages."},rdoUseRestrictionsEverybody_boxLabel:{RO:"Disponibilitati fara restrictii",EN:"The page can be viewed by everybody."},RefreshPage_buttonText:{RO:"Reincarca",EN:"Refresh"},RefreshPage_buttonTooltip:{RO:"Reincarca",EN:"Refresh"},RequestFailure_text:{RO:"<b>Cererea nu a putut fi trimisa.</b><br/> Reincercati",EN:"<b>The request might not have been sent.</b><br/>Please try again."},SavedSuccessfully_text:{RO:"Salvat cu succes",EN:"Saved successfully"},SubmitPage_buttonText:{RO:"Salvati",EN:"Submit"},SubmitPage_buttonTooltip:{RO:"Salvati",EN:"Submit"},Success_text:{RO:"Succes",EN:"Success"},txtID_fieldLabel:{RO:"ID",EN:"ID"},txtParent_fieldLabel:{RO:"Parinte",EN:"Parent"},txtPathName_fieldLabel:{RO:"Cale",EN:"Path"},txtTitle_fieldLabel:{RO:"Titlu",EN:"Title"},UseRestrictionsOnlySelected_boxLabel:{RO:"Pagina poate fi vazuta de doar de Administrator si de grupurile selectate:",EN:"The page can be viewed only by the Admins and the seleced groups:"}}},{relatedClass:ExtPortal.PasswordRecoveryForm,fields:{Email_fieldLabel:{RO:"Email",EN:"Email"},HTML_fieldLabel:{RO:"Nota: Trebuie sa introduceti adresa de email asociata contului dumneavoastra.",EN:"Note: You must enter the email address associated with your account."},InsertTitle_fieldLabel:{RO:"Recuperare Parola",EN:"Password Recovery"},MessageTitle:{RO:"Succes",EN:"Success"},PasswordSent:{RO:"Parola a fost trimisa cu succes pe adresa de email indicata",EN:"The password was emailed successfully"},Title_fieldLabel:{RO:"Adresa Email",EN:"Email Adress"}}},{relatedClass:ExtPortal.PreviewArticle,fields:{ArticleTitle:{RO:"Articol",EN:"Article"},Back_linkText:{RO:"&lt;Inapoi",EN:"&lt;Back"},chkShowOnlyForTheSelectedLang_fieldLabel:{RO:"Arata doar pentru limba selectata",EN:"Show Only For The Selected Lang"},LoadingMessage:{RO:"Se incarca ...",EN:"Loading ..."},NotSent:{RO:"Nu s-a trimis",EN:"Not Sent"},Retry:{RO:"Reincercati",EN:"Please try again"},TitleError:{RO:"Eroare",EN:"Error"}}},{relatedClass:ExtPortal.PreviewEvent,fields:{EventTitle:{RO:"Evenimente",EN:"Events"},NoEvents_emptyText:{RO:"Nu sunt evenimente pentru ziua selectata",EN:"There are no events for the selected day"},PreviewEventBack_linkText:{RO:"&lt;Inapoi",EN:"&lt;Back"}}},{relatedClass:ExtPortal.PreviewPage,fields:{Error_messageText:{},Error_titleText:{},Titile_fake_fieldLabel:{RO:"Vizualizare",EN:"Preview"}}},{relatedClass:ExtPortal.PublicMenu,fields:{tran_categories_text:{RO:"Anunturi",EN:"News"},tran_ContactPage_text:{RO:"Contact",EN:"Contact Page"},tran_Forum_text:{RO:"Forum",EN:"Forum"},tran_home_text:{RO:"Acasa",EN:"Home"},tran_ImagesGallery_text:{RO:"Galerie Foto",EN:"Images Gallery"},tran_Locations_text:{RO:"Localitati",EN:"Locations"},tran_Login_text:{RO:"Autentificare",EN:"Login"},tran_Logoff_text:{RO:"Iesire",EN:"Log Off"},tran_publicInformations_text:{RO:"Informatii Publice",EN:"Public Informations"},tran_Search_text:{RO:"Cautare",EN:"Search"},tran_SiteMap_text:{RO:"Harta Site",EN:"Site Map"}}},{relatedClass:ExtPortal.RegistrationForm,fields:{AdditionalInformation_fieldLabel:{RO:"Informatii aditionale",EN:"Additional Information"},BirthDate_fieldLabel:{RO:"Data nasterii",EN:"Birth Date"},ConfirmPassword_fieldLabel:{RO:"Confirmare parola",EN:"Confirm Password"},DomainUserName_fieldLabel:{RO:"Nume utilizator de domeniu",EN:"Domain User Name"},Email_fieldLabel:{RO:"Email",EN:"Email"},Fax_fieldLabel:{RO:"Fax",EN:"Fax"},FirstName_fieldLabel:{RO:"Prenume",EN:"First Name"},KeyUndefined:{RO:"Cheia publica este nedefinita.",EN:"Public key is not defined."},LastName_fieldLabel:{RO:"Nume",EN:"Last Name"},Mobile_fieldLabel:{RO:"Mobil",EN:"Mobile"},NoCrypt:{RO:"Nu se pot cripta parolele.",EN:"Cannot encrypt passwords."},Password_fieldLabel:{RO:"Parola",EN:"Password"},Phone_fieldLabel:{RO:"Telefon",EN:"Phone"},RegistrationSuccess:{RO:"Inregistrarea s-a efectuat cu succes. Contul trebuie aprobat de un Administrator.Veti primi o notificare prin e-mail.",EN:"Registration successful. The account should be approved by the Administrator. You will receive an e-mail confirmation."},Success:{RO:"Succes",EN:"Success"},TitleForm_fieldLabel:{RO:"Formular de Inregistrare",EN:"Registration Form"},UserError:{RO:"Valoare incorecta pentru ID Utilizator.",EN:"Invalid value for User ID"},UserId_fieldLabel:{RO:"ID Utilizator",EN:"User ID"},UserName_fieldLabel:{RO:"Nume utilizator",EN:"User Name"}}},{relatedClass:ExtPortal.Search,fields:{AdvancedOptions_fieldLabel:{RO:"Optiuni Avansate",EN:"Advanced Options"},Search_buttonText:{RO:"Cautare",EN:"Search"},SearchByLang_fieldLabel:{RO:"Cautare doar in limba selectata",EN:"Search only in the selected language"},SearchContentItems_fieldLabel:{RO:"Cauta in Pagini",EN:"Search Pages"},SearchContentTree_fieldLabel:{RO:"Cauta in Arbore Continut",EN:"Search Content Tree"},SearchEventListTranslation_fieldLabel:{RO:"Cauta in Traduceri Lista Evenimente",EN:"Search Event List Translation"},SearchNewsArticleTranslation_fieldLabel:{RO:"Cauta in Traduceri Aricole Stiri",EN:"Search News Article Translations"},SearchNewsCategoryTranslation_fieldLabel:{RO:"Cauta in Traduceri Categorii Stiri",EN:"Search News Category Translation"},SearchNewsComment_fieldLabel:{RO:"Cauta in Comentarii Stiri",EN:"Search News Comments"},SearchText_fieldLabel:{RO:"Introduceti termenii pentru cautare",EN:"Enter search terms"},SearchTitle_text:{}}},{relatedClass:ExtPortal.SearchGrid,fields:{Lang_headerText:{RO:"Limba",EN:"Language"},SeatchItem_headerText:{RO:"Rezultate cautare",EN:"Search results"}}},{relatedClass:ExtPortal.Service_MethodsRights,fields:{MethodListTitle:{RO:"Lista metodelor serviciului",EN:"List of methods for the service"},MethodsTitle:{RO:"Lista metodelor web ale aplicatiilor",EN:"List of the application web mehods"},ServicesTitle:{RO:"Lista de servicii",EN:"List of services"},WebListTitle:{RO:"Lista metodelor web ale aplicatiilor",EN:"List of the application web methods"}}},{relatedClass:ExtPortal.ServiceMethods_CallLogGrid,fields:{Date_headerText:{RO:"Data",EN:"Date"},FKIDMethod_MethodName_headerText:{RO:"Metoda",EN:"Method"},FKIDMethod_Service_headerText:{RO:"Id Serviciu",EN:"Service Id"},FKIDMethod_Service_ServiceName_headerText:{RO:"Serviciu",EN:"Service"},FKSessionId_UserId_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKSessionId_UserId_headerText:{RO:"Id Utilizator",EN:"User Id"},FKSessionId_UserId_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKSessionId_UserId_UserName_headerText:{RO:"Nume Utilizator",EN:"UserName"},IDMethod_headerText:{RO:"Id Metoda",EN:"Method Id"},Params_headerText:{RO:"Parametrii",EN:"Parameters"},PleaseSelect_messageText:{},SessionId_headerText:{RO:"Sesiune",EN:"Session"},Title:{RO:"Jurnalul Metodelor Serviciilor",EN:"Service Methods Log"},User_headerText:{RO:"Utilizator",EN:"User"}}},{relatedClass:ExtPortal.ServiceMethodsForm,fields:{IDMethod_fieldLabel:{RO:"ID Metoda",EN:"Method ID"},MethodName_fieldLabel:{RO:"Numele Metodei",EN:"Method Name"}}},{relatedClass:ExtPortal.ServiceMethodsGrid,fields:{FKServiceServiceName_headerText:{RO:"Nume Serviciu",EN:"Service Name"},IDMethod_headerText:{RO:"ID Metoda",EN:"Method ID"},MethodName_headerText:{RO:"Nume Metoda",EN:"Method Name"},Service_headerText:{RO:"Serviciu",EN:"Service"}}},{relatedClass:ExtPortal.ServiceRightsGrid,fields:{Add_buttonText:{RO:"Adauga",EN:"Add"},Add_buttonTooltip:{RO:"Adauga o noua inregistrare",EN:"Add a new item"},Clear_buttonText:{RO:"Anuleaza",EN:"Clear"},Delete:{RO:"Stergere...",EN:"Deleting..."},Delete_buttonText:{RO:"Stergere",EN:"Delete"},Delete_buttonTooltip:{RO:"Stergere metode selectate",EN:"Delete the selected methods"},DeleteFailed:{RO:"Stergere nereusita",EN:"Delete failed"},DeleteItems:{RO:"Stergere",EN:"Delete"},DeleteMessage:{RO:"Sunteti sigur ca doriti stergerea",EN:"Do you really want to delete"},DeleteSuccess:{RO:"Stergere reusita",EN:"Delete successful"},Edit_buttonText:{RO:"Editare",EN:"Edit"},Edit_buttonTooltip:{RO:"Editare inregistrare selectata",EN:"Edit the selected item"},Items:{RO:"Inregistrari",EN:"Items"},MesageDeleteSuccess:{RO:"Inregistrarile au fost sterse cu succes",EN:"Items have been successfully deleted"},MessageAction:{RO:"Operatia este ireversibila.",EN:"There is no undo."},MessageFailed:{RO:"Urmatoarele inregistrari este posibil sa nu se fi actualizat:",EN:"The following items might not have been updated:"},MessageModify:{RO:"Actualizare...",EN:"Updating..."},MessageSuccess:{RO:"Toate inregistrarile au fost actualizate cu succes.",EN:"All items successfully updated."},MethodWeb_headerText:{RO:"Metoda Web",EN:"Web Method"},MightNotDelete:{RO:"Urmatoarele inregistrari este posibil sa nu se fi sters:",EN:"The following items might not have been deleted:"},ModifyFailed:{RO:"Actualizare nereusita",EN:"Update failed"},ModifySuccess:{RO:"Actualizare reusita",EN:"Update successful"},NotPerform:{RO:"Nu se poate sterge",EN:"Could not perform delete"},OneItem:{RO:"inregistrare",EN:"item"},RefreshFailedTitle:{RO:"Reincarcare nereusita",EN:"Refresh failed"},Reload_buttonText:{RO:"Reincarcare",EN:"Reload"},Reload_buttonTooltip:{RO:"Anuleaza modificarile si reincarca inregistarile din baza de date",EN:"Discard changes and refresh items from database"},Save_buttonText:{RO:"Salveaza",EN:"Commit"},Save_buttonTooltip:{RO:"Salveaza toate modificarile",EN:"Commit all pending changes"},UnableDelete:{RO:"Nu se poate sterge",EN:"Unable to delete"}}},{relatedClass:ExtPortal.ServicesForm,fields:{ServiceName_fieldLabel:{RO:"Nume Serviciu",EN:"Service Name"}}},{relatedClass:ExtPortal.ServicesGrid,fields:{IDService_headerText:{RO:"ID Serviciu",EN:"ID Service"},ServiceName_headerText:{RO:"Nume Serviciu",EN:"Service name"}}},{relatedClass:ExtPortal.SessionData,fields:{Login_buttonText:{RO:"Autentificare",EN:"Login"},LogOff_buttonText:{RO:"Iesire",EN:"Log Off"},NotLoggedIn:{RO:"Nu sunteti autentificat",EN:"Not Logged In"}}},{relatedClass:ExtPortal.SessionsGrid,fields:{CurrentPage_headerText:{RO:"Pagina Curenta",EN:"Current Page"},FKUserIdEmail_headerText:{RO:"Email",EN:"Email"},FKUserIdFirstName_headerText:{RO:"Prenume",EN:"First Name"},FKUserIdLastName_headerText:{RO:"Nume",EN:"Last Name"},FKUserIdUserName_headerText:{RO:"Nume Utilizator",EN:"User Name"},IP_headerText:{RO:"IP",EN:"IP"},LastVisit_headerText:{RO:"Ultima Accesare",EN:"Last Visit"},SessionId_headerText:{RO:"ID Sesiune",EN:"Session ID"},Start_headerText:{RO:"Data Inceput",EN:"Start Date"},Status_headerText:{RO:"Status",EN:"Status"},Timeout_headerText:{RO:"Timeout",EN:"Timeout"},Title:{RO:"Istoric Sesiuni",EN:"Session History"},UserId_headerText:{RO:"ID Utilizator",EN:"User ID"}}},{relatedClass:ExtPortal.SettingsTree,fields:{About_nodeText:{},CreateMenu_nodeText:{},Events_nodeText:{},EventsList_nodeText:{},EventsTranslations_nodeText:{},ExceptionLog_nodeText:{},ImageGallery_nodeText:{},InTheNews_nodeText:{},InTheNewsPanel_nodeText:{},Languages_nodeText:{},ManageComments_nodeText:{},ManageCommentsFilters_nodeText:{},ManageOpis_nodeText:{},Menu_nodeText:{},MultiLanguage_nodeText:{},Newsletter_nodeText:{},NewsletterLists_nodeText:{},NewsletterLogs_nodeText:{},NewsletterReferenceLists_nodeText:{},NewsletterRegistrationsList_nodeText:{},NewsletterSend_nodeText:{},Notifications_nodeText:{},OpisOptions_nodeText:{},PagesCss_nodeText:{},PagesOptions_nodeText:{},ReferenceArticlesList_nodeText:{},ReferenceCategoryList_nodeText:{},ServiceMethodsCall_nodeText:{},ServiceMethodsRights_nodeText:{},Sessions_nodeText:{},Settings_nodeText:{},SiteAdministration_nodeText:{},TemplatesGrid_nodeText:{},Tools_nodeText:{},Translator_nodeText:{},UsersAndGroups_nodeText:{},UsersControlPanel_nodeText:{},UsersList_nodeText:{},UsersPending_nodeText:{},UsersToGroups_nodeText:{}}},{relatedClass:ExtPortal.SiteMap,fields:{SiteMap_Title:{RO:"Harta Site",EN:"Site Map"}}},{relatedClass:ExtPortal.TemplateForm,fields:{IDCSS_fieldLabel:{RO:"ID CSS",EN:"ID CSS"},IDCSS_pickWinTitle:{RO:"Selectare ID CSS",EN:"Select ID CSS"},IDTemplate_fieldLabel:{RO:"ID Sablon",EN:"ID Template"},Name_fieldLabel:{RO:"Nume Sablon",EN:"Template Name"},Text_fieldLabel:{RO:"Text",EN:"Text"}}},{relatedClass:ExtPortal.TemplateGrid,fields:{AddedBy_headerText:{RO:"Adaugat de",EN:"Added By"},AddedDateTime_headerText:{RO:"Data Adaugarii",EN:"Added Date Time"},EditedBy_headerText:{RO:"Editat de",EN:"Edited By"},EditedDateTime_headerText:{RO:"Data Editarii",EN:"Edited Date Time"},FKAddedBy_UserName_headerText:{RO:"Nume Utilizator (adaugat de)",EN:"User Name (added by)"},FKEditedBy_UserName_headerText:{RO:"Nume Utilizator (editat de)",EN:"User Name (edited by)"},FKIDCSS_Name_headerText:{RO:"Nume CSS",EN:"Name CSS"},IDCSS_headerText:{RO:"ID CSS",EN:"ID CSS"},IDTemplate_headerText:{RO:"ID Sablon",EN:"ID Template"},Name_headerText:{RO:"Nume Sablon",EN:"Template Name"},Text_headerText:{RO:"Text",EN:"Text"}}},{relatedClass:ExtPortal.TemplatesPanel,fields:{Loading:{RO:"Se incarca...",EN:"Loading..."},SelectMessage:{RO:"Selectati o inregistrare pentru a vedea informatii suplimentare.",EN:"Please select a record to see additional details."},TemplatesList:{RO:"Lista Sabloane",EN:"Templates List"},TemplatesList_titleText:{RO:"Lista Sabloane",EN:"Templates List"}}},{relatedClass:ExtPortal.TopMenu,fields:{About_nodeText:{},CreateMenu_nodeText:{},Events_nodeText:{},EventsList_nodeText:{},EventsTranslations_nodeText:{},ExceptionLog_nodeText:{},ImageGallery_nodeText:{},InTheNews_nodeText:{},InTheNewsPanel_nodeText:{},Languages_nodeText:{},ManageComments_nodeText:{},ManageCommentsFilters_nodeText:{},ManageOpis_nodeText:{},Menu_nodeText:{},MultiLanguage_nodeText:{},Newsletter_nodeText:{},NewsletterLists_nodeText:{},NewsletterLogs_nodeText:{},NewsletterReferenceLists_nodeText:{},NewsletterRegistrationsList_nodeText:{},NewsletterSend_nodeText:{},Notifications_nodeText:{},OpisOptions_nodeText:{},PagesCss_nodeText:{},PagesOptions_nodeText:{},ReferenceArticlesList_nodeText:{},ReferenceCategoryList_nodeText:{},ServiceMethodsCall_nodeText:{},ServiceMethodsRights_nodeText:{},Sessions_nodeText:{},Settings_nodeText:{},SiteAdministration_nodeText:{},TemplatesGrid_nodeText:{},test1_nodeText:{},test2_nodeText:{},test3_nodeText:{},Testiulia_nodeText:{},Tools_nodeText:{},Translator_nodeText:{},UsersAndGroups_nodeText:{},UsersControlPanel_nodeText:{},UsersList_nodeText:{},UsersPending_nodeText:{},UsersToGroups_nodeText:{}}},{relatedClass:ExtPortal.TraficDataView,fields:{InfoTitle:{RO:"Informatii Trafic",EN:"Info Trafic"},NoData:{RO:"Nu avem date din trafic",EN:"There are no data Trafic"}}},{relatedClass:ExtPortal.UserControlPanel,fields:{PasswordChange_fieldLabel:{RO:"Schimbare parola",EN:"Password Update"},PersonalData_fieldLabel:{RO:"Actualizare date personale",EN:"Personal Data Update"}}},{relatedClass:ExtPortal.UserGroups,fields:{ListTitleGroups_fieldlabel:{RO:"Lista grupuri utilizatori",EN:"List of User Groups"},ListTitleUsers_fieldLabel:{RO:"Lista utilizatori",EN:"List of Users"},ListUsers_fieldLabel:{RO:"Lista utilizatori din grup:",EN:"List of users from group:"}}},{relatedClass:ExtPortal.Users_PasswordUpdateForm,fields:{EncryptError:{RO:"Nu se poate cripta parola. Formularul nu va fi trimis.",EN:"Cannot encrypt passwords. The form will not be submitted."},ErrorMesage:{RO:"Username-ul sau parola sunt incorecte.",EN:"Incorrect username or password."},ErrorOldPassword:{RO:"Parola veche este incorecta.",EN:"Invalid value for old password."},FormMessageError:{RO:"Formularul nu a fost trimis.",EN:"The form could not be submitted."},MessageReTry:{RO:"Va rugam reincercati.",EN:"Please try again."},OldPassword_fieldLabel:{RO:"Parola Veche",EN:"Old Password"},Password_fieldLabel:{RO:"Confirmare Parola",EN:"Confirm Password"},Password1_fieldLabel:{RO:"Parola Noua",EN:"New Password"},PasswordChange:{RO:"Parola a fost schimbata cu succes.",EN:"Password changed successfully."},PublicKeyMessage:{RO:"Cheia publica este nedefinita",EN:"Public key is not defined."},Save_buttonText:{},Succes_fieldLabel:{RO:"Succes",EN:"Success"},UserError:{RO:"Valoare incorecta pentru ID utilizator. Formularul nu poate fi trimis.",EN:"Invalid value for User Id. The form could not be submitted."}}},{relatedClass:ExtPortal.Users_PersonalDataUpdateForm,fields:{AdditionalInformation_fieldLabel:{RO:"Alte Informatii",EN:"Additional Information"},BirthDate_fieldLabel:{RO:"Data Nasterii",EN:"Birth Date"},DomainUserName_fieldLabel:{RO:"Nume utlizator de domeniu",EN:"Domain UserName"},Email_fieldLabel:{RO:"Email",EN:"Email"},Fax_fieldLabel:{RO:"Fax",EN:"Fax"},FirstName_fieldLabel:{RO:"Prenume",EN:"First Name"},LastName_fieldLabel:{RO:"Nume",EN:"Last Name"},MessageError_fieldLabel:{RO:"Cererea nu a putut fi trimisa catre server.",EN:"The request could not been sent to the server"},Mobile_fieldLabel:{RO:"Mobil",EN:"Mobile"},Phone_fieldLabel:{RO:"Telefon",EN:"Telephone"},Save_fieldLabel:{RO:"Salveaza",EN:"Save"}}},{relatedClass:ExtPortal.UsersForm,fields:{Active_fieldLabel:{RO:"Activ",EN:"Active"},AdditionalInformation_fieldLabel:{RO:"Informatii aditionale",EN:"Additional Information"},BirthDate_fieldLabel:{RO:"Data nasterii",EN:"Birth Date"},DomainUserName_fieldLabel:{RO:"Nume utilizator domeniu",EN:"Domain User Name"},Email_fieldLabel:{RO:"Email",EN:"Email"},Fax_fieldLabel:{RO:"Fax",EN:"Fax"},FirstName_fieldLabel:{RO:"Prenume",EN:"First Name"},LastName_fieldLabel:{RO:"Nume",EN:"Last Name"},Mobile_fieldLabel:{RO:"Mobil",EN:"Mobile"},Password_fieldLabel:{RO:"Parola",EN:"Password"},Phone_fieldLabel:{RO:"Telefon",EN:"Phone"},UserId_fieldLabel:{RO:"ID Utilizator",EN:"User ID"},UserName_fieldLabel:{RO:"Nume utilizator",EN:"User Name"}}},{relatedClass:ExtPortal.UsersGrid,fields:{Active_buttonText:{RO:"Activeaza",EN:"Activate"},Active_buttonTooltip:{RO:"Activeaza",EN:"Activate"},Active_headerText:{RO:"Activ",EN:"Active"},AdditionalInformation_headerText:{RO:"Informatii aditionale",EN:"Additional Information"},BirthDate_headerText:{RO:"Data nasterii",EN:"Birth Date"},couldNotPerformDelete:{RO:"Activare/dezactivare esuata.",EN:"Could not perform toggle activation"},CreationDate_headerText:{RO:"Data Crearii",EN:"Creation Date"},delConfMessageQuestionManyItems:{RO:"Sigur doriti activarea/dezactivarea pentru userii: {0} ?",EN:"Do you really want to toggle the activation for the following items: {0}?"},delConfMessageQuestionOneItem:{RO:"Sigur doriti activarea/dezactivarea pentru userii: {0} ?",EN:"Do you really want to toggle the activation for the following item: {0}?"},delConfTitleDelete:{RO:"Activeaza/Dezactiveaza",EN:"Activate/Deactivate"},delConfTitleManyItems:{RO:"inregistrari",EN:"items"},delConfTitleOneItem:{RO:"inregistrare",EN:"one item"},deleteFailedMessage:{RO:"Activarea/dezactivarea pentru urmatorii useri este posibil sa nu fi reusit:",EN:"The following items might not have been changed:"},deleteFailedTitle:{RO:"Operatiune esuata",EN:"Toggle activation failed"},deleteSuccessfulMessage:{RO:"Operatiune reusita",EN:"The activation of the users were successfully toggled."},deleteSuccessfulTitle:{RO:"Operatiune reusita",EN:"Toggle activation successful"},deletingMask:{RO:"Se schimba activarea.....",EN:"Changing activation..."},DomainUserName_headerText:{RO:"Nume utilizator domeniu",EN:"Domain User Name"},Email_headerText:{RO:"Email",EN:"Email"},Fax_headerText:{RO:"Fax",EN:"Fax"},FirstName_headerText:{RO:"Prenume",EN:"First Name"},Inactive_buttonText:{RO:"Dezactiveaza",EN:"Deactivate"},Inactive_buttonTooltip:{RO:"Dezactiveaza",EN:"Deactivate"},IPAddress_headerText:{RO:"Adresa IP",EN:"IP Address"},LastName_headerText:{RO:"Nume",EN:"Last Name"},Mobile_headerText:{RO:"Mobil",EN:"Mobile"},Phone_headerText:{RO:"Telefon",EN:"Phone"},unableToDelete:{RO:"Activare/dezactivare esuata.",EN:"Unable to toggle activation"},User_headerText:{RO:"Utilizator",EN:"User"},UserId_headerText:{RO:"ID Utilizator",EN:"User ID"},UserName_headerText:{RO:"Nume utilizator",EN:"User Name"}}},{relatedClass:ExtPortal.UsersPendingForm,fields:{AdditionalInformation_fieldLabel:{RO:"Informatii aditionale",EN:"Additional Information"},BirthDate_fieldLabel:{RO:"Data nasterii",EN:"Birth Date"},CreationDate_fieldLabel:{RO:"Data crearii",EN:"Creation Date"},DomainUserName_fieldLabel:{RO:"Nume utilizator domeniu",EN:"Domain User Name"},Email_fieldLabel:{RO:"Email",EN:"Email"},Fax_fieldLabel:{RO:"Fax",EN:"Fax"},FirstName_fieldLabel:{RO:"Prenume",EN:"First Name"},LastName_fieldLabel:{RO:"Nume",EN:"Last Name"},Mobile_fieldLabel:{RO:"Mobil",EN:"Mobile"},Password_fieldLabel:{RO:"Parola",EN:"Password"},Phone_fieldLabel:{RO:"Telefon",EN:"Phone"},UserId_fieldLabel:{RO:"ID utilizator",EN:"User ID"},UserName_fieldLabel:{RO:"Nume utilizator",EN:"User Name"}}},{relatedClass:ExtPortal.UsersPendingPanel,fields:{AdditionalInformation_headerText:{RO:"Informatii aditionale",EN:"Additional Information"},Approve_buttonText:{RO:"Aproba",EN:"Approve"},Approve_buttonTooltip:{RO:"Aprobati ce ati selectat",EN:"Approve the request for the selected item"},ApproveTitle:{RO:"Aprobare",EN:"Approve"},BirthDate_headerText:{RO:"Data nasterii",EN:"Birth Date"},CreationDate_headerText:{RO:"Data crearii",EN:"Creation Date"},Delete_buttonText:{RO:"Sterge",EN:"Delete"},Delete_buttonTooltip:{RO:"Stergeti ce ati selectat",EN:"Remove the selected item"},DomainUserName_headerText:{RO:"Nume utilizator domeniu",EN:"Domain User Name"},Email_headerText:{RO:"Email",EN:"Email"},FailedApprove:{RO:"Aprobare nereusita",EN:"Approve failed"},Fax_headerText:{RO:"Fax",EN:"Fax"},FirstName_headerText:{RO:"Prenume",EN:"First Name"},IPAddress_headerText:{RO:"Adresa IP",EN:"IP Address"},LastName_headerText:{RO:"Nume",EN:"Last Name"},MessageApprove:{RO:"Sunteti siguri ca doriti aprobarea:",EN:"Are you sure you want to approve"},Mobile_headerText:{RO:"Mobil",EN:"Mobile"},MsgFailed:{RO:"Urmatorii utilizatori s-ar putea sa nu fie aprobati:",EN:"The following users might not have been approved:"},MsgSuccess:{RO:"Utilizatorii au fost aprobati cu succes.",EN:"Users have been successfully approved."},OneUser:{RO:"Utilizator",EN:"User"},Phone_headerText:{RO:"Telefon",EN:"Phone"},SuccesApprove:{RO:"Aprobare reusita",EN:"Approved successful"},UserId_headerText:{RO:"ID utilizator",EN:"User ID"},UserName_headerText:{RO:"Nume utilizator",EN:"User Name"}}},{relatedClass:ExtPortal.UsersPendingPanel_Formatat,fields:{TitleUsersPending_fieldlabel:{RO:"Utilizatori in asteptare",EN:"Users Pending"}}},{relatedClass:ExtPortal.UsersToGroupsForm,fields:{GroupId_emptyText:{RO:"Selecteaza ID grup...",EN:"Select Group ID..."},GroupId_fieldLabel:{RO:"ID Grup",EN:"Group ID"},GroupId_loadingText:{RO:"Se cauta...",EN:"Searching..."},UserId_fieldLabel:{RO:"Selectare utilizator",EN:"Select User"},UserId_pickWinTitle:{RO:"Selectare ID utilizator",EN:"Select User ID"}}},{relatedClass:ExtPortal.UsersToGroupsGrid,fields:{AddedBy_headerText:{RO:"Adaugat de - ID",EN:"Added by - ID"},CreationDate_headerText:{RO:"Data crearii",EN:"Creation Date"},FKAddedBy_FirstName_headerText:{RO:"Adaugat de-Prenume",EN:"Added by-First Name"},FKAddedBy_LastName_headerText:{RO:"Adaugat de-Nume",EN:"Added by-Last Name"},FKAddedBy_UserName_headerText:{RO:"Adaugat de (nume utilizator)",EN:"Added By (user name)"},FKGroupId_Name_headerText:{RO:"Nume Grup",EN:"Group Name"},FKUserId_FirstName_headerText:{RO:"Prenume",EN:"First Name"},FKUserId_LastName_headerText:{RO:"Nume",EN:"Last Name"},FKUserId_UserName_headerText:{RO:"Nume utilizator",EN:"User Name"},GroupId_headerText:{RO:"ID Grup",EN:"Group ID"},UserId_headerText:{RO:"ID utilizator",EN:"User ID"}}},{relatedClass:ExtPortal.WCFFormPanel,fields:{accessDenied:{RO:"Acces interzis.",EN:"Access Denied."},Close_buttonText:{RO:"Inchide",EN:"Close"},couldNotLoadData:{RO:"Nu se pot incarca datele.",EN:"Could not load data."},details:{RO:"Detalii:",EN:"Details:"},doesNotExist:{RO:"Inregistrarea ceruta nu exista.",EN:"Requested item doesn't exist."},error:{RO:"Eroare.",EN:"Error"},errorCode:{RO:"Cod eroare:",EN:"Error code:"},exceptionLocation:{RO:"Locatie:",EN:"Location:"},exceptionMessage:{RO:"Mesaj:",EN:"Message:"},followingErrorOccurred:{RO:"A aparut urmatoarea eroare:",EN:"The following error occurred:"},formCouldNotBeSent:{RO:"Formularul nu a ajuns la server.",EN:"The form could not be sent."},formMightNotSubmit:{RO:"Este posibil ca formularul sa nu fi ajuns la server.",EN:"The form might not have been submitted."},formNotSubmitted:{RO:"Formularul nu a putut fi salvat datorita unor date incorecte.",EN:"The form could not be submitted due to incorrect data."},formSubmittedSuccessfully:{RO:"Datele au fost trimise cu succes.",EN:"Form submitted successfully."},InsertTitle:{RO:"Introducere",EN:"Insert new item"},loadingMask:{RO:"Se incarca...",EN:"Loading..."},noTimelyServerResponse:{RO:"Serverul nu a raspuns in timp.",EN:"The server did not respond in time."},pleaseTryAgain:{RO:"Va rugam reincercati!",EN:"Please try again!"},sendingMask:{RO:"Se trimite...",EN:"Sending..."},Submit_buttonText:{RO:"Salveaza",EN:"Submit"},success:{RO:"Succes",EN:"Success"},unableToLoadItem:{RO:"Nu se poate incarca inregistrarea actualizata.",EN:"Unable to load the updated item."},Update_buttonText:{RO:"Modifica",EN:"Update"},UpdateTitle:{RO:"Editare",EN:"Update item"},willWorkInInsertMode:{RO:"Formularul va fuctiona in modul inserare.",EN:"The form will work in insert mode."}}},{relatedClass:ExtPortal.WCFLoginPanel,fields:{AuthFailed:{RO:"Autentificare esuata",EN:"Authentication failed"},IncorectDetails:{RO:"Nume utilizator sau parola incorecte",EN:"Incorrect username or password"},Loading:{RO:"Se incarca...",EN:"Loading..."},Login_fieldLabel:{RO:"Autentificare",EN:"Login"},NewAccount_fieldLabel:{RO:"Creeaza un Cont Nou",EN:"Create New Account"},Password_fieldLabel:{RO:"Parola",EN:"Password"},RecoverPassword_fieldLabel:{RO:"Recuperare Parola",EN:"Forgot Password"},Retry:{RO:"Reincercati",EN:"Please try again"},User_fieldLabel:{RO:"Utilizator",EN:"User"}}},{relatedClass:ExtPortal.WeatherDataView,fields:{NoWeather:{RO:"Nu avem informatii despre vreme",EN:"There are no weather information"},TitleWeather:{RO:"Vremea",EN:"Weather"}}},{relatedClass:ExtPortal.WelcomePanel,fields:{Title_fieldLabel:{RO:"BineAtiVenit",EN:"Welcome"}}},{relatedClass:ExtPortal.WindowFormController,fields:{cannotLoad_messageBody:{RO:"Formularul nu poate fi incarcat deoarece urmatoarele tabele nu contin date:",EN:"Cannot load form due to empty database table(s):"},cannotLoad_title:{RO:"Formularul nu poate fi incarcat",EN:"Cannot load form"},loadingMessage:{RO:"Se incarca...",EN:"Loading..."}}},{relatedClass:ExtPortal.WindowLogin,fields:{AuthTitle_fieldLabel:{RO:"Autentificare",EN:"Please Login"}}}],initComponent:function(){this.helpers=[];for(var b=0;b<this.items.length;b++){this.helpers.push(new ExtPortal.TranslationHelper(this.items[b]))}},performTranslation:function(c){for(var b=0;b<this.helpers.length;b++){this.helpers[b].performTranslation(c)}}})}();ExtPortal.Translator.initComponent();
