fomantic-ui 2.9.0-beta.8 → 2.9.0-beta.80
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 +188 -3
- package/CONTRIBUTING.md +1 -1
- package/CONTRIBUTORS.md +71 -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 +26 -24
- 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 +6 -6
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +106 -10
- 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 +2 -4
- 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 +1 -1
- package/dist/components/container.min.css +1 -1
- 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 +15 -19
- 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 +103 -54
- package/dist/components/form.js +24 -22
- 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 +17 -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 +31 -7
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- 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 +3 -3
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- 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 +12 -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 +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +5 -3
- 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 +7 -1
- package/dist/components/toast.js +3 -3
- 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 +2 -2
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +1323 -981
- package/dist/semantic.js +293 -135
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/library/iframe-content.js +8 -8
- package/examples/assets/library/iframe.js +3 -3
- package/package.json +2 -2
- package/src/definitions/behaviors/api.js +25 -23
- package/src/definitions/behaviors/form.js +23 -21
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +184 -133
- package/src/definitions/collections/grid.less +704 -669
- package/src/definitions/collections/menu.less +128 -85
- package/src/definitions/collections/message.less +8 -7
- package/src/definitions/collections/table.less +186 -174
- package/src/definitions/elements/button.less +130 -119
- package/src/definitions/elements/container.less +16 -8
- package/src/definitions/elements/emoji.less +15 -9
- package/src/definitions/elements/flag.less +7 -17
- package/src/definitions/elements/header.less +14 -8
- package/src/definitions/elements/icon.less +16 -10
- package/src/definitions/elements/input.less +17 -1
- package/src/definitions/elements/list.less +55 -45
- package/src/definitions/elements/segment.less +15 -8
- package/src/definitions/elements/step.less +52 -48
- package/src/definitions/globals/site.less +23 -2
- package/src/definitions/modules/accordion.less +55 -5
- package/src/definitions/modules/calendar.js +105 -9
- package/src/definitions/modules/checkbox.js +1 -3
- package/src/definitions/modules/checkbox.less +1 -146
- package/src/definitions/modules/dimmer.less +21 -8
- package/src/definitions/modules/dropdown.js +14 -18
- package/src/definitions/modules/dropdown.less +96 -64
- package/src/definitions/modules/modal.js +93 -29
- package/src/definitions/modules/modal.less +2 -0
- package/src/definitions/modules/popup.less +5 -1
- package/src/definitions/modules/progress.js +2 -2
- package/src/definitions/modules/rating.less +18 -12
- package/src/definitions/modules/search.less +32 -16
- package/src/definitions/modules/sidebar.less +30 -18
- package/src/definitions/modules/sticky.js +1 -1
- package/src/definitions/modules/toast.js +2 -2
- package/src/definitions/modules/toast.less +5 -0
- package/src/definitions/modules/transition.js +1 -1
- package/src/definitions/views/card.less +373 -333
- 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 +71 -70
- package/src/themes/default/collections/menu.variables +6 -0
- package/src/themes/default/elements/button.variables +2 -1
- 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/step.overrides +1 -1
- package/src/themes/default/globals/site.variables +6 -0
- package/src/themes/default/globals/variation.variables +74 -1
- 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/famfamfam/elements/flag.overrides +1026 -0
- package/src/themes/famfamfam/elements/flag.variables +13 -0
- package/tasks/admin/components/init.js +2 -2
- package/tasks/admin/distributions/init.js +2 -2
- 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.80
|
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.80 - 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.80 - 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
|
}
|
@@ -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.80 - 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.80 - 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
|
@@ -3585,6 +3586,19 @@ $.fn.calendar = function(parameters) {
|
|
3585
3586
|
cell.attr("data-variation", disabledDate[metadata.variation]);
|
3586
3587
|
}
|
3587
3588
|
}
|
3589
|
+
if (mode === 'hour') {
|
3590
|
+
var disabledHour = module.helper.findHourAsObject(cellDate, mode, settings.disabledHours);
|
3591
|
+
if (disabledHour !== null && disabledHour[metadata.message]) {
|
3592
|
+
cell.attr("data-tooltip", disabledHour[metadata.message]);
|
3593
|
+
cell.attr("data-position", disabledHour[metadata.position] || tooltipPosition);
|
3594
|
+
if(disabledHour[metadata.inverted] || (isInverted && disabledHour[metadata.inverted] === undefined)) {
|
3595
|
+
cell.attr("data-inverted", '');
|
3596
|
+
}
|
3597
|
+
if(disabledHour[metadata.variation]) {
|
3598
|
+
cell.attr("data-variation", disabledHour[metadata.variation]);
|
3599
|
+
}
|
3600
|
+
}
|
3601
|
+
}
|
3588
3602
|
} else {
|
3589
3603
|
eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
|
3590
3604
|
if (eventDate !== null) {
|
@@ -4170,7 +4184,7 @@ $.fn.calendar = function(parameters) {
|
|
4170
4184
|
|
4171
4185
|
helper: {
|
4172
4186
|
isDisabled: function(date, mode) {
|
4173
|
-
return (mode === 'day' || mode === 'month' || mode === 'year') && ((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
|
4187
|
+
return (mode === 'day' || mode === 'month' || mode === 'year' || mode === 'hour') && (((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
|
4174
4188
|
if(typeof d === 'string') {
|
4175
4189
|
d = module.helper.sanitiseDate(d);
|
4176
4190
|
}
|
@@ -4203,7 +4217,45 @@ $.fn.calendar = function(parameters) {
|
|
4203
4217
|
}
|
4204
4218
|
}
|
4205
4219
|
}
|
4206
|
-
}))
|
4220
|
+
})) || (mode === 'hour' && settings.disabledHours.some(function(d){
|
4221
|
+
if (typeof d === 'string') {
|
4222
|
+
d = module.helper.sanitiseDate(d);
|
4223
|
+
}
|
4224
|
+
if (d instanceof Date) {
|
4225
|
+
return module.helper.dateEqual(date, d, mode);
|
4226
|
+
} else if (typeof d === 'number') {
|
4227
|
+
return date.getHours() === d;
|
4228
|
+
}
|
4229
|
+
if (d !== null && typeof d === 'object') {
|
4230
|
+
var blocked = true;
|
4231
|
+
|
4232
|
+
if (d[metadata.date]) {
|
4233
|
+
if (d[metadata.date] instanceof Date) {
|
4234
|
+
blocked = module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]));
|
4235
|
+
} else if (Array.isArray(d[metadata.date])) {
|
4236
|
+
return d[metadata.date].some(function(idate) {
|
4237
|
+
blocked = module.helper.dateEqual(date, idate, mode);
|
4238
|
+
});
|
4239
|
+
}
|
4240
|
+
}
|
4241
|
+
|
4242
|
+
if (d[metadata.days]) {
|
4243
|
+
if (typeof d[metadata.days] === 'number') {
|
4244
|
+
blocked = date.getDay() == d[metadata.days];
|
4245
|
+
} else if (Array.isArray(d[metadata.days])) {
|
4246
|
+
blocked = d[metadata.days].indexOf(date.getDay()) > -1;
|
4247
|
+
}
|
4248
|
+
}
|
4249
|
+
|
4250
|
+
if (d[metadata.hours]) {
|
4251
|
+
if (typeof d[metadata.hours] === 'number') {
|
4252
|
+
return blocked && date.getHours() == d[metadata.hours];
|
4253
|
+
} else if (Array.isArray(d[metadata.hours])) {
|
4254
|
+
return blocked && d[metadata.hours].indexOf(date.getHours()) > -1;
|
4255
|
+
}
|
4256
|
+
}
|
4257
|
+
}
|
4258
|
+
})));
|
4207
4259
|
},
|
4208
4260
|
isEnabled: function(date, mode) {
|
4209
4261
|
if (mode === 'day') {
|
@@ -4271,6 +4323,49 @@ $.fn.calendar = function(parameters) {
|
|
4271
4323
|
}
|
4272
4324
|
return null;
|
4273
4325
|
},
|
4326
|
+
findHourAsObject: function(date, mode, hours) {
|
4327
|
+
if (mode === 'hour') {
|
4328
|
+
var d;
|
4329
|
+
var hourCheck = function(date, d) {
|
4330
|
+
if (d[metadata.hours]) {
|
4331
|
+
if (typeof d[metadata.hours] === 'number' && date.getHours() == d[metadata.hours]) {
|
4332
|
+
return d;
|
4333
|
+
} else if (Array.isArray(d[metadata.hours])) {
|
4334
|
+
if (d[metadata.hours].indexOf(date.getHours()) > -1) {
|
4335
|
+
return d;
|
4336
|
+
}
|
4337
|
+
}
|
4338
|
+
}
|
4339
|
+
}
|
4340
|
+
for (var i = 0; i < hours.length; i++) {
|
4341
|
+
d = hours[i];
|
4342
|
+
if (typeof d === 'number' && date.getHours() == d) {
|
4343
|
+
return null;
|
4344
|
+
} else if (d !== null && typeof d === 'object') {
|
4345
|
+
if (d[metadata.days] && hourCheck(date,d)) {
|
4346
|
+
if (typeof d[metadata.days] === 'number' && date.getDay() == d[metadata.days]) {
|
4347
|
+
return d;
|
4348
|
+
} else if (Array.isArray(d[metadata.days])) {
|
4349
|
+
if (d[metadata.days].indexOf(date.getDay()) > -1) {
|
4350
|
+
return d;
|
4351
|
+
}
|
4352
|
+
}
|
4353
|
+
} else if (d[metadata.date] && hourCheck(date,d)) {
|
4354
|
+
if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]))) {
|
4355
|
+
return d;
|
4356
|
+
} else if (Array.isArray(d[metadata.date])) {
|
4357
|
+
if (d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
|
4358
|
+
return d;
|
4359
|
+
}
|
4360
|
+
}
|
4361
|
+
} else if (hourCheck(date,d)) {
|
4362
|
+
return d;
|
4363
|
+
}
|
4364
|
+
}
|
4365
|
+
}
|
4366
|
+
}
|
4367
|
+
return null;
|
4368
|
+
},
|
4274
4369
|
sanitiseDate: function (date) {
|
4275
4370
|
if (!(date instanceof Date)) {
|
4276
4371
|
date = parser.date('' + date, settings);
|
@@ -4556,6 +4651,7 @@ $.fn.calendar.settings = {
|
|
4556
4651
|
multiMonth : 1, // show multiple months when in 'day' mode
|
4557
4652
|
minTimeGap : 5,
|
4558
4653
|
showWeekNumbers : null, // show Number of Week at the very first column of a dayView
|
4654
|
+
disabledHours : [], // specific hour(s) which won't be selectable and contain additional information.
|
4559
4655
|
disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
|
4560
4656
|
disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
|
4561
4657
|
enabledDates : [], // specific day(s) which will be selectable, all other days will be disabled
|
@@ -4961,7 +5057,9 @@ $.fn.calendar.settings = {
|
|
4961
5057
|
variation: 'variation',
|
4962
5058
|
position: 'position',
|
4963
5059
|
month: 'month',
|
4964
|
-
year: 'year'
|
5060
|
+
year: 'year',
|
5061
|
+
hours: 'hours',
|
5062
|
+
days: 'days'
|
4965
5063
|
},
|
4966
5064
|
|
4967
5065
|
eventClass: 'blue'
|
@@ -4970,7 +5068,7 @@ $.fn.calendar.settings = {
|
|
4970
5068
|
})(jQuery, window, document);
|
4971
5069
|
|
4972
5070
|
/*!
|
4973
|
-
* # Fomantic-UI 2.9.0-beta.
|
5071
|
+
* # Fomantic-UI 2.9.0-beta.80 - Checkbox
|
4974
5072
|
* http://github.com/fomantic/Fomantic-UI/
|
4975
5073
|
*
|
4976
5074
|
*
|
@@ -5294,7 +5392,6 @@ $.fn.checkbox = function(parameters) {
|
|
5294
5392
|
settings.onEnable.call(input);
|
5295
5393
|
// preserve legacy callbacks
|
5296
5394
|
settings.onEnabled.call(input);
|
5297
|
-
module.trigger.change();
|
5298
5395
|
}
|
5299
5396
|
},
|
5300
5397
|
|
@@ -5309,7 +5406,6 @@ $.fn.checkbox = function(parameters) {
|
|
5309
5406
|
settings.onDisable.call(input);
|
5310
5407
|
// preserve legacy callbacks
|
5311
5408
|
settings.onDisabled.call(input);
|
5312
|
-
module.trigger.change();
|
5313
5409
|
}
|
5314
5410
|
},
|
5315
5411
|
|
@@ -5837,7 +5933,7 @@ $.fn.checkbox.settings = {
|
|
5837
5933
|
|
5838
5934
|
selector : {
|
5839
5935
|
checkbox : '.ui.checkbox',
|
5840
|
-
label : 'label
|
5936
|
+
label : 'label',
|
5841
5937
|
input : 'input[type="checkbox"], input[type="radio"]',
|
5842
5938
|
link : 'a[href]'
|
5843
5939
|
}
|
@@ -5847,7 +5943,7 @@ $.fn.checkbox.settings = {
|
|
5847
5943
|
})( jQuery, window, document );
|
5848
5944
|
|
5849
5945
|
/*!
|
5850
|
-
* # Fomantic-UI 2.9.0-beta.
|
5946
|
+
* # Fomantic-UI 2.9.0-beta.80 - Dimmer
|
5851
5947
|
* http://github.com/fomantic/Fomantic-UI/
|
5852
5948
|
*
|
5853
5949
|
*
|
@@ -6604,7 +6700,7 @@ $.fn.dimmer.settings = {
|
|
6604
6700
|
})( jQuery, window, document );
|
6605
6701
|
|
6606
6702
|
/*!
|
6607
|
-
* # Fomantic-UI 2.9.0-beta.
|
6703
|
+
* # Fomantic-UI 2.9.0-beta.80 - Dropdown
|
6608
6704
|
* http://github.com/fomantic/Fomantic-UI/
|
6609
6705
|
*
|
6610
6706
|
*
|
@@ -6805,6 +6901,7 @@ $.fn.dropdown = function(parameters) {
|
|
6805
6901
|
select: function() {
|
6806
6902
|
if(module.has.input() && selectObserver) {
|
6807
6903
|
selectObserver.observe($module[0], {
|
6904
|
+
attributes: true,
|
6808
6905
|
childList : true,
|
6809
6906
|
subtree : true
|
6810
6907
|
});
|
@@ -7026,6 +7123,9 @@ $.fn.dropdown = function(parameters) {
|
|
7026
7123
|
module.debug('Disabling dropdown');
|
7027
7124
|
$module.addClass(className.disabled);
|
7028
7125
|
}
|
7126
|
+
if($input.is('[required]')) {
|
7127
|
+
settings.forceSelection = true;
|
7128
|
+
}
|
7029
7129
|
$input
|
7030
7130
|
.removeAttr('required')
|
7031
7131
|
.removeAttr('class')
|
@@ -7165,7 +7265,7 @@ $.fn.dropdown = function(parameters) {
|
|
7165
7265
|
if(settings.onHide.call(element) !== false) {
|
7166
7266
|
module.animate.hide(function() {
|
7167
7267
|
module.remove.visible();
|
7168
|
-
//
|
7268
|
+
// hiding search focus
|
7169
7269
|
if ( module.is.focusedOnSearch() && preventBlur !== true ) {
|
7170
7270
|
$search.blur();
|
7171
7271
|
}
|
@@ -7890,8 +7990,8 @@ $.fn.dropdown = function(parameters) {
|
|
7890
7990
|
},
|
7891
7991
|
select: {
|
7892
7992
|
mutation: function(mutations) {
|
7893
|
-
module.debug('<select> modified, recreating menu');
|
7894
7993
|
if(module.is.selectMutation(mutations)) {
|
7994
|
+
module.debug('<select> modified, recreating menu');
|
7895
7995
|
module.disconnect.selectObserver();
|
7896
7996
|
module.refresh();
|
7897
7997
|
module.setup.select();
|
@@ -8925,7 +9025,7 @@ $.fn.dropdown = function(parameters) {
|
|
8925
9025
|
module.error(error.noStorage);
|
8926
9026
|
return;
|
8927
9027
|
}
|
8928
|
-
name = sessionStorage.getItem(value);
|
9028
|
+
name = sessionStorage.getItem(value + elementNamespace);
|
8929
9029
|
return (name !== undefined)
|
8930
9030
|
? name
|
8931
9031
|
: false
|
@@ -8969,7 +9069,7 @@ $.fn.dropdown = function(parameters) {
|
|
8969
9069
|
return;
|
8970
9070
|
}
|
8971
9071
|
module.verbose('Saving remote data to session storage', value, name);
|
8972
|
-
sessionStorage.setItem(value, name);
|
9072
|
+
sessionStorage.setItem(value + elementNamespace, name);
|
8973
9073
|
}
|
8974
9074
|
},
|
8975
9075
|
|
@@ -9674,18 +9774,10 @@ $.fn.dropdown = function(parameters) {
|
|
9674
9774
|
return;
|
9675
9775
|
}
|
9676
9776
|
// temporarily disconnect observer
|
9677
|
-
|
9678
|
-
selectObserver.disconnect();
|
9679
|
-
module.verbose('Temporarily disconnecting mutation observer');
|
9680
|
-
}
|
9777
|
+
module.disconnect.selectObserver();
|
9681
9778
|
$option.remove();
|
9682
9779
|
module.verbose('Removing user addition as an <option>', escapedValue);
|
9683
|
-
|
9684
|
-
selectObserver.observe($input[0], {
|
9685
|
-
childList : true,
|
9686
|
-
subtree : true
|
9687
|
-
});
|
9688
|
-
}
|
9780
|
+
module.observe.select();
|
9689
9781
|
},
|
9690
9782
|
message: function() {
|
9691
9783
|
$menu.children(selector.message).remove();
|
@@ -10050,7 +10142,7 @@ $.fn.dropdown = function(parameters) {
|
|
10050
10142
|
selectChanged = false
|
10051
10143
|
;
|
10052
10144
|
$.each(mutations, function(index, mutation) {
|
10053
|
-
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
|
10145
|
+
if($(mutation.target).is('select, option, optgroup') || $(mutation.addedNodes).is('select')) {
|
10054
10146
|
selectChanged = true;
|
10055
10147
|
return false;
|
10056
10148
|
}
|
@@ -10595,7 +10687,7 @@ $.fn.dropdown.settings = {
|
|
10595
10687
|
keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing
|
10596
10688
|
|
10597
10689
|
match : 'both', // what to match against with search selection (both, text, or label)
|
10598
|
-
fullTextSearch :
|
10690
|
+
fullTextSearch : 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10599
10691
|
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...)
|
10600
10692
|
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)
|
10601
10693
|
|
@@ -10603,7 +10695,7 @@ $.fn.dropdown.settings = {
|
|
10603
10695
|
preserveHTML : true, // preserve html when selecting value
|
10604
10696
|
sortSelect : false, // sort selection on init
|
10605
10697
|
|
10606
|
-
forceSelection :
|
10698
|
+
forceSelection : false, // force a choice on blur with search selection
|
10607
10699
|
|
10608
10700
|
allowAdditions : false, // whether multiple select should allow user added values
|
10609
10701
|
ignoreCase : false, // whether to consider case sensitivity when creating labels
|
@@ -10614,7 +10706,7 @@ $.fn.dropdown.settings = {
|
|
10614
10706
|
useLabels : true, // whether multiple select should filter currently active selections from choices
|
10615
10707
|
delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
|
10616
10708
|
|
10617
|
-
showOnFocus :
|
10709
|
+
showOnFocus : false, // show menu on focus
|
10618
10710
|
allowReselection : false, // whether current value should trigger callbacks when reselected
|
10619
10711
|
allowTab : true, // add tabindex to element
|
10620
10712
|
allowCategorySelection : false, // allow elements with sub-menus to be selected
|
@@ -10935,7 +11027,7 @@ $.fn.dropdown.settings.templates = {
|
|
10935
11027
|
})( jQuery, window, document );
|
10936
11028
|
|
10937
11029
|
/*!
|
10938
|
-
* # Fomantic-UI 2.9.0-beta.
|
11030
|
+
* # Fomantic-UI 2.9.0-beta.80 - Embed
|
10939
11031
|
* http://github.com/fomantic/Fomantic-UI/
|
10940
11032
|
*
|
10941
11033
|
*
|
@@ -11645,7 +11737,7 @@ $.fn.embed.settings = {
|
|
11645
11737
|
})( jQuery, window, document );
|
11646
11738
|
|
11647
11739
|
/*!
|
11648
|
-
* # Fomantic-UI 2.9.0-beta.
|
11740
|
+
* # Fomantic-UI 2.9.0-beta.80 - Modal
|
11649
11741
|
* http://github.com/fomantic/Fomantic-UI/
|
11650
11742
|
*
|
11651
11743
|
*
|
@@ -11712,7 +11804,8 @@ $.fn.modal = function(parameters) {
|
|
11712
11804
|
|
11713
11805
|
$module = $(this),
|
11714
11806
|
$context = $(settings.context),
|
11715
|
-
$
|
11807
|
+
$closeIcon = $module.find(selector.closeIcon),
|
11808
|
+
$inputs,
|
11716
11809
|
|
11717
11810
|
$allModals,
|
11718
11811
|
$otherModals,
|
@@ -11738,6 +11831,7 @@ $.fn.modal = function(parameters) {
|
|
11738
11831
|
module = {
|
11739
11832
|
|
11740
11833
|
initialize: function() {
|
11834
|
+
module.create.id();
|
11741
11835
|
if(!$module.hasClass('modal')) {
|
11742
11836
|
module.create.modal();
|
11743
11837
|
if(!$.isFunction(settings.onHidden)) {
|
@@ -11762,15 +11856,17 @@ $.fn.modal = function(parameters) {
|
|
11762
11856
|
$actions.empty();
|
11763
11857
|
}
|
11764
11858
|
settings.actions.forEach(function (el) {
|
11765
|
-
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11859
|
+
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
11766
11860
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
11767
11861
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
11768
11862
|
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
11769
11863
|
$actions.append($('<button/>', {
|
11770
11864
|
html: icon + text,
|
11865
|
+
'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
|
11771
11866
|
class: className.button + ' ' + cls,
|
11772
11867
|
click: function () {
|
11773
|
-
|
11868
|
+
var button = $(this);
|
11869
|
+
if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
|
11774
11870
|
return;
|
11775
11871
|
}
|
11776
11872
|
module.hide();
|
@@ -11781,7 +11877,6 @@ $.fn.modal = function(parameters) {
|
|
11781
11877
|
module.cache = {};
|
11782
11878
|
module.verbose('Initializing dimmer', $context);
|
11783
11879
|
|
11784
|
-
module.create.id();
|
11785
11880
|
module.create.dimmer();
|
11786
11881
|
|
11787
11882
|
if ( settings.allowMultiple ) {
|
@@ -11791,11 +11886,9 @@ $.fn.modal = function(parameters) {
|
|
11791
11886
|
$module.addClass('top aligned');
|
11792
11887
|
}
|
11793
11888
|
module.refreshModals();
|
11794
|
-
|
11889
|
+
module.refreshInputs();
|
11795
11890
|
module.bind.events();
|
11796
|
-
|
11797
|
-
module.observeChanges();
|
11798
|
-
}
|
11891
|
+
module.observeChanges();
|
11799
11892
|
module.instantiate();
|
11800
11893
|
if(settings.autoShow){
|
11801
11894
|
module.show();
|
@@ -11812,16 +11905,20 @@ $.fn.modal = function(parameters) {
|
|
11812
11905
|
|
11813
11906
|
create: {
|
11814
11907
|
modal: function() {
|
11815
|
-
$module = $('<div/>', {class: className.modal});
|
11908
|
+
$module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
|
11816
11909
|
if (settings.closeIcon) {
|
11817
|
-
$
|
11818
|
-
$module.append($
|
11910
|
+
$closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
|
11911
|
+
$module.append($closeIcon);
|
11819
11912
|
}
|
11820
11913
|
if (settings.title !== '') {
|
11821
|
-
|
11914
|
+
var titleId = '_' + module.get.id() + 'title';
|
11915
|
+
$module.attr('aria-labelledby', titleId);
|
11916
|
+
$('<div/>', {class: className.title, id: titleId}).appendTo($module);
|
11822
11917
|
}
|
11823
11918
|
if (settings.content !== '') {
|
11824
|
-
|
11919
|
+
var descId = '_' + module.get.id() + 'desc';
|
11920
|
+
$module.attr('aria-describedby', descId);
|
11921
|
+
$('<div/>', {class: className.content, id: descId}).appendTo($module);
|
11825
11922
|
}
|
11826
11923
|
if (module.has.configActions()) {
|
11827
11924
|
$('<div/>', {class: className.actions}).appendTo($module);
|
@@ -11874,15 +11971,21 @@ $.fn.modal = function(parameters) {
|
|
11874
11971
|
;
|
11875
11972
|
$window.off(elementEventNamespace);
|
11876
11973
|
$dimmer.off(elementEventNamespace);
|
11877
|
-
$
|
11974
|
+
$closeIcon.off(elementEventNamespace);
|
11975
|
+
if($inputs) {
|
11976
|
+
$inputs.off(elementEventNamespace);
|
11977
|
+
}
|
11878
11978
|
$context.dimmer('destroy');
|
11879
11979
|
},
|
11880
11980
|
|
11881
11981
|
observeChanges: function() {
|
11882
11982
|
if('MutationObserver' in window) {
|
11883
11983
|
observer = new MutationObserver(function(mutations) {
|
11884
|
-
|
11885
|
-
|
11984
|
+
if(settings.observeChanges) {
|
11985
|
+
module.debug('DOM tree modified, refreshing');
|
11986
|
+
module.refresh();
|
11987
|
+
}
|
11988
|
+
module.refreshInputs();
|
11886
11989
|
});
|
11887
11990
|
observer.observe(element, {
|
11888
11991
|
childList : true,
|
@@ -11907,6 +12010,23 @@ $.fn.modal = function(parameters) {
|
|
11907
12010
|
$allModals = $otherModals.add($module);
|
11908
12011
|
},
|
11909
12012
|
|
12013
|
+
refreshInputs: function(){
|
12014
|
+
if($inputs){
|
12015
|
+
$inputs
|
12016
|
+
.off('keydown' + elementEventNamespace)
|
12017
|
+
;
|
12018
|
+
}
|
12019
|
+
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12020
|
+
return $(this).closest('.disabled').length === 0;
|
12021
|
+
});
|
12022
|
+
$inputs.first()
|
12023
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
|
12024
|
+
;
|
12025
|
+
$inputs.last()
|
12026
|
+
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
|
12027
|
+
;
|
12028
|
+
},
|
12029
|
+
|
11910
12030
|
attachEvents: function(selector, event) {
|
11911
12031
|
var
|
11912
12032
|
$toggle = $(selector)
|
@@ -11935,6 +12055,9 @@ $.fn.modal = function(parameters) {
|
|
11935
12055
|
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
11936
12056
|
.on('click' + eventNamespace, selector.deny, module.event.deny)
|
11937
12057
|
;
|
12058
|
+
$closeIcon
|
12059
|
+
.on('keyup' + elementEventNamespace, module.event.closeKeyUp)
|
12060
|
+
;
|
11938
12061
|
$window
|
11939
12062
|
.on('resize' + elementEventNamespace, module.event.resize)
|
11940
12063
|
;
|
@@ -11953,7 +12076,7 @@ $.fn.modal = function(parameters) {
|
|
11953
12076
|
|
11954
12077
|
get: {
|
11955
12078
|
id: function() {
|
11956
|
-
return
|
12079
|
+
return id;
|
11957
12080
|
},
|
11958
12081
|
element: function() {
|
11959
12082
|
return $module;
|
@@ -11992,10 +12115,38 @@ $.fn.modal = function(parameters) {
|
|
11992
12115
|
close: function() {
|
11993
12116
|
module.hide();
|
11994
12117
|
},
|
12118
|
+
closeKeyUp: function(event){
|
12119
|
+
var
|
12120
|
+
keyCode = event.which
|
12121
|
+
;
|
12122
|
+
if ((keyCode === settings.keys.enter || keyCode === settings.keys.space) && $module.hasClass(className.front)) {
|
12123
|
+
module.hide();
|
12124
|
+
}
|
12125
|
+
},
|
12126
|
+
inputKeyDown: {
|
12127
|
+
first: function(event) {
|
12128
|
+
var
|
12129
|
+
keyCode = event.which
|
12130
|
+
;
|
12131
|
+
if (keyCode === settings.keys.tab && event.shiftKey) {
|
12132
|
+
$inputs.last().focus();
|
12133
|
+
event.preventDefault();
|
12134
|
+
}
|
12135
|
+
},
|
12136
|
+
last: function(event) {
|
12137
|
+
var
|
12138
|
+
keyCode = event.which
|
12139
|
+
;
|
12140
|
+
if (keyCode === settings.keys.tab && !event.shiftKey) {
|
12141
|
+
$inputs.first().focus();
|
12142
|
+
event.preventDefault();
|
12143
|
+
}
|
12144
|
+
}
|
12145
|
+
},
|
11995
12146
|
mousedown: function(event) {
|
11996
12147
|
var
|
11997
12148
|
$target = $(event.target),
|
11998
|
-
isRtl = module.is.rtl()
|
12149
|
+
isRtl = module.is.rtl()
|
11999
12150
|
;
|
12000
12151
|
initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
|
12001
12152
|
if(initialMouseDownInModal) {
|
@@ -12043,10 +12194,9 @@ $.fn.modal = function(parameters) {
|
|
12043
12194
|
},
|
12044
12195
|
keyboard: function(event) {
|
12045
12196
|
var
|
12046
|
-
keyCode = event.which
|
12047
|
-
escapeKey = 27
|
12197
|
+
keyCode = event.which
|
12048
12198
|
;
|
12049
|
-
if(keyCode
|
12199
|
+
if(keyCode === settings.keys.escape) {
|
12050
12200
|
if(settings.closable) {
|
12051
12201
|
module.debug('Escape key pressed hiding modal');
|
12052
12202
|
if ( $module.hasClass(className.front) ) {
|
@@ -12361,7 +12511,7 @@ $.fn.modal = function(parameters) {
|
|
12361
12511
|
$module
|
12362
12512
|
.off('mousedown' + elementEventNamespace)
|
12363
12513
|
;
|
12364
|
-
}
|
12514
|
+
}
|
12365
12515
|
$dimmer
|
12366
12516
|
.off('mousedown' + elementEventNamespace)
|
12367
12517
|
;
|
@@ -12546,13 +12696,10 @@ $.fn.modal = function(parameters) {
|
|
12546
12696
|
set: {
|
12547
12697
|
autofocus: function() {
|
12548
12698
|
var
|
12549
|
-
$inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
|
12550
|
-
return $(this).closest('.disabled').length === 0;
|
12551
|
-
}),
|
12552
12699
|
$autofocus = $inputs.filter('[autofocus]'),
|
12553
12700
|
$input = ($autofocus.length > 0)
|
12554
12701
|
? $autofocus.first()
|
12555
|
-
: $inputs.first()
|
12702
|
+
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
12556
12703
|
;
|
12557
12704
|
if($input.length > 0) {
|
12558
12705
|
$input.focus();
|
@@ -12634,7 +12781,7 @@ $.fn.modal = function(parameters) {
|
|
12634
12781
|
? $(document).scrollTop() + settings.padding
|
12635
12782
|
: $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
12636
12783
|
marginLeft: -(module.cache.width / 2)
|
12637
|
-
})
|
12784
|
+
})
|
12638
12785
|
;
|
12639
12786
|
} else {
|
12640
12787
|
$module
|
@@ -12643,7 +12790,7 @@ $.fn.modal = function(parameters) {
|
|
12643
12790
|
? -(module.cache.height / 2)
|
12644
12791
|
: settings.padding / 2,
|
12645
12792
|
marginLeft: -(module.cache.width / 2)
|
12646
|
-
})
|
12793
|
+
})
|
12647
12794
|
;
|
12648
12795
|
}
|
12649
12796
|
module.verbose('Setting modal offset for legacy mode');
|
@@ -12969,11 +13116,19 @@ $.fn.modal.settings = {
|
|
12969
13116
|
// called after deny selector match
|
12970
13117
|
onDeny : function(){ return true; },
|
12971
13118
|
|
13119
|
+
keys : {
|
13120
|
+
space : 32,
|
13121
|
+
enter : 13,
|
13122
|
+
escape : 27,
|
13123
|
+
tab : 9,
|
13124
|
+
},
|
13125
|
+
|
12972
13126
|
selector : {
|
12973
13127
|
title : '> .header',
|
12974
13128
|
content : '> .content',
|
12975
13129
|
actions : '> .actions',
|
12976
13130
|
close : '> .close',
|
13131
|
+
closeIcon: '> .close',
|
12977
13132
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
12978
13133
|
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
12979
13134
|
modal : '.ui.modal',
|
@@ -13009,7 +13164,8 @@ $.fn.modal.settings = {
|
|
13009
13164
|
},
|
13010
13165
|
text: {
|
13011
13166
|
ok : 'Ok',
|
13012
|
-
cancel: 'Cancel'
|
13167
|
+
cancel: 'Cancel',
|
13168
|
+
close : 'Close'
|
13013
13169
|
}
|
13014
13170
|
};
|
13015
13171
|
|
@@ -13098,7 +13254,7 @@ $.fn.modal.settings.templates = {
|
|
13098
13254
|
})( jQuery, window, document );
|
13099
13255
|
|
13100
13256
|
/*!
|
13101
|
-
* # Fomantic-UI 2.9.0-beta.
|
13257
|
+
* # Fomantic-UI 2.9.0-beta.80 - Nag
|
13102
13258
|
* http://github.com/fomantic/Fomantic-UI/
|
13103
13259
|
*
|
13104
13260
|
*
|
@@ -13657,7 +13813,7 @@ $.extend( $.easing, {
|
|
13657
13813
|
})( jQuery, window, document );
|
13658
13814
|
|
13659
13815
|
/*!
|
13660
|
-
* # Fomantic-UI 2.9.0-beta.
|
13816
|
+
* # Fomantic-UI 2.9.0-beta.80 - Popup
|
13661
13817
|
* http://github.com/fomantic/Fomantic-UI/
|
13662
13818
|
*
|
13663
13819
|
*
|
@@ -15199,7 +15355,7 @@ $.fn.popup.settings = {
|
|
15199
15355
|
})( jQuery, window, document );
|
15200
15356
|
|
15201
15357
|
/*!
|
15202
|
-
* # Fomantic-UI 2.9.0-beta.
|
15358
|
+
* # Fomantic-UI 2.9.0-beta.80 - Progress
|
15203
15359
|
* http://github.com/fomantic/Fomantic-UI/
|
15204
15360
|
*
|
15205
15361
|
*
|
@@ -15293,7 +15449,7 @@ $.fn.progress = function(parameters) {
|
|
15293
15449
|
*
|
15294
15450
|
* @param min A minimum value within multiple values
|
15295
15451
|
* @param total A total amount of multiple values
|
15296
|
-
* @returns {number} A
|
15452
|
+
* @returns {number} A precision. Could be 1, 10, 100, ... 1e+10.
|
15297
15453
|
*/
|
15298
15454
|
derivePrecision: function(min, total) {
|
15299
15455
|
var precisionPower = 0
|
@@ -16191,7 +16347,7 @@ $.fn.progress.settings = {
|
|
16191
16347
|
nonNumeric : 'Progress value is non numeric',
|
16192
16348
|
tooHigh : 'Value specified is above 100%',
|
16193
16349
|
tooLow : 'Value specified is below 0%',
|
16194
|
-
sumExceedsTotal : 'Sum of
|
16350
|
+
sumExceedsTotal : 'Sum of multiple values exceed total',
|
16195
16351
|
},
|
16196
16352
|
|
16197
16353
|
regExp: {
|
@@ -16233,7 +16389,7 @@ $.fn.progress.settings = {
|
|
16233
16389
|
})( jQuery, window, document );
|
16234
16390
|
|
16235
16391
|
/*!
|
16236
|
-
* # Fomantic-UI 2.9.0-beta.
|
16392
|
+
* # Fomantic-UI 2.9.0-beta.80 - Slider
|
16237
16393
|
* http://github.com/fomantic/Fomantic-UI/
|
16238
16394
|
*
|
16239
16395
|
*
|
@@ -17572,7 +17728,7 @@ $.fn.slider.settings = {
|
|
17572
17728
|
})( jQuery, window, document );
|
17573
17729
|
|
17574
17730
|
/*!
|
17575
|
-
* # Fomantic-UI 2.9.0-beta.
|
17731
|
+
* # Fomantic-UI 2.9.0-beta.80 - Rating
|
17576
17732
|
* http://github.com/fomantic/Fomantic-UI/
|
17577
17733
|
*
|
17578
17734
|
*
|
@@ -18127,7 +18283,7 @@ $.fn.rating.settings = {
|
|
18127
18283
|
})( jQuery, window, document );
|
18128
18284
|
|
18129
18285
|
/*!
|
18130
|
-
* # Fomantic-UI 2.9.0-beta.
|
18286
|
+
* # Fomantic-UI 2.9.0-beta.80 - Search
|
18131
18287
|
* http://github.com/fomantic/Fomantic-UI/
|
18132
18288
|
*
|
18133
18289
|
*
|
@@ -19695,7 +19851,7 @@ $.fn.search.settings = {
|
|
19695
19851
|
})( jQuery, window, document );
|
19696
19852
|
|
19697
19853
|
/*!
|
19698
|
-
* # Fomantic-UI 2.9.0-beta.
|
19854
|
+
* # Fomantic-UI 2.9.0-beta.80 - Shape
|
19699
19855
|
* http://github.com/fomantic/Fomantic-UI/
|
19700
19856
|
*
|
19701
19857
|
*
|
@@ -20544,7 +20700,7 @@ $.fn.shape.settings = {
|
|
20544
20700
|
})( jQuery, window, document );
|
20545
20701
|
|
20546
20702
|
/*!
|
20547
|
-
* # Fomantic-UI 2.9.0-beta.
|
20703
|
+
* # Fomantic-UI 2.9.0-beta.80 - Sidebar
|
20548
20704
|
* http://github.com/fomantic/Fomantic-UI/
|
20549
20705
|
*
|
20550
20706
|
*
|
@@ -21581,7 +21737,7 @@ $.fn.sidebar.settings = {
|
|
21581
21737
|
})( jQuery, window, document );
|
21582
21738
|
|
21583
21739
|
/*!
|
21584
|
-
* # Fomantic-UI 2.9.0-beta.
|
21740
|
+
* # Fomantic-UI 2.9.0-beta.80 - Sticky
|
21585
21741
|
* http://github.com/fomantic/Fomantic-UI/
|
21586
21742
|
*
|
21587
21743
|
*
|
@@ -22520,7 +22676,7 @@ $.fn.sticky.settings = {
|
|
22520
22676
|
|
22521
22677
|
error : {
|
22522
22678
|
container : 'Sticky element must be inside a relative container',
|
22523
|
-
visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to
|
22679
|
+
visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.',
|
22524
22680
|
method : 'The method you called is not defined.',
|
22525
22681
|
invalidContext : 'Context specified does not exist',
|
22526
22682
|
elementSize : 'Sticky element is larger than its container, cannot create sticky.'
|
@@ -22539,7 +22695,7 @@ $.fn.sticky.settings = {
|
|
22539
22695
|
})( jQuery, window, document );
|
22540
22696
|
|
22541
22697
|
/*!
|
22542
|
-
* # Fomantic-UI 2.9.0-beta.
|
22698
|
+
* # Fomantic-UI 2.9.0-beta.80 - Tab
|
22543
22699
|
* http://github.com/fomantic/Fomantic-UI/
|
22544
22700
|
*
|
22545
22701
|
*
|
@@ -23541,7 +23697,7 @@ $.fn.tab.settings = {
|
|
23541
23697
|
})( jQuery, window, document );
|
23542
23698
|
|
23543
23699
|
/*!
|
23544
|
-
* # Fomantic-UI 2.9.0-beta.
|
23700
|
+
* # Fomantic-UI 2.9.0-beta.80 - Toast
|
23545
23701
|
* http://github.com/fomantic/Fomantic-UI/
|
23546
23702
|
*
|
23547
23703
|
*
|
@@ -23985,7 +24141,7 @@ $.fn.toast = function(parameters) {
|
|
23985
24141
|
has: {
|
23986
24142
|
container: function() {
|
23987
24143
|
module.verbose('Determining if there is already a container');
|
23988
|
-
return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
|
24144
|
+
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);
|
23989
24145
|
},
|
23990
24146
|
toast: function(){
|
23991
24147
|
return !!module.get.toast();
|
@@ -24000,7 +24156,7 @@ $.fn.toast = function(parameters) {
|
|
24000
24156
|
|
24001
24157
|
get: {
|
24002
24158
|
container: function() {
|
24003
|
-
return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
|
24159
|
+
return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')'))[0]);
|
24004
24160
|
},
|
24005
24161
|
toastBox: function() {
|
24006
24162
|
return $toastBox || null;
|
@@ -24434,7 +24590,7 @@ $.extend( $.easing, {
|
|
24434
24590
|
})( jQuery, window, document );
|
24435
24591
|
|
24436
24592
|
/*!
|
24437
|
-
* # Fomantic-UI 2.9.0-beta.
|
24593
|
+
* # Fomantic-UI 2.9.0-beta.80 - Transition
|
24438
24594
|
* http://github.com/fomantic/Fomantic-UI/
|
24439
24595
|
*
|
24440
24596
|
*
|
@@ -25532,7 +25688,7 @@ $.fn.transition.settings = {
|
|
25532
25688
|
|
25533
25689
|
// possible errors
|
25534
25690
|
error: {
|
25535
|
-
noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to
|
25691
|
+
noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
|
25536
25692
|
repeated : 'That animation is already occurring, cancelling repeated animation',
|
25537
25693
|
method : 'The method you called is not defined',
|
25538
25694
|
support : 'This browser does not support CSS animations'
|
@@ -25544,7 +25700,7 @@ $.fn.transition.settings = {
|
|
25544
25700
|
})( jQuery, window, document );
|
25545
25701
|
|
25546
25702
|
/*!
|
25547
|
-
* # Fomantic-UI 2.9.0-beta.
|
25703
|
+
* # Fomantic-UI 2.9.0-beta.80 - API
|
25548
25704
|
* http://github.com/fomantic/Fomantic-UI/
|
25549
25705
|
*
|
25550
25706
|
*
|
@@ -25677,7 +25833,7 @@ $.api = $.fn.api = function(parameters) {
|
|
25677
25833
|
response = JSON.parse(response);
|
25678
25834
|
}
|
25679
25835
|
catch(e) {
|
25680
|
-
//
|
25836
|
+
// isn't json string
|
25681
25837
|
}
|
25682
25838
|
}
|
25683
25839
|
return response;
|
@@ -25693,8 +25849,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25693
25849
|
module.error(error.noStorage);
|
25694
25850
|
return;
|
25695
25851
|
}
|
25696
|
-
response = sessionStorage.getItem(url);
|
25697
|
-
module.debug('Using cached response', url, response);
|
25852
|
+
response = sessionStorage.getItem(url + module.get.normalizedData());
|
25853
|
+
module.debug('Using cached response', url, settings.data, response);
|
25698
25854
|
response = module.decode.json(response);
|
25699
25855
|
return response;
|
25700
25856
|
}
|
@@ -25712,8 +25868,8 @@ $.api = $.fn.api = function(parameters) {
|
|
25712
25868
|
if( $.isPlainObject(response) ) {
|
25713
25869
|
response = JSON.stringify(response);
|
25714
25870
|
}
|
25715
|
-
sessionStorage.setItem(url, response);
|
25716
|
-
module.verbose('Storing cached response for url', url, response);
|
25871
|
+
sessionStorage.setItem(url + module.get.normalizedData(), response);
|
25872
|
+
module.verbose('Storing cached response for url', url, settings.data, response);
|
25717
25873
|
}
|
25718
25874
|
},
|
25719
25875
|
|
@@ -25879,10 +26035,6 @@ $.api = $.fn.api = function(parameters) {
|
|
25879
26035
|
cancelled: function() {
|
25880
26036
|
return (module.cancelled || false);
|
25881
26037
|
},
|
25882
|
-
succesful: function() {
|
25883
|
-
module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
|
25884
|
-
return module.was.successful();
|
25885
|
-
},
|
25886
26038
|
successful: function() {
|
25887
26039
|
return (module.request && module.request.state() == 'resolved');
|
25888
26040
|
},
|
@@ -25974,25 +26126,29 @@ $.api = $.fn.api = function(parameters) {
|
|
25974
26126
|
},
|
25975
26127
|
formData: function(data) {
|
25976
26128
|
var
|
25977
|
-
|
25978
|
-
formData = (canSerialize)
|
25979
|
-
? $form.serializeObject()
|
25980
|
-
: $form.serialize(),
|
26129
|
+
formData = {},
|
25981
26130
|
hasOtherData
|
25982
26131
|
;
|
25983
26132
|
data = data || settings.data;
|
25984
26133
|
hasOtherData = $.isPlainObject(data);
|
25985
26134
|
|
25986
|
-
|
25987
|
-
|
25988
|
-
|
25989
|
-
|
25990
|
-
|
25991
|
-
|
25992
|
-
|
25993
|
-
|
25994
|
-
|
26135
|
+
$.each($form.serializeArray(), function (i, element) {
|
26136
|
+
var node = formData[element.name];
|
26137
|
+
|
26138
|
+
if ('undefined' !== typeof node && node !== null) {
|
26139
|
+
if (Array.isArray(node)) {
|
26140
|
+
node.push(element.value);
|
26141
|
+
} else {
|
26142
|
+
formData[element.name] = [node, element.value];
|
26143
|
+
}
|
26144
|
+
} else {
|
26145
|
+
formData[element.name] = element.value;
|
25995
26146
|
}
|
26147
|
+
});
|
26148
|
+
|
26149
|
+
if(hasOtherData) {
|
26150
|
+
module.debug('Extending existing data with form data', data, formData);
|
26151
|
+
data = $.extend(true, {}, data, formData);
|
25996
26152
|
}
|
25997
26153
|
else {
|
25998
26154
|
module.debug('Adding form data', formData);
|
@@ -26243,6 +26399,9 @@ $.api = $.fn.api = function(parameters) {
|
|
26243
26399
|
},
|
26244
26400
|
|
26245
26401
|
get: {
|
26402
|
+
normalizedData: function(){
|
26403
|
+
return typeof settings.data === "string" ? settings.data : JSON.stringify(settings.data, Object.keys(settings.data).sort());
|
26404
|
+
},
|
26246
26405
|
responseFromXHR: function(xhr) {
|
26247
26406
|
return $.isPlainObject(xhr)
|
26248
26407
|
? (module.is.expectingJSON())
|
@@ -26686,7 +26845,6 @@ $.api.settings = {
|
|
26686
26845
|
legacyParameters : 'You are using legacy API success callback names',
|
26687
26846
|
method : 'The method you called is not defined',
|
26688
26847
|
missingAction : 'API action used but no url was defined',
|
26689
|
-
missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object',
|
26690
26848
|
missingURL : 'No URL specified for api event',
|
26691
26849
|
noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.',
|
26692
26850
|
noStorage : 'Caching responses locally requires session storage',
|
@@ -26722,7 +26880,7 @@ $.api.settings = {
|
|
26722
26880
|
})( jQuery, window, document );
|
26723
26881
|
|
26724
26882
|
/*!
|
26725
|
-
* # Fomantic-UI 2.9.0-beta.
|
26883
|
+
* # Fomantic-UI 2.9.0-beta.80 - State
|
26726
26884
|
* http://github.com/fomantic/Fomantic-UI/
|
26727
26885
|
*
|
26728
26886
|
*
|
@@ -27434,7 +27592,7 @@ $.fn.state.settings = {
|
|
27434
27592
|
})( jQuery, window, document );
|
27435
27593
|
|
27436
27594
|
/*!
|
27437
|
-
* # Fomantic-UI 2.9.0-beta.
|
27595
|
+
* # Fomantic-UI 2.9.0-beta.80 - Visibility
|
27438
27596
|
* http://github.com/fomantic/Fomantic-UI/
|
27439
27597
|
*
|
27440
27598
|
*
|
@@ -28672,7 +28830,7 @@ $.fn.visibility.settings = {
|
|
28672
28830
|
// callback should only occur one time
|
28673
28831
|
once : true,
|
28674
28832
|
|
28675
|
-
// callback should fire continuously
|
28833
|
+
// callback should fire continuously when evaluates to true
|
28676
28834
|
continuous : false,
|
28677
28835
|
|
28678
28836
|
// offset to use with scroll top
|