X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e77f342a73c940f16c37f57ffa50edce9caef8f0..e6e1017c531add5a7a5cbd4e24dc38fce4da0ea0:/redakcja/static/js/wiki/view_history.js?ds=inline

diff --git a/redakcja/static/js/wiki/view_history.js b/redakcja/static/js/wiki/view_history.js
index d35a8da0..94a369b6 100644
--- a/redakcja/static/js/wiki/view_history.js
+++ b/redakcja/static/js/wiki/view_history.js
@@ -16,7 +16,7 @@
 			});
 
 	        $('#doc-revert-button').click(function() {
-	            self.revertDocumentToVersion();
+	            self.revertDialog();
 	        });
 
 			$('#open-preview-button').click(function(event) {
@@ -172,7 +172,8 @@
         });
     };
 
-    HistoryPerspective.prototype.revertDocumentToVersion = function(){
+    HistoryPerspective.prototype.revertDialog = function(){
+        var self = this;
         var selected = $('#changes-list .entry.selected');
 
         if (selected.length != 1) {
@@ -181,7 +182,7 @@
         }
 
         var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
-        this.doc.revertToVersion({'revision': version});
+        $.wiki.showDialog('#revert_dialog', {revision: version});
     };
 
     $.wiki.HistoryPerspective = HistoryPerspective;