2 * Dialog for saving document to the server
7 class SaveDialog 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='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
21 $.wiki.enterContext(this.ctx);
29 message: "Zapisywanie... <br/><button id='save-hide'>ukryj</button>",
32 $.wiki.blocking = self.$elem;
36 CurrentDocument.save({
38 success: function(doc, changed, info){
43 onUnblock: function() {
45 $.wiki.enterContext(self.ctx);
49 failure: function(doc, info) {
50 console.log("Failure", info);
51 self.reportErrors(info);
56 console.log('Exception:', e)
63 $.wiki.cls.SaveDialog = SaveDialog;