From f6f32b1eb24d0f79293edff7832d6e3a4e5de95f Mon Sep 17 00:00:00 2001 From: zuber Date: Fri, 15 Jan 2010 15:27:28 +0100 Subject: [PATCH 1/1] =?utf8?q?Pokazywanie=20przypis=C3=B3w=20w=20odpowiedn?= =?utf8?q?im=20miejscu=20i=20ustalenie=20dla=20nich=20minimalnych=20rozmia?= =?utf8?q?r=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- platforma/static/css/html.css | 2 ++ platforma/static/js/main.js | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/platforma/static/css/html.css b/platforma/static/css/html.css index d64cd6ea..38075779 100755 --- a/platforma/static/css/html.css +++ b/platforma/static/css/html.css @@ -439,6 +439,7 @@ padding: 1px; z-index: 2000; + position: absolute; } .html-editarea textarea @@ -453,6 +454,7 @@ z-index: 0; font-size: 10pt; + position: relative; /* background-color: ivory;*/ } diff --git a/platforma/static/js/main.js b/platforma/static/js/main.js index 1a281c40..ef4e7992 100644 --- a/platforma/static/js/main.js +++ b/platforma/static/js/main.js @@ -317,10 +317,6 @@ function html(element) { xtype == 'motyw' || xtype == 'begin' || xtype == 'end') { return false; } - - // this is hopefully redundant - //if(! node.is('*.utwor *') ) - // return false; // don't allow themes inside annotations if( node.is('*[x-annotation-box] *') ) @@ -360,7 +356,7 @@ function html(element) { range.insertNode(tag[0]); xml2html({ - xml: ''+text+'', + xml: ''+text+' --- ', success: function(text) { tag.replaceWith(text); }, @@ -466,6 +462,11 @@ function html(element) { var w = $box.outerWidth(); var h = $box.innerHeight(); + if ($origin.is(".annotation-inline-box")) { + w = Math.max(w, 400); + h = Math.max(h, 60); + } + console.log('width:', w, 'height:', h); // start edition on this node @@ -476,9 +477,9 @@ function html(element) { top: y, width: w // right: 0 - }).appendTo($box[0].offsetParent || element).show(); + }).appendTo($box[0].offsetParent || $box.parent()).show(); - console.log($overlay, $box[0].offsetParent || element); + console.log($overlay, $box[0].offsetParent || $box.parent()); var serializer = new XMLSerializer(); -- 2.20.1