jquery-ui-rails 5.0.4 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitmodules +1 -1
- data/.travis.yml +1 -1
- data/History.md +23 -2
- data/README.md +67 -50
- data/Rakefile +58 -29
- data/VERSIONS.md +4 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/core.js +15 -304
- data/app/assets/javascripts/jquery-ui/data.js +45 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
- data/app/assets/javascripts/jquery-ui/effect.js +565 -891
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +89 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +83 -0
- data/app/assets/javascripts/jquery-ui/form.js +25 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
- data/app/assets/javascripts/jquery-ui/ie.js +20 -0
- data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
- data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/app/assets/javascripts/jquery-ui/labels.js +71 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/app/assets/javascripts/jquery-ui/position.js +107 -111
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
- data/app/assets/javascripts/jquery-ui/version.js +20 -0
- data/app/assets/javascripts/jquery-ui/widget.js +359 -163
- data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +200 -163
- data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +153 -106
- data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +289 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2243 -0
- data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +267 -181
- data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +430 -294
- data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +174 -84
- data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +228 -158
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +63 -41
- data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1225 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
- data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +259 -177
- data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +199 -160
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1623 -0
- data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +184 -114
- data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +258 -211
- data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +165 -100
- data/app/assets/javascripts/jquery-ui.js +53 -33
- data/app/assets/stylesheets/jquery-ui/accordion.css +1 -15
- data/app/assets/stylesheets/jquery-ui/all.css +1 -1
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -3
- data/app/assets/stylesheets/jquery-ui/base.css +3 -1
- data/app/assets/stylesheets/jquery-ui/button.css +35 -68
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +12 -8
- data/app/assets/stylesheets/jquery-ui/datepicker.css +11 -2
- data/app/assets/stylesheets/jquery-ui/dialog.css +38 -11
- data/app/assets/stylesheets/jquery-ui/draggable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/menu.css +7 -7
- data/app/assets/stylesheets/jquery-ui/progressbar.css +2 -3
- data/app/assets/stylesheets/jquery-ui/resizable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +11 -22
- data/app/assets/stylesheets/jquery-ui/slider.css +2 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/spinner.css +7 -22
- data/app/assets/stylesheets/jquery-ui/tabs.css +1 -2
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +121 -92
- data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +153 -146
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/button.js +0 -414
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +0 -73
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +0 -39
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +0 -40
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker.js +0 -2086
- data/app/assets/javascripts/jquery-ui/effect-blind.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-bounce.js +0 -125
- data/app/assets/javascripts/jquery-ui/effect-clip.js +0 -79
- data/app/assets/javascripts/jquery-ui/effect-drop.js +0 -77
- data/app/assets/javascripts/jquery-ui/effect-explode.js +0 -109
- data/app/assets/javascripts/jquery-ui/effect-fade.js +0 -42
- data/app/assets/javascripts/jquery-ui/effect-fold.js +0 -88
- data/app/assets/javascripts/jquery-ui/effect-highlight.js +0 -62
- data/app/assets/javascripts/jquery-ui/effect-puff.js +0 -63
- data/app/assets/javascripts/jquery-ui/effect-pulsate.js +0 -75
- data/app/assets/javascripts/jquery-ui/effect-scale.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-shake.js +0 -86
- data/app/assets/javascripts/jquery-ui/effect-size.js +0 -235
- data/app/assets/javascripts/jquery-ui/effect-slide.js +0 -76
- data/app/assets/javascripts/jquery-ui/effect-transfer.js +0 -59
- data/app/assets/javascripts/jquery-ui/mouse.js +0 -202
- data/app/assets/javascripts/jquery-ui/resizable.js +0 -1183
- data/app/assets/javascripts/jquery-ui/selectable.js +0 -291
- data/app/assets/javascripts/jquery-ui/sortable.js +0 -1308
@@ -1,702 +1,56 @@
|
|
1
|
+
//= require jquery-ui/jquery-var-for-color
|
2
|
+
//= require jquery-ui/vendor/jquery-color/jquery.color
|
3
|
+
//= require jquery-ui/version
|
4
|
+
|
1
5
|
/*!
|
2
|
-
* jQuery UI Effects 1.
|
6
|
+
* jQuery UI Effects 1.13.0
|
3
7
|
* http://jqueryui.com
|
4
8
|
*
|
5
9
|
* Copyright jQuery Foundation and other contributors
|
6
10
|
* Released under the MIT license.
|
7
11
|
* http://jquery.org/license
|
8
|
-
*
|
9
|
-
* http://api.jqueryui.com/category/effects-core/
|
10
12
|
*/
|
11
|
-
|
13
|
+
|
14
|
+
//>>label: Effects Core
|
15
|
+
//>>group: Effects
|
16
|
+
/* eslint-disable max-len */
|
17
|
+
//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
|
18
|
+
/* eslint-enable max-len */
|
19
|
+
//>>docs: http://api.jqueryui.com/category/effects-core/
|
20
|
+
//>>demos: http://jqueryui.com/effect/
|
21
|
+
|
22
|
+
( function( factory ) {
|
23
|
+
"use strict";
|
24
|
+
|
12
25
|
if ( typeof define === "function" && define.amd ) {
|
13
26
|
|
14
27
|
// AMD. Register as an anonymous module.
|
15
|
-
define( [
|
28
|
+
define( [
|
29
|
+
"jquery",
|
30
|
+
"./jquery-var-for-color",
|
31
|
+
"./vendor/jquery-color/jquery.color",
|
32
|
+
"./version"
|
33
|
+
], factory );
|
16
34
|
} else {
|
17
35
|
|
18
36
|
// Browser globals
|
19
37
|
factory( jQuery );
|
20
38
|
}
|
21
|
-
}(function( $ ) {
|
39
|
+
} )( function( $ ) {
|
40
|
+
"use strict";
|
22
41
|
|
23
42
|
var dataSpace = "ui-effects-",
|
24
|
-
|
25
|
-
|
26
|
-
// global may not exist with AMD and a custom build (#10199)
|
27
|
-
jQuery = $;
|
43
|
+
dataSpaceStyle = "ui-effects-style",
|
44
|
+
dataSpaceAnimated = "ui-effects-animated";
|
28
45
|
|
29
46
|
$.effects = {
|
30
47
|
effect: {}
|
31
48
|
};
|
32
49
|
|
33
|
-
/*!
|
34
|
-
* jQuery Color Animations v2.1.2
|
35
|
-
* https://github.com/jquery/jquery-color
|
36
|
-
*
|
37
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
38
|
-
* Released under the MIT license.
|
39
|
-
* http://jquery.org/license
|
40
|
-
*
|
41
|
-
* Date: Wed Jan 16 08:47:09 2013 -0600
|
42
|
-
*/
|
43
|
-
(function( jQuery, undefined ) {
|
44
|
-
|
45
|
-
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
|
46
|
-
|
47
|
-
// plusequals test for += 100 -= 100
|
48
|
-
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
|
49
|
-
// a set of RE's that can match strings and generate color tuples.
|
50
|
-
stringParsers = [ {
|
51
|
-
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
52
|
-
parse: function( execResult ) {
|
53
|
-
return [
|
54
|
-
execResult[ 1 ],
|
55
|
-
execResult[ 2 ],
|
56
|
-
execResult[ 3 ],
|
57
|
-
execResult[ 4 ]
|
58
|
-
];
|
59
|
-
}
|
60
|
-
}, {
|
61
|
-
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
62
|
-
parse: function( execResult ) {
|
63
|
-
return [
|
64
|
-
execResult[ 1 ] * 2.55,
|
65
|
-
execResult[ 2 ] * 2.55,
|
66
|
-
execResult[ 3 ] * 2.55,
|
67
|
-
execResult[ 4 ]
|
68
|
-
];
|
69
|
-
}
|
70
|
-
}, {
|
71
|
-
// this regex ignores A-F because it's compared against an already lowercased string
|
72
|
-
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
|
73
|
-
parse: function( execResult ) {
|
74
|
-
return [
|
75
|
-
parseInt( execResult[ 1 ], 16 ),
|
76
|
-
parseInt( execResult[ 2 ], 16 ),
|
77
|
-
parseInt( execResult[ 3 ], 16 )
|
78
|
-
];
|
79
|
-
}
|
80
|
-
}, {
|
81
|
-
// this regex ignores A-F because it's compared against an already lowercased string
|
82
|
-
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
|
83
|
-
parse: function( execResult ) {
|
84
|
-
return [
|
85
|
-
parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
|
86
|
-
parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
|
87
|
-
parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
|
88
|
-
];
|
89
|
-
}
|
90
|
-
}, {
|
91
|
-
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
92
|
-
space: "hsla",
|
93
|
-
parse: function( execResult ) {
|
94
|
-
return [
|
95
|
-
execResult[ 1 ],
|
96
|
-
execResult[ 2 ] / 100,
|
97
|
-
execResult[ 3 ] / 100,
|
98
|
-
execResult[ 4 ]
|
99
|
-
];
|
100
|
-
}
|
101
|
-
} ],
|
102
|
-
|
103
|
-
// jQuery.Color( )
|
104
|
-
color = jQuery.Color = function( color, green, blue, alpha ) {
|
105
|
-
return new jQuery.Color.fn.parse( color, green, blue, alpha );
|
106
|
-
},
|
107
|
-
spaces = {
|
108
|
-
rgba: {
|
109
|
-
props: {
|
110
|
-
red: {
|
111
|
-
idx: 0,
|
112
|
-
type: "byte"
|
113
|
-
},
|
114
|
-
green: {
|
115
|
-
idx: 1,
|
116
|
-
type: "byte"
|
117
|
-
},
|
118
|
-
blue: {
|
119
|
-
idx: 2,
|
120
|
-
type: "byte"
|
121
|
-
}
|
122
|
-
}
|
123
|
-
},
|
124
|
-
|
125
|
-
hsla: {
|
126
|
-
props: {
|
127
|
-
hue: {
|
128
|
-
idx: 0,
|
129
|
-
type: "degrees"
|
130
|
-
},
|
131
|
-
saturation: {
|
132
|
-
idx: 1,
|
133
|
-
type: "percent"
|
134
|
-
},
|
135
|
-
lightness: {
|
136
|
-
idx: 2,
|
137
|
-
type: "percent"
|
138
|
-
}
|
139
|
-
}
|
140
|
-
}
|
141
|
-
},
|
142
|
-
propTypes = {
|
143
|
-
"byte": {
|
144
|
-
floor: true,
|
145
|
-
max: 255
|
146
|
-
},
|
147
|
-
"percent": {
|
148
|
-
max: 1
|
149
|
-
},
|
150
|
-
"degrees": {
|
151
|
-
mod: 360,
|
152
|
-
floor: true
|
153
|
-
}
|
154
|
-
},
|
155
|
-
support = color.support = {},
|
156
|
-
|
157
|
-
// element for support tests
|
158
|
-
supportElem = jQuery( "<p>" )[ 0 ],
|
159
|
-
|
160
|
-
// colors = jQuery.Color.names
|
161
|
-
colors,
|
162
|
-
|
163
|
-
// local aliases of functions called often
|
164
|
-
each = jQuery.each;
|
165
|
-
|
166
|
-
// determine rgba support immediately
|
167
|
-
supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
|
168
|
-
support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
|
169
|
-
|
170
|
-
// define cache name and alpha properties
|
171
|
-
// for rgba and hsla spaces
|
172
|
-
each( spaces, function( spaceName, space ) {
|
173
|
-
space.cache = "_" + spaceName;
|
174
|
-
space.props.alpha = {
|
175
|
-
idx: 3,
|
176
|
-
type: "percent",
|
177
|
-
def: 1
|
178
|
-
};
|
179
|
-
});
|
180
|
-
|
181
|
-
function clamp( value, prop, allowEmpty ) {
|
182
|
-
var type = propTypes[ prop.type ] || {};
|
183
|
-
|
184
|
-
if ( value == null ) {
|
185
|
-
return (allowEmpty || !prop.def) ? null : prop.def;
|
186
|
-
}
|
187
|
-
|
188
|
-
// ~~ is an short way of doing floor for positive numbers
|
189
|
-
value = type.floor ? ~~value : parseFloat( value );
|
190
|
-
|
191
|
-
// IE will pass in empty strings as value for alpha,
|
192
|
-
// which will hit this case
|
193
|
-
if ( isNaN( value ) ) {
|
194
|
-
return prop.def;
|
195
|
-
}
|
196
|
-
|
197
|
-
if ( type.mod ) {
|
198
|
-
// we add mod before modding to make sure that negatives values
|
199
|
-
// get converted properly: -10 -> 350
|
200
|
-
return (value + type.mod) % type.mod;
|
201
|
-
}
|
202
|
-
|
203
|
-
// for now all property types without mod have min and max
|
204
|
-
return 0 > value ? 0 : type.max < value ? type.max : value;
|
205
|
-
}
|
206
|
-
|
207
|
-
function stringParse( string ) {
|
208
|
-
var inst = color(),
|
209
|
-
rgba = inst._rgba = [];
|
210
|
-
|
211
|
-
string = string.toLowerCase();
|
212
|
-
|
213
|
-
each( stringParsers, function( i, parser ) {
|
214
|
-
var parsed,
|
215
|
-
match = parser.re.exec( string ),
|
216
|
-
values = match && parser.parse( match ),
|
217
|
-
spaceName = parser.space || "rgba";
|
218
|
-
|
219
|
-
if ( values ) {
|
220
|
-
parsed = inst[ spaceName ]( values );
|
221
|
-
|
222
|
-
// if this was an rgba parse the assignment might happen twice
|
223
|
-
// oh well....
|
224
|
-
inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
|
225
|
-
rgba = inst._rgba = parsed._rgba;
|
226
|
-
|
227
|
-
// exit each( stringParsers ) here because we matched
|
228
|
-
return false;
|
229
|
-
}
|
230
|
-
});
|
231
|
-
|
232
|
-
// Found a stringParser that handled it
|
233
|
-
if ( rgba.length ) {
|
234
|
-
|
235
|
-
// if this came from a parsed string, force "transparent" when alpha is 0
|
236
|
-
// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
|
237
|
-
if ( rgba.join() === "0,0,0,0" ) {
|
238
|
-
jQuery.extend( rgba, colors.transparent );
|
239
|
-
}
|
240
|
-
return inst;
|
241
|
-
}
|
242
|
-
|
243
|
-
// named colors
|
244
|
-
return colors[ string ];
|
245
|
-
}
|
246
|
-
|
247
|
-
color.fn = jQuery.extend( color.prototype, {
|
248
|
-
parse: function( red, green, blue, alpha ) {
|
249
|
-
if ( red === undefined ) {
|
250
|
-
this._rgba = [ null, null, null, null ];
|
251
|
-
return this;
|
252
|
-
}
|
253
|
-
if ( red.jquery || red.nodeType ) {
|
254
|
-
red = jQuery( red ).css( green );
|
255
|
-
green = undefined;
|
256
|
-
}
|
257
|
-
|
258
|
-
var inst = this,
|
259
|
-
type = jQuery.type( red ),
|
260
|
-
rgba = this._rgba = [];
|
261
|
-
|
262
|
-
// more than 1 argument specified - assume ( red, green, blue, alpha )
|
263
|
-
if ( green !== undefined ) {
|
264
|
-
red = [ red, green, blue, alpha ];
|
265
|
-
type = "array";
|
266
|
-
}
|
267
|
-
|
268
|
-
if ( type === "string" ) {
|
269
|
-
return this.parse( stringParse( red ) || colors._default );
|
270
|
-
}
|
271
|
-
|
272
|
-
if ( type === "array" ) {
|
273
|
-
each( spaces.rgba.props, function( key, prop ) {
|
274
|
-
rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
|
275
|
-
});
|
276
|
-
return this;
|
277
|
-
}
|
278
|
-
|
279
|
-
if ( type === "object" ) {
|
280
|
-
if ( red instanceof color ) {
|
281
|
-
each( spaces, function( spaceName, space ) {
|
282
|
-
if ( red[ space.cache ] ) {
|
283
|
-
inst[ space.cache ] = red[ space.cache ].slice();
|
284
|
-
}
|
285
|
-
});
|
286
|
-
} else {
|
287
|
-
each( spaces, function( spaceName, space ) {
|
288
|
-
var cache = space.cache;
|
289
|
-
each( space.props, function( key, prop ) {
|
290
|
-
|
291
|
-
// if the cache doesn't exist, and we know how to convert
|
292
|
-
if ( !inst[ cache ] && space.to ) {
|
293
|
-
|
294
|
-
// if the value was null, we don't need to copy it
|
295
|
-
// if the key was alpha, we don't need to copy it either
|
296
|
-
if ( key === "alpha" || red[ key ] == null ) {
|
297
|
-
return;
|
298
|
-
}
|
299
|
-
inst[ cache ] = space.to( inst._rgba );
|
300
|
-
}
|
301
|
-
|
302
|
-
// this is the only case where we allow nulls for ALL properties.
|
303
|
-
// call clamp with alwaysAllowEmpty
|
304
|
-
inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
|
305
|
-
});
|
306
|
-
|
307
|
-
// everything defined but alpha?
|
308
|
-
if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
|
309
|
-
// use the default of 1
|
310
|
-
inst[ cache ][ 3 ] = 1;
|
311
|
-
if ( space.from ) {
|
312
|
-
inst._rgba = space.from( inst[ cache ] );
|
313
|
-
}
|
314
|
-
}
|
315
|
-
});
|
316
|
-
}
|
317
|
-
return this;
|
318
|
-
}
|
319
|
-
},
|
320
|
-
is: function( compare ) {
|
321
|
-
var is = color( compare ),
|
322
|
-
same = true,
|
323
|
-
inst = this;
|
324
|
-
|
325
|
-
each( spaces, function( _, space ) {
|
326
|
-
var localCache,
|
327
|
-
isCache = is[ space.cache ];
|
328
|
-
if (isCache) {
|
329
|
-
localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
|
330
|
-
each( space.props, function( _, prop ) {
|
331
|
-
if ( isCache[ prop.idx ] != null ) {
|
332
|
-
same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
|
333
|
-
return same;
|
334
|
-
}
|
335
|
-
});
|
336
|
-
}
|
337
|
-
return same;
|
338
|
-
});
|
339
|
-
return same;
|
340
|
-
},
|
341
|
-
_space: function() {
|
342
|
-
var used = [],
|
343
|
-
inst = this;
|
344
|
-
each( spaces, function( spaceName, space ) {
|
345
|
-
if ( inst[ space.cache ] ) {
|
346
|
-
used.push( spaceName );
|
347
|
-
}
|
348
|
-
});
|
349
|
-
return used.pop();
|
350
|
-
},
|
351
|
-
transition: function( other, distance ) {
|
352
|
-
var end = color( other ),
|
353
|
-
spaceName = end._space(),
|
354
|
-
space = spaces[ spaceName ],
|
355
|
-
startColor = this.alpha() === 0 ? color( "transparent" ) : this,
|
356
|
-
start = startColor[ space.cache ] || space.to( startColor._rgba ),
|
357
|
-
result = start.slice();
|
358
|
-
|
359
|
-
end = end[ space.cache ];
|
360
|
-
each( space.props, function( key, prop ) {
|
361
|
-
var index = prop.idx,
|
362
|
-
startValue = start[ index ],
|
363
|
-
endValue = end[ index ],
|
364
|
-
type = propTypes[ prop.type ] || {};
|
365
|
-
|
366
|
-
// if null, don't override start value
|
367
|
-
if ( endValue === null ) {
|
368
|
-
return;
|
369
|
-
}
|
370
|
-
// if null - use end
|
371
|
-
if ( startValue === null ) {
|
372
|
-
result[ index ] = endValue;
|
373
|
-
} else {
|
374
|
-
if ( type.mod ) {
|
375
|
-
if ( endValue - startValue > type.mod / 2 ) {
|
376
|
-
startValue += type.mod;
|
377
|
-
} else if ( startValue - endValue > type.mod / 2 ) {
|
378
|
-
startValue -= type.mod;
|
379
|
-
}
|
380
|
-
}
|
381
|
-
result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
|
382
|
-
}
|
383
|
-
});
|
384
|
-
return this[ spaceName ]( result );
|
385
|
-
},
|
386
|
-
blend: function( opaque ) {
|
387
|
-
// if we are already opaque - return ourself
|
388
|
-
if ( this._rgba[ 3 ] === 1 ) {
|
389
|
-
return this;
|
390
|
-
}
|
391
|
-
|
392
|
-
var rgb = this._rgba.slice(),
|
393
|
-
a = rgb.pop(),
|
394
|
-
blend = color( opaque )._rgba;
|
395
|
-
|
396
|
-
return color( jQuery.map( rgb, function( v, i ) {
|
397
|
-
return ( 1 - a ) * blend[ i ] + a * v;
|
398
|
-
}));
|
399
|
-
},
|
400
|
-
toRgbaString: function() {
|
401
|
-
var prefix = "rgba(",
|
402
|
-
rgba = jQuery.map( this._rgba, function( v, i ) {
|
403
|
-
return v == null ? ( i > 2 ? 1 : 0 ) : v;
|
404
|
-
});
|
405
|
-
|
406
|
-
if ( rgba[ 3 ] === 1 ) {
|
407
|
-
rgba.pop();
|
408
|
-
prefix = "rgb(";
|
409
|
-
}
|
410
|
-
|
411
|
-
return prefix + rgba.join() + ")";
|
412
|
-
},
|
413
|
-
toHslaString: function() {
|
414
|
-
var prefix = "hsla(",
|
415
|
-
hsla = jQuery.map( this.hsla(), function( v, i ) {
|
416
|
-
if ( v == null ) {
|
417
|
-
v = i > 2 ? 1 : 0;
|
418
|
-
}
|
419
|
-
|
420
|
-
// catch 1 and 2
|
421
|
-
if ( i && i < 3 ) {
|
422
|
-
v = Math.round( v * 100 ) + "%";
|
423
|
-
}
|
424
|
-
return v;
|
425
|
-
});
|
426
|
-
|
427
|
-
if ( hsla[ 3 ] === 1 ) {
|
428
|
-
hsla.pop();
|
429
|
-
prefix = "hsl(";
|
430
|
-
}
|
431
|
-
return prefix + hsla.join() + ")";
|
432
|
-
},
|
433
|
-
toHexString: function( includeAlpha ) {
|
434
|
-
var rgba = this._rgba.slice(),
|
435
|
-
alpha = rgba.pop();
|
436
|
-
|
437
|
-
if ( includeAlpha ) {
|
438
|
-
rgba.push( ~~( alpha * 255 ) );
|
439
|
-
}
|
440
|
-
|
441
|
-
return "#" + jQuery.map( rgba, function( v ) {
|
442
|
-
|
443
|
-
// default to 0 when nulls exist
|
444
|
-
v = ( v || 0 ).toString( 16 );
|
445
|
-
return v.length === 1 ? "0" + v : v;
|
446
|
-
}).join("");
|
447
|
-
},
|
448
|
-
toString: function() {
|
449
|
-
return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
|
450
|
-
}
|
451
|
-
});
|
452
|
-
color.fn.parse.prototype = color.fn;
|
453
|
-
|
454
|
-
// hsla conversions adapted from:
|
455
|
-
// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
|
456
|
-
|
457
|
-
function hue2rgb( p, q, h ) {
|
458
|
-
h = ( h + 1 ) % 1;
|
459
|
-
if ( h * 6 < 1 ) {
|
460
|
-
return p + ( q - p ) * h * 6;
|
461
|
-
}
|
462
|
-
if ( h * 2 < 1) {
|
463
|
-
return q;
|
464
|
-
}
|
465
|
-
if ( h * 3 < 2 ) {
|
466
|
-
return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
|
467
|
-
}
|
468
|
-
return p;
|
469
|
-
}
|
470
|
-
|
471
|
-
spaces.hsla.to = function( rgba ) {
|
472
|
-
if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
|
473
|
-
return [ null, null, null, rgba[ 3 ] ];
|
474
|
-
}
|
475
|
-
var r = rgba[ 0 ] / 255,
|
476
|
-
g = rgba[ 1 ] / 255,
|
477
|
-
b = rgba[ 2 ] / 255,
|
478
|
-
a = rgba[ 3 ],
|
479
|
-
max = Math.max( r, g, b ),
|
480
|
-
min = Math.min( r, g, b ),
|
481
|
-
diff = max - min,
|
482
|
-
add = max + min,
|
483
|
-
l = add * 0.5,
|
484
|
-
h, s;
|
485
|
-
|
486
|
-
if ( min === max ) {
|
487
|
-
h = 0;
|
488
|
-
} else if ( r === max ) {
|
489
|
-
h = ( 60 * ( g - b ) / diff ) + 360;
|
490
|
-
} else if ( g === max ) {
|
491
|
-
h = ( 60 * ( b - r ) / diff ) + 120;
|
492
|
-
} else {
|
493
|
-
h = ( 60 * ( r - g ) / diff ) + 240;
|
494
|
-
}
|
495
|
-
|
496
|
-
// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
|
497
|
-
// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
|
498
|
-
if ( diff === 0 ) {
|
499
|
-
s = 0;
|
500
|
-
} else if ( l <= 0.5 ) {
|
501
|
-
s = diff / add;
|
502
|
-
} else {
|
503
|
-
s = diff / ( 2 - add );
|
504
|
-
}
|
505
|
-
return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
|
506
|
-
};
|
507
|
-
|
508
|
-
spaces.hsla.from = function( hsla ) {
|
509
|
-
if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
|
510
|
-
return [ null, null, null, hsla[ 3 ] ];
|
511
|
-
}
|
512
|
-
var h = hsla[ 0 ] / 360,
|
513
|
-
s = hsla[ 1 ],
|
514
|
-
l = hsla[ 2 ],
|
515
|
-
a = hsla[ 3 ],
|
516
|
-
q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
|
517
|
-
p = 2 * l - q;
|
518
|
-
|
519
|
-
return [
|
520
|
-
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
|
521
|
-
Math.round( hue2rgb( p, q, h ) * 255 ),
|
522
|
-
Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
|
523
|
-
a
|
524
|
-
];
|
525
|
-
};
|
526
|
-
|
527
|
-
each( spaces, function( spaceName, space ) {
|
528
|
-
var props = space.props,
|
529
|
-
cache = space.cache,
|
530
|
-
to = space.to,
|
531
|
-
from = space.from;
|
532
|
-
|
533
|
-
// makes rgba() and hsla()
|
534
|
-
color.fn[ spaceName ] = function( value ) {
|
535
|
-
|
536
|
-
// generate a cache for this space if it doesn't exist
|
537
|
-
if ( to && !this[ cache ] ) {
|
538
|
-
this[ cache ] = to( this._rgba );
|
539
|
-
}
|
540
|
-
if ( value === undefined ) {
|
541
|
-
return this[ cache ].slice();
|
542
|
-
}
|
543
|
-
|
544
|
-
var ret,
|
545
|
-
type = jQuery.type( value ),
|
546
|
-
arr = ( type === "array" || type === "object" ) ? value : arguments,
|
547
|
-
local = this[ cache ].slice();
|
548
|
-
|
549
|
-
each( props, function( key, prop ) {
|
550
|
-
var val = arr[ type === "object" ? key : prop.idx ];
|
551
|
-
if ( val == null ) {
|
552
|
-
val = local[ prop.idx ];
|
553
|
-
}
|
554
|
-
local[ prop.idx ] = clamp( val, prop );
|
555
|
-
});
|
556
|
-
|
557
|
-
if ( from ) {
|
558
|
-
ret = color( from( local ) );
|
559
|
-
ret[ cache ] = local;
|
560
|
-
return ret;
|
561
|
-
} else {
|
562
|
-
return color( local );
|
563
|
-
}
|
564
|
-
};
|
565
|
-
|
566
|
-
// makes red() green() blue() alpha() hue() saturation() lightness()
|
567
|
-
each( props, function( key, prop ) {
|
568
|
-
// alpha is included in more than one space
|
569
|
-
if ( color.fn[ key ] ) {
|
570
|
-
return;
|
571
|
-
}
|
572
|
-
color.fn[ key ] = function( value ) {
|
573
|
-
var vtype = jQuery.type( value ),
|
574
|
-
fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
|
575
|
-
local = this[ fn ](),
|
576
|
-
cur = local[ prop.idx ],
|
577
|
-
match;
|
578
|
-
|
579
|
-
if ( vtype === "undefined" ) {
|
580
|
-
return cur;
|
581
|
-
}
|
582
|
-
|
583
|
-
if ( vtype === "function" ) {
|
584
|
-
value = value.call( this, cur );
|
585
|
-
vtype = jQuery.type( value );
|
586
|
-
}
|
587
|
-
if ( value == null && prop.empty ) {
|
588
|
-
return this;
|
589
|
-
}
|
590
|
-
if ( vtype === "string" ) {
|
591
|
-
match = rplusequals.exec( value );
|
592
|
-
if ( match ) {
|
593
|
-
value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
|
594
|
-
}
|
595
|
-
}
|
596
|
-
local[ prop.idx ] = value;
|
597
|
-
return this[ fn ]( local );
|
598
|
-
};
|
599
|
-
});
|
600
|
-
});
|
601
|
-
|
602
|
-
// add cssHook and .fx.step function for each named hook.
|
603
|
-
// accept a space separated string of properties
|
604
|
-
color.hook = function( hook ) {
|
605
|
-
var hooks = hook.split( " " );
|
606
|
-
each( hooks, function( i, hook ) {
|
607
|
-
jQuery.cssHooks[ hook ] = {
|
608
|
-
set: function( elem, value ) {
|
609
|
-
var parsed, curElem,
|
610
|
-
backgroundColor = "";
|
611
|
-
|
612
|
-
if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
|
613
|
-
value = color( parsed || value );
|
614
|
-
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
|
615
|
-
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
|
616
|
-
while (
|
617
|
-
(backgroundColor === "" || backgroundColor === "transparent") &&
|
618
|
-
curElem && curElem.style
|
619
|
-
) {
|
620
|
-
try {
|
621
|
-
backgroundColor = jQuery.css( curElem, "backgroundColor" );
|
622
|
-
curElem = curElem.parentNode;
|
623
|
-
} catch ( e ) {
|
624
|
-
}
|
625
|
-
}
|
626
|
-
|
627
|
-
value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
|
628
|
-
backgroundColor :
|
629
|
-
"_default" );
|
630
|
-
}
|
631
|
-
|
632
|
-
value = value.toRgbaString();
|
633
|
-
}
|
634
|
-
try {
|
635
|
-
elem.style[ hook ] = value;
|
636
|
-
} catch ( e ) {
|
637
|
-
// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
|
638
|
-
}
|
639
|
-
}
|
640
|
-
};
|
641
|
-
jQuery.fx.step[ hook ] = function( fx ) {
|
642
|
-
if ( !fx.colorInit ) {
|
643
|
-
fx.start = color( fx.elem, hook );
|
644
|
-
fx.end = color( fx.end );
|
645
|
-
fx.colorInit = true;
|
646
|
-
}
|
647
|
-
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
|
648
|
-
};
|
649
|
-
});
|
650
|
-
|
651
|
-
};
|
652
|
-
|
653
|
-
color.hook( stepHooks );
|
654
|
-
|
655
|
-
jQuery.cssHooks.borderColor = {
|
656
|
-
expand: function( value ) {
|
657
|
-
var expanded = {};
|
658
|
-
|
659
|
-
each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
|
660
|
-
expanded[ "border" + part + "Color" ] = value;
|
661
|
-
});
|
662
|
-
return expanded;
|
663
|
-
}
|
664
|
-
};
|
665
|
-
|
666
|
-
// Basic color names only.
|
667
|
-
// Usage of any of the other color names requires adding yourself or including
|
668
|
-
// jquery.color.svg-names.js.
|
669
|
-
colors = jQuery.Color.names = {
|
670
|
-
// 4.1. Basic color keywords
|
671
|
-
aqua: "#00ffff",
|
672
|
-
black: "#000000",
|
673
|
-
blue: "#0000ff",
|
674
|
-
fuchsia: "#ff00ff",
|
675
|
-
gray: "#808080",
|
676
|
-
green: "#008000",
|
677
|
-
lime: "#00ff00",
|
678
|
-
maroon: "#800000",
|
679
|
-
navy: "#000080",
|
680
|
-
olive: "#808000",
|
681
|
-
purple: "#800080",
|
682
|
-
red: "#ff0000",
|
683
|
-
silver: "#c0c0c0",
|
684
|
-
teal: "#008080",
|
685
|
-
white: "#ffffff",
|
686
|
-
yellow: "#ffff00",
|
687
|
-
|
688
|
-
// 4.2.3. "transparent" color keyword
|
689
|
-
transparent: [ null, null, null, 0 ],
|
690
|
-
|
691
|
-
_default: "#ffffff"
|
692
|
-
};
|
693
|
-
|
694
|
-
})( jQuery );
|
695
|
-
|
696
50
|
/******************************************************************************/
|
697
51
|
/****************************** CLASS ANIMATIONS ******************************/
|
698
52
|
/******************************************************************************/
|
699
|
-
(function() {
|
53
|
+
( function() {
|
700
54
|
|
701
55
|
var classAnimationActions = [ "add", "remove", "toggle" ],
|
702
56
|
shorthandStyles = {
|
@@ -711,14 +65,23 @@ var classAnimationActions = [ "add", "remove", "toggle" ],
|
|
711
65
|
padding: 1
|
712
66
|
};
|
713
67
|
|
714
|
-
$.each(
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
fx.setAttr
|
719
|
-
|
720
|
-
|
721
|
-
}
|
68
|
+
$.each(
|
69
|
+
[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
|
70
|
+
function( _, prop ) {
|
71
|
+
$.fx.step[ prop ] = function( fx ) {
|
72
|
+
if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
|
73
|
+
jQuery.style( fx.elem, prop, fx.end );
|
74
|
+
fx.setAttr = true;
|
75
|
+
}
|
76
|
+
};
|
77
|
+
}
|
78
|
+
);
|
79
|
+
|
80
|
+
function camelCase( string ) {
|
81
|
+
return string.replace( /-([\da-z])/gi, function( all, letter ) {
|
82
|
+
return letter.toUpperCase();
|
83
|
+
} );
|
84
|
+
}
|
722
85
|
|
723
86
|
function getElementStyles( elem ) {
|
724
87
|
var key, len,
|
@@ -732,10 +95,11 @@ function getElementStyles( elem ) {
|
|
732
95
|
while ( len-- ) {
|
733
96
|
key = style[ len ];
|
734
97
|
if ( typeof style[ key ] === "string" ) {
|
735
|
-
styles[
|
98
|
+
styles[ camelCase( key ) ] = style[ key ];
|
736
99
|
}
|
737
100
|
}
|
738
|
-
|
101
|
+
|
102
|
+
// Support: Opera, IE <9
|
739
103
|
} else {
|
740
104
|
for ( key in style ) {
|
741
105
|
if ( typeof style[ key ] === "string" ) {
|
@@ -765,7 +129,7 @@ function styleDifference( oldStyle, newStyle ) {
|
|
765
129
|
return diff;
|
766
130
|
}
|
767
131
|
|
768
|
-
//
|
132
|
+
// Support: jQuery <1.8
|
769
133
|
if ( !$.fn.addBack ) {
|
770
134
|
$.fn.addBack = function( selector ) {
|
771
135
|
return this.add( selector == null ?
|
@@ -783,275 +147,449 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
|
|
783
147
|
applyClassChange,
|
784
148
|
allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
|
785
149
|
|
786
|
-
//
|
787
|
-
allAnimations = allAnimations.map(function() {
|
150
|
+
// Map the animated objects to store the original styles.
|
151
|
+
allAnimations = allAnimations.map( function() {
|
788
152
|
var el = $( this );
|
789
153
|
return {
|
790
154
|
el: el,
|
791
155
|
start: getElementStyles( this )
|
792
156
|
};
|
793
|
-
});
|
157
|
+
} );
|
794
158
|
|
795
|
-
//
|
159
|
+
// Apply class change
|
796
160
|
applyClassChange = function() {
|
797
|
-
$.each( classAnimationActions, function(i, action) {
|
161
|
+
$.each( classAnimationActions, function( i, action ) {
|
798
162
|
if ( value[ action ] ) {
|
799
163
|
animated[ action + "Class" ]( value[ action ] );
|
800
164
|
}
|
801
|
-
});
|
165
|
+
} );
|
802
166
|
};
|
803
167
|
applyClassChange();
|
804
168
|
|
805
|
-
//
|
806
|
-
allAnimations = allAnimations.map(function() {
|
169
|
+
// Map all animated objects again - calculate new styles and diff
|
170
|
+
allAnimations = allAnimations.map( function() {
|
807
171
|
this.end = getElementStyles( this.el[ 0 ] );
|
808
172
|
this.diff = styleDifference( this.start, this.end );
|
809
173
|
return this;
|
810
|
-
});
|
174
|
+
} );
|
811
175
|
|
812
|
-
//
|
176
|
+
// Apply original class
|
813
177
|
animated.attr( "class", baseClass );
|
814
178
|
|
815
|
-
//
|
816
|
-
allAnimations = allAnimations.map(function() {
|
179
|
+
// Map all animated objects again - this time collecting a promise
|
180
|
+
allAnimations = allAnimations.map( function() {
|
817
181
|
var styleInfo = this,
|
818
182
|
dfd = $.Deferred(),
|
819
|
-
opts = $.extend({}, o, {
|
183
|
+
opts = $.extend( {}, o, {
|
820
184
|
queue: false,
|
821
185
|
complete: function() {
|
822
186
|
dfd.resolve( styleInfo );
|
823
187
|
}
|
824
|
-
});
|
188
|
+
} );
|
825
189
|
|
826
190
|
this.el.animate( this.diff, opts );
|
827
191
|
return dfd.promise();
|
828
|
-
});
|
192
|
+
} );
|
829
193
|
|
830
|
-
//
|
831
|
-
$.when.apply( $, allAnimations.get() ).done(function() {
|
194
|
+
// Once all animations have completed:
|
195
|
+
$.when.apply( $, allAnimations.get() ).done( function() {
|
832
196
|
|
833
|
-
//
|
197
|
+
// Set the final class
|
834
198
|
applyClassChange();
|
835
199
|
|
836
|
-
//
|
200
|
+
// For each animated element,
|
837
201
|
// clear all css properties that were animated
|
838
202
|
$.each( arguments, function() {
|
839
203
|
var el = this.el;
|
840
|
-
$.each( this.diff, function(key) {
|
204
|
+
$.each( this.diff, function( key ) {
|
841
205
|
el.css( key, "" );
|
842
|
-
});
|
843
|
-
});
|
206
|
+
} );
|
207
|
+
} );
|
844
208
|
|
845
|
-
//
|
209
|
+
// This is guarnteed to be there if you use jQuery.speed()
|
846
210
|
// it also handles dequeuing the next anim...
|
847
211
|
o.complete.call( animated[ 0 ] );
|
848
|
-
});
|
849
|
-
});
|
212
|
+
} );
|
213
|
+
} );
|
850
214
|
};
|
851
215
|
|
852
|
-
$.fn.extend({
|
853
|
-
addClass: (function( orig ) {
|
216
|
+
$.fn.extend( {
|
217
|
+
addClass: ( function( orig ) {
|
854
218
|
return function( classNames, speed, easing, callback ) {
|
855
219
|
return speed ?
|
856
220
|
$.effects.animateClass.call( this,
|
857
221
|
{ add: classNames }, speed, easing, callback ) :
|
858
222
|
orig.apply( this, arguments );
|
859
223
|
};
|
860
|
-
})( $.fn.addClass ),
|
224
|
+
} )( $.fn.addClass ),
|
861
225
|
|
862
|
-
removeClass: (function( orig ) {
|
226
|
+
removeClass: ( function( orig ) {
|
863
227
|
return function( classNames, speed, easing, callback ) {
|
864
228
|
return arguments.length > 1 ?
|
865
229
|
$.effects.animateClass.call( this,
|
866
230
|
{ remove: classNames }, speed, easing, callback ) :
|
867
231
|
orig.apply( this, arguments );
|
868
232
|
};
|
869
|
-
})( $.fn.removeClass ),
|
233
|
+
} )( $.fn.removeClass ),
|
870
234
|
|
871
|
-
toggleClass: (function( orig ) {
|
235
|
+
toggleClass: ( function( orig ) {
|
872
236
|
return function( classNames, force, speed, easing, callback ) {
|
873
237
|
if ( typeof force === "boolean" || force === undefined ) {
|
874
238
|
if ( !speed ) {
|
875
|
-
|
239
|
+
|
240
|
+
// Without speed parameter
|
876
241
|
return orig.apply( this, arguments );
|
877
242
|
} else {
|
878
243
|
return $.effects.animateClass.call( this,
|
879
|
-
(force ? { add: classNames } : { remove: classNames }),
|
244
|
+
( force ? { add: classNames } : { remove: classNames } ),
|
880
245
|
speed, easing, callback );
|
881
246
|
}
|
882
247
|
} else {
|
883
|
-
|
248
|
+
|
249
|
+
// Without force parameter
|
884
250
|
return $.effects.animateClass.call( this,
|
885
251
|
{ toggle: classNames }, force, speed, easing );
|
886
252
|
}
|
887
253
|
};
|
888
|
-
})( $.fn.toggleClass ),
|
254
|
+
} )( $.fn.toggleClass ),
|
889
255
|
|
890
|
-
switchClass: function( remove, add, speed, easing, callback) {
|
256
|
+
switchClass: function( remove, add, speed, easing, callback ) {
|
891
257
|
return $.effects.animateClass.call( this, {
|
892
258
|
add: add,
|
893
259
|
remove: remove
|
894
260
|
}, speed, easing, callback );
|
895
261
|
}
|
896
|
-
});
|
262
|
+
} );
|
897
263
|
|
898
|
-
})();
|
264
|
+
} )();
|
899
265
|
|
900
266
|
/******************************************************************************/
|
901
267
|
/*********************************** EFFECTS **********************************/
|
902
268
|
/******************************************************************************/
|
903
269
|
|
904
|
-
(function() {
|
270
|
+
( function() {
|
905
271
|
|
906
|
-
|
907
|
-
|
272
|
+
if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
|
273
|
+
$.expr.pseudos.animated = ( function( orig ) {
|
274
|
+
return function( elem ) {
|
275
|
+
return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
|
276
|
+
};
|
277
|
+
} )( $.expr.pseudos.animated );
|
278
|
+
}
|
279
|
+
|
280
|
+
if ( $.uiBackCompat !== false ) {
|
281
|
+
$.extend( $.effects, {
|
908
282
|
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
283
|
+
// Saves a set of properties in a data storage
|
284
|
+
save: function( element, set ) {
|
285
|
+
var i = 0, length = set.length;
|
286
|
+
for ( ; i < length; i++ ) {
|
287
|
+
if ( set[ i ] !== null ) {
|
288
|
+
element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
|
289
|
+
}
|
914
290
|
}
|
915
|
-
}
|
916
|
-
},
|
291
|
+
},
|
917
292
|
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
// http://bugs.jquery.com/ticket/9917
|
926
|
-
// jQuery 1.6.2 incorrectly returns undefined for any falsy value.
|
927
|
-
// We can't differentiate between "" and 0 here, so we just assume
|
928
|
-
// empty string since it's likely to be a more common value...
|
929
|
-
if ( val === undefined ) {
|
930
|
-
val = "";
|
293
|
+
// Restores a set of previously saved properties from a data storage
|
294
|
+
restore: function( element, set ) {
|
295
|
+
var val, i = 0, length = set.length;
|
296
|
+
for ( ; i < length; i++ ) {
|
297
|
+
if ( set[ i ] !== null ) {
|
298
|
+
val = element.data( dataSpace + set[ i ] );
|
299
|
+
element.css( set[ i ], val );
|
931
300
|
}
|
932
|
-
element.css( set[ i ], val );
|
933
301
|
}
|
302
|
+
},
|
303
|
+
|
304
|
+
setMode: function( el, mode ) {
|
305
|
+
if ( mode === "toggle" ) {
|
306
|
+
mode = el.is( ":hidden" ) ? "show" : "hide";
|
307
|
+
}
|
308
|
+
return mode;
|
309
|
+
},
|
310
|
+
|
311
|
+
// Wraps the element around a wrapper that copies position properties
|
312
|
+
createWrapper: function( element ) {
|
313
|
+
|
314
|
+
// If the element is already wrapped, return it
|
315
|
+
if ( element.parent().is( ".ui-effects-wrapper" ) ) {
|
316
|
+
return element.parent();
|
317
|
+
}
|
318
|
+
|
319
|
+
// Wrap the element
|
320
|
+
var props = {
|
321
|
+
width: element.outerWidth( true ),
|
322
|
+
height: element.outerHeight( true ),
|
323
|
+
"float": element.css( "float" )
|
324
|
+
},
|
325
|
+
wrapper = $( "<div></div>" )
|
326
|
+
.addClass( "ui-effects-wrapper" )
|
327
|
+
.css( {
|
328
|
+
fontSize: "100%",
|
329
|
+
background: "transparent",
|
330
|
+
border: "none",
|
331
|
+
margin: 0,
|
332
|
+
padding: 0
|
333
|
+
} ),
|
334
|
+
|
335
|
+
// Store the size in case width/height are defined in % - Fixes #5245
|
336
|
+
size = {
|
337
|
+
width: element.width(),
|
338
|
+
height: element.height()
|
339
|
+
},
|
340
|
+
active = document.activeElement;
|
341
|
+
|
342
|
+
// Support: Firefox
|
343
|
+
// Firefox incorrectly exposes anonymous content
|
344
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
|
345
|
+
try {
|
346
|
+
// eslint-disable-next-line no-unused-expressions
|
347
|
+
active.id;
|
348
|
+
} catch ( e ) {
|
349
|
+
active = document.body;
|
350
|
+
}
|
351
|
+
|
352
|
+
element.wrap( wrapper );
|
353
|
+
|
354
|
+
// Fixes #7595 - Elements lose focus when wrapped.
|
355
|
+
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
356
|
+
$( active ).trigger( "focus" );
|
357
|
+
}
|
358
|
+
|
359
|
+
// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
|
360
|
+
// lose the reference to the wrapped element
|
361
|
+
wrapper = element.parent();
|
362
|
+
|
363
|
+
// Transfer positioning properties to the wrapper
|
364
|
+
if ( element.css( "position" ) === "static" ) {
|
365
|
+
wrapper.css( { position: "relative" } );
|
366
|
+
element.css( { position: "relative" } );
|
367
|
+
} else {
|
368
|
+
$.extend( props, {
|
369
|
+
position: element.css( "position" ),
|
370
|
+
zIndex: element.css( "z-index" )
|
371
|
+
} );
|
372
|
+
$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
|
373
|
+
props[ pos ] = element.css( pos );
|
374
|
+
if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
|
375
|
+
props[ pos ] = "auto";
|
376
|
+
}
|
377
|
+
} );
|
378
|
+
element.css( {
|
379
|
+
position: "relative",
|
380
|
+
top: 0,
|
381
|
+
left: 0,
|
382
|
+
right: "auto",
|
383
|
+
bottom: "auto"
|
384
|
+
} );
|
385
|
+
}
|
386
|
+
element.css( size );
|
387
|
+
|
388
|
+
return wrapper.css( props ).show();
|
389
|
+
},
|
390
|
+
|
391
|
+
removeWrapper: function( element ) {
|
392
|
+
var active = document.activeElement;
|
393
|
+
|
394
|
+
if ( element.parent().is( ".ui-effects-wrapper" ) ) {
|
395
|
+
element.parent().replaceWith( element );
|
396
|
+
|
397
|
+
// Fixes #7595 - Elements lose focus when wrapped.
|
398
|
+
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
399
|
+
$( active ).trigger( "focus" );
|
400
|
+
}
|
401
|
+
}
|
402
|
+
|
403
|
+
return element;
|
404
|
+
}
|
405
|
+
} );
|
406
|
+
}
|
407
|
+
|
408
|
+
$.extend( $.effects, {
|
409
|
+
version: "1.13.0",
|
410
|
+
|
411
|
+
define: function( name, mode, effect ) {
|
412
|
+
if ( !effect ) {
|
413
|
+
effect = mode;
|
414
|
+
mode = "effect";
|
415
|
+
}
|
416
|
+
|
417
|
+
$.effects.effect[ name ] = effect;
|
418
|
+
$.effects.effect[ name ].mode = mode;
|
419
|
+
|
420
|
+
return effect;
|
421
|
+
},
|
422
|
+
|
423
|
+
scaledDimensions: function( element, percent, direction ) {
|
424
|
+
if ( percent === 0 ) {
|
425
|
+
return {
|
426
|
+
height: 0,
|
427
|
+
width: 0,
|
428
|
+
outerHeight: 0,
|
429
|
+
outerWidth: 0
|
430
|
+
};
|
431
|
+
}
|
432
|
+
|
433
|
+
var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
|
434
|
+
y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
|
435
|
+
|
436
|
+
return {
|
437
|
+
height: element.height() * y,
|
438
|
+
width: element.width() * x,
|
439
|
+
outerHeight: element.outerHeight() * y,
|
440
|
+
outerWidth: element.outerWidth() * x
|
441
|
+
};
|
442
|
+
|
443
|
+
},
|
444
|
+
|
445
|
+
clipToBox: function( animation ) {
|
446
|
+
return {
|
447
|
+
width: animation.clip.right - animation.clip.left,
|
448
|
+
height: animation.clip.bottom - animation.clip.top,
|
449
|
+
left: animation.clip.left,
|
450
|
+
top: animation.clip.top
|
451
|
+
};
|
452
|
+
},
|
453
|
+
|
454
|
+
// Injects recently queued functions to be first in line (after "inprogress")
|
455
|
+
unshift: function( element, queueLength, count ) {
|
456
|
+
var queue = element.queue();
|
457
|
+
|
458
|
+
if ( queueLength > 1 ) {
|
459
|
+
queue.splice.apply( queue,
|
460
|
+
[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
|
934
461
|
}
|
462
|
+
element.dequeue();
|
935
463
|
},
|
936
464
|
|
937
|
-
|
938
|
-
|
939
|
-
|
465
|
+
saveStyle: function( element ) {
|
466
|
+
element.data( dataSpaceStyle, element[ 0 ].style.cssText );
|
467
|
+
},
|
468
|
+
|
469
|
+
restoreStyle: function( element ) {
|
470
|
+
element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
|
471
|
+
element.removeData( dataSpaceStyle );
|
472
|
+
},
|
473
|
+
|
474
|
+
mode: function( element, mode ) {
|
475
|
+
var hidden = element.is( ":hidden" );
|
476
|
+
|
477
|
+
if ( mode === "toggle" ) {
|
478
|
+
mode = hidden ? "show" : "hide";
|
479
|
+
}
|
480
|
+
if ( hidden ? mode === "hide" : mode === "show" ) {
|
481
|
+
mode = "none";
|
940
482
|
}
|
941
483
|
return mode;
|
942
484
|
},
|
943
485
|
|
944
486
|
// Translates a [top,left] array into a baseline value
|
945
|
-
// this should be a little more flexible in the future to handle a string & hash
|
946
487
|
getBaseline: function( origin, original ) {
|
947
488
|
var y, x;
|
489
|
+
|
948
490
|
switch ( origin[ 0 ] ) {
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
491
|
+
case "top":
|
492
|
+
y = 0;
|
493
|
+
break;
|
494
|
+
case "middle":
|
495
|
+
y = 0.5;
|
496
|
+
break;
|
497
|
+
case "bottom":
|
498
|
+
y = 1;
|
499
|
+
break;
|
500
|
+
default:
|
501
|
+
y = origin[ 0 ] / original.height;
|
953
502
|
}
|
503
|
+
|
954
504
|
switch ( origin[ 1 ] ) {
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
505
|
+
case "left":
|
506
|
+
x = 0;
|
507
|
+
break;
|
508
|
+
case "center":
|
509
|
+
x = 0.5;
|
510
|
+
break;
|
511
|
+
case "right":
|
512
|
+
x = 1;
|
513
|
+
break;
|
514
|
+
default:
|
515
|
+
x = origin[ 1 ] / original.width;
|
959
516
|
}
|
517
|
+
|
960
518
|
return {
|
961
519
|
x: x,
|
962
520
|
y: y
|
963
521
|
};
|
964
522
|
},
|
965
523
|
|
966
|
-
//
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
//
|
975
|
-
|
976
|
-
|
977
|
-
|
524
|
+
// Creates a placeholder element so that the original element can be made absolute
|
525
|
+
createPlaceholder: function( element ) {
|
526
|
+
var placeholder,
|
527
|
+
cssPosition = element.css( "position" ),
|
528
|
+
position = element.position();
|
529
|
+
|
530
|
+
// Lock in margins first to account for form elements, which
|
531
|
+
// will change margin if you explicitly set height
|
532
|
+
// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
|
533
|
+
// Support: Safari
|
534
|
+
element.css( {
|
535
|
+
marginTop: element.css( "marginTop" ),
|
536
|
+
marginBottom: element.css( "marginBottom" ),
|
537
|
+
marginLeft: element.css( "marginLeft" ),
|
538
|
+
marginRight: element.css( "marginRight" )
|
539
|
+
} )
|
540
|
+
.outerWidth( element.outerWidth() )
|
541
|
+
.outerHeight( element.outerHeight() );
|
542
|
+
|
543
|
+
if ( /^(static|relative)/.test( cssPosition ) ) {
|
544
|
+
cssPosition = "absolute";
|
545
|
+
|
546
|
+
placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
|
547
|
+
|
548
|
+
// Convert inline to inline block to account for inline elements
|
549
|
+
// that turn to inline block based on content (like img)
|
550
|
+
display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
|
551
|
+
"inline-block" :
|
552
|
+
"block",
|
553
|
+
visibility: "hidden",
|
554
|
+
|
555
|
+
// Margins need to be set to account for margin collapse
|
556
|
+
marginTop: element.css( "marginTop" ),
|
557
|
+
marginBottom: element.css( "marginBottom" ),
|
558
|
+
marginLeft: element.css( "marginLeft" ),
|
559
|
+
marginRight: element.css( "marginRight" ),
|
978
560
|
"float": element.css( "float" )
|
979
|
-
}
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
fontSize: "100%",
|
984
|
-
background: "transparent",
|
985
|
-
border: "none",
|
986
|
-
margin: 0,
|
987
|
-
padding: 0
|
988
|
-
}),
|
989
|
-
// Store the size in case width/height are defined in % - Fixes #5245
|
990
|
-
size = {
|
991
|
-
width: element.width(),
|
992
|
-
height: element.height()
|
993
|
-
},
|
994
|
-
active = document.activeElement;
|
995
|
-
|
996
|
-
// support: Firefox
|
997
|
-
// Firefox incorrectly exposes anonymous content
|
998
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
|
999
|
-
try {
|
1000
|
-
active.id;
|
1001
|
-
} catch ( e ) {
|
1002
|
-
active = document.body;
|
1003
|
-
}
|
561
|
+
} )
|
562
|
+
.outerWidth( element.outerWidth() )
|
563
|
+
.outerHeight( element.outerHeight() )
|
564
|
+
.addClass( "ui-effects-placeholder" );
|
1004
565
|
|
1005
|
-
|
1006
|
-
|
1007
|
-
// Fixes #7595 - Elements lose focus when wrapped.
|
1008
|
-
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
1009
|
-
$( active ).focus();
|
566
|
+
element.data( dataSpace + "placeholder", placeholder );
|
1010
567
|
}
|
1011
568
|
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
element.css({ position: "relative" });
|
1018
|
-
} else {
|
1019
|
-
$.extend( props, {
|
1020
|
-
position: element.css( "position" ),
|
1021
|
-
zIndex: element.css( "z-index" )
|
1022
|
-
});
|
1023
|
-
$.each([ "top", "left", "bottom", "right" ], function(i, pos) {
|
1024
|
-
props[ pos ] = element.css( pos );
|
1025
|
-
if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
|
1026
|
-
props[ pos ] = "auto";
|
1027
|
-
}
|
1028
|
-
});
|
1029
|
-
element.css({
|
1030
|
-
position: "relative",
|
1031
|
-
top: 0,
|
1032
|
-
left: 0,
|
1033
|
-
right: "auto",
|
1034
|
-
bottom: "auto"
|
1035
|
-
});
|
1036
|
-
}
|
1037
|
-
element.css(size);
|
569
|
+
element.css( {
|
570
|
+
position: cssPosition,
|
571
|
+
left: position.left,
|
572
|
+
top: position.top
|
573
|
+
} );
|
1038
574
|
|
1039
|
-
return
|
575
|
+
return placeholder;
|
1040
576
|
},
|
1041
577
|
|
1042
|
-
|
1043
|
-
var
|
578
|
+
removePlaceholder: function( element ) {
|
579
|
+
var dataKey = dataSpace + "placeholder",
|
580
|
+
placeholder = element.data( dataKey );
|
1044
581
|
|
1045
|
-
if (
|
1046
|
-
|
1047
|
-
|
1048
|
-
// Fixes #7595 - Elements lose focus when wrapped.
|
1049
|
-
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
1050
|
-
$( active ).focus();
|
1051
|
-
}
|
582
|
+
if ( placeholder ) {
|
583
|
+
placeholder.remove();
|
584
|
+
element.removeData( dataKey );
|
1052
585
|
}
|
586
|
+
},
|
1053
587
|
|
1054
|
-
|
588
|
+
// Removes a placeholder if it exists and restores
|
589
|
+
// properties that were modified during placeholder creation
|
590
|
+
cleanUp: function( element ) {
|
591
|
+
$.effects.restoreStyle( element );
|
592
|
+
$.effects.removePlaceholder( element );
|
1055
593
|
},
|
1056
594
|
|
1057
595
|
setTransition: function( element, list, factor, value ) {
|
@@ -1061,49 +599,49 @@ $.extend( $.effects, {
|
|
1061
599
|
if ( unit[ 0 ] > 0 ) {
|
1062
600
|
value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
|
1063
601
|
}
|
1064
|
-
});
|
602
|
+
} );
|
1065
603
|
return value;
|
1066
604
|
}
|
1067
|
-
});
|
605
|
+
} );
|
1068
606
|
|
1069
|
-
//
|
607
|
+
// Return an effect options object for the given parameters:
|
1070
608
|
function _normalizeArguments( effect, options, speed, callback ) {
|
1071
609
|
|
1072
|
-
//
|
610
|
+
// Allow passing all options as the first parameter
|
1073
611
|
if ( $.isPlainObject( effect ) ) {
|
1074
612
|
options = effect;
|
1075
613
|
effect = effect.effect;
|
1076
614
|
}
|
1077
615
|
|
1078
|
-
//
|
616
|
+
// Convert to an object
|
1079
617
|
effect = { effect: effect };
|
1080
618
|
|
1081
|
-
//
|
619
|
+
// Catch (effect, null, ...)
|
1082
620
|
if ( options == null ) {
|
1083
621
|
options = {};
|
1084
622
|
}
|
1085
623
|
|
1086
|
-
//
|
1087
|
-
if (
|
624
|
+
// Catch (effect, callback)
|
625
|
+
if ( typeof options === "function" ) {
|
1088
626
|
callback = options;
|
1089
627
|
speed = null;
|
1090
628
|
options = {};
|
1091
629
|
}
|
1092
630
|
|
1093
|
-
//
|
631
|
+
// Catch (effect, speed, ?)
|
1094
632
|
if ( typeof options === "number" || $.fx.speeds[ options ] ) {
|
1095
633
|
callback = speed;
|
1096
634
|
speed = options;
|
1097
635
|
options = {};
|
1098
636
|
}
|
1099
637
|
|
1100
|
-
//
|
1101
|
-
if (
|
638
|
+
// Catch (effect, options, callback)
|
639
|
+
if ( typeof speed === "function" ) {
|
1102
640
|
callback = speed;
|
1103
641
|
speed = null;
|
1104
642
|
}
|
1105
643
|
|
1106
|
-
//
|
644
|
+
// Add options to effect
|
1107
645
|
if ( options ) {
|
1108
646
|
$.extend( effect, options );
|
1109
647
|
}
|
@@ -1120,6 +658,7 @@ function _normalizeArguments( effect, options, speed, callback ) {
|
|
1120
658
|
}
|
1121
659
|
|
1122
660
|
function standardAnimationOption( option ) {
|
661
|
+
|
1123
662
|
// Valid standard speeds (nothing, number, named speed)
|
1124
663
|
if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
|
1125
664
|
return true;
|
@@ -1131,7 +670,7 @@ function standardAnimationOption( option ) {
|
|
1131
670
|
}
|
1132
671
|
|
1133
672
|
// Complete callback
|
1134
|
-
if (
|
673
|
+
if ( typeof option === "function" ) {
|
1135
674
|
return true;
|
1136
675
|
}
|
1137
676
|
|
@@ -1144,54 +683,116 @@ function standardAnimationOption( option ) {
|
|
1144
683
|
return false;
|
1145
684
|
}
|
1146
685
|
|
1147
|
-
$.fn.extend({
|
686
|
+
$.fn.extend( {
|
1148
687
|
effect: function( /* effect, options, speed, callback */ ) {
|
1149
688
|
var args = _normalizeArguments.apply( this, arguments ),
|
1150
|
-
|
689
|
+
effectMethod = $.effects.effect[ args.effect ],
|
690
|
+
defaultMode = effectMethod.mode,
|
1151
691
|
queue = args.queue,
|
1152
|
-
|
692
|
+
queueName = queue || "fx",
|
693
|
+
complete = args.complete,
|
694
|
+
mode = args.mode,
|
695
|
+
modes = [],
|
696
|
+
prefilter = function( next ) {
|
697
|
+
var el = $( this ),
|
698
|
+
normalizedMode = $.effects.mode( el, mode ) || defaultMode;
|
699
|
+
|
700
|
+
// Sentinel for duck-punching the :animated pseudo-selector
|
701
|
+
el.data( dataSpaceAnimated, true );
|
702
|
+
|
703
|
+
// Save effect mode for later use,
|
704
|
+
// we can't just call $.effects.mode again later,
|
705
|
+
// as the .show() below destroys the initial state
|
706
|
+
modes.push( normalizedMode );
|
707
|
+
|
708
|
+
// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
|
709
|
+
if ( defaultMode && ( normalizedMode === "show" ||
|
710
|
+
( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
|
711
|
+
el.show();
|
712
|
+
}
|
713
|
+
|
714
|
+
if ( !defaultMode || normalizedMode !== "none" ) {
|
715
|
+
$.effects.saveStyle( el );
|
716
|
+
}
|
717
|
+
|
718
|
+
if ( typeof next === "function" ) {
|
719
|
+
next();
|
720
|
+
}
|
721
|
+
};
|
1153
722
|
|
1154
723
|
if ( $.fx.off || !effectMethod ) {
|
1155
|
-
|
724
|
+
|
725
|
+
// Delegate to the original method (e.g., .show()) if possible
|
1156
726
|
if ( mode ) {
|
1157
|
-
return this[ mode ]( args.duration,
|
727
|
+
return this[ mode ]( args.duration, complete );
|
1158
728
|
} else {
|
1159
729
|
return this.each( function() {
|
1160
|
-
if (
|
1161
|
-
|
730
|
+
if ( complete ) {
|
731
|
+
complete.call( this );
|
1162
732
|
}
|
1163
|
-
});
|
733
|
+
} );
|
1164
734
|
}
|
1165
735
|
}
|
1166
736
|
|
1167
737
|
function run( next ) {
|
1168
|
-
var elem = $( this )
|
1169
|
-
|
1170
|
-
|
738
|
+
var elem = $( this );
|
739
|
+
|
740
|
+
function cleanup() {
|
741
|
+
elem.removeData( dataSpaceAnimated );
|
742
|
+
|
743
|
+
$.effects.cleanUp( elem );
|
744
|
+
|
745
|
+
if ( args.mode === "hide" ) {
|
746
|
+
elem.hide();
|
747
|
+
}
|
748
|
+
|
749
|
+
done();
|
750
|
+
}
|
1171
751
|
|
1172
752
|
function done() {
|
1173
|
-
if (
|
1174
|
-
complete.call( elem[0] );
|
753
|
+
if ( typeof complete === "function" ) {
|
754
|
+
complete.call( elem[ 0 ] );
|
1175
755
|
}
|
1176
|
-
|
756
|
+
|
757
|
+
if ( typeof next === "function" ) {
|
1177
758
|
next();
|
1178
759
|
}
|
1179
760
|
}
|
1180
761
|
|
1181
|
-
//
|
1182
|
-
//
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
762
|
+
// Override mode option on a per element basis,
|
763
|
+
// as toggle can be either show or hide depending on element state
|
764
|
+
args.mode = modes.shift();
|
765
|
+
|
766
|
+
if ( $.uiBackCompat !== false && !defaultMode ) {
|
767
|
+
if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
|
768
|
+
|
769
|
+
// Call the core method to track "olddisplay" properly
|
770
|
+
elem[ mode ]();
|
771
|
+
done();
|
772
|
+
} else {
|
773
|
+
effectMethod.call( elem[ 0 ], args, done );
|
774
|
+
}
|
1186
775
|
} else {
|
1187
|
-
|
776
|
+
if ( args.mode === "none" ) {
|
777
|
+
|
778
|
+
// Call the core method to track "olddisplay" properly
|
779
|
+
elem[ mode ]();
|
780
|
+
done();
|
781
|
+
} else {
|
782
|
+
effectMethod.call( elem[ 0 ], args, cleanup );
|
783
|
+
}
|
1188
784
|
}
|
1189
785
|
}
|
1190
786
|
|
1191
|
-
|
787
|
+
// Run prefilter on all elements first to ensure that
|
788
|
+
// any showing or hiding happens before placeholder creation,
|
789
|
+
// which ensures that any layout changes are correctly captured.
|
790
|
+
return queue === false ?
|
791
|
+
this.each( prefilter ).each( run ) :
|
792
|
+
this.queue( queueName, prefilter ).queue( queueName, run );
|
1192
793
|
},
|
1193
794
|
|
1194
|
-
show: (function( orig ) {
|
795
|
+
show: ( function( orig ) {
|
1195
796
|
return function( option ) {
|
1196
797
|
if ( standardAnimationOption( option ) ) {
|
1197
798
|
return orig.apply( this, arguments );
|
@@ -1201,9 +802,9 @@ $.fn.extend({
|
|
1201
802
|
return this.effect.call( this, args );
|
1202
803
|
}
|
1203
804
|
};
|
1204
|
-
})( $.fn.show ),
|
805
|
+
} )( $.fn.show ),
|
1205
806
|
|
1206
|
-
hide: (function( orig ) {
|
807
|
+
hide: ( function( orig ) {
|
1207
808
|
return function( option ) {
|
1208
809
|
if ( standardAnimationOption( option ) ) {
|
1209
810
|
return orig.apply( this, arguments );
|
@@ -1213,9 +814,9 @@ $.fn.extend({
|
|
1213
814
|
return this.effect.call( this, args );
|
1214
815
|
}
|
1215
816
|
};
|
1216
|
-
})( $.fn.hide ),
|
817
|
+
} )( $.fn.hide ),
|
1217
818
|
|
1218
|
-
toggle: (function( orig ) {
|
819
|
+
toggle: ( function( orig ) {
|
1219
820
|
return function( option ) {
|
1220
821
|
if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
|
1221
822
|
return orig.apply( this, arguments );
|
@@ -1225,10 +826,9 @@ $.fn.extend({
|
|
1225
826
|
return this.effect.call( this, args );
|
1226
827
|
}
|
1227
828
|
};
|
1228
|
-
})( $.fn.toggle ),
|
829
|
+
} )( $.fn.toggle ),
|
1229
830
|
|
1230
|
-
|
1231
|
-
cssUnit: function(key) {
|
831
|
+
cssUnit: function( key ) {
|
1232
832
|
var style = this.css( key ),
|
1233
833
|
val = [];
|
1234
834
|
|
@@ -1236,20 +836,94 @@ $.fn.extend({
|
|
1236
836
|
if ( style.indexOf( unit ) > 0 ) {
|
1237
837
|
val = [ parseFloat( style ), unit ];
|
1238
838
|
}
|
1239
|
-
});
|
839
|
+
} );
|
1240
840
|
return val;
|
841
|
+
},
|
842
|
+
|
843
|
+
cssClip: function( clipObj ) {
|
844
|
+
if ( clipObj ) {
|
845
|
+
return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
|
846
|
+
clipObj.bottom + "px " + clipObj.left + "px)" );
|
847
|
+
}
|
848
|
+
return parseClip( this.css( "clip" ), this );
|
849
|
+
},
|
850
|
+
|
851
|
+
transfer: function( options, done ) {
|
852
|
+
var element = $( this ),
|
853
|
+
target = $( options.to ),
|
854
|
+
targetFixed = target.css( "position" ) === "fixed",
|
855
|
+
body = $( "body" ),
|
856
|
+
fixTop = targetFixed ? body.scrollTop() : 0,
|
857
|
+
fixLeft = targetFixed ? body.scrollLeft() : 0,
|
858
|
+
endPosition = target.offset(),
|
859
|
+
animation = {
|
860
|
+
top: endPosition.top - fixTop,
|
861
|
+
left: endPosition.left - fixLeft,
|
862
|
+
height: target.innerHeight(),
|
863
|
+
width: target.innerWidth()
|
864
|
+
},
|
865
|
+
startPosition = element.offset(),
|
866
|
+
transfer = $( "<div class='ui-effects-transfer'></div>" );
|
867
|
+
|
868
|
+
transfer
|
869
|
+
.appendTo( "body" )
|
870
|
+
.addClass( options.className )
|
871
|
+
.css( {
|
872
|
+
top: startPosition.top - fixTop,
|
873
|
+
left: startPosition.left - fixLeft,
|
874
|
+
height: element.innerHeight(),
|
875
|
+
width: element.innerWidth(),
|
876
|
+
position: targetFixed ? "fixed" : "absolute"
|
877
|
+
} )
|
878
|
+
.animate( animation, options.duration, options.easing, function() {
|
879
|
+
transfer.remove();
|
880
|
+
if ( typeof done === "function" ) {
|
881
|
+
done();
|
882
|
+
}
|
883
|
+
} );
|
1241
884
|
}
|
1242
|
-
});
|
885
|
+
} );
|
886
|
+
|
887
|
+
function parseClip( str, element ) {
|
888
|
+
var outerWidth = element.outerWidth(),
|
889
|
+
outerHeight = element.outerHeight(),
|
890
|
+
clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
|
891
|
+
values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
|
892
|
+
|
893
|
+
return {
|
894
|
+
top: parseFloat( values[ 1 ] ) || 0,
|
895
|
+
right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
|
896
|
+
bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
|
897
|
+
left: parseFloat( values[ 4 ] ) || 0
|
898
|
+
};
|
899
|
+
}
|
900
|
+
|
901
|
+
$.fx.step.clip = function( fx ) {
|
902
|
+
if ( !fx.clipInit ) {
|
903
|
+
fx.start = $( fx.elem ).cssClip();
|
904
|
+
if ( typeof fx.end === "string" ) {
|
905
|
+
fx.end = parseClip( fx.end, fx.elem );
|
906
|
+
}
|
907
|
+
fx.clipInit = true;
|
908
|
+
}
|
909
|
+
|
910
|
+
$( fx.elem ).cssClip( {
|
911
|
+
top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
|
912
|
+
right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
|
913
|
+
bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
|
914
|
+
left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
|
915
|
+
} );
|
916
|
+
};
|
1243
917
|
|
1244
|
-
})();
|
918
|
+
} )();
|
1245
919
|
|
1246
920
|
/******************************************************************************/
|
1247
921
|
/*********************************** EASING ***********************************/
|
1248
922
|
/******************************************************************************/
|
1249
923
|
|
1250
|
-
(function() {
|
924
|
+
( function() {
|
1251
925
|
|
1252
|
-
//
|
926
|
+
// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
|
1253
927
|
|
1254
928
|
var baseEasings = {};
|
1255
929
|
|
@@ -1257,7 +931,7 @@ $.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
|
|
1257
931
|
baseEasings[ name ] = function( p ) {
|
1258
932
|
return Math.pow( p, i + 2 );
|
1259
933
|
};
|
1260
|
-
});
|
934
|
+
} );
|
1261
935
|
|
1262
936
|
$.extend( baseEasings, {
|
1263
937
|
Sine: function( p ) {
|
@@ -1268,7 +942,7 @@ $.extend( baseEasings, {
|
|
1268
942
|
},
|
1269
943
|
Elastic: function( p ) {
|
1270
944
|
return p === 0 || p === 1 ? p :
|
1271
|
-
-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
|
945
|
+
-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
|
1272
946
|
},
|
1273
947
|
Back: function( p ) {
|
1274
948
|
return p * p * ( 3 * p - 2 );
|
@@ -1280,7 +954,7 @@ $.extend( baseEasings, {
|
|
1280
954
|
while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
|
1281
955
|
return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
|
1282
956
|
}
|
1283
|
-
});
|
957
|
+
} );
|
1284
958
|
|
1285
959
|
$.each( baseEasings, function( name, easeIn ) {
|
1286
960
|
$.easing[ "easeIn" + name ] = easeIn;
|
@@ -1292,10 +966,10 @@ $.each( baseEasings, function( name, easeIn ) {
|
|
1292
966
|
easeIn( p * 2 ) / 2 :
|
1293
967
|
1 - easeIn( p * -2 + 2 ) / 2;
|
1294
968
|
};
|
1295
|
-
});
|
969
|
+
} );
|
1296
970
|
|
1297
|
-
})();
|
971
|
+
} )();
|
1298
972
|
|
1299
973
|
return $.effects;
|
1300
974
|
|
1301
|
-
})
|
975
|
+
} );
|