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