Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Here is base sample for image case
  2.  
  3. Fancy.defineController('imageControll', {
  4. controls: [{
  5. event: 'cellclick',
  6. selector: 'img.image-class',
  7. handler: 'onClickImage'
  8. }],
  9. onClickImage: function() {
  10. var me = this;
  11.  
  12. //Your action
  13. }
  14. });
  15.  
  16. var grid = new FancyGrid({
  17. ...
  18. controllers: ['imageControll'],
  19. ...
  20. });
  21.  
  22. For buttons, all is much simpler
  23. <style>
  24. .action-column-detalhes {
  25. ...
  26. }
  27.  
  28. .action-column-delete {
  29. ...
  30. }
  31. </style>
  32. columns: [{
  33. ...
  34. },{
  35. type: 'action',
  36. width: 65,
  37. items: [{
  38. text: 'DETALHES',
  39. cls: 'action-column-detalhes',
  40. handler: function(grid, o){
  41. //Action detalhes
  42. }
  43. },{
  44. text: 'Delete',
  45. cls: 'action-column-delete',
  46. handler: function(grid, o){
  47. //Action delete
  48. }
  49. }]
  50. }]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement