2 * Dialog for reverting document on the server
7 function RevertDialog(element, options) {
8 this.ctx = $.wiki.exitContext();
11 /* fill out hidden fields */
12 this.$form = $('form', element);
14 $("input[name='textrevert-revision']", this.$form).val(options.revision);
16 $.wiki.cls.GenericDialog.call(this, element);
19 RevertDialog.prototype = new $.wiki.cls.GenericDialog();
21 RevertDialog.prototype.cancelAction = function() {
22 $.wiki.enterContext(this.ctx);
26 RevertDialog.prototype.revertAction = function() {
30 message: "Przywracanie...",
33 $.wiki.blocking = self.$elem;
37 CurrentDocument.revertToVersion({
39 success: function(e, msg) {
44 onUnblock: function() {
46 $.wiki.enterContext(self.ctx);
50 'failure': function(e, info) {
51 console.log("Failure", info);
52 self.reportErrors(info);
58 console.log('Exception:', e)
61 }; /* end of revert dialog */
64 $.wiki.cls.RevertDialog = RevertDialog;