From: Thomas Citharel Date: Sun, 8 Mar 2015 01:36:37 +0000 (+0100) Subject: implement #1122 X-Git-Tag: 1.9.1alpha1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=512ff18015919bf3119509d1a8b8cf87b3b86f5f;hp=5e10eee8fc2ccc05f511180a8c92f82de6d293b0;p=github%2Fwallabag%2Fwallabag.git implement #1122 --- diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index c6c91c4a..bf323c49 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 90bc982c..986e71d1 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 15f15560..ae6684f2 100755 --- a/themes/baggy/edit-tags.twig +++ b/themes/baggy/edit-tags.twig @@ -16,7 +16,7 @@
{% trans "no tags" %}
{% endif %}
@@ -25,5 +25,7 @@

{% trans "Start typing for auto complete." %}
{% trans "You can enter multiple tags, separated by commas." %}

+All existing tags : + {% trans "return to article" %} {% endblock %}