2 * Dialog for reverting document on the server
7 class RevertDialog extends $.wiki.cls.GenericDialog {
8 constructor(element, options) {
9 let ctx = $.wiki.exitContext();
14 /* fill out hidden fields */
15 this.$form = $('form', element);
17 $("input[name='textrevert-revision']", this.$form).val(options.revision);
21 $.wiki.enterContext(this.ctx);
29 message: "Przywracanie...",
32 $.wiki.blocking = self.$elem;
35 CurrentDocument.revertToVersion({
37 success: function(e, msg) {
42 onUnblock: function() {
44 $.wiki.enterContext(self.ctx);
48 'failure': function(e, info) {
49 console.log("Failure", info);
50 self.reportErrors(info);
56 console.log('Exception:', e)
63 $.wiki.cls.RevertDialog = RevertDialog;