Changeset 10129
- Timestamp:
- 07/05/08 01:02:25 (5 months ago)
- Files:
-
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/actions/actions.class.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php (modified) (3 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_json.php (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_js.php (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_method_constructor_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_layout_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editSuccess.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/jsonSaveSuccess.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listSuccess.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/actions/actions.class.php
r10117 r10129 384 384 <?php endforeach; ?> 385 385 <?php endforeach; ?> 386 <?php if(! ($deleteNotification = $this->getParameterValue('edit.delete_notification'))) $deleteNotification = 'The '.$this->getModuleName().' has been deleted' ?> 386 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 387 <?php if(! ($deleteNotification = $this->getParameterValue('edit.delete_notification'))) $deleteNotification = 'The '.$objectName.' has been deleted' ?> 387 388 $this->setFlash('notice', '<?php echo $deleteNotification ?>'); 388 389 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php
r9963 r10129 20 20 21 21 22 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 23 22 24 $form_config = array( 23 // 'region' => 'center',24 25 'xtype' => 'form', 25 26 // 'baseCls => 'x-plain', 27 28 'title' => <?php echo $this->getI18NString('edit.newtitle', 'New '.$objectName, false) ?>, 26 29 27 30 // 'width' => 400, … … 58 61 ); 59 62 60 //set primary key61 $form_config['items'] = array(62 //obsolete, use params63 // $sfExtjs2Plugin->asAnonymousClass(array(64 // 'xtype' => 'hidden',65 // 'name' => '<?php $pkn ?>'66 // ))67 );68 69 70 63 <?php 71 64 // add fields, fieldsets, tab-pages and buttons … … 80 73 // combine <?php echo $formName ?>Config with arguments 81 74 Ext.app.sx.<?php echo $formName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($form_config).", c)); 82 83 this.title = '".<?php echo $this->getI18NString('edit.newtitle', 'Add new '.$this->getModuleName(), false) ?>."';84 75 85 76 this.modulename = '<?php echo $this->getModuleName() ?>'; plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_json.php
r9902 r10129 1 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 1 2 [?php use_helper('I18N', 'Date') ?] 2 3 [?php sfLoader::loadHelpers('Extjs'); ?] … … 9 10 [?php if ($for == 'edit'): ?] 10 11 , 11 title: "<?php echo $this->getI18NString('edit.title', 'Edit '.$ this->getModuleName()) ?>"12 title: "<?php echo $this->getI18NString('edit.title', 'Edit '.$objectName) ?>" 12 13 [?php endif; ?] 13 14 } plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_js.php
r10003 r10129 13 13 /* gridPanel Configuration */ 14 14 15 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 16 15 17 $sfExtjs2_gridpanel_view = 'new Ext.grid.GridView({forceFit: true, autoFill: true <?php echo $grid_view_extras ?>})'; 16 18 17 19 // default config 18 20 $gridpanel->config_array = array( 21 'title' => <?php echo $this->getI18NString('list.title', $objectName.' overview', false) ?>, 19 22 'ds' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo 'List'.$moduleName.(($group_field)?'Grouping':'Store') ?>()'), 20 23 'cm' => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo 'List'.$moduleName.'ColumnModel' ?>()'), … … 31 34 32 35 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_list_tabbed')): ?> 33 $gridpanel->config_array[' title'] = <?php echo $this->getI18NString('list.title', $this->getModuleName().' list', false) ?>; //TODO remove 'Grid';36 $gridpanel->config_array['header'] = false; 34 37 <?php endif; ?> 35 38 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_method_constructor_js.php
r10049 r10129 15 15 this.panelType = 'list'; 16 16 17 if ( typeof c.filter != 'undefined') {18 var baseParams = {'filter': true} 17 if ((typeof c != 'undefined') && (typeof c.filter != 'undefined')) { 18 var baseParams = {'filter': true}; 19 19 c.filter_key = (typeof c.filter_key != 'undefined') ? c.filter_key : -1; 20 20 baseParams['filters['+c.filter+']'] = c.filter_key; plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_layout_js.php
r9963 r10129 30 30 31 31 32 var list<?php echo $moduleName ?>GridPanel = new Ext.app.sx.List<?php echo $moduleName ?>GridPanel ([?php echo $sfExtjs2Plugin->asAnonymousClass(array( 33 'title' => <?php echo $this->getI18NString('list.title', $this->getModuleName().' list', false) ?> 34 ))?]); 32 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 33 var list<?php echo $moduleName ?>GridPanel = new Ext.app.sx.List<?php echo $moduleName ?>GridPanel(); 35 34 36 35 // list<?php echo $moduleName ?>GridPanel.on('actions', function() {alert('action: ')} ); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs
r10018 r10129 64 64 ); 65 65 66 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 66 67 $config = $sfExtjs2Plugin->asAnonymousClass(array( 67 68 'layout' => 'border', … … 71 72 // 'height' => 300, 72 73 73 'title' => <?php echo $this->getI18NString('edit.newtitle', 'Add '.$ this->getModuleName(), false) ?>,74 'header' => false,74 'title' => <?php echo $this->getI18NString('edit.newtitle', 'Add '.$objectName, false) ?>, 75 'header' => true, //TODO: make this a config option 75 76 76 77 'defaults' => array('border' => false), plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php
r10114 r10129 67 67 <?php endif;?> 68 68 69 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 69 70 [?php 70 $config = "{"; 71 $config .= "title: '"; 71 $config = array(); 72 72 if ($<?php echo $this->getSingularName() ?>->isNew()) 73 73 { 74 $config .= <?php echo $this->getI18NString('edit.newtitle', 'Add new '.$this->getModuleName(), false); ?>;74 $config['title'] = <?php echo $this->getI18NString('edit.newtitle', 'Add '.$objectName, false); ?>; 75 75 } 76 76 else 77 77 { 78 $config .= <?php echo $this->getI18NString('edit.title', 'Edit '.$this->getModuleName(), false); ?>; 78 $config['title'] = <?php echo $this->getI18NString('edit.title', 'Edit '.$objectName, false); ?>; 79 $config['key'] = $<?php echo $this->getSingularName()?>->get<?php echo $pk->getPhpName() ?>(); 79 80 } 80 $config .= "'";81 $config['header'] = true; // TODO, make config option 81 82 ?] 82 [?php $config .= ", header: false " ?] 83 [?php if (!$<?php echo $this->getSingularName() ?>->isNew()): ?] 84 [?php $config .= ", key:".$<?php echo $this->getSingularName()?>->get<?php echo $pk->getPhpName() ?>(); ?] 85 [?php endif; ?] 86 [?php $config .= "}"; ?] 87 var editPanel = new Ext.app.sx.Edit<?php echo $moduleName ?>FormPanel([?php echo $config ?]); 83 84 var editPanel = new Ext.app.sx.Edit<?php echo $moduleName ?>FormPanel([?php echo $sfExtjs2Plugin->asAnonymousClass($config) ?]); 88 85 [?php if (!$<?php echo $this->getSingularName() ?>->isNew()): ?] 89 86 editPanel.loadItem(); 90 87 [?php endif; ?] 91 88 89 editPanel 92 90 editPanel.on('saved', function(panel) {alert('saved: ' + panel.getKey() )} ); 93 91 editPanel.on('deleted', function(panel) {alert('deleted: ' + panel.getKey() )} ); plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editSuccess.php
r7032 r10129 8 8 <div id="sf_admin_container"> 9 9 10 [?php if ($<?php echo $this->getSingularName() ?>->isNew()): ?] 11 <h1><?php echo $this->getI18NString('edit.newtitle', 'Add new '.$this->getModuleName()); ?></h1> 12 [?php else: ?] 13 <h1><?php echo $this->getI18NString('edit.title', 'Edit '.$this->getModuleName()); ?></h1> 10 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 11 [?php if ($<?php echo $this->getSingularName() ?>->isNew()): ?] 12 <h1><?php echo $this->getI18NString('edit.newtitle', 'Add '.$objectName); ?></h1> 13 [?php else: ?] 14 <h1><?php echo $this->getI18NString('edit.title', 'Edit '.$objectName); ?></h1> 14 15 [?php endif; ?] 15 16 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/jsonSaveSuccess.php
r8992 r10129 1 1 [?php use_helper('I18N', 'Date') ?] 2 3 { success: true, message: "Your modifications have been saved", id: "[?php echo $id ?]", title: "<?php echo $this->getI18NString('edit.title', 'Edit '.$ this->getModuleName()) ?>" }2 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 3 { success: true, message: "Your modifications have been saved", id: "[?php echo $id ?]", title: "<?php echo $this->getI18NString('edit.title', 'Edit '.$objectName) ?>" } plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php
r10114 r10129 61 61 <div id="sf_admin_bar"> 62 62 <?php if ($this->getParameterValue('list.filters')): ?> 63 [?php //include_partial('filters', array('filters' => $filters)) // filters loaded at different place ?]63 [?php //include_partial('filters', array('filters' => $filters)) // filters loaded at different place? ???? >LvanderRee please ask again at forum, don't know who said this, but filters aren't implemented yet, it needs to be reimplemted in its own panel, so it can be reused at any location you want ?] 64 64 <?php endif; ?> 65 65 </div> … … 70 70 <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div> 71 71 <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"> 72 <h3 style="margin-bottom:5px;"><?php echo $this->getI18NString('list.title', $this->getModuleName().' list') ?></h3> 72 73 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 74 <h3 style="margin-bottom:5px;"><?php echo $this->getI18NString('list.title', $objectName.' overview') ?></h3> 73 75 <div id="ajax-border" style="border:1px solid transparent;"> 74 76 <?php endif; ?> plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listSuccess.php
r7185 r10129 5 5 <div id="sf_admin_container"> 6 6 7 <h1><?php echo $this->getI18NString('list.title', $this->getModuleName().' list') ?></h1> 7 <?php $objectName = $this->getParameterValue('object_name', $this->getModuleName()) ?> 8 <h1><?php echo $this->getI18NString('list.title', $objectName.' overview') ?></h1> 8 9 9 10 <div id="sf_admin_header">