fomantic-ui 2.9.0-beta.25 → 2.9.0-beta.252
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 +206 -3
- package/.github/workflows/ci.yml +4 -4
- package/.github/workflows/nightly.yml +4 -4
- package/.github/workflows/release.yml +30 -0
- package/CONTRIBUTORS.md +75 -37
- package/README.md +8 -8
- package/dist/components/accordion.css +162 -26
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +2 -2
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +34 -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 +176 -134
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +18 -1
- package/dist/components/calendar.js +10 -9
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +3 -3
- package/dist/components/card.css +26 -19
- package/dist/components/card.min.css +2 -2
- package/dist/components/checkbox.css +2 -1
- 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 +11 -11
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +94 -1
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +28 -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 +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +49 -13
- package/dist/components/dropdown.js +62 -38
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +10147 -8139
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +28 -28
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +734 -625
- package/dist/components/flag.min.css +2 -2
- package/dist/components/form.css +118 -55
- package/dist/components/form.js +30 -28
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +11 -8
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +3 -1
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +126 -47
- 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 +742 -17
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +13 -13
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +29 -5
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +41 -41
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +13 -1
- package/dist/components/modal.js +127 -49
- 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 +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +2 -2
- package/dist/components/popup.min.css +1 -1
- 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 +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +2 -2
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +91 -7
- 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 +4 -2
- package/dist/components/sidebar.js +8 -6
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +3 -3
- package/dist/components/site.css +61 -39
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +4 -4
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +23 -5
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +3 -3
- package/dist/components/table.css +1168 -26
- 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 +39 -1
- package/dist/components/toast.js +56 -28
- 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 +1 -1
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +21916 -16238
- package/dist/semantic.js +421 -244
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- 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/examples/assets/library/iframe-content.js +8 -8
- package/examples/assets/library/iframe.js +3 -3
- package/package.json +10 -9
- package/src/definitions/behaviors/api.js +33 -29
- package/src/definitions/behaviors/form.js +29 -27
- package/src/definitions/collections/form.less +204 -140
- package/src/definitions/collections/grid.less +716 -680
- package/src/definitions/collections/menu.less +173 -126
- package/src/definitions/collections/message.less +48 -46
- package/src/definitions/collections/table.less +849 -262
- package/src/definitions/elements/button.less +586 -449
- package/src/definitions/elements/container.less +145 -8
- package/src/definitions/elements/emoji.less +15 -9
- package/src/definitions/elements/flag.less +7 -17
- package/src/definitions/elements/header.less +44 -35
- package/src/definitions/elements/icon.less +38 -31
- package/src/definitions/elements/input.less +264 -22
- package/src/definitions/elements/label.less +92 -91
- package/src/definitions/elements/list.less +55 -45
- package/src/definitions/elements/loader.less +30 -29
- package/src/definitions/elements/segment.less +147 -28
- package/src/definitions/elements/step.less +52 -48
- package/src/definitions/elements/text.less +17 -15
- package/src/definitions/globals/site.less +23 -2
- package/src/definitions/modules/accordion.less +175 -24
- package/src/definitions/modules/calendar.js +9 -8
- package/src/definitions/modules/calendar.less +20 -0
- package/src/definitions/modules/checkbox.js +16 -10
- package/src/definitions/modules/checkbox.less +34 -178
- package/src/definitions/modules/dimmer.js +10 -4
- package/src/definitions/modules/dimmer.less +21 -8
- package/src/definitions/modules/dropdown.js +61 -37
- package/src/definitions/modules/dropdown.less +145 -94
- package/src/definitions/modules/modal.js +126 -48
- package/src/definitions/modules/modal.less +12 -0
- package/src/definitions/modules/nag.less +20 -19
- package/src/definitions/modules/popup.js +1 -1
- 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 +1 -1
- package/src/definitions/modules/search.less +32 -16
- package/src/definitions/modules/shape.js +2 -2
- package/src/definitions/modules/sidebar.js +7 -5
- package/src/definitions/modules/sidebar.less +33 -19
- package/src/definitions/modules/slider.less +39 -38
- package/src/definitions/modules/tab.js +22 -4
- package/src/definitions/modules/toast.js +55 -27
- package/src/definitions/modules/toast.less +48 -16
- package/src/definitions/modules/transition.js +20 -15
- package/src/definitions/views/card.less +402 -361
- package/src/definitions/views/comment.less +92 -81
- package/src/definitions/views/feed.less +164 -144
- package/src/definitions/views/item.less +249 -196
- package/src/definitions/views/statistic.less +90 -88
- 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/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/emoji.overrides +1734 -1232
- package/src/themes/default/elements/flag.overrides +1641 -986
- package/src/themes/default/elements/flag.variables +7 -5
- package/src/themes/default/elements/icon.overrides +75 -48
- 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 +1 -1
- package/src/themes/default/globals/site.variables +6 -0
- package/src/themes/default/globals/variation.variables +139 -6
- package/src/themes/default/modules/accordion.variables +49 -2
- package/src/themes/default/modules/calendar.variables +3 -0
- package/src/themes/default/modules/checkbox.variables +5 -5
- package/src/themes/default/modules/dimmer.variables +1 -1
- package/src/themes/default/modules/dropdown.variables +4 -10
- package/src/themes/default/modules/modal.variables +13 -0
- package/src/themes/default/modules/toast.variables +3 -0
- package/src/themes/famfamfam/elements/flag.overrides +1026 -0
- package/src/themes/famfamfam/elements/flag.variables +13 -0
- package/src/themes/instagram/views/card.overrides +1 -1
- package/src/themes/joypixels/elements/emoji.overrides +1759 -1257
- package/src/themes/joypixels/elements/emoji.variables +1 -1
- 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/modules/dropdown.overrides +1 -1
- package/src/themes/material/modules/modal.overrides +1 -1
- package/src/themes/rtl/globals/site.overrides +1 -1
- package/src/themes/twitter/elements/emoji.overrides +1734 -1232
- package/tasks/build/css.js +6 -1
- package/tasks/config/project/install.js +11 -5
- package/tasks/install.js +1 -0
- package/test/helpers/sinon.js +2 -2
package/dist/semantic.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.0-beta.
|
2
|
+
* # Fomantic UI - 2.9.0-beta.252
|
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
11
|
/*!
|
12
|
-
* # Fomantic-UI 2.9.0-beta.
|
12
|
+
* # Fomantic-UI 2.9.0-beta.252 - Site
|
13
13
|
* http://github.com/fomantic/Fomantic-UI/
|
14
14
|
*
|
15
15
|
*
|
@@ -503,7 +503,7 @@ $.extend($.expr[ ":" ], {
|
|
503
503
|
})( jQuery, window, document );
|
504
504
|
|
505
505
|
/*!
|
506
|
-
* # Fomantic-UI 2.9.0-beta.
|
506
|
+
* # Fomantic-UI 2.9.0-beta.252 - Form Validation
|
507
507
|
* http://github.com/fomantic/Fomantic-UI/
|
508
508
|
*
|
509
509
|
*
|
@@ -923,6 +923,7 @@ $.fn.form = function(parameters) {
|
|
923
923
|
$field.one('keyup' + eventNamespace, module.event.field.keyup);
|
924
924
|
module.submit();
|
925
925
|
module.debug('Enter pressed on input submitting form');
|
926
|
+
event.preventDefault();
|
926
927
|
}
|
927
928
|
keyHeldDown = true;
|
928
929
|
}
|
@@ -1047,7 +1048,7 @@ $.fn.form = function(parameters) {
|
|
1047
1048
|
parts,
|
1048
1049
|
suffixPrompt
|
1049
1050
|
;
|
1050
|
-
if(ancillary && ancillary.indexOf('..') >= 0) {
|
1051
|
+
if(ancillary && ['integer', 'decimal', 'number'].indexOf(ruleName) >= 0 && ancillary.indexOf('..') >= 0) {
|
1051
1052
|
parts = ancillary.split('..', 2);
|
1052
1053
|
if(!rule.prompt) {
|
1053
1054
|
suffixPrompt = (
|
@@ -1089,7 +1090,7 @@ $.fn.form = function(parameters) {
|
|
1089
1090
|
if(isLegacySettings) {
|
1090
1091
|
// 1.x (ducktyped)
|
1091
1092
|
settings = $.extend(true, {}, $.fn.form.settings, legacyParameters);
|
1092
|
-
validation = $.extend({}, $.fn.form.settings.defaults, parameters);
|
1093
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults, parameters);
|
1093
1094
|
module.error(settings.error.oldSyntax, element);
|
1094
1095
|
module.verbose('Extending settings from legacy parameters', validation, settings);
|
1095
1096
|
}
|
@@ -1099,13 +1100,13 @@ $.fn.form = function(parameters) {
|
|
1099
1100
|
parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
|
1100
1101
|
}
|
1101
1102
|
settings = $.extend(true, {}, $.fn.form.settings, parameters);
|
1102
|
-
validation = $.extend({}, $.fn.form.settings.defaults, settings.fields);
|
1103
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults, settings.fields);
|
1103
1104
|
module.verbose('Extending settings', validation, settings);
|
1104
1105
|
}
|
1105
1106
|
}
|
1106
1107
|
else {
|
1107
|
-
settings = $.fn.form.settings;
|
1108
|
-
validation = $.fn.form.settings.defaults;
|
1108
|
+
settings = $.extend(true, {}, $.fn.form.settings);
|
1109
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults);
|
1109
1110
|
module.verbose('Using default form validation', validation, settings);
|
1110
1111
|
}
|
1111
1112
|
|
@@ -1369,7 +1370,7 @@ $.fn.form = function(parameters) {
|
|
1369
1370
|
module.debug('Adding rules', newValidation.rules, validation);
|
1370
1371
|
},
|
1371
1372
|
fields: function(fields) {
|
1372
|
-
validation = $.extend({}, validation, module.get.fieldsFromShorthand(fields));
|
1373
|
+
validation = $.extend(true, {}, validation, module.get.fieldsFromShorthand(fields));
|
1373
1374
|
},
|
1374
1375
|
prompt: function(identifier, errors, internal) {
|
1375
1376
|
var
|
@@ -1390,13 +1391,13 @@ $.fn.form = function(parameters) {
|
|
1390
1391
|
}
|
1391
1392
|
if(settings.inline) {
|
1392
1393
|
if(!promptExists) {
|
1393
|
-
$prompt =
|
1394
|
+
$prompt = $('<div/>').addClass(className.label);
|
1394
1395
|
$prompt
|
1395
1396
|
.appendTo($fieldGroup)
|
1396
1397
|
;
|
1397
1398
|
}
|
1398
1399
|
$prompt
|
1399
|
-
.html(errors
|
1400
|
+
.html(settings.templates.prompt(errors))
|
1400
1401
|
;
|
1401
1402
|
if(!promptExists) {
|
1402
1403
|
if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
|
@@ -1589,12 +1590,15 @@ $.fn.form = function(parameters) {
|
|
1589
1590
|
}
|
1590
1591
|
else if(isCheckbox) {
|
1591
1592
|
module.verbose('Setting checkbox value', value, $element);
|
1592
|
-
if(value === true || value === 1) {
|
1593
|
+
if(value === true || value === 1 || value === 'on') {
|
1593
1594
|
$element.checkbox('check');
|
1594
1595
|
}
|
1595
1596
|
else {
|
1596
1597
|
$element.checkbox('uncheck');
|
1597
1598
|
}
|
1599
|
+
if(typeof value === 'string') {
|
1600
|
+
$field.val(value);
|
1601
|
+
}
|
1598
1602
|
}
|
1599
1603
|
else if(isDropdown) {
|
1600
1604
|
module.verbose('Setting dropdown value', value, $element);
|
@@ -1707,7 +1711,7 @@ $.fn.form = function(parameters) {
|
|
1707
1711
|
if(event && $module.data('moduleApi') !== undefined) {
|
1708
1712
|
event.stopImmediatePropagation();
|
1709
1713
|
}
|
1710
|
-
if(settings.errorFocus) {
|
1714
|
+
if(settings.errorFocus && ignoreCallbacks !== true) {
|
1711
1715
|
var focusElement, hasTabIndex = true;
|
1712
1716
|
if (typeof settings.errorFocus === 'string') {
|
1713
1717
|
focusElement = $(settings.errorFocus);
|
@@ -2030,7 +2034,7 @@ $.fn.form.settings = {
|
|
2030
2034
|
|
2031
2035
|
autoCheckRequired : false,
|
2032
2036
|
preventLeaving : false,
|
2033
|
-
errorFocus :
|
2037
|
+
errorFocus : true,
|
2034
2038
|
dateHandling : 'date', // 'date', 'input', 'formatter'
|
2035
2039
|
|
2036
2040
|
onValid : function() {},
|
@@ -2086,7 +2090,6 @@ $.fn.form.settings = {
|
|
2086
2090
|
doesntContain : '{name} cannot contain "{ruleValue}"',
|
2087
2091
|
doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
|
2088
2092
|
minLength : '{name} must be at least {ruleValue} characters',
|
2089
|
-
length : '{name} must be at least {ruleValue} characters',
|
2090
2093
|
exactLength : '{name} must be exactly {ruleValue} characters',
|
2091
2094
|
maxLength : '{name} cannot be longer than {ruleValue} characters',
|
2092
2095
|
match : '{name} must match {ruleValue} field',
|
@@ -2100,7 +2103,7 @@ $.fn.form.settings = {
|
|
2100
2103
|
selector : {
|
2101
2104
|
checkbox : 'input[type="checkbox"], input[type="radio"]',
|
2102
2105
|
clear : '.clear',
|
2103
|
-
field : 'input:not(.search):not([type="file"]), textarea, select',
|
2106
|
+
field : 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
|
2104
2107
|
group : '.field',
|
2105
2108
|
input : 'input:not([type="file"])',
|
2106
2109
|
message : '.error.message',
|
@@ -2141,15 +2144,22 @@ $.fn.form.settings = {
|
|
2141
2144
|
html += '<li>' + value + '</li>';
|
2142
2145
|
});
|
2143
2146
|
html += '</ul>';
|
2144
|
-
return
|
2147
|
+
return html;
|
2145
2148
|
},
|
2146
2149
|
|
2147
|
-
// template that produces label
|
2148
|
-
prompt: function(errors
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2150
|
+
// template that produces label content
|
2151
|
+
prompt: function(errors) {
|
2152
|
+
if(errors.length === 1){
|
2153
|
+
return errors[0];
|
2154
|
+
}
|
2155
|
+
var
|
2156
|
+
html = '<ul class="ui list">'
|
2152
2157
|
;
|
2158
|
+
$.each(errors, function(index, value) {
|
2159
|
+
html += '<li>' + value + '</li>';
|
2160
|
+
});
|
2161
|
+
html += '</ul>';
|
2162
|
+
return html;
|
2153
2163
|
}
|
2154
2164
|
},
|
2155
2165
|
|
@@ -2359,14 +2369,6 @@ $.fn.form.settings = {
|
|
2359
2369
|
;
|
2360
2370
|
},
|
2361
2371
|
|
2362
|
-
// see rls notes for 2.0.6 (this is a duplicate of minLength)
|
2363
|
-
length: function(value, requiredLength) {
|
2364
|
-
return (value !== undefined)
|
2365
|
-
? (value.length >= requiredLength)
|
2366
|
-
: false
|
2367
|
-
;
|
2368
|
-
},
|
2369
|
-
|
2370
2372
|
// is exactly length
|
2371
2373
|
exactLength: function(value, requiredLength) {
|
2372
2374
|
return (value !== undefined)
|
@@ -2575,7 +2577,7 @@ $.fn.form.settings = {
|
|
2575
2577
|
})( jQuery, window, document );
|
2576
2578
|
|
2577
2579
|
/*!
|
2578
|
-
* # Fomantic-UI 2.9.0-beta.
|
2580
|
+
* # Fomantic-UI 2.9.0-beta.252 - Accordion
|
2579
2581
|
* http://github.com/fomantic/Fomantic-UI/
|
2580
2582
|
*
|
2581
2583
|
*
|
@@ -3194,7 +3196,7 @@ $.extend( $.easing, {
|
|
3194
3196
|
|
3195
3197
|
|
3196
3198
|
/*!
|
3197
|
-
* # Fomantic-UI 2.9.0-beta.
|
3199
|
+
* # Fomantic-UI 2.9.0-beta.252 - Calendar
|
3198
3200
|
* http://github.com/fomantic/Fomantic-UI/
|
3199
3201
|
*
|
3200
3202
|
*
|
@@ -3317,7 +3319,7 @@ $.fn.calendar = function(parameters) {
|
|
3317
3319
|
module.set.maxDate($module.data(metadata.maxDate));
|
3318
3320
|
}
|
3319
3321
|
module.setting('type', module.get.type());
|
3320
|
-
module.setting('on', settings.on ||
|
3322
|
+
module.setting('on', settings.on || 'click');
|
3321
3323
|
},
|
3322
3324
|
popup: function () {
|
3323
3325
|
if (settings.inline) {
|
@@ -3348,7 +3350,10 @@ $.fn.calendar = function(parameters) {
|
|
3348
3350
|
module.refreshTooltips();
|
3349
3351
|
return settings.onVisible.apply($container, arguments);
|
3350
3352
|
};
|
3351
|
-
var onHidden =
|
3353
|
+
var onHidden = function () {
|
3354
|
+
module.blur();
|
3355
|
+
return settings.onHidden.apply($container, arguments)
|
3356
|
+
}
|
3352
3357
|
if (!$input.length) {
|
3353
3358
|
//no input, $container has to handle focus/blur
|
3354
3359
|
$container.attr('tabindex', '0');
|
@@ -3357,10 +3362,6 @@ $.fn.calendar = function(parameters) {
|
|
3357
3362
|
module.focus();
|
3358
3363
|
return settings.onVisible.apply($container, arguments);
|
3359
3364
|
};
|
3360
|
-
onHidden = function () {
|
3361
|
-
module.blur();
|
3362
|
-
return settings.onHidden.apply($container, arguments);
|
3363
|
-
};
|
3364
3365
|
}
|
3365
3366
|
var onShow = function () {
|
3366
3367
|
//reset the focus date onShow
|
@@ -3942,7 +3943,7 @@ $.fn.calendar = function(parameters) {
|
|
3942
3943
|
return $module.data(metadata.maxDate) || null;
|
3943
3944
|
},
|
3944
3945
|
monthOffset: function () {
|
3945
|
-
return $module.data(metadata.monthOffset) || 0;
|
3946
|
+
return $module.data(metadata.monthOffset) || settings.monthOffset || 0;
|
3946
3947
|
},
|
3947
3948
|
mode: function () {
|
3948
3949
|
//only returns valid modes for the current settings
|
@@ -4648,6 +4649,7 @@ $.fn.calendar.settings = {
|
|
4648
4649
|
startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
|
4649
4650
|
endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
|
4650
4651
|
multiMonth : 1, // show multiple months when in 'day' mode
|
4652
|
+
monthOffset : 0, // position current month by offset when multimonth > 1
|
4651
4653
|
minTimeGap : 5,
|
4652
4654
|
showWeekNumbers : null, // show Number of Week at the very first column of a dayView
|
4653
4655
|
disabledHours : [], // specific hour(s) which won't be selectable and contain additional information.
|
@@ -4663,6 +4665,7 @@ $.fn.calendar.settings = {
|
|
4663
4665
|
position: 'bottom left',
|
4664
4666
|
lastResort: 'bottom left',
|
4665
4667
|
prefer: 'opposite',
|
4668
|
+
observeChanges: false,
|
4666
4669
|
hideOnScroll: false
|
4667
4670
|
},
|
4668
4671
|
|
@@ -4754,7 +4757,7 @@ $.fn.calendar.settings = {
|
|
4754
4757
|
if (!text) {
|
4755
4758
|
return null;
|
4756
4759
|
}
|
4757
|
-
text = String(text).
|
4760
|
+
text = String(text).replace(/\s/g,'');
|
4758
4761
|
if (text.length === 0) {
|
4759
4762
|
return null;
|
4760
4763
|
}
|
@@ -5067,7 +5070,7 @@ $.fn.calendar.settings = {
|
|
5067
5070
|
})(jQuery, window, document);
|
5068
5071
|
|
5069
5072
|
/*!
|
5070
|
-
* # Fomantic-UI 2.9.0-beta.
|
5073
|
+
* # Fomantic-UI 2.9.0-beta.252 - Checkbox
|
5071
5074
|
* http://github.com/fomantic/Fomantic-UI/
|
5072
5075
|
*
|
5073
5076
|
*
|
@@ -5307,18 +5310,26 @@ $.fn.checkbox = function(parameters) {
|
|
5307
5310
|
}
|
5308
5311
|
}
|
5309
5312
|
|
5313
|
+
shortcutPressed = false;
|
5310
5314
|
if(key == keyCode.escape) {
|
5311
5315
|
module.verbose('Escape key pressed blurring field');
|
5312
5316
|
$input.blur();
|
5313
5317
|
shortcutPressed = true;
|
5314
5318
|
}
|
5315
|
-
else if(!event.ctrlKey &&
|
5316
|
-
|
5317
|
-
|
5318
|
-
|
5319
|
-
|
5320
|
-
|
5321
|
-
|
5319
|
+
else if(!event.ctrlKey && module.can.change()) {
|
5320
|
+
if( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey) ) {
|
5321
|
+
module.verbose('Enter/space key pressed, toggling checkbox');
|
5322
|
+
module.toggle();
|
5323
|
+
shortcutPressed = true;
|
5324
|
+
} else if($module.is('.toggle, .slider') && !module.is.radio()) {
|
5325
|
+
if(key == keyCode.left && module.is.checked()) {
|
5326
|
+
module.uncheck();
|
5327
|
+
shortcutPressed = true;
|
5328
|
+
} else if(key == keyCode.right && module.is.unchecked()) {
|
5329
|
+
module.check();
|
5330
|
+
shortcutPressed = true;
|
5331
|
+
}
|
5332
|
+
}
|
5322
5333
|
}
|
5323
5334
|
},
|
5324
5335
|
keyup: function(event) {
|
@@ -5391,7 +5402,6 @@ $.fn.checkbox = function(parameters) {
|
|
5391
5402
|
settings.onEnable.call(input);
|
5392
5403
|
// preserve legacy callbacks
|
5393
5404
|
settings.onEnabled.call(input);
|
5394
|
-
module.trigger.change();
|
5395
5405
|
}
|
5396
5406
|
},
|
5397
5407
|
|
@@ -5406,7 +5416,6 @@ $.fn.checkbox = function(parameters) {
|
|
5406
5416
|
settings.onDisable.call(input);
|
5407
5417
|
// preserve legacy callbacks
|
5408
5418
|
settings.onDisabled.call(input);
|
5409
|
-
module.trigger.change();
|
5410
5419
|
}
|
5411
5420
|
},
|
5412
5421
|
|
@@ -5934,7 +5943,7 @@ $.fn.checkbox.settings = {
|
|
5934
5943
|
|
5935
5944
|
selector : {
|
5936
5945
|
checkbox : '.ui.checkbox',
|
5937
|
-
label : 'label
|
5946
|
+
label : 'label',
|
5938
5947
|
input : 'input[type="checkbox"], input[type="radio"]',
|
5939
5948
|
link : 'a[href]'
|
5940
5949
|
}
|
@@ -5944,7 +5953,7 @@ $.fn.checkbox.settings = {
|
|
5944
5953
|
})( jQuery, window, document );
|
5945
5954
|
|
5946
5955
|
/*!
|
5947
|
-
* # Fomantic-UI 2.9.0-beta.
|
5956
|
+
* # Fomantic-UI 2.9.0-beta.252 - Dimmer
|
5948
5957
|
* http://github.com/fomantic/Fomantic-UI/
|
5949
5958
|
*
|
5950
5959
|
*
|
@@ -6137,11 +6146,14 @@ $.fn.dimmer = function(parameters) {
|
|
6137
6146
|
? callback
|
6138
6147
|
: function(){}
|
6139
6148
|
;
|
6140
|
-
module.debug('Showing dimmer', $dimmer, settings);
|
6141
|
-
module.set.variation();
|
6142
6149
|
if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {
|
6150
|
+
if(settings.onShow.call(element) === false) {
|
6151
|
+
module.verbose('Show callback returned false cancelling dimmer show');
|
6152
|
+
return;
|
6153
|
+
}
|
6154
|
+
module.debug('Showing dimmer', $dimmer, settings);
|
6155
|
+
module.set.variation();
|
6143
6156
|
module.animate.show(callback);
|
6144
|
-
settings.onShow.call(element);
|
6145
6157
|
settings.onChange.call(element);
|
6146
6158
|
}
|
6147
6159
|
else {
|
@@ -6155,9 +6167,12 @@ $.fn.dimmer = function(parameters) {
|
|
6155
6167
|
: function(){}
|
6156
6168
|
;
|
6157
6169
|
if( module.is.dimmed() || module.is.animating() ) {
|
6170
|
+
if(settings.onHide.call(element) === false) {
|
6171
|
+
module.verbose('Hide callback returned false cancelling dimmer hide');
|
6172
|
+
return;
|
6173
|
+
}
|
6158
6174
|
module.debug('Hiding dimmer', $dimmer);
|
6159
6175
|
module.animate.hide(callback);
|
6160
|
-
settings.onHide.call(element);
|
6161
6176
|
settings.onChange.call(element);
|
6162
6177
|
}
|
6163
6178
|
else {
|
@@ -6701,7 +6716,7 @@ $.fn.dimmer.settings = {
|
|
6701
6716
|
})( jQuery, window, document );
|
6702
6717
|
|
6703
6718
|
/*!
|
6704
|
-
* # Fomantic-UI 2.9.0-beta.
|
6719
|
+
* # Fomantic-UI 2.9.0-beta.252 - Dropdown
|
6705
6720
|
* http://github.com/fomantic/Fomantic-UI/
|
6706
6721
|
*
|
6707
6722
|
*
|
@@ -6902,6 +6917,7 @@ $.fn.dropdown = function(parameters) {
|
|
6902
6917
|
select: function() {
|
6903
6918
|
if(module.has.input() && selectObserver) {
|
6904
6919
|
selectObserver.observe($module[0], {
|
6920
|
+
attributes: true,
|
6905
6921
|
childList : true,
|
6906
6922
|
subtree : true
|
6907
6923
|
});
|
@@ -6926,7 +6942,7 @@ $.fn.dropdown = function(parameters) {
|
|
6926
6942
|
|
6927
6943
|
create: {
|
6928
6944
|
id: function() {
|
6929
|
-
id = (Math.random().toString(16) + '000000000').
|
6945
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
6930
6946
|
elementNamespace = '.' + id;
|
6931
6947
|
module.verbose('Creating unique id for element', id);
|
6932
6948
|
},
|
@@ -7123,6 +7139,9 @@ $.fn.dropdown = function(parameters) {
|
|
7123
7139
|
module.debug('Disabling dropdown');
|
7124
7140
|
$module.addClass(className.disabled);
|
7125
7141
|
}
|
7142
|
+
if($input.is('[required]')) {
|
7143
|
+
settings.forceSelection = true;
|
7144
|
+
}
|
7126
7145
|
$input
|
7127
7146
|
.removeAttr('required')
|
7128
7147
|
.removeAttr('class')
|
@@ -7327,6 +7346,11 @@ $.fn.dropdown = function(parameters) {
|
|
7327
7346
|
$module
|
7328
7347
|
.on('change' + eventNamespace, selector.input, module.event.change)
|
7329
7348
|
;
|
7349
|
+
if(module.is.multiple() && module.is.searchSelection()) {
|
7350
|
+
$module
|
7351
|
+
.on('paste' + eventNamespace, selector.search, module.event.paste)
|
7352
|
+
;
|
7353
|
+
}
|
7330
7354
|
},
|
7331
7355
|
mouseEvents: function() {
|
7332
7356
|
module.verbose('Binding mouse events');
|
@@ -7546,7 +7570,7 @@ $.fn.dropdown = function(parameters) {
|
|
7546
7570
|
var value = module.is.multiple() ? module.get.values() : module.get.value();
|
7547
7571
|
if (value !== '') {
|
7548
7572
|
module.verbose('Value(s) present after click icon, select value(s) in items');
|
7549
|
-
module.set.selected(value, null,
|
7573
|
+
module.set.selected(value, null, true, true);
|
7550
7574
|
}
|
7551
7575
|
}
|
7552
7576
|
iconClicked = false;
|
@@ -7775,6 +7799,15 @@ $.fn.dropdown = function(parameters) {
|
|
7775
7799
|
},
|
7776
7800
|
|
7777
7801
|
event: {
|
7802
|
+
paste: function(event) {
|
7803
|
+
var pasteValue = (event.originalEvent.clipboardData || window.clipboardData).getData('text'),
|
7804
|
+
tokens = pasteValue.split(settings.delimiter)
|
7805
|
+
;
|
7806
|
+
tokens.forEach(function(value){
|
7807
|
+
module.set.selected(module.escape.htmlEntities(value.trim()), null, true, true);
|
7808
|
+
});
|
7809
|
+
event.preventDefault();
|
7810
|
+
},
|
7778
7811
|
change: function() {
|
7779
7812
|
if(!internalChange) {
|
7780
7813
|
module.debug('Input changed, updating selection');
|
@@ -7987,8 +8020,8 @@ $.fn.dropdown = function(parameters) {
|
|
7987
8020
|
},
|
7988
8021
|
select: {
|
7989
8022
|
mutation: function(mutations) {
|
7990
|
-
module.debug('<select> modified, recreating menu');
|
7991
8023
|
if(module.is.selectMutation(mutations)) {
|
8024
|
+
module.debug('<select> modified, recreating menu');
|
7992
8025
|
module.disconnect.selectObserver();
|
7993
8026
|
module.refresh();
|
7994
8027
|
module.setup.select();
|
@@ -8215,7 +8248,7 @@ $.fn.dropdown = function(parameters) {
|
|
8215
8248
|
keydown: function(event) {
|
8216
8249
|
var
|
8217
8250
|
pressedKey = event.which,
|
8218
|
-
isShortcutKey = module.is.inObject(pressedKey, keys)
|
8251
|
+
isShortcutKey = module.is.inObject(pressedKey, keys) || event.key === settings.delimiter
|
8219
8252
|
;
|
8220
8253
|
if(isShortcutKey) {
|
8221
8254
|
var
|
@@ -8233,7 +8266,7 @@ $.fn.dropdown = function(parameters) {
|
|
8233
8266
|
hasSubMenu = ($subMenu.length> 0),
|
8234
8267
|
hasSelectedItem = ($selectedItem.length > 0),
|
8235
8268
|
selectedIsSelectable = ($selectedItem.not(selector.unselectable).length > 0),
|
8236
|
-
delimiterPressed = (
|
8269
|
+
delimiterPressed = (event.key === settings.delimiter && module.is.multiple()),
|
8237
8270
|
isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable),
|
8238
8271
|
$nextItem,
|
8239
8272
|
isSubMenuItem,
|
@@ -8331,7 +8364,7 @@ $.fn.dropdown = function(parameters) {
|
|
8331
8364
|
.addClass(className.selected)
|
8332
8365
|
;
|
8333
8366
|
module.set.scrollPosition($nextItem);
|
8334
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
8367
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
8335
8368
|
module.set.selectedItem($nextItem);
|
8336
8369
|
}
|
8337
8370
|
}
|
@@ -8358,7 +8391,7 @@ $.fn.dropdown = function(parameters) {
|
|
8358
8391
|
.addClass(className.selected)
|
8359
8392
|
;
|
8360
8393
|
module.set.scrollPosition($nextItem);
|
8361
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
8394
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
8362
8395
|
module.set.selectedItem($nextItem);
|
8363
8396
|
}
|
8364
8397
|
}
|
@@ -8489,7 +8522,7 @@ $.fn.dropdown = function(parameters) {
|
|
8489
8522
|
;
|
8490
8523
|
if( module.can.activate( $(element) ) ) {
|
8491
8524
|
module.set.selected(value, $(element));
|
8492
|
-
if(!module.is.multiple()) {
|
8525
|
+
if(!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
|
8493
8526
|
module.hideAndClear();
|
8494
8527
|
}
|
8495
8528
|
}
|
@@ -8502,7 +8535,7 @@ $.fn.dropdown = function(parameters) {
|
|
8502
8535
|
;
|
8503
8536
|
if( module.can.activate( $(element) ) ) {
|
8504
8537
|
module.set.value(value, text, $(element));
|
8505
|
-
if(!module.is.multiple()) {
|
8538
|
+
if(!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
|
8506
8539
|
module.hideAndClear();
|
8507
8540
|
}
|
8508
8541
|
}
|
@@ -9022,7 +9055,7 @@ $.fn.dropdown = function(parameters) {
|
|
9022
9055
|
module.error(error.noStorage);
|
9023
9056
|
return;
|
9024
9057
|
}
|
9025
|
-
name = sessionStorage.getItem(value);
|
9058
|
+
name = sessionStorage.getItem(value + elementNamespace);
|
9026
9059
|
return (name !== undefined)
|
9027
9060
|
? name
|
9028
9061
|
: false
|
@@ -9066,7 +9099,7 @@ $.fn.dropdown = function(parameters) {
|
|
9066
9099
|
return;
|
9067
9100
|
}
|
9068
9101
|
module.verbose('Saving remote data to session storage', value, name);
|
9069
|
-
sessionStorage.setItem(value, name);
|
9102
|
+
sessionStorage.setItem(value + elementNamespace, name);
|
9070
9103
|
}
|
9071
9104
|
},
|
9072
9105
|
|
@@ -9126,7 +9159,7 @@ $.fn.dropdown = function(parameters) {
|
|
9126
9159
|
$nextSelectedItem
|
9127
9160
|
.addClass(className.selected)
|
9128
9161
|
;
|
9129
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
9162
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
9130
9163
|
module.set.selectedItem($nextSelectedItem);
|
9131
9164
|
}
|
9132
9165
|
$menu
|
@@ -9212,7 +9245,7 @@ $.fn.dropdown = function(parameters) {
|
|
9212
9245
|
var
|
9213
9246
|
length = module.get.query().length
|
9214
9247
|
;
|
9215
|
-
$search.val( text.
|
9248
|
+
$search.val( text.slice(0, length));
|
9216
9249
|
},
|
9217
9250
|
scrollPosition: function($item, forceScroll) {
|
9218
9251
|
var
|
@@ -9329,7 +9362,7 @@ $.fn.dropdown = function(parameters) {
|
|
9329
9362
|
module.set.scrollPosition($nextValue);
|
9330
9363
|
$selectedItem.removeClass(className.selected);
|
9331
9364
|
$nextValue.addClass(className.selected);
|
9332
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
9365
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
9333
9366
|
module.set.selectedItem($nextValue);
|
9334
9367
|
}
|
9335
9368
|
}
|
@@ -9467,17 +9500,24 @@ $.fn.dropdown = function(parameters) {
|
|
9467
9500
|
|
9468
9501
|
isFiltered = $selected.hasClass(className.filtered),
|
9469
9502
|
isActive = $selected.hasClass(className.active),
|
9503
|
+
isActionable = $selected.hasClass(className.actionable),
|
9470
9504
|
isUserValue = $selected.hasClass(className.addition),
|
9471
9505
|
shouldAnimate = (isMultiple && $selectedItem.length == 1)
|
9472
9506
|
;
|
9473
|
-
if(
|
9507
|
+
if(isActionable){
|
9508
|
+
if((!isMultiple || (!isActive || isUserValue)) && settings.apiSettings && settings.saveRemoteData) {
|
9509
|
+
module.save.remoteData(selectedText, selectedValue);
|
9510
|
+
}
|
9511
|
+
settings.onActionable.call(element, selectedValue, selectedText, $selected);
|
9512
|
+
}
|
9513
|
+
else if(isMultiple) {
|
9474
9514
|
if(!isActive || isUserValue) {
|
9475
9515
|
if(settings.apiSettings && settings.saveRemoteData) {
|
9476
9516
|
module.save.remoteData(selectedText, selectedValue);
|
9477
9517
|
}
|
9478
9518
|
if(settings.useLabels) {
|
9479
|
-
module.add.label(selectedValue, selectedText, shouldAnimate);
|
9480
9519
|
module.add.value(selectedValue, selectedText, $selected);
|
9520
|
+
module.add.label(selectedValue, selectedText, shouldAnimate);
|
9481
9521
|
module.set.activeItem($selected);
|
9482
9522
|
module.filterActive();
|
9483
9523
|
module.select.nextAvailable($selectedItem);
|
@@ -9497,7 +9537,7 @@ $.fn.dropdown = function(parameters) {
|
|
9497
9537
|
if(settings.apiSettings && settings.saveRemoteData) {
|
9498
9538
|
module.save.remoteData(selectedText, selectedValue);
|
9499
9539
|
}
|
9500
|
-
if (!keepSearchTerm) {
|
9540
|
+
if (!keepSearchTerm && !$selected.hasClass(className.actionable)) {
|
9501
9541
|
module.set.text(selectedText);
|
9502
9542
|
}
|
9503
9543
|
module.set.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
@@ -9687,7 +9727,7 @@ $.fn.dropdown = function(parameters) {
|
|
9687
9727
|
}
|
9688
9728
|
// extend current array
|
9689
9729
|
if(Array.isArray(currentValue)) {
|
9690
|
-
newValue = currentValue.concat([addedValue]);
|
9730
|
+
newValue = $selectedItem.hasClass(className.actionable) ? currentValue : currentValue.concat([addedValue]);
|
9691
9731
|
newValue = module.get.uniqueArray(newValue);
|
9692
9732
|
}
|
9693
9733
|
else {
|
@@ -9771,18 +9811,10 @@ $.fn.dropdown = function(parameters) {
|
|
9771
9811
|
return;
|
9772
9812
|
}
|
9773
9813
|
// temporarily disconnect observer
|
9774
|
-
|
9775
|
-
selectObserver.disconnect();
|
9776
|
-
module.verbose('Temporarily disconnecting mutation observer');
|
9777
|
-
}
|
9814
|
+
module.disconnect.selectObserver();
|
9778
9815
|
$option.remove();
|
9779
9816
|
module.verbose('Removing user addition as an <option>', escapedValue);
|
9780
|
-
|
9781
|
-
selectObserver.observe($input[0], {
|
9782
|
-
childList : true,
|
9783
|
-
subtree : true
|
9784
|
-
});
|
9785
|
-
}
|
9817
|
+
module.observe.select();
|
9786
9818
|
},
|
9787
9819
|
message: function() {
|
9788
9820
|
$menu.children(selector.message).remove();
|
@@ -10082,7 +10114,7 @@ $.fn.dropdown = function(parameters) {
|
|
10082
10114
|
return $(event.target).closest($icon).length > 0;
|
10083
10115
|
},
|
10084
10116
|
chrome: function() {
|
10085
|
-
return !!window.chrome &&
|
10117
|
+
return !!window.chrome && !window.StyleMedia;
|
10086
10118
|
},
|
10087
10119
|
alreadySetup: function() {
|
10088
10120
|
return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
|
@@ -10147,7 +10179,7 @@ $.fn.dropdown = function(parameters) {
|
|
10147
10179
|
selectChanged = false
|
10148
10180
|
;
|
10149
10181
|
$.each(mutations, function(index, mutation) {
|
10150
|
-
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
|
10182
|
+
if($(mutation.target).is('select, option, optgroup') || $(mutation.addedNodes).is('select')) {
|
10151
10183
|
selectChanged = true;
|
10152
10184
|
return false;
|
10153
10185
|
}
|
@@ -10692,7 +10724,7 @@ $.fn.dropdown.settings = {
|
|
10692
10724
|
keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing
|
10693
10725
|
|
10694
10726
|
match : 'both', // what to match against with search selection (both, text, or label)
|
10695
|
-
fullTextSearch :
|
10727
|
+
fullTextSearch : 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10696
10728
|
ignoreDiacritics : false, // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
10697
10729
|
hideDividers : false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)
|
10698
10730
|
|
@@ -10700,7 +10732,7 @@ $.fn.dropdown.settings = {
|
|
10700
10732
|
preserveHTML : true, // preserve html when selecting value
|
10701
10733
|
sortSelect : false, // sort selection on init
|
10702
10734
|
|
10703
|
-
forceSelection :
|
10735
|
+
forceSelection : false, // force a choice on blur with search selection
|
10704
10736
|
|
10705
10737
|
allowAdditions : false, // whether multiple select should allow user added values
|
10706
10738
|
ignoreCase : false, // whether to consider case sensitivity when creating labels
|
@@ -10711,7 +10743,7 @@ $.fn.dropdown.settings = {
|
|
10711
10743
|
useLabels : true, // whether multiple select should filter currently active selections from choices
|
10712
10744
|
delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
|
10713
10745
|
|
10714
|
-
showOnFocus :
|
10746
|
+
showOnFocus : false, // show menu on focus
|
10715
10747
|
allowReselection : false, // whether current value should trigger callbacks when reselected
|
10716
10748
|
allowTab : true, // add tabindex to element
|
10717
10749
|
allowCategorySelection : false, // allow elements with sub-menus to be selected
|
@@ -10726,6 +10758,8 @@ $.fn.dropdown.settings = {
|
|
10726
10758
|
|
10727
10759
|
headerDivider : true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
|
10728
10760
|
|
10761
|
+
collapseOnActionable : true, // whether the dropdown should collapse upon selection of an actionable item
|
10762
|
+
|
10729
10763
|
// label settings on multi-select
|
10730
10764
|
label: {
|
10731
10765
|
transition : 'scale',
|
@@ -10745,6 +10779,7 @@ $.fn.dropdown.settings = {
|
|
10745
10779
|
onChange : function(value, text, $selected){},
|
10746
10780
|
onAdd : function(value, text, $selected){},
|
10747
10781
|
onRemove : function(value, text, $selected){},
|
10782
|
+
onActionable : function(value, text, $selected){},
|
10748
10783
|
onSearch : function(searchTerm){},
|
10749
10784
|
|
10750
10785
|
onLabelSelect : function($selectedLabels){},
|
@@ -10807,12 +10842,12 @@ $.fn.dropdown.settings = {
|
|
10807
10842
|
icon : 'icon', // optional icon name
|
10808
10843
|
iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
|
10809
10844
|
class : 'class', // optional individual class for item/header
|
10810
|
-
divider : 'divider' // optional divider append for group headers
|
10845
|
+
divider : 'divider', // optional divider append for group headers
|
10846
|
+
actionable : 'actionable' // optional actionable item
|
10811
10847
|
},
|
10812
10848
|
|
10813
10849
|
keys : {
|
10814
10850
|
backspace : 8,
|
10815
|
-
delimiter : 188, // comma
|
10816
10851
|
deleteKey : 46,
|
10817
10852
|
enter : 13,
|
10818
10853
|
escape : 27,
|
@@ -10879,7 +10914,8 @@ $.fn.dropdown.settings = {
|
|
10879
10914
|
header : 'header',
|
10880
10915
|
divider : 'divider',
|
10881
10916
|
groupIcon : '',
|
10882
|
-
unfilterable : 'unfilterable'
|
10917
|
+
unfilterable : 'unfilterable',
|
10918
|
+
actionable : 'actionable'
|
10883
10919
|
}
|
10884
10920
|
|
10885
10921
|
};
|
@@ -10954,6 +10990,9 @@ $.fn.dropdown.settings.templates = {
|
|
10954
10990
|
maybeText = (option[fields.text])
|
10955
10991
|
? ' data-text="' + deQuote(option[fields.text],true) + '"'
|
10956
10992
|
: '',
|
10993
|
+
maybeActionable = (option[fields.actionable])
|
10994
|
+
? className.actionable+' '
|
10995
|
+
: '',
|
10957
10996
|
maybeDisabled = (option[fields.disabled])
|
10958
10997
|
? className.disabled+' '
|
10959
10998
|
: '',
|
@@ -10962,7 +11001,7 @@ $.fn.dropdown.settings.templates = {
|
|
10962
11001
|
: '',
|
10963
11002
|
hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
|
10964
11003
|
;
|
10965
|
-
html += '<div class="'+ maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
|
11004
|
+
html += '<div class="'+ maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
|
10966
11005
|
if (isMenu) {
|
10967
11006
|
html += '<i class="'+ (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
|
10968
11007
|
}
|
@@ -11032,7 +11071,7 @@ $.fn.dropdown.settings.templates = {
|
|
11032
11071
|
})( jQuery, window, document );
|
11033
11072
|
|
11034
11073
|
/*!
|
11035
|
-
* # Fomantic-UI 2.9.0-beta.
|
11074
|
+
* # Fomantic-UI 2.9.0-beta.252 - Embed
|
11036
11075
|
* http://github.com/fomantic/Fomantic-UI/
|
11037
11076
|
*
|
11038
11077
|
*
|
@@ -11742,7 +11781,7 @@ $.fn.embed.settings = {
|
|
11742
11781
|
})( jQuery, window, document );
|
11743
11782
|
|
11744
11783
|
/*!
|
11745
|
-
* # Fomantic-UI 2.9.0-beta.
|
11784
|
+
* # Fomantic-UI 2.9.0-beta.252 - Modal
|
11746
11785
|
* http://github.com/fomantic/Fomantic-UI/
|
11747
11786
|
*
|
11748
11787
|
*
|
@@ -11809,7 +11848,8 @@ $.fn.modal = function(parameters) {
|
|
11809
11848
|
|
11810
11849
|
$module = $(this),
|
11811
11850
|
$context = $(settings.context),
|
11812
|
-
$
|
11851
|
+
$closeIcon = $module.find(selector.closeIcon),
|
11852
|
+
$inputs,
|
11813
11853
|
|
11814
11854
|
$allModals,
|
11815
11855
|
$otherModals,
|
@@ -11835,6 +11875,7 @@ $.fn.modal = function(parameters) {
|
|
11835
11875
|
module = {
|
11836
11876
|
|
11837
11877
|
initialize: function() {
|
11878
|
+
module.create.id();
|
11838
11879
|
if(!$module.hasClass('modal')) {
|
11839
11880
|
module.create.modal();
|
11840
11881
|
if(!$.isFunction(settings.onHidden)) {
|
@@ -11859,15 +11900,17 @@ $.fn.modal = function(parameters) {
|
|
11859
11900
|
$actions.empty();
|
11860
11901
|
}
|
11861
11902
|
settings.actions.forEach(function (el) {
|
11862
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11903
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11863
11904
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
11864
11905
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
11865
11906
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
11866
11907
|
$actions.append($('<button/>', {
|
11867
11908
|
html: icon + text,
|
11909
|
+
'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
|
11868
11910
|
class: className.button + ' ' + cls,
|
11869
11911
|
click: function () {
|
11870
|
-
|
11912
|
+
var button = $(this);
|
11913
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
11871
11914
|
return;
|
11872
11915
|
}
|
11873
11916
|
module.hide();
|
@@ -11878,7 +11921,6 @@ $.fn.modal = function(parameters) {
|
|
11878
11921
|
module.cache = {};
|
11879
11922
|
module.verbose('Initializing dimmer', $context);
|
11880
11923
|
|
11881
|
-
module.create.id();
|
11882
11924
|
module.create.dimmer();
|
11883
11925
|
|
11884
11926
|
if ( settings.allowMultiple ) {
|
@@ -11888,11 +11930,9 @@ $.fn.modal = function(parameters) {
|
|
11888
11930
|
$module.addClass('top aligned');
|
11889
11931
|
}
|
11890
11932
|
module.refreshModals();
|
11891
|
-
|
11933
|
+
module.refreshInputs();
|
11892
11934
|
module.bind.events();
|
11893
|
-
|
11894
|
-
module.observeChanges();
|
11895
|
-
}
|
11935
|
+
module.observeChanges();
|
11896
11936
|
module.instantiate();
|
11897
11937
|
if(settings.autoShow){
|
11898
11938
|
module.show();
|
@@ -11909,16 +11949,20 @@ $.fn.modal = function(parameters) {
|
|
11909
11949
|
|
11910
11950
|
create: {
|
11911
11951
|
modal: function() {
|
11912
|
-
$module = $('<div/>', {class: className.modal});
|
11952
|
+
$module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
|
11913
11953
|
if (settings.closeIcon) {
|
11914
|
-
$
|
11915
|
-
$module.append($
|
11954
|
+
$closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
|
11955
|
+
$module.append($closeIcon);
|
11916
11956
|
}
|
11917
11957
|
if (settings.title !== '') {
|
11918
|
-
|
11958
|
+
var titleId = '_' + module.get.id() + 'title';
|
11959
|
+
$module.attr('aria-labelledby', titleId);
|
11960
|
+
$('<div/>', {class: className.title, id: titleId}).appendTo($module);
|
11919
11961
|
}
|
11920
11962
|
if (settings.content !== '') {
|
11921
|
-
|
11963
|
+
var descId = '_' + module.get.id() + 'desc';
|
11964
|
+
$module.attr('aria-describedby', descId);
|
11965
|
+
$('<div/>', {class: className.content, id: descId}).appendTo($module);
|
11922
11966
|
}
|
11923
11967
|
if (module.has.configActions()) {
|
11924
11968
|
$('<div/>', {class: className.actions}).appendTo($module);
|
@@ -11949,13 +11993,13 @@ $.fn.modal = function(parameters) {
|
|
11949
11993
|
$dimmer = $dimmable.dimmer('get dimmer');
|
11950
11994
|
},
|
11951
11995
|
id: function() {
|
11952
|
-
id = (Math.random().toString(16) + '000000000').
|
11996
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
11953
11997
|
elementEventNamespace = '.' + id;
|
11954
11998
|
module.verbose('Creating unique id for element', id);
|
11955
11999
|
},
|
11956
12000
|
innerDimmer: function() {
|
11957
|
-
if ( $module.find(selector.dimmer).length
|
11958
|
-
$
|
12001
|
+
if ( $module.find(selector.dimmer).length === 0 ) {
|
12002
|
+
$('<div/>', {class: className.innerDimmer}).prependTo($module);
|
11959
12003
|
}
|
11960
12004
|
}
|
11961
12005
|
},
|
@@ -11971,15 +12015,21 @@ $.fn.modal = function(parameters) {
|
|
11971
12015
|
;
|
11972
12016
|
$window.off(elementEventNamespace);
|
11973
12017
|
$dimmer.off(elementEventNamespace);
|
11974
|
-
$
|
12018
|
+
$closeIcon.off(elementEventNamespace);
|
12019
|
+
if($inputs) {
|
12020
|
+
$inputs.off(elementEventNamespace);
|
12021
|
+
}
|
11975
12022
|
$context.dimmer('destroy');
|
11976
12023
|
},
|
11977
12024
|
|
11978
12025
|
observeChanges: function() {
|
11979
12026
|
if('MutationObserver' in window) {
|
11980
12027
|
observer = new MutationObserver(function(mutations) {
|
11981
|
-
|
11982
|
-
|
12028
|
+
if(settings.observeChanges) {
|
12029
|
+
module.debug('DOM tree modified, refreshing');
|
12030
|
+
module.refresh();
|
12031
|
+
}
|
12032
|
+
module.refreshInputs();
|
11983
12033
|
});
|
11984
12034
|
observer.observe(element, {
|
11985
12035
|
childList : true,
|
@@ -12004,6 +12054,23 @@ $.fn.modal = function(parameters) {
|
|
12004
12054
|
$allModals = $otherModals.add($module);
|
12005
12055
|
},
|
12006
12056
|
|
12057
|
+
refreshInputs: function(){
|
12058
|
+
if($inputs){
|
12059
|
+
$inputs
|
12060
|
+
.off('keydown' + elementEventNamespace)
|
12061
|
+
;
|
12062
|
+
}
|
12063
|
+
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12064
|
+
return $(this).closest('.disabled').length === 0;
|
12065
|
+
});
|
12066
|
+
$inputs.first()
|
12067
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
|
12068
|
+
;
|
12069
|
+
$inputs.last()
|
12070
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
|
12071
|
+
;
|
12072
|
+
},
|
12073
|
+
|
12007
12074
|
attachEvents: function(selector, event) {
|
12008
12075
|
var
|
12009
12076
|
$toggle = $(selector)
|
@@ -12032,6 +12099,9 @@ $.fn.modal = function(parameters) {
|
|
12032
12099
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
12033
12100
|
.on('click' + eventNamespace, selector.deny, module.event.deny)
|
12034
12101
|
;
|
12102
|
+
$closeIcon
|
12103
|
+
.on('keyup' + elementEventNamespace, module.event.closeKeyUp)
|
12104
|
+
;
|
12035
12105
|
$window
|
12036
12106
|
.on('resize' + elementEventNamespace, module.event.resize)
|
12037
12107
|
;
|
@@ -12050,7 +12120,7 @@ $.fn.modal = function(parameters) {
|
|
12050
12120
|
|
12051
12121
|
get: {
|
12052
12122
|
id: function() {
|
12053
|
-
return
|
12123
|
+
return id;
|
12054
12124
|
},
|
12055
12125
|
element: function() {
|
12056
12126
|
return $module;
|
@@ -12089,10 +12159,38 @@ $.fn.modal = function(parameters) {
|
|
12089
12159
|
close: function() {
|
12090
12160
|
module.hide();
|
12091
12161
|
},
|
12162
|
+
closeKeyUp: function(event){
|
12163
|
+
var
|
12164
|
+
keyCode = event.which
|
12165
|
+
;
|
12166
|
+
if ((keyCode === settings.keys.enter || keyCode === settings.keys.space) && $module.hasClass(className.front)) {
|
12167
|
+
module.hide();
|
12168
|
+
}
|
12169
|
+
},
|
12170
|
+
inputKeyDown: {
|
12171
|
+
first: function(event) {
|
12172
|
+
var
|
12173
|
+
keyCode = event.which
|
12174
|
+
;
|
12175
|
+
if (keyCode === settings.keys.tab && event.shiftKey) {
|
12176
|
+
$inputs.last().focus();
|
12177
|
+
event.preventDefault();
|
12178
|
+
}
|
12179
|
+
},
|
12180
|
+
last: function(event) {
|
12181
|
+
var
|
12182
|
+
keyCode = event.which
|
12183
|
+
;
|
12184
|
+
if (keyCode === settings.keys.tab && !event.shiftKey) {
|
12185
|
+
$inputs.first().focus();
|
12186
|
+
event.preventDefault();
|
12187
|
+
}
|
12188
|
+
}
|
12189
|
+
},
|
12092
12190
|
mousedown: function(event) {
|
12093
12191
|
var
|
12094
12192
|
$target = $(event.target),
|
12095
|
-
isRtl = module.is.rtl()
|
12193
|
+
isRtl = module.is.rtl()
|
12096
12194
|
;
|
12097
12195
|
initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
|
12098
12196
|
if(initialMouseDownInModal) {
|
@@ -12140,10 +12238,9 @@ $.fn.modal = function(parameters) {
|
|
12140
12238
|
},
|
12141
12239
|
keyboard: function(event) {
|
12142
12240
|
var
|
12143
|
-
keyCode = event.which
|
12144
|
-
escapeKey = 27
|
12241
|
+
keyCode = event.which
|
12145
12242
|
;
|
12146
|
-
if(keyCode
|
12243
|
+
if(keyCode === settings.keys.escape) {
|
12147
12244
|
if(settings.closable) {
|
12148
12245
|
module.debug('Escape key pressed hiding modal');
|
12149
12246
|
if ( $module.hasClass(className.front) ) {
|
@@ -12199,6 +12296,10 @@ $.fn.modal = function(parameters) {
|
|
12199
12296
|
: function(){}
|
12200
12297
|
;
|
12201
12298
|
if( module.is.animating() || !module.is.active() ) {
|
12299
|
+
if(settings.onShow.call(element) === false) {
|
12300
|
+
module.verbose('Show callback returned false cancelling show');
|
12301
|
+
return;
|
12302
|
+
}
|
12202
12303
|
module.showDimmer();
|
12203
12304
|
module.cacheSizes();
|
12204
12305
|
module.set.bodyMargin();
|
@@ -12228,7 +12329,6 @@ $.fn.modal = function(parameters) {
|
|
12228
12329
|
$module.detach().appendTo($dimmer);
|
12229
12330
|
}
|
12230
12331
|
}
|
12231
|
-
settings.onShow.call(element);
|
12232
12332
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
12233
12333
|
module.debug('Showing modal with css animations');
|
12234
12334
|
$module
|
@@ -12271,7 +12371,6 @@ $.fn.modal = function(parameters) {
|
|
12271
12371
|
? callback
|
12272
12372
|
: function(){}
|
12273
12373
|
;
|
12274
|
-
module.debug('Hiding modal');
|
12275
12374
|
if(settings.onHide.call(element, $(this)) === false) {
|
12276
12375
|
module.verbose('Hide callback returned false cancelling hide');
|
12277
12376
|
ignoreRepeatedEvents = false;
|
@@ -12279,6 +12378,7 @@ $.fn.modal = function(parameters) {
|
|
12279
12378
|
}
|
12280
12379
|
|
12281
12380
|
if( module.is.animating() || module.is.active() ) {
|
12381
|
+
module.debug('Hiding modal');
|
12282
12382
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
12283
12383
|
module.remove.active();
|
12284
12384
|
$module
|
@@ -12458,7 +12558,7 @@ $.fn.modal = function(parameters) {
|
|
12458
12558
|
$module
|
12459
12559
|
.off('mousedown' + elementEventNamespace)
|
12460
12560
|
;
|
12461
|
-
}
|
12561
|
+
}
|
12462
12562
|
$dimmer
|
12463
12563
|
.off('mousedown' + elementEventNamespace)
|
12464
12564
|
;
|
@@ -12643,13 +12743,10 @@ $.fn.modal = function(parameters) {
|
|
12643
12743
|
set: {
|
12644
12744
|
autofocus: function() {
|
12645
12745
|
var
|
12646
|
-
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12647
|
-
return $(this).closest('.disabled').length === 0;
|
12648
|
-
}),
|
12649
12746
|
$autofocus = $inputs.filter('[autofocus]'),
|
12650
12747
|
$input = ($autofocus.length > 0)
|
12651
12748
|
? $autofocus.first()
|
12652
|
-
: $inputs.first()
|
12749
|
+
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
12653
12750
|
;
|
12654
12751
|
if($input.length > 0) {
|
12655
12752
|
$input.focus();
|
@@ -12731,7 +12828,7 @@ $.fn.modal = function(parameters) {
|
|
12731
12828
|
? $(document).scrollTop() + settings.padding
|
12732
12829
|
: $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
12733
12830
|
marginLeft: -(module.cache.width / 2)
|
12734
|
-
})
|
12831
|
+
})
|
12735
12832
|
;
|
12736
12833
|
} else {
|
12737
12834
|
$module
|
@@ -12740,7 +12837,7 @@ $.fn.modal = function(parameters) {
|
|
12740
12837
|
? -(module.cache.height / 2)
|
12741
12838
|
: settings.padding / 2,
|
12742
12839
|
marginLeft: -(module.cache.width / 2)
|
12743
|
-
})
|
12840
|
+
})
|
12744
12841
|
;
|
12745
12842
|
}
|
12746
12843
|
module.verbose('Setting modal offset for legacy mode');
|
@@ -13066,11 +13163,19 @@ $.fn.modal.settings = {
|
|
13066
13163
|
// called after deny selector match
|
13067
13164
|
onDeny : function(){ return true; },
|
13068
13165
|
|
13166
|
+
keys : {
|
13167
|
+
space : 32,
|
13168
|
+
enter : 13,
|
13169
|
+
escape : 27,
|
13170
|
+
tab : 9,
|
13171
|
+
},
|
13172
|
+
|
13069
13173
|
selector : {
|
13070
13174
|
title : '> .header',
|
13071
13175
|
content : '> .content',
|
13072
13176
|
actions : '> .actions',
|
13073
13177
|
close : '> .close',
|
13178
|
+
closeIcon: '> .close',
|
13074
13179
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
13075
13180
|
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
13076
13181
|
modal : '.ui.modal',
|
@@ -13102,11 +13207,13 @@ $.fn.modal.settings = {
|
|
13102
13207
|
template : 'ui tiny modal',
|
13103
13208
|
ok : 'positive',
|
13104
13209
|
cancel : 'negative',
|
13105
|
-
prompt : 'ui fluid input'
|
13210
|
+
prompt : 'ui fluid input',
|
13211
|
+
innerDimmer: 'ui inverted dimmer'
|
13106
13212
|
},
|
13107
13213
|
text: {
|
13108
13214
|
ok : 'Ok',
|
13109
|
-
cancel: 'Cancel'
|
13215
|
+
cancel: 'Cancel',
|
13216
|
+
close : 'Close'
|
13110
13217
|
}
|
13111
13218
|
};
|
13112
13219
|
|
@@ -13132,33 +13239,39 @@ $.fn.modal.settings.templates = {
|
|
13132
13239
|
},
|
13133
13240
|
alert: function () {
|
13134
13241
|
var settings = this.get.settings(),
|
13135
|
-
args = settings.templates.getArguments(arguments)
|
13242
|
+
args = settings.templates.getArguments(arguments),
|
13243
|
+
approveFn = args.handler
|
13136
13244
|
;
|
13137
13245
|
return {
|
13138
13246
|
title : args.title,
|
13139
13247
|
content: args.content,
|
13248
|
+
onApprove: approveFn,
|
13140
13249
|
actions: [{
|
13141
13250
|
text : settings.text.ok,
|
13142
13251
|
class: settings.className.ok,
|
13143
|
-
click:
|
13252
|
+
click: approveFn
|
13144
13253
|
}]
|
13145
13254
|
}
|
13146
13255
|
},
|
13147
13256
|
confirm: function () {
|
13148
13257
|
var settings = this.get.settings(),
|
13149
|
-
args = settings.templates.getArguments(arguments)
|
13258
|
+
args = settings.templates.getArguments(arguments),
|
13259
|
+
approveFn = function(){args.handler(true)},
|
13260
|
+
denyFn = function(){args.handler(false)}
|
13150
13261
|
;
|
13151
13262
|
return {
|
13152
13263
|
title : args.title,
|
13153
13264
|
content: args.content,
|
13265
|
+
onApprove: approveFn,
|
13266
|
+
onDeny: denyFn,
|
13154
13267
|
actions: [{
|
13155
13268
|
text : settings.text.ok,
|
13156
13269
|
class: settings.className.ok,
|
13157
|
-
click:
|
13270
|
+
click: approveFn
|
13158
13271
|
},{
|
13159
13272
|
text: settings.text.cancel,
|
13160
13273
|
class: settings.className.cancel,
|
13161
|
-
click:
|
13274
|
+
click: denyFn
|
13162
13275
|
}]
|
13163
13276
|
}
|
13164
13277
|
},
|
@@ -13166,7 +13279,14 @@ $.fn.modal.settings.templates = {
|
|
13166
13279
|
var $this = this,
|
13167
13280
|
settings = this.get.settings(),
|
13168
13281
|
args = settings.templates.getArguments(arguments),
|
13169
|
-
input = $($.parseHTML(args.content)).filter('.ui.input')
|
13282
|
+
input = $($.parseHTML(args.content)).filter('.ui.input'),
|
13283
|
+
approveFn = function(){
|
13284
|
+
var settings = $this.get.settings(),
|
13285
|
+
inputField = $this.get.element().find(settings.selector.prompt)[0]
|
13286
|
+
;
|
13287
|
+
args.handler($(inputField).val());
|
13288
|
+
},
|
13289
|
+
denyFn = function(){args.handler(null)}
|
13170
13290
|
;
|
13171
13291
|
if (input.length === 0) {
|
13172
13292
|
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>';
|
@@ -13174,19 +13294,16 @@ $.fn.modal.settings.templates = {
|
|
13174
13294
|
return {
|
13175
13295
|
title : args.title,
|
13176
13296
|
content: args.content,
|
13297
|
+
onApprove: approveFn,
|
13298
|
+
onDeny: denyFn,
|
13177
13299
|
actions: [{
|
13178
13300
|
text: settings.text.ok,
|
13179
13301
|
class: settings.className.ok,
|
13180
|
-
click:
|
13181
|
-
var settings = $this.get.settings(),
|
13182
|
-
inputField = $this.get.element().find(settings.selector.prompt)[0]
|
13183
|
-
;
|
13184
|
-
args.handler($(inputField).val());
|
13185
|
-
}
|
13302
|
+
click: approveFn
|
13186
13303
|
},{
|
13187
13304
|
text: settings.text.cancel,
|
13188
13305
|
class: settings.className.cancel,
|
13189
|
-
click:
|
13306
|
+
click: denyFn
|
13190
13307
|
}]
|
13191
13308
|
}
|
13192
13309
|
}
|
@@ -13195,7 +13312,7 @@ $.fn.modal.settings.templates = {
|
|
13195
13312
|
})( jQuery, window, document );
|
13196
13313
|
|
13197
13314
|
/*!
|
13198
|
-
* # Fomantic-UI 2.9.0-beta.
|
13315
|
+
* # Fomantic-UI 2.9.0-beta.252 - Nag
|
13199
13316
|
* http://github.com/fomantic/Fomantic-UI/
|
13200
13317
|
*
|
13201
13318
|
*
|
@@ -13754,7 +13871,7 @@ $.extend( $.easing, {
|
|
13754
13871
|
})( jQuery, window, document );
|
13755
13872
|
|
13756
13873
|
/*!
|
13757
|
-
* # Fomantic-UI 2.9.0-beta.
|
13874
|
+
* # Fomantic-UI 2.9.0-beta.252 - Popup
|
13758
13875
|
* http://github.com/fomantic/Fomantic-UI/
|
13759
13876
|
*
|
13760
13877
|
*
|
@@ -14064,7 +14181,7 @@ $.fn.popup = function(parameters) {
|
|
14064
14181
|
},
|
14065
14182
|
|
14066
14183
|
createID: function() {
|
14067
|
-
id = (Math.random().toString(16) + '000000000').
|
14184
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
14068
14185
|
elementNamespace = '.' + id;
|
14069
14186
|
module.verbose('Creating unique id for element', id);
|
14070
14187
|
},
|
@@ -15296,7 +15413,7 @@ $.fn.popup.settings = {
|
|
15296
15413
|
})( jQuery, window, document );
|
15297
15414
|
|
15298
15415
|
/*!
|
15299
|
-
* # Fomantic-UI 2.9.0-beta.
|
15416
|
+
* # Fomantic-UI 2.9.0-beta.252 - Progress
|
15300
15417
|
* http://github.com/fomantic/Fomantic-UI/
|
15301
15418
|
*
|
15302
15419
|
*
|
@@ -15904,6 +16021,9 @@ $.fn.progress = function(parameters) {
|
|
15904
16021
|
}
|
15905
16022
|
else {
|
15906
16023
|
module.remove.active();
|
16024
|
+
module.remove.warning();
|
16025
|
+
module.remove.error();
|
16026
|
+
module.remove.success();
|
15907
16027
|
module.set.label(settings.text.active);
|
15908
16028
|
}
|
15909
16029
|
},
|
@@ -16330,7 +16450,7 @@ $.fn.progress.settings = {
|
|
16330
16450
|
})( jQuery, window, document );
|
16331
16451
|
|
16332
16452
|
/*!
|
16333
|
-
* # Fomantic-UI 2.9.0-beta.
|
16453
|
+
* # Fomantic-UI 2.9.0-beta.252 - Slider
|
16334
16454
|
* http://github.com/fomantic/Fomantic-UI/
|
16335
16455
|
*
|
16336
16456
|
*
|
@@ -17669,7 +17789,7 @@ $.fn.slider.settings = {
|
|
17669
17789
|
})( jQuery, window, document );
|
17670
17790
|
|
17671
17791
|
/*!
|
17672
|
-
* # Fomantic-UI 2.9.0-beta.
|
17792
|
+
* # Fomantic-UI 2.9.0-beta.252 - Rating
|
17673
17793
|
* http://github.com/fomantic/Fomantic-UI/
|
17674
17794
|
*
|
17675
17795
|
*
|
@@ -18224,7 +18344,7 @@ $.fn.rating.settings = {
|
|
18224
18344
|
})( jQuery, window, document );
|
18225
18345
|
|
18226
18346
|
/*!
|
18227
|
-
* # Fomantic-UI 2.9.0-beta.
|
18347
|
+
* # Fomantic-UI 2.9.0-beta.252 - Search
|
18228
18348
|
* http://github.com/fomantic/Fomantic-UI/
|
18229
18349
|
*
|
18230
18350
|
*
|
@@ -18628,7 +18748,7 @@ $.fn.search = function(parameters) {
|
|
18628
18748
|
return $results.hasClass(className.animating);
|
18629
18749
|
},
|
18630
18750
|
chrome: function() {
|
18631
|
-
return !!window.chrome &&
|
18751
|
+
return !!window.chrome && !window.StyleMedia;
|
18632
18752
|
},
|
18633
18753
|
hidden: function() {
|
18634
18754
|
return $results.hasClass(className.hidden);
|
@@ -19792,7 +19912,7 @@ $.fn.search.settings = {
|
|
19792
19912
|
})( jQuery, window, document );
|
19793
19913
|
|
19794
19914
|
/*!
|
19795
|
-
* # Fomantic-UI 2.9.0-beta.
|
19915
|
+
* # Fomantic-UI 2.9.0-beta.252 - Shape
|
19796
19916
|
* http://github.com/fomantic/Fomantic-UI/
|
19797
19917
|
*
|
19798
19918
|
*
|
@@ -19919,7 +20039,7 @@ $.fn.shape = function(parameters) {
|
|
19919
20039
|
module.reset();
|
19920
20040
|
module.set.active();
|
19921
20041
|
};
|
19922
|
-
settings.
|
20042
|
+
settings.onBeforeChange.call($nextSide[0]);
|
19923
20043
|
if(module.get.transitionEvent()) {
|
19924
20044
|
module.verbose('Starting CSS animation');
|
19925
20045
|
$module
|
@@ -20606,7 +20726,7 @@ $.fn.shape.settings = {
|
|
20606
20726
|
height: 'initial',
|
20607
20727
|
|
20608
20728
|
// callback occurs on side change
|
20609
|
-
|
20729
|
+
onBeforeChange : function() {},
|
20610
20730
|
onChange : function() {},
|
20611
20731
|
|
20612
20732
|
// allow animation to same side
|
@@ -20641,7 +20761,7 @@ $.fn.shape.settings = {
|
|
20641
20761
|
})( jQuery, window, document );
|
20642
20762
|
|
20643
20763
|
/*!
|
20644
|
-
* # Fomantic-UI 2.9.0-beta.
|
20764
|
+
* # Fomantic-UI 2.9.0-beta.252 - Sidebar
|
20645
20765
|
* http://github.com/fomantic/Fomantic-UI/
|
20646
20766
|
*
|
20647
20767
|
*
|
@@ -20760,7 +20880,7 @@ $.fn.sidebar = function(parameters) {
|
|
20760
20880
|
|
20761
20881
|
create: {
|
20762
20882
|
id: function() {
|
20763
|
-
id = (Math.random().toString(16) + '000000000').
|
20883
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
20764
20884
|
elementNamespace = '.' + id;
|
20765
20885
|
module.verbose('Creating unique id for element', id);
|
20766
20886
|
}
|
@@ -21013,6 +21133,10 @@ $.fn.sidebar = function(parameters) {
|
|
21013
21133
|
: function(){}
|
21014
21134
|
;
|
21015
21135
|
if(module.is.hidden()) {
|
21136
|
+
if(settings.onShow.call(element) === false) {
|
21137
|
+
module.verbose('Show callback returned false cancelling show');
|
21138
|
+
return;
|
21139
|
+
}
|
21016
21140
|
module.refreshSidebars();
|
21017
21141
|
if(settings.overlay) {
|
21018
21142
|
module.error(error.overlay);
|
@@ -21037,10 +21161,9 @@ $.fn.sidebar = function(parameters) {
|
|
21037
21161
|
}
|
21038
21162
|
module.pushPage(function() {
|
21039
21163
|
callback.call(element);
|
21040
|
-
settings.
|
21164
|
+
settings.onVisible.call(element);
|
21041
21165
|
});
|
21042
21166
|
settings.onChange.call(element);
|
21043
|
-
settings.onVisible.call(element);
|
21044
21167
|
}
|
21045
21168
|
else {
|
21046
21169
|
module.debug('Sidebar is already visible');
|
@@ -21052,7 +21175,7 @@ $.fn.sidebar = function(parameters) {
|
|
21052
21175
|
? callback
|
21053
21176
|
: function(){}
|
21054
21177
|
;
|
21055
|
-
if(module.is.visible() || module.is.animating()) {
|
21178
|
+
if((module.is.visible() || module.is.animating()) && settings.onHide.call(element) !== false) {
|
21056
21179
|
module.debug('Hiding sidebar', callback);
|
21057
21180
|
module.refreshSidebars();
|
21058
21181
|
module.pullPage(function() {
|
@@ -21060,7 +21183,6 @@ $.fn.sidebar = function(parameters) {
|
|
21060
21183
|
settings.onHidden.call(element);
|
21061
21184
|
});
|
21062
21185
|
settings.onChange.call(element);
|
21063
|
-
settings.onHide.call(element);
|
21064
21186
|
}
|
21065
21187
|
},
|
21066
21188
|
|
@@ -21678,7 +21800,7 @@ $.fn.sidebar.settings = {
|
|
21678
21800
|
})( jQuery, window, document );
|
21679
21801
|
|
21680
21802
|
/*!
|
21681
|
-
* # Fomantic-UI 2.9.0-beta.
|
21803
|
+
* # Fomantic-UI 2.9.0-beta.252 - Sticky
|
21682
21804
|
* http://github.com/fomantic/Fomantic-UI/
|
21683
21805
|
*
|
21684
21806
|
*
|
@@ -22636,7 +22758,7 @@ $.fn.sticky.settings = {
|
|
22636
22758
|
})( jQuery, window, document );
|
22637
22759
|
|
22638
22760
|
/*!
|
22639
|
-
* # Fomantic-UI 2.9.0-beta.
|
22761
|
+
* # Fomantic-UI 2.9.0-beta.252 - Tab
|
22640
22762
|
* http://github.com/fomantic/Fomantic-UI/
|
22641
22763
|
*
|
22642
22764
|
*
|
@@ -22737,10 +22859,18 @@ $.fn.tab = function(parameters) {
|
|
22737
22859
|
initializedHistory = true;
|
22738
22860
|
}
|
22739
22861
|
|
22740
|
-
|
22741
|
-
|
22742
|
-
|
22743
|
-
|
22862
|
+
var activeTab = module.determine.activeTab();
|
22863
|
+
if(settings.autoTabActivation && instance === undefined && activeTab == null) {
|
22864
|
+
activeTab = settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation;
|
22865
|
+
module.debug('No active tab detected, setting tab active', activeTab);
|
22866
|
+
module.changeTab(activeTab);
|
22867
|
+
}
|
22868
|
+
if(activeTab != null && settings.history) {
|
22869
|
+
var autoUpdate = $.address.autoUpdate();
|
22870
|
+
$.address.autoUpdate(false);
|
22871
|
+
$.address.value(activeTab);
|
22872
|
+
$.address.autoUpdate(autoUpdate);
|
22873
|
+
}
|
22744
22874
|
|
22745
22875
|
module.instantiate();
|
22746
22876
|
},
|
@@ -22840,6 +22970,7 @@ $.fn.tab = function(parameters) {
|
|
22840
22970
|
.history(true)
|
22841
22971
|
.state(settings.path)
|
22842
22972
|
;
|
22973
|
+
$(window).trigger('popstate');
|
22843
22974
|
}
|
22844
22975
|
else {
|
22845
22976
|
module.error(error.path);
|
@@ -23007,6 +23138,10 @@ $.fn.tab = function(parameters) {
|
|
23007
23138
|
module.verbose('Tab parameters found', nextPathArray);
|
23008
23139
|
}
|
23009
23140
|
}
|
23141
|
+
if (settings.onBeforeChange.call(element, currentPath) === false) {
|
23142
|
+
module.debug('onBeforeChange returned false, cancelling tab change', $tab);
|
23143
|
+
return false;
|
23144
|
+
}
|
23010
23145
|
if(isLastTab && remoteContent) {
|
23011
23146
|
if(!shouldIgnoreLoad) {
|
23012
23147
|
module.activate.navigation(currentPath);
|
@@ -23043,6 +23178,10 @@ $.fn.tab = function(parameters) {
|
|
23043
23178
|
// if anchor exists use parent tab
|
23044
23179
|
if($anchor && $anchor.length > 0 && currentPath) {
|
23045
23180
|
module.debug('Anchor link used, opening parent tab', $tab, $anchor);
|
23181
|
+
if (settings.onBeforeChange.call(element, currentPath) === false) {
|
23182
|
+
module.debug('onBeforeChange returned false, cancelling tab change', $tab);
|
23183
|
+
return false;
|
23184
|
+
}
|
23046
23185
|
if( !$tab.hasClass(className.active) ) {
|
23047
23186
|
setTimeout(function() {
|
23048
23187
|
module.scrollTo($anchor);
|
@@ -23596,6 +23735,7 @@ $.fn.tab.settings = {
|
|
23596
23735
|
onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load
|
23597
23736
|
onVisible : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible
|
23598
23737
|
onRequest : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content
|
23738
|
+
onBeforeChange: function(tabPath) {}, // called before a tab is about to be changed. Returning false will cancel the tab change
|
23599
23739
|
|
23600
23740
|
templates : {
|
23601
23741
|
determineTitle: function(tabArray) {} // returns page title for path
|
@@ -23638,7 +23778,7 @@ $.fn.tab.settings = {
|
|
23638
23778
|
})( jQuery, window, document );
|
23639
23779
|
|
23640
23780
|
/*!
|
23641
|
-
* # Fomantic-UI 2.9.0-beta.
|
23781
|
+
* # Fomantic-UI 2.9.0-beta.252 - Toast
|
23642
23782
|
* http://github.com/fomantic/Fomantic-UI/
|
23643
23783
|
*
|
23644
23784
|
*
|
@@ -23708,12 +23848,14 @@ $.fn.toast = function(parameters) {
|
|
23708
23848
|
element = this,
|
23709
23849
|
instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
|
23710
23850
|
|
23851
|
+
id,
|
23711
23852
|
module
|
23712
23853
|
;
|
23713
23854
|
module = {
|
23714
23855
|
|
23715
23856
|
initialize: function() {
|
23716
23857
|
module.verbose('Initializing element');
|
23858
|
+
module.create.id();
|
23717
23859
|
if (!module.has.container()) {
|
23718
23860
|
module.create.container();
|
23719
23861
|
}
|
@@ -23763,17 +23905,22 @@ $.fn.toast = function(parameters) {
|
|
23763
23905
|
},
|
23764
23906
|
|
23765
23907
|
show: function(callback) {
|
23766
|
-
callback = callback || function(){};
|
23767
|
-
module.debug('Showing toast');
|
23768
23908
|
if(settings.onShow.call($toastBox, element) === false) {
|
23769
23909
|
module.debug('onShow callback returned false, cancelling toast animation');
|
23770
23910
|
return;
|
23771
23911
|
}
|
23912
|
+
callback = callback || function(){};
|
23913
|
+
module.debug('Showing toast');
|
23772
23914
|
module.animate.show(callback);
|
23773
23915
|
},
|
23774
23916
|
|
23775
23917
|
close: function(callback) {
|
23918
|
+
if(settings.onHide.call($toastBox, element) === false) {
|
23919
|
+
module.debug('onHide callback returned false, cancelling toast animation');
|
23920
|
+
return;
|
23921
|
+
}
|
23776
23922
|
callback = callback || function(){};
|
23923
|
+
module.debug('Closing toast');
|
23777
23924
|
module.remove.visible();
|
23778
23925
|
module.unbind.events();
|
23779
23926
|
module.animate.close(callback);
|
@@ -23785,12 +23932,16 @@ $.fn.toast = function(parameters) {
|
|
23785
23932
|
module.verbose('Creating container');
|
23786
23933
|
$context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
|
23787
23934
|
},
|
23935
|
+
id: function() {
|
23936
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
23937
|
+
module.verbose('Creating unique id for element', id);
|
23938
|
+
},
|
23788
23939
|
toast: function() {
|
23789
23940
|
$toastBox = $('<div/>', {class: className.box});
|
23790
23941
|
var iconClass = module.get.iconClass();
|
23791
23942
|
if (!isToastComponent) {
|
23792
23943
|
module.verbose('Creating toast');
|
23793
|
-
$toast = $('<div/>');
|
23944
|
+
$toast = $('<div/>', {role: 'alert'});
|
23794
23945
|
var $content = $('<div/>', {class: className.content});
|
23795
23946
|
if (iconClass !== '') {
|
23796
23947
|
$toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
|
@@ -23803,13 +23954,21 @@ $.fn.toast = function(parameters) {
|
|
23803
23954
|
}));
|
23804
23955
|
}
|
23805
23956
|
if (settings.title !== '') {
|
23957
|
+
var titleId = '_' + module.get.id() + 'title';
|
23958
|
+
$toast.attr('aria-labelledby', titleId);
|
23806
23959
|
$content.append($('<div/>', {
|
23807
23960
|
class: className.title,
|
23808
|
-
|
23961
|
+
id: titleId,
|
23962
|
+
html: module.helpers.escape(settings.title, settings.preserveHTML)
|
23809
23963
|
}));
|
23810
23964
|
}
|
23811
|
-
|
23812
|
-
$
|
23965
|
+
var descId = '_' + module.get.id() + 'desc';
|
23966
|
+
$toast.attr('aria-describedby', descId);
|
23967
|
+
$content.append($('<div/>', {
|
23968
|
+
class: className.message,
|
23969
|
+
id: descId,
|
23970
|
+
html: module.helpers.escape(settings.message, settings.preserveHTML)
|
23971
|
+
}));
|
23813
23972
|
|
23814
23973
|
$toast
|
23815
23974
|
.addClass(settings.class + ' ' + className.toast)
|
@@ -23817,7 +23976,7 @@ $.fn.toast = function(parameters) {
|
|
23817
23976
|
;
|
23818
23977
|
$toast.css('opacity', settings.opacity);
|
23819
23978
|
if (settings.closeIcon) {
|
23820
|
-
$close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : '')});
|
23979
|
+
$close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
|
23821
23980
|
if($close.hasClass(className.left)) {
|
23822
23981
|
$toast.prepend($close);
|
23823
23982
|
} else {
|
@@ -23860,15 +24019,17 @@ $.fn.toast = function(parameters) {
|
|
23860
24019
|
}
|
23861
24020
|
}
|
23862
24021
|
settings.actions.forEach(function (el) {
|
23863
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
24022
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
23864
24023
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
23865
24024
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
23866
24025
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
23867
24026
|
$actions.append($('<button/>', {
|
23868
24027
|
html: icon + text,
|
24028
|
+
'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
|
23869
24029
|
class: className.button + ' ' + cls,
|
23870
24030
|
click: function () {
|
23871
|
-
|
24031
|
+
var button = $(this);
|
24032
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
23872
24033
|
return;
|
23873
24034
|
}
|
23874
24035
|
module.close();
|
@@ -23968,13 +24129,12 @@ $.fn.toast = function(parameters) {
|
|
23968
24129
|
bind: {
|
23969
24130
|
events: function() {
|
23970
24131
|
module.debug('Binding events to toast');
|
23971
|
-
if(settings.
|
23972
|
-
(
|
23973
|
-
.on('click' + eventNamespace, module.event.click)
|
23974
|
-
;
|
24132
|
+
if(settings.closeIcon) {
|
24133
|
+
$close.on('click' + eventNamespace, module.event.close);
|
23975
24134
|
}
|
24135
|
+
$toast.on('click' + eventNamespace, module.event.click);
|
23976
24136
|
if($animationObject) {
|
23977
|
-
$animationObject.on('animationend' + eventNamespace, module.close);
|
24137
|
+
$animationObject.on('animationend' + eventNamespace, module.event.close);
|
23978
24138
|
}
|
23979
24139
|
$toastBox
|
23980
24140
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
@@ -23986,11 +24146,10 @@ $.fn.toast = function(parameters) {
|
|
23986
24146
|
unbind: {
|
23987
24147
|
events: function() {
|
23988
24148
|
module.debug('Unbinding events to toast');
|
23989
|
-
if(settings.
|
23990
|
-
|
23991
|
-
.off('click' + eventNamespace)
|
23992
|
-
;
|
24149
|
+
if(settings.closeIcon) {
|
24150
|
+
$close.off('click' + eventNamespace);
|
23993
24151
|
}
|
24152
|
+
$toast.off('click' + eventNamespace);
|
23994
24153
|
if($animationObject) {
|
23995
24154
|
$animationObject.off('animationend' + eventNamespace);
|
23996
24155
|
}
|
@@ -24022,11 +24181,6 @@ $.fn.toast = function(parameters) {
|
|
24022
24181
|
},
|
24023
24182
|
close: function(callback) {
|
24024
24183
|
callback = $.isFunction(callback) ? callback : function(){};
|
24025
|
-
module.debug('Closing toast');
|
24026
|
-
if(settings.onHide.call($toastBox, element) === false) {
|
24027
|
-
module.debug('onHide callback returned false, cancelling toast animation');
|
24028
|
-
return;
|
24029
|
-
}
|
24030
24184
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
24031
24185
|
$toastBox
|
24032
24186
|
.transition({
|
@@ -24082,7 +24236,7 @@ $.fn.toast = function(parameters) {
|
|
24082
24236
|
has: {
|
24083
24237
|
container: function() {
|
24084
24238
|
module.verbose('Determining if there is already a container');
|
24085
|
-
return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
|
24239
|
+
return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')')).length > 0);
|
24086
24240
|
},
|
24087
24241
|
toast: function(){
|
24088
24242
|
return !!module.get.toast();
|
@@ -24096,8 +24250,11 @@ $.fn.toast = function(parameters) {
|
|
24096
24250
|
},
|
24097
24251
|
|
24098
24252
|
get: {
|
24253
|
+
id: function() {
|
24254
|
+
return id;
|
24255
|
+
},
|
24099
24256
|
container: function() {
|
24100
|
-
return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
|
24257
|
+
return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')'))[0]);
|
24101
24258
|
},
|
24102
24259
|
toastBox: function() {
|
24103
24260
|
return $toastBox || null;
|
@@ -24129,9 +24286,15 @@ $.fn.toast = function(parameters) {
|
|
24129
24286
|
},
|
24130
24287
|
|
24131
24288
|
event: {
|
24289
|
+
close: function(){
|
24290
|
+
module.close();
|
24291
|
+
},
|
24132
24292
|
click: function(event) {
|
24133
|
-
if($(event.target).closest(
|
24134
|
-
settings.onClick.call($toastBox, element)
|
24293
|
+
if($(event.target).closest(selector.clickable).length === 0) {
|
24294
|
+
if(settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
|
24295
|
+
module.verbose('Click callback returned false or close denied by setting cancelling close');
|
24296
|
+
return;
|
24297
|
+
}
|
24135
24298
|
module.close();
|
24136
24299
|
}
|
24137
24300
|
},
|
@@ -24472,6 +24635,10 @@ $.fn.toast.settings = {
|
|
24472
24635
|
unclickable : 'unclickable'
|
24473
24636
|
},
|
24474
24637
|
|
24638
|
+
text: {
|
24639
|
+
close : 'Close'
|
24640
|
+
},
|
24641
|
+
|
24475
24642
|
icons : {
|
24476
24643
|
info : 'info',
|
24477
24644
|
success : 'checkmark',
|
@@ -24488,6 +24655,7 @@ $.fn.toast.settings = {
|
|
24488
24655
|
image : '> img.image, > .image > img',
|
24489
24656
|
icon : '> i.icon',
|
24490
24657
|
input : 'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',
|
24658
|
+
clickable : 'a, details, .ui.accordion',
|
24491
24659
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
24492
24660
|
deny : '.actions .negative, .actions .deny, .actions .cancel'
|
24493
24661
|
},
|
@@ -24531,7 +24699,7 @@ $.extend( $.easing, {
|
|
24531
24699
|
})( jQuery, window, document );
|
24532
24700
|
|
24533
24701
|
/*!
|
24534
|
-
* # Fomantic-UI 2.9.0-beta.
|
24702
|
+
* # Fomantic-UI 2.9.0-beta.252 - Transition
|
24535
24703
|
* http://github.com/fomantic/Fomantic-UI/
|
24536
24704
|
*
|
24537
24705
|
*
|
@@ -25303,6 +25471,10 @@ $.fn.transition = function() {
|
|
25303
25471
|
},
|
25304
25472
|
|
25305
25473
|
hide: function() {
|
25474
|
+
if(settings.onHide.call(element) === false) {
|
25475
|
+
module.verbose('Hide callback returned false cancelling hide');
|
25476
|
+
return false;
|
25477
|
+
}
|
25306
25478
|
module.verbose('Hiding element');
|
25307
25479
|
if( module.is.animating() ) {
|
25308
25480
|
module.reset();
|
@@ -25310,35 +25482,32 @@ $.fn.transition = function() {
|
|
25310
25482
|
element.blur(); // IE will trigger focus change if element is not blurred before hiding
|
25311
25483
|
module.remove.display();
|
25312
25484
|
module.remove.visible();
|
25313
|
-
|
25314
|
-
settings.onBeforeHide.call(element,function(){
|
25315
|
-
module.hideNow();
|
25316
|
-
});
|
25317
|
-
} else {
|
25318
|
-
module.hideNow();
|
25319
|
-
}
|
25320
|
-
|
25485
|
+
settings.onBeforeHide.call(element, module.hideNow);
|
25321
25486
|
},
|
25322
25487
|
|
25323
25488
|
hideNow: function() {
|
25324
25489
|
module.set.hidden();
|
25325
25490
|
module.force.hidden();
|
25326
|
-
settings.
|
25491
|
+
settings.onHidden.call(element);
|
25327
25492
|
settings.onComplete.call(element);
|
25328
25493
|
// module.repaint();
|
25329
25494
|
},
|
25330
25495
|
|
25331
25496
|
show: function(display) {
|
25332
|
-
module.
|
25333
|
-
|
25497
|
+
if(module.force.visible() && settings.onShow.call(element) !== false) {
|
25498
|
+
module.verbose('Showing element', display);
|
25334
25499
|
module.remove.hidden();
|
25335
|
-
|
25336
|
-
settings.onShow.call(element);
|
25337
|
-
settings.onComplete.call(element);
|
25338
|
-
// module.repaint();
|
25500
|
+
settings.onBeforeShow.call(element, module.showNow);
|
25339
25501
|
}
|
25340
25502
|
},
|
25341
25503
|
|
25504
|
+
showNow: function(){
|
25505
|
+
module.set.visible();
|
25506
|
+
settings.onVisible.call(element);
|
25507
|
+
settings.onComplete.call(element);
|
25508
|
+
// module.repaint();
|
25509
|
+
},
|
25510
|
+
|
25342
25511
|
toggle: function() {
|
25343
25512
|
if( module.is.visible() ) {
|
25344
25513
|
module.hide();
|
@@ -25587,7 +25756,11 @@ $.fn.transition.settings = {
|
|
25587
25756
|
onStart : function() {},
|
25588
25757
|
onComplete : function() {},
|
25589
25758
|
onShow : function() {},
|
25759
|
+
onBeforeShow : function(callback) {callback.call(this)},
|
25760
|
+
onVisible : function() {},
|
25590
25761
|
onHide : function() {},
|
25762
|
+
onHidden : function() {},
|
25763
|
+
onBeforeHide : function(callback) {callback.call(this)},
|
25591
25764
|
|
25592
25765
|
// whether timeout should be used to ensure callback fires in cases animationend does not
|
25593
25766
|
useFailSafe : true,
|
@@ -25641,7 +25814,7 @@ $.fn.transition.settings = {
|
|
25641
25814
|
})( jQuery, window, document );
|
25642
25815
|
|
25643
25816
|
/*!
|
25644
|
-
* # Fomantic-UI 2.9.0-beta.
|
25817
|
+
* # Fomantic-UI 2.9.0-beta.252 - API
|
25645
25818
|
* http://github.com/fomantic/Fomantic-UI/
|
25646
25819
|
*
|
25647
25820
|
*
|
@@ -25716,6 +25889,7 @@ $.api = $.fn.api = function(parameters) {
|
|
25716
25889
|
url,
|
25717
25890
|
data,
|
25718
25891
|
requestStartTime,
|
25892
|
+
originalData,
|
25719
25893
|
|
25720
25894
|
// standard module
|
25721
25895
|
element = this,
|
@@ -25728,6 +25902,7 @@ $.api = $.fn.api = function(parameters) {
|
|
25728
25902
|
|
25729
25903
|
initialize: function() {
|
25730
25904
|
if(!methodInvoked) {
|
25905
|
+
originalData = settings.data;
|
25731
25906
|
module.bind.events();
|
25732
25907
|
}
|
25733
25908
|
module.instantiate();
|
@@ -25790,8 +25965,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25790
25965
|
module.error(error.noStorage);
|
25791
25966
|
return;
|
25792
25967
|
}
|
25793
|
-
response = sessionStorage.getItem(url);
|
25794
|
-
module.debug('Using cached response', url, response);
|
25968
|
+
response = sessionStorage.getItem(url + module.get.normalizedData());
|
25969
|
+
module.debug('Using cached response', url, settings.data, response);
|
25795
25970
|
response = module.decode.json(response);
|
25796
25971
|
return response;
|
25797
25972
|
}
|
@@ -25809,8 +25984,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25809
25984
|
if( $.isPlainObject(response) ) {
|
25810
25985
|
response = JSON.stringify(response);
|
25811
25986
|
}
|
25812
|
-
sessionStorage.setItem(url, response);
|
25813
|
-
module.verbose('Storing cached response for url', url, response);
|
25987
|
+
sessionStorage.setItem(url + module.get.normalizedData(), response);
|
25988
|
+
module.verbose('Storing cached response for url', url, settings.data, response);
|
25814
25989
|
}
|
25815
25990
|
},
|
25816
25991
|
|
@@ -25839,7 +26014,7 @@ $.api = $.fn.api = function(parameters) {
|
|
25839
26014
|
|
25840
26015
|
// Add form content
|
25841
26016
|
if(settings.serializeForm) {
|
25842
|
-
settings.data = module.add.formData(settings.data);
|
26017
|
+
settings.data = module.add.formData(originalData || settings.data);
|
25843
26018
|
}
|
25844
26019
|
|
25845
26020
|
// call beforesend and get any settings changes
|
@@ -25976,10 +26151,6 @@ $.api = $.fn.api = function(parameters) {
|
|
25976
26151
|
cancelled: function() {
|
25977
26152
|
return (module.cancelled || false);
|
25978
26153
|
},
|
25979
|
-
succesful: function() {
|
25980
|
-
module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
|
25981
|
-
return module.was.successful();
|
25982
|
-
},
|
25983
26154
|
successful: function() {
|
25984
26155
|
return (module.request && module.request.state() == 'resolved');
|
25985
26156
|
},
|
@@ -26007,8 +26178,8 @@ $.api = $.fn.api = function(parameters) {
|
|
26007
26178
|
var
|
26008
26179
|
// allow legacy {$var} style
|
26009
26180
|
variable = (templatedString.indexOf('$') !== -1)
|
26010
|
-
? templatedString.
|
26011
|
-
: templatedString.
|
26181
|
+
? templatedString.slice(2, -1)
|
26182
|
+
: templatedString.slice(1, -1),
|
26012
26183
|
value = ($.isPlainObject(urlData) && urlData[variable] !== undefined)
|
26013
26184
|
? urlData[variable]
|
26014
26185
|
: ($module.data(variable) !== undefined)
|
@@ -26039,8 +26210,8 @@ $.api = $.fn.api = function(parameters) {
|
|
26039
26210
|
var
|
26040
26211
|
// allow legacy {/$var} style
|
26041
26212
|
variable = (templatedString.indexOf('$') !== -1)
|
26042
|
-
? templatedString.
|
26043
|
-
: templatedString.
|
26213
|
+
? templatedString.slice(3, -1)
|
26214
|
+
: templatedString.slice(2, -1),
|
26044
26215
|
value = ($.isPlainObject(urlData) && urlData[variable] !== undefined)
|
26045
26216
|
? urlData[variable]
|
26046
26217
|
: ($module.data(variable) !== undefined)
|
@@ -26071,25 +26242,29 @@ $.api = $.fn.api = function(parameters) {
|
|
26071
26242
|
},
|
26072
26243
|
formData: function(data) {
|
26073
26244
|
var
|
26074
|
-
|
26075
|
-
formData = (canSerialize)
|
26076
|
-
? $form.serializeObject()
|
26077
|
-
: $form.serialize(),
|
26245
|
+
formData = {},
|
26078
26246
|
hasOtherData
|
26079
26247
|
;
|
26080
|
-
data = data || settings.data;
|
26248
|
+
data = data || originalData || settings.data;
|
26081
26249
|
hasOtherData = $.isPlainObject(data);
|
26082
26250
|
|
26083
|
-
|
26084
|
-
|
26085
|
-
|
26086
|
-
|
26087
|
-
|
26088
|
-
|
26089
|
-
|
26090
|
-
|
26091
|
-
|
26251
|
+
$.each($form.serializeArray(), function (i, element) {
|
26252
|
+
var node = formData[element.name];
|
26253
|
+
|
26254
|
+
if ('undefined' !== typeof node && node !== null) {
|
26255
|
+
if (Array.isArray(node)) {
|
26256
|
+
node.push(element.value);
|
26257
|
+
} else {
|
26258
|
+
formData[element.name] = [node, element.value];
|
26259
|
+
}
|
26260
|
+
} else {
|
26261
|
+
formData[element.name] = element.value;
|
26092
26262
|
}
|
26263
|
+
});
|
26264
|
+
|
26265
|
+
if(hasOtherData) {
|
26266
|
+
module.debug('Extending existing data with form data', data, formData);
|
26267
|
+
data = $.extend(true, {}, data, formData);
|
26093
26268
|
}
|
26094
26269
|
else {
|
26095
26270
|
module.debug('Adding form data', formData);
|
@@ -26340,6 +26515,9 @@ $.api = $.fn.api = function(parameters) {
|
|
26340
26515
|
},
|
26341
26516
|
|
26342
26517
|
get: {
|
26518
|
+
normalizedData: function(){
|
26519
|
+
return typeof settings.data === "string" ? settings.data : JSON.stringify(settings.data, Object.keys(settings.data).sort());
|
26520
|
+
},
|
26343
26521
|
responseFromXHR: function(xhr) {
|
26344
26522
|
return $.isPlainObject(xhr)
|
26345
26523
|
? (module.is.expectingJSON())
|
@@ -26747,7 +26925,7 @@ $.api.settings = {
|
|
26747
26925
|
responseAsync : false,
|
26748
26926
|
|
26749
26927
|
// whether onResponse should work with response value without force converting into an object
|
26750
|
-
rawResponse :
|
26928
|
+
rawResponse : true,
|
26751
26929
|
|
26752
26930
|
// callbacks before request
|
26753
26931
|
beforeSend : function(settings) { return settings; },
|
@@ -26783,7 +26961,6 @@ $.api.settings = {
|
|
26783
26961
|
legacyParameters : 'You are using legacy API success callback names',
|
26784
26962
|
method : 'The method you called is not defined',
|
26785
26963
|
missingAction : 'API action used but no url was defined',
|
26786
|
-
missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object',
|
26787
26964
|
missingURL : 'No URL specified for api event',
|
26788
26965
|
noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.',
|
26789
26966
|
noStorage : 'Caching responses locally requires session storage',
|
@@ -26819,7 +26996,7 @@ $.api.settings = {
|
|
26819
26996
|
})( jQuery, window, document );
|
26820
26997
|
|
26821
26998
|
/*!
|
26822
|
-
* # Fomantic-UI 2.9.0-beta.
|
26999
|
+
* # Fomantic-UI 2.9.0-beta.252 - State
|
26823
27000
|
* http://github.com/fomantic/Fomantic-UI/
|
26824
27001
|
*
|
26825
27002
|
*
|
@@ -27531,7 +27708,7 @@ $.fn.state.settings = {
|
|
27531
27708
|
})( jQuery, window, document );
|
27532
27709
|
|
27533
27710
|
/*!
|
27534
|
-
* # Fomantic-UI 2.9.0-beta.
|
27711
|
+
* # Fomantic-UI 2.9.0-beta.252 - Visibility
|
27535
27712
|
* http://github.com/fomantic/Fomantic-UI/
|
27536
27713
|
*
|
27537
27714
|
*
|