X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/e8c45077de2d4ada496850fd77fa5035f07f8a4d..e573418502325e80c42523264424fa547a435de5:/modules/documentHistory/documentHistory.js?ds=inline diff --git a/modules/documentHistory/documentHistory.js b/modules/documentHistory/documentHistory.js index 9a01f16..d435617 100644 --- a/modules/documentHistory/documentHistory.js +++ b/modules/documentHistory/documentHistory.js @@ -30,6 +30,10 @@ return function(sandbox) { }); dialog.show(); }); + + dom.find('.btn.display').click(function(e) { + sandbox.publish('displayVersion', {version: historyItems.getSelected()[0]}); + }); var addHistoryItem = function(item, options) { historyItems.add(item); @@ -80,18 +84,18 @@ return function(sandbox) { var len = this._selected.length; if(len === 0) { toggleButton('compare', false); - toggleButton('show2', false); + toggleButton('display', false); toggleButton('restore', false); } if(len === 1) { toggleButton('compare', false); - toggleButton('show2', true); + toggleButton('display', true); toggleButton('restore', true); } if(len === 2) { toggleItemViews(false); toggleButton('compare', true); - toggleButton('show2', false); + toggleButton('display', false); toggleButton('restore', false); } else { toggleItemViews(true);