Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

Commit

Permalink
clean up settings
Browse files Browse the repository at this point in the history
  • Loading branch information
loopj committed Aug 4, 2011
1 parent a1af7f9 commit 5a0b789
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions src/jquery.tokeninput.js
Expand Up @@ -11,31 +11,46 @@
(function ($) {
// Default settings
var DEFAULT_SETTINGS = {
// Search settings
propertyToSearch: "name",
method: "GET",
contentType: "json",
queryParam: "q",
searchDelay: 300,
minChars: 1,
jsonContainer: null,

// Display settings
hintText: "Type in a search term",
noResultsText: "No results",
searchingText: "Searching...",
deleteText: "×",
searchDelay: 300,
minChars: 1,
animateDropdown: true,

// Tokenization settings
tokenLimit: null,
jsonContainer: null,
method: "GET",
contentType: "json",
queryParam: "q",
tokenDelimiter: ",",
tokenValue: "id",
preventDuplicates: false,

// Output settings
tokenValue: "id",

// Prepopulation settings
prePopulate: null,
processPrePopulate: false,
animateDropdown: true,

// Manipulation settings
idPrefix: "token-input-",

// Formatters
resultsFormatter: function(item){ return "<li>" + item[this.propertyToSearch]+ "</li>" },
tokenFormatter: function(item) { return "<li><p>" + item[this.propertyToSearch] + "</p></li>" },

// Callbacks
onResult: null,
onAdd: null,
onDelete: null,
onReady: null,
idPrefix: "token-input-"
onReady: null
};

// Default classes to use when theming
Expand Down

0 comments on commit 5a0b789

Please sign in to comment.