Author: KRavEN
Date: 2010-05-24 21:43:12 +0200 (Mon, 24 May 2010)
New Revision: 29610
Added:
plugins/ExtjsGeneratorPlugin/trunk/web/css/
plugins/ExtjsGeneratorPlugin/trunk/web/css/ExtjsGeneratorPlugin.css
Modified:
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_columnModel.js.php
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsGenerator.class.php
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfiguration.class.php
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfigurationField.class.php
Log:
added invisible flagged fields. added css necessary for formtLongstring
renderer.
Modified:
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
2010-05-24 18:22:49 UTC (rev 29609)
+++
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
2010-05-24 19:43:12 UTC (rev 29610)
@@ -44,6 +44,7 @@
// )));
$default_stylesheets = array(
+ '/ExtjsGeneratorPlugin/css/ExtjsGeneratorPlugin.css',
);
$default_javascripts = array(
Modified:
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_columnModel.js.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_columnModel.js.php
2010-05-24 18:22:49 UTC (rev 29609)
+++
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_columnModel.js.php
2010-05-24 19:43:12 UTC (rev 29610)
@@ -18,10 +18,7 @@
foreach ($this->configuration->getValue('list.display') as $name => $field)
{
echo $this->addCredentialCondition(sprintf("%s;\n",
$this->renderColumnModelField($field)), $field->getConfig());
-}
-foreach ($this->configuration->getValue('list.display') as $name => $field)
-{
if($field->isPlugin())
{
echo $this->addCredentialCondition(sprintf("%s;\n",
$this->renderColumnModelPlugin($field)), $field->getConfig());
Modified:
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsGenerator.class.php
===================================================================
--- plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsGenerator.class.php
2010-05-24 18:22:49 UTC (rev 29609)
+++ plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsGenerator.class.php
2010-05-24 19:43:12 UTC (rev 29610)
@@ -121,7 +121,7 @@
*/
public function renderColumnModelField($field)
{
- if($field->isComponent() || $field->isPartial() || $field->isHidden())
return false;
+ if($field->isComponent() || $field->isPartial() || $field->isInvisible()
|| $field->isHidden()) return false;
if($field->isPlugin())
{
Modified:
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfiguration.class.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfiguration.class.php
2010-05-24 18:22:49 UTC (rev 29609)
+++
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfiguration.class.php
2010-05-24 19:43:12 UTC (rev 29610)
@@ -263,7 +263,7 @@
isset($config['default'][$key]) ? $config['default'][$key] :
array(),
isset($config['form'][$key]) ? $config['form'][$key] : array(),
isset($config[$context][$key]) ? $config[$context][$key] :
array(),
- array('is_real' => false)
+ array('is_real' => false, 'flag' => '+')
));
}
@@ -274,7 +274,7 @@
isset($config['default'][$csrfToken]) ?
$config['default'][$csrfToken] : array(),
isset($config['form'][$csrfToken]) ? $config['form'][$csrfToken] :
array(),
isset($config[$context][$csrfToken]) ? $config[$context][$csrfToken]
: array(),
- array('is_real' => false)
+ array('is_real' => false, 'flag' => '+')
));
}
Modified:
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfigurationField.class.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfigurationField.class.php
2010-05-24 18:22:49 UTC (rev 29609)
+++
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsModelGeneratorConfigurationField.class.php
2010-05-24 19:43:12 UTC (rev 29610)
@@ -130,8 +130,28 @@
return $escaped ? str_replace("'", "\\'", $value) : $value;
}
+
+ /**
+ * Sets or unsets the invisible flag.
+ *
+ * @param Boolean $boolean true if the field is invisible, false otherwise
+ */
+ public function setInvisible($boolean)
+ {
+ $this->config['is_invisible'] = $boolean;
+ }
/**
+ * Returns true if the column is invisible.
+ *
+ * @return boolean true if the column is invisible, false otherwise
+ */
+ public function isInvisible()
+ {
+ return isset($this->config['is_invisible']) ?
$this->config['is_invisible'] : false;
+ }
+
+ /**
* Sets or unsets the hidden flag.
*
* @param Boolean $boolean true if the field is hidden, false otherwise
@@ -220,6 +240,9 @@
switch($flag)
{
case '+':
+ $this->setInvisible(true);
+ break;
+ case '-':
$this->setHidden(true);
break;
case '^':
@@ -238,7 +261,8 @@
* * = for a link
* * _ for a partial
* * ~ for a component
- * * + for a hidden field
+ * * + for a invisible field
+ * * - for a hidden field
* * ^ for a plugin
*
* @return string The flag
@@ -249,10 +273,14 @@
{
return '^';
}
- elseif($this->isHidden())
+ elseif($this->isInvisible())
{
return '+';
}
+ elseif($this->isHidden())
+ {
+ return '-';
+ }
return parent::getFlag();
}
Added: plugins/ExtjsGeneratorPlugin/trunk/web/css/ExtjsGeneratorPlugin.css
===================================================================
--- plugins/ExtjsGeneratorPlugin/trunk/web/css/ExtjsGeneratorPlugin.css
(rev 0)
+++ plugins/ExtjsGeneratorPlugin/trunk/web/css/ExtjsGeneratorPlugin.css
2010-05-24 19:43:12 UTC (rev 29610)
@@ -0,0 +1,4 @@
+/* whitespace normal for grids using formatLongstring renderer */
+.x-grid3-cell-wrap .x-grid3-cell-inner {
+ white-space: normal;
+}
\ No newline at end of file
Property changes on:
plugins/ExtjsGeneratorPlugin/trunk/web/css/ExtjsGeneratorPlugin.css
___________________________________________________________________
Added: svn:mime-type
+ text/plain
--
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.