X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/efe36f4f1b5df351eeb4d40a54c3900cf9a7079b..75d2183aafd4b2d3e94c17f6c3c8ee0d8a4738e4:/src/editor/modules/documentToolbar/documentToolbar.js diff --git a/src/editor/modules/documentToolbar/documentToolbar.js b/src/editor/modules/documentToolbar/documentToolbar.js index 7fbf6c1..75fcc72 100644 --- a/src/editor/modules/documentToolbar/documentToolbar.js +++ b/src/editor/modules/documentToolbar/documentToolbar.js @@ -36,6 +36,12 @@ return function(sandbox) { params.meta = meta; } + if(command === 'undo' || command === 'redo') { + params.callback = function(disable) { + btn.attr('disabled', !disable); + } + } + sandbox.publish('command', command, params); }); },