Changeset 9014
- Timestamp:
- 05/16/08 15:20:39 (2 months ago)
- Files:
-
- plugins/sfExtjsThemePlugin/config/app.yml (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_header.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_west.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_paging_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/config/app.yml
r8948 r9014 11 11 list_tabbed: true 12 12 list_editable: false 13 14 module_retur s_layout:true # set to true to let the module return a layout (so you don't have to setup a layout.php) or let the module only return a js-var: App.RequestedModulePanel13 14 module_returns_layout: true # set to true to let the module return a layout (so you don't have to setup a layout.php) or let the module only return a js-var: App.RequestedModulePanel 15 15 module_panel_name: App.RequestedModulePanel # the name of the var to the panel name returned by the module-action 16 16 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php
r8992 r9014 143 143 ?] 144 144 145 var <?php echo $formName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($form_config) ?];146 147 145 [?php 148 146 // constructor 149 147 $sfExtjs2_<?php echo $formName ?>_constructor = " 150 148 // combine <?php echo $formName ?>Config with arguments 151 Ext.app.sx.<?php echo $formName ?>.superclass.constructor.call(this, Ext.apply( <?php echo $formName ?>Config, c));149 Ext.app.sx.<?php echo $formName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($form_config).", c)); 152 150 "; 153 151 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_header.php
r8990 r9014 13 13 ?] 14 14 15 var <?php echo $panelName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($panel_config) ?];16 17 15 [?php 18 16 // initComponent 19 17 $sfExtjs2_<?php echo $panelName ?>_initComponent = " 20 Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config);18 Ext.apply(this, this.initialConfig, ".$sfExtjs2Plugin->asAnonymousClass($panel_config)."); 21 19 //call parent 22 20 Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_west.php
r8990 r9014 13 13 ?] 14 14 15 var <?php echo $panelName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($panel_config) ?];16 17 15 [?php 18 16 // initComponent 19 17 $sfExtjs2_<?php echo $panelName ?>_initComponent = " 20 Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config);18 Ext.apply(this, this.initialConfig, ".$sfExtjs2Plugin->asAnonymousClass($panel_config)."); 21 19 //call parent 22 20 Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_paging_js.php
r8910 r9014 22 22 //setup the configuration 23 23 $config = array( 24 'name' => '<?php echo $toolbarName ?>Config', 25 'attributes' => array( 26 'pageSize' => <?php echo $limit ?>, 27 'displayInfo' => true, 28 'displayMsg' => 'Displaying <?php echo $this->getModuleName() ?>s {0} - {1} of {2}', 29 'emptyMsg' => 'No <?php echo $this->getModuleName() ?> to display' 30 ) 24 'pageSize' => <?php echo $limit ?>, 25 'displayInfo' => true, 26 'displayMsg' => 'Displaying <?php echo $this->getModuleName() ?>s {0} - {1} of {2}', 27 'emptyMsg' => 'No <?php echo $this->getModuleName() ?> to display' 31 28 ); 32 echo $sfExtjs2Plugin->asAnonymousClass($config);33 29 34 30 // constructor 35 31 $sfExtjs2_<?php echo $toolbarName ?>_constructor = " 36 32 // combine <?php echo $toolbarName ?>Config with arguments 37 Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply( <?php echo $toolbarName ?>Config, c));33 Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config).", c)); 38 34 "; 39 35 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_js.php
r8910 r9014 37 37 // constructor 38 38 $sfExtjs2_<?php echo $toolbarName ?>_constructor = " 39 <?php echo $toolbarName ?>Config = ".$sfExtjs2Plugin->asAnonymousClass($config_items).";40 41 39 // combine <?php echo $toolbarName ?>Config with arguments 42 Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply( <?php echo $toolbarName ?>Config, c));40 Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config_items).", c)); 43 41 "; 44 42 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs
r8992 r9014 64 64 [?php $sfExtjs2Plugin = new sfExtjs2Plugin(); ?] 65 65 66 var <?php echo $panelName ?>Config = [?php echo $config ?];67 68 66 [?php 69 67 70 68 // initComponent 71 69 $sfExtjs2_<?php echo $panelName ?>_initComponent = " 72 Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config);70 Ext.apply(this, this.initialConfig, ".$config."); 73 71 //call parent 74 72 Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php
r8990 r9014 67 67 editPanel.on('close_request', function(ep) {alert('Close Request: ' + ep.key + ', message from event-handler')} ); 68 68 69 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_retur s_layout', true)): ?>69 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returns_layout', true)): ?> 70 70 var viewport = <?php echo $sfExtjs2Plugin->Viewport(array( 71 71 'layout' => 'fit', plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs
r8948 r9014 41 41 42 42 $config_array = array( 43 'name' => '<?php echo $panelName ?>Config', 44 'attributes' => array( 45 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $storeName ?>()'), 46 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), 47 'view' => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), 48 49 'autoHeight' => true, 50 'autoScroll' => true, //TODO: need some work 51 52 'autoLoadStore' => true, 43 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $storeName ?>()'), 44 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), 45 'view' => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), 53 46 54 'selModel' => $sfExtjs2Plugin->RowSelectionModel(array( 55 'singleSelect' => <?php echo $this->getParameterValue('list.single_select', true) ?> 56 )), 57 'enableColLock' => false, 58 'clicksToEdit' => 1, 59 'trackMouseOver' => true, 60 61 'loadMask' => false, 62 ) 47 'autoHeight' => true, 48 'autoScroll' => true, //TODO: need some work 49 50 'autoLoadStore' => true, 51 52 'selModel' => $sfExtjs2Plugin->RowSelectionModel(array( 53 'singleSelect' => <?php echo $this->getParameterValue('list.single_select', true) ?> 54 )), 55 'enableColLock' => false, 56 'clicksToEdit' => 1, 57 'trackMouseOver' => true, 58 59 'loadMask' => false, 63 60 ); 64 61 … … 73 70 <?php endif; ?> 74 71 75 ?]76 [?php echo $sfExtjs2Plugin->asAnonymousClass($config_array); ?]77 [?php78 72 79 73 // constructor 80 74 $sfExtjs2_<?php echo $panelName ?>_constructor = " 81 75 // combine <?php echo $panelName ?>Config with arguments 82 Ext.app.sx.<?php echo $panelName ?>.superclass.constructor.call(this, Ext.apply( <?php echo $panelName ?>Config, c));76 Ext.app.sx.<?php echo $panelName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config_array).", c)); 83 77 "; 84 78 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php
r8911 r9014 56 56 // list<?php echo $moduleName ?>GridPanel.on('actions', function() {alert('action: ')} ); 57 57 58 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_retur s_layout', true)): ?>58 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returns_layout', true)): ?> 59 59 var viewport = [?php echo $sfExtjs2Plugin->Viewport(array( 60 60 'layout' => 'fit', plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php
r8910 r9014 394 394 { 395 395 case 'cancel': 396 $default_handler_function = "function() { this.ownerCt. ownerCt.fireEvent('close_request', this.ownerCt.ownerCt); }";396 $default_handler_function = "function() { this.ownerCt.fireEvent('close_request', this.ownerCt.ownerCt); }"; 397 397 break; 398 398 399 399 case 'reload': 400 $default_handler_function = "function() { this.ownerCt. ownerCt.loadItem(); }";400 $default_handler_function = "function() { this.ownerCt.loadItem(); }"; 401 401 break; 402 402 403 403 case 'save': 404 404 $type = 'submit'; 405 $default_handler_function = "function() { this. ownerCt.doSubmit() }";405 $default_handler_function = "function() { this.doSubmit() }"; 406 406 break; 407 407 408 408 case 'delete': 409 $default_handler_function = "function() { this.ownerCt. ownerCt.deleteItem(); }";409 $default_handler_function = "function() { this.ownerCt.deleteItem(); }"; 410 410 break; 411 411 … … 468 468 cls: 'x-btn-text-icon ".$actionClass."', 469 469 // disabled: false, 470 //scope: this,470 scope: this, 471 471 // formBind: true, 472 472 handler : ".$handler_function."