fomantic-ui 2.9.4-beta.1 → 2.9.4-beta.100
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 +29 -1
- package/.eslintrc.js +17 -0
- package/.github/FUNDING.yml +1 -1
- package/.github/workflows/ci.yml +8 -8
- package/.github/workflows/depsreview.yml +14 -0
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CONTRIBUTORS.md +5 -0
- package/README.md +2 -12
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +7 -3
- 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 +21 -3
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +47 -12
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +3 -3
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +10 -4
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +3 -3
- package/dist/components/comment.css +1 -1
- 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 +7 -3
- package/dist/components/dimmer.js +4 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +46 -40
- package/dist/components/dropdown.js +110 -35
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +17 -7
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +3 -3
- package/dist/components/emoji.css +4309 -3713
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +12 -1
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +3 -1
- package/dist/components/flag.min.css +2 -2
- package/dist/components/flyout.css +3 -3
- package/dist/components/flyout.js +4 -2
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +28 -7
- package/dist/components/form.js +74 -29
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +5 -5
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +4 -1
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +30 -10
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +7 -2
- package/dist/components/label.min.css +2 -2
- 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 +1 -2
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +2 -1
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +3 -3
- package/dist/components/modal.js +7 -3
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +11 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +3 -3
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +10 -4
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +15 -6
- package/dist/components/progress.js +4 -2
- package/dist/components/progress.min.css +2 -2
- 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 +1 -1
- package/dist/components/rating.js +4 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +34 -23
- package/dist/components/search.js +78 -14
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +7 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +3 -3
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +4 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +14 -6
- package/dist/components/site.js +4 -2
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +152 -2
- package/dist/components/slider.js +142 -44
- package/dist/components/slider.min.css +2 -2
- package/dist/components/slider.min.js +3 -3
- package/dist/components/state.js +4 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +992 -86
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +4 -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 +4 -2
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +32 -21
- 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 +1 -1
- package/dist/components/toast.js +7 -3
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +3 -3
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +7 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +4 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +6226 -3986
- package/dist/semantic.js +580 -195
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- package/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/dist/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/dist/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/dist/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/package.json +14 -14
- package/semantic.json.example +1 -1
- package/src/definitions/behaviors/api.js +6 -2
- package/src/definitions/behaviors/form.js +73 -28
- package/src/definitions/behaviors/state.js +3 -1
- package/src/definitions/behaviors/visibility.js +3 -1
- package/src/definitions/collections/form.less +56 -27
- package/src/definitions/collections/grid.less +85 -70
- package/src/definitions/collections/menu.less +38 -27
- package/src/definitions/collections/message.less +1 -0
- package/src/definitions/collections/table.less +183 -157
- package/src/definitions/elements/button.less +61 -25
- package/src/definitions/elements/container.less +6 -4
- package/src/definitions/elements/divider.less +4 -1
- package/src/definitions/elements/emoji.less +3 -1
- package/src/definitions/elements/header.less +12 -4
- package/src/definitions/elements/icon.less +35 -28
- package/src/definitions/elements/input.less +35 -19
- package/src/definitions/elements/label.less +19 -8
- package/src/definitions/elements/list.less +28 -21
- package/src/definitions/elements/loader.less +17 -12
- package/src/definitions/elements/segment.less +12 -7
- package/src/definitions/elements/step.less +405 -87
- package/src/definitions/globals/site.js +3 -1
- package/src/definitions/globals/site.less +17 -12
- package/src/definitions/modules/accordion.js +3 -1
- package/src/definitions/modules/accordion.less +15 -13
- package/src/definitions/modules/calendar.js +46 -11
- package/src/definitions/modules/calendar.less +6 -4
- package/src/definitions/modules/checkbox.js +9 -3
- package/src/definitions/modules/checkbox.less +12 -6
- package/src/definitions/modules/dimmer.js +3 -1
- package/src/definitions/modules/dimmer.less +16 -10
- package/src/definitions/modules/dropdown.js +109 -34
- package/src/definitions/modules/dropdown.less +109 -78
- package/src/definitions/modules/embed.js +16 -6
- package/src/definitions/modules/flyout.js +3 -1
- package/src/definitions/modules/flyout.less +51 -45
- package/src/definitions/modules/modal.js +6 -2
- package/src/definitions/modules/modal.less +109 -82
- package/src/definitions/modules/nag.js +10 -4
- package/src/definitions/modules/nag.less +8 -4
- package/src/definitions/modules/popup.js +9 -3
- package/src/definitions/modules/popup.less +3 -1
- package/src/definitions/modules/progress.js +3 -1
- package/src/definitions/modules/progress.less +24 -6
- package/src/definitions/modules/rating.js +3 -1
- package/src/definitions/modules/search.js +77 -13
- package/src/definitions/modules/search.less +41 -25
- package/src/definitions/modules/shape.js +6 -4
- package/src/definitions/modules/sidebar.js +3 -1
- package/src/definitions/modules/slider.js +141 -43
- package/src/definitions/modules/slider.less +129 -27
- package/src/definitions/modules/sticky.js +3 -1
- package/src/definitions/modules/tab.js +3 -1
- package/src/definitions/modules/toast.js +6 -2
- package/src/definitions/modules/toast.less +35 -24
- package/src/definitions/modules/transition.js +6 -2
- package/src/definitions/views/card.less +7 -5
- package/src/definitions/views/feed.less +14 -1
- package/src/definitions/views/item.less +7 -5
- package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/src/themes/default/collections/form.variables +1 -0
- package/src/themes/default/elements/button.variables +3 -0
- package/src/themes/default/elements/emoji.variables +172 -23
- package/src/themes/default/elements/flag.variables +3 -3
- package/src/themes/default/elements/step.variables +33 -0
- package/src/themes/default/globals/site.variables +3 -0
- package/src/themes/default/globals/variation.variables +24 -2
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/progress.variables +1 -1
- package/src/themes/default/modules/search.variables +15 -12
- package/src/themes/default/modules/slider.variables +10 -0
- package/src/themes/default/views/feed.variables +3 -0
- package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/src/themes/joypixels/elements/emoji.variables +183 -22
- package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/tasks/admin/components/create.js +4 -4
- package/tasks/admin/components/init.js +2 -2
- package/tasks/admin/components/update.js +3 -3
- package/tasks/admin/distributions/create.js +3 -3
- package/tasks/admin/distributions/init.js +2 -2
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +19 -10
- package/tasks/build/javascript.js +12 -5
- package/tasks/check-install.js +1 -1
- package/tasks/config/defaults.js +4 -0
- package/tasks/config/project/release.js +19 -1
- package/tasks/config/tasks.js +7 -7
- package/tasks/docs/build.js +3 -3
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +3 -1
- package/tasks/install.js +2 -2
- package/tasks/watch.js +1 -1
- package/types/fomantic-ui-accordion.d.ts +1 -1
- package/types/fomantic-ui-api.d.ts +9 -3
- package/types/fomantic-ui-calendar.d.ts +114 -13
- package/types/fomantic-ui-checkbox.d.ts +14 -4
- package/types/fomantic-ui-dimmer.d.ts +1 -1
- package/types/fomantic-ui-dropdown.d.ts +82 -44
- package/types/fomantic-ui-embed.d.ts +19 -2
- package/types/fomantic-ui-flyout.d.ts +25 -11
- package/types/fomantic-ui-form.d.ts +128 -20
- package/types/fomantic-ui-modal.d.ts +101 -5
- package/types/fomantic-ui-nag.d.ts +4 -4
- package/types/fomantic-ui-popup.d.ts +38 -12
- package/types/fomantic-ui-progress.d.ts +12 -6
- package/types/fomantic-ui-rating.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +138 -22
- package/types/fomantic-ui-shape.d.ts +2 -2
- package/types/fomantic-ui-sidebar.d.ts +4 -4
- package/types/fomantic-ui-slider.d.ts +56 -4
- package/types/fomantic-ui-sticky.d.ts +1 -1
- package/types/fomantic-ui-tab.d.ts +6 -6
- package/types/fomantic-ui-toast.d.ts +14 -2
- package/types/fomantic-ui-transition.d.ts +41 -7
- package/types/fomantic-ui-visibility.d.ts +3 -3
- package/types/index.d.ts +25 -25
- package/types/tests.ts +188 -0
- package/types/tsconfig.json +1 -1
- package/types/fomantic-ui-tests.ts +0 -25
package/dist/semantic.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.4-beta.
|
2
|
+
* # Fomantic UI - 2.9.4-beta.100+7f5f82a
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
6
|
-
* Copyright
|
6
|
+
* Copyright 2025 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
11
|
/*!
|
12
|
-
* # Fomantic-UI 2.9.4-beta.
|
12
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Site
|
13
13
|
* https://github.com/fomantic/Fomantic-UI/
|
14
14
|
*
|
15
15
|
*
|
@@ -302,7 +302,9 @@
|
|
302
302
|
});
|
303
303
|
}
|
304
304
|
clearTimeout(module.performance.timer);
|
305
|
-
module.performance.timer = setTimeout(function () {
|
305
|
+
module.performance.timer = setTimeout(function () {
|
306
|
+
module.performance.display();
|
307
|
+
}, 500);
|
306
308
|
},
|
307
309
|
display: function () {
|
308
310
|
var
|
@@ -463,7 +465,7 @@
|
|
463
465
|
})(jQuery, window, document);
|
464
466
|
|
465
467
|
/*!
|
466
|
-
* # Fomantic-UI 2.9.4-beta.
|
468
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Form Validation
|
467
469
|
* https://github.com/fomantic/Fomantic-UI/
|
468
470
|
*
|
469
471
|
*
|
@@ -502,6 +504,7 @@
|
|
502
504
|
element = this,
|
503
505
|
|
504
506
|
formErrors = [],
|
507
|
+
formErrorsTracker = {},
|
505
508
|
keyHeldDown = false,
|
506
509
|
|
507
510
|
// set at run-time
|
@@ -1002,6 +1005,13 @@
|
|
1002
1005
|
fullFields[name].rules.push({ type: rule });
|
1003
1006
|
});
|
1004
1007
|
}
|
1008
|
+
|
1009
|
+
$.each(fullFields[name].rules, function (index, rule) {
|
1010
|
+
var ruleName = module.get.ruleName(rule);
|
1011
|
+
if (ruleName === 'empty') {
|
1012
|
+
module.warn('*** DEPRECATED *** : Rule "empty" for field "' + name + '" will be removed in a future version. -> Use "notEmpty" rule instead.');
|
1013
|
+
}
|
1014
|
+
});
|
1005
1015
|
});
|
1006
1016
|
|
1007
1017
|
return fullFields;
|
@@ -1015,9 +1025,10 @@
|
|
1015
1025
|
ancillary = module.get.ancillaryValue(rule),
|
1016
1026
|
$field = module.get.field(field.identifier),
|
1017
1027
|
value = $field.val(),
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1028
|
+
promptCheck = rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
|
1029
|
+
prompt = String(isFunction(promptCheck)
|
1030
|
+
? promptCheck.call($field[0], value)
|
1031
|
+
: promptCheck),
|
1021
1032
|
requiresValue = prompt.search('{value}') !== -1,
|
1022
1033
|
requiresName = prompt.search('{name}') !== -1,
|
1023
1034
|
parts,
|
@@ -1055,10 +1066,10 @@
|
|
1055
1066
|
},
|
1056
1067
|
settings: function () {
|
1057
1068
|
if ($.isPlainObject(parameters)) {
|
1058
|
-
if (parameters.fields) {
|
1059
|
-
parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
|
1060
|
-
}
|
1061
1069
|
settings = $.extend(true, {}, $.fn.form.settings, parameters);
|
1070
|
+
if (settings.fields) {
|
1071
|
+
settings.fields = module.get.fieldsFromShorthand(settings.fields);
|
1072
|
+
}
|
1062
1073
|
validation = $.extend(true, {}, $.fn.form.settings.defaults, settings.fields);
|
1063
1074
|
module.verbose('Extending settings', validation, settings);
|
1064
1075
|
} else {
|
@@ -1083,7 +1094,7 @@
|
|
1083
1094
|
// refresh selector cache
|
1084
1095
|
(instance || module).refresh();
|
1085
1096
|
},
|
1086
|
-
field: function (identifier, strict) {
|
1097
|
+
field: function (identifier, strict, ignoreMissing) {
|
1087
1098
|
module.verbose('Finding field with identifier', identifier);
|
1088
1099
|
identifier = module.escape.string(identifier);
|
1089
1100
|
var t;
|
@@ -1103,7 +1114,9 @@
|
|
1103
1114
|
if (t.length > 0) {
|
1104
1115
|
return t;
|
1105
1116
|
}
|
1106
|
-
|
1117
|
+
if (!ignoreMissing) {
|
1118
|
+
module.error(error.noField.replace('{identifier}', identifier));
|
1119
|
+
}
|
1107
1120
|
|
1108
1121
|
return strict ? $() : $('<input/>');
|
1109
1122
|
},
|
@@ -1173,7 +1186,7 @@
|
|
1173
1186
|
var
|
1174
1187
|
$field = $(field),
|
1175
1188
|
$calendar = $field.closest(selector.uiCalendar),
|
1176
|
-
name = $field.prop('name'),
|
1189
|
+
name = $field.prop('name') || $field.prop('id'),
|
1177
1190
|
value = $field.val(),
|
1178
1191
|
isCheckbox = $field.is(selector.checkbox),
|
1179
1192
|
isRadio = $field.is(selector.radio),
|
@@ -1281,10 +1294,10 @@
|
|
1281
1294
|
|
1282
1295
|
has: {
|
1283
1296
|
|
1284
|
-
field: function (identifier) {
|
1297
|
+
field: function (identifier, ignoreMissing) {
|
1285
1298
|
module.verbose('Checking for existence of a field with identifier', identifier);
|
1286
1299
|
|
1287
|
-
return module.get.field(identifier, true).length > 0;
|
1300
|
+
return module.get.field(identifier, true, ignoreMissing).length > 0;
|
1288
1301
|
},
|
1289
1302
|
|
1290
1303
|
},
|
@@ -1402,7 +1415,7 @@
|
|
1402
1415
|
$prompt.css('display', 'none');
|
1403
1416
|
}
|
1404
1417
|
$prompt
|
1405
|
-
.appendTo($fieldGroup)
|
1418
|
+
.appendTo($fieldGroup.filter('.' + className.error))
|
1406
1419
|
;
|
1407
1420
|
}
|
1408
1421
|
$prompt
|
@@ -1484,7 +1497,7 @@
|
|
1484
1497
|
}
|
1485
1498
|
if (rule === undefined) {
|
1486
1499
|
module.debug('Removed all rules');
|
1487
|
-
if (module.has.field(field)) {
|
1500
|
+
if (module.has.field(field, true)) {
|
1488
1501
|
validation[field].rules = [];
|
1489
1502
|
} else {
|
1490
1503
|
delete validation[field];
|
@@ -1685,7 +1698,7 @@
|
|
1685
1698
|
module.debug('Enabling auto check on required fields');
|
1686
1699
|
if (validation) {
|
1687
1700
|
$.each(validation, function (fieldName) {
|
1688
|
-
if (!module.has.field(fieldName)) {
|
1701
|
+
if (!module.has.field(fieldName, true)) {
|
1689
1702
|
module.verbose('Field not found, removing from validation', fieldName);
|
1690
1703
|
module.remove.field(fieldName);
|
1691
1704
|
}
|
@@ -1699,20 +1712,20 @@
|
|
1699
1712
|
isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required),
|
1700
1713
|
isDisabled = $el.is(':disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled),
|
1701
1714
|
validation = module.get.validation($el),
|
1702
|
-
|
1715
|
+
hasNotEmptyRule = validation
|
1703
1716
|
? $.grep(validation.rules, function (rule) {
|
1704
|
-
return rule.type
|
1705
|
-
})
|
1717
|
+
return ['notEmpty', 'checked', 'empty'].indexOf(rule.type) >= 0;
|
1718
|
+
}).length > 0
|
1706
1719
|
: false,
|
1707
1720
|
identifier = module.get.identifier(validation, $el)
|
1708
1721
|
;
|
1709
|
-
if (isRequired && !isDisabled && !
|
1722
|
+
if (isRequired && !isDisabled && !hasNotEmptyRule && identifier !== undefined) {
|
1710
1723
|
if (isCheckbox) {
|
1711
1724
|
module.verbose("Adding 'checked' rule on field", identifier);
|
1712
1725
|
module.add.rule(identifier, 'checked');
|
1713
1726
|
} else {
|
1714
|
-
module.verbose("Adding '
|
1715
|
-
module.add.rule(identifier, '
|
1727
|
+
module.verbose("Adding 'notEmpty' rule on field", identifier);
|
1728
|
+
module.add.rule(identifier, 'notEmpty');
|
1716
1729
|
}
|
1717
1730
|
}
|
1718
1731
|
});
|
@@ -1739,6 +1752,7 @@
|
|
1739
1752
|
$module.removeClass(className.initial);
|
1740
1753
|
// reset errors
|
1741
1754
|
formErrors = [];
|
1755
|
+
formErrorsTracker = {};
|
1742
1756
|
if (module.determine.isValid()) {
|
1743
1757
|
module.debug('Form has no validation errors, submitting');
|
1744
1758
|
module.set.success();
|
@@ -1804,28 +1818,30 @@
|
|
1804
1818
|
var
|
1805
1819
|
identifier = field.identifier || fieldName,
|
1806
1820
|
$field = module.get.field(identifier),
|
1821
|
+
$fieldGroup = $field.closest($group),
|
1807
1822
|
$dependsField = field.depends
|
1808
1823
|
? module.get.field(field.depends)
|
1809
1824
|
: false,
|
1810
1825
|
fieldValid = true,
|
1811
1826
|
fieldErrors = [],
|
1812
|
-
isDisabled = $field.filter(':not(:disabled)').length === 0,
|
1827
|
+
isDisabled = $field.filter(':not(:disabled)').length === 0 || $fieldGroup.hasClass(className.disabled) || $fieldGroup.parent().hasClass(className.disabled),
|
1813
1828
|
validationMessage = $field[0].validationMessage,
|
1829
|
+
noNativeValidation = field.noNativeValidation || settings.noNativeValidation || $field.filter('[formnovalidate],[novalidate]').length > 0 || $module.filter('[novalidate]').length > 0,
|
1814
1830
|
errorLimit
|
1815
1831
|
;
|
1816
1832
|
if (!field.identifier) {
|
1817
1833
|
module.debug('Using field name as identifier', identifier);
|
1818
1834
|
field.identifier = identifier;
|
1819
1835
|
}
|
1820
|
-
if (validationMessage) {
|
1836
|
+
if (validationMessage && !noNativeValidation && !isDisabled) {
|
1821
1837
|
module.debug('Field is natively invalid', identifier);
|
1822
1838
|
fieldErrors.push(validationMessage);
|
1823
1839
|
fieldValid = false;
|
1824
1840
|
if (showErrors) {
|
1825
|
-
$
|
1841
|
+
$fieldGroup.addClass(className.error);
|
1826
1842
|
}
|
1827
1843
|
} else if (showErrors) {
|
1828
|
-
$
|
1844
|
+
$fieldGroup.removeClass(className.error);
|
1829
1845
|
}
|
1830
1846
|
if (isDisabled) {
|
1831
1847
|
module.debug('Field is disabled. Skipping', identifier);
|
@@ -1840,7 +1856,22 @@
|
|
1840
1856
|
var invalidFields = module.validate.rule(field, rule, true) || [];
|
1841
1857
|
if (invalidFields.length > 0) {
|
1842
1858
|
module.debug('Field is invalid', identifier, rule.type);
|
1843
|
-
|
1859
|
+
var fieldError = module.get.prompt(rule, field);
|
1860
|
+
if (!settings.inline) {
|
1861
|
+
if (
|
1862
|
+
// Always allow the first error prompt for new field identifiers
|
1863
|
+
(!(identifier in formErrorsTracker)
|
1864
|
+
// Also allow multiple error prompts per field identifier but make sure each prompt is unique
|
1865
|
+
|| formErrorsTracker[identifier].indexOf(fieldError) === -1)
|
1866
|
+
// Limit the number of unique error prompts for every field identifier if specified
|
1867
|
+
&& (!errorLimit || (formErrorsTracker[identifier] || []).length < errorLimit)
|
1868
|
+
) {
|
1869
|
+
fieldErrors.push(fieldError);
|
1870
|
+
(formErrorsTracker[identifier] = formErrorsTracker[identifier] || []).push(fieldError);
|
1871
|
+
}
|
1872
|
+
} else {
|
1873
|
+
fieldErrors.push(fieldError);
|
1874
|
+
}
|
1844
1875
|
fieldValid = false;
|
1845
1876
|
if (showErrors) {
|
1846
1877
|
$(invalidFields).closest($group).addClass(className.error);
|
@@ -1855,7 +1886,7 @@
|
|
1855
1886
|
settings.onValid.call($field);
|
1856
1887
|
}
|
1857
1888
|
} else {
|
1858
|
-
if (showErrors) {
|
1889
|
+
if (showErrors && fieldErrors.length > 0) {
|
1859
1890
|
formErrors = formErrors.concat(fieldErrors);
|
1860
1891
|
module.add.prompt(identifier, fieldErrors, true);
|
1861
1892
|
settings.onInvalid.call($field, fieldErrors);
|
@@ -1953,6 +1984,12 @@
|
|
1953
1984
|
module.error.apply(console, arguments);
|
1954
1985
|
}
|
1955
1986
|
},
|
1987
|
+
warn: function () {
|
1988
|
+
if (!settings.silent) {
|
1989
|
+
module.warn = Function.prototype.bind.call(console.warn, console, settings.name + ':');
|
1990
|
+
module.warn.apply(console, arguments);
|
1991
|
+
}
|
1992
|
+
},
|
1956
1993
|
performance: {
|
1957
1994
|
log: function (message) {
|
1958
1995
|
var
|
@@ -1973,7 +2010,9 @@
|
|
1973
2010
|
});
|
1974
2011
|
}
|
1975
2012
|
clearTimeout(module.performance.timer);
|
1976
|
-
module.performance.timer = setTimeout(function () {
|
2013
|
+
module.performance.timer = setTimeout(function () {
|
2014
|
+
module.performance.display();
|
2015
|
+
}, 500);
|
1977
2016
|
},
|
1978
2017
|
display: function () {
|
1979
2018
|
var
|
@@ -2067,6 +2106,7 @@
|
|
2067
2106
|
name: 'Form',
|
2068
2107
|
namespace: 'form',
|
2069
2108
|
|
2109
|
+
silent: false,
|
2070
2110
|
debug: false,
|
2071
2111
|
verbose: false,
|
2072
2112
|
performance: true,
|
@@ -2089,6 +2129,7 @@
|
|
2089
2129
|
errorFocus: true,
|
2090
2130
|
dateHandling: 'date', // 'date', 'input', 'formatter'
|
2091
2131
|
errorLimit: 0,
|
2132
|
+
noNativeValidation: false,
|
2092
2133
|
|
2093
2134
|
onValid: function () {},
|
2094
2135
|
onInvalid: function () {},
|
@@ -2131,6 +2172,7 @@
|
|
2131
2172
|
maxValue: '{name} must have a maximum value of {ruleValue}',
|
2132
2173
|
minValue: '{name} must have a minimum value of {ruleValue}',
|
2133
2174
|
empty: '{name} must have a value',
|
2175
|
+
notEmpty: '{name} must have a value',
|
2134
2176
|
checked: '{name} must be checked',
|
2135
2177
|
email: '{name} must be a valid e-mail',
|
2136
2178
|
url: '{name} must be a valid url',
|
@@ -2263,10 +2305,15 @@
|
|
2263
2305
|
rules: {
|
2264
2306
|
|
2265
2307
|
// is not empty or blank string
|
2266
|
-
|
2308
|
+
notEmpty: function (value) {
|
2267
2309
|
return !(value === undefined || value === '' || (Array.isArray(value) && value.length === 0));
|
2268
2310
|
},
|
2269
2311
|
|
2312
|
+
/* Deprecated */
|
2313
|
+
empty: function (value) {
|
2314
|
+
return $.fn.form.settings.rules.notEmpty(value);
|
2315
|
+
},
|
2316
|
+
|
2270
2317
|
// checkbox checked
|
2271
2318
|
checked: function () {
|
2272
2319
|
return $(this).filter(':checked').length > 0;
|
@@ -2618,7 +2665,7 @@
|
|
2618
2665
|
})(jQuery, window, document);
|
2619
2666
|
|
2620
2667
|
/*!
|
2621
|
-
* # Fomantic-UI 2.9.4-beta.
|
2668
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Accordion
|
2622
2669
|
* https://github.com/fomantic/Fomantic-UI/
|
2623
2670
|
*
|
2624
2671
|
*
|
@@ -3057,7 +3104,9 @@
|
|
3057
3104
|
});
|
3058
3105
|
}
|
3059
3106
|
clearTimeout(module.performance.timer);
|
3060
|
-
module.performance.timer = setTimeout(function () {
|
3107
|
+
module.performance.timer = setTimeout(function () {
|
3108
|
+
module.performance.display();
|
3109
|
+
}, 500);
|
3061
3110
|
},
|
3062
3111
|
display: function () {
|
3063
3112
|
var
|
@@ -3212,7 +3261,7 @@
|
|
3212
3261
|
})(jQuery, window, document);
|
3213
3262
|
|
3214
3263
|
/*!
|
3215
|
-
* # Fomantic-UI 2.9.4-beta.
|
3264
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Calendar
|
3216
3265
|
* https://github.com/fomantic/Fomantic-UI/
|
3217
3266
|
*
|
3218
3267
|
*
|
@@ -3315,7 +3364,17 @@
|
|
3315
3364
|
|
3316
3365
|
destroy: function () {
|
3317
3366
|
module.verbose('Destroying previous calendar for', element);
|
3318
|
-
$module.removeData(
|
3367
|
+
$module.removeData([
|
3368
|
+
metadata.date,
|
3369
|
+
metadata.focusDate,
|
3370
|
+
metadata.startDate,
|
3371
|
+
metadata.endDate,
|
3372
|
+
metadata.minDate,
|
3373
|
+
metadata.maxDate,
|
3374
|
+
metadata.mode,
|
3375
|
+
metadata.monthOffset,
|
3376
|
+
moduleNamespace,
|
3377
|
+
]);
|
3319
3378
|
module.unbind.events();
|
3320
3379
|
module.disconnect.classObserver();
|
3321
3380
|
},
|
@@ -4005,24 +4064,32 @@
|
|
4005
4064
|
formattedDate: function (format, date) {
|
4006
4065
|
return module.helper.dateFormat(format || formatter[settings.type], date || module.get.date());
|
4007
4066
|
},
|
4008
|
-
date: function () {
|
4009
|
-
return module.helper.
|
4067
|
+
date: function (format) {
|
4068
|
+
return module.helper.dateObjectOrFormatted(format, $module.data(metadata.date));
|
4010
4069
|
},
|
4011
4070
|
inputDate: function () {
|
4012
4071
|
return $input.val();
|
4013
4072
|
},
|
4014
|
-
focusDate: function () {
|
4015
|
-
return $module.data(metadata.focusDate)
|
4073
|
+
focusDate: function (format) {
|
4074
|
+
return module.helper.dateObjectOrFormatted(format, $module.data(metadata.focusDate));
|
4016
4075
|
},
|
4017
|
-
startDate: function () {
|
4076
|
+
startDate: function (format) {
|
4018
4077
|
var startModule = module.get.calendarModule(settings.startCalendar);
|
4019
4078
|
|
4020
|
-
|
4079
|
+
if (startModule) {
|
4080
|
+
return startModule.get.date(format);
|
4081
|
+
}
|
4082
|
+
|
4083
|
+
return module.helper.dateObjectOrFormatted(format, $module.data(metadata.startDate));
|
4021
4084
|
},
|
4022
|
-
endDate: function () {
|
4085
|
+
endDate: function (format) {
|
4023
4086
|
var endModule = module.get.calendarModule(settings.endCalendar);
|
4024
4087
|
|
4025
|
-
|
4088
|
+
if (endModule) {
|
4089
|
+
return endModule.get.date(format);
|
4090
|
+
}
|
4091
|
+
|
4092
|
+
return module.helper.dateObjectOrFormatted(format, $module.data(metadata.endDate));
|
4026
4093
|
},
|
4027
4094
|
minDate: function () {
|
4028
4095
|
return $module.data(metadata.minDate) || null;
|
@@ -4338,6 +4405,20 @@
|
|
4338
4405
|
return match.slice(1, -1);
|
4339
4406
|
});
|
4340
4407
|
},
|
4408
|
+
dateObjectOrFormatted: function (format, date) {
|
4409
|
+
format = format || '';
|
4410
|
+
date = module.helper.sanitiseDate(date) || null;
|
4411
|
+
|
4412
|
+
if (!date) {
|
4413
|
+
return null;
|
4414
|
+
}
|
4415
|
+
|
4416
|
+
if (format === '') {
|
4417
|
+
return date;
|
4418
|
+
}
|
4419
|
+
|
4420
|
+
return module.helper.dateFormat(format, date);
|
4421
|
+
},
|
4341
4422
|
isDisabled: function (date, mode) {
|
4342
4423
|
return (mode === 'day' || mode === 'month' || mode === 'year' || mode === 'hour') && (((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function (d) {
|
4343
4424
|
var blocked = false;
|
@@ -4692,7 +4773,9 @@
|
|
4692
4773
|
});
|
4693
4774
|
}
|
4694
4775
|
clearTimeout(module.performance.timer);
|
4695
|
-
module.performance.timer = setTimeout(function () {
|
4776
|
+
module.performance.timer = setTimeout(function () {
|
4777
|
+
module.performance.display();
|
4778
|
+
}, 500);
|
4696
4779
|
},
|
4697
4780
|
display: function () {
|
4698
4781
|
var
|
@@ -4900,7 +4983,8 @@
|
|
4900
4983
|
text = settings.monthFirst || !/^\d{1,2}[./-]/.test(text) ? text : text.replace(/[./-]/g, '/').replace(/(\d+)\/(\d+)/, '$2/$1');
|
4901
4984
|
var textDate = new Date(text);
|
4902
4985
|
var numberOnly = text.match(/^\d+$/) !== null;
|
4903
|
-
|
4986
|
+
var isShortYear = text.match(/^(?:\d{1,2}[./-]){2}\d{1,2}$/) !== null;
|
4987
|
+
if (!isShortYear && !numberOnly && !isNaN(textDate.getDate())) {
|
4904
4988
|
return textDate;
|
4905
4989
|
}
|
4906
4990
|
text = text.toLowerCase();
|
@@ -5223,7 +5307,7 @@
|
|
5223
5307
|
})(jQuery, window, document);
|
5224
5308
|
|
5225
5309
|
/*!
|
5226
|
-
* # Fomantic-UI 2.9.4-beta.
|
5310
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Checkbox
|
5227
5311
|
* https://github.com/fomantic/Fomantic-UI/
|
5228
5312
|
*
|
5229
5313
|
*
|
@@ -5434,7 +5518,7 @@
|
|
5434
5518
|
;
|
5435
5519
|
|
5436
5520
|
var
|
5437
|
-
r = module.get.radios(),
|
5521
|
+
r = module.get.radios().not(selector.disabled),
|
5438
5522
|
rIndex = r.index($module),
|
5439
5523
|
rLen = r.length,
|
5440
5524
|
checkIndex = false
|
@@ -5452,7 +5536,10 @@
|
|
5452
5536
|
|
5453
5537
|
return false;
|
5454
5538
|
}
|
5455
|
-
|
5539
|
+
var nextOption = $(r[checkIndex]),
|
5540
|
+
nextInput = nextOption.children(selector.input),
|
5541
|
+
disallowOption = nextOption.hasClass(className.readOnly) || nextInput.prop('readonly');
|
5542
|
+
if (disallowOption || settings.beforeChecked.apply(nextInput[0]) === false) {
|
5456
5543
|
module.verbose('Next option should not allow check, cancelling key navigation');
|
5457
5544
|
|
5458
5545
|
return false;
|
@@ -5949,7 +6036,9 @@
|
|
5949
6036
|
});
|
5950
6037
|
}
|
5951
6038
|
clearTimeout(module.performance.timer);
|
5952
|
-
module.performance.timer = setTimeout(function () {
|
6039
|
+
module.performance.timer = setTimeout(function () {
|
6040
|
+
module.performance.display();
|
6041
|
+
}, 500);
|
5953
6042
|
},
|
5954
6043
|
display: function () {
|
5955
6044
|
var
|
@@ -6097,6 +6186,7 @@
|
|
6097
6186
|
|
6098
6187
|
selector: {
|
6099
6188
|
checkbox: '.ui.checkbox',
|
6189
|
+
disabled: '.disabled, :has(input[disabled])',
|
6100
6190
|
label: 'label',
|
6101
6191
|
input: 'input[type="checkbox"], input[type="radio"]',
|
6102
6192
|
link: 'a[href]',
|
@@ -6106,7 +6196,7 @@
|
|
6106
6196
|
})(jQuery, window, document);
|
6107
6197
|
|
6108
6198
|
/*!
|
6109
|
-
* # Fomantic-UI 2.9.4-beta.
|
6199
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Dimmer
|
6110
6200
|
* https://github.com/fomantic/Fomantic-UI/
|
6111
6201
|
*
|
6112
6202
|
*
|
@@ -6635,7 +6725,9 @@
|
|
6635
6725
|
});
|
6636
6726
|
}
|
6637
6727
|
clearTimeout(module.performance.timer);
|
6638
|
-
module.performance.timer = setTimeout(function () {
|
6728
|
+
module.performance.timer = setTimeout(function () {
|
6729
|
+
module.performance.display();
|
6730
|
+
}, 500);
|
6639
6731
|
},
|
6640
6732
|
display: function () {
|
6641
6733
|
var
|
@@ -6837,7 +6929,7 @@
|
|
6837
6929
|
})(jQuery, window, document);
|
6838
6930
|
|
6839
6931
|
/*!
|
6840
|
-
* # Fomantic-UI 2.9.4-beta.
|
6932
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Dropdown
|
6841
6933
|
* https://github.com/fomantic/Fomantic-UI/
|
6842
6934
|
*
|
6843
6935
|
*
|
@@ -6965,6 +7057,9 @@
|
|
6965
7057
|
module.change.values(settings.values);
|
6966
7058
|
module.remove.initialLoad();
|
6967
7059
|
}
|
7060
|
+
if (module.get.placeholderText() !== '') {
|
7061
|
+
module.set.placeholderText();
|
7062
|
+
}
|
6968
7063
|
|
6969
7064
|
module.refreshData();
|
6970
7065
|
|
@@ -7631,7 +7726,7 @@
|
|
7631
7726
|
}
|
7632
7727
|
if (module.is.multiple()) {
|
7633
7728
|
$.each(preSelected, function (index, value) {
|
7634
|
-
$item.filter('[data-value="' + value + '"]')
|
7729
|
+
$item.filter('[data-' + metadata.value + '="' + value + '"]')
|
7635
7730
|
.addClass(className.filtered)
|
7636
7731
|
;
|
7637
7732
|
});
|
@@ -7728,11 +7823,13 @@
|
|
7728
7823
|
? query
|
7729
7824
|
: module.get.query()
|
7730
7825
|
),
|
7731
|
-
results
|
7732
|
-
escapedTerm
|
7733
|
-
|
7826
|
+
results = null,
|
7827
|
+
escapedTerm = module.escape.string(searchTerm),
|
7828
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
7829
|
+
regExpFlags = regExpIgnore + 'gm',
|
7734
7830
|
beginsWithRegExp = new RegExp('^' + escapedTerm, regExpFlags)
|
7735
7831
|
;
|
7832
|
+
module.remove.filteredItem();
|
7736
7833
|
// avoid loop if we're matching nothing
|
7737
7834
|
if (module.has.query()) {
|
7738
7835
|
results = [];
|
@@ -7776,12 +7873,34 @@
|
|
7776
7873
|
;
|
7777
7874
|
}
|
7778
7875
|
module.debug('Showing only matched items', searchTerm);
|
7779
|
-
module.remove.filteredItem();
|
7780
7876
|
if (results) {
|
7781
7877
|
$item
|
7782
7878
|
.not(results)
|
7783
7879
|
.addClass(className.filtered)
|
7784
7880
|
;
|
7881
|
+
if (settings.highlightMatches && (settings.match === 'both' || settings.match === 'text')) {
|
7882
|
+
var querySplit = query.split(''),
|
7883
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
7884
|
+
htmlReg = '(?![^<]*>)',
|
7885
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
7886
|
+
markedReplacer = function () {
|
7887
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
7888
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
7889
|
+
});
|
7890
|
+
|
7891
|
+
return args.join('');
|
7892
|
+
}
|
7893
|
+
;
|
7894
|
+
$.each(results, function (index, result) {
|
7895
|
+
var $result = $(result),
|
7896
|
+
markedHTML = module.get.choiceText($result, true)
|
7897
|
+
;
|
7898
|
+
if (settings.ignoreDiacritics) {
|
7899
|
+
markedHTML = markedHTML.normalize('NFD');
|
7900
|
+
}
|
7901
|
+
$result.html(markedHTML.replace(markedRegExp, markedReplacer));
|
7902
|
+
});
|
7903
|
+
}
|
7785
7904
|
}
|
7786
7905
|
|
7787
7906
|
if (!module.has.query()) {
|
@@ -7817,8 +7936,10 @@
|
|
7817
7936
|
termLength = term.length,
|
7818
7937
|
queryLength = query.length
|
7819
7938
|
;
|
7820
|
-
|
7821
|
-
|
7939
|
+
if (settings.ignoreSearchCase) {
|
7940
|
+
query = query.toLowerCase();
|
7941
|
+
term = term.toLowerCase();
|
7942
|
+
}
|
7822
7943
|
if (queryLength > termLength) {
|
7823
7944
|
return false;
|
7824
7945
|
}
|
@@ -8025,7 +8146,7 @@
|
|
8025
8146
|
if (!itemActivated && !pageLostFocus) {
|
8026
8147
|
if (settings.forceSelection) {
|
8027
8148
|
module.forceSelection();
|
8028
|
-
} else if (!settings.allowAdditions) {
|
8149
|
+
} else if (!settings.allowAdditions && !settings.keepSearchTerm && !module.has.menuSearch()) {
|
8029
8150
|
module.remove.searchTerm();
|
8030
8151
|
}
|
8031
8152
|
module.hide();
|
@@ -8040,7 +8161,9 @@
|
|
8040
8161
|
if (module.is.searchSelection()) {
|
8041
8162
|
module.remove.searchTerm();
|
8042
8163
|
}
|
8043
|
-
|
8164
|
+
if (settings.collapseOnClearable) {
|
8165
|
+
module.hide();
|
8166
|
+
}
|
8044
8167
|
event.stopPropagation();
|
8045
8168
|
},
|
8046
8169
|
},
|
@@ -8074,7 +8197,9 @@
|
|
8074
8197
|
module.set.filtered();
|
8075
8198
|
}
|
8076
8199
|
clearTimeout(module.timer);
|
8077
|
-
module.timer = setTimeout(function () {
|
8200
|
+
module.timer = setTimeout(function () {
|
8201
|
+
module.search();
|
8202
|
+
}, settings.delay.search);
|
8078
8203
|
},
|
8079
8204
|
label: {
|
8080
8205
|
click: function (event) {
|
@@ -8251,7 +8376,9 @@
|
|
8251
8376
|
module.remove.userAddition();
|
8252
8377
|
}
|
8253
8378
|
if (!settings.keepSearchTerm) {
|
8254
|
-
module.
|
8379
|
+
if (module.is.multiple()) {
|
8380
|
+
module.remove.filteredItem();
|
8381
|
+
}
|
8255
8382
|
module.remove.searchTerm();
|
8256
8383
|
}
|
8257
8384
|
if (!module.is.visible() && $target.length > 0) {
|
@@ -9425,7 +9552,7 @@
|
|
9425
9552
|
} else {
|
9426
9553
|
$combo.text(text);
|
9427
9554
|
}
|
9428
|
-
} else if (settings.action === 'activate') {
|
9555
|
+
} else if (settings.action === 'activate' || isFunction(settings.action)) {
|
9429
9556
|
if (text !== module.get.placeholderText() || isNotPlaceholder) {
|
9430
9557
|
$text.removeClass(className.placeholder);
|
9431
9558
|
}
|
@@ -9485,7 +9612,7 @@
|
|
9485
9612
|
module.set.scrollPosition($nextValue);
|
9486
9613
|
$selectedItem.removeClass(className.selected);
|
9487
9614
|
$nextValue.addClass(className.selected);
|
9488
|
-
if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
|
9615
|
+
if (settings.selectOnKeydown && module.is.single() && (!$nextItem || !$nextItem.hasClass(className.actionable))) {
|
9489
9616
|
module.set.selectedItem($nextValue);
|
9490
9617
|
}
|
9491
9618
|
}
|
@@ -9606,19 +9733,27 @@
|
|
9606
9733
|
$selectedItem = settings.allowAdditions
|
9607
9734
|
? $selectedItem || module.get.itemWithAdditions(value)
|
9608
9735
|
: $selectedItem || module.get.item(value);
|
9609
|
-
if (!$selectedItem) {
|
9736
|
+
if (!$selectedItem && value !== undefined) {
|
9610
9737
|
return false;
|
9611
9738
|
}
|
9612
|
-
|
9613
|
-
|
9614
|
-
|
9615
|
-
|
9616
|
-
|
9739
|
+
if (isMultiple) {
|
9740
|
+
if (!keepSearchTerm) {
|
9741
|
+
module.remove.searchWidth();
|
9742
|
+
}
|
9743
|
+
if (settings.useLabels) {
|
9744
|
+
module.remove.selectedItem();
|
9745
|
+
if (value === undefined) {
|
9746
|
+
module.remove.labels($module.find(selector.label), true);
|
9747
|
+
}
|
9748
|
+
}
|
9749
|
+
} else {
|
9617
9750
|
module.remove.activeItem();
|
9618
9751
|
module.remove.selectedItem();
|
9619
|
-
} else if (settings.useLabels) {
|
9620
|
-
module.remove.selectedItem();
|
9621
9752
|
}
|
9753
|
+
if (!$selectedItem) {
|
9754
|
+
return false;
|
9755
|
+
}
|
9756
|
+
module.debug('Setting selected menu item to', $selectedItem);
|
9622
9757
|
// select each item
|
9623
9758
|
$selectedItem
|
9624
9759
|
.each(function () {
|
@@ -9644,8 +9779,8 @@
|
|
9644
9779
|
module.save.remoteData(selectedText, selectedValue);
|
9645
9780
|
}
|
9646
9781
|
if (settings.useLabels) {
|
9647
|
-
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
9648
9782
|
module.add.label(selectedValue, selectedText, shouldAnimate);
|
9783
|
+
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
9649
9784
|
module.set.activeItem($selected);
|
9650
9785
|
module.filterActive();
|
9651
9786
|
module.select.nextAvailable($selectedItem);
|
@@ -9918,6 +10053,12 @@
|
|
9918
10053
|
$item.removeClass(className.active);
|
9919
10054
|
},
|
9920
10055
|
filteredItem: function () {
|
10056
|
+
if (settings.highlightMatches) {
|
10057
|
+
$.each($item, function (index, item) {
|
10058
|
+
var $markItem = $(item);
|
10059
|
+
$markItem.html($markItem.html().replace(/<\/?mark>/g, ''));
|
10060
|
+
});
|
10061
|
+
}
|
9921
10062
|
if (settings.useLabels && module.has.maxSelections()) {
|
9922
10063
|
return;
|
9923
10064
|
}
|
@@ -10262,7 +10403,12 @@
|
|
10262
10403
|
return $selectedMenu.hasClass(className.leftward);
|
10263
10404
|
},
|
10264
10405
|
clearable: function () {
|
10265
|
-
|
10406
|
+
var hasClearableClass = $module.hasClass(className.clearable);
|
10407
|
+
if (!hasClearableClass && settings.clearable) {
|
10408
|
+
$module.addClass(className.clearable);
|
10409
|
+
}
|
10410
|
+
|
10411
|
+
return hasClearableClass || settings.clearable;
|
10266
10412
|
},
|
10267
10413
|
disabled: function () {
|
10268
10414
|
return $module.hasClass(className.disabled);
|
@@ -10585,12 +10731,16 @@
|
|
10585
10731
|
show: function () {
|
10586
10732
|
module.verbose('Delaying show event to ensure user intent');
|
10587
10733
|
clearTimeout(module.timer);
|
10588
|
-
module.timer = setTimeout(function () {
|
10734
|
+
module.timer = setTimeout(function () {
|
10735
|
+
module.show();
|
10736
|
+
}, settings.delay.show);
|
10589
10737
|
},
|
10590
10738
|
hide: function () {
|
10591
10739
|
module.verbose('Delaying hide event to ensure user intent');
|
10592
10740
|
clearTimeout(module.timer);
|
10593
|
-
module.timer = setTimeout(function () {
|
10741
|
+
module.timer = setTimeout(function () {
|
10742
|
+
module.hide();
|
10743
|
+
}, settings.delay.hide);
|
10594
10744
|
},
|
10595
10745
|
},
|
10596
10746
|
|
@@ -10623,6 +10773,7 @@
|
|
10623
10773
|
return text.replace(regExp.escape, '\\$&');
|
10624
10774
|
},
|
10625
10775
|
htmlEntities: function (string, forceAmpersand) {
|
10776
|
+
forceAmpersand = typeof forceAmpersand === 'number' ? false : forceAmpersand;
|
10626
10777
|
var
|
10627
10778
|
badChars = /["'<>`]/g,
|
10628
10779
|
shouldEscape = /["&'<>`]/,
|
@@ -10639,8 +10790,7 @@
|
|
10639
10790
|
;
|
10640
10791
|
if (shouldEscape.test(string)) {
|
10641
10792
|
string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&');
|
10642
|
-
|
10643
|
-
return string.replace(badChars, escapedChar);
|
10793
|
+
string = string.replace(badChars, escapedChar);
|
10644
10794
|
}
|
10645
10795
|
|
10646
10796
|
return string;
|
@@ -10716,7 +10866,9 @@
|
|
10716
10866
|
});
|
10717
10867
|
}
|
10718
10868
|
clearTimeout(module.performance.timer);
|
10719
|
-
module.performance.timer = setTimeout(function () {
|
10869
|
+
module.performance.timer = setTimeout(function () {
|
10870
|
+
module.performance.display();
|
10871
|
+
}, 500);
|
10720
10872
|
},
|
10721
10873
|
display: function () {
|
10722
10874
|
var
|
@@ -10843,6 +10995,7 @@
|
|
10843
10995
|
|
10844
10996
|
match: 'both', // what to match against with search selection (both, text, or label)
|
10845
10997
|
fullTextSearch: 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10998
|
+
highlightMatches: false, // Whether search result should highlight matching strings
|
10846
10999
|
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...)
|
10847
11000
|
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)
|
10848
11001
|
|
@@ -10876,6 +11029,7 @@
|
|
10876
11029
|
headerDivider: true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
|
10877
11030
|
|
10878
11031
|
collapseOnActionable: true, // whether the dropdown should collapse upon selection of an actionable item
|
11032
|
+
collapseOnClearable: false, // whether the dropdown should collapse upon clicking the clearable icon
|
10879
11033
|
|
10880
11034
|
// label settings on multi-select
|
10881
11035
|
label: {
|
@@ -10958,9 +11112,11 @@
|
|
10958
11112
|
descriptionVertical: 'descriptionVertical', // whether description should be vertical
|
10959
11113
|
value: 'value', // actual dropdown value
|
10960
11114
|
text: 'text', // displayed text when selected
|
11115
|
+
data: 'data', // custom data attributes
|
10961
11116
|
type: 'type', // type of dropdown element
|
10962
11117
|
image: 'image', // optional image path
|
10963
11118
|
imageClass: 'imageClass', // optional individual class for image
|
11119
|
+
alt: 'alt', // optional alt text for image
|
10964
11120
|
icon: 'icon', // optional icon name
|
10965
11121
|
iconClass: 'iconClass', // optional individual class for icon (for example to use flag instead)
|
10966
11122
|
class: 'class', // optional individual class for item/header
|
@@ -11067,8 +11223,7 @@
|
|
11067
11223
|
;
|
11068
11224
|
if (shouldEscape.test(string)) {
|
11069
11225
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
11070
|
-
|
11071
|
-
return string.replace(badChars, escapedChar);
|
11226
|
+
string = string.replace(badChars, escapedChar);
|
11072
11227
|
}
|
11073
11228
|
|
11074
11229
|
return string;
|
@@ -11103,9 +11258,21 @@
|
|
11103
11258
|
$.each(values, function (index, option) {
|
11104
11259
|
var
|
11105
11260
|
itemType = option[fields.type] || 'item',
|
11106
|
-
isMenu = itemType.indexOf('menu') !== -1
|
11261
|
+
isMenu = itemType.indexOf('menu') !== -1,
|
11262
|
+
maybeData = '',
|
11263
|
+
dataObject = option[fields.data]
|
11107
11264
|
;
|
11108
|
-
|
11265
|
+
if (dataObject) {
|
11266
|
+
var dataKey,
|
11267
|
+
dataKeyEscaped
|
11268
|
+
;
|
11269
|
+
for (dataKey in dataObject) {
|
11270
|
+
dataKeyEscaped = String(dataKey).replace(/\W/g, '');
|
11271
|
+
if (Object.prototype.hasOwnProperty.call(dataObject, dataKey) && ['text', 'value'].indexOf(dataKeyEscaped.toLowerCase()) === -1) {
|
11272
|
+
maybeData += ' data-' + dataKeyEscaped + '="' + deQuote(String(dataObject[dataKey])) + '"';
|
11273
|
+
}
|
11274
|
+
}
|
11275
|
+
}
|
11109
11276
|
if (itemType === 'item' || isMenu) {
|
11110
11277
|
var
|
11111
11278
|
maybeText = option[fields.text]
|
@@ -11122,12 +11289,12 @@
|
|
11122
11289
|
: '',
|
11123
11290
|
hasDescription = escape(option[fields.description] || '', preserveHTML) !== ''
|
11124
11291
|
;
|
11125
|
-
html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
|
11292
|
+
html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + maybeData + '>';
|
11126
11293
|
if (isMenu) {
|
11127
11294
|
html += '<i class="' + (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
|
11128
11295
|
}
|
11129
11296
|
if (option[fields.image]) {
|
11130
|
-
html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + '">';
|
11297
|
+
html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + (option[fields.alt] ? '" alt="' + deQuote(option[fields.alt]) : '') + '">';
|
11131
11298
|
}
|
11132
11299
|
if (option[fields.icon]) {
|
11133
11300
|
html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
|
@@ -11195,7 +11362,7 @@
|
|
11195
11362
|
})(jQuery, window, document);
|
11196
11363
|
|
11197
11364
|
/*!
|
11198
|
-
* # Fomantic-UI 2.9.4-beta.
|
11365
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Embed
|
11199
11366
|
* https://github.com/fomantic/Fomantic-UI/
|
11200
11367
|
*
|
11201
11368
|
*
|
@@ -11315,11 +11482,12 @@
|
|
11315
11482
|
|
11316
11483
|
createPlaceholder: function (placeholder) {
|
11317
11484
|
var
|
11318
|
-
icon = module.get.icon()
|
11485
|
+
icon = module.get.icon(),
|
11486
|
+
alt = module.get.alt()
|
11319
11487
|
;
|
11320
11488
|
placeholder = placeholder || module.get.placeholder();
|
11321
|
-
$module.html(templates.placeholder(placeholder, icon));
|
11322
|
-
module.debug('Creating placeholder for embed', placeholder, icon);
|
11489
|
+
$module.html(templates.placeholder(placeholder, icon, alt));
|
11490
|
+
module.debug('Creating placeholder for embed', placeholder, icon, alt);
|
11323
11491
|
},
|
11324
11492
|
|
11325
11493
|
createEmbed: function (url) {
|
@@ -11399,6 +11567,9 @@
|
|
11399
11567
|
placeholder: function () {
|
11400
11568
|
return settings.placeholder || $module.data(metadata.placeholder);
|
11401
11569
|
},
|
11570
|
+
alt: function () {
|
11571
|
+
return settings.alt || $module.data(metadata.alt);
|
11572
|
+
},
|
11402
11573
|
icon: function () {
|
11403
11574
|
return settings.icon || ($module.data(metadata.icon) !== undefined
|
11404
11575
|
? $module.data(metadata.icon)
|
@@ -11484,6 +11655,7 @@
|
|
11484
11655
|
.removeData(metadata.id)
|
11485
11656
|
.removeData(metadata.icon)
|
11486
11657
|
.removeData(metadata.placeholder)
|
11658
|
+
.removeData(metadata.alt)
|
11487
11659
|
.removeData(metadata.source)
|
11488
11660
|
.removeData(metadata.url)
|
11489
11661
|
;
|
@@ -11636,7 +11808,9 @@
|
|
11636
11808
|
});
|
11637
11809
|
}
|
11638
11810
|
clearTimeout(module.performance.timer);
|
11639
|
-
module.performance.timer = setTimeout(function () {
|
11811
|
+
module.performance.timer = setTimeout(function () {
|
11812
|
+
module.performance.display();
|
11813
|
+
}, 500);
|
11640
11814
|
},
|
11641
11815
|
display: function () {
|
11642
11816
|
var
|
@@ -11751,6 +11925,8 @@
|
|
11751
11925
|
source: false,
|
11752
11926
|
url: false,
|
11753
11927
|
id: false,
|
11928
|
+
placeholder: false,
|
11929
|
+
alt: false,
|
11754
11930
|
|
11755
11931
|
// standard video settings
|
11756
11932
|
autoplay: 'auto',
|
@@ -11773,6 +11949,7 @@
|
|
11773
11949
|
id: 'id',
|
11774
11950
|
icon: 'icon',
|
11775
11951
|
placeholder: 'placeholder',
|
11952
|
+
alt: 'alt',
|
11776
11953
|
source: 'source',
|
11777
11954
|
url: 'url',
|
11778
11955
|
},
|
@@ -11848,7 +12025,7 @@
|
|
11848
12025
|
+ ' width="100%" height="100%"'
|
11849
12026
|
+ ' msallowFullScreen allowFullScreen></iframe>';
|
11850
12027
|
},
|
11851
|
-
placeholder: function (image, icon) {
|
12028
|
+
placeholder: function (image, icon, alt) {
|
11852
12029
|
var
|
11853
12030
|
html = '',
|
11854
12031
|
deQuote = $.fn.embed.settings.templates.deQuote
|
@@ -11857,7 +12034,7 @@
|
|
11857
12034
|
html += '<i class="' + deQuote(icon) + ' icon"></i>';
|
11858
12035
|
}
|
11859
12036
|
if (image) {
|
11860
|
-
html += '<img class="placeholder" src="' + deQuote(image) + '">';
|
12037
|
+
html += '<img class="placeholder" src="' + deQuote(image) + (alt ? '" alt="' + deQuote(alt) : '') + '">';
|
11861
12038
|
}
|
11862
12039
|
|
11863
12040
|
return html;
|
@@ -11874,7 +12051,7 @@
|
|
11874
12051
|
})(jQuery, window, document);
|
11875
12052
|
|
11876
12053
|
/*!
|
11877
|
-
* # Fomantic-UI 2.9.4-beta.
|
12054
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Flyout
|
11878
12055
|
* https://github.com/fomantic/Fomantic-UI/
|
11879
12056
|
*
|
11880
12057
|
*
|
@@ -13094,7 +13271,9 @@
|
|
13094
13271
|
});
|
13095
13272
|
}
|
13096
13273
|
clearTimeout(module.performance.timer);
|
13097
|
-
module.performance.timer = setTimeout(function () {
|
13274
|
+
module.performance.timer = setTimeout(function () {
|
13275
|
+
module.performance.display();
|
13276
|
+
}, 500);
|
13098
13277
|
},
|
13099
13278
|
display: function () {
|
13100
13279
|
var
|
@@ -13424,7 +13603,7 @@
|
|
13424
13603
|
})(jQuery, window, document);
|
13425
13604
|
|
13426
13605
|
/*!
|
13427
|
-
* # Fomantic-UI 2.9.4-beta.
|
13606
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Modal
|
13428
13607
|
* https://github.com/fomantic/Fomantic-UI/
|
13429
13608
|
*
|
13430
13609
|
*
|
@@ -13952,7 +14131,9 @@
|
|
13952
14131
|
},
|
13953
14132
|
debounce: function (method, delay) {
|
13954
14133
|
clearTimeout(module.timer);
|
13955
|
-
module.timer = setTimeout(function () {
|
14134
|
+
module.timer = setTimeout(function () {
|
14135
|
+
method();
|
14136
|
+
}, delay);
|
13956
14137
|
},
|
13957
14138
|
keyboard: function (event) {
|
13958
14139
|
var
|
@@ -14698,7 +14879,9 @@
|
|
14698
14879
|
});
|
14699
14880
|
}
|
14700
14881
|
clearTimeout(module.performance.timer);
|
14701
|
-
module.performance.timer = setTimeout(function () {
|
14882
|
+
module.performance.timer = setTimeout(function () {
|
14883
|
+
module.performance.display();
|
14884
|
+
}, 500);
|
14702
14885
|
},
|
14703
14886
|
display: function () {
|
14704
14887
|
var
|
@@ -15058,7 +15241,7 @@
|
|
15058
15241
|
})(jQuery, window, document);
|
15059
15242
|
|
15060
15243
|
/*!
|
15061
|
-
* # Fomantic-UI 2.9.4-beta.
|
15244
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Nag
|
15062
15245
|
* https://github.com/fomantic/Fomantic-UI/
|
15063
15246
|
*
|
15064
15247
|
*
|
@@ -15147,7 +15330,9 @@
|
|
15147
15330
|
}
|
15148
15331
|
|
15149
15332
|
if (settings.displayTime > 0) {
|
15150
|
-
setTimeout(function () {
|
15333
|
+
setTimeout(function () {
|
15334
|
+
module.hide();
|
15335
|
+
}, settings.displayTime);
|
15151
15336
|
}
|
15152
15337
|
module.show();
|
15153
15338
|
},
|
@@ -15203,8 +15388,10 @@
|
|
15203
15388
|
module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
|
15204
15389
|
module.storage.set(settings.key, settings.value);
|
15205
15390
|
}
|
15206
|
-
event
|
15207
|
-
|
15391
|
+
if (event) {
|
15392
|
+
event.stopImmediatePropagation();
|
15393
|
+
event.preventDefault();
|
15394
|
+
}
|
15208
15395
|
},
|
15209
15396
|
|
15210
15397
|
should: {
|
@@ -15436,7 +15623,9 @@
|
|
15436
15623
|
});
|
15437
15624
|
}
|
15438
15625
|
clearTimeout(module.performance.timer);
|
15439
|
-
module.performance.timer = setTimeout(function () {
|
15626
|
+
module.performance.timer = setTimeout(function () {
|
15627
|
+
module.performance.display();
|
15628
|
+
}, 500);
|
15440
15629
|
},
|
15441
15630
|
display: function () {
|
15442
15631
|
var
|
@@ -15619,7 +15808,7 @@
|
|
15619
15808
|
})(jQuery, window, document);
|
15620
15809
|
|
15621
15810
|
/*!
|
15622
|
-
* # Fomantic-UI 2.9.4-beta.
|
15811
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Popup
|
15623
15812
|
* https://github.com/fomantic/Fomantic-UI/
|
15624
15813
|
*
|
15625
15814
|
*
|
@@ -15814,7 +16003,9 @@
|
|
15814
16003
|
;
|
15815
16004
|
clearTimeout(module.hideTimer);
|
15816
16005
|
if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
|
15817
|
-
module.showTimer = setTimeout(function () {
|
16006
|
+
module.showTimer = setTimeout(function () {
|
16007
|
+
module.show();
|
16008
|
+
}, delay);
|
15818
16009
|
}
|
15819
16010
|
},
|
15820
16011
|
end: function () {
|
@@ -15824,7 +16015,9 @@
|
|
15824
16015
|
: settings.delay
|
15825
16016
|
;
|
15826
16017
|
clearTimeout(module.showTimer);
|
15827
|
-
module.hideTimer = setTimeout(function () {
|
16018
|
+
module.hideTimer = setTimeout(function () {
|
16019
|
+
module.hide();
|
16020
|
+
}, delay);
|
15828
16021
|
},
|
15829
16022
|
touchstart: function (event) {
|
15830
16023
|
openedWithTouch = true;
|
@@ -16864,7 +17057,9 @@
|
|
16864
17057
|
});
|
16865
17058
|
}
|
16866
17059
|
clearTimeout(module.performance.timer);
|
16867
|
-
module.performance.timer = setTimeout(function () {
|
17060
|
+
module.performance.timer = setTimeout(function () {
|
17061
|
+
module.performance.display();
|
17062
|
+
}, 500);
|
16868
17063
|
},
|
16869
17064
|
display: function () {
|
16870
17065
|
var
|
@@ -17175,7 +17370,7 @@
|
|
17175
17370
|
})(jQuery, window, document);
|
17176
17371
|
|
17177
17372
|
/*!
|
17178
|
-
* # Fomantic-UI 2.9.4-beta.
|
17373
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Progress
|
17179
17374
|
* https://github.com/fomantic/Fomantic-UI/
|
17180
17375
|
*
|
17181
17376
|
*
|
@@ -17967,7 +18162,9 @@
|
|
17967
18162
|
});
|
17968
18163
|
}
|
17969
18164
|
clearTimeout(module.performance.timer);
|
17970
|
-
module.performance.timer = setTimeout(function () {
|
18165
|
+
module.performance.timer = setTimeout(function () {
|
18166
|
+
module.performance.display();
|
18167
|
+
}, 500);
|
17971
18168
|
},
|
17972
18169
|
display: function () {
|
17973
18170
|
var
|
@@ -18153,7 +18350,7 @@
|
|
18153
18350
|
})(jQuery, window, document);
|
18154
18351
|
|
18155
18352
|
/*!
|
18156
|
-
* # Fomantic-UI 2.9.4-beta.
|
18353
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Slider
|
18157
18354
|
* https://github.com/fomantic/Fomantic-UI/
|
18158
18355
|
*
|
18159
18356
|
*
|
@@ -18186,8 +18383,6 @@
|
|
18186
18383
|
methodInvoked = typeof query === 'string',
|
18187
18384
|
queryArguments = [].slice.call(arguments, 1),
|
18188
18385
|
|
18189
|
-
alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
|
18190
|
-
|
18191
18386
|
SINGLE_STEP = 1,
|
18192
18387
|
BIG_STEP = 2,
|
18193
18388
|
NO_STEP = 0,
|
@@ -18236,7 +18431,6 @@
|
|
18236
18431
|
position,
|
18237
18432
|
secondPos,
|
18238
18433
|
offset,
|
18239
|
-
precision,
|
18240
18434
|
gapRatio = 1,
|
18241
18435
|
previousValue,
|
18242
18436
|
|
@@ -18279,6 +18473,7 @@
|
|
18279
18473
|
clearInterval(instance.interval);
|
18280
18474
|
module.unbind.events();
|
18281
18475
|
module.unbind.slidingEvents();
|
18476
|
+
delete module.cache;
|
18282
18477
|
$module.removeData(moduleNamespace);
|
18283
18478
|
instance = undefined;
|
18284
18479
|
},
|
@@ -18295,7 +18490,7 @@
|
|
18295
18490
|
+ '<div class="thumb"></div>'
|
18296
18491
|
+ '</div>');
|
18297
18492
|
}
|
18298
|
-
|
18493
|
+
module.clear.cache();
|
18299
18494
|
$thumb = $module.find('.thumb:not(.second)');
|
18300
18495
|
if (settings.showThumbTooltip) {
|
18301
18496
|
$thumb
|
@@ -18329,8 +18524,14 @@
|
|
18329
18524
|
module.setup.autoLabel();
|
18330
18525
|
}
|
18331
18526
|
|
18527
|
+
if (settings.highlightRange) {
|
18528
|
+
$labels.addClass(className.active);
|
18529
|
+
}
|
18530
|
+
|
18332
18531
|
if (settings.showLabelTicks) {
|
18333
18532
|
$module.addClass(className.ticked);
|
18533
|
+
} else if ($module.hasClass(className.ticked)) {
|
18534
|
+
settings.showLabelTicks = 'always';
|
18334
18535
|
}
|
18335
18536
|
}
|
18336
18537
|
},
|
@@ -18365,14 +18566,20 @@
|
|
18365
18566
|
} else {
|
18366
18567
|
$labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
|
18367
18568
|
}
|
18368
|
-
|
18569
|
+
var step = module.get.step(),
|
18570
|
+
precision = module.get.precision(),
|
18571
|
+
len = module.get.numLabels(),
|
18572
|
+
ignoreLabels = len - (settings.autoAdjustLabels !== 'fixed' ? 0 : module.get.max().toString().length + 4)
|
18573
|
+
;
|
18574
|
+
for (var i = 0; i <= len; i++) {
|
18369
18575
|
var
|
18370
|
-
|
18576
|
+
stepValue = Math.round(((i * (step === 0 ? 1 : step)) + module.get.min()) * precision) / precision,
|
18577
|
+
labelText = module.get.label(i, stepValue),
|
18371
18578
|
showLabel = settings.restrictedLabels.length === 0 || settings.restrictedLabels.indexOf(labelText) >= 0,
|
18372
18579
|
$label = labelText !== '' && (showLabel || settings.showLabelTicks === 'always')
|
18373
|
-
? (!(i % module.get.gapRatio())
|
18374
|
-
? $('<li class
|
18375
|
-
: $('<li class
|
18580
|
+
? ((!(i % module.get.gapRatio()) && i < ignoreLabels) || i === len
|
18581
|
+
? $('<li/>', { class: className.label, 'data-value': stepValue, html: showLabel ? labelText : '' })
|
18582
|
+
: $('<li/>', { class: 'halftick label', 'data-value': stepValue }))
|
18376
18583
|
: null,
|
18377
18584
|
ratio = i / len
|
18378
18585
|
;
|
@@ -18643,6 +18850,12 @@
|
|
18643
18850
|
},
|
18644
18851
|
},
|
18645
18852
|
|
18853
|
+
clear: {
|
18854
|
+
cache: function () {
|
18855
|
+
module.cache = {};
|
18856
|
+
},
|
18857
|
+
},
|
18858
|
+
|
18646
18859
|
resync: function () {
|
18647
18860
|
module.verbose('Resyncing thumb position based on value');
|
18648
18861
|
if (module.is.range()) {
|
@@ -18692,6 +18905,25 @@
|
|
18692
18905
|
},
|
18693
18906
|
|
18694
18907
|
is: {
|
18908
|
+
prime: function (n) {
|
18909
|
+
if (module.cache['prime' + n] === undefined) {
|
18910
|
+
var p = true;
|
18911
|
+
for (var i = 2, s = Math.sqrt(n); i <= s; i++) {
|
18912
|
+
if (n % i === 0) {
|
18913
|
+
p = false;
|
18914
|
+
|
18915
|
+
break;
|
18916
|
+
}
|
18917
|
+
}
|
18918
|
+
if (p) {
|
18919
|
+
p = n > 1;
|
18920
|
+
}
|
18921
|
+
|
18922
|
+
module.cache['prime' + n] = p;
|
18923
|
+
}
|
18924
|
+
|
18925
|
+
return module.cache['prime' + n];
|
18926
|
+
},
|
18695
18927
|
range: function () {
|
18696
18928
|
var isRange = $module.hasClass(className.range);
|
18697
18929
|
if (!isRange && (settings.minRange || settings.maxRange)) {
|
@@ -18806,62 +19038,87 @@
|
|
18806
19038
|
return margin || '0px';
|
18807
19039
|
},
|
18808
19040
|
precision: function () {
|
18809
|
-
|
18810
|
-
|
18811
|
-
|
18812
|
-
|
18813
|
-
|
18814
|
-
|
18815
|
-
|
18816
|
-
|
18817
|
-
|
19041
|
+
if (module.cache.precision === undefined) {
|
19042
|
+
var
|
19043
|
+
decimalPlaces,
|
19044
|
+
step = module.get.step()
|
19045
|
+
;
|
19046
|
+
if (step !== 0) {
|
19047
|
+
var split = String(step).split('.');
|
19048
|
+
decimalPlaces = split.length === 2 ? split[1].length : 0;
|
19049
|
+
} else {
|
19050
|
+
decimalPlaces = settings.decimalPlaces;
|
19051
|
+
}
|
19052
|
+
var precision = Math.pow(10, decimalPlaces);
|
19053
|
+
module.debug('Precision determined', precision);
|
19054
|
+
module.cache.precision = precision;
|
18818
19055
|
}
|
18819
|
-
var precision = Math.pow(10, decimalPlaces);
|
18820
|
-
module.debug('Precision determined', precision);
|
18821
19056
|
|
18822
|
-
return precision;
|
19057
|
+
return module.cache.precision;
|
18823
19058
|
},
|
18824
19059
|
min: function () {
|
18825
19060
|
return settings.min;
|
18826
19061
|
},
|
18827
19062
|
max: function () {
|
18828
|
-
|
18829
|
-
|
18830
|
-
|
18831
|
-
|
18832
|
-
|
18833
|
-
|
18834
|
-
|
19063
|
+
if (module.cache.max === undefined) {
|
19064
|
+
var
|
19065
|
+
step = module.get.step(),
|
19066
|
+
min = module.get.min(),
|
19067
|
+
precision = module.get.precision(),
|
19068
|
+
quotient = step === 0 ? 0 : Math.floor(Math.round(((settings.max - min) / step) * precision) / precision),
|
19069
|
+
remainder = step === 0 ? 0 : (settings.max - min) % step
|
19070
|
+
;
|
19071
|
+
if (remainder > 0) {
|
19072
|
+
module.debug('Max value not divisible by given step. Increasing max value.', settings.max, step);
|
19073
|
+
}
|
19074
|
+
module.cache.max = remainder === 0 ? settings.max : min + quotient * step;
|
19075
|
+
}
|
18835
19076
|
|
18836
|
-
return
|
19077
|
+
return module.cache.max;
|
18837
19078
|
},
|
18838
19079
|
step: function () {
|
18839
19080
|
return settings.step;
|
18840
19081
|
},
|
18841
19082
|
numLabels: function () {
|
18842
|
-
|
18843
|
-
|
18844
|
-
|
18845
|
-
|
19083
|
+
if (module.cache.numLabels === undefined) {
|
19084
|
+
var step = module.get.step(),
|
19085
|
+
precision = module.get.precision(),
|
19086
|
+
value = Math.round(((module.get.max() - module.get.min()) / (step === 0 ? 1 : step)) * precision) / precision;
|
19087
|
+
module.debug('Determined that there should be ' + value + ' labels');
|
19088
|
+
module.cache.numLabels = value;
|
19089
|
+
}
|
18846
19090
|
|
18847
|
-
return
|
19091
|
+
return module.cache.numLabels;
|
18848
19092
|
},
|
18849
19093
|
labelType: function () {
|
18850
19094
|
return settings.labelType;
|
18851
19095
|
},
|
18852
|
-
label: function (value) {
|
18853
|
-
if (interpretLabel) {
|
18854
|
-
return interpretLabel(value);
|
19096
|
+
label: function (value, stepValue) {
|
19097
|
+
if (isFunction(interpretLabel)) {
|
19098
|
+
return interpretLabel(value, stepValue, module);
|
18855
19099
|
}
|
18856
19100
|
|
18857
19101
|
switch (settings.labelType) {
|
18858
19102
|
case settings.labelTypes.number: {
|
18859
|
-
|
18860
|
-
|
18861
|
-
return Math.round(((value * (step === 0 ? 1 : step)) + module.get.min()) * precision) / precision;
|
19103
|
+
return stepValue;
|
18862
19104
|
}
|
18863
19105
|
case settings.labelTypes.letter: {
|
18864
|
-
|
19106
|
+
if (value < 0 || module.get.precision() > 1) {
|
19107
|
+
module.error(error.invalidLetterNumber, value);
|
19108
|
+
|
19109
|
+
return value;
|
19110
|
+
}
|
19111
|
+
var letterLabel = '',
|
19112
|
+
letters = Array.isArray(settings.letters) ? settings.letters : String(settings.letters).split(''),
|
19113
|
+
lettersLen = letters.length
|
19114
|
+
;
|
19115
|
+
|
19116
|
+
while (stepValue >= 0) {
|
19117
|
+
letterLabel = letters[stepValue % lettersLen] + letterLabel;
|
19118
|
+
stepValue = Math.floor(stepValue / lettersLen) - 1;
|
19119
|
+
}
|
19120
|
+
|
19121
|
+
return letterLabel;
|
18865
19122
|
}
|
18866
19123
|
default: {
|
18867
19124
|
return value;
|
@@ -18871,6 +19128,9 @@
|
|
18871
19128
|
value: function () {
|
18872
19129
|
return value;
|
18873
19130
|
},
|
19131
|
+
settings: function () {
|
19132
|
+
return settings;
|
19133
|
+
},
|
18874
19134
|
currentThumbValue: function () {
|
18875
19135
|
return $currThumb !== undefined && $currThumb.hasClass('second') ? module.secondThumbVal : module.thumbVal;
|
18876
19136
|
},
|
@@ -18915,6 +19175,7 @@
|
|
18915
19175
|
if (settings.autoAdjustLabels) {
|
18916
19176
|
var
|
18917
19177
|
numLabels = module.get.numLabels(),
|
19178
|
+
primePlus = module.is.prime(numLabels) ? 1 : 0,
|
18918
19179
|
trackLength = module.get.trackLength(),
|
18919
19180
|
gapCounter = 1
|
18920
19181
|
;
|
@@ -18924,7 +19185,7 @@
|
|
18924
19185
|
// and apply only if the modulo of the operation is an odd number.
|
18925
19186
|
if (trackLength > 0) {
|
18926
19187
|
while ((trackLength / numLabels) * gapCounter < settings.labelDistance) {
|
18927
|
-
if (!(numLabels % gapCounter)) {
|
19188
|
+
if (!((numLabels + primePlus) % gapCounter) || settings.autoAdjustLabels === 'fixed') {
|
18928
19189
|
gapRatio = gapCounter;
|
18929
19190
|
}
|
18930
19191
|
gapCounter += 1;
|
@@ -19062,6 +19323,7 @@
|
|
19062
19323
|
},
|
19063
19324
|
value: function (position) {
|
19064
19325
|
var
|
19326
|
+
precision = module.get.precision(),
|
19065
19327
|
startPos = module.is.reversed() ? module.get.trackEndPos() : module.get.trackStartPos(),
|
19066
19328
|
endPos = module.is.reversed() ? module.get.trackStartPos() : module.get.trackEndPos(),
|
19067
19329
|
ratio = (position - startPos) / (endPos - startPos),
|
@@ -19130,6 +19392,30 @@
|
|
19130
19392
|
},
|
19131
19393
|
|
19132
19394
|
set: {
|
19395
|
+
active: function (thumbVal, secondThumbVal) {
|
19396
|
+
if (settings.highlightRange) {
|
19397
|
+
if (secondThumbVal < thumbVal) {
|
19398
|
+
var tempVal = secondThumbVal;
|
19399
|
+
secondThumbVal = thumbVal;
|
19400
|
+
thumbVal = tempVal;
|
19401
|
+
}
|
19402
|
+
var $children = $labels.find('.label');
|
19403
|
+
$children.each(function (index) {
|
19404
|
+
var
|
19405
|
+
$child = $(this),
|
19406
|
+
attrValue = $child.attr('data-value')
|
19407
|
+
;
|
19408
|
+
if (attrValue) {
|
19409
|
+
attrValue = parseInt(attrValue, 10);
|
19410
|
+
if (attrValue >= thumbVal && attrValue <= secondThumbVal) {
|
19411
|
+
$child.addClass(className.active);
|
19412
|
+
} else {
|
19413
|
+
$child.removeClass(className.active);
|
19414
|
+
}
|
19415
|
+
}
|
19416
|
+
});
|
19417
|
+
}
|
19418
|
+
},
|
19133
19419
|
value: function (newValue, fireChange) {
|
19134
19420
|
fireChange = fireChange !== false;
|
19135
19421
|
var toReset = previousValue === undefined;
|
@@ -19257,6 +19543,7 @@
|
|
19257
19543
|
position = newPos;
|
19258
19544
|
thumbVal = newValue;
|
19259
19545
|
}
|
19546
|
+
module.set.active(thumbVal, secondThumbVal);
|
19260
19547
|
var
|
19261
19548
|
trackPosValue,
|
19262
19549
|
thumbPosValue,
|
@@ -19364,6 +19651,7 @@
|
|
19364
19651
|
} else {
|
19365
19652
|
return settings[name];
|
19366
19653
|
}
|
19654
|
+
module.clear.cache();
|
19367
19655
|
},
|
19368
19656
|
internal: function (name, value) {
|
19369
19657
|
if ($.isPlainObject(name)) {
|
@@ -19421,7 +19709,9 @@
|
|
19421
19709
|
});
|
19422
19710
|
}
|
19423
19711
|
clearTimeout(module.performance.timer);
|
19424
|
-
module.performance.timer = setTimeout(function () {
|
19712
|
+
module.performance.timer = setTimeout(function () {
|
19713
|
+
module.performance.display();
|
19714
|
+
}, 500);
|
19425
19715
|
},
|
19426
19716
|
display: function () {
|
19427
19717
|
var
|
@@ -19534,6 +19824,7 @@
|
|
19534
19824
|
method: 'The method you called is not defined.',
|
19535
19825
|
notrange: 'This slider is not a range slider',
|
19536
19826
|
invalidRanges: 'Invalid range settings (start/end/minRange/maxRange)',
|
19827
|
+
invalidLetterNumber: 'Negative values or decimal places for labelType: "letter" are not supported',
|
19537
19828
|
},
|
19538
19829
|
|
19539
19830
|
metadata: {
|
@@ -19556,6 +19847,7 @@
|
|
19556
19847
|
preventCrossover: true,
|
19557
19848
|
fireOnInit: false,
|
19558
19849
|
interpretLabel: false,
|
19850
|
+
letters: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
19559
19851
|
|
19560
19852
|
// the decimal place to round to if step is undefined
|
19561
19853
|
decimalPlaces: 2,
|
@@ -19573,6 +19865,8 @@
|
|
19573
19865
|
vertical: 'vertical',
|
19574
19866
|
range: 'range',
|
19575
19867
|
smooth: 'smooth',
|
19868
|
+
label: 'label',
|
19869
|
+
active: 'active',
|
19576
19870
|
},
|
19577
19871
|
|
19578
19872
|
keys: {
|
@@ -19585,6 +19879,7 @@
|
|
19585
19879
|
},
|
19586
19880
|
|
19587
19881
|
restrictedLabels: [],
|
19882
|
+
highlightRange: false,
|
19588
19883
|
showThumbTooltip: false,
|
19589
19884
|
tooltipConfig: {
|
19590
19885
|
position: 'top center',
|
@@ -19602,7 +19897,7 @@
|
|
19602
19897
|
})(jQuery, window, document);
|
19603
19898
|
|
19604
19899
|
/*!
|
19605
|
-
* # Fomantic-UI 2.9.4-beta.
|
19900
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Rating
|
19606
19901
|
* https://github.com/fomantic/Fomantic-UI/
|
19607
19902
|
*
|
19608
19903
|
*
|
@@ -19971,7 +20266,9 @@
|
|
19971
20266
|
});
|
19972
20267
|
}
|
19973
20268
|
clearTimeout(module.performance.timer);
|
19974
|
-
module.performance.timer = setTimeout(function () {
|
20269
|
+
module.performance.timer = setTimeout(function () {
|
20270
|
+
module.performance.display();
|
20271
|
+
}, 500);
|
19975
20272
|
},
|
19976
20273
|
display: function () {
|
19977
20274
|
var
|
@@ -20141,7 +20438,7 @@
|
|
20141
20438
|
})(jQuery, window, document);
|
20142
20439
|
|
20143
20440
|
/*!
|
20144
|
-
* # Fomantic-UI 2.9.4-beta.
|
20441
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Search
|
20145
20442
|
* https://github.com/fomantic/Fomantic-UI/
|
20146
20443
|
*
|
20147
20444
|
*
|
@@ -20268,6 +20565,7 @@
|
|
20268
20565
|
.on('mousedown' + eventNamespace, selector.results, module.event.result.mousedown)
|
20269
20566
|
.on('mouseup' + eventNamespace, selector.results, module.event.result.mouseup)
|
20270
20567
|
.on('click' + eventNamespace, selector.result, module.event.result.click)
|
20568
|
+
.on('click' + eventNamespace, selector.remove, module.event.remove.click)
|
20271
20569
|
;
|
20272
20570
|
},
|
20273
20571
|
},
|
@@ -20277,7 +20575,10 @@
|
|
20277
20575
|
// this makes sure $.extend does not add specified search fields to default fields
|
20278
20576
|
// this is the only setting which should not extend defaults
|
20279
20577
|
if (parameters && parameters.searchFields !== undefined) {
|
20280
|
-
settings.searchFields = parameters.searchFields
|
20578
|
+
settings.searchFields = Array.isArray(parameters.searchFields)
|
20579
|
+
? parameters.searchFields
|
20580
|
+
: [parameters.searchFields]
|
20581
|
+
;
|
20281
20582
|
}
|
20282
20583
|
},
|
20283
20584
|
},
|
@@ -20311,7 +20612,9 @@
|
|
20311
20612
|
callback = function () {
|
20312
20613
|
module.cancel.query();
|
20313
20614
|
module.remove.focus();
|
20314
|
-
module.timer = setTimeout(function () {
|
20615
|
+
module.timer = setTimeout(function () {
|
20616
|
+
module.hideResults();
|
20617
|
+
}, settings.hideDelay);
|
20315
20618
|
}
|
20316
20619
|
;
|
20317
20620
|
if (pageLostFocus) {
|
@@ -20338,6 +20641,12 @@
|
|
20338
20641
|
callback();
|
20339
20642
|
}
|
20340
20643
|
},
|
20644
|
+
remove: {
|
20645
|
+
click: function () {
|
20646
|
+
module.clear.value();
|
20647
|
+
$prompt.trigger('focus');
|
20648
|
+
},
|
20649
|
+
},
|
20341
20650
|
result: {
|
20342
20651
|
mousedown: function () {
|
20343
20652
|
module.resultsClicked = true;
|
@@ -20771,7 +21080,7 @@
|
|
20771
21080
|
exactResults = [],
|
20772
21081
|
fuzzyResults = [],
|
20773
21082
|
searchExp = searchTerm.replace(regExp.escape, '\\$&'),
|
20774
|
-
matchRegExp
|
21083
|
+
matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
|
20775
21084
|
|
20776
21085
|
// avoid duplicates when pushing results
|
20777
21086
|
addResult = function (array, result) {
|
@@ -20807,13 +21116,14 @@
|
|
20807
21116
|
var concatenatedContent = [];
|
20808
21117
|
$.each(searchFields, function (index, field) {
|
20809
21118
|
var
|
20810
|
-
fieldExists =
|
21119
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
20811
21120
|
;
|
20812
21121
|
if (fieldExists) {
|
20813
21122
|
var text;
|
20814
21123
|
text = typeof content[field] === 'string'
|
20815
21124
|
? module.remove.diacritics(content[field])
|
20816
21125
|
: content[field].toString();
|
21126
|
+
text = $('<div/>', { html: text }).text().trim();
|
20817
21127
|
if (settings.fullTextSearch === 'all') {
|
20818
21128
|
concatenatedContent.push(text);
|
20819
21129
|
if (index < lastSearchFieldIndex) {
|
@@ -20844,8 +21154,10 @@
|
|
20844
21154
|
},
|
20845
21155
|
},
|
20846
21156
|
exactSearch: function (query, term) {
|
20847
|
-
|
20848
|
-
|
21157
|
+
if (settings.ignoreSearchCase) {
|
21158
|
+
query = query.toLowerCase();
|
21159
|
+
term = term.toLowerCase();
|
21160
|
+
}
|
20849
21161
|
|
20850
21162
|
return term.indexOf(query) > -1;
|
20851
21163
|
},
|
@@ -20872,8 +21184,10 @@
|
|
20872
21184
|
if (typeof query !== 'string') {
|
20873
21185
|
return false;
|
20874
21186
|
}
|
20875
|
-
|
20876
|
-
|
21187
|
+
if (settings.ignoreSearchCase) {
|
21188
|
+
query = query.toLowerCase();
|
21189
|
+
term = term.toLowerCase();
|
21190
|
+
}
|
20877
21191
|
if (queryLength > termLength) {
|
20878
21192
|
return false;
|
20879
21193
|
}
|
@@ -20969,6 +21283,9 @@
|
|
20969
21283
|
$module.data(metadata.cache, cache);
|
20970
21284
|
}
|
20971
21285
|
},
|
21286
|
+
value: function () {
|
21287
|
+
module.set.value('');
|
21288
|
+
},
|
20972
21289
|
},
|
20973
21290
|
|
20974
21291
|
read: {
|
@@ -21228,6 +21545,39 @@
|
|
21228
21545
|
response[fields.results] = response[fields.results].slice(0, settings.maxResults);
|
21229
21546
|
}
|
21230
21547
|
}
|
21548
|
+
if (settings.highlightMatches) {
|
21549
|
+
var results = response[fields.results],
|
21550
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
21551
|
+
querySplit = module.get.value().split(''),
|
21552
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
21553
|
+
htmlReg = '(?![^<]*>)',
|
21554
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
21555
|
+
markedReplacer = function () {
|
21556
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
21557
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
21558
|
+
});
|
21559
|
+
|
21560
|
+
return args.join('');
|
21561
|
+
}
|
21562
|
+
;
|
21563
|
+
$.each(results, function (label, content) {
|
21564
|
+
$.each(settings.searchFields, function (index, field) {
|
21565
|
+
var
|
21566
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
21567
|
+
;
|
21568
|
+
if (fieldExists) {
|
21569
|
+
var markedHTML = typeof content[field] === 'string'
|
21570
|
+
? content[field]
|
21571
|
+
: content[field].toString();
|
21572
|
+
if (settings.ignoreDiacritics) {
|
21573
|
+
markedHTML = markedHTML.normalize('NFD');
|
21574
|
+
}
|
21575
|
+
markedHTML = markedHTML.replace(/<\/?mark>/g, '');
|
21576
|
+
response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
|
21577
|
+
}
|
21578
|
+
});
|
21579
|
+
});
|
21580
|
+
}
|
21231
21581
|
if (isFunction(template)) {
|
21232
21582
|
html = template(response, fields, settings.preserveHTML);
|
21233
21583
|
} else {
|
@@ -21313,7 +21663,9 @@
|
|
21313
21663
|
});
|
21314
21664
|
}
|
21315
21665
|
clearTimeout(module.performance.timer);
|
21316
|
-
module.performance.timer = setTimeout(function () {
|
21666
|
+
module.performance.timer = setTimeout(function () {
|
21667
|
+
module.performance.display();
|
21668
|
+
}, 500);
|
21317
21669
|
},
|
21318
21670
|
display: function () {
|
21319
21671
|
var
|
@@ -21454,9 +21806,15 @@
|
|
21454
21806
|
// search anywhere in value (set to 'exact' to require exact matches
|
21455
21807
|
fullTextSearch: 'exact',
|
21456
21808
|
|
21809
|
+
// Whether search result should highlight matching strings
|
21810
|
+
highlightMatches: false,
|
21811
|
+
|
21457
21812
|
// match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
21458
21813
|
ignoreDiacritics: false,
|
21459
21814
|
|
21815
|
+
// whether to consider case sensitivity on local searching
|
21816
|
+
ignoreSearchCase: true,
|
21817
|
+
|
21460
21818
|
// whether to add events to prompt automatically
|
21461
21819
|
automatic: true,
|
21462
21820
|
|
@@ -21535,6 +21893,7 @@
|
|
21535
21893
|
categoryResults: 'results', // array of results (category view)
|
21536
21894
|
description: 'description', // result description
|
21537
21895
|
image: 'image', // result image
|
21896
|
+
alt: 'alt', // result alt text for image
|
21538
21897
|
price: 'price', // result price
|
21539
21898
|
results: 'results', // array of results (standard)
|
21540
21899
|
title: 'title', // result title
|
@@ -21546,6 +21905,7 @@
|
|
21546
21905
|
|
21547
21906
|
selector: {
|
21548
21907
|
prompt: '.prompt',
|
21908
|
+
remove: '> .icon.input > .remove.icon',
|
21549
21909
|
searchButton: '.search.button',
|
21550
21910
|
results: '.results',
|
21551
21911
|
message: '.results > .message',
|
@@ -21574,8 +21934,9 @@
|
|
21574
21934
|
};
|
21575
21935
|
if (shouldEscape.test(string)) {
|
21576
21936
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
21577
|
-
|
21578
|
-
|
21937
|
+
string = string.replace(badChars, escapedChar);
|
21938
|
+
// FUI controlled HTML is still allowed
|
21939
|
+
string = string.replace(/<(\/)*mark>/g, '<$1mark>');
|
21579
21940
|
}
|
21580
21941
|
|
21581
21942
|
return string;
|
@@ -21621,7 +21982,7 @@
|
|
21621
21982
|
if (result[fields.image] !== undefined) {
|
21622
21983
|
html += ''
|
21623
21984
|
+ '<div class="image">'
|
21624
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
|
21985
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
|
21625
21986
|
+ '</div>';
|
21626
21987
|
}
|
21627
21988
|
html += '<div class="content">';
|
@@ -21674,7 +22035,7 @@
|
|
21674
22035
|
if (result[fields.image] !== undefined) {
|
21675
22036
|
html += ''
|
21676
22037
|
+ '<div class="image">'
|
21677
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
|
22038
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
|
21678
22039
|
+ '</div>';
|
21679
22040
|
}
|
21680
22041
|
html += '<div class="content">';
|
@@ -21719,7 +22080,7 @@
|
|
21719
22080
|
})(jQuery, window, document);
|
21720
22081
|
|
21721
22082
|
/*!
|
21722
|
-
* # Fomantic-UI 2.9.4-beta.
|
22083
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Shape
|
21723
22084
|
* https://github.com/fomantic/Fomantic-UI/
|
21724
22085
|
*
|
21725
22086
|
*
|
@@ -21905,7 +22266,7 @@
|
|
21905
22266
|
set: {
|
21906
22267
|
|
21907
22268
|
defaultSide: function () {
|
21908
|
-
$activeSide = $side.filter('.' +
|
22269
|
+
$activeSide = $side.filter('.' + className.active);
|
21909
22270
|
$nextSide = $activeSide.next(selector.side).length > 0
|
21910
22271
|
? $activeSide.next(selector.side)
|
21911
22272
|
: $side.first();
|
@@ -21931,7 +22292,7 @@
|
|
21931
22292
|
|
21932
22293
|
currentStageSize: function () {
|
21933
22294
|
var
|
21934
|
-
$activeSide = $side.filter('.' +
|
22295
|
+
$activeSide = $side.filter('.' + className.active),
|
21935
22296
|
width = $activeSide.outerWidth(true),
|
21936
22297
|
height = $activeSide.outerHeight(true)
|
21937
22298
|
;
|
@@ -21947,7 +22308,7 @@
|
|
21947
22308
|
var
|
21948
22309
|
$clone = $module.clone().addClass(className.loading),
|
21949
22310
|
$side = $clone.find('>' + selector.sides + '>' + selector.side),
|
21950
|
-
$activeSide = $side.filter('.' +
|
22311
|
+
$activeSide = $side.filter('.' + className.active),
|
21951
22312
|
$nextSide = nextIndex
|
21952
22313
|
? $side.eq(nextIndex)
|
21953
22314
|
: ($activeSide.next(selector.side).length > 0
|
@@ -22343,7 +22704,9 @@
|
|
22343
22704
|
});
|
22344
22705
|
}
|
22345
22706
|
clearTimeout(module.performance.timer);
|
22346
|
-
module.performance.timer = setTimeout(function () {
|
22707
|
+
module.performance.timer = setTimeout(function () {
|
22708
|
+
module.performance.display();
|
22709
|
+
}, 500);
|
22347
22710
|
},
|
22348
22711
|
display: function () {
|
22349
22712
|
var
|
@@ -22515,7 +22878,7 @@
|
|
22515
22878
|
})(jQuery, window, document);
|
22516
22879
|
|
22517
22880
|
/*!
|
22518
|
-
* # Fomantic-UI 2.9.4-beta.
|
22881
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Sidebar
|
22519
22882
|
* https://github.com/fomantic/Fomantic-UI/
|
22520
22883
|
*
|
22521
22884
|
*
|
@@ -23387,7 +23750,9 @@
|
|
23387
23750
|
});
|
23388
23751
|
}
|
23389
23752
|
clearTimeout(module.performance.timer);
|
23390
|
-
module.performance.timer = setTimeout(function () {
|
23753
|
+
module.performance.timer = setTimeout(function () {
|
23754
|
+
module.performance.display();
|
23755
|
+
}, 500);
|
23391
23756
|
},
|
23392
23757
|
display: function () {
|
23393
23758
|
var
|
@@ -23568,7 +23933,7 @@
|
|
23568
23933
|
})(jQuery, window, document);
|
23569
23934
|
|
23570
23935
|
/*!
|
23571
|
-
* # Fomantic-UI 2.9.4-beta.
|
23936
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Sticky
|
23572
23937
|
* https://github.com/fomantic/Fomantic-UI/
|
23573
23938
|
*
|
23574
23939
|
*
|
@@ -24315,7 +24680,9 @@
|
|
24315
24680
|
});
|
24316
24681
|
}
|
24317
24682
|
clearTimeout(module.performance.timer);
|
24318
|
-
module.performance.timer = setTimeout(function () {
|
24683
|
+
module.performance.timer = setTimeout(function () {
|
24684
|
+
module.performance.display();
|
24685
|
+
}, 0);
|
24319
24686
|
},
|
24320
24687
|
display: function () {
|
24321
24688
|
var
|
@@ -24484,7 +24851,7 @@
|
|
24484
24851
|
})(jQuery, window, document);
|
24485
24852
|
|
24486
24853
|
/*!
|
24487
|
-
* # Fomantic-UI 2.9.4-beta.
|
24854
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Tab
|
24488
24855
|
* https://github.com/fomantic/Fomantic-UI/
|
24489
24856
|
*
|
24490
24857
|
*
|
@@ -25273,7 +25640,9 @@
|
|
25273
25640
|
});
|
25274
25641
|
}
|
25275
25642
|
clearTimeout(module.performance.timer);
|
25276
|
-
module.performance.timer = setTimeout(function () {
|
25643
|
+
module.performance.timer = setTimeout(function () {
|
25644
|
+
module.performance.display();
|
25645
|
+
}, 500);
|
25277
25646
|
},
|
25278
25647
|
display: function () {
|
25279
25648
|
var
|
@@ -25450,7 +25819,7 @@
|
|
25450
25819
|
})(jQuery, window, document);
|
25451
25820
|
|
25452
25821
|
/*!
|
25453
|
-
* # Fomantic-UI 2.9.4-beta.
|
25822
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Toast
|
25454
25823
|
* https://github.com/fomantic/Fomantic-UI/
|
25455
25824
|
*
|
25456
25825
|
*
|
@@ -25634,6 +26003,7 @@
|
|
25634
26003
|
$toast.append($('<img>', {
|
25635
26004
|
class: className.image + ' ' + settings.classImage,
|
25636
26005
|
src: settings.showImage,
|
26006
|
+
alt: settings.alt || '',
|
25637
26007
|
}));
|
25638
26008
|
}
|
25639
26009
|
if (settings.title !== '') {
|
@@ -25679,7 +26049,7 @@
|
|
25679
26049
|
$toast.find(selector.icon).attr('class', iconClass + ' ' + className.icon);
|
25680
26050
|
}
|
25681
26051
|
if (settings.showImage) {
|
25682
|
-
$toast.find(selector.image).attr('src', settings.showImage);
|
26052
|
+
$toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
|
25683
26053
|
}
|
25684
26054
|
if (settings.title !== '') {
|
25685
26055
|
$toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
|
@@ -26153,7 +26523,9 @@
|
|
26153
26523
|
});
|
26154
26524
|
}
|
26155
26525
|
clearTimeout(module.performance.timer);
|
26156
|
-
module.performance.timer = setTimeout(function () {
|
26526
|
+
module.performance.timer = setTimeout(function () {
|
26527
|
+
module.performance.display();
|
26528
|
+
}, 500);
|
26157
26529
|
},
|
26158
26530
|
display: function () {
|
26159
26531
|
var
|
@@ -26290,6 +26662,7 @@
|
|
26290
26662
|
actions: false,
|
26291
26663
|
preserveHTML: true,
|
26292
26664
|
showImage: false,
|
26665
|
+
alt: false,
|
26293
26666
|
|
26294
26667
|
// transition settings
|
26295
26668
|
transition: {
|
@@ -26411,7 +26784,7 @@
|
|
26411
26784
|
})(jQuery, window, document);
|
26412
26785
|
|
26413
26786
|
/*!
|
26414
|
-
* # Fomantic-UI 2.9.4-beta.
|
26787
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Transition
|
26415
26788
|
* https://github.com/fomantic/Fomantic-UI/
|
26416
26789
|
*
|
26417
26790
|
*
|
@@ -26554,7 +26927,9 @@
|
|
26554
26927
|
? ($allModules.length - index) * interval
|
26555
26928
|
: index * interval;
|
26556
26929
|
module.debug('Delaying animation by', delay);
|
26557
|
-
setTimeout(function () {
|
26930
|
+
setTimeout(function () {
|
26931
|
+
module.animate();
|
26932
|
+
}, delay);
|
26558
26933
|
},
|
26559
26934
|
|
26560
26935
|
animate: function (overrideSettings) {
|
@@ -27261,7 +27636,9 @@
|
|
27261
27636
|
});
|
27262
27637
|
}
|
27263
27638
|
clearTimeout(module.performance.timer);
|
27264
|
-
module.performance.timer = setTimeout(function () {
|
27639
|
+
module.performance.timer = setTimeout(function () {
|
27640
|
+
module.performance.display();
|
27641
|
+
}, 500);
|
27265
27642
|
},
|
27266
27643
|
display: function () {
|
27267
27644
|
var
|
@@ -27442,7 +27819,7 @@
|
|
27442
27819
|
})(jQuery, window, document);
|
27443
27820
|
|
27444
27821
|
/*!
|
27445
|
-
* # Fomantic-UI 2.9.4-beta.
|
27822
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - API
|
27446
27823
|
* https://github.com/fomantic/Fomantic-UI/
|
27447
27824
|
*
|
27448
27825
|
*
|
@@ -28090,7 +28467,9 @@
|
|
28090
28467
|
module.debug('Adding error state');
|
28091
28468
|
module.set.error();
|
28092
28469
|
if (module.should.removeError()) {
|
28093
|
-
setTimeout(function () {
|
28470
|
+
setTimeout(function () {
|
28471
|
+
module.remove.error();
|
28472
|
+
}, settings.errorDuration);
|
28094
28473
|
}
|
28095
28474
|
}
|
28096
28475
|
module.debug('API Request failed', errorMessage, xhr);
|
@@ -28414,7 +28793,9 @@
|
|
28414
28793
|
});
|
28415
28794
|
}
|
28416
28795
|
clearTimeout(module.performance.timer);
|
28417
|
-
module.performance.timer = setTimeout(function () {
|
28796
|
+
module.performance.timer = setTimeout(function () {
|
28797
|
+
module.performance.display();
|
28798
|
+
}, 500);
|
28418
28799
|
},
|
28419
28800
|
display: function () {
|
28420
28801
|
var
|
@@ -28664,7 +29045,7 @@
|
|
28664
29045
|
})(jQuery, window, document);
|
28665
29046
|
|
28666
29047
|
/*!
|
28667
|
-
* # Fomantic-UI 2.9.4-beta.
|
29048
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - State
|
28668
29049
|
* https://github.com/fomantic/Fomantic-UI/
|
28669
29050
|
*
|
28670
29051
|
*
|
@@ -29147,7 +29528,9 @@
|
|
29147
29528
|
});
|
29148
29529
|
}
|
29149
29530
|
clearTimeout(module.performance.timer);
|
29150
|
-
module.performance.timer = setTimeout(function () {
|
29531
|
+
module.performance.timer = setTimeout(function () {
|
29532
|
+
module.performance.display();
|
29533
|
+
}, 500);
|
29151
29534
|
},
|
29152
29535
|
display: function () {
|
29153
29536
|
var
|
@@ -29360,7 +29743,7 @@
|
|
29360
29743
|
})(jQuery, window, document);
|
29361
29744
|
|
29362
29745
|
/*!
|
29363
|
-
* # Fomantic-UI 2.9.4-beta.
|
29746
|
+
* # Fomantic-UI 2.9.4-beta.100+7f5f82a - Visibility
|
29364
29747
|
* https://github.com/fomantic/Fomantic-UI/
|
29365
29748
|
*
|
29366
29749
|
*
|
@@ -30449,7 +30832,9 @@
|
|
30449
30832
|
});
|
30450
30833
|
}
|
30451
30834
|
clearTimeout(module.performance.timer);
|
30452
|
-
module.performance.timer = setTimeout(function () {
|
30835
|
+
module.performance.timer = setTimeout(function () {
|
30836
|
+
module.performance.display();
|
30837
|
+
}, 500);
|
30453
30838
|
},
|
30454
30839
|
display: function () {
|
30455
30840
|
var
|