diff --git a/src/jquery.tokeninput.js b/src/jquery.tokeninput.js index 1dab8db1..a4344178 100644 --- a/src/jquery.tokeninput.js +++ b/src/jquery.tokeninput.js @@ -9,37 +9,54 @@ */ (function ($) { + // Default settings var DEFAULT_SETTINGS = { + + // Strings + hintText: "Type in a search term", noResultsText: "No results", searchingText: "Searching...", deleteText: "×", - searchDelay: 300, - minChars: 1, + + // Field exibition and behavior + tokenLimit: null, - jsonContainer: null, allowCustomEntry: false, + preventDuplicates: false, + searchColumns: ['name'], + parseName: null, + escapeHTML: true, + searchDelay: 300, + minChars: 1, + makeSortable: false, + animateDropdown: true, + + // Get local & external data + method: "GET", contentType: "json", queryParam: "q", + jsonContainer: null, + prePopulate: null, + processPrePopulate: false, + + // Submit input value + tokenDelimiter: ",", tokenQuote: "'", tokenQuoteEscaped: "\\'", - preventDuplicates: false, - prePopulate: null, - processPrePopulate: false, - parseName: null, - searchColumns: ['name'], - makeSortable: false, - escapeHTML: true, - animateDropdown: true, + tokensFormatter: null, + + // Callbacks + onResult: null, onAdd: null, - onDelete: null, - tokensFormatter: null + onDelete: null }; + // Default classes to use when theming var DEFAULT_CLASSES = { tokenList: "token-input-list",