refactor
[fnpeditor.git] / src / editor / modules / documentToolbar / documentToolbar.js
index 7fbf6c1..75fcc72 100644 (file)
@@ -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);
             });
         },