From 83733bb879b8ee0cdd93005d675b8aa22629e706 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Sat, 9 Feb 2013 20:24:39 -0800 Subject: [PATCH] catch up to master --- select2-latest.html | 3 +++ select2-master | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/select2-latest.html b/select2-latest.html index 3a4341ca..cd648c2b 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -636,6 +636,7 @@ $("#e11") .on("change", function(e) { log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) .on("opening", function() { log("opening"); }) .on("open", function() { log("open"); }) + .on("close", function() { log("close"); }) .on("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) .on("selected", function(e) { log ("selected val="+ e.val+" choice="+ JSON.stringify(e.choice));}) .on("removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}); @@ -643,6 +644,7 @@ $("#e11_2") .on("change", function(e) { log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) .on("opening", function() { log("opening"); }) .on("open", function() { log("open"); }) + .on("close", function() { log("close"); }) .on("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) .on("selected", function(e) { log ("selected val="+ e.val+" choice="+ JSON.stringify(e.choice));}) .on("removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}); @@ -1317,6 +1319,7 @@ $("#tags").select2({
query(options)
+ diff --git a/select2-master b/select2-master index a4c76f2d..f15583a5 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit a4c76f2dfb0b9a438c59a8a7409d2e7bf1ef16bf +Subproject commit f15583a5550a6f4289d9c8088873bfd2ba18f46f
ParameterTypeDescription
options.elementjquery objectThe element Select2 is attached to
options.termstringSearch string entered by user
options.pageint1-based page number tracked by Select2 for use with infinite scrolling of results
options.contextobjectAn object that persists across the lifecycle of queries for the same search term (the query to retrieve the initial results, and subsequent queries to retrieve more result pages for the same search term). When this function is first called for a new search term this object will be null. The user may choose to set any object in the results.context field - this object will then be used as the context parameter for all calls to the query method that will load more search results for the initial search term. The object will be reset back to null when a new search term is queried. This feature is useful when a page number is not easily mapped against the server side paging mechanism. For example, some server side paging mechanism may return a "continuation token" that needs to be passed back to them in order to retrieve the next page of search results.