2 * Dialog for saving document to the server
7 class SaveDialog extends $.wiki.cls.GenericDialog {
10 this.ctx = $.wiki.exitContext();
13 /* fill out hidden fields */
14 this.$form = $('form', element);
16 $("input[name='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
20 $.wiki.enterContext(this.ctx);
28 message: "Zapisywanie... <br/><button id='save-hide'>ukryj</button>",
31 $.wiki.blocking = self.$elem;
35 CurrentDocument.save({
37 success: function(doc, changed, info){
42 onUnblock: function() {
44 $.wiki.enterContext(self.ctx);
48 failure: function(doc, info) {
49 console.log("Failure", info);
50 self.reportErrors(info);
55 console.log('Exception:', e)
62 $.wiki.cls.SaveDialog = SaveDialog;