X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/83be4d392d94be5d759a5632818b90ebf0afa763..cd330644503795289b6402e3622b5768b2ebed6c:/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 c1c9f6f1..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('*[x-edit-no-format]')) {
+        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 = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><button class="tytul-button akap-edit-button">tytuł dzieła</button><button class="wyroznienie-button akap-edit-button">wyróżnienie</button><button class="slowo-button akap-edit-button">słowo obce</button><button class="znak-button akap-edit-button">znak spec.</button><textarea></textarea></div>').css({
@@ -683,6 +692,7 @@
 
         xml2html({
             xml: this.doc.text,
+            base: this.doc.getBase(),
             success: function(element){
                 var htmlView = $('#html-view');
                 htmlView.html(element);