fomantic-ui 2.9.0-beta.14 → 2.9.0-beta.143
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 +197 -3
- package/CONTRIBUTORS.md +74 -37
- package/README.md +1 -1
- package/dist/components/accordion.css +50 -6
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +2 -2
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +25 -23
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +81 -81
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +6 -7
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- 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 +2 -2
- package/dist/components/comment.css +11 -11
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +77 -1
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +28 -14
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +28 -5
- package/dist/components/dropdown.js +42 -31
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- 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 +1 -1
- package/dist/components/emoji.css +2 -2
- package/dist/components/feed.css +28 -28
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +731 -625
- package/dist/components/flag.min.css +2 -2
- package/dist/components/form.css +106 -55
- package/dist/components/form.js +25 -23
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +11 -8
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +6 -1
- 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 +658 -2
- 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 +3 -1
- package/dist/components/modal.js +94 -30
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- 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 +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +5 -3
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +7 -46
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +2 -2
- package/dist/components/rating.min.js +1 -1
- 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 +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +88 -6
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +4 -2
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +1 -1
- 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 +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- 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 +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +14 -5
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- 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 +33 -1
- package/dist/components/toast.js +54 -27
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +3984 -1288
- package/dist/semantic.js +294 -174
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/library/iframe-content.js +5 -5
- package/package.json +2 -2
- package/src/definitions/behaviors/api.js +24 -22
- package/src/definitions/behaviors/form.js +24 -22
- package/src/definitions/collections/form.less +193 -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 +360 -347
- package/src/definitions/elements/container.less +126 -8
- package/src/definitions/elements/emoji.less +15 -9
- package/src/definitions/elements/flag.less +7 -17
- package/src/definitions/elements/header.less +42 -35
- package/src/definitions/elements/icon.less +38 -31
- package/src/definitions/elements/input.less +176 -7
- 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 +139 -22
- 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 +55 -5
- package/src/definitions/modules/calendar.js +5 -6
- package/src/definitions/modules/checkbox.js +16 -10
- package/src/definitions/modules/checkbox.less +34 -178
- package/src/definitions/modules/dimmer.less +21 -8
- package/src/definitions/modules/dropdown.js +41 -30
- package/src/definitions/modules/dropdown.less +99 -67
- package/src/definitions/modules/modal.js +93 -29
- package/src/definitions/modules/modal.less +2 -0
- package/src/definitions/modules/nag.less +20 -19
- package/src/definitions/modules/popup.less +5 -1
- package/src/definitions/modules/progress.less +19 -18
- package/src/definitions/modules/rating.less +49 -42
- package/src/definitions/modules/search.less +32 -16
- package/src/definitions/modules/sidebar.less +33 -19
- package/src/definitions/modules/slider.less +39 -38
- package/src/definitions/modules/tab.js +13 -4
- package/src/definitions/modules/toast.js +53 -26
- package/src/definitions/modules/toast.less +46 -16
- 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/default/collections/menu.variables +6 -0
- package/src/themes/default/collections/table.variables +52 -0
- package/src/themes/default/elements/button.variables +2 -1
- package/src/themes/default/elements/container.variables +8 -0
- package/src/themes/default/elements/flag.overrides +1635 -986
- package/src/themes/default/elements/flag.variables +7 -5
- package/src/themes/default/elements/icon.overrides +35 -28
- package/src/themes/default/elements/icon.variables +1 -0
- package/src/themes/default/elements/input.variables +12 -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 +130 -6
- package/src/themes/default/modules/accordion.variables +15 -0
- package/src/themes/default/modules/dimmer.variables +1 -1
- package/src/themes/default/modules/dropdown.variables +1 -1
- 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/tasks/build/css.js +6 -1
- package/test/helpers/sinon.js +1 -1
package/dist/semantic.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.0-beta.
|
2
|
+
* # Fomantic UI - 2.9.0-beta.143
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* http://fomantic-ui.com/
|
5
5
|
*
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*
|
10
10
|
*/
|
11
11
|
/*!
|
12
|
-
* # Fomantic-UI 2.9.0-beta.
|
12
|
+
* # Fomantic-UI 2.9.0-beta.143 - 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.143 - 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 = (
|
@@ -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.143 - 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.143 - 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
|
@@ -5067,7 +5068,7 @@ $.fn.calendar.settings = {
|
|
5067
5068
|
})(jQuery, window, document);
|
5068
5069
|
|
5069
5070
|
/*!
|
5070
|
-
* # Fomantic-UI 2.9.0-beta.
|
5071
|
+
* # Fomantic-UI 2.9.0-beta.143 - Checkbox
|
5071
5072
|
* http://github.com/fomantic/Fomantic-UI/
|
5072
5073
|
*
|
5073
5074
|
*
|
@@ -5307,18 +5308,26 @@ $.fn.checkbox = function(parameters) {
|
|
5307
5308
|
}
|
5308
5309
|
}
|
5309
5310
|
|
5311
|
+
shortcutPressed = false;
|
5310
5312
|
if(key == keyCode.escape) {
|
5311
5313
|
module.verbose('Escape key pressed blurring field');
|
5312
5314
|
$input.blur();
|
5313
5315
|
shortcutPressed = true;
|
5314
5316
|
}
|
5315
|
-
else if(!event.ctrlKey &&
|
5316
|
-
|
5317
|
-
|
5318
|
-
|
5319
|
-
|
5320
|
-
|
5321
|
-
|
5317
|
+
else if(!event.ctrlKey && module.can.change()) {
|
5318
|
+
if( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey) ) {
|
5319
|
+
module.verbose('Enter/space key pressed, toggling checkbox');
|
5320
|
+
module.toggle();
|
5321
|
+
shortcutPressed = true;
|
5322
|
+
} else if($module.is('.toggle, .slider') && !module.is.radio()) {
|
5323
|
+
if(key == keyCode.left && module.is.checked()) {
|
5324
|
+
module.uncheck();
|
5325
|
+
shortcutPressed = true;
|
5326
|
+
} else if(key == keyCode.right && module.is.unchecked()) {
|
5327
|
+
module.check();
|
5328
|
+
shortcutPressed = true;
|
5329
|
+
}
|
5330
|
+
}
|
5322
5331
|
}
|
5323
5332
|
},
|
5324
5333
|
keyup: function(event) {
|
@@ -5391,7 +5400,6 @@ $.fn.checkbox = function(parameters) {
|
|
5391
5400
|
settings.onEnable.call(input);
|
5392
5401
|
// preserve legacy callbacks
|
5393
5402
|
settings.onEnabled.call(input);
|
5394
|
-
module.trigger.change();
|
5395
5403
|
}
|
5396
5404
|
},
|
5397
5405
|
|
@@ -5406,7 +5414,6 @@ $.fn.checkbox = function(parameters) {
|
|
5406
5414
|
settings.onDisable.call(input);
|
5407
5415
|
// preserve legacy callbacks
|
5408
5416
|
settings.onDisabled.call(input);
|
5409
|
-
module.trigger.change();
|
5410
5417
|
}
|
5411
5418
|
},
|
5412
5419
|
|
@@ -5934,7 +5941,7 @@ $.fn.checkbox.settings = {
|
|
5934
5941
|
|
5935
5942
|
selector : {
|
5936
5943
|
checkbox : '.ui.checkbox',
|
5937
|
-
label : 'label
|
5944
|
+
label : 'label',
|
5938
5945
|
input : 'input[type="checkbox"], input[type="radio"]',
|
5939
5946
|
link : 'a[href]'
|
5940
5947
|
}
|
@@ -5944,7 +5951,7 @@ $.fn.checkbox.settings = {
|
|
5944
5951
|
})( jQuery, window, document );
|
5945
5952
|
|
5946
5953
|
/*!
|
5947
|
-
* # Fomantic-UI 2.9.0-beta.
|
5954
|
+
* # Fomantic-UI 2.9.0-beta.143 - Dimmer
|
5948
5955
|
* http://github.com/fomantic/Fomantic-UI/
|
5949
5956
|
*
|
5950
5957
|
*
|
@@ -6701,7 +6708,7 @@ $.fn.dimmer.settings = {
|
|
6701
6708
|
})( jQuery, window, document );
|
6702
6709
|
|
6703
6710
|
/*!
|
6704
|
-
* # Fomantic-UI 2.9.0-beta.
|
6711
|
+
* # Fomantic-UI 2.9.0-beta.143 - Dropdown
|
6705
6712
|
* http://github.com/fomantic/Fomantic-UI/
|
6706
6713
|
*
|
6707
6714
|
*
|
@@ -6902,6 +6909,7 @@ $.fn.dropdown = function(parameters) {
|
|
6902
6909
|
select: function() {
|
6903
6910
|
if(module.has.input() && selectObserver) {
|
6904
6911
|
selectObserver.observe($module[0], {
|
6912
|
+
attributes: true,
|
6905
6913
|
childList : true,
|
6906
6914
|
subtree : true
|
6907
6915
|
});
|
@@ -7123,6 +7131,9 @@ $.fn.dropdown = function(parameters) {
|
|
7123
7131
|
module.debug('Disabling dropdown');
|
7124
7132
|
$module.addClass(className.disabled);
|
7125
7133
|
}
|
7134
|
+
if($input.is('[required]')) {
|
7135
|
+
settings.forceSelection = true;
|
7136
|
+
}
|
7126
7137
|
$input
|
7127
7138
|
.removeAttr('required')
|
7128
7139
|
.removeAttr('class')
|
@@ -7987,8 +7998,8 @@ $.fn.dropdown = function(parameters) {
|
|
7987
7998
|
},
|
7988
7999
|
select: {
|
7989
8000
|
mutation: function(mutations) {
|
7990
|
-
module.debug('<select> modified, recreating menu');
|
7991
8001
|
if(module.is.selectMutation(mutations)) {
|
8002
|
+
module.debug('<select> modified, recreating menu');
|
7992
8003
|
module.disconnect.selectObserver();
|
7993
8004
|
module.refresh();
|
7994
8005
|
module.setup.select();
|
@@ -8331,7 +8342,7 @@ $.fn.dropdown = function(parameters) {
|
|
8331
8342
|
.addClass(className.selected)
|
8332
8343
|
;
|
8333
8344
|
module.set.scrollPosition($nextItem);
|
8334
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
8345
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
8335
8346
|
module.set.selectedItem($nextItem);
|
8336
8347
|
}
|
8337
8348
|
}
|
@@ -8358,7 +8369,7 @@ $.fn.dropdown = function(parameters) {
|
|
8358
8369
|
.addClass(className.selected)
|
8359
8370
|
;
|
8360
8371
|
module.set.scrollPosition($nextItem);
|
8361
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
8372
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
8362
8373
|
module.set.selectedItem($nextItem);
|
8363
8374
|
}
|
8364
8375
|
}
|
@@ -8489,7 +8500,7 @@ $.fn.dropdown = function(parameters) {
|
|
8489
8500
|
;
|
8490
8501
|
if( module.can.activate( $(element) ) ) {
|
8491
8502
|
module.set.selected(value, $(element));
|
8492
|
-
if(!module.is.multiple()) {
|
8503
|
+
if(!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
|
8493
8504
|
module.hideAndClear();
|
8494
8505
|
}
|
8495
8506
|
}
|
@@ -8502,7 +8513,7 @@ $.fn.dropdown = function(parameters) {
|
|
8502
8513
|
;
|
8503
8514
|
if( module.can.activate( $(element) ) ) {
|
8504
8515
|
module.set.value(value, text, $(element));
|
8505
|
-
if(!module.is.multiple()) {
|
8516
|
+
if(!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
|
8506
8517
|
module.hideAndClear();
|
8507
8518
|
}
|
8508
8519
|
}
|
@@ -9022,7 +9033,7 @@ $.fn.dropdown = function(parameters) {
|
|
9022
9033
|
module.error(error.noStorage);
|
9023
9034
|
return;
|
9024
9035
|
}
|
9025
|
-
name = sessionStorage.getItem(value);
|
9036
|
+
name = sessionStorage.getItem(value + elementNamespace);
|
9026
9037
|
return (name !== undefined)
|
9027
9038
|
? name
|
9028
9039
|
: false
|
@@ -9066,7 +9077,7 @@ $.fn.dropdown = function(parameters) {
|
|
9066
9077
|
return;
|
9067
9078
|
}
|
9068
9079
|
module.verbose('Saving remote data to session storage', value, name);
|
9069
|
-
sessionStorage.setItem(value, name);
|
9080
|
+
sessionStorage.setItem(value + elementNamespace, name);
|
9070
9081
|
}
|
9071
9082
|
},
|
9072
9083
|
|
@@ -9126,7 +9137,7 @@ $.fn.dropdown = function(parameters) {
|
|
9126
9137
|
$nextSelectedItem
|
9127
9138
|
.addClass(className.selected)
|
9128
9139
|
;
|
9129
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
9140
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
9130
9141
|
module.set.selectedItem($nextSelectedItem);
|
9131
9142
|
}
|
9132
9143
|
$menu
|
@@ -9329,7 +9340,7 @@ $.fn.dropdown = function(parameters) {
|
|
9329
9340
|
module.set.scrollPosition($nextValue);
|
9330
9341
|
$selectedItem.removeClass(className.selected);
|
9331
9342
|
$nextValue.addClass(className.selected);
|
9332
|
-
if(settings.selectOnKeydown && module.is.single()) {
|
9343
|
+
if(settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
9333
9344
|
module.set.selectedItem($nextValue);
|
9334
9345
|
}
|
9335
9346
|
}
|
@@ -9467,17 +9478,24 @@ $.fn.dropdown = function(parameters) {
|
|
9467
9478
|
|
9468
9479
|
isFiltered = $selected.hasClass(className.filtered),
|
9469
9480
|
isActive = $selected.hasClass(className.active),
|
9481
|
+
isActionable = $selected.hasClass(className.actionable),
|
9470
9482
|
isUserValue = $selected.hasClass(className.addition),
|
9471
9483
|
shouldAnimate = (isMultiple && $selectedItem.length == 1)
|
9472
9484
|
;
|
9473
|
-
if(
|
9485
|
+
if(isActionable){
|
9486
|
+
if((!isMultiple || (!isActive || isUserValue)) && settings.apiSettings && settings.saveRemoteData) {
|
9487
|
+
module.save.remoteData(selectedText, selectedValue);
|
9488
|
+
}
|
9489
|
+
settings.onActionable.call(element, selectedValue, selectedText, $selected);
|
9490
|
+
}
|
9491
|
+
else if(isMultiple) {
|
9474
9492
|
if(!isActive || isUserValue) {
|
9475
9493
|
if(settings.apiSettings && settings.saveRemoteData) {
|
9476
9494
|
module.save.remoteData(selectedText, selectedValue);
|
9477
9495
|
}
|
9478
9496
|
if(settings.useLabels) {
|
9479
|
-
module.add.label(selectedValue, selectedText, shouldAnimate);
|
9480
9497
|
module.add.value(selectedValue, selectedText, $selected);
|
9498
|
+
module.add.label(selectedValue, selectedText, shouldAnimate);
|
9481
9499
|
module.set.activeItem($selected);
|
9482
9500
|
module.filterActive();
|
9483
9501
|
module.select.nextAvailable($selectedItem);
|
@@ -9497,7 +9515,7 @@ $.fn.dropdown = function(parameters) {
|
|
9497
9515
|
if(settings.apiSettings && settings.saveRemoteData) {
|
9498
9516
|
module.save.remoteData(selectedText, selectedValue);
|
9499
9517
|
}
|
9500
|
-
if (!keepSearchTerm) {
|
9518
|
+
if (!keepSearchTerm && !$selected.hasClass(className.actionable)) {
|
9501
9519
|
module.set.text(selectedText);
|
9502
9520
|
}
|
9503
9521
|
module.set.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
@@ -9687,7 +9705,7 @@ $.fn.dropdown = function(parameters) {
|
|
9687
9705
|
}
|
9688
9706
|
// extend current array
|
9689
9707
|
if(Array.isArray(currentValue)) {
|
9690
|
-
newValue = currentValue.concat([addedValue]);
|
9708
|
+
newValue = $selectedItem.hasClass(className.actionable) ? currentValue : currentValue.concat([addedValue]);
|
9691
9709
|
newValue = module.get.uniqueArray(newValue);
|
9692
9710
|
}
|
9693
9711
|
else {
|
@@ -9771,18 +9789,10 @@ $.fn.dropdown = function(parameters) {
|
|
9771
9789
|
return;
|
9772
9790
|
}
|
9773
9791
|
// temporarily disconnect observer
|
9774
|
-
|
9775
|
-
selectObserver.disconnect();
|
9776
|
-
module.verbose('Temporarily disconnecting mutation observer');
|
9777
|
-
}
|
9792
|
+
module.disconnect.selectObserver();
|
9778
9793
|
$option.remove();
|
9779
9794
|
module.verbose('Removing user addition as an <option>', escapedValue);
|
9780
|
-
|
9781
|
-
selectObserver.observe($input[0], {
|
9782
|
-
childList : true,
|
9783
|
-
subtree : true
|
9784
|
-
});
|
9785
|
-
}
|
9795
|
+
module.observe.select();
|
9786
9796
|
},
|
9787
9797
|
message: function() {
|
9788
9798
|
$menu.children(selector.message).remove();
|
@@ -10147,7 +10157,7 @@ $.fn.dropdown = function(parameters) {
|
|
10147
10157
|
selectChanged = false
|
10148
10158
|
;
|
10149
10159
|
$.each(mutations, function(index, mutation) {
|
10150
|
-
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
|
10160
|
+
if($(mutation.target).is('select, option, optgroup') || $(mutation.addedNodes).is('select')) {
|
10151
10161
|
selectChanged = true;
|
10152
10162
|
return false;
|
10153
10163
|
}
|
@@ -10692,7 +10702,7 @@ $.fn.dropdown.settings = {
|
|
10692
10702
|
keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing
|
10693
10703
|
|
10694
10704
|
match : 'both', // what to match against with search selection (both, text, or label)
|
10695
|
-
fullTextSearch :
|
10705
|
+
fullTextSearch : 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10696
10706
|
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
10707
|
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
10708
|
|
@@ -10700,7 +10710,7 @@ $.fn.dropdown.settings = {
|
|
10700
10710
|
preserveHTML : true, // preserve html when selecting value
|
10701
10711
|
sortSelect : false, // sort selection on init
|
10702
10712
|
|
10703
|
-
forceSelection :
|
10713
|
+
forceSelection : false, // force a choice on blur with search selection
|
10704
10714
|
|
10705
10715
|
allowAdditions : false, // whether multiple select should allow user added values
|
10706
10716
|
ignoreCase : false, // whether to consider case sensitivity when creating labels
|
@@ -10711,7 +10721,7 @@ $.fn.dropdown.settings = {
|
|
10711
10721
|
useLabels : true, // whether multiple select should filter currently active selections from choices
|
10712
10722
|
delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
|
10713
10723
|
|
10714
|
-
showOnFocus :
|
10724
|
+
showOnFocus : false, // show menu on focus
|
10715
10725
|
allowReselection : false, // whether current value should trigger callbacks when reselected
|
10716
10726
|
allowTab : true, // add tabindex to element
|
10717
10727
|
allowCategorySelection : false, // allow elements with sub-menus to be selected
|
@@ -10726,6 +10736,8 @@ $.fn.dropdown.settings = {
|
|
10726
10736
|
|
10727
10737
|
headerDivider : true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
|
10728
10738
|
|
10739
|
+
collapseOnActionable : true, // whether the dropdown should collapse upon selection of an actionable item
|
10740
|
+
|
10729
10741
|
// label settings on multi-select
|
10730
10742
|
label: {
|
10731
10743
|
transition : 'scale',
|
@@ -10745,6 +10757,7 @@ $.fn.dropdown.settings = {
|
|
10745
10757
|
onChange : function(value, text, $selected){},
|
10746
10758
|
onAdd : function(value, text, $selected){},
|
10747
10759
|
onRemove : function(value, text, $selected){},
|
10760
|
+
onActionable : function(value, text, $selected){},
|
10748
10761
|
onSearch : function(searchTerm){},
|
10749
10762
|
|
10750
10763
|
onLabelSelect : function($selectedLabels){},
|
@@ -10807,7 +10820,8 @@ $.fn.dropdown.settings = {
|
|
10807
10820
|
icon : 'icon', // optional icon name
|
10808
10821
|
iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
|
10809
10822
|
class : 'class', // optional individual class for item/header
|
10810
|
-
divider : 'divider' // optional divider append for group headers
|
10823
|
+
divider : 'divider', // optional divider append for group headers
|
10824
|
+
actionable : 'actionable' // optional actionable item
|
10811
10825
|
},
|
10812
10826
|
|
10813
10827
|
keys : {
|
@@ -10879,7 +10893,8 @@ $.fn.dropdown.settings = {
|
|
10879
10893
|
header : 'header',
|
10880
10894
|
divider : 'divider',
|
10881
10895
|
groupIcon : '',
|
10882
|
-
unfilterable : 'unfilterable'
|
10896
|
+
unfilterable : 'unfilterable',
|
10897
|
+
actionable : 'actionable'
|
10883
10898
|
}
|
10884
10899
|
|
10885
10900
|
};
|
@@ -10954,6 +10969,9 @@ $.fn.dropdown.settings.templates = {
|
|
10954
10969
|
maybeText = (option[fields.text])
|
10955
10970
|
? ' data-text="' + deQuote(option[fields.text],true) + '"'
|
10956
10971
|
: '',
|
10972
|
+
maybeActionable = (option[fields.actionable])
|
10973
|
+
? className.actionable+' '
|
10974
|
+
: '',
|
10957
10975
|
maybeDisabled = (option[fields.disabled])
|
10958
10976
|
? className.disabled+' '
|
10959
10977
|
: '',
|
@@ -10962,7 +10980,7 @@ $.fn.dropdown.settings.templates = {
|
|
10962
10980
|
: '',
|
10963
10981
|
hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
|
10964
10982
|
;
|
10965
|
-
html += '<div class="'+ maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
|
10983
|
+
html += '<div class="'+ maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
|
10966
10984
|
if (isMenu) {
|
10967
10985
|
html += '<i class="'+ (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
|
10968
10986
|
}
|
@@ -11032,7 +11050,7 @@ $.fn.dropdown.settings.templates = {
|
|
11032
11050
|
})( jQuery, window, document );
|
11033
11051
|
|
11034
11052
|
/*!
|
11035
|
-
* # Fomantic-UI 2.9.0-beta.
|
11053
|
+
* # Fomantic-UI 2.9.0-beta.143 - Embed
|
11036
11054
|
* http://github.com/fomantic/Fomantic-UI/
|
11037
11055
|
*
|
11038
11056
|
*
|
@@ -11742,7 +11760,7 @@ $.fn.embed.settings = {
|
|
11742
11760
|
})( jQuery, window, document );
|
11743
11761
|
|
11744
11762
|
/*!
|
11745
|
-
* # Fomantic-UI 2.9.0-beta.
|
11763
|
+
* # Fomantic-UI 2.9.0-beta.143 - Modal
|
11746
11764
|
* http://github.com/fomantic/Fomantic-UI/
|
11747
11765
|
*
|
11748
11766
|
*
|
@@ -11809,7 +11827,8 @@ $.fn.modal = function(parameters) {
|
|
11809
11827
|
|
11810
11828
|
$module = $(this),
|
11811
11829
|
$context = $(settings.context),
|
11812
|
-
$
|
11830
|
+
$closeIcon = $module.find(selector.closeIcon),
|
11831
|
+
$inputs,
|
11813
11832
|
|
11814
11833
|
$allModals,
|
11815
11834
|
$otherModals,
|
@@ -11835,6 +11854,7 @@ $.fn.modal = function(parameters) {
|
|
11835
11854
|
module = {
|
11836
11855
|
|
11837
11856
|
initialize: function() {
|
11857
|
+
module.create.id();
|
11838
11858
|
if(!$module.hasClass('modal')) {
|
11839
11859
|
module.create.modal();
|
11840
11860
|
if(!$.isFunction(settings.onHidden)) {
|
@@ -11859,15 +11879,17 @@ $.fn.modal = function(parameters) {
|
|
11859
11879
|
$actions.empty();
|
11860
11880
|
}
|
11861
11881
|
settings.actions.forEach(function (el) {
|
11862
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11882
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11863
11883
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
11864
11884
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
11865
11885
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
11866
11886
|
$actions.append($('<button/>', {
|
11867
11887
|
html: icon + text,
|
11888
|
+
'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
|
11868
11889
|
class: className.button + ' ' + cls,
|
11869
11890
|
click: function () {
|
11870
|
-
|
11891
|
+
var button = $(this);
|
11892
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
11871
11893
|
return;
|
11872
11894
|
}
|
11873
11895
|
module.hide();
|
@@ -11878,7 +11900,6 @@ $.fn.modal = function(parameters) {
|
|
11878
11900
|
module.cache = {};
|
11879
11901
|
module.verbose('Initializing dimmer', $context);
|
11880
11902
|
|
11881
|
-
module.create.id();
|
11882
11903
|
module.create.dimmer();
|
11883
11904
|
|
11884
11905
|
if ( settings.allowMultiple ) {
|
@@ -11888,11 +11909,9 @@ $.fn.modal = function(parameters) {
|
|
11888
11909
|
$module.addClass('top aligned');
|
11889
11910
|
}
|
11890
11911
|
module.refreshModals();
|
11891
|
-
|
11912
|
+
module.refreshInputs();
|
11892
11913
|
module.bind.events();
|
11893
|
-
|
11894
|
-
module.observeChanges();
|
11895
|
-
}
|
11914
|
+
module.observeChanges();
|
11896
11915
|
module.instantiate();
|
11897
11916
|
if(settings.autoShow){
|
11898
11917
|
module.show();
|
@@ -11909,16 +11928,20 @@ $.fn.modal = function(parameters) {
|
|
11909
11928
|
|
11910
11929
|
create: {
|
11911
11930
|
modal: function() {
|
11912
|
-
$module = $('<div/>', {class: className.modal});
|
11931
|
+
$module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
|
11913
11932
|
if (settings.closeIcon) {
|
11914
|
-
$
|
11915
|
-
$module.append($
|
11933
|
+
$closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
|
11934
|
+
$module.append($closeIcon);
|
11916
11935
|
}
|
11917
11936
|
if (settings.title !== '') {
|
11918
|
-
|
11937
|
+
var titleId = '_' + module.get.id() + 'title';
|
11938
|
+
$module.attr('aria-labelledby', titleId);
|
11939
|
+
$('<div/>', {class: className.title, id: titleId}).appendTo($module);
|
11919
11940
|
}
|
11920
11941
|
if (settings.content !== '') {
|
11921
|
-
|
11942
|
+
var descId = '_' + module.get.id() + 'desc';
|
11943
|
+
$module.attr('aria-describedby', descId);
|
11944
|
+
$('<div/>', {class: className.content, id: descId}).appendTo($module);
|
11922
11945
|
}
|
11923
11946
|
if (module.has.configActions()) {
|
11924
11947
|
$('<div/>', {class: className.actions}).appendTo($module);
|
@@ -11971,15 +11994,21 @@ $.fn.modal = function(parameters) {
|
|
11971
11994
|
;
|
11972
11995
|
$window.off(elementEventNamespace);
|
11973
11996
|
$dimmer.off(elementEventNamespace);
|
11974
|
-
$
|
11997
|
+
$closeIcon.off(elementEventNamespace);
|
11998
|
+
if($inputs) {
|
11999
|
+
$inputs.off(elementEventNamespace);
|
12000
|
+
}
|
11975
12001
|
$context.dimmer('destroy');
|
11976
12002
|
},
|
11977
12003
|
|
11978
12004
|
observeChanges: function() {
|
11979
12005
|
if('MutationObserver' in window) {
|
11980
12006
|
observer = new MutationObserver(function(mutations) {
|
11981
|
-
|
11982
|
-
|
12007
|
+
if(settings.observeChanges) {
|
12008
|
+
module.debug('DOM tree modified, refreshing');
|
12009
|
+
module.refresh();
|
12010
|
+
}
|
12011
|
+
module.refreshInputs();
|
11983
12012
|
});
|
11984
12013
|
observer.observe(element, {
|
11985
12014
|
childList : true,
|
@@ -12004,6 +12033,23 @@ $.fn.modal = function(parameters) {
|
|
12004
12033
|
$allModals = $otherModals.add($module);
|
12005
12034
|
},
|
12006
12035
|
|
12036
|
+
refreshInputs: function(){
|
12037
|
+
if($inputs){
|
12038
|
+
$inputs
|
12039
|
+
.off('keydown' + elementEventNamespace)
|
12040
|
+
;
|
12041
|
+
}
|
12042
|
+
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12043
|
+
return $(this).closest('.disabled').length === 0;
|
12044
|
+
});
|
12045
|
+
$inputs.first()
|
12046
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
|
12047
|
+
;
|
12048
|
+
$inputs.last()
|
12049
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
|
12050
|
+
;
|
12051
|
+
},
|
12052
|
+
|
12007
12053
|
attachEvents: function(selector, event) {
|
12008
12054
|
var
|
12009
12055
|
$toggle = $(selector)
|
@@ -12032,6 +12078,9 @@ $.fn.modal = function(parameters) {
|
|
12032
12078
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
12033
12079
|
.on('click' + eventNamespace, selector.deny, module.event.deny)
|
12034
12080
|
;
|
12081
|
+
$closeIcon
|
12082
|
+
.on('keyup' + elementEventNamespace, module.event.closeKeyUp)
|
12083
|
+
;
|
12035
12084
|
$window
|
12036
12085
|
.on('resize' + elementEventNamespace, module.event.resize)
|
12037
12086
|
;
|
@@ -12050,7 +12099,7 @@ $.fn.modal = function(parameters) {
|
|
12050
12099
|
|
12051
12100
|
get: {
|
12052
12101
|
id: function() {
|
12053
|
-
return
|
12102
|
+
return id;
|
12054
12103
|
},
|
12055
12104
|
element: function() {
|
12056
12105
|
return $module;
|
@@ -12089,10 +12138,38 @@ $.fn.modal = function(parameters) {
|
|
12089
12138
|
close: function() {
|
12090
12139
|
module.hide();
|
12091
12140
|
},
|
12141
|
+
closeKeyUp: function(event){
|
12142
|
+
var
|
12143
|
+
keyCode = event.which
|
12144
|
+
;
|
12145
|
+
if ((keyCode === settings.keys.enter || keyCode === settings.keys.space) && $module.hasClass(className.front)) {
|
12146
|
+
module.hide();
|
12147
|
+
}
|
12148
|
+
},
|
12149
|
+
inputKeyDown: {
|
12150
|
+
first: function(event) {
|
12151
|
+
var
|
12152
|
+
keyCode = event.which
|
12153
|
+
;
|
12154
|
+
if (keyCode === settings.keys.tab && event.shiftKey) {
|
12155
|
+
$inputs.last().focus();
|
12156
|
+
event.preventDefault();
|
12157
|
+
}
|
12158
|
+
},
|
12159
|
+
last: function(event) {
|
12160
|
+
var
|
12161
|
+
keyCode = event.which
|
12162
|
+
;
|
12163
|
+
if (keyCode === settings.keys.tab && !event.shiftKey) {
|
12164
|
+
$inputs.first().focus();
|
12165
|
+
event.preventDefault();
|
12166
|
+
}
|
12167
|
+
}
|
12168
|
+
},
|
12092
12169
|
mousedown: function(event) {
|
12093
12170
|
var
|
12094
12171
|
$target = $(event.target),
|
12095
|
-
isRtl = module.is.rtl()
|
12172
|
+
isRtl = module.is.rtl()
|
12096
12173
|
;
|
12097
12174
|
initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
|
12098
12175
|
if(initialMouseDownInModal) {
|
@@ -12140,10 +12217,9 @@ $.fn.modal = function(parameters) {
|
|
12140
12217
|
},
|
12141
12218
|
keyboard: function(event) {
|
12142
12219
|
var
|
12143
|
-
keyCode = event.which
|
12144
|
-
escapeKey = 27
|
12220
|
+
keyCode = event.which
|
12145
12221
|
;
|
12146
|
-
if(keyCode
|
12222
|
+
if(keyCode === settings.keys.escape) {
|
12147
12223
|
if(settings.closable) {
|
12148
12224
|
module.debug('Escape key pressed hiding modal');
|
12149
12225
|
if ( $module.hasClass(className.front) ) {
|
@@ -12458,7 +12534,7 @@ $.fn.modal = function(parameters) {
|
|
12458
12534
|
$module
|
12459
12535
|
.off('mousedown' + elementEventNamespace)
|
12460
12536
|
;
|
12461
|
-
}
|
12537
|
+
}
|
12462
12538
|
$dimmer
|
12463
12539
|
.off('mousedown' + elementEventNamespace)
|
12464
12540
|
;
|
@@ -12643,13 +12719,10 @@ $.fn.modal = function(parameters) {
|
|
12643
12719
|
set: {
|
12644
12720
|
autofocus: function() {
|
12645
12721
|
var
|
12646
|
-
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12647
|
-
return $(this).closest('.disabled').length === 0;
|
12648
|
-
}),
|
12649
12722
|
$autofocus = $inputs.filter('[autofocus]'),
|
12650
12723
|
$input = ($autofocus.length > 0)
|
12651
12724
|
? $autofocus.first()
|
12652
|
-
: $inputs.first()
|
12725
|
+
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
12653
12726
|
;
|
12654
12727
|
if($input.length > 0) {
|
12655
12728
|
$input.focus();
|
@@ -12731,7 +12804,7 @@ $.fn.modal = function(parameters) {
|
|
12731
12804
|
? $(document).scrollTop() + settings.padding
|
12732
12805
|
: $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
12733
12806
|
marginLeft: -(module.cache.width / 2)
|
12734
|
-
})
|
12807
|
+
})
|
12735
12808
|
;
|
12736
12809
|
} else {
|
12737
12810
|
$module
|
@@ -12740,7 +12813,7 @@ $.fn.modal = function(parameters) {
|
|
12740
12813
|
? -(module.cache.height / 2)
|
12741
12814
|
: settings.padding / 2,
|
12742
12815
|
marginLeft: -(module.cache.width / 2)
|
12743
|
-
})
|
12816
|
+
})
|
12744
12817
|
;
|
12745
12818
|
}
|
12746
12819
|
module.verbose('Setting modal offset for legacy mode');
|
@@ -13066,11 +13139,19 @@ $.fn.modal.settings = {
|
|
13066
13139
|
// called after deny selector match
|
13067
13140
|
onDeny : function(){ return true; },
|
13068
13141
|
|
13142
|
+
keys : {
|
13143
|
+
space : 32,
|
13144
|
+
enter : 13,
|
13145
|
+
escape : 27,
|
13146
|
+
tab : 9,
|
13147
|
+
},
|
13148
|
+
|
13069
13149
|
selector : {
|
13070
13150
|
title : '> .header',
|
13071
13151
|
content : '> .content',
|
13072
13152
|
actions : '> .actions',
|
13073
13153
|
close : '> .close',
|
13154
|
+
closeIcon: '> .close',
|
13074
13155
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
13075
13156
|
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
13076
13157
|
modal : '.ui.modal',
|
@@ -13106,7 +13187,8 @@ $.fn.modal.settings = {
|
|
13106
13187
|
},
|
13107
13188
|
text: {
|
13108
13189
|
ok : 'Ok',
|
13109
|
-
cancel: 'Cancel'
|
13190
|
+
cancel: 'Cancel',
|
13191
|
+
close : 'Close'
|
13110
13192
|
}
|
13111
13193
|
};
|
13112
13194
|
|
@@ -13195,7 +13277,7 @@ $.fn.modal.settings.templates = {
|
|
13195
13277
|
})( jQuery, window, document );
|
13196
13278
|
|
13197
13279
|
/*!
|
13198
|
-
* # Fomantic-UI 2.9.0-beta.
|
13280
|
+
* # Fomantic-UI 2.9.0-beta.143 - Nag
|
13199
13281
|
* http://github.com/fomantic/Fomantic-UI/
|
13200
13282
|
*
|
13201
13283
|
*
|
@@ -13754,7 +13836,7 @@ $.extend( $.easing, {
|
|
13754
13836
|
})( jQuery, window, document );
|
13755
13837
|
|
13756
13838
|
/*!
|
13757
|
-
* # Fomantic-UI 2.9.0-beta.
|
13839
|
+
* # Fomantic-UI 2.9.0-beta.143 - Popup
|
13758
13840
|
* http://github.com/fomantic/Fomantic-UI/
|
13759
13841
|
*
|
13760
13842
|
*
|
@@ -15296,7 +15378,7 @@ $.fn.popup.settings = {
|
|
15296
15378
|
})( jQuery, window, document );
|
15297
15379
|
|
15298
15380
|
/*!
|
15299
|
-
* # Fomantic-UI 2.9.0-beta.
|
15381
|
+
* # Fomantic-UI 2.9.0-beta.143 - Progress
|
15300
15382
|
* http://github.com/fomantic/Fomantic-UI/
|
15301
15383
|
*
|
15302
15384
|
*
|
@@ -16330,7 +16412,7 @@ $.fn.progress.settings = {
|
|
16330
16412
|
})( jQuery, window, document );
|
16331
16413
|
|
16332
16414
|
/*!
|
16333
|
-
* # Fomantic-UI 2.9.0-beta.
|
16415
|
+
* # Fomantic-UI 2.9.0-beta.143 - Slider
|
16334
16416
|
* http://github.com/fomantic/Fomantic-UI/
|
16335
16417
|
*
|
16336
16418
|
*
|
@@ -17669,7 +17751,7 @@ $.fn.slider.settings = {
|
|
17669
17751
|
})( jQuery, window, document );
|
17670
17752
|
|
17671
17753
|
/*!
|
17672
|
-
* # Fomantic-UI 2.9.0-beta.
|
17754
|
+
* # Fomantic-UI 2.9.0-beta.143 - Rating
|
17673
17755
|
* http://github.com/fomantic/Fomantic-UI/
|
17674
17756
|
*
|
17675
17757
|
*
|
@@ -18224,7 +18306,7 @@ $.fn.rating.settings = {
|
|
18224
18306
|
})( jQuery, window, document );
|
18225
18307
|
|
18226
18308
|
/*!
|
18227
|
-
* # Fomantic-UI 2.9.0-beta.
|
18309
|
+
* # Fomantic-UI 2.9.0-beta.143 - Search
|
18228
18310
|
* http://github.com/fomantic/Fomantic-UI/
|
18229
18311
|
*
|
18230
18312
|
*
|
@@ -19792,7 +19874,7 @@ $.fn.search.settings = {
|
|
19792
19874
|
})( jQuery, window, document );
|
19793
19875
|
|
19794
19876
|
/*!
|
19795
|
-
* # Fomantic-UI 2.9.0-beta.
|
19877
|
+
* # Fomantic-UI 2.9.0-beta.143 - Shape
|
19796
19878
|
* http://github.com/fomantic/Fomantic-UI/
|
19797
19879
|
*
|
19798
19880
|
*
|
@@ -20641,7 +20723,7 @@ $.fn.shape.settings = {
|
|
20641
20723
|
})( jQuery, window, document );
|
20642
20724
|
|
20643
20725
|
/*!
|
20644
|
-
* # Fomantic-UI 2.9.0-beta.
|
20726
|
+
* # Fomantic-UI 2.9.0-beta.143 - Sidebar
|
20645
20727
|
* http://github.com/fomantic/Fomantic-UI/
|
20646
20728
|
*
|
20647
20729
|
*
|
@@ -21678,7 +21760,7 @@ $.fn.sidebar.settings = {
|
|
21678
21760
|
})( jQuery, window, document );
|
21679
21761
|
|
21680
21762
|
/*!
|
21681
|
-
* # Fomantic-UI 2.9.0-beta.
|
21763
|
+
* # Fomantic-UI 2.9.0-beta.143 - Sticky
|
21682
21764
|
* http://github.com/fomantic/Fomantic-UI/
|
21683
21765
|
*
|
21684
21766
|
*
|
@@ -22636,7 +22718,7 @@ $.fn.sticky.settings = {
|
|
22636
22718
|
})( jQuery, window, document );
|
22637
22719
|
|
22638
22720
|
/*!
|
22639
|
-
* # Fomantic-UI 2.9.0-beta.
|
22721
|
+
* # Fomantic-UI 2.9.0-beta.143 - Tab
|
22640
22722
|
* http://github.com/fomantic/Fomantic-UI/
|
22641
22723
|
*
|
22642
22724
|
*
|
@@ -22737,10 +22819,18 @@ $.fn.tab = function(parameters) {
|
|
22737
22819
|
initializedHistory = true;
|
22738
22820
|
}
|
22739
22821
|
|
22740
|
-
|
22741
|
-
|
22742
|
-
|
22743
|
-
|
22822
|
+
var activeTab = module.determine.activeTab();
|
22823
|
+
if(settings.autoTabActivation && instance === undefined && activeTab == null) {
|
22824
|
+
activeTab = settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation;
|
22825
|
+
module.debug('No active tab detected, setting tab active', activeTab);
|
22826
|
+
module.changeTab(activeTab);
|
22827
|
+
}
|
22828
|
+
if(activeTab != null && settings.history) {
|
22829
|
+
var autoUpdate = $.address.autoUpdate();
|
22830
|
+
$.address.autoUpdate(false);
|
22831
|
+
$.address.value(activeTab);
|
22832
|
+
$.address.autoUpdate(autoUpdate);
|
22833
|
+
}
|
22744
22834
|
|
22745
22835
|
module.instantiate();
|
22746
22836
|
},
|
@@ -22840,6 +22930,7 @@ $.fn.tab = function(parameters) {
|
|
22840
22930
|
.history(true)
|
22841
22931
|
.state(settings.path)
|
22842
22932
|
;
|
22933
|
+
$(window).trigger('popstate');
|
22843
22934
|
}
|
22844
22935
|
else {
|
22845
22936
|
module.error(error.path);
|
@@ -23638,7 +23729,7 @@ $.fn.tab.settings = {
|
|
23638
23729
|
})( jQuery, window, document );
|
23639
23730
|
|
23640
23731
|
/*!
|
23641
|
-
* # Fomantic-UI 2.9.0-beta.
|
23732
|
+
* # Fomantic-UI 2.9.0-beta.143 - Toast
|
23642
23733
|
* http://github.com/fomantic/Fomantic-UI/
|
23643
23734
|
*
|
23644
23735
|
*
|
@@ -23708,12 +23799,14 @@ $.fn.toast = function(parameters) {
|
|
23708
23799
|
element = this,
|
23709
23800
|
instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
|
23710
23801
|
|
23802
|
+
id,
|
23711
23803
|
module
|
23712
23804
|
;
|
23713
23805
|
module = {
|
23714
23806
|
|
23715
23807
|
initialize: function() {
|
23716
23808
|
module.verbose('Initializing element');
|
23809
|
+
module.create.id();
|
23717
23810
|
if (!module.has.container()) {
|
23718
23811
|
module.create.container();
|
23719
23812
|
}
|
@@ -23763,17 +23856,22 @@ $.fn.toast = function(parameters) {
|
|
23763
23856
|
},
|
23764
23857
|
|
23765
23858
|
show: function(callback) {
|
23766
|
-
callback = callback || function(){};
|
23767
|
-
module.debug('Showing toast');
|
23768
23859
|
if(settings.onShow.call($toastBox, element) === false) {
|
23769
23860
|
module.debug('onShow callback returned false, cancelling toast animation');
|
23770
23861
|
return;
|
23771
23862
|
}
|
23863
|
+
callback = callback || function(){};
|
23864
|
+
module.debug('Showing toast');
|
23772
23865
|
module.animate.show(callback);
|
23773
23866
|
},
|
23774
23867
|
|
23775
23868
|
close: function(callback) {
|
23869
|
+
if(settings.onHide.call($toastBox, element) === false) {
|
23870
|
+
module.debug('onHide callback returned false, cancelling toast animation');
|
23871
|
+
return;
|
23872
|
+
}
|
23776
23873
|
callback = callback || function(){};
|
23874
|
+
module.debug('Closing toast');
|
23777
23875
|
module.remove.visible();
|
23778
23876
|
module.unbind.events();
|
23779
23877
|
module.animate.close(callback);
|
@@ -23785,12 +23883,16 @@ $.fn.toast = function(parameters) {
|
|
23785
23883
|
module.verbose('Creating container');
|
23786
23884
|
$context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
|
23787
23885
|
},
|
23886
|
+
id: function() {
|
23887
|
+
id = (Math.random().toString(16) + '000000000').substr(2, 8);
|
23888
|
+
module.verbose('Creating unique id for element', id);
|
23889
|
+
},
|
23788
23890
|
toast: function() {
|
23789
23891
|
$toastBox = $('<div/>', {class: className.box});
|
23790
23892
|
var iconClass = module.get.iconClass();
|
23791
23893
|
if (!isToastComponent) {
|
23792
23894
|
module.verbose('Creating toast');
|
23793
|
-
$toast = $('<div/>');
|
23895
|
+
$toast = $('<div/>', {role: 'alert'});
|
23794
23896
|
var $content = $('<div/>', {class: className.content});
|
23795
23897
|
if (iconClass !== '') {
|
23796
23898
|
$toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
|
@@ -23803,13 +23905,21 @@ $.fn.toast = function(parameters) {
|
|
23803
23905
|
}));
|
23804
23906
|
}
|
23805
23907
|
if (settings.title !== '') {
|
23908
|
+
var titleId = '_' + module.get.id() + 'title';
|
23909
|
+
$toast.attr('aria-labelledby', titleId);
|
23806
23910
|
$content.append($('<div/>', {
|
23807
23911
|
class: className.title,
|
23808
|
-
|
23912
|
+
id: titleId,
|
23913
|
+
html: module.helpers.escape(settings.title, settings.preserveHTML)
|
23809
23914
|
}));
|
23810
23915
|
}
|
23811
|
-
|
23812
|
-
$
|
23916
|
+
var descId = '_' + module.get.id() + 'desc';
|
23917
|
+
$toast.attr('aria-describedby', descId);
|
23918
|
+
$content.append($('<div/>', {
|
23919
|
+
class: className.message,
|
23920
|
+
id: descId,
|
23921
|
+
html: module.helpers.escape(settings.message, settings.preserveHTML)
|
23922
|
+
}));
|
23813
23923
|
|
23814
23924
|
$toast
|
23815
23925
|
.addClass(settings.class + ' ' + className.toast)
|
@@ -23817,7 +23927,7 @@ $.fn.toast = function(parameters) {
|
|
23817
23927
|
;
|
23818
23928
|
$toast.css('opacity', settings.opacity);
|
23819
23929
|
if (settings.closeIcon) {
|
23820
|
-
$close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : '')});
|
23930
|
+
$close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
|
23821
23931
|
if($close.hasClass(className.left)) {
|
23822
23932
|
$toast.prepend($close);
|
23823
23933
|
} else {
|
@@ -23860,15 +23970,17 @@ $.fn.toast = function(parameters) {
|
|
23860
23970
|
}
|
23861
23971
|
}
|
23862
23972
|
settings.actions.forEach(function (el) {
|
23863
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
23973
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
23864
23974
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
23865
23975
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
23866
23976
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
23867
23977
|
$actions.append($('<button/>', {
|
23868
23978
|
html: icon + text,
|
23979
|
+
'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
|
23869
23980
|
class: className.button + ' ' + cls,
|
23870
23981
|
click: function () {
|
23871
|
-
|
23982
|
+
var button = $(this);
|
23983
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
23872
23984
|
return;
|
23873
23985
|
}
|
23874
23986
|
module.close();
|
@@ -23968,13 +24080,12 @@ $.fn.toast = function(parameters) {
|
|
23968
24080
|
bind: {
|
23969
24081
|
events: function() {
|
23970
24082
|
module.debug('Binding events to toast');
|
23971
|
-
if(settings.
|
23972
|
-
(
|
23973
|
-
.on('click' + eventNamespace, module.event.click)
|
23974
|
-
;
|
24083
|
+
if(settings.closeIcon) {
|
24084
|
+
$close.on('click' + eventNamespace, module.event.close);
|
23975
24085
|
}
|
24086
|
+
$toast.on('click' + eventNamespace, module.event.click);
|
23976
24087
|
if($animationObject) {
|
23977
|
-
$animationObject.on('animationend' + eventNamespace, module.close);
|
24088
|
+
$animationObject.on('animationend' + eventNamespace, module.event.close);
|
23978
24089
|
}
|
23979
24090
|
$toastBox
|
23980
24091
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
@@ -23986,11 +24097,10 @@ $.fn.toast = function(parameters) {
|
|
23986
24097
|
unbind: {
|
23987
24098
|
events: function() {
|
23988
24099
|
module.debug('Unbinding events to toast');
|
23989
|
-
if(settings.
|
23990
|
-
|
23991
|
-
.off('click' + eventNamespace)
|
23992
|
-
;
|
24100
|
+
if(settings.closeIcon) {
|
24101
|
+
$close.off('click' + eventNamespace);
|
23993
24102
|
}
|
24103
|
+
$toast.off('click' + eventNamespace);
|
23994
24104
|
if($animationObject) {
|
23995
24105
|
$animationObject.off('animationend' + eventNamespace);
|
23996
24106
|
}
|
@@ -24022,11 +24132,6 @@ $.fn.toast = function(parameters) {
|
|
24022
24132
|
},
|
24023
24133
|
close: function(callback) {
|
24024
24134
|
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
24135
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
24031
24136
|
$toastBox
|
24032
24137
|
.transition({
|
@@ -24082,7 +24187,7 @@ $.fn.toast = function(parameters) {
|
|
24082
24187
|
has: {
|
24083
24188
|
container: function() {
|
24084
24189
|
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);
|
24190
|
+
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
24191
|
},
|
24087
24192
|
toast: function(){
|
24088
24193
|
return !!module.get.toast();
|
@@ -24096,8 +24201,11 @@ $.fn.toast = function(parameters) {
|
|
24096
24201
|
},
|
24097
24202
|
|
24098
24203
|
get: {
|
24204
|
+
id: function() {
|
24205
|
+
return id;
|
24206
|
+
},
|
24099
24207
|
container: function() {
|
24100
|
-
return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
|
24208
|
+
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
24209
|
},
|
24102
24210
|
toastBox: function() {
|
24103
24211
|
return $toastBox || null;
|
@@ -24129,9 +24237,15 @@ $.fn.toast = function(parameters) {
|
|
24129
24237
|
},
|
24130
24238
|
|
24131
24239
|
event: {
|
24240
|
+
close: function(){
|
24241
|
+
module.close();
|
24242
|
+
},
|
24132
24243
|
click: function(event) {
|
24133
24244
|
if($(event.target).closest('a').length === 0) {
|
24134
|
-
settings.onClick.call($toastBox, element)
|
24245
|
+
if(settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
|
24246
|
+
module.verbose('Click callback returned false or close denied by setting cancelling close');
|
24247
|
+
return;
|
24248
|
+
}
|
24135
24249
|
module.close();
|
24136
24250
|
}
|
24137
24251
|
},
|
@@ -24472,6 +24586,10 @@ $.fn.toast.settings = {
|
|
24472
24586
|
unclickable : 'unclickable'
|
24473
24587
|
},
|
24474
24588
|
|
24589
|
+
text: {
|
24590
|
+
close : 'Close'
|
24591
|
+
},
|
24592
|
+
|
24475
24593
|
icons : {
|
24476
24594
|
info : 'info',
|
24477
24595
|
success : 'checkmark',
|
@@ -24531,7 +24649,7 @@ $.extend( $.easing, {
|
|
24531
24649
|
})( jQuery, window, document );
|
24532
24650
|
|
24533
24651
|
/*!
|
24534
|
-
* # Fomantic-UI 2.9.0-beta.
|
24652
|
+
* # Fomantic-UI 2.9.0-beta.143 - Transition
|
24535
24653
|
* http://github.com/fomantic/Fomantic-UI/
|
24536
24654
|
*
|
24537
24655
|
*
|
@@ -25641,7 +25759,7 @@ $.fn.transition.settings = {
|
|
25641
25759
|
})( jQuery, window, document );
|
25642
25760
|
|
25643
25761
|
/*!
|
25644
|
-
* # Fomantic-UI 2.9.0-beta.
|
25762
|
+
* # Fomantic-UI 2.9.0-beta.143 - API
|
25645
25763
|
* http://github.com/fomantic/Fomantic-UI/
|
25646
25764
|
*
|
25647
25765
|
*
|
@@ -25790,8 +25908,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25790
25908
|
module.error(error.noStorage);
|
25791
25909
|
return;
|
25792
25910
|
}
|
25793
|
-
response = sessionStorage.getItem(url);
|
25794
|
-
module.debug('Using cached response', url, response);
|
25911
|
+
response = sessionStorage.getItem(url + module.get.normalizedData());
|
25912
|
+
module.debug('Using cached response', url, settings.data, response);
|
25795
25913
|
response = module.decode.json(response);
|
25796
25914
|
return response;
|
25797
25915
|
}
|
@@ -25809,8 +25927,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25809
25927
|
if( $.isPlainObject(response) ) {
|
25810
25928
|
response = JSON.stringify(response);
|
25811
25929
|
}
|
25812
|
-
sessionStorage.setItem(url, response);
|
25813
|
-
module.verbose('Storing cached response for url', url, response);
|
25930
|
+
sessionStorage.setItem(url + module.get.normalizedData(), response);
|
25931
|
+
module.verbose('Storing cached response for url', url, settings.data, response);
|
25814
25932
|
}
|
25815
25933
|
},
|
25816
25934
|
|
@@ -25976,10 +26094,6 @@ $.api = $.fn.api = function(parameters) {
|
|
25976
26094
|
cancelled: function() {
|
25977
26095
|
return (module.cancelled || false);
|
25978
26096
|
},
|
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
26097
|
successful: function() {
|
25984
26098
|
return (module.request && module.request.state() == 'resolved');
|
25985
26099
|
},
|
@@ -26071,25 +26185,29 @@ $.api = $.fn.api = function(parameters) {
|
|
26071
26185
|
},
|
26072
26186
|
formData: function(data) {
|
26073
26187
|
var
|
26074
|
-
|
26075
|
-
formData = (canSerialize)
|
26076
|
-
? $form.serializeObject()
|
26077
|
-
: $form.serialize(),
|
26188
|
+
formData = {},
|
26078
26189
|
hasOtherData
|
26079
26190
|
;
|
26080
26191
|
data = data || settings.data;
|
26081
26192
|
hasOtherData = $.isPlainObject(data);
|
26082
26193
|
|
26083
|
-
|
26084
|
-
|
26085
|
-
|
26086
|
-
|
26087
|
-
|
26088
|
-
|
26089
|
-
|
26090
|
-
|
26091
|
-
|
26194
|
+
$.each($form.serializeArray(), function (i, element) {
|
26195
|
+
var node = formData[element.name];
|
26196
|
+
|
26197
|
+
if ('undefined' !== typeof node && node !== null) {
|
26198
|
+
if (Array.isArray(node)) {
|
26199
|
+
node.push(element.value);
|
26200
|
+
} else {
|
26201
|
+
formData[element.name] = [node, element.value];
|
26202
|
+
}
|
26203
|
+
} else {
|
26204
|
+
formData[element.name] = element.value;
|
26092
26205
|
}
|
26206
|
+
});
|
26207
|
+
|
26208
|
+
if(hasOtherData) {
|
26209
|
+
module.debug('Extending existing data with form data', data, formData);
|
26210
|
+
data = $.extend(true, {}, data, formData);
|
26093
26211
|
}
|
26094
26212
|
else {
|
26095
26213
|
module.debug('Adding form data', formData);
|
@@ -26340,6 +26458,9 @@ $.api = $.fn.api = function(parameters) {
|
|
26340
26458
|
},
|
26341
26459
|
|
26342
26460
|
get: {
|
26461
|
+
normalizedData: function(){
|
26462
|
+
return typeof settings.data === "string" ? settings.data : JSON.stringify(settings.data, Object.keys(settings.data).sort());
|
26463
|
+
},
|
26343
26464
|
responseFromXHR: function(xhr) {
|
26344
26465
|
return $.isPlainObject(xhr)
|
26345
26466
|
? (module.is.expectingJSON())
|
@@ -26783,7 +26904,6 @@ $.api.settings = {
|
|
26783
26904
|
legacyParameters : 'You are using legacy API success callback names',
|
26784
26905
|
method : 'The method you called is not defined',
|
26785
26906
|
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
26907
|
missingURL : 'No URL specified for api event',
|
26788
26908
|
noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.',
|
26789
26909
|
noStorage : 'Caching responses locally requires session storage',
|
@@ -26819,7 +26939,7 @@ $.api.settings = {
|
|
26819
26939
|
})( jQuery, window, document );
|
26820
26940
|
|
26821
26941
|
/*!
|
26822
|
-
* # Fomantic-UI 2.9.0-beta.
|
26942
|
+
* # Fomantic-UI 2.9.0-beta.143 - State
|
26823
26943
|
* http://github.com/fomantic/Fomantic-UI/
|
26824
26944
|
*
|
26825
26945
|
*
|
@@ -27531,7 +27651,7 @@ $.fn.state.settings = {
|
|
27531
27651
|
})( jQuery, window, document );
|
27532
27652
|
|
27533
27653
|
/*!
|
27534
|
-
* # Fomantic-UI 2.9.0-beta.
|
27654
|
+
* # Fomantic-UI 2.9.0-beta.143 - Visibility
|
27535
27655
|
* http://github.com/fomantic/Fomantic-UI/
|
27536
27656
|
*
|
27537
27657
|
*
|