Commit 62450a4d authored by Randall Leeds's avatar Randall Leeds

Revert "Tweak the tag editor widget to to propagate click events"

This reverts commit a686e540ee3a012cc7dbec50ac5d3f07fc5f75cd.
parent 79564168
...@@ -271,8 +271,6 @@ tags = ['$window', ($window) -> ...@@ -271,8 +271,6 @@ tags = ['$window', ($window) ->
caseSensitive: false caseSensitive: false
placeholderText: attr.placeholder placeholderText: attr.placeholder
keepPlaceholder: true keepPlaceholder: true
propagateTagClicks: false
propagateRemoveClicks: false
preprocessTag: (val) -> preprocessTag: (val) ->
val.toLowerCase().replace /[^a-z0-9\-\_\s]/g, '' val.toLowerCase().replace /[^a-z0-9\-\_\s]/g, ''
afterTagAdded: (evt, ui) -> afterTagAdded: (evt, ui) ->
......
...@@ -81,12 +81,6 @@ ...@@ -81,12 +81,6 @@
// Whether to animate tag removals or not. // Whether to animate tag removals or not.
animate: true, animate: true,
// Whether to propagete the click events when removing tags
propagateRemoveClicks: true,
// Whether to propagete the click events on tabs
propagateTagClicks: true,
// Optionally set a tabindex attribute on the input that gets // Optionally set a tabindex attribute on the input that gets
// created for tag-it. // created for tag-it.
tabIndex: null, tabIndex: null,
...@@ -186,11 +180,6 @@ ...@@ -186,11 +180,6 @@
.click(function(e) { .click(function(e) {
var target = $(e.target); var target = $(e.target);
if (target.hasClass('tagit-label')) { if (target.hasClass('tagit-label')) {
// Don't propagate this even, unless configured to
if (!that.options.propagateTagClicks) {
e.stopPropagation()
}
var tag = target.closest('.tagit-choice'); var tag = target.closest('.tagit-choice');
if (!tag.hasClass('removed')) { if (!tag.hasClass('removed')) {
that._trigger('onTagClicked', e, {tag: tag, tagLabel: that.tagLabel(tag)}); that._trigger('onTagClicked', e, {tag: tag, tagLabel: that.tagLabel(tag)});
...@@ -450,11 +439,6 @@ ...@@ -450,11 +439,6 @@
.click(function(e) { .click(function(e) {
// Removes a tag when the little 'x' is clicked. // Removes a tag when the little 'x' is clicked.
that.removeTag(tag); that.removeTag(tag);
// Don't propagate this even, unless configured to
if (!that.options.propagateRemoveClicks) {
e.stopPropagation()
}
}); });
tag.append(removeTag); tag.append(removeTag);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment