Changeset 8834
- Timestamp:
- 05/07/08 15:07:56 (4 months ago)
- Files:
-
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel_js.php (added)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_datastore_js.php (added)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel.php
r8135 r8834 16 16 $groupedColumns = $this->getColumnsGrouped($for, true); 17 17 $columns = $this->getListColumns($groupedColumns, false); 18 19 // "sort" output on index, since index should be unique, this is easy 20 // first create a new array 21 $temp = array(); 22 foreach ($columns as $column) 23 { 24 $temp[$column->index] = $column; 25 } 26 // do real sortining 27 ksort($temp); 28 // put sorted array back 29 $columns = $temp; 18 $columns = $this->sortColumns($columns); 30 19 31 20 $cmOptions = array(); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs
r8803 r8834 1 1 <?php 2 // get the controller, used for URL creation 3 $controller = sfContext::getInstance()->getController(); 4 $sfExtjs2Plugin = new sfExtjs2Plugin(); 2 // get the controller, used for URL creation 3 $controller = sfContext::getInstance()->getController(); 4 $sfExtjs2Plugin = new sfExtjs2Plugin(); 5 6 $moduleName = ucfirst(sfInflector::camelize($this->getModuleName())); 7 $list_ns = $moduleName."List"; 8 $panelName = "List".$moduleName."GridPanel"; 5 9 6 $moduleName = ucfirst(sfInflector::camelize($this->getModuleName())); 7 $list_ns = $moduleName."List"; 8 $panelName = "List".$moduleName."GridPanel"; 10 // set group field 11 $group_field = $this->getParameterValue('list.grouping.field', null); 12 13 $store = 'Store'; if ($group_field) $store = 'Grouping'.$store; 14 $storeName = "List".$moduleName.$store; 15 $cmName = "List".$moduleName.'ColumnModel'; 16 17 18 $pk = $this->getPrimaryKeyAdminColumn(); 19 $pkn = $pk->getName(); 20 ?> 21 [?php 22 $sfExtjs2Plugin = new sfExtjs2Plugin(); 23 ?] 9 24 10 $pk = $this->getPrimaryKeyAdminColumn(); 11 $pkn = $pk->getName(); 12 ?> 13 <?php 25 [?php include_partial('list_ajax_renderer') ?] 26 [?php include_partial('related_ajax_renderer') ?] 27 28 [?php include_partial('list_ajax_datastore_js') ?] 29 [?php include_partial('list_ajax_columnmodel_js') ?] 30 31 <?php 32 14 33 $config_array = array( 15 'ds' => $sfExtjs2Plugin->asVar(' ds_list'),16 'cm' => $sfExtjs2Plugin->asVar(' cm'),17 'view' => $sfExtjs2Plugin->asVar(' view'),18 'tbar' => $sfExtjs2Plugin->asVar('topToolbar'),19 'bbar' => $sfExtjs2Plugin->asVar('pagingToolbar'),34 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.'.$storeName.'()'), 35 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.'.$cmName.'()'), 36 'view' => $sfExtjs2Plugin->asVar('new Ext.grid.GridView ({forceFit: true, autoFill: true })'), 37 // 'tbar' => $sfExtjs2Plugin->asVar('topToolbar'), 38 // 'bbar' => $sfExtjs2Plugin->asVar('pagingToolbar'), 20 39 21 40 'autoHeight' => true, … … 39 58 ?> 40 59 41 [?php42 $sfExtjs2Plugin = new sfExtjs2Plugin();43 ?]44 45 60 var <?php echo $panelName ?>Config = <?php echo $config ?>; 46 61 47 62 [?php 48 63 64 // constructor 65 $sfExtjs2_<?php echo $panelName ?>_constructor = " 66 Ext.app.sx.<?php echo $panelName ?>.superclass.constructor.apply(this, arguments); 67 "; 68 49 69 // initComponent 50 70 $sfExtjs2_<?php echo $panelName ?>_initComponent = " 71 //apply extra config 51 72 Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config); 52 73 //call parent … … 72 93 'Ext.grid.EditorGridPanel', 73 94 array ( 95 'constructor' => $sfExtjs2Plugin->asMethod($sfExtjs2_<?php echo $panelName ?>_constructor), 74 96 'initComponent' => $sfExtjs2Plugin->asMethod($sfExtjs2_<?php echo $panelName ?>_initComponent), 75 97 'initEvents' => $sfExtjs2Plugin->asMethod($sfExtjs2_<?php echo $panelName ?>_initEvents),