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