1. #61
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Hi Dan,

    can I add a small Feature Request that I've just added here at a client's request?

    Right now, to terminate one item, and add the typed characters, the ENTER key is explicitly listened for in the onKeyDownHandler method.

    I'd like to request that this key be configurable:

    Code:
        /**
         * @cfg {Number} itemDelimiterKey The key code which terminates keying in of individual items, and adds the current
         * item to the list. Defaults to the ENTER key.
         */
        itemDelimiterKey: Ext.EventObject.ENTER,
    Then just the changes in red:

    Code:
        onKeyUp : function(e) {
            if (this.editable !== false && !e.isSpecialKey() && e.getKey() !== this.itemDelimiterKey && (!e.hasModifier() || e.shiftKey)) {
                this.lastKey = e.getKey();
                this.dqTask.delay(this.queryDelay);
            }        
        },
        onKeyDownHandler : function(e,t) {
            var toDestroy,nextFocus,idx;
            if ((e.getKey() === e.DELETE) && this.currentFocus){
                e.stopEvent();
                toDestroy = this.currentFocus;
                this.on('expand',function(){this.collapse();},this,{single: true});
                idx = this.items.indexOfKey(this.currentFocus.key);
                
                this.clearCurrentFocus();
                
                if(idx < (this.items.getCount() -1)){
                    nextFocus = this.items.itemAt(idx+1);
                }
                
                toDestroy.preDestroy(true);
                if(nextFocus){
                    (function(){
                        nextFocus.onLnkFocus();
                        this.currentFocus = nextFocus;
                    }).defer(200,this);
                }
            
                return true;
            }
    
            var val = this.el.dom.value, it, ctrl = e.ctrlKey;
            if(e.getKey() === this.itemDelimiterKey){
    My client wants me to configure it with

    Code:
        itemDelimiterKey: Ext.EventObject.SPACE,

  2. #62
    Sencha User
    Join Date
    Jul 2009
    Posts
    20
    Vote Rating
    1
    scishop is on a distinguished road

      0  

    Default


    I've placed the SuperBoxSelect in a a grid using a GridEditor. It works except that the entry field does not expand vertically.

    Is this a bug, or, more likely, I'm I missing something obvious?

  3. #63
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by scishop View Post
    I've placed the SuperBoxSelect in a a grid using a GridEditor. It works except that the entry field does not expand vertically.

    Is this a bug, or, more likely, I'm I missing something obvious?
    Sorry, I'm not supporting using it as a grid editor at this stage - it's been requested a couple of times though, so maybe a future release.

    Quote Originally Posted by Animal View Post
    Hi Dan,

    can I add a small Feature Request that I've just added here at a client's request?
    ...
    Absolutely - I'll add that in - thanks.

  4. #64
    Sencha User
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    149
    Vote Rating
    1
    radtad is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    Hi Dan,

    can I add a small Feature Request that I've just added here at a client's request?

    Code:
        itemDelimiterKey: Ext.EventObject.SPACE,
    To expand on this, I think this should be a collection of items. I.e. SPACE, ENTER, semicolon, comma, possibly even an onBlur, etc. That way I can configure it so the end user has multiple ways of having it add and item box.

  5. #65
    Sencha User
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    149
    Vote Rating
    1
    radtad is on a distinguished road

      0  

    Default


    Possible bug with allowing new data. If I start typing in an empty superbox field and tab out it does not remove the raw text or make it a box. However, if I have at least one box item in the superbox field and start typing and tab out it removes the raw text.

    This will automatically wipe the raw text each time no matter what getCount() returns.

    Code:
        applyEmptyText : function(){
            this.setRawValue('');
            if(this.items.getCount() > 0){
                this.el.removeClass(this.emptyClass);
                // this.setRawValue(''); the line should go at the top
                return this;
            }
            if(this.rendered && this.emptyText && this.getRawValue().length < 1){
                this.setRawValue(this.emptyText);
                this.el.addClass(this.emptyClass);
            }
            return this;
        },
    It would be awesome if it was an option to make an item box or wipe the raw text onBlur, but this fix works just fine as well.

  6. #66
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    219
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    There is a typo in the code:
    queryValuesInidicator instead of queryValuesIndicator

    Edit: and I've found a bug related to loading elements when loading the form aka valuesQuery:
    line 1392 here should be changed from
    Code:
    if(forceAll === true || (q.length >= this.minChars)){
    to
    Code:
    if(forceAll === true || (q.length >= this.minChars) || valuesQuery === true){
    so that the query is always executed when searching by primary key.

  7. #67
    Sencha User
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    149
    Vote Rating
    1
    radtad is on a distinguished road

      0  

    Default


    There is a big bug when allowing new data to be added. You can reproduce this on your states Example 4. If you type 'c' and let the menu expand it returns the following:

    California
    Colorado
    Connecticut

    This is just what you would expect. Now keep typing California by entering 'ali' etc. Then backspace to just 'c'. You don't get the 3 results you initially received when just typing 'c'. It only returns California still.

  8. #68
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Sorry for my lack of responses - I've just moved house to an island that's only accessible by boat. This has been a massive undertaking (especially with a 7 month old baby).

    I'll get round to answering questions and fixing bugs when I catch up with my paid jobs.

    Thanks,

    Dan

  9. #69
    Sencha User
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    149
    Vote Rating
    1
    radtad is on a distinguished road

      0  

    Default


    Quote Originally Posted by radtad View Post
    There is a big bug when allowing new data to be added. You can reproduce this on your states Example 4. If you type 'c' and let the menu expand it returns the following:

    California
    Colorado
    Connecticut

    This is just what you would expect. Now keep typing California by entering 'ali' etc. Then backspace to just 'c'. You don't get the 3 results you initially received when just typing 'c'. It only returns California still.
    This is the code not allowing the query to go through since BACKSPACE is a special key.

    Code:
        
        onKeyUp : function(e) {
              if (this.editable !== false && !e.isSpecialKey() && (!e.hasModifier() || e.shiftKey)) {
                this.lastKey = e.getKey();
                this.dqTask.delay(this.queryDelay);
            }
        },
    I doubt this is the proper fix, but it works...
    Code:
    if (this.editable !== false && (!e.isSpecialKey() || e.getKey() === e.BACKSPACE) && (!e.hasModifier() || e.shiftKey))
    ...and no biggie on not responding for a while Dan

  10. #70
    Ext JS Premium Member syscobra's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    140
    Vote Rating
    0
    syscobra is on a distinguished road

      0  

    Thumbs up New CSS Style

    New CSS Style


    Hello All

    First of all Thanks Dan for this very cool extension.

    I was using it in a job i was making and my boss wanted to use some normal style like the present in other Ext Widgets, So i modified the css and came out with something more close to the ext widgets style, so i am sharing it now with the community.

    Here is an screenshoot:

    Here is the dan Examples using this css:
    http://playground.ideashs.com/superboxselect/
    And here is the css with the image files required:
    http://playground.ideashs.com/superb...ctsmallcss.zip

    I hope someone find it useful.

    Cya around.
    Javier Rincón aka SysCobra

Thread Participants: 94

  1. Animal (3 Posts)
  2. jay@moduscreate.com (1 Post)
  3. Condor (1 Post)
  4. stever (1 Post)
  5. mystix (5 Posts)
  6. MD (1 Post)
  7. JorisA (1 Post)
  8. randomY (1 Post)
  9. DigitalSkyline (1 Post)
  10. sj137 (3 Posts)
  11. boggle (1 Post)
  12. danh2000 (71 Posts)
  13. ostghost (1 Post)
  14. lossendae (1 Post)
  15. ZooKeeper (1 Post)
  16. greco (1 Post)
  17. Fredric Berling (1 Post)
  18. GraemeBryce (2 Posts)
  19. Strati (2 Posts)
  20. syscobra (2 Posts)
  21. boonkerz (4 Posts)
  22. Sesshomurai (3 Posts)
  23. shamansoft (1 Post)
  24. dorgan (2 Posts)
  25. mjhaston (1 Post)
  26. radtad (5 Posts)
  27. Joyfulbob (2 Posts)
  28. crysfel (1 Post)
  29. armandoxxx (2 Posts)
  30. jarlau (1 Post)
  31. lacco (1 Post)
  32. abraxxa (38 Posts)
  33. prometheus (1 Post)
  34. pops (1 Post)
  35. raphac (1 Post)
  36. Scorpie (2 Posts)
  37. supercharge2 (4 Posts)
  38. jmiguel (2 Posts)
  39. ash11tw (2 Posts)
  40. wojan (1 Post)
  41. ryzmen (1 Post)
  42. nmohler (2 Posts)
  43. wki01 (2 Posts)
  44. gacowarlock (1 Post)
  45. kora.kanchan (1 Post)
  46. senacle (3 Posts)
  47. genie_vn (1 Post)
  48. sergey.s (1 Post)
  49. Grolubao (10 Posts)
  50. mathec (1 Post)
  51. jackjia (1 Post)
  52. polydyne (1 Post)
  53. Antjac (1 Post)
  54. Thomas Triplet (1 Post)
  55. Gonfi (1 Post)
  56. kleins (1 Post)
  57. talha06 (1 Post)
  58. scishop (1 Post)
  59. eztam (2 Posts)
  60. frederickd (10 Posts)
  61. dusoo (2 Posts)
  62. iv_ekker (3 Posts)
  63. pym (1 Post)
  64. sudhirhv (3 Posts)
  65. lanhun (14 Posts)
  66. wcasado (1 Post)
  67. ramana_l_v (3 Posts)
  68. cq.yangyu@gmail.com (1 Post)
  69. siberian (1 Post)
  70. Tommi (4 Posts)
  71. rdblyth (2 Posts)
  72. devtig (3 Posts)
  73. markmansour (1 Post)
  74. dhiren.lodhia (1 Post)
  75. slamhan (1 Post)
  76. panter4 (1 Post)
  77. Korbin (2 Posts)
  78. istetska (1 Post)
  79. ian.young (1 Post)
  80. sebterzi (1 Post)
  81. ucoxk (1 Post)
  82. prakashr (1 Post)
  83. danilo.pederiva (1 Post)
  84. --miCZar-- (2 Posts)
  85. zozofoz (1 Post)
  86. spydercavern (1 Post)
  87. tvelykyy (1 Post)
  88. leorossi (3 Posts)
  89. revertTS (1 Post)
  90. joxzaren (1 Post)
  91. leduc (1 Post)
  92. deepthi_r (1 Post)
  93. qiankun (1 Post)
  94. Mr.Solomon (2 Posts)