jquery-ui-rails 4.0.0 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
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,31 +1,38 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
4
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/menu
|
4
|
+
//= require jquery-ui/position
|
5
5
|
|
6
6
|
/*!
|
7
|
-
* jQuery UI Autocomplete 1.
|
7
|
+
* jQuery UI Autocomplete 1.11.3
|
8
8
|
* http://jqueryui.com
|
9
9
|
*
|
10
|
-
* Copyright
|
10
|
+
* Copyright jQuery Foundation and other contributors
|
11
11
|
* Released under the MIT license.
|
12
12
|
* http://jquery.org/license
|
13
13
|
*
|
14
14
|
* http://api.jqueryui.com/autocomplete/
|
15
|
-
*
|
16
|
-
* Depends:
|
17
|
-
* jquery.ui.core.js
|
18
|
-
* jquery.ui.widget.js
|
19
|
-
* jquery.ui.position.js
|
20
|
-
* jquery.ui.menu.js
|
21
15
|
*/
|
22
|
-
(function(
|
23
|
-
|
24
|
-
|
25
|
-
|
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( $ ) {
|
26
33
|
|
27
34
|
$.widget( "ui.autocomplete", {
|
28
|
-
version: "1.
|
35
|
+
version: "1.11.3",
|
29
36
|
defaultElement: "<input>",
|
30
37
|
options: {
|
31
38
|
appendTo: null,
|
@@ -49,6 +56,7 @@ $.widget( "ui.autocomplete", {
|
|
49
56
|
select: null
|
50
57
|
},
|
51
58
|
|
59
|
+
requestIndex: 0,
|
52
60
|
pending: 0,
|
53
61
|
|
54
62
|
_create: function() {
|
@@ -59,10 +67,21 @@ $.widget( "ui.autocomplete", {
|
|
59
67
|
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
|
60
68
|
// events when we know the keydown event was used to modify the
|
61
69
|
// search term. #7799
|
62
|
-
var suppressKeyPress, suppressKeyPressRepeat, suppressInput
|
63
|
-
|
64
|
-
|
65
|
-
|
70
|
+
var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
|
71
|
+
nodeName = this.element[ 0 ].nodeName.toLowerCase(),
|
72
|
+
isTextarea = nodeName === "textarea",
|
73
|
+
isInput = nodeName === "input";
|
74
|
+
|
75
|
+
this.isMultiLine =
|
76
|
+
// Textareas are always multi-line
|
77
|
+
isTextarea ? true :
|
78
|
+
// Inputs are always single-line, even if inside a contentEditable element
|
79
|
+
// IE also treats inputs as contentEditable
|
80
|
+
isInput ? false :
|
81
|
+
// All other element types are determined by whether or not they're contentEditable
|
82
|
+
this.element.prop( "isContentEditable" );
|
83
|
+
|
84
|
+
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
|
66
85
|
this.isNewMenu = true;
|
67
86
|
|
68
87
|
this.element
|
@@ -71,7 +90,6 @@ $.widget( "ui.autocomplete", {
|
|
71
90
|
|
72
91
|
this._on( this.element, {
|
73
92
|
keydown: function( event ) {
|
74
|
-
/*jshint maxcomplexity:15*/
|
75
93
|
if ( this.element.prop( "readOnly" ) ) {
|
76
94
|
suppressKeyPress = true;
|
77
95
|
suppressInput = true;
|
@@ -83,7 +101,7 @@ $.widget( "ui.autocomplete", {
|
|
83
101
|
suppressInput = false;
|
84
102
|
suppressKeyPressRepeat = false;
|
85
103
|
var keyCode = $.ui.keyCode;
|
86
|
-
switch( event.keyCode ) {
|
104
|
+
switch ( event.keyCode ) {
|
87
105
|
case keyCode.PAGE_UP:
|
88
106
|
suppressKeyPress = true;
|
89
107
|
this._move( "previousPage", event );
|
@@ -101,7 +119,6 @@ $.widget( "ui.autocomplete", {
|
|
101
119
|
this._keyEvent( "next", event );
|
102
120
|
break;
|
103
121
|
case keyCode.ENTER:
|
104
|
-
case keyCode.NUMPAD_ENTER:
|
105
122
|
// when menu is open and has focus
|
106
123
|
if ( this.menu.active ) {
|
107
124
|
// #6055 - Opera still allows the keypress to occur
|
@@ -118,7 +135,9 @@ $.widget( "ui.autocomplete", {
|
|
118
135
|
break;
|
119
136
|
case keyCode.ESCAPE:
|
120
137
|
if ( this.menu.element.is( ":visible" ) ) {
|
121
|
-
|
138
|
+
if ( !this.isMultiLine ) {
|
139
|
+
this._value( this.term );
|
140
|
+
}
|
122
141
|
this.close( event );
|
123
142
|
// Different browsers have different default behavior for escape
|
124
143
|
// Single press can mean undo or clear
|
@@ -136,7 +155,9 @@ $.widget( "ui.autocomplete", {
|
|
136
155
|
keypress: function( event ) {
|
137
156
|
if ( suppressKeyPress ) {
|
138
157
|
suppressKeyPress = false;
|
139
|
-
|
158
|
+
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
|
159
|
+
event.preventDefault();
|
160
|
+
}
|
140
161
|
return;
|
141
162
|
}
|
142
163
|
if ( suppressKeyPressRepeat ) {
|
@@ -145,7 +166,7 @@ $.widget( "ui.autocomplete", {
|
|
145
166
|
|
146
167
|
// replicate some key handlers to allow them to repeat in Firefox and Opera
|
147
168
|
var keyCode = $.ui.keyCode;
|
148
|
-
switch( event.keyCode ) {
|
169
|
+
switch ( event.keyCode ) {
|
149
170
|
case keyCode.PAGE_UP:
|
150
171
|
this._move( "previousPage", event );
|
151
172
|
break;
|
@@ -186,17 +207,14 @@ $.widget( "ui.autocomplete", {
|
|
186
207
|
|
187
208
|
this._initSource();
|
188
209
|
this.menu = $( "<ul>" )
|
189
|
-
.addClass( "ui-autocomplete" )
|
210
|
+
.addClass( "ui-autocomplete ui-front" )
|
190
211
|
.appendTo( this._appendTo() )
|
191
212
|
.menu({
|
192
|
-
// custom key handling for now
|
193
|
-
input: $(),
|
194
213
|
// disable ARIA support, the live region takes care of that
|
195
214
|
role: null
|
196
215
|
})
|
197
|
-
.zIndex( this.element.zIndex() + 1 )
|
198
216
|
.hide()
|
199
|
-
.
|
217
|
+
.menu( "instance" );
|
200
218
|
|
201
219
|
this._on( this.menu.element, {
|
202
220
|
mousedown: function( event ) {
|
@@ -229,7 +247,9 @@ $.widget( "ui.autocomplete", {
|
|
229
247
|
}
|
230
248
|
},
|
231
249
|
menufocus: function( event, ui ) {
|
232
|
-
|
250
|
+
var label, item;
|
251
|
+
// support: Firefox
|
252
|
+
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
|
233
253
|
if ( this.isNewMenu ) {
|
234
254
|
this.isNewMenu = false;
|
235
255
|
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
|
@@ -243,19 +263,19 @@ $.widget( "ui.autocomplete", {
|
|
243
263
|
}
|
244
264
|
}
|
245
265
|
|
246
|
-
|
266
|
+
item = ui.item.data( "ui-autocomplete-item" );
|
247
267
|
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
|
248
268
|
// use value to match what will end up in the input, if it was a key event
|
249
269
|
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
|
250
270
|
this._value( item.value );
|
251
271
|
}
|
252
|
-
}
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
272
|
+
}
|
273
|
+
|
274
|
+
// Announce the value in the liveRegion
|
275
|
+
label = ui.item.attr( "aria-label" ) || item.value;
|
276
|
+
if ( label && $.trim( label ).length ) {
|
277
|
+
this.liveRegion.children().hide();
|
278
|
+
$( "<div>" ).text( label ).appendTo( this.liveRegion );
|
259
279
|
}
|
260
280
|
},
|
261
281
|
menuselect: function( event, ui ) {
|
@@ -263,7 +283,7 @@ $.widget( "ui.autocomplete", {
|
|
263
283
|
previous = this.previous;
|
264
284
|
|
265
285
|
// only trigger when focus was lost (click on menu)
|
266
|
-
if ( this.element[0] !== this.document[0].activeElement ) {
|
286
|
+
if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
|
267
287
|
this.element.focus();
|
268
288
|
this.previous = previous;
|
269
289
|
// #6109 - IE triggers two focus events and the second
|
@@ -289,10 +309,11 @@ $.widget( "ui.autocomplete", {
|
|
289
309
|
|
290
310
|
this.liveRegion = $( "<span>", {
|
291
311
|
role: "status",
|
292
|
-
"aria-live": "
|
312
|
+
"aria-live": "assertive",
|
313
|
+
"aria-relevant": "additions"
|
293
314
|
})
|
294
315
|
.addClass( "ui-helper-hidden-accessible" )
|
295
|
-
.
|
316
|
+
.appendTo( this.document[ 0 ].body );
|
296
317
|
|
297
318
|
// turning off autocomplete prevents the browser from remembering the
|
298
319
|
// value when navigating through history, so we re-enable autocomplete
|
@@ -335,35 +356,21 @@ $.widget( "ui.autocomplete", {
|
|
335
356
|
this.document.find( element ).eq( 0 );
|
336
357
|
}
|
337
358
|
|
338
|
-
if ( !element ) {
|
359
|
+
if ( !element || !element[ 0 ] ) {
|
339
360
|
element = this.element.closest( ".ui-front" );
|
340
361
|
}
|
341
362
|
|
342
363
|
if ( !element.length ) {
|
343
|
-
element = this.document[0].body;
|
364
|
+
element = this.document[ 0 ].body;
|
344
365
|
}
|
345
366
|
|
346
367
|
return element;
|
347
368
|
},
|
348
369
|
|
349
|
-
_isMultiLine: function() {
|
350
|
-
// Textareas are always multi-line
|
351
|
-
if ( this.element.is( "textarea" ) ) {
|
352
|
-
return true;
|
353
|
-
}
|
354
|
-
// Inputs are always single-line, even if inside a contentEditable element
|
355
|
-
// IE also treats inputs as contentEditable
|
356
|
-
if ( this.element.is( "input" ) ) {
|
357
|
-
return false;
|
358
|
-
}
|
359
|
-
// All other element types are determined by whether or not they're contentEditable
|
360
|
-
return this.element.prop( "isContentEditable" );
|
361
|
-
},
|
362
|
-
|
363
370
|
_initSource: function() {
|
364
371
|
var array, url,
|
365
372
|
that = this;
|
366
|
-
if ( $.isArray(this.options.source) ) {
|
373
|
+
if ( $.isArray( this.options.source ) ) {
|
367
374
|
array = this.options.source;
|
368
375
|
this.source = function( request, response ) {
|
369
376
|
response( $.ui.autocomplete.filter( array, request.term ) );
|
@@ -382,7 +389,7 @@ $.widget( "ui.autocomplete", {
|
|
382
389
|
response( data );
|
383
390
|
},
|
384
391
|
error: function() {
|
385
|
-
response(
|
392
|
+
response([]);
|
386
393
|
}
|
387
394
|
});
|
388
395
|
};
|
@@ -394,8 +401,13 @@ $.widget( "ui.autocomplete", {
|
|
394
401
|
_searchTimeout: function( event ) {
|
395
402
|
clearTimeout( this.searching );
|
396
403
|
this.searching = this._delay(function() {
|
397
|
-
|
398
|
-
if
|
404
|
+
|
405
|
+
// Search if the value has changed, or if the user retypes the same value (see #7434)
|
406
|
+
var equalValues = this.term === this._value(),
|
407
|
+
menuVisible = this.menu.element.is( ":visible" ),
|
408
|
+
modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
409
|
+
|
410
|
+
if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
|
399
411
|
this.selectedItem = null;
|
400
412
|
this.search( null, event );
|
401
413
|
}
|
@@ -428,19 +440,18 @@ $.widget( "ui.autocomplete", {
|
|
428
440
|
},
|
429
441
|
|
430
442
|
_response: function() {
|
431
|
-
var
|
432
|
-
index = ++requestIndex;
|
443
|
+
var index = ++this.requestIndex;
|
433
444
|
|
434
|
-
return function( content ) {
|
435
|
-
if ( index === requestIndex ) {
|
436
|
-
|
445
|
+
return $.proxy(function( content ) {
|
446
|
+
if ( index === this.requestIndex ) {
|
447
|
+
this.__response( content );
|
437
448
|
}
|
438
449
|
|
439
|
-
|
440
|
-
if ( !
|
441
|
-
|
450
|
+
this.pending--;
|
451
|
+
if ( !this.pending ) {
|
452
|
+
this.element.removeClass( "ui-autocomplete-loading" );
|
442
453
|
}
|
443
|
-
};
|
454
|
+
}, this );
|
444
455
|
},
|
445
456
|
|
446
457
|
__response: function( content ) {
|
@@ -479,7 +490,7 @@ $.widget( "ui.autocomplete", {
|
|
479
490
|
|
480
491
|
_normalize: function( items ) {
|
481
492
|
// assume all items have the right format when the first item is complete
|
482
|
-
if ( items.length && items[0].label && items[0].value ) {
|
493
|
+
if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
|
483
494
|
return items;
|
484
495
|
}
|
485
496
|
return $.map( items, function( item ) {
|
@@ -489,18 +500,17 @@ $.widget( "ui.autocomplete", {
|
|
489
500
|
value: item
|
490
501
|
};
|
491
502
|
}
|
492
|
-
return $.extend({
|
503
|
+
return $.extend( {}, item, {
|
493
504
|
label: item.label || item.value,
|
494
505
|
value: item.value || item.label
|
495
|
-
}
|
506
|
+
});
|
496
507
|
});
|
497
508
|
},
|
498
509
|
|
499
510
|
_suggest: function( items ) {
|
500
|
-
var ul = this.menu.element
|
501
|
-
.empty()
|
502
|
-
.zIndex( this.element.zIndex() + 1 );
|
511
|
+
var ul = this.menu.element.empty();
|
503
512
|
this._renderMenu( ul, items );
|
513
|
+
this.isNewMenu = true;
|
504
514
|
this.menu.refresh();
|
505
515
|
|
506
516
|
// size and position menu
|
@@ -508,7 +518,7 @@ $.widget( "ui.autocomplete", {
|
|
508
518
|
this._resizeMenu();
|
509
519
|
ul.position( $.extend({
|
510
520
|
of: this.element
|
511
|
-
}, this.options.position ));
|
521
|
+
}, this.options.position ) );
|
512
522
|
|
513
523
|
if ( this.options.autoFocus ) {
|
514
524
|
this.menu.next();
|
@@ -537,9 +547,7 @@ $.widget( "ui.autocomplete", {
|
|
537
547
|
},
|
538
548
|
|
539
549
|
_renderItem: function( ul, item ) {
|
540
|
-
return $( "<li>" )
|
541
|
-
.append( $( "<a>" ).text( item.label ) )
|
542
|
-
.appendTo( ul );
|
550
|
+
return $( "<li>" ).text( item.label ).appendTo( ul );
|
543
551
|
},
|
544
552
|
|
545
553
|
_move: function( direction, event ) {
|
@@ -549,7 +557,11 @@ $.widget( "ui.autocomplete", {
|
|
549
557
|
}
|
550
558
|
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
|
551
559
|
this.menu.isLastItem() && /^next/.test( direction ) ) {
|
552
|
-
|
560
|
+
|
561
|
+
if ( !this.isMultiLine ) {
|
562
|
+
this._value( this.term );
|
563
|
+
}
|
564
|
+
|
553
565
|
this.menu.blur();
|
554
566
|
return;
|
555
567
|
}
|
@@ -576,17 +588,16 @@ $.widget( "ui.autocomplete", {
|
|
576
588
|
|
577
589
|
$.extend( $.ui.autocomplete, {
|
578
590
|
escapeRegex: function( value ) {
|
579
|
-
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
591
|
+
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
|
580
592
|
},
|
581
|
-
filter: function(array, term) {
|
582
|
-
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
|
583
|
-
return $.grep( array, function(value) {
|
593
|
+
filter: function( array, term ) {
|
594
|
+
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
|
595
|
+
return $.grep( array, function( value ) {
|
584
596
|
return matcher.test( value.label || value.value || value );
|
585
597
|
});
|
586
598
|
}
|
587
599
|
});
|
588
600
|
|
589
|
-
|
590
601
|
// live region extension, adding a `messages` option
|
591
602
|
// NOTE: This is an experimental API. We are still investigating
|
592
603
|
// a full solution for string manipulation and internationalization.
|
@@ -612,8 +623,11 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
|
|
612
623
|
} else {
|
613
624
|
message = this.options.messages.noResults;
|
614
625
|
}
|
615
|
-
this.liveRegion.
|
626
|
+
this.liveRegion.children().hide();
|
627
|
+
$( "<div>" ).text( message ).appendTo( this.liveRegion );
|
616
628
|
}
|
617
629
|
});
|
618
630
|
|
619
|
-
|
631
|
+
return $.ui.autocomplete;
|
632
|
+
|
633
|
+
}));
|
data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js}
RENAMED
@@ -1,30 +1,39 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Button 1.
|
5
|
+
* jQuery UI Button 1.11.3
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
|
-
* Copyright
|
8
|
+
* Copyright jQuery Foundation and other contributors
|
9
9
|
* Released under the MIT license.
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
12
|
* http://api.jqueryui.com/button/
|
13
|
-
*
|
14
|
-
* Depends:
|
15
|
-
* jquery.ui.core.js
|
16
|
-
* jquery.ui.widget.js
|
17
13
|
*/
|
18
|
-
(function(
|
14
|
+
(function( factory ) {
|
15
|
+
if ( typeof define === "function" && define.amd ) {
|
16
|
+
|
17
|
+
// AMD. Register as an anonymous module.
|
18
|
+
define([
|
19
|
+
"jquery",
|
20
|
+
"./core",
|
21
|
+
"./widget"
|
22
|
+
], factory );
|
23
|
+
} else {
|
24
|
+
|
25
|
+
// Browser globals
|
26
|
+
factory( jQuery );
|
27
|
+
}
|
28
|
+
}(function( $ ) {
|
19
29
|
|
20
|
-
var lastActive,
|
30
|
+
var lastActive,
|
21
31
|
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
|
22
|
-
stateClasses = "ui-state-hover ui-state-active ",
|
23
32
|
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
|
24
33
|
formResetHandler = function() {
|
25
|
-
var
|
34
|
+
var form = $( this );
|
26
35
|
setTimeout(function() {
|
27
|
-
|
36
|
+
form.find( ":ui-button" ).button( "refresh" );
|
28
37
|
}, 1 );
|
29
38
|
},
|
30
39
|
radioGroup = function( radio ) {
|
@@ -34,9 +43,9 @@ var lastActive, startXPos, startYPos, clickDragged,
|
|
34
43
|
if ( name ) {
|
35
44
|
name = name.replace( /'/g, "\\'" );
|
36
45
|
if ( form ) {
|
37
|
-
radios = $( form ).find( "[name='" + name + "']" );
|
46
|
+
radios = $( form ).find( "[name='" + name + "'][type=radio]" );
|
38
47
|
} else {
|
39
|
-
radios = $( "[name='" + name + "']", radio.ownerDocument )
|
48
|
+
radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
|
40
49
|
.filter(function() {
|
41
50
|
return !this.form;
|
42
51
|
});
|
@@ -46,7 +55,7 @@ var lastActive, startXPos, startYPos, clickDragged,
|
|
46
55
|
};
|
47
56
|
|
48
57
|
$.widget( "ui.button", {
|
49
|
-
version: "1.
|
58
|
+
version: "1.11.3",
|
50
59
|
defaultElement: "<button>",
|
51
60
|
options: {
|
52
61
|
disabled: null,
|
@@ -74,8 +83,7 @@ $.widget( "ui.button", {
|
|
74
83
|
var that = this,
|
75
84
|
options = this.options,
|
76
85
|
toggleButton = this.type === "checkbox" || this.type === "radio",
|
77
|
-
activeClass = !toggleButton ? "ui-state-active" : ""
|
78
|
-
focusClass = "ui-state-focus";
|
86
|
+
activeClass = !toggleButton ? "ui-state-active" : "";
|
79
87
|
|
80
88
|
if ( options.label === null ) {
|
81
89
|
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
|
@@ -107,53 +115,32 @@ $.widget( "ui.button", {
|
|
107
115
|
}
|
108
116
|
});
|
109
117
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
+
// Can't use _focusable() because the element that receives focus
|
119
|
+
// and the element that gets the ui-state-focus class are different
|
120
|
+
this._on({
|
121
|
+
focus: function() {
|
122
|
+
this.buttonElement.addClass( "ui-state-focus" );
|
123
|
+
},
|
124
|
+
blur: function() {
|
125
|
+
this.buttonElement.removeClass( "ui-state-focus" );
|
126
|
+
}
|
127
|
+
});
|
118
128
|
|
119
129
|
if ( toggleButton ) {
|
120
130
|
this.element.bind( "change" + this.eventNamespace, function() {
|
121
|
-
if ( clickDragged ) {
|
122
|
-
return;
|
123
|
-
}
|
124
131
|
that.refresh();
|
125
132
|
});
|
126
|
-
// if mouse moves between mousedown and mouseup (drag) set clickDragged flag
|
127
|
-
// prevents issue where button state changes but checkbox/radio checked state
|
128
|
-
// does not in Firefox (see ticket #6970)
|
129
|
-
this.buttonElement
|
130
|
-
.bind( "mousedown" + this.eventNamespace, function( event ) {
|
131
|
-
if ( options.disabled ) {
|
132
|
-
return;
|
133
|
-
}
|
134
|
-
clickDragged = false;
|
135
|
-
startXPos = event.pageX;
|
136
|
-
startYPos = event.pageY;
|
137
|
-
})
|
138
|
-
.bind( "mouseup" + this.eventNamespace, function( event ) {
|
139
|
-
if ( options.disabled ) {
|
140
|
-
return;
|
141
|
-
}
|
142
|
-
if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
|
143
|
-
clickDragged = true;
|
144
|
-
}
|
145
|
-
});
|
146
133
|
}
|
147
134
|
|
148
135
|
if ( this.type === "checkbox" ) {
|
149
136
|
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
150
|
-
if ( options.disabled
|
137
|
+
if ( options.disabled ) {
|
151
138
|
return false;
|
152
139
|
}
|
153
140
|
});
|
154
141
|
} else if ( this.type === "radio" ) {
|
155
142
|
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
156
|
-
if ( options.disabled
|
143
|
+
if ( options.disabled ) {
|
157
144
|
return false;
|
158
145
|
}
|
159
146
|
$( this ).addClass( "ui-state-active" );
|
@@ -210,9 +197,6 @@ $.widget( "ui.button", {
|
|
210
197
|
}
|
211
198
|
}
|
212
199
|
|
213
|
-
// TODO: pull out $.Widget's handling for the disabled option into
|
214
|
-
// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
|
215
|
-
// be overridden by individual plugins
|
216
200
|
this._setOption( "disabled", options.disabled );
|
217
201
|
this._resetButton();
|
218
202
|
},
|
@@ -263,7 +247,7 @@ $.widget( "ui.button", {
|
|
263
247
|
this.element
|
264
248
|
.removeClass( "ui-helper-hidden-accessible" );
|
265
249
|
this.buttonElement
|
266
|
-
.removeClass( baseClasses + "
|
250
|
+
.removeClass( baseClasses + " ui-state-active " + typeClasses )
|
267
251
|
.removeAttr( "role" )
|
268
252
|
.removeAttr( "aria-pressed" )
|
269
253
|
.html( this.buttonElement.find(".ui-button-text").html() );
|
@@ -276,10 +260,14 @@ $.widget( "ui.button", {
|
|
276
260
|
_setOption: function( key, value ) {
|
277
261
|
this._super( key, value );
|
278
262
|
if ( key === "disabled" ) {
|
263
|
+
this.widget().toggleClass( "ui-state-disabled", !!value );
|
264
|
+
this.element.prop( "disabled", !!value );
|
279
265
|
if ( value ) {
|
280
|
-
this.
|
281
|
-
|
282
|
-
|
266
|
+
if ( this.type === "checkbox" || this.type === "radio" ) {
|
267
|
+
this.buttonElement.removeClass( "ui-state-focus" );
|
268
|
+
} else {
|
269
|
+
this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
|
270
|
+
}
|
283
271
|
}
|
284
272
|
return;
|
285
273
|
}
|
@@ -363,7 +351,7 @@ $.widget( "ui.button", {
|
|
363
351
|
});
|
364
352
|
|
365
353
|
$.widget( "ui.buttonset", {
|
366
|
-
version: "1.
|
354
|
+
version: "1.11.3",
|
367
355
|
options: {
|
368
356
|
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
|
369
357
|
},
|
@@ -385,15 +373,17 @@ $.widget( "ui.buttonset", {
|
|
385
373
|
},
|
386
374
|
|
387
375
|
refresh: function() {
|
388
|
-
var rtl = this.element.css( "direction" ) === "rtl"
|
376
|
+
var rtl = this.element.css( "direction" ) === "rtl",
|
377
|
+
allButtons = this.element.find( this.options.items ),
|
378
|
+
existingButtons = allButtons.filter( ":ui-button" );
|
389
379
|
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
380
|
+
// Initialize new buttons
|
381
|
+
allButtons.not( ":ui-button" ).button();
|
382
|
+
|
383
|
+
// Refresh existing buttons
|
384
|
+
existingButtons.button( "refresh" );
|
385
|
+
|
386
|
+
this.buttons = allButtons
|
397
387
|
.map(function() {
|
398
388
|
return $( this ).button( "widget" )[ 0 ];
|
399
389
|
})
|
@@ -419,4 +409,6 @@ $.widget( "ui.buttonset", {
|
|
419
409
|
}
|
420
410
|
});
|
421
411
|
|
422
|
-
|
412
|
+
return $.ui.button;
|
413
|
+
|
414
|
+
}));
|