jquery-ui-rails 4.0.0 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/.travis.yml +0 -1
- data/Gemfile +1 -1
- data/History.md +62 -0
- data/README.md +86 -74
- data/Rakefile +69 -37
- data/VERSIONS.md +36 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/{vendor/assets/javascripts/jquery.ui.accordion.js → app/assets/javascripts/jquery-ui/accordion.js} +90 -74
- data/{vendor/assets/javascripts/jquery.ui.autocomplete.js → app/assets/javascripts/jquery-ui/autocomplete.js} +105 -91
- data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js} +60 -68
- data/{vendor/assets/javascripts/jquery.ui.core.js → app/assets/javascripts/jquery-ui/core.js} +112 -132
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
- data/{vendor/assets/javascripts/jquery.ui.datepicker.js → app/assets/javascripts/jquery-ui/datepicker.js} +120 -80
- data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js} +298 -190
- data/app/assets/javascripts/jquery-ui/draggable.js +1132 -0
- data/app/assets/javascripts/jquery-ui/droppable.js +418 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-blind.js → app/assets/javascripts/jquery-ui/effect-blind.js} +21 -13
- data/{vendor/assets/javascripts/jquery.ui.effect-bounce.js → app/assets/javascripts/jquery-ui/effect-bounce.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-clip.js → app/assets/javascripts/jquery-ui/effect-clip.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-drop.js → app/assets/javascripts/jquery-ui/effect-drop.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-explode.js → app/assets/javascripts/jquery-ui/effect-explode.js} +21 -11
- data/app/assets/javascripts/jquery-ui/effect-fade.js +42 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-fold.js → app/assets/javascripts/jquery-ui/effect-fold.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-highlight.js → app/assets/javascripts/jquery-ui/effect-highlight.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-pulsate.js → app/assets/javascripts/jquery-ui/effect-pulsate.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-shake.js → app/assets/javascripts/jquery-ui/effect-shake.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-scale.js → app/assets/javascripts/jquery-ui/effect-size.js} +20 -105
- data/{vendor/assets/javascripts/jquery.ui.effect-slide.js → app/assets/javascripts/jquery-ui/effect-slide.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-transfer.js → app/assets/javascripts/jquery-ui/effect-transfer.js} +23 -13
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/{vendor/assets/javascripts/jquery.ui.effect.js → app/assets/javascripts/jquery-ui/effect.js} +125 -92
- data/{vendor/assets/javascripts/jquery.ui.menu.js → app/assets/javascripts/jquery-ui/menu.js} +127 -102
- data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js} +57 -27
- data/{vendor/assets/javascripts/jquery.ui.position.js → app/assets/javascripts/jquery-ui/position.js} +47 -27
- data/{vendor/assets/javascripts/jquery.ui.progressbar.js → app/assets/javascripts/jquery-ui/progressbar.js} +27 -13
- data/{vendor/assets/javascripts/jquery.ui.resizable.js → app/assets/javascripts/jquery-ui/resizable.js} +454 -243
- data/{vendor/assets/javascripts/jquery.ui.selectable.js → app/assets/javascripts/jquery-ui/selectable.js} +26 -16
- data/app/assets/javascripts/jquery-ui/selectmenu.js +620 -0
- data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js} +159 -91
- data/{vendor/assets/javascripts/jquery.ui.sortable.js → app/assets/javascripts/jquery-ui/sortable.js} +168 -114
- data/{vendor/assets/javascripts/jquery.ui.spinner.js → app/assets/javascripts/jquery-ui/spinner.js} +54 -32
- data/{vendor/assets/javascripts/jquery.ui.tabs.js → app/assets/javascripts/jquery-ui/tabs.js} +108 -73
- data/{vendor/assets/javascripts/jquery.ui.tooltip.js → app/assets/javascripts/jquery-ui/tooltip.js} +134 -75
- data/{vendor/assets/javascripts/jquery.ui.widget.js → app/assets/javascripts/jquery-ui/widget.js} +81 -44
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/{vendor/assets/stylesheets/jquery.ui.accordion.css.erb → app/assets/stylesheets/jquery-ui/accordion.css} +7 -9
- data/app/assets/stylesheets/jquery-ui/all.css +14 -0
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +21 -0
- data/app/assets/stylesheets/jquery-ui/base.css +30 -0
- data/{vendor/assets/stylesheets/jquery.ui.button.css.erb → app/assets/stylesheets/jquery-ui/button.css} +5 -5
- data/{vendor/assets/stylesheets/jquery.ui.core.css.erb → app/assets/stylesheets/jquery-ui/core.css} +8 -4
- data/{vendor/assets/stylesheets/jquery.ui.datepicker.css.erb → app/assets/stylesheets/jquery-ui/datepicker.css} +6 -9
- data/{vendor/assets/stylesheets/jquery.ui.dialog.css.erb → app/assets/stylesheets/jquery-ui/dialog.css} +10 -8
- data/app/assets/stylesheets/jquery-ui/draggable.css +16 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +32 -0
- data/{vendor/assets/stylesheets/jquery.ui.resizable.css.erb → app/assets/stylesheets/jquery-ui/resizable.css} +6 -6
- data/app/assets/stylesheets/jquery-ui/selectable.css +21 -0
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +64 -0
- data/{vendor/assets/stylesheets/jquery.ui.slider.css.erb → app/assets/stylesheets/jquery-ui/slider.css} +8 -6
- data/app/assets/stylesheets/jquery-ui/sortable.css +16 -0
- data/{vendor/assets/stylesheets/jquery.ui.spinner.css.erb → app/assets/stylesheets/jquery-ui/spinner.css} +8 -8
- data/{vendor/assets/stylesheets/jquery.ui.tabs.css.erb → app/assets/stylesheets/jquery-ui/tabs.css} +11 -12
- data/{vendor/assets/stylesheets/jquery.ui.theme.css.erb → app/assets/stylesheets/jquery-ui/theme.css.erb} +29 -11
- data/{vendor/assets/stylesheets/jquery.ui.tooltip.css.erb → app/assets/stylesheets/jquery-ui/tooltip.css} +6 -4
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/version.rb +2 -1
- metadata +155 -161
- data/vendor/assets/javascripts/jquery.ui.all.js +0 -34
- data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.draggable.js +0 -950
- data/vendor/assets/javascripts/jquery.ui.droppable.js +0 -376
- data/vendor/assets/javascripts/jquery.ui.effect-fade.js +0 -32
- data/vendor/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/vendor/assets/stylesheets/jquery.ui.all.css.erb +0 -14
- data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
- data/vendor/assets/stylesheets/jquery.ui.base.css.erb +0 -27
- data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +0 -81
- data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -32
- data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +0 -19
@@ -1,26 +1,36 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Selectable 1.
|
6
|
+
* jQuery UI Selectable 1.11.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
|
-
* Copyright
|
9
|
+
* Copyright jQuery Foundation and other contributors
|
10
10
|
* Released under the MIT license.
|
11
11
|
* http://jquery.org/license
|
12
12
|
*
|
13
13
|
* http://api.jqueryui.com/selectable/
|
14
|
-
*
|
15
|
-
* Depends:
|
16
|
-
* jquery.ui.core.js
|
17
|
-
* jquery.ui.mouse.js
|
18
|
-
* jquery.ui.widget.js
|
19
14
|
*/
|
20
|
-
(function(
|
15
|
+
(function( factory ) {
|
16
|
+
if ( typeof define === "function" && define.amd ) {
|
17
|
+
|
18
|
+
// AMD. Register as an anonymous module.
|
19
|
+
define([
|
20
|
+
"jquery",
|
21
|
+
"./core",
|
22
|
+
"./mouse",
|
23
|
+
"./widget"
|
24
|
+
], factory );
|
25
|
+
} else {
|
26
|
+
|
27
|
+
// Browser globals
|
28
|
+
factory( jQuery );
|
29
|
+
}
|
30
|
+
}(function( $ ) {
|
21
31
|
|
22
|
-
$.widget("ui.selectable", $.ui.mouse, {
|
23
|
-
version: "1.
|
32
|
+
return $.widget("ui.selectable", $.ui.mouse, {
|
33
|
+
version: "1.11.3",
|
24
34
|
options: {
|
25
35
|
appendTo: "body",
|
26
36
|
autoRefresh: true,
|
@@ -87,7 +97,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|
87
97
|
var that = this,
|
88
98
|
options = this.options;
|
89
99
|
|
90
|
-
this.opos = [event.pageX, event.pageY];
|
100
|
+
this.opos = [ event.pageX, event.pageY ];
|
91
101
|
|
92
102
|
if (this.options.disabled) {
|
93
103
|
return;
|
@@ -170,7 +180,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|
170
180
|
|
171
181
|
if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
|
172
182
|
if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
|
173
|
-
this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
|
183
|
+
this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 });
|
174
184
|
|
175
185
|
this.selectees.each(function() {
|
176
186
|
var selectee = $.data(this, "selectable-item"),
|
@@ -278,4 +288,4 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|
278
288
|
|
279
289
|
});
|
280
290
|
|
281
|
-
})
|
291
|
+
}));
|
@@ -0,0 +1,620 @@
|
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/position
|
4
|
+
//= require jquery-ui/menu
|
5
|
+
|
6
|
+
/*!
|
7
|
+
* jQuery UI Selectmenu 1.11.3
|
8
|
+
* http://jqueryui.com
|
9
|
+
*
|
10
|
+
* Copyright jQuery Foundation and other contributors
|
11
|
+
* Released under the MIT license.
|
12
|
+
* http://jquery.org/license
|
13
|
+
*
|
14
|
+
* http://api.jqueryui.com/selectmenu
|
15
|
+
*/
|
16
|
+
(function( factory ) {
|
17
|
+
if ( typeof define === "function" && define.amd ) {
|
18
|
+
|
19
|
+
// AMD. Register as an anonymous module.
|
20
|
+
define([
|
21
|
+
"jquery",
|
22
|
+
"./core",
|
23
|
+
"./widget",
|
24
|
+
"./position",
|
25
|
+
"./menu"
|
26
|
+
], factory );
|
27
|
+
} else {
|
28
|
+
|
29
|
+
// Browser globals
|
30
|
+
factory( jQuery );
|
31
|
+
}
|
32
|
+
}(function( $ ) {
|
33
|
+
|
34
|
+
return $.widget( "ui.selectmenu", {
|
35
|
+
version: "1.11.3",
|
36
|
+
defaultElement: "<select>",
|
37
|
+
options: {
|
38
|
+
appendTo: null,
|
39
|
+
disabled: null,
|
40
|
+
icons: {
|
41
|
+
button: "ui-icon-triangle-1-s"
|
42
|
+
},
|
43
|
+
position: {
|
44
|
+
my: "left top",
|
45
|
+
at: "left bottom",
|
46
|
+
collision: "none"
|
47
|
+
},
|
48
|
+
width: null,
|
49
|
+
|
50
|
+
// callbacks
|
51
|
+
change: null,
|
52
|
+
close: null,
|
53
|
+
focus: null,
|
54
|
+
open: null,
|
55
|
+
select: null
|
56
|
+
},
|
57
|
+
|
58
|
+
_create: function() {
|
59
|
+
var selectmenuId = this.element.uniqueId().attr( "id" );
|
60
|
+
this.ids = {
|
61
|
+
element: selectmenuId,
|
62
|
+
button: selectmenuId + "-button",
|
63
|
+
menu: selectmenuId + "-menu"
|
64
|
+
};
|
65
|
+
|
66
|
+
this._drawButton();
|
67
|
+
this._drawMenu();
|
68
|
+
|
69
|
+
if ( this.options.disabled ) {
|
70
|
+
this.disable();
|
71
|
+
}
|
72
|
+
},
|
73
|
+
|
74
|
+
_drawButton: function() {
|
75
|
+
var that = this;
|
76
|
+
|
77
|
+
// Associate existing label with the new button
|
78
|
+
this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
|
79
|
+
this._on( this.label, {
|
80
|
+
click: function( event ) {
|
81
|
+
this.button.focus();
|
82
|
+
event.preventDefault();
|
83
|
+
}
|
84
|
+
});
|
85
|
+
|
86
|
+
// Hide original select element
|
87
|
+
this.element.hide();
|
88
|
+
|
89
|
+
// Create button
|
90
|
+
this.button = $( "<span>", {
|
91
|
+
"class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
|
92
|
+
tabindex: this.options.disabled ? -1 : 0,
|
93
|
+
id: this.ids.button,
|
94
|
+
role: "combobox",
|
95
|
+
"aria-expanded": "false",
|
96
|
+
"aria-autocomplete": "list",
|
97
|
+
"aria-owns": this.ids.menu,
|
98
|
+
"aria-haspopup": "true"
|
99
|
+
})
|
100
|
+
.insertAfter( this.element );
|
101
|
+
|
102
|
+
$( "<span>", {
|
103
|
+
"class": "ui-icon " + this.options.icons.button
|
104
|
+
})
|
105
|
+
.prependTo( this.button );
|
106
|
+
|
107
|
+
this.buttonText = $( "<span>", {
|
108
|
+
"class": "ui-selectmenu-text"
|
109
|
+
})
|
110
|
+
.appendTo( this.button );
|
111
|
+
|
112
|
+
this._setText( this.buttonText, this.element.find( "option:selected" ).text() );
|
113
|
+
this._resizeButton();
|
114
|
+
|
115
|
+
this._on( this.button, this._buttonEvents );
|
116
|
+
this.button.one( "focusin", function() {
|
117
|
+
|
118
|
+
// Delay rendering the menu items until the button receives focus.
|
119
|
+
// The menu may have already been rendered via a programmatic open.
|
120
|
+
if ( !that.menuItems ) {
|
121
|
+
that._refreshMenu();
|
122
|
+
}
|
123
|
+
});
|
124
|
+
this._hoverable( this.button );
|
125
|
+
this._focusable( this.button );
|
126
|
+
},
|
127
|
+
|
128
|
+
_drawMenu: function() {
|
129
|
+
var that = this;
|
130
|
+
|
131
|
+
// Create menu
|
132
|
+
this.menu = $( "<ul>", {
|
133
|
+
"aria-hidden": "true",
|
134
|
+
"aria-labelledby": this.ids.button,
|
135
|
+
id: this.ids.menu
|
136
|
+
});
|
137
|
+
|
138
|
+
// Wrap menu
|
139
|
+
this.menuWrap = $( "<div>", {
|
140
|
+
"class": "ui-selectmenu-menu ui-front"
|
141
|
+
})
|
142
|
+
.append( this.menu )
|
143
|
+
.appendTo( this._appendTo() );
|
144
|
+
|
145
|
+
// Initialize menu widget
|
146
|
+
this.menuInstance = this.menu
|
147
|
+
.menu({
|
148
|
+
role: "listbox",
|
149
|
+
select: function( event, ui ) {
|
150
|
+
event.preventDefault();
|
151
|
+
|
152
|
+
// support: IE8
|
153
|
+
// If the item was selected via a click, the text selection
|
154
|
+
// will be destroyed in IE
|
155
|
+
that._setSelection();
|
156
|
+
|
157
|
+
that._select( ui.item.data( "ui-selectmenu-item" ), event );
|
158
|
+
},
|
159
|
+
focus: function( event, ui ) {
|
160
|
+
var item = ui.item.data( "ui-selectmenu-item" );
|
161
|
+
|
162
|
+
// Prevent inital focus from firing and check if its a newly focused item
|
163
|
+
if ( that.focusIndex != null && item.index !== that.focusIndex ) {
|
164
|
+
that._trigger( "focus", event, { item: item } );
|
165
|
+
if ( !that.isOpen ) {
|
166
|
+
that._select( item, event );
|
167
|
+
}
|
168
|
+
}
|
169
|
+
that.focusIndex = item.index;
|
170
|
+
|
171
|
+
that.button.attr( "aria-activedescendant",
|
172
|
+
that.menuItems.eq( item.index ).attr( "id" ) );
|
173
|
+
}
|
174
|
+
})
|
175
|
+
.menu( "instance" );
|
176
|
+
|
177
|
+
// Adjust menu styles to dropdown
|
178
|
+
this.menu
|
179
|
+
.addClass( "ui-corner-bottom" )
|
180
|
+
.removeClass( "ui-corner-all" );
|
181
|
+
|
182
|
+
// Don't close the menu on mouseleave
|
183
|
+
this.menuInstance._off( this.menu, "mouseleave" );
|
184
|
+
|
185
|
+
// Cancel the menu's collapseAll on document click
|
186
|
+
this.menuInstance._closeOnDocumentClick = function() {
|
187
|
+
return false;
|
188
|
+
};
|
189
|
+
|
190
|
+
// Selects often contain empty items, but never contain dividers
|
191
|
+
this.menuInstance._isDivider = function() {
|
192
|
+
return false;
|
193
|
+
};
|
194
|
+
},
|
195
|
+
|
196
|
+
refresh: function() {
|
197
|
+
this._refreshMenu();
|
198
|
+
this._setText( this.buttonText, this._getSelectedItem().text() );
|
199
|
+
if ( !this.options.width ) {
|
200
|
+
this._resizeButton();
|
201
|
+
}
|
202
|
+
},
|
203
|
+
|
204
|
+
_refreshMenu: function() {
|
205
|
+
this.menu.empty();
|
206
|
+
|
207
|
+
var item,
|
208
|
+
options = this.element.find( "option" );
|
209
|
+
|
210
|
+
if ( !options.length ) {
|
211
|
+
return;
|
212
|
+
}
|
213
|
+
|
214
|
+
this._parseOptions( options );
|
215
|
+
this._renderMenu( this.menu, this.items );
|
216
|
+
|
217
|
+
this.menuInstance.refresh();
|
218
|
+
this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
|
219
|
+
|
220
|
+
item = this._getSelectedItem();
|
221
|
+
|
222
|
+
// Update the menu to have the correct item focused
|
223
|
+
this.menuInstance.focus( null, item );
|
224
|
+
this._setAria( item.data( "ui-selectmenu-item" ) );
|
225
|
+
|
226
|
+
// Set disabled state
|
227
|
+
this._setOption( "disabled", this.element.prop( "disabled" ) );
|
228
|
+
},
|
229
|
+
|
230
|
+
open: function( event ) {
|
231
|
+
if ( this.options.disabled ) {
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
|
235
|
+
// If this is the first time the menu is being opened, render the items
|
236
|
+
if ( !this.menuItems ) {
|
237
|
+
this._refreshMenu();
|
238
|
+
} else {
|
239
|
+
|
240
|
+
// Menu clears focus on close, reset focus to selected item
|
241
|
+
this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" );
|
242
|
+
this.menuInstance.focus( null, this._getSelectedItem() );
|
243
|
+
}
|
244
|
+
|
245
|
+
this.isOpen = true;
|
246
|
+
this._toggleAttr();
|
247
|
+
this._resizeMenu();
|
248
|
+
this._position();
|
249
|
+
|
250
|
+
this._on( this.document, this._documentClick );
|
251
|
+
|
252
|
+
this._trigger( "open", event );
|
253
|
+
},
|
254
|
+
|
255
|
+
_position: function() {
|
256
|
+
this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
|
257
|
+
},
|
258
|
+
|
259
|
+
close: function( event ) {
|
260
|
+
if ( !this.isOpen ) {
|
261
|
+
return;
|
262
|
+
}
|
263
|
+
|
264
|
+
this.isOpen = false;
|
265
|
+
this._toggleAttr();
|
266
|
+
|
267
|
+
this.range = null;
|
268
|
+
this._off( this.document );
|
269
|
+
|
270
|
+
this._trigger( "close", event );
|
271
|
+
},
|
272
|
+
|
273
|
+
widget: function() {
|
274
|
+
return this.button;
|
275
|
+
},
|
276
|
+
|
277
|
+
menuWidget: function() {
|
278
|
+
return this.menu;
|
279
|
+
},
|
280
|
+
|
281
|
+
_renderMenu: function( ul, items ) {
|
282
|
+
var that = this,
|
283
|
+
currentOptgroup = "";
|
284
|
+
|
285
|
+
$.each( items, function( index, item ) {
|
286
|
+
if ( item.optgroup !== currentOptgroup ) {
|
287
|
+
$( "<li>", {
|
288
|
+
"class": "ui-selectmenu-optgroup ui-menu-divider" +
|
289
|
+
( item.element.parent( "optgroup" ).prop( "disabled" ) ?
|
290
|
+
" ui-state-disabled" :
|
291
|
+
"" ),
|
292
|
+
text: item.optgroup
|
293
|
+
})
|
294
|
+
.appendTo( ul );
|
295
|
+
|
296
|
+
currentOptgroup = item.optgroup;
|
297
|
+
}
|
298
|
+
|
299
|
+
that._renderItemData( ul, item );
|
300
|
+
});
|
301
|
+
},
|
302
|
+
|
303
|
+
_renderItemData: function( ul, item ) {
|
304
|
+
return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
|
305
|
+
},
|
306
|
+
|
307
|
+
_renderItem: function( ul, item ) {
|
308
|
+
var li = $( "<li>" );
|
309
|
+
|
310
|
+
if ( item.disabled ) {
|
311
|
+
li.addClass( "ui-state-disabled" );
|
312
|
+
}
|
313
|
+
this._setText( li, item.label );
|
314
|
+
|
315
|
+
return li.appendTo( ul );
|
316
|
+
},
|
317
|
+
|
318
|
+
_setText: function( element, value ) {
|
319
|
+
if ( value ) {
|
320
|
+
element.text( value );
|
321
|
+
} else {
|
322
|
+
element.html( " " );
|
323
|
+
}
|
324
|
+
},
|
325
|
+
|
326
|
+
_move: function( direction, event ) {
|
327
|
+
var item, next,
|
328
|
+
filter = ".ui-menu-item";
|
329
|
+
|
330
|
+
if ( this.isOpen ) {
|
331
|
+
item = this.menuItems.eq( this.focusIndex );
|
332
|
+
} else {
|
333
|
+
item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
|
334
|
+
filter += ":not(.ui-state-disabled)";
|
335
|
+
}
|
336
|
+
|
337
|
+
if ( direction === "first" || direction === "last" ) {
|
338
|
+
next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
|
339
|
+
} else {
|
340
|
+
next = item[ direction + "All" ]( filter ).eq( 0 );
|
341
|
+
}
|
342
|
+
|
343
|
+
if ( next.length ) {
|
344
|
+
this.menuInstance.focus( event, next );
|
345
|
+
}
|
346
|
+
},
|
347
|
+
|
348
|
+
_getSelectedItem: function() {
|
349
|
+
return this.menuItems.eq( this.element[ 0 ].selectedIndex );
|
350
|
+
},
|
351
|
+
|
352
|
+
_toggle: function( event ) {
|
353
|
+
this[ this.isOpen ? "close" : "open" ]( event );
|
354
|
+
},
|
355
|
+
|
356
|
+
_setSelection: function() {
|
357
|
+
var selection;
|
358
|
+
|
359
|
+
if ( !this.range ) {
|
360
|
+
return;
|
361
|
+
}
|
362
|
+
|
363
|
+
if ( window.getSelection ) {
|
364
|
+
selection = window.getSelection();
|
365
|
+
selection.removeAllRanges();
|
366
|
+
selection.addRange( this.range );
|
367
|
+
|
368
|
+
// support: IE8
|
369
|
+
} else {
|
370
|
+
this.range.select();
|
371
|
+
}
|
372
|
+
|
373
|
+
// support: IE
|
374
|
+
// Setting the text selection kills the button focus in IE, but
|
375
|
+
// restoring the focus doesn't kill the selection.
|
376
|
+
this.button.focus();
|
377
|
+
},
|
378
|
+
|
379
|
+
_documentClick: {
|
380
|
+
mousedown: function( event ) {
|
381
|
+
if ( !this.isOpen ) {
|
382
|
+
return;
|
383
|
+
}
|
384
|
+
|
385
|
+
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) {
|
386
|
+
this.close( event );
|
387
|
+
}
|
388
|
+
}
|
389
|
+
},
|
390
|
+
|
391
|
+
_buttonEvents: {
|
392
|
+
|
393
|
+
// Prevent text selection from being reset when interacting with the selectmenu (#10144)
|
394
|
+
mousedown: function() {
|
395
|
+
var selection;
|
396
|
+
|
397
|
+
if ( window.getSelection ) {
|
398
|
+
selection = window.getSelection();
|
399
|
+
if ( selection.rangeCount ) {
|
400
|
+
this.range = selection.getRangeAt( 0 );
|
401
|
+
}
|
402
|
+
|
403
|
+
// support: IE8
|
404
|
+
} else {
|
405
|
+
this.range = document.selection.createRange();
|
406
|
+
}
|
407
|
+
},
|
408
|
+
|
409
|
+
click: function( event ) {
|
410
|
+
this._setSelection();
|
411
|
+
this._toggle( event );
|
412
|
+
},
|
413
|
+
|
414
|
+
keydown: function( event ) {
|
415
|
+
var preventDefault = true;
|
416
|
+
switch ( event.keyCode ) {
|
417
|
+
case $.ui.keyCode.TAB:
|
418
|
+
case $.ui.keyCode.ESCAPE:
|
419
|
+
this.close( event );
|
420
|
+
preventDefault = false;
|
421
|
+
break;
|
422
|
+
case $.ui.keyCode.ENTER:
|
423
|
+
if ( this.isOpen ) {
|
424
|
+
this._selectFocusedItem( event );
|
425
|
+
}
|
426
|
+
break;
|
427
|
+
case $.ui.keyCode.UP:
|
428
|
+
if ( event.altKey ) {
|
429
|
+
this._toggle( event );
|
430
|
+
} else {
|
431
|
+
this._move( "prev", event );
|
432
|
+
}
|
433
|
+
break;
|
434
|
+
case $.ui.keyCode.DOWN:
|
435
|
+
if ( event.altKey ) {
|
436
|
+
this._toggle( event );
|
437
|
+
} else {
|
438
|
+
this._move( "next", event );
|
439
|
+
}
|
440
|
+
break;
|
441
|
+
case $.ui.keyCode.SPACE:
|
442
|
+
if ( this.isOpen ) {
|
443
|
+
this._selectFocusedItem( event );
|
444
|
+
} else {
|
445
|
+
this._toggle( event );
|
446
|
+
}
|
447
|
+
break;
|
448
|
+
case $.ui.keyCode.LEFT:
|
449
|
+
this._move( "prev", event );
|
450
|
+
break;
|
451
|
+
case $.ui.keyCode.RIGHT:
|
452
|
+
this._move( "next", event );
|
453
|
+
break;
|
454
|
+
case $.ui.keyCode.HOME:
|
455
|
+
case $.ui.keyCode.PAGE_UP:
|
456
|
+
this._move( "first", event );
|
457
|
+
break;
|
458
|
+
case $.ui.keyCode.END:
|
459
|
+
case $.ui.keyCode.PAGE_DOWN:
|
460
|
+
this._move( "last", event );
|
461
|
+
break;
|
462
|
+
default:
|
463
|
+
this.menu.trigger( event );
|
464
|
+
preventDefault = false;
|
465
|
+
}
|
466
|
+
|
467
|
+
if ( preventDefault ) {
|
468
|
+
event.preventDefault();
|
469
|
+
}
|
470
|
+
}
|
471
|
+
},
|
472
|
+
|
473
|
+
_selectFocusedItem: function( event ) {
|
474
|
+
var item = this.menuItems.eq( this.focusIndex );
|
475
|
+
if ( !item.hasClass( "ui-state-disabled" ) ) {
|
476
|
+
this._select( item.data( "ui-selectmenu-item" ), event );
|
477
|
+
}
|
478
|
+
},
|
479
|
+
|
480
|
+
_select: function( item, event ) {
|
481
|
+
var oldIndex = this.element[ 0 ].selectedIndex;
|
482
|
+
|
483
|
+
// Change native select element
|
484
|
+
this.element[ 0 ].selectedIndex = item.index;
|
485
|
+
this._setText( this.buttonText, item.label );
|
486
|
+
this._setAria( item );
|
487
|
+
this._trigger( "select", event, { item: item } );
|
488
|
+
|
489
|
+
if ( item.index !== oldIndex ) {
|
490
|
+
this._trigger( "change", event, { item: item } );
|
491
|
+
}
|
492
|
+
|
493
|
+
this.close( event );
|
494
|
+
},
|
495
|
+
|
496
|
+
_setAria: function( item ) {
|
497
|
+
var id = this.menuItems.eq( item.index ).attr( "id" );
|
498
|
+
|
499
|
+
this.button.attr({
|
500
|
+
"aria-labelledby": id,
|
501
|
+
"aria-activedescendant": id
|
502
|
+
});
|
503
|
+
this.menu.attr( "aria-activedescendant", id );
|
504
|
+
},
|
505
|
+
|
506
|
+
_setOption: function( key, value ) {
|
507
|
+
if ( key === "icons" ) {
|
508
|
+
this.button.find( "span.ui-icon" )
|
509
|
+
.removeClass( this.options.icons.button )
|
510
|
+
.addClass( value.button );
|
511
|
+
}
|
512
|
+
|
513
|
+
this._super( key, value );
|
514
|
+
|
515
|
+
if ( key === "appendTo" ) {
|
516
|
+
this.menuWrap.appendTo( this._appendTo() );
|
517
|
+
}
|
518
|
+
|
519
|
+
if ( key === "disabled" ) {
|
520
|
+
this.menuInstance.option( "disabled", value );
|
521
|
+
this.button
|
522
|
+
.toggleClass( "ui-state-disabled", value )
|
523
|
+
.attr( "aria-disabled", value );
|
524
|
+
|
525
|
+
this.element.prop( "disabled", value );
|
526
|
+
if ( value ) {
|
527
|
+
this.button.attr( "tabindex", -1 );
|
528
|
+
this.close();
|
529
|
+
} else {
|
530
|
+
this.button.attr( "tabindex", 0 );
|
531
|
+
}
|
532
|
+
}
|
533
|
+
|
534
|
+
if ( key === "width" ) {
|
535
|
+
this._resizeButton();
|
536
|
+
}
|
537
|
+
},
|
538
|
+
|
539
|
+
_appendTo: function() {
|
540
|
+
var element = this.options.appendTo;
|
541
|
+
|
542
|
+
if ( element ) {
|
543
|
+
element = element.jquery || element.nodeType ?
|
544
|
+
$( element ) :
|
545
|
+
this.document.find( element ).eq( 0 );
|
546
|
+
}
|
547
|
+
|
548
|
+
if ( !element || !element[ 0 ] ) {
|
549
|
+
element = this.element.closest( ".ui-front" );
|
550
|
+
}
|
551
|
+
|
552
|
+
if ( !element.length ) {
|
553
|
+
element = this.document[ 0 ].body;
|
554
|
+
}
|
555
|
+
|
556
|
+
return element;
|
557
|
+
},
|
558
|
+
|
559
|
+
_toggleAttr: function() {
|
560
|
+
this.button
|
561
|
+
.toggleClass( "ui-corner-top", this.isOpen )
|
562
|
+
.toggleClass( "ui-corner-all", !this.isOpen )
|
563
|
+
.attr( "aria-expanded", this.isOpen );
|
564
|
+
this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen );
|
565
|
+
this.menu.attr( "aria-hidden", !this.isOpen );
|
566
|
+
},
|
567
|
+
|
568
|
+
_resizeButton: function() {
|
569
|
+
var width = this.options.width;
|
570
|
+
|
571
|
+
if ( !width ) {
|
572
|
+
width = this.element.show().outerWidth();
|
573
|
+
this.element.hide();
|
574
|
+
}
|
575
|
+
|
576
|
+
this.button.outerWidth( width );
|
577
|
+
},
|
578
|
+
|
579
|
+
_resizeMenu: function() {
|
580
|
+
this.menu.outerWidth( Math.max(
|
581
|
+
this.button.outerWidth(),
|
582
|
+
|
583
|
+
// support: IE10
|
584
|
+
// IE10 wraps long text (possibly a rounding bug)
|
585
|
+
// so we add 1px to avoid the wrapping
|
586
|
+
this.menu.width( "" ).outerWidth() + 1
|
587
|
+
) );
|
588
|
+
},
|
589
|
+
|
590
|
+
_getCreateOptions: function() {
|
591
|
+
return { disabled: this.element.prop( "disabled" ) };
|
592
|
+
},
|
593
|
+
|
594
|
+
_parseOptions: function( options ) {
|
595
|
+
var data = [];
|
596
|
+
options.each(function( index, item ) {
|
597
|
+
var option = $( item ),
|
598
|
+
optgroup = option.parent( "optgroup" );
|
599
|
+
data.push({
|
600
|
+
element: option,
|
601
|
+
index: index,
|
602
|
+
value: option.val(),
|
603
|
+
label: option.text(),
|
604
|
+
optgroup: optgroup.attr( "label" ) || "",
|
605
|
+
disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
|
606
|
+
});
|
607
|
+
});
|
608
|
+
this.items = data;
|
609
|
+
},
|
610
|
+
|
611
|
+
_destroy: function() {
|
612
|
+
this.menuWrap.remove();
|
613
|
+
this.button.remove();
|
614
|
+
this.element.show();
|
615
|
+
this.element.removeUniqueId();
|
616
|
+
this.label.attr( "for", this.ids.element );
|
617
|
+
}
|
618
|
+
});
|
619
|
+
|
620
|
+
}));
|