jquery-ui-rails 5.0.4 → 7.0.0
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.
- checksums.yaml +7 -0
- data/.gitmodules +1 -1
- data/.travis.yml +1 -1
- data/History.md +23 -2
- data/README.md +67 -50
- data/Rakefile +58 -29
- data/VERSIONS.md +4 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/core.js +15 -304
- data/app/assets/javascripts/jquery-ui/data.js +45 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
- data/app/assets/javascripts/jquery-ui/effect.js +565 -891
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +89 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +83 -0
- data/app/assets/javascripts/jquery-ui/form.js +25 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
- data/app/assets/javascripts/jquery-ui/ie.js +20 -0
- data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
- data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/app/assets/javascripts/jquery-ui/labels.js +71 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/app/assets/javascripts/jquery-ui/position.js +107 -111
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
- data/app/assets/javascripts/jquery-ui/version.js +20 -0
- data/app/assets/javascripts/jquery-ui/widget.js +359 -163
- data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +200 -163
- data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +153 -106
- data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +289 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2243 -0
- data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +267 -181
- data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +430 -294
- data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +174 -84
- data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +228 -158
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +63 -41
- data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1225 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
- data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +259 -177
- data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +199 -160
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1623 -0
- data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +184 -114
- data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +258 -211
- data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +165 -100
- data/app/assets/javascripts/jquery-ui.js +53 -33
- data/app/assets/stylesheets/jquery-ui/accordion.css +1 -15
- data/app/assets/stylesheets/jquery-ui/all.css +1 -1
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -3
- data/app/assets/stylesheets/jquery-ui/base.css +3 -1
- data/app/assets/stylesheets/jquery-ui/button.css +35 -68
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +12 -8
- data/app/assets/stylesheets/jquery-ui/datepicker.css +11 -2
- data/app/assets/stylesheets/jquery-ui/dialog.css +38 -11
- data/app/assets/stylesheets/jquery-ui/draggable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/menu.css +7 -7
- data/app/assets/stylesheets/jquery-ui/progressbar.css +2 -3
- data/app/assets/stylesheets/jquery-ui/resizable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +11 -22
- data/app/assets/stylesheets/jquery-ui/slider.css +2 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/spinner.css +7 -22
- data/app/assets/stylesheets/jquery-ui/tabs.css +1 -2
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +121 -92
- data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +153 -146
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/button.js +0 -414
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +0 -73
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +0 -39
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +0 -40
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker.js +0 -2086
- data/app/assets/javascripts/jquery-ui/effect-blind.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-bounce.js +0 -125
- data/app/assets/javascripts/jquery-ui/effect-clip.js +0 -79
- data/app/assets/javascripts/jquery-ui/effect-drop.js +0 -77
- data/app/assets/javascripts/jquery-ui/effect-explode.js +0 -109
- data/app/assets/javascripts/jquery-ui/effect-fade.js +0 -42
- data/app/assets/javascripts/jquery-ui/effect-fold.js +0 -88
- data/app/assets/javascripts/jquery-ui/effect-highlight.js +0 -62
- data/app/assets/javascripts/jquery-ui/effect-puff.js +0 -63
- data/app/assets/javascripts/jquery-ui/effect-pulsate.js +0 -75
- data/app/assets/javascripts/jquery-ui/effect-scale.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-shake.js +0 -86
- data/app/assets/javascripts/jquery-ui/effect-size.js +0 -235
- data/app/assets/javascripts/jquery-ui/effect-slide.js +0 -76
- data/app/assets/javascripts/jquery-ui/effect-transfer.js +0 -59
- data/app/assets/javascripts/jquery-ui/mouse.js +0 -202
- data/app/assets/javascripts/jquery-ui/resizable.js +0 -1183
- data/app/assets/javascripts/jquery-ui/selectable.js +0 -291
- data/app/assets/javascripts/jquery-ui/sortable.js +0 -1308
@@ -1,50 +1,77 @@
|
|
1
|
-
//= require jquery-ui/
|
2
|
-
//= require jquery-ui/
|
3
|
-
//= require jquery-ui/
|
4
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/widgets/button
|
2
|
+
//= require jquery-ui/widgets/draggable
|
3
|
+
//= require jquery-ui/widgets/mouse
|
4
|
+
//= require jquery-ui/widgets/resizable
|
5
|
+
//= require jquery-ui/focusable
|
6
|
+
//= require jquery-ui/keycode
|
5
7
|
//= require jquery-ui/position
|
6
|
-
//= require jquery-ui/
|
8
|
+
//= require jquery-ui/safe-active-element
|
9
|
+
//= require jquery-ui/safe-blur
|
10
|
+
//= require jquery-ui/tabbable
|
11
|
+
//= require jquery-ui/unique-id
|
12
|
+
//= require jquery-ui/version
|
13
|
+
//= require jquery-ui/widget
|
7
14
|
|
8
15
|
/*!
|
9
|
-
* jQuery UI Dialog 1.
|
16
|
+
* jQuery UI Dialog 1.13.0
|
10
17
|
* http://jqueryui.com
|
11
18
|
*
|
12
19
|
* Copyright jQuery Foundation and other contributors
|
13
20
|
* Released under the MIT license.
|
14
21
|
* http://jquery.org/license
|
15
|
-
*
|
16
|
-
* http://api.jqueryui.com/dialog/
|
17
22
|
*/
|
18
|
-
|
23
|
+
|
24
|
+
//>>label: Dialog
|
25
|
+
//>>group: Widgets
|
26
|
+
//>>description: Displays customizable dialog windows.
|
27
|
+
//>>docs: http://api.jqueryui.com/dialog/
|
28
|
+
//>>demos: http://jqueryui.com/dialog/
|
29
|
+
//>>css.structure: ../../themes/base/core.css
|
30
|
+
//>>css.structure: ../../themes/base/dialog.css
|
31
|
+
//>>css.theme: ../../themes/base/theme.css
|
32
|
+
|
33
|
+
( function( factory ) {
|
34
|
+
"use strict";
|
35
|
+
|
19
36
|
if ( typeof define === "function" && define.amd ) {
|
20
37
|
|
21
38
|
// AMD. Register as an anonymous module.
|
22
|
-
define([
|
39
|
+
define( [
|
23
40
|
"jquery",
|
24
|
-
"./core",
|
25
|
-
"./widget",
|
26
41
|
"./button",
|
27
42
|
"./draggable",
|
28
43
|
"./mouse",
|
29
|
-
"./
|
30
|
-
"
|
44
|
+
"./resizable",
|
45
|
+
"../focusable",
|
46
|
+
"../keycode",
|
47
|
+
"../position",
|
48
|
+
"../safe-active-element",
|
49
|
+
"../safe-blur",
|
50
|
+
"../tabbable",
|
51
|
+
"../unique-id",
|
52
|
+
"../version",
|
53
|
+
"../widget"
|
31
54
|
], factory );
|
32
55
|
} else {
|
33
56
|
|
34
57
|
// Browser globals
|
35
58
|
factory( jQuery );
|
36
59
|
}
|
37
|
-
}(function( $ ) {
|
60
|
+
} )( function( $ ) {
|
61
|
+
"use strict";
|
38
62
|
|
39
|
-
|
40
|
-
version: "1.
|
63
|
+
$.widget( "ui.dialog", {
|
64
|
+
version: "1.13.0",
|
41
65
|
options: {
|
42
66
|
appendTo: "body",
|
43
67
|
autoOpen: true,
|
44
68
|
buttons: [],
|
69
|
+
classes: {
|
70
|
+
"ui-dialog": "ui-corner-all",
|
71
|
+
"ui-dialog-titlebar": "ui-corner-all"
|
72
|
+
},
|
45
73
|
closeOnEscape: true,
|
46
74
|
closeText: "Close",
|
47
|
-
dialogClass: "",
|
48
75
|
draggable: true,
|
49
76
|
hide: null,
|
50
77
|
height: "auto",
|
@@ -58,6 +85,7 @@ return $.widget( "ui.dialog", {
|
|
58
85
|
at: "center",
|
59
86
|
of: window,
|
60
87
|
collision: "fit",
|
88
|
+
|
61
89
|
// Ensure the titlebar is always visible
|
62
90
|
using: function( pos ) {
|
63
91
|
var topOffset = $( this ).css( pos ).offset().top;
|
@@ -71,7 +99,7 @@ return $.widget( "ui.dialog", {
|
|
71
99
|
title: null,
|
72
100
|
width: 300,
|
73
101
|
|
74
|
-
//
|
102
|
+
// Callbacks
|
75
103
|
beforeClose: null,
|
76
104
|
close: null,
|
77
105
|
drag: null,
|
@@ -114,16 +142,24 @@ return $.widget( "ui.dialog", {
|
|
114
142
|
index: this.element.parent().children().index( this.element )
|
115
143
|
};
|
116
144
|
this.originalTitle = this.element.attr( "title" );
|
117
|
-
|
145
|
+
if ( this.options.title == null && this.originalTitle != null ) {
|
146
|
+
this.options.title = this.originalTitle;
|
147
|
+
}
|
148
|
+
|
149
|
+
// Dialogs can't be disabled
|
150
|
+
if ( this.options.disabled ) {
|
151
|
+
this.options.disabled = false;
|
152
|
+
}
|
118
153
|
|
119
154
|
this._createWrapper();
|
120
155
|
|
121
156
|
this.element
|
122
157
|
.show()
|
123
158
|
.removeAttr( "title" )
|
124
|
-
.addClass( "ui-dialog-content ui-widget-content" )
|
125
159
|
.appendTo( this.uiDialog );
|
126
160
|
|
161
|
+
this._addClass( "ui-dialog-content", "ui-widget-content" );
|
162
|
+
|
127
163
|
this._createTitlebar();
|
128
164
|
this._createButtonPane();
|
129
165
|
|
@@ -147,7 +183,7 @@ return $.widget( "ui.dialog", {
|
|
147
183
|
|
148
184
|
_appendTo: function() {
|
149
185
|
var element = this.options.appendTo;
|
150
|
-
if ( element && (element.jquery || element.nodeType) ) {
|
186
|
+
if ( element && ( element.jquery || element.nodeType ) ) {
|
151
187
|
return $( element );
|
152
188
|
}
|
153
189
|
return this.document.find( element || "body" ).eq( 0 );
|
@@ -157,22 +193,24 @@ return $.widget( "ui.dialog", {
|
|
157
193
|
var next,
|
158
194
|
originalPosition = this.originalPosition;
|
159
195
|
|
196
|
+
this._untrackInstance();
|
160
197
|
this._destroyOverlay();
|
161
198
|
|
162
199
|
this.element
|
163
200
|
.removeUniqueId()
|
164
|
-
.removeClass( "ui-dialog-content ui-widget-content" )
|
165
201
|
.css( this.originalCss )
|
202
|
+
|
166
203
|
// Without detaching first, the following becomes really slow
|
167
204
|
.detach();
|
168
205
|
|
169
|
-
this.uiDialog.
|
206
|
+
this.uiDialog.remove();
|
170
207
|
|
171
208
|
if ( this.originalTitle ) {
|
172
209
|
this.element.attr( "title", this.originalTitle );
|
173
210
|
}
|
174
211
|
|
175
212
|
next = originalPosition.parent.children().eq( originalPosition.index );
|
213
|
+
|
176
214
|
// Don't try to place the dialog next to itself (#8613)
|
177
215
|
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
|
178
216
|
next.before( this.element );
|
@@ -189,8 +227,7 @@ return $.widget( "ui.dialog", {
|
|
189
227
|
enable: $.noop,
|
190
228
|
|
191
229
|
close: function( event ) {
|
192
|
-
var
|
193
|
-
that = this;
|
230
|
+
var that = this;
|
194
231
|
|
195
232
|
if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
|
196
233
|
return;
|
@@ -201,28 +238,17 @@ return $.widget( "ui.dialog", {
|
|
201
238
|
this._destroyOverlay();
|
202
239
|
this._untrackInstance();
|
203
240
|
|
204
|
-
if ( !this.opener.filter( ":focusable" ).focus
|
241
|
+
if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
|
205
242
|
|
206
|
-
//
|
207
|
-
//
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
// Support: IE9, IE10
|
212
|
-
// If the <body> is blurred, IE will switch windows, see #4520
|
213
|
-
if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
|
214
|
-
|
215
|
-
// Hiding a focused element doesn't trigger blur in WebKit
|
216
|
-
// so in case we have nothing to focus on, explicitly blur the active element
|
217
|
-
// https://bugs.webkit.org/show_bug.cgi?id=47182
|
218
|
-
$( activeElement ).blur();
|
219
|
-
}
|
220
|
-
} catch ( error ) {}
|
243
|
+
// Hiding a focused element doesn't trigger blur in WebKit
|
244
|
+
// so in case we have nothing to focus on, explicitly blur the active element
|
245
|
+
// https://bugs.webkit.org/show_bug.cgi?id=47182
|
246
|
+
$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
|
221
247
|
}
|
222
248
|
|
223
249
|
this._hide( this.uiDialog, this.options.hide, function() {
|
224
250
|
that._trigger( "close", event );
|
225
|
-
});
|
251
|
+
} );
|
226
252
|
},
|
227
253
|
|
228
254
|
isOpen: function() {
|
@@ -235,10 +261,10 @@ return $.widget( "ui.dialog", {
|
|
235
261
|
|
236
262
|
_moveToTop: function( event, silent ) {
|
237
263
|
var moved = false,
|
238
|
-
|
264
|
+
zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
|
239
265
|
return +$( this ).css( "z-index" );
|
240
|
-
}).get(),
|
241
|
-
zIndexMax = Math.max.apply( null,
|
266
|
+
} ).get(),
|
267
|
+
zIndexMax = Math.max.apply( null, zIndices );
|
242
268
|
|
243
269
|
if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
|
244
270
|
this.uiDialog.css( "z-index", zIndexMax + 1 );
|
@@ -261,7 +287,7 @@ return $.widget( "ui.dialog", {
|
|
261
287
|
}
|
262
288
|
|
263
289
|
this._isOpen = true;
|
264
|
-
this.opener = $( this.document[ 0 ]
|
290
|
+
this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
|
265
291
|
|
266
292
|
this._size();
|
267
293
|
this._position();
|
@@ -278,9 +304,9 @@ return $.widget( "ui.dialog", {
|
|
278
304
|
this._show( this.uiDialog, this.options.show, function() {
|
279
305
|
that._focusTabbable();
|
280
306
|
that._trigger( "focus" );
|
281
|
-
});
|
307
|
+
} );
|
282
308
|
|
283
|
-
// Track the dialog immediately upon
|
309
|
+
// Track the dialog immediately upon opening in case a focus event
|
284
310
|
// somehow occurs outside of the dialog before an element inside the
|
285
311
|
// dialog is focused (#10152)
|
286
312
|
this._makeFocusTarget();
|
@@ -289,6 +315,7 @@ return $.widget( "ui.dialog", {
|
|
289
315
|
},
|
290
316
|
|
291
317
|
_focusTabbable: function() {
|
318
|
+
|
292
319
|
// Set focus to the first match:
|
293
320
|
// 1. An element that was focused previously
|
294
321
|
// 2. First element inside the dialog matching [autofocus]
|
@@ -312,38 +339,40 @@ return $.widget( "ui.dialog", {
|
|
312
339
|
if ( !hasFocus.length ) {
|
313
340
|
hasFocus = this.uiDialog;
|
314
341
|
}
|
315
|
-
hasFocus.eq( 0 ).focus
|
342
|
+
hasFocus.eq( 0 ).trigger( "focus" );
|
316
343
|
},
|
317
344
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
this._focusTabbable();
|
325
|
-
}
|
345
|
+
_restoreTabbableFocus: function() {
|
346
|
+
var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
|
347
|
+
isActive = this.uiDialog[ 0 ] === activeElement ||
|
348
|
+
$.contains( this.uiDialog[ 0 ], activeElement );
|
349
|
+
if ( !isActive ) {
|
350
|
+
this._focusTabbable();
|
326
351
|
}
|
352
|
+
},
|
353
|
+
|
354
|
+
_keepFocus: function( event ) {
|
327
355
|
event.preventDefault();
|
328
|
-
|
356
|
+
this._restoreTabbableFocus();
|
357
|
+
|
329
358
|
// support: IE
|
330
359
|
// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
|
331
360
|
// so we check again later
|
332
|
-
this._delay(
|
361
|
+
this._delay( this._restoreTabbableFocus );
|
333
362
|
},
|
334
363
|
|
335
364
|
_createWrapper: function() {
|
336
|
-
this.uiDialog = $("<div>")
|
337
|
-
.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
|
338
|
-
this.options.dialogClass )
|
365
|
+
this.uiDialog = $( "<div>" )
|
339
366
|
.hide()
|
340
|
-
.attr({
|
367
|
+
.attr( {
|
368
|
+
|
341
369
|
// Setting tabIndex makes the div focusable
|
342
370
|
tabIndex: -1,
|
343
371
|
role: "dialog"
|
344
|
-
})
|
372
|
+
} )
|
345
373
|
.appendTo( this._appendTo() );
|
346
374
|
|
375
|
+
this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
|
347
376
|
this._on( this.uiDialog, {
|
348
377
|
keydown: function( event ) {
|
349
378
|
if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
|
@@ -353,23 +382,25 @@ return $.widget( "ui.dialog", {
|
|
353
382
|
return;
|
354
383
|
}
|
355
384
|
|
356
|
-
//
|
385
|
+
// Prevent tabbing out of dialogs
|
357
386
|
if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
|
358
387
|
return;
|
359
388
|
}
|
360
389
|
var tabbables = this.uiDialog.find( ":tabbable" ),
|
361
|
-
first = tabbables.
|
362
|
-
last = tabbables.
|
363
|
-
|
364
|
-
if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) &&
|
365
|
-
|
366
|
-
|
367
|
-
|
390
|
+
first = tabbables.first(),
|
391
|
+
last = tabbables.last();
|
392
|
+
|
393
|
+
if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
|
394
|
+
!event.shiftKey ) {
|
395
|
+
this._delay( function() {
|
396
|
+
first.trigger( "focus" );
|
397
|
+
} );
|
368
398
|
event.preventDefault();
|
369
|
-
} else if ( ( event.target === first[0] ||
|
370
|
-
|
371
|
-
|
372
|
-
|
399
|
+
} else if ( ( event.target === first[ 0 ] ||
|
400
|
+
event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
|
401
|
+
this._delay( function() {
|
402
|
+
last.trigger( "focus" );
|
403
|
+
} );
|
373
404
|
event.preventDefault();
|
374
405
|
}
|
375
406
|
},
|
@@ -378,81 +409,84 @@ return $.widget( "ui.dialog", {
|
|
378
409
|
this._focusTabbable();
|
379
410
|
}
|
380
411
|
}
|
381
|
-
});
|
412
|
+
} );
|
382
413
|
|
383
414
|
// We assume that any existing aria-describedby attribute means
|
384
415
|
// that the dialog content is marked up properly
|
385
416
|
// otherwise we brute force the content as the description
|
386
417
|
if ( !this.element.find( "[aria-describedby]" ).length ) {
|
387
|
-
this.uiDialog.attr({
|
418
|
+
this.uiDialog.attr( {
|
388
419
|
"aria-describedby": this.element.uniqueId().attr( "id" )
|
389
|
-
});
|
420
|
+
} );
|
390
421
|
}
|
391
422
|
},
|
392
423
|
|
393
424
|
_createTitlebar: function() {
|
394
425
|
var uiDialogTitle;
|
395
426
|
|
396
|
-
this.uiDialogTitlebar = $( "<div>" )
|
397
|
-
|
398
|
-
|
427
|
+
this.uiDialogTitlebar = $( "<div>" );
|
428
|
+
this._addClass( this.uiDialogTitlebar,
|
429
|
+
"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
|
399
430
|
this._on( this.uiDialogTitlebar, {
|
400
431
|
mousedown: function( event ) {
|
432
|
+
|
401
433
|
// Don't prevent click on close button (#8838)
|
402
434
|
// Focusing a dialog that is partially scrolled out of view
|
403
435
|
// causes the browser to scroll it into view, preventing the click event
|
404
436
|
if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
|
437
|
+
|
405
438
|
// Dialog isn't getting focus when dragging (#8063)
|
406
|
-
this.uiDialog.focus
|
439
|
+
this.uiDialog.trigger( "focus" );
|
407
440
|
}
|
408
441
|
}
|
409
|
-
});
|
442
|
+
} );
|
410
443
|
|
411
|
-
//
|
444
|
+
// Support: IE
|
412
445
|
// Use type="button" to prevent enter keypresses in textboxes from closing the
|
413
446
|
// dialog in IE (#9312)
|
414
447
|
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
|
415
|
-
.button({
|
416
|
-
label: this.options.closeText,
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
text: false
|
421
|
-
})
|
422
|
-
.addClass( "ui-dialog-titlebar-close" )
|
448
|
+
.button( {
|
449
|
+
label: $( "<a>" ).text( this.options.closeText ).html(),
|
450
|
+
icon: "ui-icon-closethick",
|
451
|
+
showLabel: false
|
452
|
+
} )
|
423
453
|
.appendTo( this.uiDialogTitlebar );
|
454
|
+
|
455
|
+
this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
|
424
456
|
this._on( this.uiDialogTitlebarClose, {
|
425
457
|
click: function( event ) {
|
426
458
|
event.preventDefault();
|
427
459
|
this.close( event );
|
428
460
|
}
|
429
|
-
});
|
461
|
+
} );
|
430
462
|
|
431
|
-
uiDialogTitle = $( "<span>" )
|
432
|
-
|
433
|
-
.addClass( "ui-dialog-title" )
|
434
|
-
.prependTo( this.uiDialogTitlebar );
|
463
|
+
uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
|
464
|
+
this._addClass( uiDialogTitle, "ui-dialog-title" );
|
435
465
|
this._title( uiDialogTitle );
|
436
466
|
|
437
|
-
this.
|
467
|
+
this.uiDialogTitlebar.prependTo( this.uiDialog );
|
468
|
+
|
469
|
+
this.uiDialog.attr( {
|
438
470
|
"aria-labelledby": uiDialogTitle.attr( "id" )
|
439
|
-
});
|
471
|
+
} );
|
440
472
|
},
|
441
473
|
|
442
474
|
_title: function( title ) {
|
443
|
-
if (
|
475
|
+
if ( this.options.title ) {
|
476
|
+
title.text( this.options.title );
|
477
|
+
} else {
|
444
478
|
title.html( " " );
|
445
479
|
}
|
446
|
-
title.text( this.options.title );
|
447
480
|
},
|
448
481
|
|
449
482
|
_createButtonPane: function() {
|
450
|
-
this.uiDialogButtonPane = $( "<div>" )
|
451
|
-
|
483
|
+
this.uiDialogButtonPane = $( "<div>" );
|
484
|
+
this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
|
485
|
+
"ui-widget-content ui-helper-clearfix" );
|
452
486
|
|
453
487
|
this.uiButtonSet = $( "<div>" )
|
454
|
-
.addClass( "ui-dialog-buttonset" )
|
455
488
|
.appendTo( this.uiDialogButtonPane );
|
489
|
+
this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
|
456
490
|
|
457
491
|
this._createButtons();
|
458
492
|
},
|
@@ -461,38 +495,55 @@ return $.widget( "ui.dialog", {
|
|
461
495
|
var that = this,
|
462
496
|
buttons = this.options.buttons;
|
463
497
|
|
464
|
-
//
|
498
|
+
// If we already have a button pane, remove it
|
465
499
|
this.uiDialogButtonPane.remove();
|
466
500
|
this.uiButtonSet.empty();
|
467
501
|
|
468
|
-
if ( $.isEmptyObject( buttons ) || (
|
469
|
-
this.
|
502
|
+
if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
|
503
|
+
this._removeClass( this.uiDialog, "ui-dialog-buttons" );
|
470
504
|
return;
|
471
505
|
}
|
472
506
|
|
473
507
|
$.each( buttons, function( name, props ) {
|
474
508
|
var click, buttonOptions;
|
475
|
-
props =
|
509
|
+
props = typeof props === "function" ?
|
476
510
|
{ click: props, text: name } :
|
477
511
|
props;
|
512
|
+
|
478
513
|
// Default to a non-submitting button
|
479
514
|
props = $.extend( { type: "button" }, props );
|
515
|
+
|
480
516
|
// Change the context for the click callback to be the main element
|
481
517
|
click = props.click;
|
482
|
-
props.click = function() {
|
483
|
-
click.apply( that.element[ 0 ], arguments );
|
484
|
-
};
|
485
518
|
buttonOptions = {
|
519
|
+
icon: props.icon,
|
520
|
+
iconPosition: props.iconPosition,
|
521
|
+
showLabel: props.showLabel,
|
522
|
+
|
523
|
+
// Deprecated options
|
486
524
|
icons: props.icons,
|
487
|
-
text: props.
|
525
|
+
text: props.text
|
488
526
|
};
|
527
|
+
|
528
|
+
delete props.click;
|
529
|
+
delete props.icon;
|
530
|
+
delete props.iconPosition;
|
531
|
+
delete props.showLabel;
|
532
|
+
|
533
|
+
// Deprecated options
|
489
534
|
delete props.icons;
|
490
|
-
|
535
|
+
if ( typeof props.text === "boolean" ) {
|
536
|
+
delete props.text;
|
537
|
+
}
|
538
|
+
|
491
539
|
$( "<button></button>", props )
|
492
540
|
.button( buttonOptions )
|
493
|
-
.appendTo( that.uiButtonSet )
|
494
|
-
|
495
|
-
|
541
|
+
.appendTo( that.uiButtonSet )
|
542
|
+
.on( "click", function() {
|
543
|
+
click.apply( that.element[ 0 ], arguments );
|
544
|
+
} );
|
545
|
+
} );
|
546
|
+
this._addClass( this.uiDialog, "ui-dialog-buttons" );
|
496
547
|
this.uiDialogButtonPane.appendTo( this.uiDialog );
|
497
548
|
},
|
498
549
|
|
@@ -507,12 +558,12 @@ return $.widget( "ui.dialog", {
|
|
507
558
|
};
|
508
559
|
}
|
509
560
|
|
510
|
-
this.uiDialog.draggable({
|
561
|
+
this.uiDialog.draggable( {
|
511
562
|
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
|
512
563
|
handle: ".ui-dialog-titlebar",
|
513
564
|
containment: "document",
|
514
565
|
start: function( event, ui ) {
|
515
|
-
$( this )
|
566
|
+
that._addClass( $( this ), "ui-dialog-dragging" );
|
516
567
|
that._blockFrames();
|
517
568
|
that._trigger( "dragStart", event, filteredUi( ui ) );
|
518
569
|
},
|
@@ -525,26 +576,27 @@ return $.widget( "ui.dialog", {
|
|
525
576
|
|
526
577
|
options.position = {
|
527
578
|
my: "left top",
|
528
|
-
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
529
|
-
"top" + (top >= 0 ? "+" : "") + top,
|
579
|
+
at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
|
580
|
+
"top" + ( top >= 0 ? "+" : "" ) + top,
|
530
581
|
of: that.window
|
531
582
|
};
|
532
|
-
$( this )
|
583
|
+
that._removeClass( $( this ), "ui-dialog-dragging" );
|
533
584
|
that._unblockFrames();
|
534
585
|
that._trigger( "dragStop", event, filteredUi( ui ) );
|
535
586
|
}
|
536
|
-
});
|
587
|
+
} );
|
537
588
|
},
|
538
589
|
|
539
590
|
_makeResizable: function() {
|
540
591
|
var that = this,
|
541
592
|
options = this.options,
|
542
593
|
handles = options.resizable,
|
594
|
+
|
543
595
|
// .ui-resizable has position: relative defined in the stylesheet
|
544
596
|
// but dialogs have to use absolute or fixed positioning
|
545
|
-
position = this.uiDialog.css("position"),
|
597
|
+
position = this.uiDialog.css( "position" ),
|
546
598
|
resizeHandles = typeof handles === "string" ?
|
547
|
-
handles
|
599
|
+
handles :
|
548
600
|
"n,e,s,w,se,sw,ne,nw";
|
549
601
|
|
550
602
|
function filteredUi( ui ) {
|
@@ -556,7 +608,7 @@ return $.widget( "ui.dialog", {
|
|
556
608
|
};
|
557
609
|
}
|
558
610
|
|
559
|
-
this.uiDialog.resizable({
|
611
|
+
this.uiDialog.resizable( {
|
560
612
|
cancel: ".ui-dialog-content",
|
561
613
|
containment: "document",
|
562
614
|
alsoResize: this.element,
|
@@ -566,7 +618,7 @@ return $.widget( "ui.dialog", {
|
|
566
618
|
minHeight: this._minHeight(),
|
567
619
|
handles: resizeHandles,
|
568
620
|
start: function( event, ui ) {
|
569
|
-
$( this )
|
621
|
+
that._addClass( $( this ), "ui-dialog-resizing" );
|
570
622
|
that._blockFrames();
|
571
623
|
that._trigger( "resizeStart", event, filteredUi( ui ) );
|
572
624
|
},
|
@@ -582,16 +634,16 @@ return $.widget( "ui.dialog", {
|
|
582
634
|
options.width = that.uiDialog.width();
|
583
635
|
options.position = {
|
584
636
|
my: "left top",
|
585
|
-
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
586
|
-
"top" + (top >= 0 ? "+" : "") + top,
|
637
|
+
at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
|
638
|
+
"top" + ( top >= 0 ? "+" : "" ) + top,
|
587
639
|
of: that.window
|
588
640
|
};
|
589
|
-
$( this )
|
641
|
+
that._removeClass( $( this ), "ui-dialog-resizing" );
|
590
642
|
that._unblockFrames();
|
591
643
|
that._trigger( "resizeStop", event, filteredUi( ui ) );
|
592
644
|
}
|
593
|
-
})
|
594
|
-
|
645
|
+
} )
|
646
|
+
.css( "position", position );
|
595
647
|
},
|
596
648
|
|
597
649
|
_trackFocus: function() {
|
@@ -600,7 +652,7 @@ return $.widget( "ui.dialog", {
|
|
600
652
|
this._makeFocusTarget();
|
601
653
|
this._focusedElement = $( event.target );
|
602
654
|
}
|
603
|
-
});
|
655
|
+
} );
|
604
656
|
},
|
605
657
|
|
606
658
|
_makeFocusTarget: function() {
|
@@ -634,6 +686,7 @@ return $.widget( "ui.dialog", {
|
|
634
686
|
},
|
635
687
|
|
636
688
|
_position: function() {
|
689
|
+
|
637
690
|
// Need to show the dialog to get the actual offset in the position plugin
|
638
691
|
var isVisible = this.uiDialog.is( ":visible" );
|
639
692
|
if ( !isVisible ) {
|
@@ -659,7 +712,7 @@ return $.widget( "ui.dialog", {
|
|
659
712
|
if ( key in that.resizableRelatedOptions ) {
|
660
713
|
resizableOptions[ key ] = value;
|
661
714
|
}
|
662
|
-
});
|
715
|
+
} );
|
663
716
|
|
664
717
|
if ( resize ) {
|
665
718
|
this._size();
|
@@ -674,12 +727,6 @@ return $.widget( "ui.dialog", {
|
|
674
727
|
var isDraggable, isResizable,
|
675
728
|
uiDialog = this.uiDialog;
|
676
729
|
|
677
|
-
if ( key === "dialogClass" ) {
|
678
|
-
uiDialog
|
679
|
-
.removeClass( this.options.dialogClass )
|
680
|
-
.addClass( value );
|
681
|
-
}
|
682
|
-
|
683
730
|
if ( key === "disabled" ) {
|
684
731
|
return;
|
685
732
|
}
|
@@ -695,10 +742,11 @@ return $.widget( "ui.dialog", {
|
|
695
742
|
}
|
696
743
|
|
697
744
|
if ( key === "closeText" ) {
|
698
|
-
this.uiDialogTitlebarClose.button({
|
745
|
+
this.uiDialogTitlebarClose.button( {
|
746
|
+
|
699
747
|
// Ensure that we always pass a string
|
700
|
-
label: "" +
|
701
|
-
});
|
748
|
+
label: $( "<a>" ).text( "" + this.options.closeText ).html()
|
749
|
+
} );
|
702
750
|
}
|
703
751
|
|
704
752
|
if ( key === "draggable" ) {
|
@@ -717,18 +765,19 @@ return $.widget( "ui.dialog", {
|
|
717
765
|
}
|
718
766
|
|
719
767
|
if ( key === "resizable" ) {
|
768
|
+
|
720
769
|
// currently resizable, becoming non-resizable
|
721
770
|
isResizable = uiDialog.is( ":data(ui-resizable)" );
|
722
771
|
if ( isResizable && !value ) {
|
723
772
|
uiDialog.resizable( "destroy" );
|
724
773
|
}
|
725
774
|
|
726
|
-
//
|
775
|
+
// Currently resizable, changing handles
|
727
776
|
if ( isResizable && typeof value === "string" ) {
|
728
777
|
uiDialog.resizable( "option", "handles", value );
|
729
778
|
}
|
730
779
|
|
731
|
-
//
|
780
|
+
// Currently non-resizable, becoming resizable
|
732
781
|
if ( !isResizable && value !== false ) {
|
733
782
|
this._makeResizable();
|
734
783
|
}
|
@@ -740,29 +789,30 @@ return $.widget( "ui.dialog", {
|
|
740
789
|
},
|
741
790
|
|
742
791
|
_size: function() {
|
792
|
+
|
743
793
|
// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
|
744
794
|
// divs will both have width and height set, so we need to reset them
|
745
795
|
var nonContentHeight, minContentHeight, maxContentHeight,
|
746
796
|
options = this.options;
|
747
797
|
|
748
798
|
// Reset content sizing
|
749
|
-
this.element.show().css({
|
799
|
+
this.element.show().css( {
|
750
800
|
width: "auto",
|
751
801
|
minHeight: 0,
|
752
802
|
maxHeight: "none",
|
753
803
|
height: 0
|
754
|
-
});
|
804
|
+
} );
|
755
805
|
|
756
806
|
if ( options.minWidth > options.width ) {
|
757
807
|
options.width = options.minWidth;
|
758
808
|
}
|
759
809
|
|
760
|
-
//
|
810
|
+
// Reset wrapper sizing
|
761
811
|
// determine the height of all the non-content elements
|
762
|
-
nonContentHeight = this.uiDialog.css({
|
763
|
-
|
764
|
-
|
765
|
-
|
812
|
+
nonContentHeight = this.uiDialog.css( {
|
813
|
+
height: "auto",
|
814
|
+
width: options.width
|
815
|
+
} )
|
766
816
|
.outerHeight();
|
767
817
|
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
|
768
818
|
maxContentHeight = typeof options.maxHeight === "number" ?
|
@@ -770,11 +820,11 @@ return $.widget( "ui.dialog", {
|
|
770
820
|
"none";
|
771
821
|
|
772
822
|
if ( options.height === "auto" ) {
|
773
|
-
this.element.css({
|
823
|
+
this.element.css( {
|
774
824
|
minHeight: minContentHeight,
|
775
825
|
maxHeight: maxContentHeight,
|
776
826
|
height: "auto"
|
777
|
-
});
|
827
|
+
} );
|
778
828
|
} else {
|
779
829
|
this.element.height( Math.max( 0, options.height - nonContentHeight ) );
|
780
830
|
}
|
@@ -785,18 +835,18 @@ return $.widget( "ui.dialog", {
|
|
785
835
|
},
|
786
836
|
|
787
837
|
_blockFrames: function() {
|
788
|
-
this.iframeBlocks = this.document.find( "iframe" ).map(function() {
|
838
|
+
this.iframeBlocks = this.document.find( "iframe" ).map( function() {
|
789
839
|
var iframe = $( this );
|
790
840
|
|
791
841
|
return $( "<div>" )
|
792
|
-
.css({
|
842
|
+
.css( {
|
793
843
|
position: "absolute",
|
794
844
|
width: iframe.outerWidth(),
|
795
845
|
height: iframe.outerHeight()
|
796
|
-
})
|
846
|
+
} )
|
797
847
|
.appendTo( iframe.parent() )
|
798
|
-
.offset( iframe.offset() )[0];
|
799
|
-
});
|
848
|
+
.offset( iframe.offset() )[ 0 ];
|
849
|
+
} );
|
800
850
|
},
|
801
851
|
|
802
852
|
_unblockFrames: function() {
|
@@ -821,40 +871,51 @@ return $.widget( "ui.dialog", {
|
|
821
871
|
return;
|
822
872
|
}
|
823
873
|
|
874
|
+
var jqMinor = $.fn.jquery.substring( 0, 4 );
|
875
|
+
|
824
876
|
// We use a delay in case the overlay is created from an
|
825
877
|
// event that we're going to be cancelling (#2804)
|
826
878
|
var isOpening = true;
|
827
|
-
this._delay(function() {
|
879
|
+
this._delay( function() {
|
828
880
|
isOpening = false;
|
829
|
-
});
|
881
|
+
} );
|
830
882
|
|
831
883
|
if ( !this.document.data( "ui-dialog-overlays" ) ) {
|
832
884
|
|
833
885
|
// Prevent use of anchors and inputs
|
834
|
-
//
|
835
|
-
//
|
836
|
-
this.
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
}
|
886
|
+
// This doesn't use `_on()` because it is a shared event handler
|
887
|
+
// across all open modal dialogs.
|
888
|
+
this.document.on( "focusin.ui-dialog", function( event ) {
|
889
|
+
if ( isOpening ) {
|
890
|
+
return;
|
891
|
+
}
|
841
892
|
|
842
|
-
|
843
|
-
|
844
|
-
|
893
|
+
var instance = this._trackingInstances()[ 0 ];
|
894
|
+
if ( !instance._allowInteraction( event ) ) {
|
895
|
+
event.preventDefault();
|
896
|
+
instance._focusTabbable();
|
897
|
+
|
898
|
+
// Support: jQuery >=3.4 <3.6 only
|
899
|
+
// Focus re-triggering in jQuery 3.4/3.5 makes the original element
|
900
|
+
// have its focus event propagated last, breaking the re-targeting.
|
901
|
+
// Trigger focus in a delay in addition if needed to avoid the issue
|
902
|
+
// See https://github.com/jquery/jquery/issues/4382
|
903
|
+
if ( jqMinor === "3.4." || jqMinor === "3.5." ) {
|
904
|
+
instance._delay( instance._restoreTabbableFocus );
|
845
905
|
}
|
846
906
|
}
|
847
|
-
});
|
907
|
+
}.bind( this ) );
|
848
908
|
}
|
849
909
|
|
850
910
|
this.overlay = $( "<div>" )
|
851
|
-
.addClass( "ui-widget-overlay ui-front" )
|
852
911
|
.appendTo( this._appendTo() );
|
912
|
+
|
913
|
+
this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
|
853
914
|
this._on( this.overlay, {
|
854
915
|
mousedown: "_keepFocus"
|
855
|
-
});
|
916
|
+
} );
|
856
917
|
this.document.data( "ui-dialog-overlays",
|
857
|
-
(this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
|
918
|
+
( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
|
858
919
|
},
|
859
920
|
|
860
921
|
_destroyOverlay: function() {
|
@@ -866,9 +927,8 @@ return $.widget( "ui.dialog", {
|
|
866
927
|
var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
|
867
928
|
|
868
929
|
if ( !overlays ) {
|
869
|
-
this.document
|
870
|
-
|
871
|
-
.removeData( "ui-dialog-overlays" );
|
930
|
+
this.document.off( "focusin.ui-dialog" );
|
931
|
+
this.document.removeData( "ui-dialog-overlays" );
|
872
932
|
} else {
|
873
933
|
this.document.data( "ui-dialog-overlays", overlays );
|
874
934
|
}
|
@@ -877,6 +937,32 @@ return $.widget( "ui.dialog", {
|
|
877
937
|
this.overlay = null;
|
878
938
|
}
|
879
939
|
}
|
880
|
-
});
|
940
|
+
} );
|
941
|
+
|
942
|
+
// DEPRECATED
|
943
|
+
// TODO: switch return back to widget declaration at top of file when this is removed
|
944
|
+
if ( $.uiBackCompat !== false ) {
|
945
|
+
|
946
|
+
// Backcompat for dialogClass option
|
947
|
+
$.widget( "ui.dialog", $.ui.dialog, {
|
948
|
+
options: {
|
949
|
+
dialogClass: ""
|
950
|
+
},
|
951
|
+
_createWrapper: function() {
|
952
|
+
this._super();
|
953
|
+
this.uiDialog.addClass( this.options.dialogClass );
|
954
|
+
},
|
955
|
+
_setOption: function( key, value ) {
|
956
|
+
if ( key === "dialogClass" ) {
|
957
|
+
this.uiDialog
|
958
|
+
.removeClass( this.options.dialogClass )
|
959
|
+
.addClass( value );
|
960
|
+
}
|
961
|
+
this._superApply( arguments );
|
962
|
+
}
|
963
|
+
} );
|
964
|
+
}
|
965
|
+
|
966
|
+
return $.ui.dialog;
|
881
967
|
|
882
|
-
})
|
968
|
+
} );
|