From: Lukasz Anwajler Date: Tue, 17 Aug 2010 09:52:45 +0000 (-0500) Subject: WYSIWYG editor fixes (edit button, textarea moved to the left) X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/367676acae770d47b9cb285a568f4349f92f07a1?ds=inline WYSIWYG editor fixes (edit button, textarea moved to the left) --- diff --git a/redakcja/static/css/html.css b/redakcja/static/css/html.css index 501d5230..c0936cf2 100644 --- a/redakcja/static/css/html.css +++ b/redakcja/static/css/html.css @@ -415,12 +415,6 @@ div[x-node] > .uwaga { z-index: 600; } -/* annotation editing shouldn't interfere with gallery */ -#html-view span.annotation-inline-box { - position:absolute; - left:0px; -} - /* * Przypisy na końcu utworu (aktualnie nieuzywane) */ @@ -471,7 +465,7 @@ div[x-node] > .uwaga { top: -21px; left: -1px; width: 72px; - height: 21px; + height: 28px; display: block; /* margin: 4px 0 2px 0;*/ padding: 5px 5px 2px 5px; diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 257ec252..5f450622 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -290,8 +290,11 @@ $box = $origin; } - var x = $box[0].offsetLeft; - var y = $box[0].offsetTop; + /* always stick to the left to avoid interfering with gallery */ + var x = 20; + var y = $origin.offset().top + $("#html-view").scrollTop(); + + var w = $box.outerWidth(); var h = $box.innerHeight(); @@ -307,7 +310,8 @@ left: x, top: y, width: w - }).appendTo($box[0].offsetParent || $box.parent()).show(); + }).appendTo($('#html-view')).show(); /* appending outside of the document structure */ + if ($origin.is('.motyw')) { $('textarea', $overlay).autocomplete('/themes', {