[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/jquery/select2/ -> select2.js (summary)

(no description)

File Size: 2407 lines (90 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 23 functions

  indexOf()
  equal()
  splitVal()
  getSideBorderPadding()
  installKeyUpChangeEvent()
  installFilteredMouseMove()
  debounce()
  thunk()
  installDebouncedScroll()
  killEvent()
  measureTextWidth()
  markMatch()
  ajax()
  local()
  tags()
  checkFormatter()
  evaluate()
  countResults()
  defaultTokenizer()
  clazz()
  postRender()
  render()
  resolveContainerWidth()

Functions
Functions that are not part of a class:

indexOf(value, array)   X-Ref
No description

equal(a, b)   X-Ref
Compares equality of a and b taking into account that a and b may be strings, in which case localeCompare is used

param: a
param: b

splitVal(string, separator)   X-Ref
Splits the string into an array of values, trimming each value. An empty array is returned for nulls or empty
strings

param: string
param: separator

getSideBorderPadding(element)   X-Ref
No description

installKeyUpChangeEvent(element)   X-Ref
No description

installFilteredMouseMove(element)   X-Ref
filters mouse events so an event is fired only if the mouse moved.

filters out mouse events that occur when mouse is stationary but
the elements under the pointer are scrolled.

debounce(quietMillis, fn, ctx)   X-Ref
Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
within the last quietMillis milliseconds.

param: quietMillis number of milliseconds to wait before invoking fn
param: fn function to be debounced
param: ctx object to be used as this reference within fn
return: debounced version of fn

thunk(formula)   X-Ref
A simple implementation of a thunk

param: formula function used to lazily initialize the thunk
return: {Function}

installDebouncedScroll(threshold, element)   X-Ref
No description

killEvent(event)   X-Ref
No description

measureTextWidth(e)   X-Ref
No description

markMatch(text, term, markup)   X-Ref
No description

ajax(options)   X-Ref
Produces an ajax-based query function

param: options object containing configuration paramters
param: options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
param: options.url url for the data
param: options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
param: options.dataType request data type: ajax, jsonp, other datatatypes supported by jQuery's $.ajax function or the transport function if specified
param: options.traditional a boolean flag that should be true if you wish to use the traditional style of param serialization for the ajax request
param: options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
param: options.results a function(remoteData, pageNumber) that converts data returned form the remote request to the format expected by Select2.

local(options)   X-Ref
Produces a query function that works with a local array

param: options object containing configuration parameters. The options parameter can either be an array or an

tags(data)   X-Ref
No description

checkFormatter(formatter, formatterName)   X-Ref
Checks if the formatter function should be used.

Throws an error if it is not a function. Returns true if it should be used,
false if no formatting should be performed.

param: formatter

evaluate(val)   X-Ref
No description

countResults(results)   X-Ref
No description

defaultTokenizer(input, selection, selectCallback, opts)   X-Ref
Default tokenizer. This function uses breaks the input on substring match of any string from the
opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
two options have to be defined in order for the tokenizer to work.

param: input text user has typed so far or pasted into the search field
param: selection currently selected choices
param: selectCallback function(choice) callback tho add the choice to selection
param: opts select2's opts
return: undefined/null to leave the current input unchanged, or a string to change the input to the returned value

clazz(SuperClass, methods)   X-Ref
Creates a new class

param: superClass
param: methods

postRender()   X-Ref

param: initial whether or not this is the call to this method right after the dropdown has been opened

render(html)   X-Ref
No description

resolveContainerWidth()   X-Ref
No description



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1