Designer/designer/WebContent/js/Plugins/propertywindow.js
// Plugin modifications to show properties in a new window (not in the right panel)
Plugin modifications to show properties in a new window (not in the right panel)
Plugin modifications to show properties in a new window ( not in the right panel )
function actonDBLClick(event, shape){
		if( !(shape instanceof ORYX.Core.Shape) ){ 
			return; 
		} 
		 which belongs to "Components" group
		if(shape.getStencil().groups().first() != "Components"){
			return;
		}
		if(win)
			win.close();
		this.init();	
		this.shapeSelection.shapes = [shape];
		if(shape.getStencil().id().indexOf("Pandora") != -1){
			win = new Ext.Window({
				width: 440,		
				height: 210,
				layout: "fit",
				border: false,				
				buttonAlign: 'center',
				buttons: [
				          {
				        	  xtype:'button',	
				        	  minWidth: 100,
				        	  text:ORYX.I18N.PropertyWindow.helpButton,
				        	  listeners:{                                        
				        		  click: function(){
				        			  var iframeContainer = new Ext.BoxComponent({
				        				  autoEl: {
				        					  tag: 'iframe',
				        					  frameborder: '0',
				        					  src: dirWiki+sparkName+printable
				        				  },
				        				  listeners: {
				        					  afterrender: function () {
				        						  console.log('rendered');
				        						  this.getEl().on('load', function () {
				        							  console.log('loaded');
				        						  });
				        					  }
				        				  }
				        			  });
				        			  new Ext.Window({
				        				  title: 'Spark Help',
				        				  layout:'fit',
				        				  renderTo: Ext.getBody(),
				        				  floating: true,						        	    
				        				  width: 800,
				        				  height: 500,						        	    
				        				  items:[
				        				         iframeContainer
				        				         ]
				        			  }).show();
				        		  }
				        	  }                                        
				          },
				          {
				        	  xtype:'button',						    
				        	  text: 'Most active',
				        	  minWidth: 100,
				        	  listeners:{                                        
				        		  click: function(){
				        			  new Ext.Window({
				        				  title: 'Most Popular Pandorabots for Last 24 Hours',
				        				  width: 300,
				        				  height: 500,				
				        				  autoScroll: true,
				        				  autoLoad: {
				        					  url: pandoraServlet						        			
				        				  }
				        			  }).show();				        	
				        		  }
				        	  }                                        
				          }
				          ],
				items: [
				        this.grid
				       ]
			});		
		}else{
			win = new Ext.Window({				
				width: 440,		
				height: 210,
				layout: "fit",
				border: false,				
				buttonAlign: 'center',					        
				buttons: [
				          {
				        	  xtype:'button',				        	  
				        	  text:ORYX.I18N.PropertyWindow.helpButton,
				        	  listeners:{                                        
				        		  click: function(){				        			  
				        			  var iframeContainer = new Ext.BoxComponent({
				        				  autoEl: {
				        					  tag: 'iframe',
				        					  frameborder: '0',
				        					  src: dirWiki+sparkName+printable
				        				  },
				        				  listeners: {
				        					  afterrender: function () {
				        						  console.log('rendered');
				        						  this.getEl().on('load', function () {
				        							  console.log('loaded');
				        						  });
				        					  }
				        				  }
				        			  });
				        			  new Ext.Window({
				        				  title: 'Spark Help',
				        				  layout:'fit',
				        				  renderTo: Ext.getBody(),
				        				  floating: true,						        	    
				        				  width: 800,
				        				  height: 500,						        	    
				        				  items:[
				        				         iframeContainer
				        				         ]
				        			  }).show();
				        		  }
				        	  }				        	 
				          }
				          ],
				items: [
				        this.grid
				       ]
			});	
		}
		this.setPropertyWindowTitle();
		this.identifyCommonProperties();
		this.setCommonPropertiesValues();
		this.createProperties();
		if(this.grid.store.data.length == 0){
			win = new Ext.Window({
				width: 400,		
				height: 210,
				layout: "fit",
				border: false,				
				buttonAlign: 'center',
				buttons: [
							{
							    xtype:'button',						    
							    text:ORYX.I18N.PropertyWindow.helpButton,
							    listeners:{                                        
							        click: function(){							        	
							        	var iframeContainer = new Ext.BoxComponent({
							        	    autoEl: {
							        	        tag: 'iframe',
							        	        frameborder: '0',
							        	        src: dirWiki+sparkName+printable
							        	    },
							        	    listeners: {
							        	        afterrender: function () {
							        	            console.log('rendered');
							        	            this.getEl().on('load', function () {
							        	                console.log('loaded');
							        	            });
							        	        }
							        	    }
							        	});
							        	new Ext.Window({
							        	    title: 'Spark Help',
							        	    layout:'fit',
							        	    renderTo: Ext.getBody(),
							        	    floating: true,						        	    
							        	    width: 800,
							        	    height: 500,						        	    
							        	    items:[
							        	           	iframeContainer
							        	           ]
							        	}).show();
							        }
							    }                                        
							}
				          ],
				items: [
				        {
		                     text : ORYX.I18N.PropertyWindow.propertyEmptyText,
		                     style : 'font-size:14px;margin-bottom:10px;display:block;background-color:white;',
		                     anchor : '100%',
		                     xtype : 'label'
		             }
				]
			});
		}
		win.show();		
	}
