X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8ad03264f1a47afe5108b1252ec3ec139dc16d9a..ab093330473e6cee879256b9902ce90bd1832c35:/project/static/js/views/button_toolbar.js?ds=inline diff --git a/project/static/js/views/button_toolbar.js b/project/static/js/views/button_toolbar.js index 11cc1487..3e0a1488 100644 --- a/project/static/js/views/button_toolbar.js +++ b/project/static/js/views/button_toolbar.js @@ -39,14 +39,14 @@ var ButtonToolbarView = View.extend({ $(self.element).trigger('resize'); }); - $('.buttontoolbarview-button', this.element).bind('click.buttontoolbarview', function() { + $('.buttontoolbarview-button', this.element).bind('click.buttontoolbarview', function(event) { var groupIndex = parseInt($(this).attr('ui:groupindex'), 10); var buttonIndex = parseInt($(this).attr('ui:buttonindex'), 10); var button = self.get('buttons')[groupIndex].buttons[buttonIndex]; var scriptletId = button.scriptlet_id; var params = eval('(' + button.params + ')'); // To nie powinno być potrzebne console.log('Executing', scriptletId, 'with params', params); - scriptletCenter[scriptletId](self.parent, params); + scriptletCenter.scriptlets[scriptletId](self.parent, params); }); $(this.element).trigger('resize');