+if (!window.console) {
+ window.console = {
+ log: function() {}
+ }
+}
+
// Teraz nieużywane
function highlight(colour) {
var range, sel;
var pn = $('.page-number', element);
pn.change(function(event) {
- console.log('change!', $(this).val());
event.preventDefault();
var n = normalizeNumber(pn.val());
pn.val(n);
zoom();
});
$('.change-gallery', element).click(function() {
- $('.chosen-gallery').val($('#document-meta .gallery').html() || '/gallery/');
+ $('.chosen-gallery').val($('#document-meta .gallery').html() || '/platforma/gallery/');
$('.gallery-image').animate({top: 53}, 200);
$('.chosen-gallery').focus();
});
galleryWidth: $(this).parent().width(),
galleryHeight: $(this).parent().height()
};
- console.log('load', imageDimensions)
+
+ if (!(imageDimensions.width && imageDimensions.height)) {
+ setTimeout(function() { $('img', element).load(); }, 100);
+ }
var position = normalizePosition(
image.position().left,
image.position().top,
imageDimensions.width,
imageDimensions.height
);
- console.log(image.position(), imageDimensions, position);
image.css({width: imageDimensions.width, height: imageDimensions.height,
left: position.x, top: position.y});
CodeMirror.fromTextArea('id_text', {
parserfile: 'parsexml.js',
- path: "/static/js/lib/codemirror/",
- stylesheet: "/static/css/xmlcolors.css",
+ path: STATIC_URL + "js/lib/codemirror/",
+ stylesheet: STATIC_URL + "css/xmlcolors.css",
parserConfig: {
useHTMLKludges: false
},