jquery-ui-rails 4.2.1 → 5.0.0
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/History.md +6 -0
- data/README.md +69 -73
- data/Rakefile +28 -24
- data/VERSIONS.md +1 -0
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/app/assets/javascripts/{jquery.ui.accordion.js → jquery-ui/accordion.js} +62 -57
- data/app/assets/javascripts/{jquery.ui.autocomplete.js → jquery-ui/autocomplete.js} +70 -50
- data/app/assets/javascripts/{jquery.ui.button.js → jquery-ui/button.js} +41 -25
- data/app/assets/javascripts/{jquery.ui.core.js → jquery-ui/core.js} +106 -123
- 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 +37 -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/app/assets/javascripts/{jquery.ui.datepicker.js → jquery-ui/datepicker.js} +72 -37
- data/app/assets/javascripts/{jquery.ui.dialog.js → jquery-ui/dialog.js} +215 -180
- data/app/assets/javascripts/{jquery.ui.draggable.js → jquery-ui/draggable.js} +219 -161
- data/app/assets/javascripts/jquery-ui/droppable.js +421 -0
- data/app/assets/javascripts/{jquery.ui.effect-blind.js → jquery-ui/effect-blind.js} +20 -12
- data/app/assets/javascripts/{jquery.ui.effect-bounce.js → jquery-ui/effect-bounce.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-clip.js → jquery-ui/effect-clip.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-drop.js → jquery-ui/effect-drop.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-explode.js → jquery-ui/effect-explode.js} +20 -10
- data/app/assets/javascripts/{jquery.ui.effect-fade.js → jquery-ui/effect-fade.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-fold.js → jquery-ui/effect-fold.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-highlight.js → jquery-ui/effect-highlight.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/app/assets/javascripts/{jquery.ui.effect-pulsate.js → jquery-ui/effect-pulsate.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/app/assets/javascripts/{jquery.ui.effect-shake.js → jquery-ui/effect-shake.js} +19 -9
- data/app/assets/javascripts/{jquery.ui.effect-scale.js → jquery-ui/effect-size.js} +19 -104
- data/app/assets/javascripts/{jquery.ui.effect-slide.js → jquery-ui/effect-slide.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-transfer.js → jquery-ui/effect-transfer.js} +22 -12
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/app/assets/javascripts/{jquery.ui.effect.js → jquery-ui/effect.js} +28 -20
- data/app/assets/javascripts/{jquery.ui.menu.js → jquery-ui/menu.js} +93 -80
- data/app/assets/javascripts/{jquery.ui.mouse.js → jquery-ui/mouse.js} +41 -23
- data/app/assets/javascripts/{jquery.ui.position.js → jquery-ui/position.js} +25 -12
- data/app/assets/javascripts/{jquery.ui.progressbar.js → jquery-ui/progressbar.js} +26 -12
- data/app/assets/javascripts/{jquery.ui.resizable.js → jquery-ui/resizable.js} +196 -146
- data/app/assets/javascripts/{jquery.ui.selectable.js → jquery-ui/selectable.js} +25 -15
- data/app/assets/javascripts/jquery-ui/selectmenu.js +560 -0
- data/app/assets/javascripts/{jquery.ui.slider.js → jquery-ui/slider.js} +43 -31
- data/app/assets/javascripts/{jquery.ui.sortable.js → jquery-ui/sortable.js} +71 -50
- data/app/assets/javascripts/{jquery.ui.spinner.js → jquery-ui/spinner.js} +46 -29
- data/app/assets/javascripts/{jquery.ui.tabs.js → jquery-ui/tabs.js} +69 -52
- data/app/assets/javascripts/{jquery.ui.tooltip.js → jquery-ui/tooltip.js} +97 -55
- data/app/assets/javascripts/{jquery.ui.widget.js → jquery-ui/widget.js} +52 -30
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/app/assets/stylesheets/{jquery.ui.accordion.css.erb → jquery-ui/accordion.css.erb} +5 -7
- data/app/assets/stylesheets/{jquery.ui.all.css.erb → jquery-ui/all.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.autocomplete.css.erb → jquery-ui/autocomplete.css.erb} +4 -4
- data/app/assets/stylesheets/jquery-ui/base.css.erb +30 -0
- data/app/assets/stylesheets/{jquery.ui.button.css.erb → jquery-ui/button.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.core.css.erb → jquery-ui/core.css.erb} +4 -1
- data/app/assets/stylesheets/{jquery.ui.datepicker.css.erb → jquery-ui/datepicker.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.dialog.css.erb → jquery-ui/dialog.css.erb} +6 -5
- data/app/assets/stylesheets/jquery-ui/draggable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.menu.css.erb → jquery-ui/menu.css.erb} +18 -34
- data/app/assets/stylesheets/{jquery.ui.progressbar.css.erb → jquery-ui/progressbar.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.resizable.css.erb → jquery-ui/resizable.css.erb} +5 -3
- data/app/assets/stylesheets/{jquery.ui.selectable.css.erb → jquery-ui/selectable.css.erb} +7 -3
- data/app/assets/stylesheets/jquery-ui/selectmenu.css.erb +64 -0
- data/app/assets/stylesheets/{jquery.ui.slider.css.erb → jquery-ui/slider.css.erb} +5 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.spinner.css.erb → jquery-ui/spinner.css.erb} +4 -4
- data/app/assets/stylesheets/{jquery.ui.tabs.css.erb → jquery-ui/tabs.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.theme.css.erb → jquery-ui/theme.css.erb} +1 -4
- data/app/assets/stylesheets/{jquery.ui.tooltip.css.erb → jquery-ui/tooltip.css.erb} +3 -3
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +137 -129
- data/app/assets/javascripts/jquery.ui.all.js +0 -34
- data/app/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/app/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/app/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/app/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/app/assets/javascripts/jquery.ui.droppable.js +0 -394
- data/app/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/app/assets/stylesheets/jquery.ui.base.css.erb +0 -27
data/History.md
CHANGED
data/README.md
CHANGED
@@ -16,9 +16,10 @@ Also check out the
|
|
16
16
|
[jquery-ui-sass-rails](https://github.com/jhilden/jquery-ui-sass-rails) gem,
|
17
17
|
which allows you to override theme variables with Sass.
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
Warning: This gem is incompatible with the `jquery-rails` gem before version
|
20
|
+
3.0.0! Strange things will happen if you use an earlier `jquery-rails`
|
21
|
+
version. Run `bundle list` to ensure that you either aren't using
|
22
|
+
`jquery-rails`, or at least version 3.0.0 of `jquery-rails`.
|
22
23
|
|
23
24
|
## Usage
|
24
25
|
|
@@ -33,14 +34,14 @@ gem 'jquery-ui-rails'
|
|
33
34
|
To require all jQuery UI modules, add the following to your application.js:
|
34
35
|
|
35
36
|
```javascript
|
36
|
-
//= require jquery
|
37
|
+
//= require jquery-ui
|
37
38
|
```
|
38
39
|
|
39
40
|
Also add the jQuery UI CSS to your application.css:
|
40
41
|
|
41
42
|
```css
|
42
43
|
/*
|
43
|
-
*= require jquery
|
44
|
+
*= require jquery-ui
|
44
45
|
*/
|
45
46
|
```
|
46
47
|
|
@@ -65,14 +66,14 @@ For example, if you only need the datepicker module, add this to your
|
|
65
66
|
application.js:
|
66
67
|
|
67
68
|
```javascript
|
68
|
-
//= require jquery
|
69
|
+
//= require jquery-ui/datepicker
|
69
70
|
```
|
70
71
|
|
71
72
|
In your application.css, require the corresponding CSS module:
|
72
73
|
|
73
74
|
```css
|
74
75
|
/*
|
75
|
-
*= require jquery
|
76
|
+
*= require jquery-ui/datepicker
|
76
77
|
*/
|
77
78
|
```
|
78
79
|
|
@@ -81,10 +82,10 @@ In your application.css, require the corresponding CSS module:
|
|
81
82
|
### UI Core
|
82
83
|
|
83
84
|
```javascript
|
84
|
-
//= require jquery
|
85
|
-
//= require jquery
|
86
|
-
//= require jquery
|
87
|
-
//= require jquery
|
85
|
+
//= require jquery-ui/core
|
86
|
+
//= require jquery-ui/widget
|
87
|
+
//= require jquery-ui/mouse
|
88
|
+
//= require jquery-ui/position
|
88
89
|
```
|
89
90
|
|
90
91
|
You usually do not need to require these directly, as they are pulled in by the
|
@@ -93,30 +94,31 @@ other JavaScript modules as needed.
|
|
93
94
|
### Interactions
|
94
95
|
|
95
96
|
```javascript
|
96
|
-
//= require jquery
|
97
|
-
//= require jquery
|
98
|
-
//= require jquery
|
99
|
-
//= require jquery
|
100
|
-
//= require jquery
|
97
|
+
//= require jquery-ui/draggable
|
98
|
+
//= require jquery-ui/droppable
|
99
|
+
//= require jquery-ui/resizable
|
100
|
+
//= require jquery-ui/selectable
|
101
|
+
//= require jquery-ui/sortable
|
101
102
|
```
|
102
103
|
|
103
|
-
For
|
104
|
-
|
104
|
+
For all but `jquery-ui/droppable`, remember to `require` their matching CSS
|
105
|
+
files in your application.css as well.
|
105
106
|
|
106
107
|
### Widgets
|
107
108
|
|
108
109
|
```javascript
|
109
|
-
//= require jquery
|
110
|
-
//= require jquery
|
111
|
-
//= require jquery
|
112
|
-
//= require jquery
|
113
|
-
//= require jquery
|
114
|
-
//= require jquery
|
115
|
-
//= require jquery
|
116
|
-
//= require jquery
|
117
|
-
//= require jquery
|
118
|
-
//= require jquery
|
119
|
-
//= require jquery
|
110
|
+
//= require jquery-ui/accordion
|
111
|
+
//= require jquery-ui/autocomplete
|
112
|
+
//= require jquery-ui/button
|
113
|
+
//= require jquery-ui/datepicker
|
114
|
+
//= require jquery-ui/dialog
|
115
|
+
//= require jquery-ui/menu
|
116
|
+
//= require jquery-ui/progressbar
|
117
|
+
//= require jquery-ui/selectmenu
|
118
|
+
//= require jquery-ui/slider
|
119
|
+
//= require jquery-ui/spinner
|
120
|
+
//= require jquery-ui/tabs
|
121
|
+
//= require jquery-ui/tooltip
|
120
122
|
```
|
121
123
|
|
122
124
|
For all of these, remember to `require` their matching CSS files in your
|
@@ -125,13 +127,13 @@ application.css as well.
|
|
125
127
|
#### I18n
|
126
128
|
|
127
129
|
Datepicker has optional i18n modules for non-US locales, named
|
128
|
-
`jquery
|
130
|
+
`jquery-ui/datepicker-xx[-YY]`
|
129
131
|
([list](https://github.com/joliss/jquery-ui-rails/tree/master/app/assets/javascripts)),
|
130
132
|
for example:
|
131
133
|
|
132
134
|
```javascript
|
133
|
-
//= require jquery
|
134
|
-
//= require jquery
|
135
|
+
//= require jquery-ui/datepicker
|
136
|
+
//= require jquery-ui/datepicker-pt-BR
|
135
137
|
```
|
136
138
|
|
137
139
|
Note that you still need to include the main datepicker module. It is not
|
@@ -141,21 +143,23 @@ reasons](https://github.com/joliss/jquery-ui-rails/issues/9#issuecomment-6524987
|
|
141
143
|
### Effects
|
142
144
|
|
143
145
|
```javascript
|
144
|
-
//= require jquery
|
145
|
-
//= require jquery
|
146
|
-
//= require jquery
|
147
|
-
//= require jquery
|
148
|
-
//= require jquery
|
149
|
-
//= require jquery
|
150
|
-
//= require jquery
|
151
|
-
//= require jquery
|
152
|
-
//= require jquery
|
153
|
-
//= require jquery
|
154
|
-
//= require jquery
|
155
|
-
//= require jquery
|
156
|
-
//= require jquery
|
157
|
-
//= require jquery
|
158
|
-
//= require jquery
|
146
|
+
//= require jquery-ui/effect.all
|
147
|
+
//= require jquery-ui/effect
|
148
|
+
//= require jquery-ui/effect-blind
|
149
|
+
//= require jquery-ui/effect-bounce
|
150
|
+
//= require jquery-ui/effect-clip
|
151
|
+
//= require jquery-ui/effect-drop
|
152
|
+
//= require jquery-ui/effect-explode
|
153
|
+
//= require jquery-ui/effect-fade
|
154
|
+
//= require jquery-ui/effect-fold
|
155
|
+
//= require jquery-ui/effect-highlight
|
156
|
+
//= require jquery-ui/effect-puff
|
157
|
+
//= require jquery-ui/effect-pulsate
|
158
|
+
//= require jquery-ui/effect-scale
|
159
|
+
//= require jquery-ui/effect-shake
|
160
|
+
//= require jquery-ui/effect-size
|
161
|
+
//= require jquery-ui/effect-slide
|
162
|
+
//= require jquery-ui/effect-transfer
|
159
163
|
```
|
160
164
|
|
161
165
|
## Stylesheet Assets
|
@@ -164,8 +168,8 @@ reasons](https://github.com/joliss/jquery-ui-rails/issues/9#issuecomment-6524987
|
|
164
168
|
|
165
169
|
```css
|
166
170
|
/*
|
167
|
-
*= require jquery
|
168
|
-
*= require jquery
|
171
|
+
*= require jquery-ui/core
|
172
|
+
*= require jquery-ui/theme
|
169
173
|
*/
|
170
174
|
```
|
171
175
|
|
@@ -177,8 +181,10 @@ pulled in as dependencies.
|
|
177
181
|
|
178
182
|
```css
|
179
183
|
/*
|
180
|
-
*= require jquery
|
181
|
-
*= require jquery
|
184
|
+
*= require jquery-ui/draggable
|
185
|
+
*= require jquery-ui/resizable
|
186
|
+
*= require jquery-ui/selectable
|
187
|
+
*= require jquery-ui/sortable
|
182
188
|
*/
|
183
189
|
```
|
184
190
|
|
@@ -186,17 +192,18 @@ pulled in as dependencies.
|
|
186
192
|
|
187
193
|
```css
|
188
194
|
/*
|
189
|
-
*= require jquery
|
190
|
-
*= require jquery
|
191
|
-
*= require jquery
|
192
|
-
*= require jquery
|
193
|
-
*= require jquery
|
194
|
-
*= require jquery
|
195
|
-
*= require jquery
|
196
|
-
*= require jquery
|
197
|
-
*= require jquery
|
198
|
-
*= require jquery
|
199
|
-
*= require jquery
|
195
|
+
*= require jquery-ui/accordion
|
196
|
+
*= require jquery-ui/autocomplete
|
197
|
+
*= require jquery-ui/button
|
198
|
+
*= require jquery-ui/datepicker
|
199
|
+
*= require jquery-ui/dialog
|
200
|
+
*= require jquery-ui/menu
|
201
|
+
*= require jquery-ui/progressbar
|
202
|
+
*= require jquery-ui/selectmenu
|
203
|
+
*= require jquery-ui/slider
|
204
|
+
*= require jquery-ui/spinner
|
205
|
+
*= require jquery-ui/tabs
|
206
|
+
*= require jquery-ui/tooltip
|
200
207
|
*/
|
201
208
|
```
|
202
209
|
|
@@ -281,14 +288,3 @@ Now point your browser at [http://localhost:3000/](http://localhost:3000/).
|
|
281
288
|
(This is arguably cumbersome, not officially supported by this gem, and
|
282
289
|
adds 1 KB overhead as both the base theme and the custom theme are served
|
283
290
|
up.)
|
284
|
-
|
285
|
-
* The `jquery.ui.all.js` file is named `jquery-ui.js` in the official
|
286
|
-
distribution. We should follow their naming. But jquery-rails provides a
|
287
|
-
`jquery-ui.js` asset as well, so until that is removed from the
|
288
|
-
jquery-rails gem (see issue
|
289
|
-
[#46](https://github.com/rails/jquery-rails/issues/46)), we cannot
|
290
|
-
distribute `jquery-ui.js` without risking conflicts.
|
291
|
-
|
292
|
-
To reduce confusion, as long as there is no `jquery-ui.js`, we also do not
|
293
|
-
distribute the official `jquery-ui-i18n.js` and `jquery-ui.css`. The latter
|
294
|
-
is available as `jquery.ui.all.css` however.
|
data/Rakefile
CHANGED
@@ -3,9 +3,9 @@ require 'json'
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
|
5
5
|
# returns the source filename for a given JSON build file
|
6
|
-
# (e.g., "ui.core.jquery.json" returns "
|
6
|
+
# (e.g., "ui.core.jquery.json" returns "core.js")
|
7
7
|
def source_file_for_build_file(build_file)
|
8
|
-
"
|
8
|
+
"#{build_file.sub('ui.', '').sub('.jquery.json', '')}.js"
|
9
9
|
end
|
10
10
|
|
11
11
|
# returns the source filename for a named file in the 'dependencies'
|
@@ -27,7 +27,7 @@ def source_file_for_dependency_entry(dep_entry)
|
|
27
27
|
return "jquery.js" if dep_entry == 'jquery'
|
28
28
|
|
29
29
|
# otherwise, tack 'jquery.' on the front
|
30
|
-
"
|
30
|
+
"#{dep_entry.sub 'ui.', ''}.js"
|
31
31
|
end
|
32
32
|
|
33
33
|
# return a Hash of dependency info, whose keys are jquery-ui
|
@@ -52,7 +52,9 @@ def map_dependencies
|
|
52
52
|
dependencies
|
53
53
|
end
|
54
54
|
|
55
|
-
|
55
|
+
def dependency_hash
|
56
|
+
@dependency_hash ||= map_dependencies
|
57
|
+
end
|
56
58
|
|
57
59
|
def version
|
58
60
|
JSON.load(File.read('jquery-ui/package.json'))['version']
|
@@ -63,7 +65,7 @@ task :submodule do
|
|
63
65
|
end
|
64
66
|
|
65
67
|
def get_js_dependencies(basename)
|
66
|
-
dependencies =
|
68
|
+
dependencies = dependency_hash[basename]
|
67
69
|
if dependencies.nil?
|
68
70
|
puts "Warning: No dependencies found for #{basename}"
|
69
71
|
dependencies = []
|
@@ -105,14 +107,15 @@ task :javascripts => :submodule do
|
|
105
107
|
Rake.rake_output_message 'Generating javascripts'
|
106
108
|
|
107
109
|
target_dir = "app/assets/javascripts"
|
108
|
-
|
110
|
+
target_ui_dir = "#{target_dir}/jquery-ui"
|
111
|
+
mkdir_p target_ui_dir
|
109
112
|
|
110
113
|
Dir.glob("jquery-ui/ui/*.js").each do |path|
|
111
114
|
basename = File.basename(path)
|
112
115
|
dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
|
113
|
-
File.open("#{
|
116
|
+
File.open("#{target_ui_dir}/#{basename}", "w") do |out|
|
114
117
|
dep_modules.each do |mod|
|
115
|
-
out.write("//= require
|
118
|
+
out.write("//= require jquery-ui/#{mod}\n")
|
116
119
|
end
|
117
120
|
out.write("\n") unless dep_modules.empty?
|
118
121
|
source_code = File.read(path)
|
@@ -126,7 +129,7 @@ task :javascripts => :submodule do
|
|
126
129
|
# https://github.com/joliss/jquery-ui-rails/issues/9
|
127
130
|
Dir.glob("jquery-ui/ui/i18n/*.js").each do |path|
|
128
131
|
basename = File.basename(path)
|
129
|
-
File.open("#{
|
132
|
+
File.open("#{target_ui_dir}/#{basename}", "w") do |out|
|
130
133
|
source_code = File.read(path)
|
131
134
|
source_code.gsub!('@VERSION', version)
|
132
135
|
protect_copyright_notice(source_code)
|
@@ -134,16 +137,16 @@ task :javascripts => :submodule do
|
|
134
137
|
end
|
135
138
|
end
|
136
139
|
|
137
|
-
File.open("#{
|
138
|
-
Dir.glob("jquery-ui/ui/
|
140
|
+
File.open("#{target_ui_dir}/effect.all.js", "w") do |out|
|
141
|
+
Dir.glob("jquery-ui/ui/effect*.js").sort.each do |path|
|
139
142
|
asset_name = remove_js_extension(File.basename(path))
|
140
|
-
out.write("//= require
|
143
|
+
out.write("//= require jquery-ui/#{asset_name}\n")
|
141
144
|
end
|
142
145
|
end
|
143
|
-
File.open("#{target_dir}/jquery
|
146
|
+
File.open("#{target_dir}/jquery-ui.js", "w") do |out|
|
144
147
|
Dir.glob("jquery-ui/ui/*.js").sort.each do |path|
|
145
148
|
asset_name = remove_js_extension(File.basename(path))
|
146
|
-
out.write("//= require
|
149
|
+
out.write("//= require jquery-ui/#{asset_name}\n")
|
147
150
|
end
|
148
151
|
end
|
149
152
|
end
|
@@ -153,7 +156,12 @@ task :stylesheets => :submodule do
|
|
153
156
|
Rake.rake_output_message 'Generating stylesheets'
|
154
157
|
|
155
158
|
target_dir = "app/assets/stylesheets"
|
156
|
-
|
159
|
+
target_ui_dir = "#{target_dir}/jquery-ui"
|
160
|
+
mkdir_p target_ui_dir
|
161
|
+
|
162
|
+
File.open("#{target_dir}/jquery-ui.css", "w") do |out|
|
163
|
+
out.write("//= require jquery-ui/all\n")
|
164
|
+
end
|
157
165
|
|
158
166
|
css_dir = "jquery-ui/themes/base"
|
159
167
|
Dir.glob("#{css_dir}/*.css").each do |path|
|
@@ -164,35 +172,31 @@ task :stylesheets => :submodule do
|
|
164
172
|
extra_dependencies = []
|
165
173
|
# Is "theme" listed among the dependencies for the matching JS file?
|
166
174
|
unless basename =~ /\.(all|base|core)\./
|
167
|
-
dependencies =
|
168
|
-
if dependencies.nil?
|
169
|
-
puts "Warning: No matching JavaScript dependencies found for #{basename}"
|
170
|
-
extra_dependencies << 'jquery.ui.core'
|
171
|
-
else
|
175
|
+
if dependencies = dependency_hash[basename.sub(/\.css/, '.js')]
|
172
176
|
dependencies.each do |dependency|
|
173
177
|
dependency = dependency.sub(/\.js$/, '')
|
174
178
|
dependent_stylesheet = "#{dependency}.css"
|
175
179
|
extra_dependencies << dependency if File.exists?("#{css_dir}/#{dependent_stylesheet}")
|
176
180
|
end
|
177
|
-
extra_dependencies << '
|
181
|
+
extra_dependencies << 'theme'
|
178
182
|
end
|
179
183
|
end
|
180
184
|
extra_dependencies.reverse.each do |dep|
|
181
185
|
# Add after first comment block
|
182
|
-
source_code = source_code.sub(/\A((.*?\*\/\n)?)/m, "\\1/*\n *= require
|
186
|
+
source_code = source_code.sub(/\A((.*?\*\/\n)?)/m, "\\1/*\n *= require jquery-ui/#{dep}\n */\n")
|
183
187
|
end
|
184
188
|
# Use "require" instead of @import
|
185
189
|
source_code.gsub!(/^@import (.*)$/) { |s|
|
186
190
|
m = s.match(/^@import (url\()?"(?<module>[-_.a-zA-Z]+)\.css"\)?;/) \
|
187
191
|
or fail "Cannot parse import: #{s}"
|
188
|
-
"/*\n *= require
|
192
|
+
"/*\n *= require jquery-ui/#{m['module']}\n */"
|
189
193
|
}
|
190
194
|
# Be cute: collapse multiple require comment blocks into one
|
191
195
|
source_code.gsub!(/^( \*= require .*)\n \*\/(\n+)\/\*\n(?= \*= require )/, '\1\2')
|
192
196
|
source_code.gsub!(/\A(\/\*!.+?\*\/\s)/m, "\\1\n/*\n#{build_image_dependencies(source_code)} */\n\n") unless build_image_dependencies(source_code).empty?
|
193
197
|
# Replace hard-coded image URLs with asset path helpers
|
194
198
|
source_code.gsub!(/url\("?images\/([-_.a-zA-Z0-9]+)"?\)/, 'url(<%= image_path("jquery-ui/\1") %>)')
|
195
|
-
File.open("#{
|
199
|
+
File.open("#{target_ui_dir}/#{basename}.erb", "w") do |out|
|
196
200
|
out.write(source_code)
|
197
201
|
end
|
198
202
|
end
|
data/VERSIONS.md
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
//= require jquery-ui/accordion
|
2
|
+
//= require jquery-ui/autocomplete
|
3
|
+
//= require jquery-ui/button
|
4
|
+
//= require jquery-ui/core
|
5
|
+
//= require jquery-ui/datepicker
|
6
|
+
//= require jquery-ui/dialog
|
7
|
+
//= require jquery-ui/draggable
|
8
|
+
//= require jquery-ui/droppable
|
9
|
+
//= require jquery-ui/effect-blind
|
10
|
+
//= require jquery-ui/effect-bounce
|
11
|
+
//= require jquery-ui/effect-clip
|
12
|
+
//= require jquery-ui/effect-drop
|
13
|
+
//= require jquery-ui/effect-explode
|
14
|
+
//= require jquery-ui/effect-fade
|
15
|
+
//= require jquery-ui/effect-fold
|
16
|
+
//= require jquery-ui/effect-highlight
|
17
|
+
//= require jquery-ui/effect-puff
|
18
|
+
//= require jquery-ui/effect-pulsate
|
19
|
+
//= require jquery-ui/effect-scale
|
20
|
+
//= require jquery-ui/effect-shake
|
21
|
+
//= require jquery-ui/effect-size
|
22
|
+
//= require jquery-ui/effect-slide
|
23
|
+
//= require jquery-ui/effect-transfer
|
24
|
+
//= require jquery-ui/effect
|
25
|
+
//= require jquery-ui/menu
|
26
|
+
//= require jquery-ui/mouse
|
27
|
+
//= require jquery-ui/position
|
28
|
+
//= require jquery-ui/progressbar
|
29
|
+
//= require jquery-ui/resizable
|
30
|
+
//= require jquery-ui/selectable
|
31
|
+
//= require jquery-ui/selectmenu
|
32
|
+
//= require jquery-ui/slider
|
33
|
+
//= require jquery-ui/sortable
|
34
|
+
//= require jquery-ui/spinner
|
35
|
+
//= require jquery-ui/tabs
|
36
|
+
//= require jquery-ui/tooltip
|
37
|
+
//= require jquery-ui/widget
|
@@ -1,8 +1,8 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Accordion 1.
|
5
|
+
* jQuery UI Accordion 1.11.0
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -10,24 +10,25 @@
|
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
12
|
* http://api.jqueryui.com/accordion/
|
13
|
-
*
|
14
|
-
* Depends:
|
15
|
-
* jquery.ui.core.js
|
16
|
-
* jquery.ui.widget.js
|
17
13
|
*/
|
18
|
-
(function(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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( $ ) {
|
28
29
|
|
29
|
-
$.widget( "ui.accordion", {
|
30
|
-
version: "1.
|
30
|
+
return $.widget( "ui.accordion", {
|
31
|
+
version: "1.11.0",
|
31
32
|
options: {
|
32
33
|
active: 0,
|
33
34
|
animate: {},
|
@@ -45,6 +46,22 @@ $.widget( "ui.accordion", {
|
|
45
46
|
beforeActivate: null
|
46
47
|
},
|
47
48
|
|
49
|
+
hideProps: {
|
50
|
+
borderTopWidth: "hide",
|
51
|
+
borderBottomWidth: "hide",
|
52
|
+
paddingTop: "hide",
|
53
|
+
paddingBottom: "hide",
|
54
|
+
height: "hide"
|
55
|
+
},
|
56
|
+
|
57
|
+
showProps: {
|
58
|
+
borderTopWidth: "show",
|
59
|
+
borderBottomWidth: "show",
|
60
|
+
paddingTop: "show",
|
61
|
+
paddingBottom: "show",
|
62
|
+
height: "show"
|
63
|
+
},
|
64
|
+
|
48
65
|
_create: function() {
|
49
66
|
var options = this.options;
|
50
67
|
this.prevShow = this.prevHide = $();
|
@@ -68,8 +85,7 @@ $.widget( "ui.accordion", {
|
|
68
85
|
_getCreateEventData: function() {
|
69
86
|
return {
|
70
87
|
header: this.active,
|
71
|
-
panel: !this.active.length ? $() : this.active.next()
|
72
|
-
content: !this.active.length ? $() : this.active.next()
|
88
|
+
panel: !this.active.length ? $() : this.active.next()
|
73
89
|
};
|
74
90
|
},
|
75
91
|
|
@@ -103,31 +119,27 @@ $.widget( "ui.accordion", {
|
|
103
119
|
|
104
120
|
// clean up headers
|
105
121
|
this.headers
|
106
|
-
.removeClass( "ui-accordion-header ui-accordion-header-active ui-
|
122
|
+
.removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
|
123
|
+
"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
|
107
124
|
.removeAttr( "role" )
|
108
125
|
.removeAttr( "aria-expanded" )
|
109
126
|
.removeAttr( "aria-selected" )
|
110
127
|
.removeAttr( "aria-controls" )
|
111
128
|
.removeAttr( "tabIndex" )
|
112
|
-
.
|
113
|
-
|
114
|
-
this.removeAttribute( "id" );
|
115
|
-
}
|
116
|
-
});
|
129
|
+
.removeUniqueId();
|
130
|
+
|
117
131
|
this._destroyIcons();
|
118
132
|
|
119
133
|
// clean up content panels
|
120
134
|
contents = this.headers.next()
|
135
|
+
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
|
136
|
+
"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
|
121
137
|
.css( "display", "" )
|
122
138
|
.removeAttr( "role" )
|
123
139
|
.removeAttr( "aria-hidden" )
|
124
140
|
.removeAttr( "aria-labelledby" )
|
125
|
-
.
|
126
|
-
|
127
|
-
if ( /^ui-accordion/.test( this.id ) ) {
|
128
|
-
this.removeAttribute( "id" );
|
129
|
-
}
|
130
|
-
});
|
141
|
+
.removeUniqueId();
|
142
|
+
|
131
143
|
if ( this.options.heightStyle !== "content" ) {
|
132
144
|
contents.css( "height", "" );
|
133
145
|
}
|
@@ -164,6 +176,9 @@ $.widget( "ui.accordion", {
|
|
164
176
|
// #5332 - opacity doesn't cascade to positioned elements in IE
|
165
177
|
// so we need to add the disabled class to the headers and panels
|
166
178
|
if ( key === "disabled" ) {
|
179
|
+
this.element
|
180
|
+
.toggleClass( "ui-state-disabled", !!value )
|
181
|
+
.attr( "aria-disabled", value );
|
167
182
|
this.headers.add( this.headers.next() )
|
168
183
|
.toggleClass( "ui-state-disabled", !!value );
|
169
184
|
}
|
@@ -208,7 +223,7 @@ $.widget( "ui.accordion", {
|
|
208
223
|
}
|
209
224
|
},
|
210
225
|
|
211
|
-
_panelKeyDown
|
226
|
+
_panelKeyDown: function( event ) {
|
212
227
|
if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
|
213
228
|
$( event.currentTarget ).prev().focus();
|
214
229
|
}
|
@@ -248,11 +263,11 @@ $.widget( "ui.accordion", {
|
|
248
263
|
|
249
264
|
_processPanels: function() {
|
250
265
|
this.headers = this.element.find( this.options.header )
|
251
|
-
.addClass( "ui-accordion-header ui-
|
266
|
+
.addClass( "ui-accordion-header ui-state-default ui-corner-all" );
|
252
267
|
|
253
268
|
this.headers.next()
|
254
269
|
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
|
255
|
-
.filter(":not(.ui-accordion-content-active)")
|
270
|
+
.filter( ":not(.ui-accordion-content-active)" )
|
256
271
|
.hide();
|
257
272
|
},
|
258
273
|
|
@@ -260,9 +275,7 @@ $.widget( "ui.accordion", {
|
|
260
275
|
var maxHeight,
|
261
276
|
options = this.options,
|
262
277
|
heightStyle = options.heightStyle,
|
263
|
-
parent = this.element.parent()
|
264
|
-
accordionId = this.accordionId = "ui-accordion-" +
|
265
|
-
(this.element.attr( "id" ) || ++uid);
|
278
|
+
parent = this.element.parent();
|
266
279
|
|
267
280
|
this.active = this._findActive( options.active )
|
268
281
|
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
|
@@ -273,19 +286,11 @@ $.widget( "ui.accordion", {
|
|
273
286
|
|
274
287
|
this.headers
|
275
288
|
.attr( "role", "tab" )
|
276
|
-
.each(function(
|
289
|
+
.each(function() {
|
277
290
|
var header = $( this ),
|
278
|
-
headerId = header.attr( "id" ),
|
291
|
+
headerId = header.uniqueId().attr( "id" ),
|
279
292
|
panel = header.next(),
|
280
|
-
panelId = panel.attr( "id" );
|
281
|
-
if ( !headerId ) {
|
282
|
-
headerId = accordionId + "-header-" + i;
|
283
|
-
header.attr( "id", headerId );
|
284
|
-
}
|
285
|
-
if ( !panelId ) {
|
286
|
-
panelId = accordionId + "-panel-" + i;
|
287
|
-
panel.attr( "id", panelId );
|
288
|
-
}
|
293
|
+
panelId = panel.uniqueId().attr( "id" );
|
289
294
|
header.attr( "aria-controls", panelId );
|
290
295
|
panel.attr( "aria-labelledby", headerId );
|
291
296
|
})
|
@@ -383,7 +388,7 @@ $.widget( "ui.accordion", {
|
|
383
388
|
keydown: "_keydown"
|
384
389
|
};
|
385
390
|
if ( event ) {
|
386
|
-
$.each( event.split(" "), function( index, eventName ) {
|
391
|
+
$.each( event.split( " " ), function( index, eventName ) {
|
387
392
|
events[ eventName ] = "_eventHandler";
|
388
393
|
});
|
389
394
|
}
|
@@ -521,14 +526,14 @@ $.widget( "ui.accordion", {
|
|
521
526
|
duration = duration || options.duration || animate.duration;
|
522
527
|
|
523
528
|
if ( !toHide.length ) {
|
524
|
-
return toShow.animate( showProps, duration, easing, complete );
|
529
|
+
return toShow.animate( this.showProps, duration, easing, complete );
|
525
530
|
}
|
526
531
|
if ( !toShow.length ) {
|
527
|
-
return toHide.animate( hideProps, duration, easing, complete );
|
532
|
+
return toHide.animate( this.hideProps, duration, easing, complete );
|
528
533
|
}
|
529
534
|
|
530
535
|
total = toShow.show().outerHeight();
|
531
|
-
toHide.animate( hideProps, {
|
536
|
+
toHide.animate( this.hideProps, {
|
532
537
|
duration: duration,
|
533
538
|
easing: easing,
|
534
539
|
step: function( now, fx ) {
|
@@ -537,7 +542,7 @@ $.widget( "ui.accordion", {
|
|
537
542
|
});
|
538
543
|
toShow
|
539
544
|
.hide()
|
540
|
-
.animate( showProps, {
|
545
|
+
.animate( this.showProps, {
|
541
546
|
duration: duration,
|
542
547
|
easing: easing,
|
543
548
|
complete: complete,
|
@@ -564,10 +569,10 @@ $.widget( "ui.accordion", {
|
|
564
569
|
|
565
570
|
// Work around for rendering bug in IE (#5421)
|
566
571
|
if ( toHide.length ) {
|
567
|
-
toHide.parent()[0].className = toHide.parent()[0].className;
|
572
|
+
toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
|
568
573
|
}
|
569
574
|
this._trigger( "activate", null, data );
|
570
575
|
}
|
571
576
|
});
|
572
577
|
|
573
|
-
})
|
578
|
+
}));
|