-
28 Jul 2011 4:39 AM #11
Worked on a new version that now works within an mvc style app without breaking existing workings.
Have updated my github with the new code.
Basically when the 1st render is called it attaches events to the gridview for each button and 1 all encompassing "actionbuttonclick" event
for actionbuttonclick you have the following
if the button definition passed through has an eventName property or a cls property set it will use these to create the events requiredCode:actionbuttonclick: function(button, gridview, rowindex, colindex)
eg 1) button has eventName, this eventname will be triggered
this will set up loadrecord event on the gridview.Code:{ text: 'Load', eventName:'loadrecord' }
similarly the cls property will be used to interpret to an event with all non alpha chars will be removed and suffixed with "click"Code:loadrecord: function(gridview, rowindex, colindex)
eg
wlll create the event btnloadrecordclick as followsCode:{ text: 'Load', cls:'btn-load-record' }
Finally, I added in the showIndex. This is exactly the same as hideIndex but in reverse, eg a truthy value to showIndex will show the button and a falsey value will cause it to hide.Code:btnloadrecordclick: function(gridview, rowindex, colindex)
GitHub Link: https://github.com/BinaryKitten/Ext....onButtonColumnLast edited by kreeve_ctisn; 1 Aug 2011 at 3:39 AM. Reason: GitHub updated with Additonal DocBlock comments and fix for event Creation when buttons had a handler.
-
25 Aug 2011 12:25 AM #12
great plugin but ...
great plugin but ...
HI
Thanks for this great plug in
Only one little problem I have. The height of the button is about 2 pixel higher than my grid cell and it push everything upward a little bit. And when the grid refresh the whole grid is jumping until everything settle.
Tried to overwrite the .x-btn-x-action-col-button css but seems to be no effect.
Any pointer how to change the size of the button is highly appreciated. Thanks.
-
10 Apr 2012 2:35 AM #13
Hi joelchu,
just had the same problem with the height of the buttons. But editing the css class worked for me.
I simply added into my custom.css file:
Now the buttons fit perfectly into my cells.Code:.x-action-col-button { padding:0px 0px 0px 0px; }
Many thanks to the authors of this nice contribution! :-)
-
11 Jun 2012 4:20 AM #14
Great extension, but, a question...
Great extension, but, a question...
How can I add the current scope of the application so that when I'm in the handler I can access any functions/variables I've established previously?
Thanks
MikeB


Reply With Quote