From 367676acae770d47b9cb285a568f4349f92f07a1 Mon Sep 17 00:00:00 2001 From: Lukasz Anwajler Date: Tue, 17 Aug 2010 04:52:45 -0500 Subject: [PATCH] WYSIWYG editor fixes (edit button, textarea moved to the left) --- redakcja/static/css/html.css | 8 +------- redakcja/static/js/wiki/view_editor_wysiwyg.js | 10 +++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) 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', { -- 2.20.1