1. #11
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,506
    Vote Rating
    373
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    MAJOR UPDATE

    I have updated RowAction to RowActions (plural) that provides much more features. See http://rowactions.extjs.eu for details.

    Cheers,
    Saki
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  2. #12
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Default


    Saki,
    This is really nice. I like how you are showing multiple action buttons on the same row. I also like you are you consolidating the number of plugins loaded when there are multiple actions. This will minimize the number of times the click event will be handled.

    * I have a few quick questions though. I see that you are modifying the store in the demo. Is that required? This would cause a problem with me since I centrally load and share stores across my applications.

    * I also need to put an action button in the header template of a grouped Grid. This causes an issue since the current onClick handler on pursuit of a record can not go back to a row from the header template click that will expose the rowIndex. Perhaps, the best thing to get back to the record on a groupingView click (test if the row and col return null) is to do something like this:

    Code:
    ,onClick:function(e, target) {
                ...
                var groupingRow=e.getTarget('.x-grid-group');
                if (groupingRow){
                    
                    var recordNo=this.grid.store.data.findIndex('_groupId',groupingRow.id);
                    if (recordNo!=-1) { record=this.grid.store.getAt(recordNo)}
                }
    Also, you can back to the col in a safer way by using the following. It is more flexible that it doesn't require the ux css class to be loaded at the cell level.

    Code:
    var col = this.grid.getView().findCellIndex(e.target);
    One more thing is it possible to have a function that returns the necessary span html for a given action. This will more easily enable these actions items to be dispersed within different fields.


    Thanks again for developing such a nice add on.

    Best regards,
    Jerry Brown

  3. #13
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,506
    Vote Rating
    373
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Quote Originally Posted by jerrybrown5 View Post
    * I have a few quick questions though. I see that you are modifying the store in the demo. Is that required? This would cause a problem with me since I centrally load and share stores across my applications.
    No, store is not modified, it's used in read-only fashion by the extension.
    * I also need to put an action button in the header template of a grouped Grid. This causes an issue since the current onClick handler on pursuit of a record can not go back to a row from the header template click that will expose the rowIndex. Perhaps, the best thing to get back to the record on a groupingView click (test if the row and col return null) is to do something like this:
    I'm not sure if I'm getting this fully (a working example would be best) but clicks are handled by the listener installed on the grid's body so it shouldn't be difficult to identify click anywhere in the body. If that what you need is general enough (e.g. supporting grouping stores/grids) post an example I can work with and I'll take a look a it to see what can be done about it.
    [Also, you can back to the col in a safer way by using the following. It is more flexible that it doesn't require the ux css class to be loaded at the cell level.

    Code:
    var col = this.grid.getView().findCellIndex(e.target);
    You're right I've updated the code.
    One more thing is it possible to have a function that returns the necessary span html for a given action. This will more easily enable these actions items to be dispersed within different fields.
    I'm not sure if I want to open it in this direction. Now the plugin works fine cross browser and I think that current functionality is more than enough.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #14
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,506
    Vote Rating
    373
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Sorry, posted too fast. findCellIndex doesn't work.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #15
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Default


    It worked on the last version. I believe by default it goes up three levels to check for the grid cell class. You may want to increase it. [update three levels was the issue..I upped the limit on my version]

  6. #16
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Lightbulb


    Saki,
    In appreciation of your last update, I took it where you left off and have incorporated my two cents.

    Among list of changes:
    * Individual actions are separate objects
    * Events are setup at the individual action level.
    * Supports inline rendering. Although you can, you do not need dedicated column(s) anymore to actions. Just as a combox does, inline rendered actions will use a blank image to make sure it displays properly on all browsers.
    * Fully supports actions that are rendered on the grouped view's header. It gives you the first grouped row on the handler. Also, it cancels out the toggleGroup command which normally gets fired before the action buttons are processed.

    Best regards,
    Jerry Brown
    Attached Files

  7. #17
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,506
    Vote Rating
    373
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Hi Jeff,

    I've been playing (very briefly) with your changes and I'm still not getting what problem are you trying to solve. My opinions follow, sorry if they don't match yours:

    One of the main design principles I used when creating RowActions was simplicity. Grid is quite heavy component by itself and plugging anything heavy into it would do no good. Therefore, I wouldn't use separate classes/object for actions.

    Also, I miss the purpose of individual listeners for actions. The more events and more listeners the more complexity of code that leads to decreased performance and code maintainability in the long run.

    Therefore, I liked very much your idea of putting more actions to one column, what original RowAction didn't allow, because it decreased number of objects, number of listeners and simplified the whole thing a lot. Introducing new objects, new listeners, changing the original grid routines (GroupingView, findCell routine, etc.) just doesn't fit to my K.I.S.S. attitude.

    I do not get the concept of "inline button" that I see on your example. If it is really going to be button the question is why would I need button if I already have icon the (except of look) works like button. If it's going to be text then question is why would I need any changes if original RowActions support text besides icons (boundable to the store).

    What would be best is to combine your ideas with my KISS attitude. Post please some mockup image with a description of what do you want to achieve that I can understand and I'll implement it. What I understand so far is that you want some support for grouping store/grid, I still don't have a clear concept of what it should be.

    Let's use our different opinions and approaches for good of all.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #18
    Sencha User
    Join Date
    Mar 2007
    Posts
    754
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    Saki I am agreed with keep RowAction simple because the grid is quite heavy component, but RowAction could be add very useful functionality and save more time to developer, not only add an icon with this event to do some action, it is wonderful but for instance,

    I was wasting many time using a grid where I need when the user do dblclick on a row show a dialog to edit, and if the cell is for instance an email, or phone or an url show other dialog, the same done for RowAction, but don't working to me, so with RowAction now we can add an icon and get the action when the user click on it, why don't extend to do the same when we have other case (email, phone, url, ect) maybe RowAction with a renderer allow format the value in cell and get the action the user want. RowAction to me work ok using dbClick in the grid ect.

    In other thread you explain me that I can do that using somethink like it:

    Code:
     {header: "Email", dataIndex: "Email", width: 150, sortable: true, renderer: this.emailRender.createDelegate(this) },
    
    emailRender: function(val, cell, record) {
        return '<a href="' + record.get('href') + '">' + val + '</a>';
      },
    but it don't work well to me, I stopped the research that to do other code in my app but now I am watching the community want to enhancement RowAction and again I would like that you consider this request.

    regards
    Frank

  9. #19
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,506
    Vote Rating
    373
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    If I understand well Frank, you're calling for something like "CellAction" because RowActions was meant to invoke an action on row of the grid. Dialing a phone or starting a mail client when clicking on a cell containing the corresponding value would need only cell to operate, right?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  10. #20
    Sencha User
    Join Date
    Mar 2007
    Posts
    754
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    You are right Saki, I think CellAction will be right, it work like RowAction but on a cell or field in the grid, the point is in other thread I read about the tricks when is necessary to use dbclick, click or cellclick in a grid, it have interactions, so the basic idea of RowAction could be do some action (starting a mail client, Dialing a phone) when the user click on a cell it could be a field or an icon.

    regards
    Frank

Thread Participants: 226

  1. franklt69 (10 Posts)
  2. Condor (3 Posts)
  3. Enrico (1 Post)
  4. Dumbledore (2 Posts)
  5. mystix (1 Post)
  6. riets003 (2 Posts)
  7. KRavEN (3 Posts)
  8. sfwalter (1 Post)
  9. Taurus (3 Posts)
  10. fshort (5 Posts)
  11. tchitani (2 Posts)
  12. temporary (1 Post)
  13. pantarhei (2 Posts)
  14. Specks (5 Posts)
  15. spotk (1 Post)
  16. cmendez21 (2 Posts)
  17. anjelika (3 Posts)
  18. askar (3 Posts)
  19. 6epcepk (1 Post)
  20. lkasdorf (1 Post)
  21. Gunmen (1 Post)
  22. mjlecomte (7 Posts)
  23. Nam (2 Posts)
  24. rekam (4 Posts)
  25. ZooKeeper (3 Posts)
  26. cking (1 Post)
  27. JEBriggs (1 Post)
  28. Yossi (9 Posts)
  29. border9 (2 Posts)
  30. justinfalk (1 Post)
  31. Spirit (6 Posts)
  32. gounis (1 Post)
  33. .andy (1 Post)
  34. robin30 (2 Posts)
  35. knt (2 Posts)
  36. Shmoo (2 Posts)
  37. Strati (1 Post)
  38. jerrybrown5 (12 Posts)
  39. KevinChristensen (1 Post)
  40. jon (2 Posts)
  41. BigTitus (2 Posts)
  42. elDub (4 Posts)
  43. fgerneth (2 Posts)
  44. elnove (2 Posts)
  45. vendiddy (1 Post)
  46. ray007 (6 Posts)
  47. dizelland (1 Post)
  48. donssmith (1 Post)
  49. horrikhalid (5 Posts)
  50. wasp (1 Post)
  51. cblin (1 Post)
  52. ncx5 (3 Posts)
  53. mask_hot (1 Post)
  54. teddyjas (2 Posts)
  55. Zolcsi (1 Post)
  56. PTG (5 Posts)
  57. yaroslav (2 Posts)
  58. Yoris (3 Posts)
  59. DhakouaniM (1 Post)
  60. lobo-tuerto (12 Posts)
  61. angelflaree (3 Posts)
  62. skhan (3 Posts)
  63. ibaniski (3 Posts)
  64. achebe (1 Post)
  65. svdb (1 Post)
  66. emily (6 Posts)
  67. jezmck (3 Posts)
  68. SAnDAnGE (1 Post)
  69. eliezerreis (4 Posts)
  70. nutflakes (2 Posts)
  71. RoDush (1 Post)
  72. tonig84 (2 Posts)
  73. kpmonroe (1 Post)
  74. KJedi (1 Post)
  75. javaeedeveloper (2 Posts)
  76. razvanioan (3 Posts)
  77. jla (2 Posts)
  78. max52 (1 Post)
  79. seppy (5 Posts)
  80. adz08 (1 Post)
  81. chalu (10 Posts)
  82. sekaijin (2 Posts)
  83. jimkan (1 Post)
  84. joao_candido (3 Posts)
  85. fanta2k (1 Post)
  86. nctag (3 Posts)
  87. yhwh (2 Posts)
  88. zmijanow (3 Posts)
  89. brizardh (3 Posts)
  90. zxyth (6 Posts)
  91. johnstontrav (2 Posts)
  92. dalad (2 Posts)
  93. niaz (4 Posts)
  94. armandoxxx (8 Posts)
  95. nojutsu (3 Posts)
  96. lfelican (2 Posts)
  97. DamienValentine (2 Posts)
  98. NoahK17 (10 Posts)
  99. shay2501 (2 Posts)
  100. sdileep (1 Post)
  101. pokerking400 (19 Posts)
  102. lacco (2 Posts)
  103. medley (8 Posts)
  104. archmisha (3 Posts)
  105. rizjoj (2 Posts)
  106. thephatp (2 Posts)
  107. descheret (1 Post)
  108. macedge (6 Posts)
  109. ttbgwt (2 Posts)
  110. allistar (3 Posts)
  111. emredagli (1 Post)
  112. Nadril (2 Posts)
  113. mbajema (1 Post)
  114. wwwtd (1 Post)
  115. Besessener (6 Posts)
  116. Chrissu (3 Posts)
  117. pavanextjs (6 Posts)
  118. javauser (2 Posts)
  119. AmitOlsys (7 Posts)
  120. afei (1 Post)
  121. kurtis (6 Posts)
  122. DamianHartin (2 Posts)
  123. kimmking (1 Post)
  124. jollyca (2 Posts)
  125. Rothariger (10 Posts)
  126. ThunderZtorm (3 Posts)
  127. Stephan Schrade (1 Post)
  128. groyk (2 Posts)
  129. bwhitehall (2 Posts)
  130. neteor (2 Posts)
  131. saipkjai (1 Post)
  132. randomuser01 (1 Post)
  133. kisjonnk (1 Post)
  134. divad (2 Posts)
  135. fxmisticat (2 Posts)
  136. dasnk (1 Post)
  137. klascano (1 Post)
  138. sarav (1 Post)
  139. ringfas (1 Post)
  140. iBeb (1 Post)
  141. kjleng (1 Post)
  142. resonante (4 Posts)
  143. wki01 (1 Post)
  144. quen567 (2 Posts)
  145. nightwatch (2 Posts)
  146. SunWuKung (2 Posts)
  147. nar (1 Post)
  148. mnc (1 Post)
  149. wgpubs (3 Posts)
  150. Stju (1 Post)
  151. d4rk knight (2 Posts)
  152. igor_vlad (1 Post)
  153. lassaad (1 Post)
  154. Dumas (5 Posts)
  155. s.m.srinivas (2 Posts)
  156. whodat (7 Posts)
  157. Kudzu (1 Post)
  158. nathanblogs (1 Post)
  159. leonardodaza (2 Posts)
  160. The Edge (1 Post)
  161. tahseen.ur.rehman (1 Post)
  162. Andrelmp (2 Posts)
  163. dfa (1 Post)
  164. cybersys (5 Posts)
  165. flylaputa (3 Posts)
  166. Tawez (2 Posts)
  167. Fred Seyffert (2 Posts)
  168. Jangla (7 Posts)
  169. agent29 (1 Post)
  170. vinaykurudi (1 Post)
  171. Jim.Barrows (2 Posts)
  172. PV-Patrick (1 Post)
  173. jakeext (2 Posts)
  174. quicksilver_in (12 Posts)
  175. dewoob (2 Posts)
  176. gelgoogho (1 Post)
  177. andyatmiami (1 Post)
  178. rat (1 Post)
  179. Margusja (6 Posts)
  180. charcalcado (1 Post)
  181. realjax (2 Posts)
  182. kartikayg (4 Posts)
  183. sanantone (1 Post)
  184. iryndin (2 Posts)
  185. Joel (2 Posts)
  186. jsemmanuel (2 Posts)
  187. jeffcirceo (1 Post)
  188. boldt (1 Post)
  189. schoonmoeder (2 Posts)
  190. kr1pton (2 Posts)
  191. 29er (1 Post)
  192. return1.at (1 Post)
  193. extjsnewb (1 Post)
  194. frrogoy (1 Post)
  195. hotdesc (2 Posts)
  196. a.bongardt (1 Post)
  197. King_Aero (1 Post)
  198. daiei27 (3 Posts)
  199. jasmina (3 Posts)
  200. winsent (1 Post)
  201. hsomesun (2 Posts)
  202. max.bertolini (1 Post)
  203. Dmoney (1 Post)
  204. maxazan (1 Post)
  205. cyChop (2 Posts)
  206. pipiet06 (2 Posts)
  207. asafm (2 Posts)
  208. adetogni (4 Posts)
  209. rebeccapeltz (10 Posts)
  210. enoal (3 Posts)
  211. rrpero (3 Posts)
  212. test45 (1 Post)
  213. kevDawg (3 Posts)
  214. anacab (1 Post)
  215. travin (1 Post)
  216. bidibule (1 Post)
  217. JimR (5 Posts)
  218. apurva_mistry (1 Post)
  219. pramodkhare (3 Posts)
  220. dm7777 (1 Post)
  221. extjs-dev (2 Posts)
  222. aveltens (1 Post)
  223. carlosgoias (1 Post)
  224. oeginc (2 Posts)
  225. schusco (3 Posts)
  226. katxeus (1 Post)