aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/js/photos/tagging.php13
-rw-r--r--views/default/photos/tagging/tag.php16
2 files changed, 23 insertions, 6 deletions
diff --git a/views/default/js/photos/tagging.php b/views/default/js/photos/tagging.php
index a3c7efc1c..f444aa44c 100644
--- a/views/default/js/photos/tagging.php
+++ b/views/default/js/photos/tagging.php
@@ -7,7 +7,7 @@
*/
?>
-
+//<script>
elgg.provide('elgg.tidypics.tagging');
elgg.tidypics.tagging.init = function() {
@@ -82,10 +82,13 @@ elgg.tidypics.tagging.startSelect = function(img, selection) {
coords += '"height":"' + selection.height + '"';
$("input[name=coordinates]").val(coords);
- $('#tidypics-tagging-select').show().css({
- 'top' : selection.y2 + 10,
- 'left' : selection.x2
- });
+ $('#tidypics-tagging-select').show()
+ .css({
+ 'top' : selection.y2 + 10,
+ 'left' : selection.x2
+ })
+ .find('input[type=text]').focus();
+
};
/**
diff --git a/views/default/photos/tagging/tag.php b/views/default/photos/tagging/tag.php
index 93ea16218..6f6af968a 100644
--- a/views/default/photos/tagging/tag.php
+++ b/views/default/photos/tagging/tag.php
@@ -28,9 +28,23 @@ if ($vars['tag']->type == 'user') {
$label = $vars['tag']->value;
}
+$delete = '';
+$annotation = get_annotation($vars['tag']->annotation_id);
+
+if ($annotation->canEdit()) {
+ $url = elgg_http_add_url_query_elements('action/photos/image/untag', array(
+ 'annotation_id' => $vars['tag']->annotation_id
+ ));
+ $delete = elgg_view('output/confirmlink', array(
+ 'href' => $url,
+ 'text' => elgg_view_icon('delete', 'float mas'),
+ 'confirm' => elgg_echo('tidypics:phototagging:delete:confirm')
+ ));
+}
+
echo <<<HTML
<div class="tidypics-tag-wrapper">
- <div $attributes></div>
+ <div $attributes>$delete</div>
<div class="elgg-module-popup tidypics-tag-label">$label</div>
</div>
HTML;