fomantic-ui 2.9.0-beta.30 → 2.9.0-beta.302
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.
- package/.all-contributorsrc +251 -3
- package/.github/codeql/codeql-config.yml +4 -0
- package/.github/dependabot.yml +10 -0
- package/.github/workflows/ci.yml +10 -6
- package/.github/workflows/codeql.yml +68 -0
- package/.github/workflows/nightly.yml +16 -8
- package/.github/workflows/release.yml +34 -0
- package/CONTRIBUTORS.md +82 -37
- package/FAQ.md +38 -38
- package/README.md +8 -8
- package/dist/components/accordion.css +176 -36
- package/dist/components/accordion.js +6 -3
- package/dist/components/accordion.min.css +2 -2
- package/dist/components/accordion.min.js +3 -3
- package/dist/components/ad.css +4 -4
- package/dist/components/ad.min.css +2 -2
- package/dist/components/api.js +89 -30
- package/dist/components/api.min.js +3 -3
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +204 -157
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +18 -1
- package/dist/components/calendar.js +85 -68
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +3 -3
- package/dist/components/card.css +754 -117
- package/dist/components/card.min.css +2 -2
- package/dist/components/checkbox.css +92 -91
- package/dist/components/checkbox.js +17 -11
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +3 -3
- package/dist/components/comment.css +12 -12
- package/dist/components/comment.min.css +2 -2
- package/dist/components/container.css +98 -4
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +29 -14
- package/dist/components/dimmer.js +11 -5
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +3 -3
- package/dist/components/divider.css +31 -31
- package/dist/components/divider.min.css +2 -2
- package/dist/components/dropdown.css +90 -50
- package/dist/components/dropdown.js +151 -116
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +5 -5
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +2 -2
- package/dist/components/embed.min.js +3 -3
- package/dist/components/emoji.css +10847 -8841
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +29 -29
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +1011 -902
- package/dist/components/flag.min.css +2 -2
- package/dist/components/form.css +160 -83
- package/dist/components/form.js +39 -30
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +25 -21
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +6 -4
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +2063 -1984
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +759 -22
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +17 -17
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +72 -68
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +31 -31
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +352 -352
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +108 -76
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +43 -43
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +29 -4
- package/dist/components/modal.js +128 -50
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +3 -3
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +2 -2
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +3 -3
- package/dist/components/placeholder.css +33 -33
- package/dist/components/placeholder.min.css +2 -2
- package/dist/components/popup.css +100 -104
- package/dist/components/popup.js +11 -11
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +3 -3
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +4 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +3 -3
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +3 -3
- package/dist/components/reset.css +5 -4
- package/dist/components/reset.min.css +2 -2
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +6 -6
- package/dist/components/search.js +23 -7
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +118 -34
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +3 -3
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +3 -3
- package/dist/components/sidebar.css +7 -5
- package/dist/components/sidebar.js +14 -12
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +3 -3
- package/dist/components/site.css +139 -42
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +3 -3
- package/dist/components/slider.css +17 -17
- package/dist/components/slider.js +68 -51
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +3 -3
- package/dist/components/state.js +2 -2
- package/dist/components/state.min.js +3 -3
- package/dist/components/statistic.css +4 -4
- package/dist/components/statistic.min.css +2 -2
- package/dist/components/step.css +31 -31
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +4 -4
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +3 -3
- package/dist/components/tab.css +5 -5
- package/dist/components/tab.js +24 -6
- package/dist/components/tab.min.css +2 -2
- package/dist/components/tab.min.js +3 -3
- package/dist/components/table.css +1684 -272
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +42 -1
- package/dist/components/toast.js +63 -31
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +3 -3
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +21 -16
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +3 -3
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +3 -3
- package/dist/semantic.css +20183 -13376
- package/dist/semantic.js +772 -466
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- package/dist/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- package/dist/themes/default/assets/fonts/brand-icons.eot +0 -0
- package/dist/themes/default/assets/fonts/brand-icons.svg +801 -654
- package/dist/themes/default/assets/fonts/brand-icons.ttf +0 -0
- package/dist/themes/default/assets/fonts/brand-icons.woff +0 -0
- package/dist/themes/default/assets/fonts/brand-icons.woff2 +0 -0
- package/dist/themes/default/assets/fonts/icons.eot +0 -0
- package/dist/themes/default/assets/fonts/icons.svg +1175 -1079
- package/dist/themes/default/assets/fonts/icons.ttf +0 -0
- package/dist/themes/default/assets/fonts/icons.woff +0 -0
- package/dist/themes/default/assets/fonts/icons.woff2 +0 -0
- package/dist/themes/default/assets/fonts/outline-icons.eot +0 -0
- package/dist/themes/default/assets/fonts/outline-icons.svg +93 -95
- package/dist/themes/default/assets/fonts/outline-icons.ttf +0 -0
- package/dist/themes/default/assets/fonts/outline-icons.woff +0 -0
- package/dist/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- package/dist/themes/{default → famfamfam}/assets/images/flags.png +0 -0
- package/examples/assets/library/iframe-content.js +8 -8
- package/examples/assets/library/iframe.js +3 -3
- package/examples/components/button.html +1 -1
- package/examples/components/card.html +1 -1
- package/examples/components/input.html +1 -1
- package/examples/components/menu.html +1 -1
- package/examples/components/site.html +1 -1
- package/examples/components/table.html +1 -1
- package/package.json +18 -16
- package/scripts/nightly-version.js +47 -38
- package/src/definitions/behaviors/api.js +88 -29
- package/src/definitions/behaviors/form.js +38 -29
- package/src/definitions/behaviors/state.js +1 -1
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +229 -165
- package/src/definitions/collections/grid.less +723 -687
- package/src/definitions/collections/menu.less +232 -170
- package/src/definitions/collections/message.less +49 -47
- package/src/definitions/collections/table.less +882 -272
- package/src/definitions/elements/button.less +611 -469
- package/src/definitions/elements/container.less +145 -8
- package/src/definitions/elements/divider.less +24 -24
- package/src/definitions/elements/emoji.less +39 -10
- package/src/definitions/elements/flag.less +53 -18
- package/src/definitions/elements/header.less +46 -37
- package/src/definitions/elements/icon.less +39 -32
- package/src/definitions/elements/input.less +281 -33
- package/src/definitions/elements/label.less +132 -128
- package/src/definitions/elements/list.less +84 -75
- package/src/definitions/elements/loader.less +99 -98
- package/src/definitions/elements/placeholder.less +32 -32
- package/src/definitions/elements/segment.less +177 -56
- package/src/definitions/elements/step.less +76 -72
- package/src/definitions/elements/text.less +17 -15
- package/src/definitions/globals/reset.less +2 -2
- package/src/definitions/globals/site.less +25 -2
- package/src/definitions/modules/accordion.js +5 -2
- package/src/definitions/modules/accordion.less +371 -219
- package/src/definitions/modules/calendar.js +84 -67
- package/src/definitions/modules/calendar.less +20 -0
- package/src/definitions/modules/checkbox.js +16 -10
- package/src/definitions/modules/checkbox.less +83 -227
- package/src/definitions/modules/dimmer.js +10 -4
- package/src/definitions/modules/dimmer.less +22 -8
- package/src/definitions/modules/dropdown.js +150 -115
- package/src/definitions/modules/dropdown.less +191 -136
- package/src/definitions/modules/embed.less +4 -4
- package/src/definitions/modules/modal.js +127 -49
- package/src/definitions/modules/modal.less +66 -33
- package/src/definitions/modules/nag.js +1 -1
- package/src/definitions/modules/nag.less +20 -19
- package/src/definitions/modules/popup.js +10 -10
- package/src/definitions/modules/popup.less +86 -90
- package/src/definitions/modules/progress.js +3 -0
- package/src/definitions/modules/progress.less +19 -18
- package/src/definitions/modules/rating.less +35 -34
- package/src/definitions/modules/search.js +22 -6
- package/src/definitions/modules/search.less +35 -19
- package/src/definitions/modules/shape.js +2 -2
- package/src/definitions/modules/sidebar.js +13 -11
- package/src/definitions/modules/sidebar.less +36 -22
- package/src/definitions/modules/slider.js +67 -50
- package/src/definitions/modules/slider.less +48 -47
- package/src/definitions/modules/sticky.js +3 -3
- package/src/definitions/modules/sticky.less +3 -1
- package/src/definitions/modules/tab.js +23 -5
- package/src/definitions/modules/tab.less +4 -4
- package/src/definitions/modules/toast.js +62 -30
- package/src/definitions/modules/toast.less +51 -16
- package/src/definitions/modules/transition.js +20 -15
- package/src/definitions/views/ad.less +3 -3
- package/src/definitions/views/card.less +522 -375
- package/src/definitions/views/comment.less +93 -82
- package/src/definitions/views/feed.less +164 -144
- package/src/definitions/views/item.less +251 -198
- package/src/definitions/views/statistic.less +91 -89
- package/src/theme.less +13 -2
- package/src/themes/amazon/globals/site.variables +1 -0
- package/src/themes/basic/elements/icon.overrides +149 -149
- package/src/themes/basic/elements/step.overrides +2 -2
- package/src/themes/bookish/elements/header.overrides +1 -1
- package/src/themes/chubby/elements/button.overrides +1 -1
- package/src/themes/chubby/elements/header.overrides +1 -1
- package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- package/src/themes/default/assets/fonts/brand-icons.eot +0 -0
- package/src/themes/default/assets/fonts/brand-icons.svg +801 -654
- package/src/themes/default/assets/fonts/brand-icons.ttf +0 -0
- package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
- package/src/themes/default/assets/fonts/brand-icons.woff2 +0 -0
- package/src/themes/default/assets/fonts/icons.eot +0 -0
- package/src/themes/default/assets/fonts/icons.svg +1175 -1079
- package/src/themes/default/assets/fonts/icons.ttf +0 -0
- package/src/themes/default/assets/fonts/icons.woff +0 -0
- package/src/themes/default/assets/fonts/icons.woff2 +0 -0
- package/src/themes/default/assets/fonts/outline-icons.eot +0 -0
- package/src/themes/default/assets/fonts/outline-icons.svg +93 -95
- package/src/themes/default/assets/fonts/outline-icons.ttf +0 -0
- package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
- package/src/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- package/src/themes/default/collections/form.variables +4 -0
- package/src/themes/default/collections/menu.variables +6 -0
- package/src/themes/default/collections/table.variables +52 -0
- package/src/themes/default/elements/button.variables +7 -1
- package/src/themes/default/elements/container.variables +12 -0
- package/src/themes/default/elements/divider.overrides +7 -7
- package/src/themes/default/elements/emoji.overrides +0 -3090
- package/src/themes/default/elements/emoji.variables +3575 -1
- package/src/themes/default/elements/flag.overrides +0 -991
- package/src/themes/default/elements/flag.variables +1609 -5
- package/src/themes/default/elements/icon.overrides +1975 -1949
- package/src/themes/default/elements/icon.variables +1 -0
- package/src/themes/default/elements/input.variables +15 -0
- package/src/themes/default/elements/segment.variables +8 -0
- package/src/themes/default/elements/step.overrides +3 -3
- package/src/themes/default/globals/site.variables +109 -8
- package/src/themes/default/globals/variation.variables +143 -6
- package/src/themes/default/modules/accordion.overrides +6 -5
- package/src/themes/default/modules/accordion.variables +49 -2
- package/src/themes/default/modules/calendar.variables +3 -0
- package/src/themes/default/modules/checkbox.overrides +9 -9
- package/src/themes/default/modules/checkbox.variables +5 -5
- package/src/themes/default/modules/dimmer.variables +1 -1
- package/src/themes/default/modules/dropdown.overrides +5 -5
- package/src/themes/default/modules/dropdown.variables +4 -10
- package/src/themes/default/modules/modal.variables +14 -0
- package/src/themes/default/modules/popup.variables +0 -2
- package/src/themes/default/modules/toast.variables +3 -0
- package/src/themes/default/views/card.variables +8 -0
- package/src/themes/{default → famfamfam}/assets/images/flags.png +0 -0
- package/src/themes/famfamfam/elements/flag.overrides +1026 -0
- package/src/themes/famfamfam/elements/flag.variables +20 -0
- package/src/themes/github/elements/icon.overrides +206 -206
- package/src/themes/github/elements/step.overrides +5 -5
- package/src/themes/github/globals/site.variables +1 -0
- package/src/themes/github/modules/dropdown.overrides +6 -6
- package/src/themes/instagram/views/card.overrides +1 -1
- package/src/themes/joypixels/elements/emoji.overrides +0 -3089
- package/src/themes/joypixels/elements/emoji.variables +3574 -5
- package/src/themes/material/collections/menu.overrides +1 -1
- package/src/themes/material/elements/button.overrides +1 -1
- package/src/themes/material/elements/header.overrides +1 -1
- package/src/themes/material/elements/icon.overrides +932 -932
- package/src/themes/material/globals/site.variables +0 -1
- package/src/themes/material/modules/dropdown.overrides +1 -1
- package/src/themes/material/modules/modal.overrides +1 -1
- package/src/themes/pulsar/elements/loader.overrides +2 -2
- package/src/themes/resetcss/globals/reset.overrides +3 -3
- package/src/themes/rtl/globals/site.overrides +1 -1
- package/src/themes/striped/modules/progress.overrides +1 -1
- package/src/themes/systemfont/globals/reset.overrides +8 -0
- package/src/themes/systemfont/globals/site.variables +10 -0
- package/src/themes/twitter/elements/emoji.overrides +0 -3091
- package/src/themes/twitter/elements/emoji.variables +3570 -6
- package/tasks/admin/distributions/create.js +1 -1
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/release.js +1 -1
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +9 -4
- package/tasks/build/javascript.js +3 -3
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +1 -1
- package/tasks/collections/admin.js +1 -1
- package/tasks/config/admin/oauth.example.js +1 -1
- package/tasks/config/admin/templates/composer.json +1 -1
- package/tasks/config/project/install.js +15 -13
- package/tasks/install.js +1 -0
- package/tasks/rtl/watch.js +1 -1
- package/tasks/version.js +1 -1
- package/test/fixtures/accordion.html +1 -1
- package/test/fixtures/checkbox.html +1 -1
- package/test/fixtures/dropdown.html +1 -1
- package/test/fixtures/modal.html +1 -1
- package/test/fixtures/popup.html +1 -1
- package/test/fixtures/rating.html +1 -1
- package/test/fixtures/shape.html +1 -1
- package/test/fixtures/sidebar.html +1 -1
- package/test/fixtures/tab.html +1 -1
- package/test/fixtures/transition.html +1 -1
- package/test/fixtures/video.html +1 -1
- package/test/helpers/jasmine-jquery.js +2 -2
- package/test/helpers/jasmine-sinon.js +1 -1
- package/test/helpers/jquery-events.js +1 -1
- package/test/helpers/sinon.js +3 -3
- package/test/meteor/fonts.js +1 -1
- package/test/modules/accordion.spec.js +1 -1
- package/test/modules/checkbox.spec.js +1 -1
- package/test/modules/dropdown.spec.js +1 -1
- package/test/modules/modal.spec.js +1 -1
- package/test/modules/module.spec.js +1 -1
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/shape.spec.js +1 -1
- package/test/modules/sidebar.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
- package/test/modules/video.spec.js +1 -1
package/dist/components/modal.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.0-beta.
|
2
|
+
* # Fomantic-UI 2.9.0-beta.302+091bcb0 - Modal
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -65,8 +65,9 @@ $.fn.modal = function(parameters) {
|
|
65
65
|
moduleNamespace = 'module-' + namespace,
|
66
66
|
|
67
67
|
$module = $(this),
|
68
|
-
$context = $(settings.context),
|
69
|
-
$
|
68
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
|
69
|
+
$closeIcon = $module.find(selector.closeIcon),
|
70
|
+
$inputs,
|
70
71
|
|
71
72
|
$allModals,
|
72
73
|
$otherModals,
|
@@ -92,6 +93,7 @@ $.fn.modal = function(parameters) {
|
|
92
93
|
module = {
|
93
94
|
|
94
95
|
initialize: function() {
|
96
|
+
module.create.id();
|
95
97
|
if(!$module.hasClass('modal')) {
|
96
98
|
module.create.modal();
|
97
99
|
if(!$.isFunction(settings.onHidden)) {
|
@@ -116,15 +118,17 @@ $.fn.modal = function(parameters) {
|
|
116
118
|
$actions.empty();
|
117
119
|
}
|
118
120
|
settings.actions.forEach(function (el) {
|
119
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
121
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
120
122
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
121
123
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
122
124
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
123
125
|
$actions.append($('<button/>', {
|
124
126
|
html: icon + text,
|
127
|
+
'aria-label': (el[fields.text] || el[fields.icon] || '').replace(/<[^>]+(>|$)/g,''),
|
125
128
|
class: className.button + ' ' + cls,
|
126
129
|
click: function () {
|
127
|
-
|
130
|
+
var button = $(this);
|
131
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
128
132
|
return;
|
129
133
|
}
|
130
134
|
module.hide();
|
@@ -135,7 +139,6 @@ $.fn.modal = function(parameters) {
|
|
135
139
|
module.cache = {};
|
136
140
|
module.verbose('Initializing dimmer', $context);
|
137
141
|
|
138
|
-
module.create.id();
|
139
142
|
module.create.dimmer();
|
140
143
|
|
141
144
|
if ( settings.allowMultiple ) {
|
@@ -145,11 +148,9 @@ $.fn.modal = function(parameters) {
|
|
145
148
|
$module.addClass('top aligned');
|
146
149
|
}
|
147
150
|
module.refreshModals();
|
148
|
-
|
151
|
+
module.refreshInputs();
|
149
152
|
module.bind.events();
|
150
|
-
|
151
|
-
module.observeChanges();
|
152
|
-
}
|
153
|
+
module.observeChanges();
|
153
154
|
module.instantiate();
|
154
155
|
if(settings.autoShow){
|
155
156
|
module.show();
|
@@ -166,16 +167,20 @@ $.fn.modal = function(parameters) {
|
|
166
167
|
|
167
168
|
create: {
|
168
169
|
modal: function() {
|
169
|
-
$module = $('<div/>', {class: className.modal});
|
170
|
+
$module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
|
170
171
|
if (settings.closeIcon) {
|
171
|
-
$
|
172
|
-
$module.append($
|
172
|
+
$closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
|
173
|
+
$module.append($closeIcon);
|
173
174
|
}
|
174
175
|
if (settings.title !== '') {
|
175
|
-
|
176
|
+
var titleId = '_' + module.get.id() + 'title';
|
177
|
+
$module.attr('aria-labelledby', titleId);
|
178
|
+
$('<div/>', {class: className.title, id: titleId}).appendTo($module);
|
176
179
|
}
|
177
180
|
if (settings.content !== '') {
|
178
|
-
|
181
|
+
var descId = '_' + module.get.id() + 'desc';
|
182
|
+
$module.attr('aria-describedby', descId);
|
183
|
+
$('<div/>', {class: className.content, id: descId}).appendTo($module);
|
179
184
|
}
|
180
185
|
if (module.has.configActions()) {
|
181
186
|
$('<div/>', {class: className.actions}).appendTo($module);
|
@@ -206,13 +211,13 @@ $.fn.modal = function(parameters) {
|
|
206
211
|
$dimmer = $dimmable.dimmer('get dimmer');
|
207
212
|
},
|
208
213
|
id: function() {
|
209
|
-
id = (Math.random().toString(16) + '000000000').
|
214
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
210
215
|
elementEventNamespace = '.' + id;
|
211
216
|
module.verbose('Creating unique id for element', id);
|
212
217
|
},
|
213
218
|
innerDimmer: function() {
|
214
|
-
if ( $module.find(selector.dimmer).length
|
215
|
-
$
|
219
|
+
if ( $module.find(selector.dimmer).length === 0 ) {
|
220
|
+
$('<div/>', {class: className.innerDimmer}).prependTo($module);
|
216
221
|
}
|
217
222
|
}
|
218
223
|
},
|
@@ -228,15 +233,21 @@ $.fn.modal = function(parameters) {
|
|
228
233
|
;
|
229
234
|
$window.off(elementEventNamespace);
|
230
235
|
$dimmer.off(elementEventNamespace);
|
231
|
-
$
|
236
|
+
$closeIcon.off(elementEventNamespace);
|
237
|
+
if($inputs) {
|
238
|
+
$inputs.off(elementEventNamespace);
|
239
|
+
}
|
232
240
|
$context.dimmer('destroy');
|
233
241
|
},
|
234
242
|
|
235
243
|
observeChanges: function() {
|
236
244
|
if('MutationObserver' in window) {
|
237
245
|
observer = new MutationObserver(function(mutations) {
|
238
|
-
|
239
|
-
|
246
|
+
if(settings.observeChanges) {
|
247
|
+
module.debug('DOM tree modified, refreshing');
|
248
|
+
module.refresh();
|
249
|
+
}
|
250
|
+
module.refreshInputs();
|
240
251
|
});
|
241
252
|
observer.observe(element, {
|
242
253
|
childList : true,
|
@@ -261,6 +272,23 @@ $.fn.modal = function(parameters) {
|
|
261
272
|
$allModals = $otherModals.add($module);
|
262
273
|
},
|
263
274
|
|
275
|
+
refreshInputs: function(){
|
276
|
+
if($inputs){
|
277
|
+
$inputs
|
278
|
+
.off('keydown' + elementEventNamespace)
|
279
|
+
;
|
280
|
+
}
|
281
|
+
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
282
|
+
return $(this).closest('.disabled').length === 0;
|
283
|
+
});
|
284
|
+
$inputs.first()
|
285
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
|
286
|
+
;
|
287
|
+
$inputs.last()
|
288
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
|
289
|
+
;
|
290
|
+
},
|
291
|
+
|
264
292
|
attachEvents: function(selector, event) {
|
265
293
|
var
|
266
294
|
$toggle = $(selector)
|
@@ -289,6 +317,9 @@ $.fn.modal = function(parameters) {
|
|
289
317
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
290
318
|
.on('click' + eventNamespace, selector.deny, module.event.deny)
|
291
319
|
;
|
320
|
+
$closeIcon
|
321
|
+
.on('keyup' + elementEventNamespace, module.event.closeKeyUp)
|
322
|
+
;
|
292
323
|
$window
|
293
324
|
.on('resize' + elementEventNamespace, module.event.resize)
|
294
325
|
;
|
@@ -307,7 +338,7 @@ $.fn.modal = function(parameters) {
|
|
307
338
|
|
308
339
|
get: {
|
309
340
|
id: function() {
|
310
|
-
return
|
341
|
+
return id;
|
311
342
|
},
|
312
343
|
element: function() {
|
313
344
|
return $module;
|
@@ -346,10 +377,38 @@ $.fn.modal = function(parameters) {
|
|
346
377
|
close: function() {
|
347
378
|
module.hide();
|
348
379
|
},
|
380
|
+
closeKeyUp: function(event){
|
381
|
+
var
|
382
|
+
keyCode = event.which
|
383
|
+
;
|
384
|
+
if ((keyCode === settings.keys.enter || keyCode === settings.keys.space) && $module.hasClass(className.front)) {
|
385
|
+
module.hide();
|
386
|
+
}
|
387
|
+
},
|
388
|
+
inputKeyDown: {
|
389
|
+
first: function(event) {
|
390
|
+
var
|
391
|
+
keyCode = event.which
|
392
|
+
;
|
393
|
+
if (keyCode === settings.keys.tab && event.shiftKey) {
|
394
|
+
$inputs.last().focus();
|
395
|
+
event.preventDefault();
|
396
|
+
}
|
397
|
+
},
|
398
|
+
last: function(event) {
|
399
|
+
var
|
400
|
+
keyCode = event.which
|
401
|
+
;
|
402
|
+
if (keyCode === settings.keys.tab && !event.shiftKey) {
|
403
|
+
$inputs.first().focus();
|
404
|
+
event.preventDefault();
|
405
|
+
}
|
406
|
+
}
|
407
|
+
},
|
349
408
|
mousedown: function(event) {
|
350
409
|
var
|
351
410
|
$target = $(event.target),
|
352
|
-
isRtl = module.is.rtl()
|
411
|
+
isRtl = module.is.rtl()
|
353
412
|
;
|
354
413
|
initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
|
355
414
|
if(initialMouseDownInModal) {
|
@@ -397,10 +456,9 @@ $.fn.modal = function(parameters) {
|
|
397
456
|
},
|
398
457
|
keyboard: function(event) {
|
399
458
|
var
|
400
|
-
keyCode = event.which
|
401
|
-
escapeKey = 27
|
459
|
+
keyCode = event.which
|
402
460
|
;
|
403
|
-
if(keyCode
|
461
|
+
if(keyCode === settings.keys.escape) {
|
404
462
|
if(settings.closable) {
|
405
463
|
module.debug('Escape key pressed hiding modal');
|
406
464
|
if ( $module.hasClass(className.front) ) {
|
@@ -456,6 +514,10 @@ $.fn.modal = function(parameters) {
|
|
456
514
|
: function(){}
|
457
515
|
;
|
458
516
|
if( module.is.animating() || !module.is.active() ) {
|
517
|
+
if(settings.onShow.call(element) === false) {
|
518
|
+
module.verbose('Show callback returned false cancelling show');
|
519
|
+
return;
|
520
|
+
}
|
459
521
|
module.showDimmer();
|
460
522
|
module.cacheSizes();
|
461
523
|
module.set.bodyMargin();
|
@@ -485,7 +547,6 @@ $.fn.modal = function(parameters) {
|
|
485
547
|
$module.detach().appendTo($dimmer);
|
486
548
|
}
|
487
549
|
}
|
488
|
-
settings.onShow.call(element);
|
489
550
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
490
551
|
module.debug('Showing modal with css animations');
|
491
552
|
$module
|
@@ -528,7 +589,6 @@ $.fn.modal = function(parameters) {
|
|
528
589
|
? callback
|
529
590
|
: function(){}
|
530
591
|
;
|
531
|
-
module.debug('Hiding modal');
|
532
592
|
if(settings.onHide.call(element, $(this)) === false) {
|
533
593
|
module.verbose('Hide callback returned false cancelling hide');
|
534
594
|
ignoreRepeatedEvents = false;
|
@@ -536,6 +596,7 @@ $.fn.modal = function(parameters) {
|
|
536
596
|
}
|
537
597
|
|
538
598
|
if( module.is.animating() || module.is.active() ) {
|
599
|
+
module.debug('Hiding modal');
|
539
600
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
540
601
|
module.remove.active();
|
541
602
|
$module
|
@@ -715,7 +776,7 @@ $.fn.modal = function(parameters) {
|
|
715
776
|
$module
|
716
777
|
.off('mousedown' + elementEventNamespace)
|
717
778
|
;
|
718
|
-
}
|
779
|
+
}
|
719
780
|
$dimmer
|
720
781
|
.off('mousedown' + elementEventNamespace)
|
721
782
|
;
|
@@ -900,13 +961,10 @@ $.fn.modal = function(parameters) {
|
|
900
961
|
set: {
|
901
962
|
autofocus: function() {
|
902
963
|
var
|
903
|
-
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
904
|
-
return $(this).closest('.disabled').length === 0;
|
905
|
-
}),
|
906
964
|
$autofocus = $inputs.filter('[autofocus]'),
|
907
965
|
$input = ($autofocus.length > 0)
|
908
966
|
? $autofocus.first()
|
909
|
-
: $inputs.first()
|
967
|
+
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
910
968
|
;
|
911
969
|
if($input.length > 0) {
|
912
970
|
$input.focus();
|
@@ -988,7 +1046,7 @@ $.fn.modal = function(parameters) {
|
|
988
1046
|
? $(document).scrollTop() + settings.padding
|
989
1047
|
: $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
990
1048
|
marginLeft: -(module.cache.width / 2)
|
991
|
-
})
|
1049
|
+
})
|
992
1050
|
;
|
993
1051
|
} else {
|
994
1052
|
$module
|
@@ -997,7 +1055,7 @@ $.fn.modal = function(parameters) {
|
|
997
1055
|
? -(module.cache.height / 2)
|
998
1056
|
: settings.padding / 2,
|
999
1057
|
marginLeft: -(module.cache.width / 2)
|
1000
|
-
})
|
1058
|
+
})
|
1001
1059
|
;
|
1002
1060
|
}
|
1003
1061
|
module.verbose('Setting modal offset for legacy mode');
|
@@ -1323,11 +1381,19 @@ $.fn.modal.settings = {
|
|
1323
1381
|
// called after deny selector match
|
1324
1382
|
onDeny : function(){ return true; },
|
1325
1383
|
|
1384
|
+
keys : {
|
1385
|
+
space : 32,
|
1386
|
+
enter : 13,
|
1387
|
+
escape : 27,
|
1388
|
+
tab : 9,
|
1389
|
+
},
|
1390
|
+
|
1326
1391
|
selector : {
|
1327
1392
|
title : '> .header',
|
1328
1393
|
content : '> .content',
|
1329
1394
|
actions : '> .actions',
|
1330
1395
|
close : '> .close',
|
1396
|
+
closeIcon: '> .close',
|
1331
1397
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
1332
1398
|
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
1333
1399
|
modal : '.ui.modal',
|
@@ -1359,11 +1425,13 @@ $.fn.modal.settings = {
|
|
1359
1425
|
template : 'ui tiny modal',
|
1360
1426
|
ok : 'positive',
|
1361
1427
|
cancel : 'negative',
|
1362
|
-
prompt : 'ui fluid input'
|
1428
|
+
prompt : 'ui fluid input',
|
1429
|
+
innerDimmer: 'ui inverted dimmer'
|
1363
1430
|
},
|
1364
1431
|
text: {
|
1365
1432
|
ok : 'Ok',
|
1366
|
-
cancel: 'Cancel'
|
1433
|
+
cancel: 'Cancel',
|
1434
|
+
close : 'Close'
|
1367
1435
|
}
|
1368
1436
|
};
|
1369
1437
|
|
@@ -1389,33 +1457,39 @@ $.fn.modal.settings.templates = {
|
|
1389
1457
|
},
|
1390
1458
|
alert: function () {
|
1391
1459
|
var settings = this.get.settings(),
|
1392
|
-
args = settings.templates.getArguments(arguments)
|
1460
|
+
args = settings.templates.getArguments(arguments),
|
1461
|
+
approveFn = args.handler
|
1393
1462
|
;
|
1394
1463
|
return {
|
1395
1464
|
title : args.title,
|
1396
1465
|
content: args.content,
|
1466
|
+
onApprove: approveFn,
|
1397
1467
|
actions: [{
|
1398
1468
|
text : settings.text.ok,
|
1399
1469
|
class: settings.className.ok,
|
1400
|
-
click:
|
1470
|
+
click: approveFn
|
1401
1471
|
}]
|
1402
1472
|
}
|
1403
1473
|
},
|
1404
1474
|
confirm: function () {
|
1405
1475
|
var settings = this.get.settings(),
|
1406
|
-
args = settings.templates.getArguments(arguments)
|
1476
|
+
args = settings.templates.getArguments(arguments),
|
1477
|
+
approveFn = function(){args.handler(true)},
|
1478
|
+
denyFn = function(){args.handler(false)}
|
1407
1479
|
;
|
1408
1480
|
return {
|
1409
1481
|
title : args.title,
|
1410
1482
|
content: args.content,
|
1483
|
+
onApprove: approveFn,
|
1484
|
+
onDeny: denyFn,
|
1411
1485
|
actions: [{
|
1412
1486
|
text : settings.text.ok,
|
1413
1487
|
class: settings.className.ok,
|
1414
|
-
click:
|
1488
|
+
click: approveFn
|
1415
1489
|
},{
|
1416
1490
|
text: settings.text.cancel,
|
1417
1491
|
class: settings.className.cancel,
|
1418
|
-
click:
|
1492
|
+
click: denyFn
|
1419
1493
|
}]
|
1420
1494
|
}
|
1421
1495
|
},
|
@@ -1423,7 +1497,14 @@ $.fn.modal.settings.templates = {
|
|
1423
1497
|
var $this = this,
|
1424
1498
|
settings = this.get.settings(),
|
1425
1499
|
args = settings.templates.getArguments(arguments),
|
1426
|
-
input = $($.parseHTML(args.content)).filter('.ui.input')
|
1500
|
+
input = $($.parseHTML(args.content)).filter('.ui.input'),
|
1501
|
+
approveFn = function(){
|
1502
|
+
var settings = $this.get.settings(),
|
1503
|
+
inputField = $this.get.element().find(settings.selector.prompt)[0]
|
1504
|
+
;
|
1505
|
+
args.handler($(inputField).val());
|
1506
|
+
},
|
1507
|
+
denyFn = function(){args.handler(null)}
|
1427
1508
|
;
|
1428
1509
|
if (input.length === 0) {
|
1429
1510
|
args.content += '<p><div class="'+settings.className.prompt+'"><input placeholder="'+this.helpers.deQuote(args.placeholder || '')+'" type="text" value="'+this.helpers.deQuote(args.defaultValue || '')+'"></div></p>';
|
@@ -1431,19 +1512,16 @@ $.fn.modal.settings.templates = {
|
|
1431
1512
|
return {
|
1432
1513
|
title : args.title,
|
1433
1514
|
content: args.content,
|
1515
|
+
onApprove: approveFn,
|
1516
|
+
onDeny: denyFn,
|
1434
1517
|
actions: [{
|
1435
1518
|
text: settings.text.ok,
|
1436
1519
|
class: settings.className.ok,
|
1437
|
-
click:
|
1438
|
-
var settings = $this.get.settings(),
|
1439
|
-
inputField = $this.get.element().find(settings.selector.prompt)[0]
|
1440
|
-
;
|
1441
|
-
args.handler($(inputField).val());
|
1442
|
-
}
|
1520
|
+
click: approveFn
|
1443
1521
|
},{
|
1444
1522
|
text: settings.text.cancel,
|
1445
1523
|
class: settings.className.cancel,
|
1446
|
-
click:
|
1524
|
+
click: denyFn
|
1447
1525
|
}]
|
1448
1526
|
}
|
1449
1527
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.0-beta.
|
2
|
+
* # Fomantic-UI 2.9.0-beta.302+091bcb0 - Modal
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
6
6
|
* Released under the MIT license
|
7
7
|
* http://opensource.org/licenses/MIT
|
8
8
|
*
|
9
|
-
*/.ui.modal{position:absolute;display:none;z-index:1001;text-align:left;background:#fff;border:none;-webkit-box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;transform-origin:50% 25%;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.dimmer:first-child+:not(.close),.ui.modal>.dimmer:first-child+i.icon+*,.ui.modal>:first-child:not(.close):not(.dimmer),.ui.modal>i.icon:first-child+*{border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.ui.dimmer{border-radius:inherit}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;margin:0;padding:1.25rem 1.5rem;-webkit-box-shadow:none;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.28571429em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-ms-flex-item-align:start;align-self:start;max-width:100%}.ui.modal>[class*="top aligned"]{-ms-flex-item-align:start;align-self:start}.ui.modal>[class*="middle aligned"]{-ms-flex-item-align:center;align-self:center}.ui.modal>[class*=stretched]{-ms-flex-item-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-ms-flex-item-align:start;align-self:start}.ui.modal>.content>.image+.description,.ui.modal>.content>i.icon+.description{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem 1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button:not(.fluid){margin-left:.75em}.ui.basic.modal>.actions{border-top:none}.ui.modal>.center.aligned,.ui.modal>.centered{text-align:center}.ui.modal>.center.aligned.actions>.button:not(.fluid),.ui.modal>.centered.actions>.button:not(.fluid){margin-left:.5em;margin-right:.5em}@media only screen and (max-width:767.98px){.ui.modal:not(.fullscreen){width:95%;margin:0}}@media only screen and (min-width:768px){.ui.modal:not(.fullscreen){width:88%;margin:0}}@media only screen and (min-width:992px){.ui.modal:not(.fullscreen){width:850px;margin:0}}@media only screen and (min-width:1200px){.ui.modal:not(.fullscreen){width:900px;margin:0}}@media only screen and (min-width:1920px){.ui.modal:not(.fullscreen){width:950px;margin:0}}@media only screen and (max-width:991.98px){.ui.modal>.close+.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767.98px){.ui.modal>.header{padding:.75rem 1rem}.ui.modal>.close+.header{padding-right:2.25rem}.ui.overlay.fullscreen.modal>.content.content.content{min-height:calc(100vh - 8.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content.content.content{max-height:calc(100vh - 8.1rem)}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.modal>.content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal>.content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;-webkit-box-shadow:none;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{-webkit-box-shadow:1px 3px 10px 2px rgba(0,0,0,.2);box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none!important;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff;border-bottom:none}.ui.basic.modal>.close{top:1rem;right:1.5rem;color:#fff}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}.ui.legacy.legacy.modal,.ui.legacy.legacy.page.dimmer>.ui.modal{left:50%!important}.ui.legacy.legacy.modal:not(.aligned),.ui.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:50%}.ui.legacy.legacy.page.dimmer>.ui.scrolling.modal:not(.aligned),.ui.page.dimmer>.ui.scrolling.legacy.legacy.modal:not(.aligned),.ui.top.aligned.dimmer>.ui.legacy.legacy.modal:not(.aligned),.ui.top.aligned.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:auto}.ui.legacy.overlay.fullscreen.modal{margin-top:-2rem!important}.ui.loading.modal{display:block;visibility:hidden;z-index:-1}.ui.active.modal{display:block}.modals.dimmer .ui.top.aligned.modal{top:5vh}.modals.dimmer .ui.bottom.aligned.modal{bottom:5vh}@media only screen and (max-width:767.98px){.modals.dimmer .ui.top.aligned.modal{top:1rem}.modals.dimmer .ui.bottom.aligned.modal{bottom:1rem}}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable>.dimmer{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:fixed}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.modals.dimmer .ui.scrolling.modal:not(.fullscreen){margin:2rem auto}.modals.dimmer .ui.scrolling.modal:not([class*="overlay fullscreen"])::after{content:'\00A0';position:absolute;height:2rem}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen){position:absolute;left:50%}.ui.modal>.scrolling.content{max-height:calc(80vh - 10rem);overflow:auto}.ui.overlay.fullscreen.modal>.content{min-height:calc(100vh - 9.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content{max-height:calc(100vh - 9.1rem)}.ui.fullscreen.modal{width:95%;left:2.5%;margin:1em auto}.ui.overlay.fullscreen.modal{width:100%;left:0;margin:0 auto;top:0;border-radius:0}.ui.fullscreen.modal>.close+.header:not(.centered):not(.center):not(.icon),.ui.modal>.close.inside+.header:not(.centered):not(.center):not(.icon){padding-right:2.25rem}.ui.fullscreen.modal>.close,.ui.modal>.close.inside{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.basic.fullscreen.modal>.close{color:#fff}.ui.modal{font-size:1rem}.ui.mini.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.mini.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.mini.modal{width:35.2%;margin:0}}@media only screen and (min-width:992px){.ui.mini.modal{width:340px;margin:0}}@media only screen and (min-width:1200px){.ui.mini.modal{width:360px;margin:0}}@media only screen and (min-width:1920px){.ui.mini.modal{width:380px;margin:0}}.ui.tiny.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.tiny.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.tiny.modal{width:52.8%;margin:0}}@media only screen and (min-width:992px){.ui.tiny.modal{width:510px;margin:0}}@media only screen and (min-width:1200px){.ui.tiny.modal{width:540px;margin:0}}@media only screen and (min-width:1920px){.ui.tiny.modal{width:570px;margin:0}}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.small.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0}}.ui.large.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.large.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0}}.ui.big.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.big.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.big.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.big.modal{width:1190px;margin:0}}@media only screen and (min-width:1200px){.ui.big.modal{width:1260px;margin:0}}@media only screen and (min-width:1920px){.ui.big.modal{width:1330px;margin:0}}.ui.huge.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.huge.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.huge.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.huge.modal{width:1360px;margin:0}}@media only screen and (min-width:1200px){.ui.huge.modal{width:1440px;margin:0}}@media only screen and (min-width:1920px){.ui.huge.modal{width:1520px;margin:0}}.ui.massive.modal>.header:not(.ui){font-size:1.8em}@media only screen and (max-width:767.98px){.ui.massive.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.massive.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.massive.modal{width:1530px;margin:0}}@media only screen and (min-width:1200px){.ui.massive.modal{width:1620px;margin:0}}@media only screen and (min-width:1920px){.ui.massive.modal{width:1710px;margin:0}}.ui.inverted.modal{background:rgba(0,0,0,.9)}.ui.inverted.modal>.content,.ui.inverted.modal>.header{background:rgba(0,0,0,.9);color:#fff}.ui.inverted.modal>.actions{background:#191a1b;border-top:1px solid rgba(34,36,38,.85);color:#fff}.ui.inverted.dimmer>.modal>.close{color:rgba(0,0,0,.85)}@media only screen and (max-width:991.98px){.ui.dimmer .inverted.modal>.close{color:#fff}}.ui.inverted.fullscreen.modal>.close,.ui.inverted.modal>.close.inside{color:#fff}
|
9
|
+
*/.ui.modal{position:absolute;display:none;z-index:1001;text-align:left;background:#fff;border:none;-webkit-box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;transform-origin:50% 25%;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.dimmer:first-child+:not(.close),.ui.modal>.dimmer:first-child+i.icon+*,.ui.modal>:first-child:not(.close):not(.dimmer),.ui.modal>i.icon:first-child+*{border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.ui.dimmer{border-radius:inherit}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0 0}.ui.modal>.close:focus,.ui.modal>.close:hover{opacity:1;outline:0}.ui.modal>.header{display:block;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";background:#fff;margin:0;padding:1.25rem 1.5rem;-webkit-box-shadow:none;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.28571429em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-ms-flex-item-align:start;align-self:start;max-width:100%}.ui.modal>[class*="top aligned"]{-ms-flex-item-align:start;align-self:start}.ui.modal>[class*="middle aligned"]{-ms-flex-item-align:center;align-self:center}.ui.modal>[class*=stretched]{-ms-flex-item-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-ms-flex-item-align:start;align-self:start}.ui.modal>.content>.image+.description,.ui.modal>.content>i.icon+.description{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem 1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button:not(.fluid){margin-left:.75em}.ui.basic.modal>.actions,.ui.modal>.basic.actions{border-top:none}.ui.modal>.left.actions{text-align:left}.ui.modal>.left.actions>.button:not(.fluid){margin-left:.5em;margin-right:.5em}.ui.modal>.center.aligned,.ui.modal>.centered{text-align:center}.ui.modal>.center.aligned.actions>.button:not(.fluid),.ui.modal>.centered.actions>.button:not(.fluid){margin-left:.5em;margin-right:.5em}@media only screen and (max-width:767.98px){.ui.modal:not(.fullscreen){width:95%;margin:0}}@media only screen and (min-width:768px){.ui.modal:not(.fullscreen){width:88%;margin:0}}@media only screen and (min-width:992px){.ui.modal:not(.fullscreen){width:850px;margin:0}.ui.modal:not(.fullscreen)>.active.dimmer+.close:not(.inside){pointer-events:none;opacity:.1}.ui.dimmer>.ui.modal:not(.fullscreen)>.close:not(.inside){text-shadow:-1px -1px 2px rgba(0,0,0,.3),1px -1px 2px rgba(0,0,0,.3),-1px 2px 2px rgba(0,0,0,.3),1px 2px 2px rgba(0,0,0,.3)}.ui.inverted.dimmer>.ui.modal:not(.fullscreen)>.close:not(.inside){text-shadow:-1px -1px 2px rgba(255,255,255,.3),1px -1px 2px rgba(255,255,255,.3),-1px 2px 2px rgba(255,255,255,.3),1px 2px 2px rgba(255,255,255,.3)}}@media only screen and (min-width:1200px){.ui.modal:not(.fullscreen){width:900px;margin:0}}@media only screen and (min-width:1920px){.ui.modal:not(.fullscreen){width:950px;margin:0}}@media only screen and (max-width:991.98px){.ui.modal>.close+.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767.98px){.ui.modal>.header{padding:.75rem 1rem}.ui.modal>.close+.header{padding-right:2.25rem}.ui.overlay.fullscreen.modal>.content.content.content{min-height:calc(100vh - 8.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content.content.content{max-height:calc(100vh - 8.1rem)}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.modal>.content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal>.content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;-webkit-box-shadow:none;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{-webkit-box-shadow:1px 3px 10px 2px rgba(0,0,0,.2);box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none!important;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header,.ui.modal>.basic.actions,.ui.modal>.basic.header{background-color:transparent}.ui.modal>.basic.header{border-bottom:none}.ui.basic.modal>.header{color:#fff;border-bottom:none}.ui.basic.modal>.close{top:1rem;right:1.5rem;color:#fff}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}.ui.legacy.legacy.modal,.ui.legacy.legacy.page.dimmer>.ui.modal{left:50%!important}.ui.legacy.legacy.modal:not(.aligned),.ui.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:50%}.ui.legacy.legacy.page.dimmer>.ui.scrolling.modal:not(.aligned),.ui.page.dimmer>.ui.scrolling.legacy.legacy.modal:not(.aligned),.ui.top.aligned.dimmer>.ui.legacy.legacy.modal:not(.aligned),.ui.top.aligned.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:auto}.ui.legacy.overlay.fullscreen.modal{margin-top:-2rem!important}.ui.loading.modal{display:block;visibility:hidden;z-index:-1}.ui.active.modal{display:block}.modals.dimmer .ui.top.aligned.modal{top:5vh}.modals.dimmer .ui.bottom.aligned.modal{bottom:5vh}@media only screen and (max-width:767.98px){.modals.dimmer .ui.top.aligned.modal{top:1rem}.modals.dimmer .ui.bottom.aligned.modal{bottom:1rem}}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable>.dimmer{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:fixed}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.modals.dimmer .ui.scrolling.modal:not(.fullscreen){margin:2rem auto}.modals.dimmer .ui.scrolling.modal:not([class*="overlay fullscreen"])::after{content:'\00A0';position:absolute;height:2rem}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen){position:absolute;left:50%}.ui.modal>.scrolling.content{max-height:calc(80vh - 10rem);overflow:auto}.ui.overlay.fullscreen.modal>.content{min-height:calc(100vh - 9.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content{max-height:calc(100vh - 9.1rem)}.ui.fullscreen.modal{width:95%;left:2.5%;margin:1em auto}.ui.overlay.fullscreen.modal{width:100%;left:0;margin:0 auto;top:0;border-radius:0}.ui.fullscreen.modal>.close+.header:not(.centered):not(.center):not(.icon),.ui.modal>.close.inside+.header:not(.centered):not(.center):not(.icon){padding-right:2.25rem}.ui.fullscreen.modal>.close,.ui.modal>.close.inside{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.basic.fullscreen.modal>.close{color:#fff}.ui.modal{font-size:1rem}.ui.mini.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.mini.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.mini.modal{width:35.2%;margin:0}}@media only screen and (min-width:992px){.ui.mini.modal{width:340px;margin:0}}@media only screen and (min-width:1200px){.ui.mini.modal{width:360px;margin:0}}@media only screen and (min-width:1920px){.ui.mini.modal{width:380px;margin:0}}.ui.tiny.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.tiny.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.tiny.modal{width:52.8%;margin:0}}@media only screen and (min-width:992px){.ui.tiny.modal{width:510px;margin:0}}@media only screen and (min-width:1200px){.ui.tiny.modal{width:540px;margin:0}}@media only screen and (min-width:1920px){.ui.tiny.modal{width:570px;margin:0}}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.small.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0}}.ui.large.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.large.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0}}.ui.big.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.big.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.big.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.big.modal{width:1190px;margin:0}}@media only screen and (min-width:1200px){.ui.big.modal{width:1260px;margin:0}}@media only screen and (min-width:1920px){.ui.big.modal{width:1330px;margin:0}}.ui.huge.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.huge.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.huge.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.huge.modal{width:1360px;margin:0}}@media only screen and (min-width:1200px){.ui.huge.modal{width:1440px;margin:0}}@media only screen and (min-width:1920px){.ui.huge.modal{width:1520px;margin:0}}.ui.massive.modal>.header:not(.ui){font-size:1.8em}@media only screen and (max-width:767.98px){.ui.massive.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.massive.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.massive.modal{width:1530px;margin:0}}@media only screen and (min-width:1200px){.ui.massive.modal{width:1620px;margin:0}}@media only screen and (min-width:1920px){.ui.massive.modal{width:1710px;margin:0}}.ui.inverted.modal{background:rgba(0,0,0,.9)}.ui.inverted.modal>.content,.ui.inverted.modal>.header{background:rgba(0,0,0,.9);color:#fff}.ui.inverted.modal>.actions{background:#191a1b;border-top:1px solid rgba(34,36,38,.85);color:#fff}.ui.inverted.dimmer>.modal>.close{color:rgba(0,0,0,.85)}@media only screen and (max-width:991.98px){.ui.dimmer .inverted.modal>.close{color:#fff}}.ui.inverted.fullscreen.modal>.close,.ui.inverted.modal>.close.inside{color:#fff}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.0-beta.
|
2
|
+
* # Fomantic UI - 2.9.0-beta.302+091bcb0
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* http://fomantic-ui.com/
|
5
5
|
*
|
6
|
-
* Copyright
|
6
|
+
* Copyright 2022 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(B,R,P,W){"use strict";B.isFunction=B.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),B.fn.modal=function(T){var A,e=B(this),H=B(R),D=B(P),O=B("body"),E=e.selector||"",L=(new Date).getTime(),N=[],z=T,j="string"==typeof z,q=[].slice.call(arguments,1),I=R.requestAnimationFrame||R.mozRequestAnimationFrame||R.webkitRequestAnimationFrame||R.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,s,e,i,n,a,c,t,r,l,d,u=B.isPlainObject(T)?B.extend(!0,{},B.fn.modal.settings,T):B.extend({},B.fn.modal.settings),m=u.selector,f=u.className,h=u.namespace,g=u.fields,p=u.error,v="."+h,b="module-"+h,y=B(this),x=B(u.context),k=y.find(m.close),w=this,C=y.hasClass("modal")?y.data(b):W,S=!1,F="",M="";d={initialize:function(){if(y.hasClass("modal")||(d.create.modal(),B.isFunction(u.onHidden)||(u.onHidden=function(){d.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(m.title).html(d.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(m.content).html(d.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),d.has.configActions()){var s=y.find(m.actions).addClass(u.classActions);0===s.length?s=B("<div/>",{class:f.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?'<i class="'+d.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=d.helpers.escape(e[g.text]||"",u.preserveHTML),i=d.helpers.deQuote(e[g.class]||""),o=e[g.click]&&B.isFunction(e[g.click])?e[g.click]:function(){};s.append(B("<button/>",{html:t+n,class:f.button+" "+i,click:function(){!1!==o.call(w,y)&&d.hide()}}))})}d.cache={},d.verbose("Initializing dimmer",x),d.create.id(),d.create.dimmer(),u.allowMultiple&&d.create.innerDimmer(),u.centered||y.addClass("top aligned"),d.refreshModals(),d.bind.events(),u.observeChanges&&d.observeChanges(),d.instantiate(),u.autoShow&&d.show()},instantiate:function(){d.verbose("Storing instance of modal"),C=d,y.data(b,C)},create:{modal:function(){y=B("<div/>",{class:f.modal}),u.closeIcon&&(k=B("<i/>",{class:f.close}),y.append(k)),""!==u.title&&B("<div/>",{class:f.title}).appendTo(y),""!==u.content&&B("<div/>",{class:f.content}).appendTo(y),d.has.configActions()&&B("<div/>",{class:f.actions}).appendTo(y),x.append(y)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},t=B.extend(!0,e,u.dimmerSettings);B.fn.dimmer!==W?(d.debug("Creating dimmer"),i=x.dimmer(t),u.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):d.set.undetached(),n=i.dimmer("get dimmer")):d.error(p.dimmer)},id:function(){r=(Math.random().toString(16)+"000000000").substr(2,8),t="."+r,d.verbose("Creating unique id for element",r)},innerDimmer:function(){0==y.find(m.dimmer).length&&y.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){l&&l.disconnect(),d.verbose("Destroying previous modal"),y.removeData(b).off(v),H.off(t),n.off(t),k.off(v),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((l=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(w,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",l))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){s=y.siblings(m.modal),o=s.add(y)},attachEvents:function(e,t){var n=B(e);t=B.isFunction(d[t])?d[t]:d.toggle,0<n.length?(d.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):d.error(p.notFound,e)},bind:{events:function(){d.verbose("Attaching events"),y.on("click"+v,m.close,d.event.close).on("click"+v,m.approve,d.event.approve).on("click"+v,m.deny,d.event.deny),H.on("resize"+t,d.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",d.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",d.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return y},settings:function(){return u}},event:{approve:function(){S||!1===u.onApprove.call(w,B(this))?d.verbose("Approve callback returned false cancelling hide"):(S=!0,d.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===u.onDeny.call(w,B(this))?d.verbose("Deny callback returned false cancelling hide"):(S=!0,d.hide(function(){S=!1}))},close:function(){d.hide()},mousedown:function(e){var t=B(e.target),n=d.is.rtl();(a=0<t.closest(m.modal).length)&&d.verbose("Mouse down event registered inside the modal"),(c=d.is.scrolling()&&(!n&&B(R).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(c)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<B(e.target).closest(m.modal).length,n=B.contains(P.documentElement,e.target);if(!t&&n&&d.is.active()&&y.hasClass(f.front)){if(d.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!d.hideAll())return}else if(!d.hide())return;d.remove.clickaway()}}else d.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(d.timer),d.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(u.closable?(d.debug("Escape key pressed hiding modal"),y.hasClass(f.front)&&d.hide()):d.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(d.is.animating()||d.is.active())&&I(d.refresh)}},toggle:function(){d.is.active()||d.is.animating()?d.hide():d.show()},show:function(e){e=B.isFunction(e)?e:function(){},d.refreshModals(),d.set.dimmerSettings(),d.set.dimmerStyles(),d.showModal(e)},hide:function(e){return e=B.isFunction(e)?e:function(){},d.refreshModals(),d.hideModal(e)},showModal:function(e){e=B.isFunction(e)?e:function(){},d.is.animating()||!d.is.active()?(d.showDimmer(),d.cacheSizes(),d.set.bodyMargin(),d.can.useFlex()?d.remove.legacy():(d.set.legacy(),d.set.modalOffset(),d.debug("Using non-flex legacy modal positioning.")),d.set.screenHeight(),d.set.type(),d.set.clickaway(),!u.allowMultiple&&d.others.active()?d.hideOthers(d.showModal):(S=!1,u.allowMultiple&&(d.others.active()&&s.filter("."+f.active).find(m.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(n)),u.onShow.call(w),u.transition&&B.fn.transition!==W&&y.transition("is supported")?(d.debug("Showing modal with css animations"),y.transition({debug:u.debug,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(w),u.keyboardShortcuts&&d.add.keyboardShortcuts(),d.save.focus(),d.set.active(),u.autofocus&&d.set.autofocus(),e()}})):d.error(p.noTransition))):d.debug("Modal is already visible")},hideModal:function(e,t,n){var i=s.filter("."+f.active).last();if(e=B.isFunction(e)?e:function(){},d.debug("Hiding modal"),!1===u.onHide.call(w,B(this)))return d.verbose("Hide callback returned false cancelling hide"),S=!1;(d.is.animating()||d.is.active())&&(u.transition&&B.fn.transition!==W&&y.transition("is supported")?(d.remove.active(),y.transition({debug:u.debug,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){d.others.active()||d.others.animating()||t||d.hideDimmer(),u.keyboardShortcuts&&!d.others.active()&&d.remove.keyboardShortcuts()},onComplete:function(){d.unbind.scrollLock(),u.allowMultiple&&(i.addClass(f.front),y.removeClass(f.front),n?o.find(m.dimmer).removeClass("active"):i.find(m.dimmer).removeClass("active")),B.isFunction(u.onHidden)&&u.onHidden.call(w),d.remove.dimmerStyles(),d.restore.focus(),e()}})):d.error(p.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(d.save.bodyMargin(),d.debug("Showing dimmer"),i.dimmer("show")):d.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(d.unbind.scrollLock(),i.dimmer("hide",function(){d.restore.bodyMargin(),d.remove.clickaway(),d.remove.screenHeight()})):d.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var e=o.filter("."+f.active+", ."+f.animating);if(n=B.isFunction(n)?n:function(){},0<e.length){d.debug("Hiding all visible modals");var i=!0;return B(e.get().reverse()).each(function(e,t){i=i&&B(t).modal("hide modal",n,!1,!0)}),i&&d.hideDimmer(),i}},hideOthers:function(e){var t=s.filter("."+f.active+", ."+f.animating);e=B.isFunction(e)?e:function(){},0<t.length&&(d.debug("Hiding other modals",s),t.modal("hide modal",e,!0))},others:{active:function(){return 0<s.filter("."+f.active).length},animating:function(){return 0<s.filter("."+f.animating).length}},add:{keyboardShortcuts:function(){d.verbose("Adding keyboard shortcuts"),D.on("keyup"+v,d.event.keyboard)}},save:{focus:function(){0<B(P.activeElement).closest(y).length||(e=B(P.activeElement).blur())},bodyMargin:function(){F=O.css("margin-"+(d.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,"")),t=R.innerWidth-P.documentElement.clientWidth;M=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";O.css("margin-"+n,F),O.find(m.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(f.active)},legacy:function(){y.removeClass(f.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+t),n.off("mousedown"+t),n.off("mouseup"+t)},dimmerStyles:function(){n.removeClass(f.inverted),i.removeClass(f.blurring)},bodyStyle:function(){""===O.attr("style")&&(d.verbose("Removing style attribute"),O.removeAttr("style"))},screenHeight:function(){d.debug("Removing page height"),O.css("height","")},keyboardShortcuts:function(){d.verbose("Removing keyboard shortcuts"),D.off("keyup"+v)},scrolling:function(){i.removeClass(f.scrolling),y.removeClass(f.scrolling)}},cacheSizes:function(){y.addClass(f.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();d.cache.pageHeight!==W&&0===n||(B.extend(d.cache,{pageHeight:B(P).outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:"body"==u.context?B(R).height():i.height()}),d.cache.topOffset=-d.cache.height/2),y.removeClass(f.loading),d.debug("Caching modal and container sizes",d.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return d.cache.leftBodyScrollbar===W&&(d.cache.leftBodyScrollbar=d.is.rtl()&&(d.is.iframe&&!d.is.firefox()||d.is.safari()||d.is.edge()||d.is.ie())),d.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!d.is.ie():(u.useFlex&&d.is.ie()?d.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&d.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=d.cache.contextHeight,t=d.cache.contextHeight/2,n=d.cache.topOffset,i=d.cache.scrollHeight,o=d.cache.height,s=u.padding;return o<i?t+n+i+s<e:o+2*s<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length}},is:{active:function(){return y.hasClass(f.active)},ie:function(){if(d.cache.isIE===W){var e=!R.ActiveXObject&&"ActiveXObject"in R,t="ActiveXObject"in R;d.cache.isIE=e||t}return d.cache.isIE},animating:function(){return y.transition("is supported")?y.transition("is animating"):y.is(":visible")},scrolling:function(){return i.hasClass(f.scrolling)},modernBrowser:function(){return!(R.ActiveXObject||"ActiveXObject"in R)},rtl:function(){return d.cache.isRTL===W&&(d.cache.isRTL="rtl"===O.attr("dir")||"rtl"===O.css("direction")),d.cache.isRTL},safari:function(){return d.cache.isSafari===W&&(d.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),d.cache.isSafari},edge:function(){return d.cache.isEdge===W&&(d.cache.isEdge=!!R.setImmediate&&!d.is.ie()),d.cache.isEdge},firefox:function(){return d.cache.isFirefox===W&&(d.cache.isFirefox=!!R.InstallTrigger),d.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===B(this).closest(".disabled").length}),t=e.filter("[autofocus]"),n=0<t.length?t.first():e.first();0<n.length&&n.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";(u.detachable||d.can.fit())&&O.css("margin-"+n,M+"px"),O.find(m.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+M+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+t,d.event.mousedown),n.on("mousedown"+t,d.event.mousedown),n.on("mouseup"+t,d.event.mouseup)},dimmerSettings:function(){if(B.fn.dimmer!==W){var e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:d.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},t=B.extend(!0,e,u.dimmerSettings);u.inverted&&(t.variation=t.variation!==W?t.variation+" inverted":"inverted"),x.dimmer("setting",t)}else d.error(p.dimmer)},dimmerStyles:function(){u.inverted?n.addClass(f.inverted):n.removeClass(f.inverted),u.blurring?i.addClass(f.blurring):i.removeClass(f.blurring)},modalOffset:function(){if(u.detachable)y.css({marginTop:!y.hasClass("aligned")&&d.can.fit()?-d.cache.height/2:u.padding/2,marginLeft:-d.cache.width/2});else{var e=d.can.fit();y.css({top:!y.hasClass("aligned")&&e?B(P).scrollTop()+(d.cache.contextHeight-d.cache.height)/2:!e||y.hasClass("top")?B(P).scrollTop()+u.padding:B(P).scrollTop()+(d.cache.contextHeight-d.cache.height-u.padding),marginLeft:-d.cache.width/2})}d.verbose("Setting modal offset for legacy mode")},screenHeight:function(){d.can.fit()?O.css("height",""):y.hasClass("bottom")||(d.debug("Modal is taller than page content, resizing page height"),O.css("height",d.cache.height+2*u.padding))},active:function(){y.addClass(f.active+" "+f.front),s.filter("."+f.active).removeClass(f.front)},scrolling:function(){i.addClass(f.scrolling),y.addClass(f.scrolling),d.unbind.scrollLock()},legacy:function(){y.addClass(f.legacy)},type:function(){d.can.fit()?(d.verbose("Modal fits on screen"),d.others.active()||d.others.animating()||(d.remove.scrolling(),d.bind.scrollLock())):y.hasClass("bottom")?d.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(d.verbose("Modal cannot fit on screen setting to scrolling"),d.set.scrolling())},undetached:function(){i.addClass(f.undetached)}},setting:function(e,t){if(d.debug("Changing setting",e,t),B.isPlainObject(e))B.extend(!0,u,e);else{if(t===W)return u[e];B.isPlainObject(u[e])?B.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(B.isPlainObject(e))B.extend(!0,d,e);else{if(t===W)return d[e];d[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,u.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),d.verbose.apply(console,arguments)))},error:function(){u.silent||(d.error=Function.prototype.bind.call(console.error,console,u.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(L||t),L=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=u.name+":",n=0;L=!1,clearTimeout(d.performance.timer),B.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",E&&(e+=" '"+E+"'"),(console.group!==W||console.table!==W)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):B.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var o,s,n,a=C;return e=e||q,t=w||t,"string"==typeof i&&a!==W&&(i=i.split(/[\. ]/),o=i.length-1,B.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(B.isPlainObject(a[n])&&e!=o)a=a[n];else{if(a[n]!==W)return s=a[n],!1;if(!B.isPlainObject(a[t])||e==o)return a[t]!==W&&(s=a[t]),!1;a=a[t]}})),B.isFunction(s)?n=s.apply(t,e):s!==W&&(n=s),Array.isArray(A)?A.push(n):A!==W?A=[A,n]:n!==W&&(A=n),s}},j?(C===W&&(B.isFunction(u.templates[z])&&(u.autoShow=!0,u.className.modal=u.className.template,u=B.extend(!0,{},u,u.templates[z].apply(d,q)),f=u.className,h=u.namespace,g=u.fields,p=u.error),d.initialize()),B.isFunction(u.templates[z])||d.invoke(z)):(C!==W&&C.invoke("destroy"),d.initialize(),A=y)}),A!==W?A:this},B.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input"},text:{ok:"Ok",cancel:"Cancel"}},B.fn.modal.settings.templates={getArguments:function(e){var t=[].slice.call(e);return B.isPlainObject(t[0])?B.extend({handler:function(){},content:"",title:""},t[0]):(B.isFunction(t[t.length-1])||t.push(function(){}),{handler:t.pop(),content:t.pop()||"",title:t.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var n=this,e=this.get.settings(),i=e.templates.getArguments(arguments);return 0===B(B.parseHTML(i.content)).filter(".ui.input").length&&(i.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(i.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(i.defaultValue||"")+'"></div></p>'),{title:i.title,content:i.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=n.get.settings(),t=n.get.element().find(e.selector.prompt)[0];i.handler(B(t).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){i.handler(null)}}]}}}}(jQuery,window,document);
|
11
|
+
!function(R,P,K,W){"use strict";R.isFunction=R.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},P=void 0!==P&&P.Math==Math?P:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),R.fn.modal=function(T){var D,e=R(this),H=R(P),O=R(K),E=R("body"),L=e.selector||"",I=(new Date).getTime(),N=[],z=T,j="string"==typeof z,q=[].slice.call(arguments,1),B=P.requestAnimationFrame||P.mozRequestAnimationFrame||P.webkitRequestAnimationFrame||P.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,o,s,e,i,n,a,c,r,l,d,u=R.isPlainObject(T)?R.extend(!0,{},R.fn.modal.settings,T):R.extend({},R.fn.modal.settings),f=u.selector,m=u.className,h=u.namespace,g=u.fields,p=u.error,v="."+h,b="module-"+h,y=R(this),x=[P,K].indexOf(u.context)<0?R(K).find(u.context):R(u.context),k=y.find(f.closeIcon),w=this,C=y.hasClass("modal")?y.data(b):W,S=!1,F="",M="",A={initialize:function(){var s;A.create.id(),y.hasClass("modal")||(A.create.modal(),R.isFunction(u.onHidden)||(u.onHidden=function(){A.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(f.title).html(A.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(A.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),A.has.configActions()&&(0===(s=y.find(f.actions).addClass(u.classActions)).length?s=R("<div/>",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+A.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=A.helpers.escape(e[g.text]||"",u.preserveHTML),i=A.helpers.deQuote(e[g.class]||""),o=e[g.click]&&R.isFunction(e[g.click])?e[g.click]:function(){};s.append(R("<button/>",{html:t+n,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+i,click:function(){var e=R(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(w,y)||A.hide()}}))})),A.cache={},A.verbose("Initializing dimmer",x),A.create.dimmer(),u.allowMultiple&&A.create.innerDimmer(),u.centered||y.addClass("top aligned"),A.refreshModals(),A.refreshInputs(),A.bind.events(),A.observeChanges(),A.instantiate(),u.autoShow&&A.show()},instantiate:function(){A.verbose("Storing instance of modal"),C=A,y.data(b,C)},create:{modal:function(){var e;y=R("<div/>",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(k=R("<i/>",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(k)),""!==u.title&&(e="_"+A.get.id()+"title",y.attr("aria-labelledby",e),R("<div/>",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+A.get.id()+"desc",y.attr("aria-describedby",e),R("<div/>",{class:m.content,id:e}).appendTo(y)),A.has.configActions()&&R("<div/>",{class:m.actions}).appendTo(y),x.append(y)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=R.extend(!0,e,u.dimmerSettings);R.fn.dimmer===W?A.error(p.dimmer):(A.debug("Creating dimmer"),i=x.dimmer(e),u.detachable?(A.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):A.set.undetached(),n=i.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),r="."+l,A.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&R("<div/>",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),A.verbose("Destroying previous modal"),y.removeData(b).off(v),H.off(r),n.off(r),k.off(r),t&&t.off(r),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in P&&((d=new MutationObserver(function(e){u.observeChanges&&(A.debug("DOM tree modified, refreshing"),A.refresh()),A.refreshInputs()})).observe(w,{childList:!0,subtree:!0}),A.debug("Setting up mutation observer",d))},refresh:function(){A.remove.scrolling(),A.cacheSizes(),A.can.useFlex()||A.set.modalOffset(),A.set.screenHeight(),A.set.type()},refreshModals:function(){s=y.siblings(f.modal),o=s.add(y)},refreshInputs:function(){t&&t.off("keydown"+r),(t=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===R(this).closest(".disabled").length})).first().on("keydown"+r,A.event.inputKeyDown.first),t.last().on("keydown"+r,A.event.inputKeyDown.last)},attachEvents:function(e,t){var n=R(e);t=R.isFunction(A[t])?A[t]:A.toggle,0<n.length?(A.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):A.error(p.notFound,e)},bind:{events:function(){A.verbose("Attaching events"),y.on("click"+v,f.close,A.event.close).on("click"+v,f.approve,A.event.approve).on("click"+v,f.deny,A.event.deny),k.on("keyup"+r,A.event.closeKeyUp),H.on("resize"+r,A.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",A.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",A.event.preventScroll,{passive:!1})}},get:{id:function(){return l},element:function(){return y},settings:function(){return u}},event:{approve:function(){S||!1===u.onApprove.call(w,R(this))?A.verbose("Approve callback returned false cancelling hide"):(S=!0,A.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===u.onDeny.call(w,R(this))?A.verbose("Deny callback returned false cancelling hide"):(S=!0,A.hide(function(){S=!1}))},close:function(){A.hide()},closeKeyUp:function(e){e=e.which;e!==u.keys.enter&&e!==u.keys.space||!y.hasClass(m.front)||A.hide()},inputKeyDown:{first:function(e){e.which===u.keys.tab&&e.shiftKey&&(t.last().focus(),e.preventDefault())},last:function(e){e.which!==u.keys.tab||e.shiftKey||(t.first().focus(),e.preventDefault())}},mousedown:function(e){var t=R(e.target),n=A.is.rtl();(a=0<t.closest(f.modal).length)&&A.verbose("Mouse down event registered inside the modal"),(c=A.is.scrolling()&&(!n&&R(P).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&A.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)A.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(c)A.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<R(e.target).closest(f.modal).length,e=R.contains(K.documentElement,e.target);if(!t&&e&&A.is.active()&&y.hasClass(m.front)){if(A.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!A.hideAll())return}else if(!A.hide())return;A.remove.clickaway()}}else A.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(A.timer),A.timer=setTimeout(e,t)},keyboard:function(e){e.which===u.keys.escape&&(u.closable?(A.debug("Escape key pressed hiding modal"),y.hasClass(m.front)&&A.hide()):A.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(A.is.animating()||A.is.active())&&B(A.refresh)}},toggle:function(){A.is.active()||A.is.animating()?A.hide():A.show()},show:function(e){e=R.isFunction(e)?e:function(){},A.refreshModals(),A.set.dimmerSettings(),A.set.dimmerStyles(),A.showModal(e)},hide:function(e){return e=R.isFunction(e)?e:function(){},A.refreshModals(),A.hideModal(e)},showModal:function(e){e=R.isFunction(e)?e:function(){},A.is.animating()||!A.is.active()?!1===u.onShow.call(w)?A.verbose("Show callback returned false cancelling show"):(A.showDimmer(),A.cacheSizes(),A.set.bodyMargin(),A.can.useFlex()?A.remove.legacy():(A.set.legacy(),A.set.modalOffset(),A.debug("Using non-flex legacy modal positioning.")),A.set.screenHeight(),A.set.type(),A.set.clickaway(),!u.allowMultiple&&A.others.active()?A.hideOthers(A.showModal):(S=!1,u.allowMultiple&&(A.others.active()&&s.filter("."+m.active).find(f.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(n)),u.transition&&R.fn.transition!==W&&y.transition("is supported")?(A.debug("Showing modal with css animations"),y.transition({debug:u.debug,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(w),u.keyboardShortcuts&&A.add.keyboardShortcuts(),A.save.focus(),A.set.active(),u.autofocus&&A.set.autofocus(),e()}})):A.error(p.noTransition))):A.debug("Modal is already visible")},hideModal:function(e,t,n){var i=s.filter("."+m.active).last();if(e=R.isFunction(e)?e:function(){},!1===u.onHide.call(w,R(this)))return A.verbose("Hide callback returned false cancelling hide"),S=!1;(A.is.animating()||A.is.active())&&(A.debug("Hiding modal"),u.transition&&R.fn.transition!==W&&y.transition("is supported")?(A.remove.active(),y.transition({debug:u.debug,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){A.others.active()||A.others.animating()||t||A.hideDimmer(),u.keyboardShortcuts&&!A.others.active()&&A.remove.keyboardShortcuts()},onComplete:function(){A.unbind.scrollLock(),u.allowMultiple&&(i.addClass(m.front),y.removeClass(m.front),(n?o:i).find(f.dimmer).removeClass("active")),R.isFunction(u.onHidden)&&u.onHidden.call(w),A.remove.dimmerStyles(),A.restore.focus(),e()}})):A.error(p.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(A.save.bodyMargin(),A.debug("Showing dimmer"),i.dimmer("show")):A.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(A.unbind.scrollLock(),i.dimmer("hide",function(){A.restore.bodyMargin(),A.remove.clickaway(),A.remove.screenHeight()})):A.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+m.active+", ."+m.animating);if(n=R.isFunction(n)?n:function(){},0<e.length)return A.debug("Hiding all visible modals"),i=!0,R(e.get().reverse()).each(function(e,t){i=i&&R(t).modal("hide modal",n,!1,!0)}),i&&A.hideDimmer(),i},hideOthers:function(e){var t=s.filter("."+m.active+", ."+m.animating);e=R.isFunction(e)?e:function(){},0<t.length&&(A.debug("Hiding other modals",s),t.modal("hide modal",e,!0))},others:{active:function(){return 0<s.filter("."+m.active).length},animating:function(){return 0<s.filter("."+m.animating).length}},add:{keyboardShortcuts:function(){A.verbose("Adding keyboard shortcuts"),O.on("keyup"+v,A.event.keyboard)}},save:{focus:function(){0<R(K.activeElement).closest(y).length||(e=R(K.activeElement).blur())},bodyMargin:function(){F=E.css("margin-"+(A.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,"")),t=P.innerWidth-K.documentElement.clientWidth;M=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var n=A.can.leftBodyScrollbar()?"left":"right";E.css("margin-"+n,F),E.find(f.bodyFixed.replace("right",n)).each(function(){var e=R(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(m.active)},legacy:function(){y.removeClass(m.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+r),n.off("mousedown"+r),n.off("mouseup"+r)},dimmerStyles:function(){n.removeClass(m.inverted),i.removeClass(m.blurring)},bodyStyle:function(){""===E.attr("style")&&(A.verbose("Removing style attribute"),E.removeAttr("style"))},screenHeight:function(){A.debug("Removing page height"),E.css("height","")},keyboardShortcuts:function(){A.verbose("Removing keyboard shortcuts"),O.off("keyup"+v)},scrolling:function(){i.removeClass(m.scrolling),y.removeClass(m.scrolling)}},cacheSizes:function(){y.addClass(m.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();A.cache.pageHeight!==W&&0===n||(R.extend(A.cache,{pageHeight:R(K).outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:("body"==u.context?R(P):i).height()}),A.cache.topOffset=-A.cache.height/2),y.removeClass(m.loading),A.debug("Caching modal and container sizes",A.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return A.cache.leftBodyScrollbar===W&&(A.cache.leftBodyScrollbar=A.is.rtl()&&(A.is.iframe&&!A.is.firefox()||A.is.safari()||A.is.edge()||A.is.ie())),A.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!A.is.ie():(u.useFlex&&A.is.ie()?A.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&A.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=A.cache.contextHeight,t=A.cache.contextHeight/2,n=A.cache.topOffset,i=A.cache.scrollHeight,o=A.cache.height,s=u.padding;return o<i?t+n+i+s<e:o+2*s<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length}},is:{active:function(){return y.hasClass(m.active)},ie:function(){var e,t;return A.cache.isIE===W&&(e=!P.ActiveXObject&&"ActiveXObject"in P,t="ActiveXObject"in P,A.cache.isIE=e||t),A.cache.isIE},animating:function(){return y.transition("is supported")?y.transition("is animating"):y.is(":visible")},scrolling:function(){return i.hasClass(m.scrolling)},modernBrowser:function(){return!(P.ActiveXObject||"ActiveXObject"in P)},rtl:function(){return A.cache.isRTL===W&&(A.cache.isRTL="rtl"===E.attr("dir")||"rtl"===E.css("direction")),A.cache.isRTL},safari:function(){return A.cache.isSafari===W&&(A.cache.isSafari=/constructor/i.test(P.HTMLElement)||!!P.ApplePaySession),A.cache.isSafari},edge:function(){return A.cache.isEdge===W&&(A.cache.isEdge=!!P.setImmediate&&!A.is.ie()),A.cache.isEdge},firefox:function(){return A.cache.isFirefox===W&&(A.cache.isFirefox=!!P.InstallTrigger),A.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.focus()},bodyMargin:function(){var n=A.can.leftBodyScrollbar()?"left":"right";(u.detachable||A.can.fit())&&E.css("margin-"+n,M+"px"),E.find(f.bodyFixed.replace("right",n)).each(function(){var e=R(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+M+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+r,A.event.mousedown),n.on("mousedown"+r,A.event.mousedown),n.on("mouseup"+r,A.event.mouseup)},dimmerSettings:function(){var e;R.fn.dimmer===W?A.error(p.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:A.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=R.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=e.variation!==W?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){u.inverted?n.addClass(m.inverted):n.removeClass(m.inverted),u.blurring?i.addClass(m.blurring):i.removeClass(m.blurring)},modalOffset:function(){var e;u.detachable?y.css({marginTop:!y.hasClass("aligned")&&A.can.fit()?-A.cache.height/2:u.padding/2,marginLeft:-A.cache.width/2}):(e=A.can.fit(),y.css({top:!y.hasClass("aligned")&&e?R(K).scrollTop()+(A.cache.contextHeight-A.cache.height)/2:!e||y.hasClass("top")?R(K).scrollTop()+u.padding:R(K).scrollTop()+(A.cache.contextHeight-A.cache.height-u.padding),marginLeft:-A.cache.width/2})),A.verbose("Setting modal offset for legacy mode")},screenHeight:function(){A.can.fit()?E.css("height",""):y.hasClass("bottom")||(A.debug("Modal is taller than page content, resizing page height"),E.css("height",A.cache.height+2*u.padding))},active:function(){y.addClass(m.active+" "+m.front),s.filter("."+m.active).removeClass(m.front)},scrolling:function(){i.addClass(m.scrolling),y.addClass(m.scrolling),A.unbind.scrollLock()},legacy:function(){y.addClass(m.legacy)},type:function(){A.can.fit()?(A.verbose("Modal fits on screen"),A.others.active()||A.others.animating()||(A.remove.scrolling(),A.bind.scrollLock())):y.hasClass("bottom")?A.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(A.verbose("Modal cannot fit on screen setting to scrolling"),A.set.scrolling())},undetached:function(){i.addClass(m.undetached)}},setting:function(e,t){if(A.debug("Changing setting",e,t),R.isPlainObject(e))R.extend(!0,u,e);else{if(t===W)return u[e];R.isPlainObject(u[e])?R.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,A,e);else{if(t===W)return A[e];A[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?A.performance.log(arguments):(A.debug=Function.prototype.bind.call(console.info,console,u.name+":"),A.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),A.verbose.apply(console,arguments)))},error:function(){u.silent||(A.error=Function.prototype.bind.call(console.error,console,u.name+":"),A.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(I||t),I=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,500)},display:function(){var e=u.name+":",n=0;I=!1,clearTimeout(A.performance.timer),R.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",L&&(e+=" '"+L+"'"),(console.group!==W||console.table!==W)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):R.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var o,s,n,a=C;return e=e||q,t=w||t,"string"==typeof i&&a!==W&&(i=i.split(/[\. ]/),o=i.length-1,R.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(R.isPlainObject(a[n])&&e!=o)a=a[n];else{if(a[n]!==W)return s=a[n],!1;{if(!R.isPlainObject(a[t])||e==o)return a[t]!==W&&(s=a[t]),!1;a=a[t]}}})),R.isFunction(s)?n=s.apply(t,e):s!==W&&(n=s),Array.isArray(D)?D.push(n):D!==W?D=[D,n]:n!==W&&(D=n),s}};j?(C===W&&(R.isFunction(u.templates[z])&&(u.autoShow=!0,u.className.modal=u.className.template,u=R.extend(!0,{},u,u.templates[z].apply(A,q)),m=u.className,u.namespace,g=u.fields,p=u.error),A.initialize()),R.isFunction(u.templates[z])||A.invoke(z)):(C!==W&&C.invoke("destroy"),A.initialize(),D=y)}),D!==W?D:this},R.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},R.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return R.isPlainObject(e[0])?R.extend({handler:function(){},content:"",title:""},e[0]):(R.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];o.handler(R(e).val())}function t(){o.handler(null)}var n=this,i=this.get.settings(),o=i.templates.getArguments(arguments);return 0===R(R.parseHTML(o.content)).filter(".ui.input").length&&(o.content+='<p><div class="'+i.className.prompt+'"><input placeholder="'+this.helpers.deQuote(o.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(o.defaultValue||"")+'"></div></p>'),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document);
|
package/dist/components/nag.css
CHANGED
package/dist/components/nag.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.0-beta.
|
2
|
+
* # Fomantic-UI 2.9.0-beta.302+091bcb0 - Nag
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -53,7 +53,7 @@ $.fn.nag = function(parameters) {
|
|
53
53
|
$module = $(this),
|
54
54
|
|
55
55
|
$context = (settings.context)
|
56
|
-
? $(settings.context)
|
56
|
+
? ([window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
|
57
57
|
: $('body'),
|
58
58
|
|
59
59
|
element = this,
|