Changeset 8911
- Timestamp:
- 05/12/08 02:10:11 (2 months ago)
- Files:
-
- plugins/sfExtjsThemePlugin/config/app.yml (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel.php (deleted)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_store.php (deleted)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php (modified) (4 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php (modified) (3 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listJsSuccess.pjs (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/config/app.yml
r8725 r8911 1 1 all: # these are the defaults, you should override them in your application/config/app.yml file 2 2 sf_extjs_theme_plugin: 3 pjs: false4 3 table_delimiter: "-" 5 4 … … 13 12 list_editable: false 14 13 14 module_returs_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 module_panel_name: App.RequestedModulePanel # the name of the var to the panel name returned by the module-action 16 15 17 use_tinymce: false 16 18 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php
r8797 r8911 7 7 $pk = $groupedColumns['pk']; 8 8 ?> 9 <?php if (false): ?>9 <?php if (false): //TODO can this be deleted ?> 10 10 <link rel="stylesheet" type="text/css" href="<?php echo $this->getParameterValue('css', sfConfig::get('sf_admin_web_dir').'/css/main') ?>"></link> 11 11 <?php endif; ?> … … 41 41 42 42 Ext.onReady(function(){ 43 [?php $config = ""; ?] 43 [?php 44 $config = "{"; 45 $config .= "title: '"; 46 if ($<?php echo $this->getSingularName() ?>->isNew()) 47 { 48 $config .= <?php echo $this->getI18NString('edit.newtitle', 'Add new '.$this->getModuleName(), false); ?>; 49 } 50 else 51 { 52 $config .= <?php echo $this->getI18NString('edit.title', 'Edit '.$this->getModuleName(), false); ?>; 53 } 54 $config .= "'"; 55 ?] 44 56 [?php if (!$<?php echo $this->getSingularName() ?>->isNew()): ?] 45 [?php $config = "{key:".$<?php echo $this->getSingularName()?>->get<?php echo $pk->getPhpName() ?>()."}"; ?]57 [?php $config .= ", key:".$<?php echo $this->getSingularName()?>->get<?php echo $pk->getPhpName() ?>(); ?] 46 58 [?php endif; ?] 59 [?php $config .= "}"; ?] 47 60 var editPanel = new Ext.app.sx.Edit<?php echo $moduleName ?>Panel([?php echo $config ?]); 48 61 [?php if (!$<?php echo $this->getSingularName() ?>->isNew()): ?] … … 54 67 editPanel.on('close_request', function(ep) {alert('Close Request: ' + ep.key + ', message from event-handler')} ); 55 68 69 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returs_layout', true)): ?> 56 70 var viewport = <?php echo $sfExtjs2Plugin->Viewport(array( 57 71 'layout' => 'fit', … … 59 73 )); ?> 60 74 viewport.doLayout(); 75 <?php else: ?> 76 <?php echo sfConfig::get('app_sf_extjs_theme_plugin_module_panel_name', 'App.RequestedModulePanel') ?> = editPanel; 77 <?php endif; ?> 61 78 }); 79 62 80 </script> plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php
r8618 r8911 1 <?php if (false): ?> 1 <?php 2 $sfExtjs2Plugin = new sfExtjs2Plugin(); 3 4 $moduleName = sfInflector::camelize($this->getModuleName()); 5 6 $groupedColumns = $this->getColumnsGrouped('list.display', true); 7 $pk = $groupedColumns['pk']; 8 ?> 9 <?php if (false): //TODO can this be deleted ?> 2 10 <link rel="stylesheet" type="text/css" href="<?php echo $this->getParameterValue('css', sfConfig::get('sf_admin_web_dir').'/css/main') ?>"></link> 3 11 <?php endif; ?> … … 26 34 $sfExtjs2Plugin->load(); 27 35 ?] 36 37 [?php 38 // javascript layout 39 use_helper('PJS'); 40 use_pjs('<?php echo $this->getModuleName() ?>/listAjaxGridPanelJs') 41 42 // use_pjs('<?php echo $this->getModuleName() ?>/listJs') OBSOLETE 43 // include_partial('list_ajax_layout') //OBSOLETE 44 ?] 45 46 28 47 <script type="text/javascript"> 29 48 // initialise the using-script, more info at: http://home.jondavis.net:880/blog/post/2008/04/Javascript-Introducing-Using-(js).aspx 30 49 using.register(); 50 51 Ext.onReady(function(){ 52 var list<?php echo $moduleName ?>GridPanel = new Ext.app.sx.ListCityGridPanel ({ 53 title: '<?php echo $this->getI18NString('list.title', $this->getModuleName().' list') ?>' 54 }); 55 56 // list<?php echo $moduleName ?>GridPanel.on('actions', function() {alert('action: ')} ); 57 58 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returs_layout', true)): ?> 59 var viewport = [?php echo $sfExtjs2Plugin->Viewport(array( 60 'layout' => 'fit', 61 'items' => array( 62 $sfExtjs2Plugin->TabPanel(array( 63 'region' => 'center', 64 'items' => array( 65 $sfExtjs2Plugin->asVar('list<?php echo $moduleName ?>GridPanel'), 66 ), 67 )) 68 ), 69 )); ?] 70 viewport.doLayout(); 71 <?php else: ?> 72 <?php echo sfConfig::get('app_sf_extjs_theme_plugin_module_panel_name', 'App.RequestedModulePanel') ?> = list<?php echo $moduleName ?>GridPanel; 73 <?php endif; ?> 74 75 }); 76 31 77 </script> 32 78 33 [?php 34 // javascript layout 35 <?php if ($this->getParameterValue('pjs', sfConfig::get('app_sf_extjs_theme_plugin_pjs', false))): ?> 36 use_helper('PJS'); 37 use_pjs('<?php echo $this->getModuleName() ?>/listJs') 38 <?php else: ?> 39 include_partial('list_ajax_layout') 40 <?php endif; ?> 41 ?] 79 80 <?php if(false): //OBSOLETE - or at least out-dated (if you don't want to use a viewport, you need to alter things below...) ?> 42 81 43 82 <div id="sf_admin_container"> … … 82 121 </div> 83 122 123 <?php endif; ?>