private function _getPanelJsCode($panel)
 {
     $panelXType = RM_Form_Naming_Manager::generatePanelXType($panel->id);
     $panelClassName = RM_Form_Naming_Manager::generatePanelClassName($panel->id);
     $buttonID = RM_Form_Naming_Manager::generateButtonID($panelXType);
     $divID = RM_Form_Naming_Manager::generateDivID($panel->id);
     $js = "\n            {$panelClassName} = Ext.extend(Ext.Panel, {\n                title: '" . $panel->name . "',\n                style: 'padding:0px 0px 0px 0px',\n                autoHeight: true,\n                closeable: true,\n                collapsible: false,\n                html: document.getElementById('rm_formdesigner_data_iframe').contentWindow.document.getElementById('{$divID}').innerHTML,\n                //preventBodyReset: true,\n                plugins: Ext.ux.PortletPlugin,\n                baseCls: 'RM_form_designer_container',\n                tools: [{\n                    id:'gear',\n                    handler: function(){\n                        RM.Pages.Functions.Formdesigner_SettingsWindow('" . $panel->id . "','" . $panel->name . "','" . $panel->settings . "');\n                    }\n                }],\n                listener: {'close': function(){Ext.getCmp('{$buttonID}').setDisable(false);}}\n            });\n            Ext.reg('{$panelXType}', {$panelClassName});\n        ";
     return $js;
 }
Example #2
0
 /**
  * Returns div id for HTML code for this panel.
  * Alias for long: RM_Form_Naming_Manager::generateDivID($this->id)
  *
  * @return string
  */
 function getDivID()
 {
     return RM_Form_Naming_Manager::generateDivID($this->id);
 }