jquery-ui-rails 4.0.0 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/.travis.yml +0 -1
- data/Gemfile +1 -1
- data/History.md +62 -0
- data/README.md +86 -74
- data/Rakefile +69 -37
- data/VERSIONS.md +36 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/{vendor/assets/javascripts/jquery.ui.accordion.js → app/assets/javascripts/jquery-ui/accordion.js} +90 -74
- data/{vendor/assets/javascripts/jquery.ui.autocomplete.js → app/assets/javascripts/jquery-ui/autocomplete.js} +105 -91
- data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js} +60 -68
- data/{vendor/assets/javascripts/jquery.ui.core.js → app/assets/javascripts/jquery-ui/core.js} +112 -132
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
- data/{vendor/assets/javascripts/jquery.ui.datepicker.js → app/assets/javascripts/jquery-ui/datepicker.js} +120 -80
- data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js} +298 -190
- data/app/assets/javascripts/jquery-ui/draggable.js +1132 -0
- data/app/assets/javascripts/jquery-ui/droppable.js +418 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-blind.js → app/assets/javascripts/jquery-ui/effect-blind.js} +21 -13
- data/{vendor/assets/javascripts/jquery.ui.effect-bounce.js → app/assets/javascripts/jquery-ui/effect-bounce.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-clip.js → app/assets/javascripts/jquery-ui/effect-clip.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-drop.js → app/assets/javascripts/jquery-ui/effect-drop.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-explode.js → app/assets/javascripts/jquery-ui/effect-explode.js} +21 -11
- data/app/assets/javascripts/jquery-ui/effect-fade.js +42 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-fold.js → app/assets/javascripts/jquery-ui/effect-fold.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-highlight.js → app/assets/javascripts/jquery-ui/effect-highlight.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-pulsate.js → app/assets/javascripts/jquery-ui/effect-pulsate.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-shake.js → app/assets/javascripts/jquery-ui/effect-shake.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-scale.js → app/assets/javascripts/jquery-ui/effect-size.js} +20 -105
- data/{vendor/assets/javascripts/jquery.ui.effect-slide.js → app/assets/javascripts/jquery-ui/effect-slide.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-transfer.js → app/assets/javascripts/jquery-ui/effect-transfer.js} +23 -13
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/{vendor/assets/javascripts/jquery.ui.effect.js → app/assets/javascripts/jquery-ui/effect.js} +125 -92
- data/{vendor/assets/javascripts/jquery.ui.menu.js → app/assets/javascripts/jquery-ui/menu.js} +127 -102
- data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js} +57 -27
- data/{vendor/assets/javascripts/jquery.ui.position.js → app/assets/javascripts/jquery-ui/position.js} +47 -27
- data/{vendor/assets/javascripts/jquery.ui.progressbar.js → app/assets/javascripts/jquery-ui/progressbar.js} +27 -13
- data/{vendor/assets/javascripts/jquery.ui.resizable.js → app/assets/javascripts/jquery-ui/resizable.js} +454 -243
- data/{vendor/assets/javascripts/jquery.ui.selectable.js → app/assets/javascripts/jquery-ui/selectable.js} +26 -16
- data/app/assets/javascripts/jquery-ui/selectmenu.js +620 -0
- data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js} +159 -91
- data/{vendor/assets/javascripts/jquery.ui.sortable.js → app/assets/javascripts/jquery-ui/sortable.js} +168 -114
- data/{vendor/assets/javascripts/jquery.ui.spinner.js → app/assets/javascripts/jquery-ui/spinner.js} +54 -32
- data/{vendor/assets/javascripts/jquery.ui.tabs.js → app/assets/javascripts/jquery-ui/tabs.js} +108 -73
- data/{vendor/assets/javascripts/jquery.ui.tooltip.js → app/assets/javascripts/jquery-ui/tooltip.js} +134 -75
- data/{vendor/assets/javascripts/jquery.ui.widget.js → app/assets/javascripts/jquery-ui/widget.js} +81 -44
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/{vendor/assets/stylesheets/jquery.ui.accordion.css.erb → app/assets/stylesheets/jquery-ui/accordion.css} +7 -9
- data/app/assets/stylesheets/jquery-ui/all.css +14 -0
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +21 -0
- data/app/assets/stylesheets/jquery-ui/base.css +30 -0
- data/{vendor/assets/stylesheets/jquery.ui.button.css.erb → app/assets/stylesheets/jquery-ui/button.css} +5 -5
- data/{vendor/assets/stylesheets/jquery.ui.core.css.erb → app/assets/stylesheets/jquery-ui/core.css} +8 -4
- data/{vendor/assets/stylesheets/jquery.ui.datepicker.css.erb → app/assets/stylesheets/jquery-ui/datepicker.css} +6 -9
- data/{vendor/assets/stylesheets/jquery.ui.dialog.css.erb → app/assets/stylesheets/jquery-ui/dialog.css} +10 -8
- data/app/assets/stylesheets/jquery-ui/draggable.css +16 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +32 -0
- data/{vendor/assets/stylesheets/jquery.ui.resizable.css.erb → app/assets/stylesheets/jquery-ui/resizable.css} +6 -6
- data/app/assets/stylesheets/jquery-ui/selectable.css +21 -0
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +64 -0
- data/{vendor/assets/stylesheets/jquery.ui.slider.css.erb → app/assets/stylesheets/jquery-ui/slider.css} +8 -6
- data/app/assets/stylesheets/jquery-ui/sortable.css +16 -0
- data/{vendor/assets/stylesheets/jquery.ui.spinner.css.erb → app/assets/stylesheets/jquery-ui/spinner.css} +8 -8
- data/{vendor/assets/stylesheets/jquery.ui.tabs.css.erb → app/assets/stylesheets/jquery-ui/tabs.css} +11 -12
- data/{vendor/assets/stylesheets/jquery.ui.theme.css.erb → app/assets/stylesheets/jquery-ui/theme.css.erb} +29 -11
- data/{vendor/assets/stylesheets/jquery.ui.tooltip.css.erb → app/assets/stylesheets/jquery-ui/tooltip.css} +6 -4
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/version.rb +2 -1
- metadata +155 -161
- data/vendor/assets/javascripts/jquery.ui.all.js +0 -34
- data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.draggable.js +0 -950
- data/vendor/assets/javascripts/jquery.ui.droppable.js +0 -376
- data/vendor/assets/javascripts/jquery.ui.effect-fade.js +0 -32
- data/vendor/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/vendor/assets/stylesheets/jquery.ui.all.css.erb +0 -14
- data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
- data/vendor/assets/stylesheets/jquery.ui.base.css.erb +0 -27
- data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +0 -81
- data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -32
- data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +0 -19
data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js}
RENAMED
@@ -1,55 +1,49 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
4
|
-
//= require jquery
|
5
|
-
//= require jquery
|
6
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/button
|
4
|
+
//= require jquery-ui/draggable
|
5
|
+
//= require jquery-ui/position
|
6
|
+
//= require jquery-ui/resizable
|
7
7
|
|
8
8
|
/*!
|
9
|
-
* jQuery UI Dialog 1.
|
9
|
+
* jQuery UI Dialog 1.11.3
|
10
10
|
* http://jqueryui.com
|
11
11
|
*
|
12
|
-
* Copyright
|
12
|
+
* Copyright jQuery Foundation and other contributors
|
13
13
|
* Released under the MIT license.
|
14
14
|
* http://jquery.org/license
|
15
15
|
*
|
16
16
|
* http://api.jqueryui.com/dialog/
|
17
|
-
*
|
18
|
-
* Depends:
|
19
|
-
* jquery.ui.core.js
|
20
|
-
* jquery.ui.widget.js
|
21
|
-
* jquery.ui.button.js
|
22
|
-
* jquery.ui.draggable.js
|
23
|
-
* jquery.ui.mouse.js
|
24
|
-
* jquery.ui.position.js
|
25
|
-
* jquery.ui.resizable.js
|
26
17
|
*/
|
27
|
-
(function(
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
18
|
+
(function( factory ) {
|
19
|
+
if ( typeof define === "function" && define.amd ) {
|
20
|
+
|
21
|
+
// AMD. Register as an anonymous module.
|
22
|
+
define([
|
23
|
+
"jquery",
|
24
|
+
"./core",
|
25
|
+
"./widget",
|
26
|
+
"./button",
|
27
|
+
"./draggable",
|
28
|
+
"./mouse",
|
29
|
+
"./position",
|
30
|
+
"./resizable"
|
31
|
+
], factory );
|
32
|
+
} else {
|
33
|
+
|
34
|
+
// Browser globals
|
35
|
+
factory( jQuery );
|
36
|
+
}
|
37
|
+
}(function( $ ) {
|
44
38
|
|
45
|
-
$.widget( "ui.dialog", {
|
46
|
-
version: "1.
|
39
|
+
return $.widget( "ui.dialog", {
|
40
|
+
version: "1.11.3",
|
47
41
|
options: {
|
48
42
|
appendTo: "body",
|
49
43
|
autoOpen: true,
|
50
44
|
buttons: [],
|
51
45
|
closeOnEscape: true,
|
52
|
-
closeText: "
|
46
|
+
closeText: "Close",
|
53
47
|
dialogClass: "",
|
54
48
|
draggable: true,
|
55
49
|
hide: null,
|
@@ -90,27 +84,44 @@ $.widget( "ui.dialog", {
|
|
90
84
|
resizeStop: null
|
91
85
|
},
|
92
86
|
|
87
|
+
sizeRelatedOptions: {
|
88
|
+
buttons: true,
|
89
|
+
height: true,
|
90
|
+
maxHeight: true,
|
91
|
+
maxWidth: true,
|
92
|
+
minHeight: true,
|
93
|
+
minWidth: true,
|
94
|
+
width: true
|
95
|
+
},
|
96
|
+
|
97
|
+
resizableRelatedOptions: {
|
98
|
+
maxHeight: true,
|
99
|
+
maxWidth: true,
|
100
|
+
minHeight: true,
|
101
|
+
minWidth: true
|
102
|
+
},
|
103
|
+
|
93
104
|
_create: function() {
|
94
105
|
this.originalCss = {
|
95
|
-
display: this.element[0].style.display,
|
96
|
-
width: this.element[0].style.width,
|
97
|
-
minHeight: this.element[0].style.minHeight,
|
98
|
-
maxHeight: this.element[0].style.maxHeight,
|
99
|
-
height: this.element[0].style.height
|
106
|
+
display: this.element[ 0 ].style.display,
|
107
|
+
width: this.element[ 0 ].style.width,
|
108
|
+
minHeight: this.element[ 0 ].style.minHeight,
|
109
|
+
maxHeight: this.element[ 0 ].style.maxHeight,
|
110
|
+
height: this.element[ 0 ].style.height
|
100
111
|
};
|
101
112
|
this.originalPosition = {
|
102
113
|
parent: this.element.parent(),
|
103
114
|
index: this.element.parent().children().index( this.element )
|
104
115
|
};
|
105
|
-
this.originalTitle = this.element.attr("title");
|
116
|
+
this.originalTitle = this.element.attr( "title" );
|
106
117
|
this.options.title = this.options.title || this.originalTitle;
|
107
118
|
|
108
119
|
this._createWrapper();
|
109
120
|
|
110
121
|
this.element
|
111
122
|
.show()
|
112
|
-
.removeAttr("title")
|
113
|
-
.addClass("ui-dialog-content ui-widget-content")
|
123
|
+
.removeAttr( "title" )
|
124
|
+
.addClass( "ui-dialog-content ui-widget-content" )
|
114
125
|
.appendTo( this.uiDialog );
|
115
126
|
|
116
127
|
this._createTitlebar();
|
@@ -124,6 +135,8 @@ $.widget( "ui.dialog", {
|
|
124
135
|
}
|
125
136
|
|
126
137
|
this._isOpen = false;
|
138
|
+
|
139
|
+
this._trackFocus();
|
127
140
|
},
|
128
141
|
|
129
142
|
_init: function() {
|
@@ -148,7 +161,7 @@ $.widget( "ui.dialog", {
|
|
148
161
|
|
149
162
|
this.element
|
150
163
|
.removeUniqueId()
|
151
|
-
.removeClass("ui-dialog-content ui-widget-content")
|
164
|
+
.removeClass( "ui-dialog-content ui-widget-content" )
|
152
165
|
.css( this.originalCss )
|
153
166
|
// Without detaching first, the following becomes really slow
|
154
167
|
.detach();
|
@@ -161,7 +174,7 @@ $.widget( "ui.dialog", {
|
|
161
174
|
|
162
175
|
next = originalPosition.parent.children().eq( originalPosition.index );
|
163
176
|
// Don't try to place the dialog next to itself (#8613)
|
164
|
-
if ( next.length && next[0] !== this.element[0] ) {
|
177
|
+
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
|
165
178
|
next.before( this.element );
|
166
179
|
} else {
|
167
180
|
originalPosition.parent.append( this.element );
|
@@ -176,20 +189,35 @@ $.widget( "ui.dialog", {
|
|
176
189
|
enable: $.noop,
|
177
190
|
|
178
191
|
close: function( event ) {
|
179
|
-
var
|
192
|
+
var activeElement,
|
193
|
+
that = this;
|
180
194
|
|
181
195
|
if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
|
182
196
|
return;
|
183
197
|
}
|
184
198
|
|
185
199
|
this._isOpen = false;
|
200
|
+
this._focusedElement = null;
|
186
201
|
this._destroyOverlay();
|
202
|
+
this._untrackInstance();
|
203
|
+
|
204
|
+
if ( !this.opener.filter( ":focusable" ).focus().length ) {
|
187
205
|
|
188
|
-
|
189
|
-
//
|
190
|
-
|
191
|
-
|
192
|
-
|
206
|
+
// support: IE9
|
207
|
+
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
|
208
|
+
try {
|
209
|
+
activeElement = this.document[ 0 ].activeElement;
|
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 ) {}
|
193
221
|
}
|
194
222
|
|
195
223
|
this._hide( this.uiDialog, this.options.hide, function() {
|
@@ -206,7 +234,17 @@ $.widget( "ui.dialog", {
|
|
206
234
|
},
|
207
235
|
|
208
236
|
_moveToTop: function( event, silent ) {
|
209
|
-
var moved =
|
237
|
+
var moved = false,
|
238
|
+
zIndicies = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
|
239
|
+
return +$( this ).css( "z-index" );
|
240
|
+
}).get(),
|
241
|
+
zIndexMax = Math.max.apply( null, zIndicies );
|
242
|
+
|
243
|
+
if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
|
244
|
+
this.uiDialog.css( "z-index", zIndexMax + 1 );
|
245
|
+
moved = true;
|
246
|
+
}
|
247
|
+
|
210
248
|
if ( moved && !silent ) {
|
211
249
|
this._trigger( "focus", event );
|
212
250
|
}
|
@@ -214,6 +252,7 @@ $.widget( "ui.dialog", {
|
|
214
252
|
},
|
215
253
|
|
216
254
|
open: function() {
|
255
|
+
var that = this;
|
217
256
|
if ( this._isOpen ) {
|
218
257
|
if ( this._moveToTop() ) {
|
219
258
|
this._focusTabbable();
|
@@ -221,37 +260,54 @@ $.widget( "ui.dialog", {
|
|
221
260
|
return;
|
222
261
|
}
|
223
262
|
|
224
|
-
this.
|
263
|
+
this._isOpen = true;
|
264
|
+
this.opener = $( this.document[ 0 ].activeElement );
|
225
265
|
|
226
266
|
this._size();
|
227
267
|
this._position();
|
228
268
|
this._createOverlay();
|
229
269
|
this._moveToTop( null, true );
|
230
|
-
this._show( this.uiDialog, this.options.show );
|
231
270
|
|
232
|
-
|
271
|
+
// Ensure the overlay is moved to the top with the dialog, but only when
|
272
|
+
// opening. The overlay shouldn't move after the dialog is open so that
|
273
|
+
// modeless dialogs opened after the modal dialog stack properly.
|
274
|
+
if ( this.overlay ) {
|
275
|
+
this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
|
276
|
+
}
|
233
277
|
|
234
|
-
this.
|
235
|
-
|
236
|
-
|
278
|
+
this._show( this.uiDialog, this.options.show, function() {
|
279
|
+
that._focusTabbable();
|
280
|
+
that._trigger( "focus" );
|
281
|
+
});
|
282
|
+
|
283
|
+
// Track the dialog immediately upon openening in case a focus event
|
284
|
+
// somehow occurs outside of the dialog before an element inside the
|
285
|
+
// dialog is focused (#10152)
|
286
|
+
this._makeFocusTarget();
|
287
|
+
|
288
|
+
this._trigger( "open" );
|
237
289
|
},
|
238
290
|
|
239
291
|
_focusTabbable: function() {
|
240
292
|
// Set focus to the first match:
|
241
|
-
// 1.
|
242
|
-
// 2.
|
243
|
-
// 3. Tabbable element inside the
|
244
|
-
// 4.
|
245
|
-
// 5. The
|
246
|
-
|
293
|
+
// 1. An element that was focused previously
|
294
|
+
// 2. First element inside the dialog matching [autofocus]
|
295
|
+
// 3. Tabbable element inside the content element
|
296
|
+
// 4. Tabbable element inside the buttonpane
|
297
|
+
// 5. The close button
|
298
|
+
// 6. The dialog itself
|
299
|
+
var hasFocus = this._focusedElement;
|
300
|
+
if ( !hasFocus ) {
|
301
|
+
hasFocus = this.element.find( "[autofocus]" );
|
302
|
+
}
|
247
303
|
if ( !hasFocus.length ) {
|
248
|
-
hasFocus = this.element.find(":tabbable");
|
304
|
+
hasFocus = this.element.find( ":tabbable" );
|
249
305
|
}
|
250
306
|
if ( !hasFocus.length ) {
|
251
|
-
hasFocus = this.uiDialogButtonPane.find(":tabbable");
|
307
|
+
hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
|
252
308
|
}
|
253
309
|
if ( !hasFocus.length ) {
|
254
|
-
hasFocus = this.uiDialogTitlebarClose.filter(":tabbable");
|
310
|
+
hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
|
255
311
|
}
|
256
312
|
if ( !hasFocus.length ) {
|
257
313
|
hasFocus = this.uiDialog;
|
@@ -298,18 +354,22 @@ $.widget( "ui.dialog", {
|
|
298
354
|
}
|
299
355
|
|
300
356
|
// prevent tabbing out of dialogs
|
301
|
-
if ( event.keyCode !== $.ui.keyCode.TAB ) {
|
357
|
+
if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
|
302
358
|
return;
|
303
359
|
}
|
304
|
-
var tabbables = this.uiDialog.find(":tabbable"),
|
305
|
-
first = tabbables.filter(":first"),
|
306
|
-
last
|
360
|
+
var tabbables = this.uiDialog.find( ":tabbable" ),
|
361
|
+
first = tabbables.filter( ":first" ),
|
362
|
+
last = tabbables.filter( ":last" );
|
307
363
|
|
308
364
|
if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
|
309
|
-
|
365
|
+
this._delay(function() {
|
366
|
+
first.focus();
|
367
|
+
});
|
310
368
|
event.preventDefault();
|
311
369
|
} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
|
312
|
-
|
370
|
+
this._delay(function() {
|
371
|
+
last.focus();
|
372
|
+
});
|
313
373
|
event.preventDefault();
|
314
374
|
}
|
315
375
|
},
|
@@ -323,9 +383,9 @@ $.widget( "ui.dialog", {
|
|
323
383
|
// We assume that any existing aria-describedby attribute means
|
324
384
|
// that the dialog content is marked up properly
|
325
385
|
// otherwise we brute force the content as the description
|
326
|
-
if ( !this.element.find("[aria-describedby]").length ) {
|
386
|
+
if ( !this.element.find( "[aria-describedby]" ).length ) {
|
327
387
|
this.uiDialog.attr({
|
328
|
-
"aria-describedby": this.element.uniqueId().attr("id")
|
388
|
+
"aria-describedby": this.element.uniqueId().attr( "id" )
|
329
389
|
});
|
330
390
|
}
|
331
391
|
},
|
@@ -333,22 +393,25 @@ $.widget( "ui.dialog", {
|
|
333
393
|
_createTitlebar: function() {
|
334
394
|
var uiDialogTitle;
|
335
395
|
|
336
|
-
this.uiDialogTitlebar = $("<div>")
|
337
|
-
.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
|
396
|
+
this.uiDialogTitlebar = $( "<div>" )
|
397
|
+
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
|
338
398
|
.prependTo( this.uiDialog );
|
339
399
|
this._on( this.uiDialogTitlebar, {
|
340
400
|
mousedown: function( event ) {
|
341
401
|
// Don't prevent click on close button (#8838)
|
342
402
|
// Focusing a dialog that is partially scrolled out of view
|
343
403
|
// causes the browser to scroll it into view, preventing the click event
|
344
|
-
if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) {
|
404
|
+
if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
|
345
405
|
// Dialog isn't getting focus when dragging (#8063)
|
346
406
|
this.uiDialog.focus();
|
347
407
|
}
|
348
408
|
}
|
349
409
|
});
|
350
410
|
|
351
|
-
|
411
|
+
// support: IE
|
412
|
+
// Use type="button" to prevent enter keypresses in textboxes from closing the
|
413
|
+
// dialog in IE (#9312)
|
414
|
+
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
|
352
415
|
.button({
|
353
416
|
label: this.options.closeText,
|
354
417
|
icons: {
|
@@ -356,7 +419,7 @@ $.widget( "ui.dialog", {
|
|
356
419
|
},
|
357
420
|
text: false
|
358
421
|
})
|
359
|
-
.addClass("ui-dialog-titlebar-close")
|
422
|
+
.addClass( "ui-dialog-titlebar-close" )
|
360
423
|
.appendTo( this.uiDialogTitlebar );
|
361
424
|
this._on( this.uiDialogTitlebarClose, {
|
362
425
|
click: function( event ) {
|
@@ -365,30 +428,30 @@ $.widget( "ui.dialog", {
|
|
365
428
|
}
|
366
429
|
});
|
367
430
|
|
368
|
-
uiDialogTitle = $("<span>")
|
431
|
+
uiDialogTitle = $( "<span>" )
|
369
432
|
.uniqueId()
|
370
|
-
.addClass("ui-dialog-title")
|
433
|
+
.addClass( "ui-dialog-title" )
|
371
434
|
.prependTo( this.uiDialogTitlebar );
|
372
435
|
this._title( uiDialogTitle );
|
373
436
|
|
374
437
|
this.uiDialog.attr({
|
375
|
-
"aria-labelledby": uiDialogTitle.attr("id")
|
438
|
+
"aria-labelledby": uiDialogTitle.attr( "id" )
|
376
439
|
});
|
377
440
|
},
|
378
441
|
|
379
442
|
_title: function( title ) {
|
380
443
|
if ( !this.options.title ) {
|
381
|
-
title.html(" ");
|
444
|
+
title.html( " " );
|
382
445
|
}
|
383
446
|
title.text( this.options.title );
|
384
447
|
},
|
385
448
|
|
386
449
|
_createButtonPane: function() {
|
387
|
-
this.uiDialogButtonPane = $("<div>")
|
388
|
-
.addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
|
450
|
+
this.uiDialogButtonPane = $( "<div>" )
|
451
|
+
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
|
389
452
|
|
390
|
-
this.uiButtonSet = $("<div>")
|
391
|
-
.addClass("ui-dialog-buttonset")
|
453
|
+
this.uiButtonSet = $( "<div>" )
|
454
|
+
.addClass( "ui-dialog-buttonset" )
|
392
455
|
.appendTo( this.uiDialogButtonPane );
|
393
456
|
|
394
457
|
this._createButtons();
|
@@ -402,8 +465,8 @@ $.widget( "ui.dialog", {
|
|
402
465
|
this.uiDialogButtonPane.remove();
|
403
466
|
this.uiButtonSet.empty();
|
404
467
|
|
405
|
-
if ( $.isEmptyObject( buttons ) ) {
|
406
|
-
this.uiDialog.removeClass("ui-dialog-buttons");
|
468
|
+
if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
|
469
|
+
this.uiDialog.removeClass( "ui-dialog-buttons" );
|
407
470
|
return;
|
408
471
|
}
|
409
472
|
|
@@ -417,7 +480,7 @@ $.widget( "ui.dialog", {
|
|
417
480
|
// Change the context for the click callback to be the main element
|
418
481
|
click = props.click;
|
419
482
|
props.click = function() {
|
420
|
-
click.apply( that.element[0], arguments );
|
483
|
+
click.apply( that.element[ 0 ], arguments );
|
421
484
|
};
|
422
485
|
buttonOptions = {
|
423
486
|
icons: props.icons,
|
@@ -429,7 +492,7 @@ $.widget( "ui.dialog", {
|
|
429
492
|
.button( buttonOptions )
|
430
493
|
.appendTo( that.uiButtonSet );
|
431
494
|
});
|
432
|
-
this.uiDialog.addClass("ui-dialog-buttons");
|
495
|
+
this.uiDialog.addClass( "ui-dialog-buttons" );
|
433
496
|
this.uiDialogButtonPane.appendTo( this.uiDialog );
|
434
497
|
},
|
435
498
|
|
@@ -449,18 +512,25 @@ $.widget( "ui.dialog", {
|
|
449
512
|
handle: ".ui-dialog-titlebar",
|
450
513
|
containment: "document",
|
451
514
|
start: function( event, ui ) {
|
452
|
-
$( this ).addClass("ui-dialog-dragging");
|
515
|
+
$( this ).addClass( "ui-dialog-dragging" );
|
516
|
+
that._blockFrames();
|
453
517
|
that._trigger( "dragStart", event, filteredUi( ui ) );
|
454
518
|
},
|
455
519
|
drag: function( event, ui ) {
|
456
520
|
that._trigger( "drag", event, filteredUi( ui ) );
|
457
521
|
},
|
458
522
|
stop: function( event, ui ) {
|
459
|
-
|
460
|
-
ui.
|
461
|
-
|
462
|
-
|
463
|
-
|
523
|
+
var left = ui.offset.left - that.document.scrollLeft(),
|
524
|
+
top = ui.offset.top - that.document.scrollTop();
|
525
|
+
|
526
|
+
options.position = {
|
527
|
+
my: "left top",
|
528
|
+
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
529
|
+
"top" + (top >= 0 ? "+" : "") + top,
|
530
|
+
of: that.window
|
531
|
+
};
|
532
|
+
$( this ).removeClass( "ui-dialog-dragging" );
|
533
|
+
that._unblockFrames();
|
464
534
|
that._trigger( "dragStop", event, filteredUi( ui ) );
|
465
535
|
}
|
466
536
|
});
|
@@ -496,22 +566,65 @@ $.widget( "ui.dialog", {
|
|
496
566
|
minHeight: this._minHeight(),
|
497
567
|
handles: resizeHandles,
|
498
568
|
start: function( event, ui ) {
|
499
|
-
$( this ).addClass("ui-dialog-resizing");
|
569
|
+
$( this ).addClass( "ui-dialog-resizing" );
|
570
|
+
that._blockFrames();
|
500
571
|
that._trigger( "resizeStart", event, filteredUi( ui ) );
|
501
572
|
},
|
502
573
|
resize: function( event, ui ) {
|
503
574
|
that._trigger( "resize", event, filteredUi( ui ) );
|
504
575
|
},
|
505
576
|
stop: function( event, ui ) {
|
506
|
-
|
507
|
-
|
508
|
-
|
577
|
+
var offset = that.uiDialog.offset(),
|
578
|
+
left = offset.left - that.document.scrollLeft(),
|
579
|
+
top = offset.top - that.document.scrollTop();
|
580
|
+
|
581
|
+
options.height = that.uiDialog.height();
|
582
|
+
options.width = that.uiDialog.width();
|
583
|
+
options.position = {
|
584
|
+
my: "left top",
|
585
|
+
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
586
|
+
"top" + (top >= 0 ? "+" : "") + top,
|
587
|
+
of: that.window
|
588
|
+
};
|
589
|
+
$( this ).removeClass( "ui-dialog-resizing" );
|
590
|
+
that._unblockFrames();
|
509
591
|
that._trigger( "resizeStop", event, filteredUi( ui ) );
|
510
592
|
}
|
511
593
|
})
|
512
594
|
.css( "position", position );
|
513
595
|
},
|
514
596
|
|
597
|
+
_trackFocus: function() {
|
598
|
+
this._on( this.widget(), {
|
599
|
+
focusin: function( event ) {
|
600
|
+
this._makeFocusTarget();
|
601
|
+
this._focusedElement = $( event.target );
|
602
|
+
}
|
603
|
+
});
|
604
|
+
},
|
605
|
+
|
606
|
+
_makeFocusTarget: function() {
|
607
|
+
this._untrackInstance();
|
608
|
+
this._trackingInstances().unshift( this );
|
609
|
+
},
|
610
|
+
|
611
|
+
_untrackInstance: function() {
|
612
|
+
var instances = this._trackingInstances(),
|
613
|
+
exists = $.inArray( this, instances );
|
614
|
+
if ( exists !== -1 ) {
|
615
|
+
instances.splice( exists, 1 );
|
616
|
+
}
|
617
|
+
},
|
618
|
+
|
619
|
+
_trackingInstances: function() {
|
620
|
+
var instances = this.document.data( "ui-dialog-instances" );
|
621
|
+
if ( !instances ) {
|
622
|
+
instances = [];
|
623
|
+
this.document.data( "ui-dialog-instances", instances );
|
624
|
+
}
|
625
|
+
return instances;
|
626
|
+
},
|
627
|
+
|
515
628
|
_minHeight: function() {
|
516
629
|
var options = this.options;
|
517
630
|
|
@@ -522,7 +635,7 @@ $.widget( "ui.dialog", {
|
|
522
635
|
|
523
636
|
_position: function() {
|
524
637
|
// Need to show the dialog to get the actual offset in the position plugin
|
525
|
-
var isVisible = this.uiDialog.is(":visible");
|
638
|
+
var isVisible = this.uiDialog.is( ":visible" );
|
526
639
|
if ( !isVisible ) {
|
527
640
|
this.uiDialog.show();
|
528
641
|
}
|
@@ -540,10 +653,10 @@ $.widget( "ui.dialog", {
|
|
540
653
|
$.each( options, function( key, value ) {
|
541
654
|
that._setOption( key, value );
|
542
655
|
|
543
|
-
if ( key in sizeRelatedOptions ) {
|
656
|
+
if ( key in that.sizeRelatedOptions ) {
|
544
657
|
resize = true;
|
545
658
|
}
|
546
|
-
if ( key in resizableRelatedOptions ) {
|
659
|
+
if ( key in that.resizableRelatedOptions ) {
|
547
660
|
resizableOptions[ key ] = value;
|
548
661
|
}
|
549
662
|
});
|
@@ -552,13 +665,12 @@ $.widget( "ui.dialog", {
|
|
552
665
|
this._size();
|
553
666
|
this._position();
|
554
667
|
}
|
555
|
-
if ( this.uiDialog.is(":data(ui-resizable)") ) {
|
668
|
+
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
|
556
669
|
this.uiDialog.resizable( "option", resizableOptions );
|
557
670
|
}
|
558
671
|
},
|
559
672
|
|
560
673
|
_setOption: function( key, value ) {
|
561
|
-
/*jshint maxcomplexity:15*/
|
562
674
|
var isDraggable, isResizable,
|
563
675
|
uiDialog = this.uiDialog;
|
564
676
|
|
@@ -590,9 +702,9 @@ $.widget( "ui.dialog", {
|
|
590
702
|
}
|
591
703
|
|
592
704
|
if ( key === "draggable" ) {
|
593
|
-
isDraggable = uiDialog.is(":data(ui-draggable)");
|
705
|
+
isDraggable = uiDialog.is( ":data(ui-draggable)" );
|
594
706
|
if ( isDraggable && !value ) {
|
595
|
-
uiDialog.draggable("destroy");
|
707
|
+
uiDialog.draggable( "destroy" );
|
596
708
|
}
|
597
709
|
|
598
710
|
if ( !isDraggable && value ) {
|
@@ -606,9 +718,9 @@ $.widget( "ui.dialog", {
|
|
606
718
|
|
607
719
|
if ( key === "resizable" ) {
|
608
720
|
// currently resizable, becoming non-resizable
|
609
|
-
isResizable = uiDialog.is(":data(ui-resizable)");
|
721
|
+
isResizable = uiDialog.is( ":data(ui-resizable)" );
|
610
722
|
if ( isResizable && !value ) {
|
611
|
-
uiDialog.resizable("destroy");
|
723
|
+
uiDialog.resizable( "destroy" );
|
612
724
|
}
|
613
725
|
|
614
726
|
// currently resizable, changing handles
|
@@ -623,7 +735,7 @@ $.widget( "ui.dialog", {
|
|
623
735
|
}
|
624
736
|
|
625
737
|
if ( key === "title" ) {
|
626
|
-
this._title( this.uiDialogTitlebar.find(".ui-dialog-title") );
|
738
|
+
this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
|
627
739
|
}
|
628
740
|
},
|
629
741
|
|
@@ -667,43 +779,82 @@ $.widget( "ui.dialog", {
|
|
667
779
|
this.element.height( Math.max( 0, options.height - nonContentHeight ) );
|
668
780
|
}
|
669
781
|
|
670
|
-
if (this.uiDialog.is(":data(ui-resizable)") ) {
|
782
|
+
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
|
671
783
|
this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
|
672
784
|
}
|
673
785
|
},
|
674
786
|
|
787
|
+
_blockFrames: function() {
|
788
|
+
this.iframeBlocks = this.document.find( "iframe" ).map(function() {
|
789
|
+
var iframe = $( this );
|
790
|
+
|
791
|
+
return $( "<div>" )
|
792
|
+
.css({
|
793
|
+
position: "absolute",
|
794
|
+
width: iframe.outerWidth(),
|
795
|
+
height: iframe.outerHeight()
|
796
|
+
})
|
797
|
+
.appendTo( iframe.parent() )
|
798
|
+
.offset( iframe.offset() )[0];
|
799
|
+
});
|
800
|
+
},
|
801
|
+
|
802
|
+
_unblockFrames: function() {
|
803
|
+
if ( this.iframeBlocks ) {
|
804
|
+
this.iframeBlocks.remove();
|
805
|
+
delete this.iframeBlocks;
|
806
|
+
}
|
807
|
+
},
|
808
|
+
|
809
|
+
_allowInteraction: function( event ) {
|
810
|
+
if ( $( event.target ).closest( ".ui-dialog" ).length ) {
|
811
|
+
return true;
|
812
|
+
}
|
813
|
+
|
814
|
+
// TODO: Remove hack when datepicker implements
|
815
|
+
// the .ui-front logic (#8989)
|
816
|
+
return !!$( event.target ).closest( ".ui-datepicker" ).length;
|
817
|
+
},
|
818
|
+
|
675
819
|
_createOverlay: function() {
|
676
820
|
if ( !this.options.modal ) {
|
677
821
|
return;
|
678
822
|
}
|
679
823
|
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
824
|
+
// We use a delay in case the overlay is created from an
|
825
|
+
// event that we're going to be cancelling (#2804)
|
826
|
+
var isOpening = true;
|
827
|
+
this._delay(function() {
|
828
|
+
isOpening = false;
|
829
|
+
});
|
830
|
+
|
831
|
+
if ( !this.document.data( "ui-dialog-overlays" ) ) {
|
832
|
+
|
833
|
+
// Prevent use of anchors and inputs
|
834
|
+
// Using _on() for an event handler shared across many instances is
|
835
|
+
// safe because the dialogs stack and must be closed in reverse order
|
836
|
+
this._on( this.document, {
|
837
|
+
focusin: function( event ) {
|
838
|
+
if ( isOpening ) {
|
839
|
+
return;
|
840
|
+
}
|
841
|
+
|
842
|
+
if ( !this._allowInteraction( event ) ) {
|
843
|
+
event.preventDefault();
|
844
|
+
this._trackingInstances()[ 0 ]._focusTabbable();
|
845
|
+
}
|
696
846
|
}
|
697
847
|
});
|
698
848
|
}
|
699
849
|
|
700
|
-
this.overlay = $("<div>")
|
701
|
-
.addClass("ui-widget-overlay ui-front")
|
702
|
-
.appendTo( this.
|
850
|
+
this.overlay = $( "<div>" )
|
851
|
+
.addClass( "ui-widget-overlay ui-front" )
|
852
|
+
.appendTo( this._appendTo() );
|
703
853
|
this._on( this.overlay, {
|
704
854
|
mousedown: "_keepFocus"
|
705
855
|
});
|
706
|
-
|
856
|
+
this.document.data( "ui-dialog-overlays",
|
857
|
+
(this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
|
707
858
|
},
|
708
859
|
|
709
860
|
_destroyOverlay: function() {
|
@@ -711,64 +862,21 @@ $.widget( "ui.dialog", {
|
|
711
862
|
return;
|
712
863
|
}
|
713
864
|
|
714
|
-
|
715
|
-
|
716
|
-
this._off( this.document, "focusin" );
|
717
|
-
}
|
718
|
-
this.overlay.remove();
|
719
|
-
}
|
720
|
-
});
|
721
|
-
|
722
|
-
$.ui.dialog.overlayInstances = 0;
|
723
|
-
|
724
|
-
// DEPRECATED
|
725
|
-
if ( $.uiBackCompat !== false ) {
|
726
|
-
// position option with array notation
|
727
|
-
// just override with old implementation
|
728
|
-
$.widget( "ui.dialog", $.ui.dialog, {
|
729
|
-
_position: function() {
|
730
|
-
var position = this.options.position,
|
731
|
-
myAt = [],
|
732
|
-
offset = [ 0, 0 ],
|
733
|
-
isVisible;
|
734
|
-
|
735
|
-
if ( position ) {
|
736
|
-
if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
|
737
|
-
myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
|
738
|
-
if ( myAt.length === 1 ) {
|
739
|
-
myAt[1] = myAt[0];
|
740
|
-
}
|
865
|
+
if ( this.overlay ) {
|
866
|
+
var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
|
741
867
|
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
}
|
747
|
-
});
|
748
|
-
|
749
|
-
position = {
|
750
|
-
my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
|
751
|
-
myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
|
752
|
-
at: myAt.join(" ")
|
753
|
-
};
|
754
|
-
}
|
755
|
-
|
756
|
-
position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
|
868
|
+
if ( !overlays ) {
|
869
|
+
this.document
|
870
|
+
.unbind( "focusin" )
|
871
|
+
.removeData( "ui-dialog-overlays" );
|
757
872
|
} else {
|
758
|
-
|
873
|
+
this.document.data( "ui-dialog-overlays", overlays );
|
759
874
|
}
|
760
875
|
|
761
|
-
|
762
|
-
|
763
|
-
if ( !isVisible ) {
|
764
|
-
this.uiDialog.show();
|
765
|
-
}
|
766
|
-
this.uiDialog.position( position );
|
767
|
-
if ( !isVisible ) {
|
768
|
-
this.uiDialog.hide();
|
769
|
-
}
|
876
|
+
this.overlay.remove();
|
877
|
+
this.overlay = null;
|
770
878
|
}
|
771
|
-
}
|
772
|
-
}
|
879
|
+
}
|
880
|
+
});
|
773
881
|
|
774
|
-
}
|
882
|
+
}));
|