Pokazywanie przypisów po najechaniu.
[redakcja.git] / platforma / static / js / main.js
index 3c1a3c0..f9adfab 100644 (file)
@@ -659,6 +659,13 @@ function html(element) {
         if (!editable.hasClass('active')) {
             editable.addClass('active').append(button);
         }
+        if (editable.is('.annotation-inline-box')) {
+            $('*[x-annotation-box]', editable)
+                .css({position: 'absolute', left: event.clientX - editable.offset().left, top: event.clientY - editable.offset().top})
+                .show();
+        } else {
+            $('*[x-annotation-box]').hide();
+        }
     });
 
     $('.motyw').live('click', function() {