From b4ef4061e8ec4c80dfd76b6ba73dd70bef371f21 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Mon, 6 May 2013 20:15:10 -0700 Subject: [PATCH] catch up to master --- select2-latest.html | 75 +++++++++++++++++++++++---------------------- select2-master | 2 +- select2-test.html | 15 +++++---- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/select2-latest.html b/select2-latest.html index 6870dc0c..2bd14f5f 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -660,22 +660,26 @@ function log(e) { } $("#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));}) - .on("loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}); + .on("select2-opening", function() { log("opening"); }) + .on("select2-open", function() { log("open"); }) + .on("select2-close", function() { log("close"); }) + .on("select2-highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}) + .on("select2-focus", function(e) { log ("focus");}) + .on("select2-blur", function(e) { log ("blur");}); $("#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));}) - .on("loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}); + .on("select2-opening", function() { log("opening"); }) + .on("select2-open", function() { log("open"); }) + .on("select2-close", function() { log("close"); }) + .on("select2-highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}) + .on("select2-focus", function(e) { log ("focus");}) + .on("select2-blur", function(e) { log ("blur");}); });
@@ -1605,7 +1609,7 @@ $("#select").select2({
-

opening

+

select2-opening

Fired before the dropdown is shown.

The event listener can prevent the opening by calling preventDefault() on the supplied event object.

@@ -1613,14 +1617,14 @@ $("#select").select2({
-

open

+

select2-open

Fired after the dropdown is shown.

-

highlight

+

select2-highlight

Fired when a choice is highlighted in the dropdown.

The event object contains the following custom properties: @@ -1631,9 +1635,9 @@ $("#select").select2({

-
+
-

select

+

select2-selecting

Fired when a choice is being selected in the dropdown, but before any modification has been made to the selection. This event is used to allow the user to reject selection by calling event.preventDefault()

@@ -1645,22 +1649,9 @@ $("#select").select2({

-
-
-

selected

-

Fired when a choice is selected in the dropdown.

-

-

The event object contains the following custom properties: -

-
val
the id of the highlighted choice object
-
object
the choice object that was selected
-
-

-
-
-

removed

+

select2-removed

Fired when a choice is removed or cleared

The event object contains the following custom properties: @@ -1673,7 +1664,7 @@ $("#select").select2({

-

loaded

+

select2-loaded

Fired when query function is done loading the data and the results list has been updated

The event object contains the following custom properties: @@ -1683,8 +1674,20 @@ $("#select").select2({

- - +
+
+

select2-focus

+

Fired when the control is focussed +

+
+
+
+
+

select2-blur

+

Fired when the control is blurred +

+
+
diff --git a/select2-master b/select2-master index 55827b91..d668ae76 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit 55827b9159cca41c94c2a232f49943cef602e52b +Subproject commit d668ae76d01a7f5a27c38f123f4eed7cc8282c7c diff --git a/select2-test.html b/select2-test.html index 46d18611..d920a97c 100644 --- a/select2-test.html +++ b/select2-test.html @@ -8,12 +8,12 @@ -
+




- @@ -23,8 +23,7 @@

- @@ -32,8 +31,9 @@
+
- +