X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/0990bc1dc7fad5165148a8993901138de9e22d0e..5ecc2f0247f9d648dc1795b9633a3c37cc86bb52:/src/editor/modules/documentHistory/documentHistory.js diff --git a/src/editor/modules/documentHistory/documentHistory.js b/src/editor/modules/documentHistory/documentHistory.js index b90fc59..7bbf32f 100644 --- a/src/editor/modules/documentHistory/documentHistory.js +++ b/src/editor/modules/documentHistory/documentHistory.js @@ -1,10 +1,9 @@ define([ 'libs/jquery', 'libs/underscore', -'./restoreDialog', 'libs/text!./templates/main.html', 'libs/text!./templates/item.html' -], function($, _, restoreDialog, mainTemplateSrc, itemTemplateSrc) { +], function($, _, mainTemplateSrc, itemTemplateSrc) { 'use strict'; @@ -23,12 +22,7 @@ return function(sandbox) { }); dom.find('.btn.restore').click(function() { - var dialog = restoreDialog.create(); - dialog.on('restore', function(event) { - sandbox.publish('restoreVersion', {version: historyItems.getSelected()[0], description: event.data.description}); - event.success(); - }); - dialog.show(); + sandbox.publish('restoreVersion', historyItems.getSelected()[0]); }); dom.find('.btn.display').click(function() {