Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

forgot event callback in options

  • Loading branch information...
commit 470b3f9c057d6897f72cb346abdba6d9eb0c4066 1 parent 8e0fd13
@aehlke authored
Showing with 6 additions and 6 deletions.
  1. +5 −5 js/tag-it.js
  2. +1 −1  js/tag-it.min.js
View
10 js/tag-it.js
@@ -28,18 +28,17 @@
$.widget('ui.tagit', {
options: {
- fieldName : 'tags',
-
- // Used for autocomplete, unless you override `autocomplete.source`.
- availableTags : [],
-
allowDuplicates : false,
caseSensitive : true,
+ fieldName : 'tags',
placeholderText : null, // Sets `placeholder` attr on input field.
readOnly : false, // Disables editing.
removeConfirmation: false, // Require confirmation to remove tags.
tagLimit : null, // Max number of tags allowed (null for unlimited).
+ // Used for autocomplete, unless you override `autocomplete.source`.
+ availableTags : [],
+
// Use to override or add any options to the autocomplete widget.
//
// By default, autocomplete.source will map to availableTags,
@@ -93,6 +92,7 @@
afterTagRemoved : null,
onTagClicked : null,
+ onTagLimitExceeded : null,
// DEPRECATED:
View
2  js/tag-it.min.js
@@ -1,4 +1,4 @@
-(function(b){b.widget("ui.tagit",{options:{fieldName:"tags",availableTags:[],allowDuplicates:!1,caseSensitive:!0,placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var a=
+(function(b){b.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var a=
this;this.element.is("input")?(this.tagList=b("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.css("display","none")):this.tagList=this.element.find("ul, ol").andSelf().last();this.tagInput=b('<input type="text" />').addClass("ui-widget-content");this.options.readOnly&&this.tagInput.attr("disabled","disabled");this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex);this.options.placeholderText&&this.tagInput.attr("placeholder",
this.options.placeholderText);this.options.autocomplete.source||(this.options.autocomplete.source=function(a,c){var d=a.term.toLowerCase(),e=b.grep(this.options.availableTags,function(a){return 0===a.toLowerCase().indexOf(d)});c(this._subtractArray(e,this.assignedTags()))});this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(){a._showAutocomplete()}),"undefined"===typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=0));b.isFunction(this.options.autocomplete.source)&&
(this.options.autocomplete.source=b.proxy(this.options.autocomplete.source,this));b.isFunction(this.options.tagSource)&&(this.options.tagSource=b.proxy(this.options.tagSource,this));this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(b('<li class="tagit-new"></li>').append(this.tagInput)).click(function(c){var d=b(c.target);d.hasClass("tagit-label")?(d=d.closest(".tagit-choice"),d.hasClass("removed")||a._trigger("onTagClicked",c,{tag:d,tagLabel:this.tagLabel(d)})):
Please sign in to comment.
Something went wrong with that request. Please try again.