diff --git a/public_html/js/Controls/AutoCompleteInput.js b/public_html/js/Controls/AutoCompleteInput.js
index a92ee399..46b3d063 100644
--- a/public_html/js/Controls/AutoCompleteInput.js
+++ b/public_html/js/Controls/AutoCompleteInput.js
@@ -17,6 +17,7 @@ App.Controls.AutoCompleteInput = function($input) {
maxResults: 15,
minLengthToArbitrarySearch: 3,
onApply: null,
+ onRender: null,
additionalFilter: null,
};
var showTimeout = null;
@@ -222,6 +223,9 @@ App.Controls.AutoCompleteInput = function($input) {
});
$list.append($listItem);
});
+ if (options.onRender) {
+ options.onRender($list);
+ }
refreshActiveResult();
$div.css({
left: ($input.offset().left) + 'px',
diff --git a/public_html/js/Controls/TagInput.js b/public_html/js/Controls/TagInput.js
index 2d0221ed..75cf4a5b 100644
--- a/public_html/js/Controls/TagInput.js
+++ b/public_html/js/Controls/TagInput.js
@@ -83,6 +83,14 @@ App.Controls.TagInput = function($underlyingInput) {
return !_.contains(getTags(), resultItem[0]);
});
};
+ autoComplete.onRender = function($list) {
+ $list.find('li').each(function() {
+ var $li = jQuery(this);
+ if (isTaggedWith($li.attr('data-key'))) {
+ $li.css('opacity', '0.5');
+ }
+ });
+ };
}
$input.bind('focus', function(e) {