Created
June 6, 2013 21:52
-
-
Save enovision/5725307 to your computer and use it in GitHub Desktop.
W2UI Framework - Toolbar handler. A button click is handled on the toolbar (target = id of the button, data = the event object)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('#grid').w2grid({ | |
name: 'grid', | |
recordsPerPage: 25, | |
fixedRecord: false, | |
url: '/wp-content/plugins/GarageSoftware/ajax/AjaxLoadOccasions.php', | |
show: { | |
header: true, | |
footer: true, | |
toolbar: true | |
}, | |
toolbar: { | |
items: [ | |
{type: 'check', id: 'history', caption: 'Historie', img: 'icon-page', checked: false} | |
], | |
onClick: function(target, data) { | |
if (target == 'history') { | |
var grid = this.owner; | |
grid.postData['history'] = !data.item.checked; | |
grid.load(grid.url); | |
} | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment