Rename catalogue to documents.
[redakcja.git] / src / redakcja / static / js / wiki / wikiapi.js
index f4073ff..28450ce 100644 (file)
        WikiDocument.prototype.refreshGallery = function(params) {
                params = $.extend({}, noops, params);
                var self = this;
+               if (!self.galleryLink) {
+                       params['failure'](self, 'Brak galerii.');
+                       return;
+               }
                $.ajax({
                        method: "GET",
                        url: reverse("ajax_document_gallery", self.galleryLink),
                         var msg = "Nie udało się wczytać galerii o nazwie: '" + self.galleryLink + "'.";
                 }
                                self.galleryImages = [];
-                               params['failure'](self, "<p>" + msg + "</p>");
+                               params['failure'](self, msg);
                        }
                });
        };