diff options
-rw-r--r-- | views/default/object/image.php | 63 | ||||
-rw-r--r-- | views/default/tidypics/css.php | 5 |
2 files changed, 43 insertions, 25 deletions
diff --git a/views/default/object/image.php b/views/default/object/image.php index 383af4b4d..454a52c59 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -94,10 +94,35 @@ <div id="tidypics_image_nav"> <?php echo $back . $next; ?> </div> - <div id="tidypics_image_wrapper"><div style="text-align:center;"> + <div id="tidypics_image_wrapper"> <div id="tidypics_image_frame"> - <?php echo '<img id="tidypics_image"' . ' src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $file_guid . '&size=large" alt="' . $title . '"/>'; ?></div> + <?php echo '<img id="tidypics_image"' . ' src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $file_guid . '&size=large" alt="' . $title . '"/>'; ?> </div> +<div id="tag_menu"> +<?php + $viewer = get_loggedin_user(); + $friends = get_entities_from_relationship('friend', $viewer->getGUID(), false, 'user', '', 0); + + $content = "<input type='hidden' name='entity_guid' value='$file_guid' />"; + $content .= "<ul id='phototagging-menu'>"; + $content .= "<li class='owner'><a href='#' rel='{$viewer->getGUID()}'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>"; + + if($friends) foreach($friends as $friend) + { + $content .= "<li><a href='#' rel='{$friend->getGUID()}'>{$friend->name}</a></li>"; + } + + $content .= "</ul>"; + + $content .= " + <fieldset> + <button class='submit_button' type='submit'>" . elgg_echo('image:actiontag') . "</button> + </fieldset>"; + +echo $content; + //echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/phototagging", 'body' => $content)) +?> +</div> <div class="clearfloat"></div> </div> <div id="tidypics_controls"> @@ -200,7 +225,7 @@ function closeInfoTag() { $('#tagging_instructions').hide(); - //$('#cont-menu').hide(); + $('#tag_menu').hide(); $('img#tidypics_image').imgAreaSelect( {hide: true} ); } @@ -209,43 +234,33 @@ $('img#tidypics_image').imgAreaSelect( { borderWidth: 2, borderColor1: 'white', - borderColor2: 'white' + borderColor2: 'white', + onSelectEnd: showMenu, + onSelectStart: hideMenu } ); -/* - $('.imgareaselect-handle').css('opacity', 0.7); - - $('img#tidypics_image').imgAreaSelect( {selectionColor: 'white', - maxWidth: 200, - maxHeight: 200, - minWidth: 60, - minHeight: 60, - borderWidth: 2, - onSelectEnd: showMenu, - onSelectStart: hideMenu} ); -*/ } function hideMenu() { - //$('#cont-menu').hide(); + $('#tag_menu').hide(); coordinates = ""; } function showMenu(oObject, oCoordenates) { - constX = -70; - constY = 1; + constX = 0; + constY = 0; // show the list of friends if (oCoordenates.width != 0 && oCoordenates.height != 0) { coordinates = oCoordenates; -/* - $('#cont-menu').show().css({ - "margin-top": oCoordenates.y2+constY + "px", - "margin-left": oCoordenates.x2+constX + "px" + + $('#tag_menu').show().css({ + "top": oCoordenates.y2+constY + "px", + "left": oCoordenates.x2+constX + "px" }); -*/ + //jQuery(".input-filtro").focus(); } } diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php index 54e5e2e60..9b2b76b54 100644 --- a/views/default/tidypics/css.php +++ b/views/default/tidypics/css.php @@ -77,7 +77,10 @@ margin:10px; #tidypics_image_wrapper { margin:10px 0 10px 0; +text-align:center; +position: relative; } + /* #tidypics_image_frame { padding:5px; @@ -195,7 +198,7 @@ padding:10px; overflow:hidden; } -#cont-menu { +#tag_menu { border:1px solid #3B5999; width:200px; position:absolute; |