X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8132fc186eb0c5fd02c86828c3a4735754296d02..5913c54d19b8f6775633176032161d49f9b2f1aa:/redakcja/static/js/wiki/dialog_save.js
diff --git a/redakcja/static/js/wiki/dialog_save.js b/redakcja/static/js/wiki/dialog_save.js
deleted file mode 100644
index 903c0e1c..00000000
--- a/redakcja/static/js/wiki/dialog_save.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Dialog for saving document to the server
- *
- */
-(function($) {
-
- function SaveDialog(element) {
- this.ctx = $.wiki.exitContext();
- this.clearForm();
-
- /* fill out hidden fields */
- this.$form = $('form', element);
-
- $("input[name='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
-
- $.wiki.cls.GenericDialog.call(this, element);
- };
-
- SaveDialog.prototype = new $.wiki.cls.GenericDialog();
-
- SaveDialog.prototype.cancelAction = function() {
- $.wiki.enterContext(this.ctx);
- this.hide();
- };
-
- SaveDialog.prototype.saveAction = function() {
- var self = this;
-
- self.$elem.block({
- message: "Zapisywanie...
",
- fadeIn: 0,
- });
- $.wiki.blocking = self.$elem;
-
- try {
-
- CurrentDocument.save({
- form: self.$form,
- success: function(doc, changed, info){
- self.$elem.block({
- message: info,
- timeout: 2000,
- fadeOut: 0,
- onUnblock: function() {
- self.hide();
- $.wiki.enterContext(self.ctx);
- }
- });
- },
- failure: function(doc, info) {
- console.log("Failure", info);
- self.reportErrors(info);
- self.$elem.unblock();
- }
- });
- } catch(e) {
- console.log('Exception:', e)
- self.$elem.unblock();
- }
- }; /* end of save dialog */
-
- /* make it global */
- $.wiki.cls.SaveDialog = SaveDialog;
-})(jQuery);