Author: KRavEN
Date: 2010-05-19 23:10:40 +0200 (Wed, 19 May 2010)
New Revision: 29539

Added:
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputNumberField.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputText.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputTextArea.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputNumberField.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputTextArea.class.php
Modified:
   plugins/ExtjsGeneratorPlugin/trunk/TODO.txt
   
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
   
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_formpanel.js.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormFilterGenerator.class.php
   plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormGenerator.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
   plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInput.class.php
   
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
Log:
changed xtype loader to use anti-cache prevention.  improved default formpanel 
display.  added form and filter TextArea and NumberField widgets.

Modified: plugins/ExtjsGeneratorPlugin/trunk/TODO.txt
===================================================================
--- plugins/ExtjsGeneratorPlugin/trunk/TODO.txt 2010-05-19 20:54:41 UTC (rev 
29538)
+++ plugins/ExtjsGeneratorPlugin/trunk/TODO.txt 2010-05-19 21:10:40 UTC (rev 
29539)
@@ -1,5 +1,4 @@
 ### forms
-add a numberfield widget
 add a hiddenfield widget
 
 show combobox for related fields (field is not always added)

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
        2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/parts/formpanelConfiguration.php
        2010-05-19 21:10:40 UTC (rev 29539)
@@ -9,7 +9,7 @@
       'bodyStyle'           => 'padding: 10px 0px 10px 5px;',
       'trackResetOnLoad'    => true,
       'method'              => 'POST',
-      'defaults'            => array('anchor' => '40%'),
+      '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']) ?>    

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_formpanel.js.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_formpanel.js.php
    2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/data/generator/ExtjsModule/admin/template/templates/_formpanel.js.php
    2010-05-19 21:10:40 UTC (rev 29539)
@@ -96,11 +96,17 @@
   else
   {     
     $formpanel->config_array['items'][] = 
$sfExtjs3Plugin->FieldSet(array_merge(array(
-      'title'       => __($fieldset, array(), '<?php echo 
$this->getI18nCatalogue() ?>'),
+      'title' => __($fieldset, array(), '<?php echo $this->getI18nCatalogue() 
?>'),
       'collapsible' => false,
-      'autoHeight'  => true,
-      'style'   => 'padding:10px;',
-      'bodyStyle'   => 'padding:0px 0px;',
+      'autoHeight' => true,
+      'style' => 'padding:10px;',
+      'bodyStyle' => 'padding:0px 0px;',
+      'style' => 'margin-left:5px;margin-right:10px',
+      'autoWidth' => true,
+      'defaults' => array(
+        'anchor' => '51%'
+      ),
+      'labelWidth' => $formpanel->config_array['labelWidth'] - 16, 
       'items' => $fieldItems,
     ), $configuration->getFormFieldsetParams('params_'.$fieldset)));
   }

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormFilterGenerator.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormFilterGenerator.class.php
 2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormFilterGenerator.class.php
 2010-05-19 21:10:40 UTC (rev 29539)
@@ -111,13 +111,28 @@
       case PropelColumnTypes::BOOLEAN:
         $name = 'Choice';
         break;
+      case PropelColumnTypes::CLOB:
+      case PropelColumnTypes::LONGVARCHAR:
+        $name = 'FilterInputTextArea';
+        break;
       case PropelColumnTypes::DATE:
       case PropelColumnTypes::TIME:
       case PropelColumnTypes::TIMESTAMP:
         $name = 'FilterDate';
         break;
+      case PropelColumnTypes::NUMERIC:
+      case PropelColumnTypes::DECIMAL:
+      case PropelColumnTypes::TINYINT:
+      case PropelColumnTypes::SMALLINT:
+      case PropelColumnTypes::INTEGER:
+      case PropelColumnTypes::BIGINT:
+      case PropelColumnTypes::REAL: 
+      case PropelColumnTypes::FLOAT: 
+      case PropelColumnTypes::DOUBLE: 
+        $name = 'FilterInputNumberField';
+        break;
       default:
-        $name = 'FilterInput';
+        $name = 'FilterInputText';
     }
     
     if($column->isForeignKey())

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormGenerator.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormGenerator.class.php   
    2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/generator/ExtjsFormGenerator.class.php   
    2010-05-19 21:10:40 UTC (rev 29539)
@@ -113,7 +113,7 @@
         break;
       case PropelColumnTypes::CLOB:
       case PropelColumnTypes::LONGVARCHAR:
-        $name = 'InputTextarea';
+        $name = 'InputTextArea';
         break;
       case PropelColumnTypes::DATE:
         $name = 'Date';
@@ -124,6 +124,17 @@
       case PropelColumnTypes::TIMESTAMP:
         $name = 'DateTime';
         break;
+      case PropelColumnTypes::NUMERIC:
+      case PropelColumnTypes::DECIMAL:
+      case PropelColumnTypes::TINYINT:
+      case PropelColumnTypes::SMALLINT:
+      case PropelColumnTypes::INTEGER:
+      case PropelColumnTypes::BIGINT:
+      case PropelColumnTypes::REAL: 
+      case PropelColumnTypes::FLOAT: 
+      case PropelColumnTypes::DOUBLE: 
+       $name = 'InputNumberField';
+        break;
       default:
         $name = 'InputText';
     }

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
  2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
  2010-05-19 21:10:40 UTC (rev 29539)
