From 73fc1830ff583b30258957d6030afd0ded0c5025 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 10 Mar 2014 16:14:00 +0100 Subject: [PATCH] Tag relations don't suggest tags already used --- data/config.ini | 1 + public_html/media/js/core.js | 5 +++-- src/Controllers/TagController.php | 4 +++- src/Models/SearchServices/TagSearchService.php | 5 +++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/data/config.ini b/data/config.ini index d17b9f29..ec8b4010 100644 --- a/data/config.ini +++ b/data/config.ini @@ -32,6 +32,7 @@ usersPerPage=8 postsPerPage=20 logsPerPage=250 tagsPerPage=100 +tagsRelated=15 thumbWidth=150 thumbHeight=150 thumbStyle=outside diff --git a/public_html/media/js/core.js b/public_html/media/js/core.js index 7390755a..ef031183 100644 --- a/public_html/media/js/core.js +++ b/public_html/media/js/core.js @@ -276,7 +276,8 @@ function attachTagIt(target) onTagClicked: function(e, ui) { var targetTagit = ui.tag.parents('.tagit'); - options = { tag: ui.tagLabel }; + var context = target.tagit('assignedTags'); + options = { context: context, tag: ui.tagLabel }; if (targetTagit.siblings('.related-tags:eq(0)').data('for') == options.tag) { targetTagit.siblings('.related-tags').slideUp(function() @@ -289,7 +290,7 @@ function attachTagIt(target) $.getJSON('/tags-related?json', options, function(data) { var list = $('