X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c52436a7e25876ee3509df2467c2a9ef33303436..d64a8451dafc98e8f71455a55d123d22f3368ef9:/platforma/static/js/wiki/view_summary.js?ds=sidebyside diff --git a/platforma/static/js/wiki/view_summary.js b/platforma/static/js/wiki/view_summary.js index f86d9754..811096dd 100644 --- a/platforma/static/js/wiki/view_summary.js +++ b/platforma/static/js/wiki/view_summary.js @@ -2,7 +2,25 @@ function SummaryPerspective(options) { var old_callback = options.callback; + var self = this; + options.callback = function(){ + $('#publish_button').click(function() { + $.blockUI({message: "Oczekiwanie na odpowiedź serwera..."}); + self.doc.publish({ + success: function(doc, data) { + $.blockUI({message: "Udało się.", timeout: 2000}); + }, + failure: function(doc, message) { + $.blockUI({ + message: message, + timeout: 5000 + }); + } + + }); + }); + old_callback.call(this); };