From 1b149091328977b8ca97927482d8aacfac85a59d Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 21 Jul 2014 17:12:35 +0200 Subject: [PATCH] Set proper icons. --- sandbox/annotate.html | 108 +++++++++++++++++++++--------------------- sandbox/annotate.js | 25 +++++----- 2 files changed, 68 insertions(+), 65 deletions(-) diff --git a/sandbox/annotate.html b/sandbox/annotate.html index 702b627534..9c7fffc2af 100644 --- a/sandbox/annotate.html +++ b/sandbox/annotate.html @@ -1,31 +1,16 @@ + - - + + - -

Annotations for Key Selection

-
- Cisco SPA504g -
- Line/Key Selection: - - All Annotations Test -
-
-
-
+

Line Selection

+
+
anne.miller@example.org (107)
+
john.doe@example.org (243)
+
sales@example.org (100)
+
Assign Subscriber
+ + +
+

Subscriber

+ +

Line Type

+ +
+ diff --git a/sandbox/annotate.js b/sandbox/annotate.js index 357fcc3c65..e97987d149 100644 --- a/sandbox/annotate.js +++ b/sandbox/annotate.js @@ -15,32 +15,33 @@ if(pos == undefined) pos = "top"; console.log("pos at " + i + " is ", pos); - var $annotate = $('
' + $el.html() + '
'); - $(ctx).append($annotate); - - $el.html(''); + //var $annotate = $('
' + $el.html() + '
'); + //$(ctx).append($annotate); + //$el.html(''); + $el.append('
'); + $el.addClass("annotate"); var linkPosition = $el.position(); var top, left; switch(pos) { case "top": - top = linkPosition.top - 5 - $annotate.outerHeight(); - left = linkPosition.left - 9 - $annotate.outerWidth()/2; + top = linkPosition.top - 5 - $el.outerHeight(); + left = linkPosition.left - 9 - $el.outerWidth()/2; break; case "bottom": - top = linkPosition.top - 11 + $annotate.outerHeight(); - left = linkPosition.left - 9 - $annotate.outerWidth()/2; + top = linkPosition.top - 11 + $el.outerHeight(); + left = linkPosition.left - 9 - $el.outerWidth()/2; break; case "left": - top = linkPosition.top - ($annotate.outerHeight()/2); - left = linkPosition.left - 25 - $annotate.outerWidth(); + top = linkPosition.top - $el.outerHeight()/2; + left = linkPosition.left - 25 - $el.outerWidth(); break; case "right": - top = linkPosition.top - ($annotate.outerHeight()/2); + top = linkPosition.top - $el.outerHeight()/2; left = linkPosition.left + 5; break; } - $annotate.css({ + $el.css({ top: top, left: left });