Changeset 8910
- Timestamp:
- 05/11/08 18:34:37 (5 months ago)
- Files:
-
- 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) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_paging_js.php
r8909 r8910 24 24 'name' => '<?php echo $toolbarName ?>Config', 25 25 'attributes' => array( 26 'store' => new sfExtjs2Var('new Ext.data.Store()'), // TODO: new sfExtjs2Var('parent.grid.ds'), or something like that27 26 'pageSize' => <?php echo $limit ?>, 28 27 'displayInfo' => true, plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_js.php
r8909 r8910 26 26 27 27 //setup the configuration 28 $config = array( 29 'name' => '<?php echo $toolbarName ?>Config', 30 'attributes' => array( 31 'autoWidth' => false, 32 'items' => array() 33 ) 28 $config_items = array( 29 'autoWidth' => false, 30 'items' => array() 34 31 ); 35 32 36 33 <?php foreach ((array) $listActions as $actionName => $params): ?> 37 <?php echo $this->addCredentialCondition("\$config ['attributes']['items'][] = \$sfExtjs2Plugin->asAnonymousClass(array(".$this->getAjaxButtonToToolbarAction($actionName, $params, false)."));\n\n", $params) ?>34 <?php echo $this->addCredentialCondition("\$config_items['items'][] = \$sfExtjs2Plugin->asAnonymousClass(array(".$this->getAjaxButtonToToolbarAction($actionName, $params, false)."));\n\n", $params) ?> 38 35 <?php endforeach ?> 39 36 40 echo $sfExtjs2Plugin->asAnonymousClass($config);41 42 37 // constructor 43 38 $sfExtjs2_<?php echo $toolbarName ?>_constructor = " 39 <?php echo $toolbarName ?>Config = ".$sfExtjs2Plugin->asAnonymousClass($config_items)."; 40 44 41 // combine <?php echo $toolbarName ?>Config with arguments 45 42 Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(<?php echo $toolbarName ?>Config, c)); … … 50 47 //call parent 51 48 Ext.app.sx.<?php echo $toolbarName ?>.superclass.initComponent.apply(this, arguments); 52 53 49 "; 54 50 55 51 56 52 // app.sx from Symfony eXtended (instead of ux: user eXtention) plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs
r8909 r8910 46 46 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), 47 47 'view' => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), 48 'tbar' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $topToolbarName ?>()'),49 'bbar' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $pagingToolbarName ?>()'),50 48 51 49 'autoHeight' => true, … … 87 85 // initComponent 88 86 $sfExtjs2_<?php echo $panelName ?>_initComponent = " 87 // initialise items which use this grid's-store 88 this.tbar = new Ext.app.sx.<?php echo $topToolbarName ?>({store: this.ds}), 89 this.bbar = new Ext.app.sx.<?php echo $pagingToolbarName ?>({store: this.ds}), 90 89 91 //call parent 90 92 Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php
r8909 r8910 253 253 try { var json_response = Ext.util.JSON.decode(response.responseText); } catch (e) {}; 254 254 Ext.Msg.alert('Delete Status', json_response.message); 255 ".$list_ns.".getDataStore().reload();255 this.store.reload(); 256 256 }, 257 257 failure: function(response){ … … 276 276 break; 277 277 case 'refresh': 278 // $list_ns = ucfirst(sfInflector::camelize($this->getModuleName()))."List"; 279 $default_handler_function = $list_ns.".getDataStore().reload();"; 278 $default_handler_function = "this.store.reload();"; 280 279 break; 281 280 case 'print': 282 // $list_ns = ucfirst(sfInflector::camelize($this->getModuleName()))."List";283 281 $default_handler_function = "window.open('".$controller->genUrl($this->getModuleName().'/listPrint')."')"; 284 282 break; 285 283 case 'pdf': 286 // $list_ns = ucfirst(sfInflector::camelize($this->getModuleName()))."List"; 287 // $default_handler_function = $list_ns.".getDataStore().reload();"; 284 // $default_handler_function = "todo"; 288 285 break; 289 286 case 'upload': … … 356 353 'cls' => 'x-btn-text-icon ".$actionClass."', 357 354 'disabled' => false, 355 'store' => 'c.store', 358 356 'handler' => \$sfExtjs2Plugin->asMethod(\"".$handler_function."\") 359 357 ";