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

      0  

    Default


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

  2. #12
    grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    155
    Vote Rating
    24
    grgur has a spectacular aura about grgur has a spectacular aura about

      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
    289
    Vote Rating
    3
    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
    183
    Vote Rating
    52
    loiane is a jewel in the rough loiane is a jewel in the rough loiane is a jewel in the rough

      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
    5,021
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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 Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    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
    9
    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);
    }