Hi,
have some problems with toolbars.
1-st - Exist possibility to enable/disable toolbar buttons, like in the contextMenu? In contextMenu is option "disabled" - so I can control this. How to control buttons in toolbar for conditions from record ?
2-nd - I'm formatting toolbar from database table with php ... It return object of items. One problem, from php return as json object. So javascript function name in object for listener is as string, for example - listener: { click: "grid_gen" } . Then to click on this button, it runs here ( from 6773 line )
_onEvent: function(e, n, r) {
return function(i) {
var o = r.type;
"checkbox" == o ? r.value = t(i.target).prop("checked") : r.value = t(i.target).val(), n.call( e, i ), "file" == o && t(this).val("")
}
},
It fails in n.call() . I tried, to change it to "window[ n ].call( e, i )" . Then it run ... But if in function have confirmation or other dialogs it not run ...
How to run own function from string as I wanna ? How to override "listener" methods ?
Or maybe I something don't understanding, how to work with toolbars ...
. Sorry, but documnetation and samples not helped to me ...
Thanks ...