tag_left += image_pos.left;
tag_top += image_pos.top;
- $(this).css({
+ $(this).parent().css({
left: tag_left + 'px',
- top: tag_top + 'px',
+ top: tag_top + 'px' /*
+ width: tag_width + 'px',
+ height: tag_height + 'px' */
+ });
+
+ $(this).css({
width: tag_width + 'px',
height: tag_height + 'px'
});
if (elgg.tidypics.tagging.tag_hover == false) {
$('.tidypics-photo').hover(
function() {
- $('.tidypics-tag').show();
+ $('.tidypics-tag-wrapper').show();
},
function() {
- $('.tidypics-tag').hide();
+ $('.tidypics-tag-wrapper').hide();
}
);
} else {
$('.tidypics-photo').hover(
function() {
- $('.tidypics-tag').hide();
+ $('.tidypics-tag-wrapper').hide();
},
function() {
- $('.tidypics-tag').hide();
+ $('.tidypics-tag-wrapper').hide();
}
);
}
echo $summary;
-echo '<div class="tidypics-wrapper-photo">';
+echo '<div class="tidypics-photo-wrapper center">';
echo elgg_view('object/image/navigation', $vars);
echo elgg_view('photos/tagging/help', $vars);
echo elgg_view('photos/tagging/select', $vars);
.tidypics-gallery-widget > li {
width: 100%;
}
-
+/*
+.tidypics-lightbox {
+ margin: 0 auto;
+ display: block;
+ width: auto;
+}
+*/
+/*
.tidypics-photo {
margin: 0 auto;
display: block;
}
-
-.tidypics-wrapper-photo {
+*/
+.tidypics-photo-wrapper {
position: relative;
}
max-width: 300px;
}
-.tidypics-tag {
+.tidypics-tag-wrapper {
display: none;
position: absolute;
+}
+
+.tidypics-tag {
border: 2px solid white;
+ clear: both;
+}
+
+.tidypics-tag-label {
+ float: left;
+ margin-top: 5px;
}
<?php
* Photo tag view
*
* @uses $vars['tag'] Tag object
+ *
+ * @author Cash Costello
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
*/
$coords = json_decode('{' . $vars['tag']->coords . '}');
'data-height' => $coords->height,
));
-//var_dump($vars['tag']);
-//$text = "This is a something";
+if ($vars['tag']->type == 'user') {
+ $user = get_entity($vars['tag']->value);
+ $label = elgg_view('output/url', array(
+ 'text' => $user->name,
+ 'href' => $user->getURL(),
+ ));
+} else {
+ $label = $vars['tag']->value;
+}
echo <<<HTML
-<div $attributes>
+<div class="tidypics-tag-wrapper">
+ <div $attributes></div>
+ <div class="elgg-module-popup tidypics-tag-label">$label</div>
</div>
HTML;
* View the tags for this image
*
* @uses $vars['entity']
+ *
+ * @author Cash Costello
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
*/
$tags = $vars['entity']->getPhotoTags();