Author: KRavEN
Date: 2010-05-13 21:09:33 +0200 (Thu, 13 May 2010)
New Revision: 29443
Added:
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.form.TextField.override.js
Modified:
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ux.form.TwinDateField.js
Log:
fixed reset on session loaded filter textfields. added enter key listener for
filter textfields to submit on enter.
Modified:
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
2010-05-13 18:47:50 UTC (rev 29442)
+++
plugins/ExtjsGeneratorPlugin/trunk/config/ExtjsGeneratorPluginConfiguration.class.php
2010-05-13 19:09:33 UTC (rev 29443)
@@ -54,11 +54,11 @@
'/ExtjsGeneratorPlugin/js/ExtjsGeneratorConstants.js', // Generator
javascript constants
'/ExtjsGeneratorPlugin/js/Ext.ux.TabCloseMenu.js', // simple context
menu for closing tabs or multiple tabs
'/ExtjsGeneratorPlugin/js/Ext.ux.grid.RowActions.js',
+ '/ExtjsGeneratorPlugin/js/Ext.form.TextField.override.js', //adds reset
event
'/ExtjsGeneratorPlugin/js/Ext.grid.GridPanel.override.js',
'/ExtjsGeneratorPlugin/js/Ext.ux.MessageBox.js', // adds autohiding
info and error message types
'/ExtjsGeneratorPlugin/js/Ext.ux.form.MultiSelect.js',
'/ExtjsGeneratorPlugin/js/Ext.ux.form.ItemSelector.js',
- '/ExtjsGeneratorPlugin/js/Ext.ux.form.DoubleList.js',
'/ExtjsGeneratorPlugin/js/Ext.ux.form.TwinDateField.js',
'/ExtjsGeneratorPlugin/js/Ext.ux.form.TwinComboBox.js',
'/ExtjsGeneratorPlugin/js/Ext.ux.grid.CheckColumn.js',
Modified:
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
===================================================================
---
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
2010-05-13 18:47:50 UTC (rev 29442)
+++
plugins/ExtjsGeneratorPlugin/trunk/lib/widget/ExtjsWidgetFormFilterInput.class.php
2010-05-13 19:09:33 UTC (rev 29443)
@@ -53,6 +53,14 @@
'%input%' => $this->renderExtjsContentBlock('filter', 'TextField',
array_merge(array(
'name' => $name.'[text]',
'value' => $values['text'],
+ 'listeners' => array(
+ 'reset' => array(
+ 'fn' => 'function(){this.originalValue = null;this.setValue(null)}'
+ ),
+ 'specialkey' => array(
+ 'fn' => 'function(f,e){if(f.getValue() != \'\' && e.getKey()
==13)this.ownerCt.buttons[0].handler.call(this.ownerCt);}'
+ )
+ )
), $attributes)),
'%empty_checkbox%' => $this->getOption('with_empty') ?
$this->renderExtjsFilterIsEmptyCheckbox($name, $values) : ''
));
Added: plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.form.TextField.override.js
===================================================================
--- plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.form.TextField.override.js
(rev 0)
+++ plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.form.TextField.override.js
2010-05-13 19:09:33 UTC (rev 29443)
@@ -0,0 +1,62 @@
+Ext.override(Ext.form.TextField, {
+ initComponent : function() {
+ Ext.form.TextField.superclass.initComponent.call(this);
+ this.addEvents(
+ /**
+ * @event autosize Fires when the <tt><b>{...@link #autoSize}</b></tt>
+ * function is triggered. The field may or may not have actually
+ * changed size according to the default logic, but this event
+ * provides a hook for the developer to apply additional logic at
+ * runtime to resize the field if needed.
+ * @param {Ext.form.Field}
+ * this This text field
+ * @param {Number}
+ * width The new field width
+ */
+ 'autosize',
+ /**
+ * @event keydown Keydown input field event. This event only fires if
+ * <tt><b>{...@link #enableKeyEvents}</b></tt> is set to true.
+ * @param {Ext.form.TextField}
+ * this This text field
+ * @param {Ext.EventObject}
+ * e
+ */
+ 'keydown',
+ /**
+ * @event keyup Keyup input field event. This event only fires if
+ * <tt><b>{...@link #enableKeyEvents}</b></tt> is set to true.
+ * @param {Ext.form.TextField}
+ * this This text field
+ * @param {Ext.EventObject}
+ * e
+ */
+ 'keyup',
+ /**
+ * @event keypress Keypress input field event. This event only fires if
+ * <tt><b>{...@link #enableKeyEvents}</b></tt> is set to true.
+ * @param {Ext.form.TextField}
+ * this This text field
+ * @param {Ext.EventObject}
+ * e
+ */
+ 'keypress',
+ /**
+ * @event reset Input field reset event.
+ */
+ 'reset'
+ );
+ },
+
+ /**
+ * Resets the current field value to the originally-loaded value and clears
+ * any validation messages. Also adds <tt><b>{...@link #emptyText}</b></tt>
+ * and <tt><b>{...@link #emptyClass}</b></tt> if the original value was
+ * blank.
+ */
+ reset : function() {
+ Ext.form.TextField.superclass.reset.call(this);
+ this.fireEvent('reset');
+ this.applyEmptyText();
+ }
+});
\ No newline at end of file
Property changes on:
plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.form.TextField.override.js
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ux.form.TwinDateField.js
===================================================================
--- plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ux.form.TwinDateField.js
2010-05-13 18:47:50 UTC (rev 29442)
+++ plugins/ExtjsGeneratorPlugin/trunk/web/js/Ext.ux.form.TwinDateField.js
2010-05-13 19:09:33 UTC (rev 29443)
@@ -54,6 +54,7 @@
hideTrigger1 : true,
reset : Ext.form.Field.prototype.reset.createSequence(function() {
+ this.originalValue = null;
this.setValue(null);
this.triggers[0].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.