@@ -27,6 +27,7 @@
    */
   protected function configure($options = array(), $attributes = array())
   {
+       $this->addRequiredOption('type');
     $this->addOption('with_empty', true);
     $this->addOption('empty_label', 'is empty');
     $this->addOption('template', '%input%  %empty_checkbox%');
@@ -50,7 +51,7 @@
     ), is_array($value) ? $value : array());
     
     return strtr($this->getOption('template'), array(
-      '%input%' => $this->renderExtjsContentBlock('filter', 'TextField', 
array_merge(array(
+      '%input%' => $this->renderExtjsContentBlock('filter', 
$this->getOption('type'), array_merge(array(
         'name' => $name.'[text]', 
         'value' => $values['text'],
         'listeners' => array(

Added: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputNumberField.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputNumberField.class.php
                               (rev 0)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputNumberField.class.php
       2010-05-19 21:10:40 UTC (rev 29539)
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfWidgetFormInput represents an HTML text input tag.
+ *
+ * @package    symfony
+ * @subpackage widget
+ * @author     Fabien Potencier <[email protected]>
+ * @version    SVN: $Id: sfWidgetFormInputText.class.php 20941 2009-08-08 
14:11:51Z Kris.Wallsmith $
+ */
+class ExtjsWidgetFormFilterInputNumberField extends ExtjsWidgetFormFilterInput
+{
+  /**
+   * @param array $options     An array of options
+   * @param array $attributes  An array of default HTML attributes
+   *
+   * @see sfWidgetForm
+   */
+  protected function configure($options = array(), $attributes = array())
+  {
+    parent::configure($options, $attributes);
+
+    $this->setOption('type', 'NumberField');
+  }
+}

Added: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputText.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputText.class.php
                              (rev 0)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputText.class.php
      2010-05-19 21:10:40 UTC (rev 29539)
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfWidgetFormInput represents an HTML text input tag.
+ *
+ * @package    symfony
+ * @subpackage widget
+ * @author     Fabien Potencier <[email protected]>
+ * @version    SVN: $Id: sfWidgetFormInputText.class.php 20941 2009-08-08 
14:11:51Z Kris.Wallsmith $
+ */
+class ExtjsWidgetFormFilterInputText extends ExtjsWidgetFormFilterInput
+{
+  /**
+   * @param array $options     An array of options
+   * @param array $attributes  An array of default HTML attributes
+   *
+   * @see sfWidgetForm
+   */
+  protected function configure($options = array(), $attributes = array())
+  {
+    parent::configure($options, $attributes);
+
+    $this->setOption('type', 'TextField');
+  }
+}

Added: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputTextArea.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputTextArea.class.php
                          (rev 0)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInputTextArea.class.php
  2010-05-19 21:10:40 UTC (rev 29539)
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfWidgetFormInput represents an HTML text input tag.
+ *
+ * @package    symfony
+ * @subpackage widget
+ * @author     Fabien Potencier <[email protected]>
+ * @version    SVN: $Id: sfWidgetFormInputText.class.php 20941 2009-08-08 
14:11:51Z Kris.Wallsmith $
+ */
+class ExtjsWidgetFormFilterInputTextArea extends ExtjsWidgetFormFilterInput
+{
+  /**
+   * @param array $options     An array of options
+   * @param array $attributes  An array of default HTML attributes
+   *
+   * @see sfWidgetForm
+   */
+  protected function configure($options = array(), $attributes = array())
+  {
+    parent::configure($options, $attributes);
+
+    $this->setOption('type', 'TextArea');
+  }
+}

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInput.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInput.class.php    
    2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInput.class.php    
    2010-05-19 21:10:40 UTC (rev 29539)
@@ -33,9 +33,6 @@
   protected function configure($options = array(), $attributes = array())
   {
     $this->addRequiredOption('type');
-
-    // to maintain BC with symfony 1.2
-    $this->setOption('type', 'TextField');
   }
 
   /**

Added: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputNumberField.class.php
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputNumberField.class.php
                             (rev 0)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputNumberField.class.php
     2010-05-19 21:10:40 UTC (rev 29539)
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfWidgetFormInput represents an HTML text input tag.
+ *
+ * @package    symfony
+ * @subpackage widget
+ * @author     Fabien Potencier <[email protected]>
+ * @version    SVN: $Id: sfWidgetFormInputText.class.php 20941 2009-08-08 
14:11:51Z Kris.Wallsmith $
+ */
+class ExtjsWidgetFormInputNumberField extends ExtjsWidgetFormInput
+{
+  /**
+   * @param array $options     An array of options
+   * @param array $attributes  An array of default HTML attributes
+   *
+   * @see sfWidgetForm
+   */
+  protected function configure($options = array(), $attributes = array())
+  {
+    parent::configure($options, $attributes);
+
+    $this->setOption('type', 'NumberField');
+  }
+}

Copied: 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputTextArea.class.php
 (from rev 29533, 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputTextarea.class.php)
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputTextArea.class.php
                                (rev 0)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormInputTextArea.class.php
        2010-05-19 21:10:40 UTC (rev 29539)
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfWidgetFormInput represents an HTML text input tag.
+ *
+ * @package    symfony
+ * @subpackage widget
+ * @author     Fabien Potencier <[email protected]>
+ * @version    SVN: $Id: sfWidgetFormInputText.class.php 20941 2009-08-08 
14:11:51Z Kris.Wallsmith $
+ */
+class ExtjsWidgetFormInputTextArea extends ExtjsWidgetFormInput
+{
+  /**
+   * @param array $options     An array of options
+   * @param array $attributes  An array of default HTML attributes
+   *
+   * @see sfWidgetForm
+   */
+  protected function configure($options = array(), $attributes = array())
+  {
+    parent::configure($options, $attributes);
+
+    $this->setOption('type', 'TextArea');
+  }
+}

Modified: 
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
===================================================================
--- 
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
      2010-05-19 20:54:41 UTC (rev 29538)
+++ 
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ComponentMgr.create.createInterceptor.js
      2010-05-19 21:10:40 UTC (rev 29539)
@@ -4,8 +4,8 @@
     Ext.MessageBox.wait('Loading Panel', 'Please Wait...');
     Ext.app.CodeLoader.load({
       async : false,
-      method : 'GET',
-      cacheResponses : false
+//    disableCaching : false
+      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.

Reply via email to