X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/fce465da41831c71697665a594b3f9287856baaa..e977f7187b10b1bc0a30794cd585c6b840568996:/src/redakcja/static/js/wiki/wikiapi.js?ds=inline diff --git a/src/redakcja/static/js/wiki/wikiapi.js b/src/redakcja/static/js/wiki/wikiapi.js index f4073ff9..28450ce0 100644 --- a/src/redakcja/static/js/wiki/wikiapi.js +++ b/src/redakcja/static/js/wiki/wikiapi.js @@ -198,6 +198,10 @@ 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), @@ -218,7 +222,7 @@ var msg = "Nie udaÅo siÄ wczytaÄ galerii o nazwie: '" + self.galleryLink + "'."; } self.galleryImages = []; - params['failure'](self, "
" + msg + "
"); + params['failure'](self, msg); } }); };