1. #11
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    134
    Vote Rating
    0
    mmarti is on a distinguished road

      0  

    Default


    Very nice!!! Good work, thank you!!!

  2. #12
    Sencha - Community Support Team grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    133
    Vote Rating
    14
    grgur will become famous soon enough grgur will become famous soon enough

      0  

    Default


    +1
    Grgur Grisogono
    Ext JS in Action SE co-author
    Exercising awesomeness at Modus Create - Official Sencha Partner

    Get in touch for Sencha Touch Training
    @ggrgur

  3. #13
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    263
    Vote Rating
    0
    wki01 is on a distinguished road

      0  

    Default


    a small bug:
    It should not be active if the field is disabled or readonly.
    You can fix it?
    thanks

  4. #14
    Sencha User
    Join Date
    Jul 2011
    Posts
    11
    Vote Rating
    0
    softwareguy is on a distinguished road

      0  

    Default


    Nice!

  5. #15
    Sencha User loiane's Avatar
    Join Date
    Aug 2009
    Posts
    171
    Vote Rating
    41
    loiane has a spectacular aura about loiane has a spectacular aura about loiane has a spectacular aura about

      0  

    Default


    Nice!
    Sencha/Java evangelist
    Author of ExtJS 4 First Look and Mastering Ext JS books
    English blog: http://loianegroner.com
    Portuguese blog: http://loiane.com
    Sencha Examples: https://github.com/loiane

  6. #16
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    2,190
    Vote Rating
    58
    slemmon is just really nice slemmon is just really nice slemmon is just really nice slemmon is just really nice

      0  

    Default


    Quote Originally Posted by wki01 View Post
    a small bug:
    It should not be active if the field is disabled or readonly.
    You can fix it?
    thanks
    Yeah, looks like in FF the disabled field is honored and not in IE 8 (didn't test others). And readOnly displays the X as well - at least in FF. Didn't test in IE.

    That said, VERY COOL plugin. I had modified a triggerfield to show/hide the X trigger when there is a value in the field and that worked, but lacked the sexy value this plugin adds. You have any sway with the devs for an inclusion of this feature in 4.2?

  7. #17
    Sencha User Radius-Service's Avatar
    Join Date
    Jul 2010
    Location
    Russia, Perm
    Posts
    47
    Vote Rating
    1
    Radius-Service is on a distinguished road

      0  

    Default


    Very good.

    Please add a custom event handler to "clean up".

  8. #18
    Sencha User austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    67
    Vote Rating
    0
    austin1030 is on a distinguished road

      0  

    Default


    Is there a way not to delete data when the field is set as "readOnly"?

  9. #19
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    8
    ldonofrio will become famous soon enough

      0  

    Default


    Thanks for this,

    I'm having problems with combos with multiSelect: true, setValue('') causes that the combo value to be [''] that is not true, combo value must be [] (0 items selected).

    I've to override click and ESC handlers and change se setValue stuff by reset().

    Here is the code
    PHP Code:
                                addEscListener: function() {
                                    if (!
    this.clearOnEscape) return;
                                    
    this.textField.inputEl.on('keydown', function(e) {
                                        if (
    e.getKey() == Ext.EventObject.ESC) {
                                            if (
    this.textField.isExpanded) return;
                                            
    Ext.Function.defer(this.textField.reset1this.textField);
                                            
    e.stopEvent();
                                        }
                                    }, 
    this);
                                },
                                
    handleMouseClickOnClearButton: function(eventhtmlElementobject) {
                                    if (!
    this.isLeftButton(event)) return;
                                    
    this.textField.reset();
                                    
    this.textField.focus();
                                } 
    Regards,

    Leonardo

  10. #20
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    38
    Vote Rating
    0
    PHaroZ is on a distinguished road

      0  

    Default


    nice plugin but i've same trouble with combobox.

    Because reset is not the same as clear value, I do this :
    Code:
    init : function(textField) {
        this.textField = textField;
        this.textField.addEvents('clear');
        if (!textField.rendered) {
            textField.on('afterrender', this.handleAfterRender, this);
        } else {
            // probably an existing input element transformed to extjs field
            this.handleAfterRender();
        }
    },
    addEscListener: function() {
        if (!this.clearOnEscape) return;
        this.textField.inputEl.on('keydown', function(e) {
        if (e.getKey() == Ext.EventObject.ESC) {
            if (this.textField.isExpanded) return;
            Ext.Function.defer(this.clearValue, 1, this);
            e.stopEvent();
        }
        }, this);
    },
    handleMouseClickOnClearButton: function(event, htmlElement, object) {
        if (!this.isLeftButton(event)) return;
        this.clearValue();
        this.textField.focus();
    },
    clearValue : function() {
        if (Ext.isFunction(this.textField.clearValue)) {
            this.textField.clearValue();
        } else {
            this.textField.setValue('');
        }
        this.textField.fireEvent('clear', this.textField);
    }

Similar Threads

  1. [NOREPRO] [OPEN-726] bad clear icon handling when Text field is in a toolbar
    By jep in forum Sencha Touch 1.x: Bugs
    Replies: 5
    Last Post: 29 Aug 2011, 9:43 AM
  2. Ext.form.Field override : Adding an icon to a form field of any type
    By arnold in forum Ext 2.x: User Extensions and Plugins
    Replies: 2
    Last Post: 25 Mar 2011, 6:41 AM
  3. Replies: 1
    Last Post: 5 Jul 2010, 4:13 AM
  4. Feature suggestion: Ext.form.Field.clear
    By dyndan in forum Community Discussion
    Replies: 2
    Last Post: 28 Feb 2008, 4:01 AM