1. #101
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    @lanhun -- friendly tip: highlight your code changes in red so people know what you've changed.

  2. #102
    Ext User
    Join Date
    Nov 2009
    Location
    China.Shanghai
    Posts
    16
    Vote Rating
    0
    lanhun is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    @lanhun -- friendly tip: highlight your code changes in red so people know what you've changed.
    Thank you very much, I changed.

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

      0  

    Default


    A quick'n'dirty change to make it render with 3.1.0 is changing onResize to doResize:

    Code:
    doResize: function(w){
            var reduce = Ext.isIE6 ? 4 : Ext.isIE7 ? 1 : Ext.isIE8 ? 1 : 0;
            
            this._width = w;
            this.outerWrapEl.setWidth(w - reduce);
            if (this.renderFieldBtns) {
                reduce += (this.buttonWrap.getWidth() + 20);
                this.wrapEl.setWidth(w - reduce);
            }
            Ext.ux.form.SuperBoxSelect.superclass.doResize.call(this, w);
            this.autoSize();
        },
    I'm not the author of this ux so this won't be the final fix for 3.1.0 but should users like me, who need it working for testing of 3.1.0 compatibility of other components, a head start.

  4. #104
    Ext User
    Join Date
    Sep 2007
    Posts
    8
    Vote Rating
    0
    Strati is on a distinguished road

      0  

    Default


    There are some problem if you use numeric values, 'cause in some functions there are function called which only belong to the String object's prototype, like .trim() and .split().

    There are some modification recommendations:

    Code:
    setValue : function(value){
            if(!this.rendered){
                this.preRenderValue = value;
                return;
            }
            
            var values = Ext.isArray(value) ? value : value.toString().split(this.valueDelimiter);
    Code:
    findInStore : function(val){
            var index = this.store.find(this.valueField, val.toString().trim());
    this is a very great plugin

  5. #105
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    @strati: it's safer to do a
    Code:
    String(value)
    -- value might be null / undefined.


    [edit]
    on 2nd thought, this is faster:
    Code:
    (value + '')
    Last edited by mystix; 24 Dec 2009 at 8:38 AM. Reason: edit

  6. #106
    Ext User
    Join Date
    Sep 2007
    Posts
    8
    Vote Rating
    0
    Strati is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    @strati: it's safer to do a
    Code:
    String(value)
    -- value might be null / undefined.
    yeah, it's true

  7. #107
    Ext User
    Join Date
    Dec 2008
    Posts
    6
    Vote Rating
    0
    genie_vn is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    @strati: it's safer to do a
    Code:
    String(value)
    -- value might be null / undefined.
    I'm looking for this, thanks a lot

  8. #108
    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 Strati View Post
    There are some problem if you use numeric values, 'cause in some functions there are function called which only belong to the String object's prototype, like .trim() and .split().

    There are some modification recommendations:

    Code:
    setValue : function(value){
            if(!this.rendered){
                this.preRenderValue = value;
                return;
            }
            
            var values = Ext.isArray(value) ? value : value.toString().split(this.valueDelimiter);
    Code:
    findInStore : function(val){
            var index = this.store.find(this.valueField, val.toString().trim());
    this is a very great plugin
    Thanks, I had missed the setValue split, but the findInStore method was updated in the last release so you must have an old version.

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

      0  

    Default


    New version attached to the first post.

    UPDATE 26/10/2009

    Fixed queryValuesIndicator typo.
    Fix to ensure that blurring component behaves consistently (removing typed chars).
    Fix to onResize to ensure all elements have been renderred.
    Fix to unset preventMultipleRemoveEvents after all items have been removed.
    Fix to normalize string in setValue method.
    Fix to add a missing ;
    Fixes to reset and destroy processes.
    Implemented itemDelimiterKey config.
    Implemented beforeselect event.

    Let me know if you find any regressions.

    Thanks,

    Dan

  10. #110
    Ext User
    Join Date
    Nov 2009
    Location
    China.Shanghai
    Posts
    16
    Vote Rating
    0
    lanhun is on a distinguished road

      0  

    Default


    Quote Originally Posted by danh2000 View Post
    New version attached to the first post here. link is misstake.

    UPDATE 21/10/2009 date is misstake.

    Fixed queryValuesIndicator typo.
    Fix to ensure that blurring component behaves consistently (removing typed chars).
    Fix to onResize to ensure all elements have been renderred.
    Fix to unset preventMultipleRemoveEvents after all items have been removed.
    Fix to normalize string in setValue method.
    Fix to add a missing ;
    Fixes to reset and destroy processes.
    Implemented itemDelimiterKey config.
    Implemented beforeselect event.

    Let me know if you find any regressions.

    Thanks,

    Dan
    some misstake.

Thread Participants: 95

  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)
  95. agony (1 Post)