2 * Dialog for saving document to the server
7 function SaveDialog(element) {
8 this.ctx = $.wiki.exitContext();
11 /* fill out hidden fields */
12 this.$form = $('form', element);
14 $("input[name='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
16 $.wiki.cls.GenericDialog.call(this, element);
19 SaveDialog.prototype = new $.wiki.cls.GenericDialog();
21 SaveDialog.prototype.cancelAction = function() {
22 $.wiki.enterContext(this.ctx);
26 SaveDialog.prototype.saveAction = function() {
30 message: "Zapisywanie... <br/><button id='save-hide'>ukryj</button>",
33 $.wiki.blocking = self.$elem;
37 CurrentDocument.save({
39 success: function(doc, changed, info){
44 onUnblock: function() {
46 $.wiki.enterContext(self.ctx);
50 failure: function(doc, info) {
51 console.log("Failure", info);
52 self.reportErrors(info);
57 console.log('Exception:', e)
60 }; /* end of save dialog */
63 $.wiki.cls.SaveDialog = SaveDialog;