Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is base sample for image case
- Fancy.defineController('imageControll', {
- controls: [{
- event: 'cellclick',
- selector: 'img.image-class',
- handler: 'onClickImage'
- }],
- onClickImage: function() {
- var me = this;
- //Your action
- }
- });
- var grid = new FancyGrid({
- ...
- controllers: ['imageControll'],
- ...
- });
- For buttons, all is much simpler
- <style>
- .action-column-detalhes {
- ...
- }
- .action-column-delete {
- ...
- }
- </style>
- columns: [{
- ...
- },{
- type: 'action',
- width: 65,
- items: [{
- text: 'DETALHES',
- cls: 'action-column-detalhes',
- handler: function(grid, o){
- //Action detalhes
- }
- },{
- text: 'Delete',
- cls: 'action-column-delete',
- handler: function(grid, o){
- //Action delete
- }
- }]
- }]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement