From b3e57c7d259f274ca880e45a937f0b5d6c510c10 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 4 Apr 2009 22:00:26 +0000 Subject: better location for tag menu popup --- views/default/object/image.php | 44 +++++++++++++++++++++++------------------- views/default/tidypics/css.php | 4 ---- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'views') diff --git a/views/default/object/image.php b/views/default/object/image.php index 0fe69a7aa..3cb1e7ee3 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -341,8 +341,10 @@ if ($photo_tags) { borderWidth: 2, borderColor1: 'white', borderColor2: 'white', - onSelectEnd: showMenu, - onSelectStart: hideMenu + disable: false, + hide: false, + onSelectEnd: showTagMenu, + onSelectStart: hideTagMenu } ); } @@ -352,7 +354,7 @@ if ($photo_tags) { { $('#tagging_instructions').hide(); $('#tag_menu').hide(); - $('img#tidypics_image').imgAreaSelect( {hide: true} ); + $('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} ); $('#tidypics_image').hover( function(){ @@ -364,31 +366,36 @@ if ($photo_tags) { ); } - - function hideMenu() + function showTagMenu(oObject, oCoordenates) { - $('#tag_menu').hide(); - coordinates = ""; - } + offsetX = -100; - function showMenu(oObject, oCoordenates) - { - constX = 0; - constY = 0; + imgOffset = $('#tidypics_image').offset(); // show the list of friends if (oCoordenates.width != 0 && oCoordenates.height != 0) { coordinates = oCoordenates; + + top = imgOffset.top + oCoordenates.y2; + left = imgOffset.left + oCoordenates.x2 + offsetX; $('#tag_menu').show().css({ - "top": oCoordenates.y2+constY + "px", - "left": oCoordenates.x2+constX + "px" + "top": top + "px", + "left": left + "px" }); $(".input-filter").focus(); } } + + function hideTagMenu() + { + $('#tag_menu').hide(); + coordinates = ""; + } + + function addTag() { // do I need a catch for no tag? @@ -402,11 +409,8 @@ if ($photo_tags) { coord_string += '"height":"' + coordinates.height + '"'; $("input#coordinates").val(coord_string); -/* - //Show loading - jQuery("#cont-menu label, #cont-menu input, #cont-menu p, #cont-menu span, #cont-menu button, #cont-menu ul, #cont-menu fieldset").hide(); - jQuery("#cont-menu ").append('
'); - -*/ + + //Show loading + //$("#tag_menu").replaceWith('
'); } \ No newline at end of file diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php index 83421de74..f9f57ceab 100644 --- a/views/default/tidypics/css.php +++ b/views/default/tidypics/css.php @@ -78,7 +78,6 @@ margin:10px; #tidypics_image_wrapper { margin:10px 0 10px 0; text-align:center; -position: relative; } /* @@ -210,9 +209,6 @@ font-size:12px; text-align:left; } -div.phototag {height:140px; position:absolute; text-align:center;} -div.phototag span {margin:0px; display:block;} -div.phototag em {background:#EFFEFF; border:none; color: #61A6DF; opacity:0.8;position: relative;text-align: center; z-index: 2; display: none; font-size:10px; font-style:normal; padding:3px 0px; margin:-20px auto 0px; font-weight:bolder; -moz-border-radius:2px;} .tidypics_tag { display: none; -- cgit v1.2.3