diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index c6c91c4a6..bf323c49c 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -465,9 +465,11 @@ class Poche Tools::redirect(); } $tags = $this->store->retrieveTagsByEntry($id); + $all_tags = $this->store->retrieveAllTags($this->user->getId()); $tpl_vars = array( 'entry_id' => $id, 'tags' => $tags, + 'alltags' => $all_tags, 'entry' => $entry, ); break; diff --git a/themes/_global/js/autoCompleteTags.js b/themes/_global/js/autoCompleteTags.js index 90bc982c2..986e71d15 100755 --- a/themes/_global/js/autoCompleteTags.js +++ b/themes/_global/js/autoCompleteTags.js @@ -43,5 +43,19 @@ jQuery(function($) { } }); + $('.suggestedtag').click(function(){ + var input = $("#value"); + var value = input.val(); + var tag = $(this).text(); + var terms = value.split(','); // tags into the + if (jQuery.inArray(tag, terms) == -1 ) { // if the tag hasn't already been added + value += tag + ","; + input.val(value); + } + input.focus(); + input[0].selectionStart = input[0].selectionEnd = input.val().length; + + }); + }); diff --git a/themes/baggy/edit-tags.twig b/themes/baggy/edit-tags.twig index 15f15560f..ae6684f2a 100755 --- a/themes/baggy/edit-tags.twig +++ b/themes/baggy/edit-tags.twig @@ -16,7 +16,7 @@
{% endif %}