| 45 | | // add a paging toolbar to the grid's footer |
|---|
| 46 | | $sfExtjs2Plugin_App_init .= $sfExtjs2Plugin->PagingToolbar(array( |
|---|
| 47 | | 'name' => 'pagingToolbar', |
|---|
| 48 | | 'attributes' => array( |
|---|
| 49 | | 'store' => new sfExtjs2Var('ds_list'), |
|---|
| 50 | | 'pageSize' => $limit, |
|---|
| 51 | | 'displayInfo' => true, |
|---|
| 52 | | 'displayMsg' => 'Displaying '.$this->getModuleName().'s {0} - {1} of {2}', |
|---|
| 53 | | 'emptyMsg' => 'No '.$this->getModuleName().' to display' |
|---|
| 54 | | ) |
|---|
| 55 | | )); |
|---|
| 56 | | ?> |
|---|
| 57 | | |
|---|
| 58 | | <?php |
|---|
| 59 | | |
|---|
| 60 | | $sfExtjs2_gridpanel_view = 'new Ext.grid.GridView ({forceFit: true, autoFill: true })'; |
|---|
| | 37 | $sfExtjs2_gridpanel_view = 'new Ext.grid.GridView({forceFit: true, autoFill: true })'; |
|---|
| 63 | | 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.'.$storeName.'()'), |
|---|
| 64 | | 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.'.$cmName.'()'), |
|---|
| 65 | | 'view' => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), |
|---|
| 66 | | 'tbar' => $sfExtjs2Plugin->asVar('topToolbar'), |
|---|
| 67 | | 'bbar' => $sfExtjs2Plugin->asVar('pagingToolbar'), |
|---|
| | 40 | 'name' => '<?php echo $panelName ?>Config', |
|---|
| | 41 | 'attributes' => array( |
|---|
| | 42 | 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $storeName ?>()'), |
|---|
| | 43 | 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), |
|---|
| | 44 | 'view' => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), |
|---|
| | 45 | 'tbar' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $topToolbarName ?>()'), |
|---|
| | 46 | 'bbar' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $pagingToolbarName ?>()'), |
|---|
| | 47 | |
|---|
| | 48 | 'autoHeight' => true, |
|---|
| | 49 | 'autoScroll' => true, //TODO: need some work |
|---|
| 69 | | 'autoHeight' => true, |
|---|
| 70 | | 'autoScroll' => true, //TODO: need some work |
|---|
| 71 | | |
|---|
| 72 | | 'selModel' => $sfExtjs2Plugin->RowSelectionModel(array( |
|---|
| 73 | | 'singleSelect' => $this->getParameterValue('list.single_select', true) |
|---|
| 74 | | )), |
|---|
| 75 | | 'enableColLock' => false, |
|---|
| 76 | | 'clicksToEdit' => 1, |
|---|
| 77 | | 'trackMouseOver' => true, |
|---|
| 78 | | |
|---|
| 79 | | 'loadMask' => false, |
|---|
| | 51 | 'selModel' => $sfExtjs2Plugin->RowSelectionModel(array( |
|---|
| | 52 | 'singleSelect' => <?php echo $this->getParameterValue('list.single_select', true) ?> |
|---|
| | 53 | )), |
|---|
| | 54 | 'enableColLock' => false, |
|---|
| | 55 | 'clicksToEdit' => 1, |
|---|
| | 56 | 'trackMouseOver' => true, |
|---|
| | 57 | |
|---|
| | 58 | 'loadMask' => false, |
|---|
| | 59 | ) |
|---|
| 82 | | if (sfConfig::get('app_sf_extjs_theme_plugin_list_tabbed')) $config_array['title'] = 'Grid'; |
|---|
| 83 | | if ($this->getParameterValue('list.grouping.plugins')) $config_array['plugins'] = $this->getParameterValue('list.grouping.plugins'); //TODO: might require sfExtjs2Plugin->asVar ??? too late to thing now... |
|---|
| 84 | | if ($this->getParameterValue('list.auto_expand_column')) $config_array['autoExpandColumn'] = $this->getParameterValue('list.auto_expand_column'); |
|---|
| 85 | | |
|---|
| 86 | | $config = $sfExtjs2Plugin->asAnonymousClass($config_array); |
|---|
| 87 | | ?> |
|---|
| | 62 | <?php if (sfConfig::get('app_sf_extjs_theme_plugin_list_tabbed')): ?> |
|---|
| | 63 | $config_array['title'] = 'Grid'; |
|---|
| | 64 | <?php endif; ?> |
|---|
| | 65 | <?php if ($this->getParameterValue('list.grouping.plugins')): ?> |
|---|
| | 66 | $config_array['plugins'] = '<?php echo $this->getParameterValue('list.grouping.plugins') ?>'; //TODO: might require sfExtjs2Plugin->asVar ??? too late to thing now... |
|---|
| | 67 | <?php endif; ?> |
|---|
| | 68 | <?php if ($this->getParameterValue('list.auto_expand_column')): ?> |
|---|
| | 69 | $config_array['autoExpandColumn'] = '<?php echo $this->getParameterValue('list.auto_expand_column') ?>'; |
|---|
| | 70 | <?php endif; ?> |
|---|