var star=Ext.create("Ext.data.Store",{storeId:"simpsonsStore",fields:["name","readWrite"],data:{"items":[{"name":"Lisa","readWrite":false},{"name":"Bart","readWrite":false},{"name":"Homer","readWrite":false},{"name":"Marge","readWrite":false},{"name":"Weldone","readWrite":false},{"name":"Healthy","readWrite":false}]},proxy:{type:"memory",reader:{type:"json",root:"items"}}});
Ext.create("Ext.data.Store",{storeId:"testMeasureDetails",fields:["test","measure"],data:[{test:"HTTP",measure:"Content length Content validity Data transfer name DNS availability"},{test:"Citrix Server",measure:"Data Transfer Name"},{test:"Java",measure:"DNS Availability"},]});Ext.define("MyDashBoard.view.OneClickDashboardConfiguration",{alias:"widget.oneclickdashboardconfiguration",extend:"Ext.window.Window",height:390,width:strSkin=="Light"?720:720,autoScroll:false,scroll:false,resizable:false,header:{height:31,padding:"0 10",margin:0,style:{"z-index":"999"}},ghost:false,cls:"myDashboardwindow",ui:"newPopupWindow  newplainHeader_border",bodyPadding:0,frame:false,padding:0,margin:0,border:false,modal:true,title:"Layout Settings",requires:["Ext.ux.form.ItemSelector","utilities.ScrollCombo","utilities.CustomGrid","utilities.Utilities","Ext.ux.form.MultiSelect","utilities.Multiselector","utilities.CustomTrigger","utilities.ComponentSlider","Ext.ux.TabScrollerMenu","Ext.ux.FillSlider",],tools:[{xtype:"button",iconCls:"iconHelp",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:helpTooltip});
}},style:{"background":"none","border":"0px","margin":"0 1 0 0",},handler:function(){HelpWin();}}],dockedItems:[{xtype:"toolbar",dock:"bottom",height:50,cls:"egFooter",items:["->",{xtype:"button",id:"oneClickCreateDashboardBtn",name:"oneClickCreateDashboardBtn",cls:"buttonNewBig",padding:"0 6 0 6",text:createLbl},"->"]}],closeAction:"destroy",dashBoardAction:"",profileName:"",layout:{type:"fit"},items:[{xtype:"form",itemId:"configForm",layout:{type:"hbox",align:"stretch"},itemId:"oneclickdashconfigform",id:"oneclickdashconfigform",name:"oneclickdashconfigform",border:false,items:[{xtype:"container",id:"createWidgetMain",border:false,layout:{type:"hbox",align:"stretch"},bodyPadding:0,items:[{xtype:"container",margin:"10 5 0 10",width:420,layout:{type:"vbox",},items:[{xtype:"container",margin:"0 15 0 0",layout:{type:"hbox",},items:[{xtype:"container",id:"imgcont",name:"imgcont",margin:"10 15 5 0",width:42,height:42,listeners:{afterrender:function(a){Ext.get(a.el).select(".userDefinedImgDefault").on("mouseenter",function(){Ext.get(a.el).select(".settingOver").update('<div class="userDefinedImgDefaultOver" style="display:block;"><table border="0px" cellpadding="0px" cellspacing="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><a href="javascript:void(0)" id="changeImg"><span style="width:20px;height:20px;display:inline-block" class="iconOneClickImgDefaultChange"></span><br/></a></td></tr></table></div>');
Ext.get(a.el).select("#changeImg").on("click",function(){var b=Ext.create("MyDashBoard.view.IconLibrary",{from:"dashboardUpload",windowId:"windowId",custUploadPath:"manager/tomcat/webapps/final/images/icon-library/"+loginUser+"/",profileName:""}).show();b.on("close",function(){b.destroy();b="closed";
});},Ext.get("changeImg"));});Ext.get(a.el).select(".settingOver").on("mouseleave",function(){Ext.get(a.el).select(".settingOver").update("");});}}},{xtype:"textfield",cls:"textbox",margin:"10 0 10 0",id:"oneClickDashbrdNam",name:"oneClickDashbrdNam",fieldLabel:"Dashboard Name",width:343,labelAlign:"top",labelSeparator:"",}]},{xtype:"textareafield",cls:"text-area-minHeight",id:"oneClickDashbrdDescription",name:"oneClickDashbrdDescription",rows:1,labelAlign:"top",width:400,enforceMaxLength:true,maxLength:100,labelSeparator:"",margin:"10 0 10 0",fieldLabel:"Description",},{xtype:"componentslider",id:"templateSliderObj",margin:"5 10 10 0",name:"templateSliderObj",groupMe:false,hidden:true}]},{xtype:"container",layout:{type:"vbox",},margin:"10 0 0 10",width:270,defaults:{labelAlign:"top",labelSeparator:""},items:[{xtype:"scrollcombo",queryMode:"local",fieldLabel:"View by",id:"filterOptsCombo",margin:"10 0 0 0",width:174,name:"filterOptsCombo",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",editable:true,forceSelection:true,valueField:"valueField",queryMode:"local"},{xtype:"container",margin:"10 0 0 0",layout:{type:"vbox"},defaults:{margin:"0",labelSeparator:"",},items:[{xtype:"fieldcontainer",width:265,layout:"vbox",labelAlign:"top",margin:"8 0 0 0",labelSeparator:"",items:[{xtype:"container",width:"100%",layout:"hbox",items:[{xtype:"container",id:"oneClickInfraElementsComboLbl",name:"oneClickInfraElementsComboLbl",html:'<div style="float:left" id="infraMultiSelectLbl" class="formLabelDivFont">Component Type</div>',margins:"1 0 3 0",flex:1,text:compFieldLbl},{xtype:"button",width:20,height:20,margins:"0 0 2 0",id:"oneClickCompExpand",name:"oneClickCompExpand",buttonId:"selectExpand",iconCls:"iconOneClickMultiSelectExpand",style:{"background":"transparent","border":"none"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:expandViewLbl});
}}}]},{xype:"container",cls:"multisearchlist",margin:0,width:265,items:[{xtype:"customtrigger",emptyText:searchCompFieldLbl,width:245,height:30,margin:"0 5 5 5",componentStore:null,listeners:{"change":function(f,e,b,c){var a=Ext.getCmp("oneClickInfraElementsCombo").getStore();if(!Ext.isEmpty(a)){if(e=="*"){a.clearFilter();
}else{if(e.lastIndexOf("*")==(e.length-1)){e=e.substr(0,(e.length-1));}a.clearFilter();if(e){var d=new RegExp(Ext.String.escapeRegex(e),"i");a.filter({filterFn:function(g){return d.test(g.get("displayField"));}});}f.focus();}}}}}]},{width:265,xtype:"multiselectfield",autoScroll:true,scroll:false,height:152,margin:"-1 0 0 0",id:"oneClickInfraElementsCombo",name:"oneClickInfraElementsCombo",labelAlign:"top",allowBlank:false,store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",listConfig:{id:"componentListC",listeners:{}}}]}]}]}]},{xtype:"button",text:"",cls:"advancedOptionGrayButton",iconCls:"advancedOptionGrayButtonIcon",margin:"10 0 0 -22",width:20,height:30,maxHeight:35,tooltip:advSettingsLbl,handler:function(a){Ext.getCmp("advancedOptionWidgetSlider").loadMask("createWidgetMain",true);
Ext.get("advancedOptionWidgetSlider").animate({to:{left:"450"},listeners:{beforeanimate:function(){},afteranimate:function(){var b=this;Ext.get("getAdvancedOptionWidgetButton").on("click",function(){Ext.get("advancedOptionWidgetSlider").animate({to:{left:"820"},listeners:{afteranimate:function(){},beforeanimate:function(){Ext.getCmp("advancedOptionWidgetSlider").loadMask("createWidgetMain",false);
}}});});}}});}},{xtype:"container",cls:"templateAdvancedOptionSlider",id:"advancedOptionWidgetSlider",loadMask:function(c,b){var a=new Ext.LoadMask(Ext.get(c),{msg:""});if(b==true){a.show();}else{a.hide();}return a;},layout:{type:"vbox",align:"stretch"},scroll:false,autoScroll:false,width:270,margin:"0 0 0 60",html:'<div class="advanceEffectButton"><div id="getAdvancedOptionWidgetButton" class="advancedOptionGreenButton"></div></div>',items:[{xtype:"fieldcontainer",layout:"vbox",columnWidth:1,margin:"20 10 5 15",defaults:{margin:"0 0 5 5",labelAlign:"top",labelSeparator:"",columnWidth:1,},items:[{xtype:"container",layout:"vbox",items:[{xtype:"container",id:"sharingLbl"},{xype:"buttongroup",layout:"hbox",width:200,labelWidth:200,defaults:{margin:5,width:50,height:50},items:[{xtype:"button",padding:"0 0 0 0",id:"privateId",toggleGroup:"dashboardSharedButtonShared",allowDepress:false,enableToggle:true,pressed:true,cls:"dashboardSharedButtonPrivate",text:'<div class="dashboardSharedButtonText">Private</div>',toggleHandler:function(){Ext.getCmp("sharedUsersObj").hide();
}},{xtype:"tbseparator",width:2,cls:"userProfileSeparator",height:40,margin:"10px 0px 10px 0px"},{xtype:"button",padding:"0 0 0 0",id:"PublicId",allowDepress:false,enableToggle:true,hidden:(restricPublicDashboards)?true:false,toggleGroup:"dashboardSharedButtonShared",cls:"dashboardSharedButtonPublic",text:'<div class="dashboardSharedButtonText">Public</div>',toggleHandler:function(){Ext.getCmp("sharedUsersObj").hide();
}},{xtype:"tbseparator",width:2,cls:"userProfileSeparator",height:40,margin:"10px 0px 10px 0px",hidden:(restricPublicDashboards)?true:false},{xtype:"button",padding:"0 0 0 0",id:"shareId",allowDepress:false,enableToggle:true,toggleGroup:"dashboardSharedButtonShared",cls:"dashboardSharedButtonShared",text:'<div class="dashboardSharedButtonText">Share to</div>',toggleHandler:function(){Ext.getCmp("sharedUsersObj").show();
}}]}]},{xtype:"container",hidden:true,id:"sharedUsersObj",name:"sharedUsersObj",layout:"vbox",items:[{xtype:"container",margin:"4 4 4 0",id:"sharingGridLbl"},{xtype:"gridpanel",padding:0,align:"stretch",layout:"fit",flex:1,margin:0,id:"checkComp",name:"checkComp",height:90,width:200,border:true,store:new Ext.data.Store({fields:["displayField","valueField","readWrite"],data:[]}),createGridButton:function(d,f,b,a,e,c){if(!Ext.isEmpty(Ext.get(f))){new Ext.form.field.Checkbox({checked:d,margin:0,padding:0,width:18,height:12,ui:"readWrite_checkbt",setToolTip:function(i){var h=this;
readOnlyText=readOnlyLbl;switch(i){case true:readOnlyText=readWriteLbl;break;case false:readOnlyText=readOnlyLbl;break;}if(!Ext.isEmpty(b)){b.suspendEvents();var g=b.getAt(e);g.set(c,this.checked);b.resumeEvents();}h.getEl().set({"data-qtip":readOnlyText});},listeners:{afterRender:function(g){this.setToolTip(this.checked);
},change:function(g,j,h,i,k){this.checked=j;g.setToolTip(this.checked);}},renderTo:f,});}return d;},ui:"multiSelectWithCheckbox",hideHeaders:true,columns:[{text:"",dataIndex:"displayField",flex:1,},{dataIndex:"readWrite",width:18,padding:"0 0 0 0",margin:"0 0 0 0",renderer:function(i,a,c,f,k,j,g,d){var e=this,h=g.ownerCt.columns[k].dataIndex;
a["tdAttr"]='id="'+h+f+'"';var b=""+h+f+"";Ext.defer(function(){e.createGridButton(i,b,j,g,f,h);},150);return Ext.String.format('<div id="{0}"></div>',b);}},],id:"checkComp",name:"checkComp",height:90,width:200,padding:0,margin:0,selModel:Ext.create("Ext.selection.CheckboxModel",{checkOnly:true,headerWidth:18}),}]},{xtype:"container",layout:{type:"column",align:"stretch"},width:220,items:[{xtype:"slider",id:"refreshFrequenySlider",name:"refreshFrequenySlider",fieldLabel:'<span class="formLabelDivFont">'+refreshTxtBoxLbl+"</span>",labelSeparator:"",labelAlign:"top",animate:false,margin:"12 0 2 2",minValue:0,value:60,useTips:false,maxValue:300,width:220,plugins:["fillslider"],listeners:{change:function(a,b,d,c){Ext.get("refrequencyContainer").update(d.value+" "+secsLbl);
}}},{xtype:"container",margin:"3 10 2 2",id:"refrequencyContainer",html:'<span><div id="refrequencyContainer" style="display: inline ; float:right ; " class="font_normal10">'+60+" "+secsLbl+"</div></span>"}]}]}]}]}]});