2 * Dialog for reverting document on the server
7 class RevertDialog extends $.wiki.cls.GenericDialog {
8 constructor(element, options) {
10 this.ctx = $.wiki.exitContext();
13 /* fill out hidden fields */
14 this.$form = $('form', element);
16 $("input[name='textrevert-revision']", this.$form).val(options.revision);
20 $.wiki.enterContext(this.ctx);
28 message: "Przywracanie...",
31 $.wiki.blocking = self.$elem;
34 CurrentDocument.revertToVersion({
36 success: function(e, msg) {
41 onUnblock: function() {
43 $.wiki.enterContext(self.ctx);
47 'failure': function(e, info) {
48 console.log("Failure", info);
49 self.reportErrors(info);
55 console.log('Exception:', e)
62 $.wiki.cls.RevertDialog = RevertDialog;