fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change string normalization used by CodeMirror search.
[redakcja.git]
/
src
/
redakcja
/
static
/
js
/
wiki
/
wikiapi.js
diff --git
a/src/redakcja/static/js/wiki/wikiapi.js
b/src/redakcja/static/js/wiki/wikiapi.js
index
f4073ff
..
2f1bceb
100644
(file)
--- 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;
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),
$.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 = [];
var msg = "Nie udało się wczytać galerii o nazwie: '" + self.galleryLink + "'.";
}
self.galleryImages = [];
- params['failure'](self,
"<p>" + msg + "</p>"
);
+ params['failure'](self,
msg
);
}
});
};
}
});
};
@@
-436,6
+440,10
@@
return text.length;
}
return text.length;
}
+ /* Temporary workaround for relative images. */
+ WikiDocument.prototype.getBase = function() {
+ return '/media/dynamic/images/' + this.galleryLink + '/';
+ };
$.wikiapi.WikiDocument = WikiDocument;
})(jQuery);
$.wikiapi.WikiDocument = WikiDocument;
})(jQuery);