- 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
- });
- }
-
- });
+ var old_callback = options.callback || function() {};
+
+ options.callback = function() {
+ var self = this;
+
+ // first time page is rendered
+ $('#summary-cover-refresh').click(function() {
+ self.refreshCover();