function actonDBLClick ( event , shape ) { if ( ! ( shape instanceof ORYX . Core . Shape ) ) { return ; } if ( shape . getStencil ( ) . groups ( ) . first ( ) != "Components" ) { return ; } if ( win ) win . close ( ) ; this . init ( ) ; this . shapeSelection . shapes = [ shape ] ; if ( shape . getStencil ( ) . id ( ) . indexOf ( "Pandora" ) != - 1 ) { win = new Ext . Window ( { width : 440 , height : 210 , layout : "fit" , border : false , buttonAlign : 'center' , buttons : [ { xtype : 'button' , minWidth : 100 , text : ORYX . I18N . PropertyWindow . helpButton , listeners : { click : function ( ) { var iframeContainer = new Ext . BoxComponent ( { autoEl : { tag : 'iframe' , frameborder : '0' , src : dirWiki + sparkName + printable } , listeners : { afterrender : function ( ) { console . log ( 'rendered' ) ; this . getEl ( ) . on ( 'load' , function ( ) { console . log ( 'loaded' ) ; } ) ; } } } ) ; new Ext . Window ( { title : 'Spark Help' , layout : 'fit' , renderTo : Ext . getBody ( ) , floating : true , width : 800 , height : 500 , items : [ iframeContainer ] } ) . show ( ) ; } } } , { xtype : 'button' , text : 'Most active' , minWidth : 100 , listeners : { click : function ( ) { new Ext . Window ( { title : 'Most Popular Pandorabots for Last 24 Hours' , width : 300 , height : 500 , autoScroll : true , autoLoad : { url : pandoraServlet } } ) . show ( ) ; } } } ] , items : [ this . grid ] } ) ; } else { win = new Ext . Window ( { width : 440 , height : 210 , layout : "fit" , border : false , buttonAlign : 'center' , buttons : [ { xtype : 'button' , text : ORYX . I18N . PropertyWindow . helpButton , listeners : { click : function ( ) { var iframeContainer = new Ext . BoxComponent ( { autoEl : { tag : 'iframe' , frameborder : '0' , src : dirWiki + sparkName + printable } , listeners : { afterrender : function ( ) { console . log ( 'rendered' ) ; this . getEl ( ) . on ( 'load' , function ( ) { console . log ( 'loaded' ) ; } ) ; } } } ) ; new Ext . Window ( { title : 'Spark Help' , layout : 'fit' , renderTo : Ext . getBody ( ) , floating : true , width : 800 , height : 500 , items : [ iframeContainer ] } ) . show ( ) ; } } } ] , items : [ this . grid ] } ) ; } this . setPropertyWindowTitle ( ) ; this . identifyCommonProperties ( ) ; this . setCommonPropertiesValues ( ) ; this . createProperties ( ) ; if ( this . grid . store . data . length == 0 ) { win = new Ext . Window ( { width : 400 , height : 210 , layout : "fit" , border : false , buttonAlign : 'center' , buttons : [ { xtype : 'button' , text : ORYX . I18N . PropertyWindow . helpButton , listeners : { click : function ( ) { var iframeContainer = new Ext . BoxComponent ( { autoEl : { tag : 'iframe' , frameborder : '0' , src : dirWiki + sparkName + printable } , listeners : { afterrender : function ( ) { console . log ( 'rendered' ) ; this . getEl ( ) . on ( 'load' , function ( ) { console . log ( 'loaded' ) ; } ) ; } } } ) ; new Ext . Window ( { title : 'Spark Help' , layout : 'fit' , renderTo : Ext . getBody ( ) , floating : true , width : 800 , height : 500 , items : [ iframeContainer ] } ) . show ( ) ; } } } ] , items : [ { text : ORYX . I18N . PropertyWindow . propertyEmptyText , style : 'font-size:14px;margin-bottom:10px;display:block;background-color:white;' , anchor : '100%' , xtype : 'label' } ] } ) ; } win . show ( ) ; }
Plugin modifications to show properties in a new window (not in the right panel)
Plugin modifications to show properties in a new window ( not in the right panel )
// If we are not working with a shape // we ignore the doble-click event // If we are not working with a shape which belongs to "Components" group // we ignore the doble-click event //alert("Registrando evento dblClick on a shape"); // inicializamos las propiedades // Assign the current selections // Check if current selection is PandorabotsSpark and add the 'Most active' button		 // Create the Properties