Author: KRavEN
Date: 2010-05-20 15:25:50 +0200 (Thu, 20 May 2010)
New Revision: 29552
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/configuration.php
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/fieldsConfiguration.php
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_layout.js.php
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_listaction__new.js.php
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
Log:
fixed tab panel to show configured list title. changed list, edit, and new
titles to take into account object_name parameter if title not set. fixed new
action to set the proper title. fixed list tab to have the proper title.
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/configuration.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/configuration.php
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/configuration.php
2010-05-20 13:25:50 UTC (rev 29552)
@@ -70,15 +70,15 @@
return <?php echo $this->asPhp(isset($this->config['list']['with']) ?
$this->config['list']['with'] : array()) ?>;
<?php unset($this->config['list']['with']) ?>
}
-
+
public function getQueryMethods()
{
return <?php echo
$this->asPhp(isset($this->config['list']['query_methods']) ?
$this->config['list']['query_methods'] : array()) ?>;
<?php unset($this->config['list']['query_methods']) ?>
}
-
+
public function getObjectName()
{
- return '<?php echo isset($this->params['object_name']) ?
$this->params['object_name'] : $this->getModuleName() ?>';
+ return '<?php echo isset($this->params['object_name']) ?
$this->params['object_name'] : sfInflector::humanize($this->getModuleName())
?>';
}
}
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/fieldsConfiguration.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/fieldsConfiguration.php
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/fieldsConfiguration.php
2010-05-20 13:25:50 UTC (rev 29552)
@@ -4,19 +4,58 @@
public function getListTitle()
{
- return '<?php echo
$this->escapeString(isset($this->config['list']['title']) ?
$this->config['list']['title'] :
sfInflector::humanize($this->getModuleName()).' List') ?>';
+<?php
+if(isset($this->config['list']['title']))
+{
+ $title = $this->config['list']['title'];
+} else if(isset($this->params['object_name']))
+{
+ $title = sfInflector::humanize($this->params['object_name']). ' List';
+}
+else
+{
+ $title = sfInflector::humanize($this->getModuleName()). ' List';
+}
+?>
+ return '<?php echo $this->escapeString($title) ?>';
<?php unset($this->config['list']['title']) ?>
}
public function getEditTitle()
{
- return '<?php echo
$this->escapeString(isset($this->config['edit']['title']) ?
$this->config['edit']['title'] : 'Edit
'.sfInflector::humanize($this->getModuleName())) ?>';
+<?php
+if(isset($this->config['edit']['title']))
+{
+ $title = $this->config['edit']['title'];
+} else if(isset($this->params['object_name']))
+{
+ $title = 'Edit '.sfInflector::humanize($this->params['object_name']);
+}
+else
+{
+ $title = 'Edit '.sfInflector::humanize($this->getModuleName());
+}
+?>
+ return '<?php echo $this->escapeString($title) ?>';
<?php unset($this->config['edit']['title']) ?>
}
public function getNewTitle()
{
- return '<?php echo
$this->escapeString(isset($this->config['new']['title']) ?
$this->config['new']['title'] : 'New
'.sfInflector::humanize($this->getModuleName())) ?>';
+<?php
+if(isset($this->config['new']['title']))
+{
+ $title = $this->config['new']['title'];
+} else if(isset($this->params['object_name']))
+{
+ $title = 'New '.sfInflector::humanize($this->params['object_name']);
+}
+else
+{
+ $title = 'New '.sfInflector::humanize($this->getModuleName());
+}
+?>
+ return '<?php echo $this->escapeString($title) ?>';
<?php unset($this->config['new']['title']) ?>
}
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
2010-05-20 13:25:50 UTC (rev 29552)
@@ -2,7 +2,6 @@
{
return array_merge(array(
'xtype' => 'form',
- 'title' => 'New '.$this->getObjectName(),
'autoScroll' => true,
'labelWidth' => 200,
'labelAlign' => 'right',
@@ -12,12 +11,12 @@
'defaults' => array('anchor' => '50%'),
'plugins' => $this->getFormpanelPlugins(),
), <?php echo $this->asPhp(isset($this->config['formpanel']['config']) ?
$this->config['formpanel']['config'] : array()) ?>);
-<?php unset($this->config['formpanel']['config']) ?>
+<?php unset($this->config['formpanel']['config']) ?>
}
-
+
public function getFormFieldsetParams($fieldset)
{
-<?php
+<?php
$fieldsetConfigs = array();
if(isset($this->config['form']))
{
@@ -60,5 +59,4 @@
{
return <?php echo
$this->asPhp(isset($this->config['formpanel']['partials']) ?
$this->config['formpanel']['partials'] : array()) ?>;
<?php unset($this->config['formpanel']['partials']) ?>
- }
-
\ No newline at end of file
+ }
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_layout.js.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_layout.js.php
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_layout.js.php
2010-05-20 13:25:50 UTC (rev 29552)
@@ -1,6 +1,6 @@
<?php echo sfConfig::get('app_extjs_gen_plugin_module_grid_panel_name',
'Ext.app.sf.GridPanel') ?> = Ext.ComponentMgr.create({
xtype : '<?php echo $this->getModuleName() ?>gridpanel',
- title: '<?php echo $this->configuration->getObjectName() ?>'
+ title: '<?php echo $this->configuration->getListTitle() ?>'
});
<?php if (sfConfig::get('app_extjs_gen_plugin_module_returns_layout', true)):
?>
[?php include_partial('viewport', array('sfExtjs3Plugin' => $sfExtjs3Plugin))?]
@@ -25,7 +25,7 @@
[?php
$partialArr = array();
$partialArr['sfExtjs3Plugin'] = $sfExtjs3Plugin;
- //$partialArr['gridpanel'] = '<?php echo
sfConfig::get('app_extjs_gen_plugin_module_grid_panel_name',
'Ext.app.sf.GridPanel') ?>';
+ $partialArr['gridpanel'] = '<?php echo
sfConfig::get('app_extjs_gen_plugin_module_grid_panel_name',
'Ext.app.sf.GridPanel') ?>';
$partialArr['tabpanel'] = '<?php echo
sfConfig::get('app_extjs_gen_plugin_module_tab_panel_name',
'Ext.app.sf.TabPanel') ?>';
<?php if($this->configuration->hasFilterForm()):?>
$partialArr['filterpanel'] = '<?php echo
sfConfig::get('app_extjs_gen_plugin_module_filter_panel_name',
'Ext.app.sf.FilterPanel') ?>';
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_listaction__new.js.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_listaction__new.js.php
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_listaction__new.js.php
2010-05-20 13:25:50 UTC (rev 29552)
@@ -4,7 +4,8 @@
var formpanel = Ext.ComponentMgr.create({
xtype: '<?php echo $this->getModuleName() ?>formpanel',
- gridPanel: this.ownerCt
+ title: '<?php echo $this->configuration->getNewTitle() ?>',
+ gridPanel: this.ownerCt
});
<?php echo sfConfig::get('app_extjs_gen_plugin_module_tab_panel_name',
'Ext.app.sf.TabPanel') ?>.add(formpanel).show();
";
Modified:
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
2010-05-20 13:15:08 UTC (rev 29551)
+++
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
2010-05-20 13:25:50 UTC (rev 29552)
@@ -4,7 +4,7 @@
Ext.MessageBox.wait('Loading Panel', 'Please Wait...');
Ext.app.CodeLoader.load({
async : false,
-// disableCaching : false
+ disableCaching : true,
method : 'GET'
}, '/js/getXtype/' + xtype);
Ext.MessageBox.hide();
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.