X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/57041b345ca24bde1c6e5b24bbc888db35bd8b99..05a64b9314fac5f613133332d7d0b5b568ab8afc:/src/redakcja/static/js/wiki/view_editor_wysiwyg.js diff --git a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js index 72e218aa..517c878e 100644 --- a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -421,7 +421,7 @@ var w = $box.outerWidth(); var h = $box.innerHeight(); - if ($origin.is(".annotation-inline-box") | $origin.is('.reference-inline-box')) { + if ($origin.is(".annotation-inline-box")) { w = Math.max(w, 400); h = Math.max(h, 60); if($('.htmlview div').offset().left + $('.htmlview div').width() > ($('.vsplitbar').offset().left - 480)){ @@ -430,6 +430,15 @@ x = 100; } } + if ($origin.is('.reference-inline-box')) { + w = 400; + h = 32; + y -= 32; + x = Math.min( + x, + $('.htmlview div').offset().left + $('.htmlview div').width() - 400 + ); + } // start edition on this node var $overlay = $('
').css({ @@ -683,6 +692,7 @@ xml2html({ xml: this.doc.text, + base: this.doc.getBase(), success: function(element){ var htmlView = $('#html-view'); htmlView.html(element);