fomantic-ui 2.9.1-beta.24 → 2.9.1-beta.25
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/.eslint/eqeqeq-rule.js +18 -0
- package/.eslint/index.js +3 -0
- package/.eslintrc.js +1 -2
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -4
- 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 +17 -17
- 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 +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +18 -17
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- 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 +11 -11
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- 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 +1 -1
- package/dist/components/dimmer.js +9 -9
- package/dist/components/dimmer.min.css +1 -1
- 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 +1 -1
- package/dist/components/dropdown.js +103 -91
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +5 -5
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +10 -10
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +77 -60
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- 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 +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- 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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +4 -4
- 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 +5 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +39 -31
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +12 -12
- 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 +1 -1
- package/dist/components/rating.js +6 -6
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +16 -16
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- 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 +5 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +13 -13
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +4 -4
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +50 -37
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +5 -5
- 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 +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +8 -8
- 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 +17 -17
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- 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 +4 -4
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +8 -8
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +12 -12
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +462 -411
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +16 -16
- package/src/definitions/behaviors/form.js +76 -59
- package/src/definitions/behaviors/state.js +4 -4
- package/src/definitions/behaviors/visibility.js +11 -11
- package/src/definitions/globals/site.js +3 -3
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/calendar.js +17 -16
- package/src/definitions/modules/checkbox.js +10 -10
- package/src/definitions/modules/dimmer.js +8 -8
- package/src/definitions/modules/dropdown.js +102 -90
- package/src/definitions/modules/embed.js +4 -4
- package/src/definitions/modules/flyout.js +9 -9
- package/src/definitions/modules/modal.js +3 -3
- package/src/definitions/modules/nag.js +4 -4
- package/src/definitions/modules/popup.js +38 -30
- package/src/definitions/modules/progress.js +11 -11
- package/src/definitions/modules/rating.js +5 -5
- package/src/definitions/modules/search.js +15 -15
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/sidebar.js +12 -12
- package/src/definitions/modules/slider.js +49 -36
- package/src/definitions/modules/sticky.js +7 -7
- package/src/definitions/modules/tab.js +16 -16
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/transition.js +7 -7
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +1 -1
- package/tasks/admin/distributions/create.js +4 -5
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +1 -1
- package/tasks/config/project/config.js +2 -2
- package/tasks/config/project/install.js +8 -8
- package/tasks/config/project/release.js +1 -1
- package/tasks/config/tasks.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/install.js +2 -2
- package/test/modules/module.spec.js +1 -1
@@ -369,7 +369,7 @@
|
|
369
369
|
|
370
370
|
is: {
|
371
371
|
video: function () {
|
372
|
-
return module.get.type()
|
372
|
+
return module.get.type() === 'video';
|
373
373
|
},
|
374
374
|
},
|
375
375
|
|
@@ -488,17 +488,17 @@
|
|
488
488
|
query = query.split(/[ .]/);
|
489
489
|
maxDepth = query.length - 1;
|
490
490
|
$.each(query, function (depth, value) {
|
491
|
-
var camelCaseValue = depth
|
491
|
+
var camelCaseValue = depth !== maxDepth
|
492
492
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
493
493
|
: query
|
494
494
|
;
|
495
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
495
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
496
496
|
object = object[camelCaseValue];
|
497
497
|
} else if (object[camelCaseValue] !== undefined) {
|
498
498
|
found = object[camelCaseValue];
|
499
499
|
|
500
500
|
return false;
|
501
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
501
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
502
502
|
object = object[value];
|
503
503
|
} else if (object[value] !== undefined) {
|
504
504
|
found = object[value];
|
@@ -166,7 +166,7 @@
|
|
166
166
|
module.setup.cache();
|
167
167
|
});
|
168
168
|
|
169
|
-
if (module.get.direction()
|
169
|
+
if (module.get.direction() === 'left' || module.get.direction() === 'right') {
|
170
170
|
module.setup.heights();
|
171
171
|
module.bind.resize();
|
172
172
|
}
|
@@ -440,7 +440,7 @@
|
|
440
440
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
441
441
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
442
442
|
+ ' }';
|
443
|
-
} else if (direction === 'top' || direction
|
443
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
444
444
|
style += ''
|
445
445
|
+ ' .ui.visible.' + direction + '.flyout ~ .fixed,'
|
446
446
|
+ ' .ui.visible.' + direction + '.flyout ~ .pusher {'
|
@@ -459,7 +459,7 @@
|
|
459
459
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
460
460
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
461
461
|
+ ' }';
|
462
|
-
} else if (direction === 'top' || direction
|
462
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
463
463
|
style += ''
|
464
464
|
+ ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {'
|
465
465
|
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
|
@@ -675,7 +675,7 @@
|
|
675
675
|
$otherFlyouts
|
676
676
|
.flyout('hide', function () {
|
677
677
|
callbackCount++;
|
678
|
-
if (callbackCount
|
678
|
+
if (callbackCount === flyoutCount) {
|
679
679
|
callback();
|
680
680
|
}
|
681
681
|
})
|
@@ -715,7 +715,7 @@
|
|
715
715
|
module.set.dimmed();
|
716
716
|
};
|
717
717
|
transitionEnd = function (event) {
|
718
|
-
if (event.target
|
718
|
+
if (event.target === $module[0]) {
|
719
719
|
$module.off(transitionEvent + elementNamespace, transitionEnd);
|
720
720
|
module.remove.animating();
|
721
721
|
callback.call(element);
|
@@ -756,7 +756,7 @@
|
|
756
756
|
module.remove.visible();
|
757
757
|
};
|
758
758
|
transitionEnd = function (event) {
|
759
|
-
if (event.target
|
759
|
+
if (event.target === $module[0]) {
|
760
760
|
$module.off(transitionEvent + elementNamespace, transitionEnd);
|
761
761
|
module.remove.animating();
|
762
762
|
module.remove.closing();
|
@@ -1242,17 +1242,17 @@
|
|
1242
1242
|
query = query.split(/[ .]/);
|
1243
1243
|
maxDepth = query.length - 1;
|
1244
1244
|
$.each(query, function (depth, value) {
|
1245
|
-
var camelCaseValue = depth
|
1245
|
+
var camelCaseValue = depth !== maxDepth
|
1246
1246
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1247
1247
|
: query
|
1248
1248
|
;
|
1249
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1249
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1250
1250
|
object = object[camelCaseValue];
|
1251
1251
|
} else if (object[camelCaseValue] !== undefined) {
|
1252
1252
|
found = object[camelCaseValue];
|
1253
1253
|
|
1254
1254
|
return false;
|
1255
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1255
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1256
1256
|
object = object[value];
|
1257
1257
|
} else if (object[value] !== undefined) {
|
1258
1258
|
found = object[value];
|
@@ -1248,16 +1248,16 @@
|
|
1248
1248
|
query = query.split(/[ .]/);
|
1249
1249
|
maxDepth = query.length - 1;
|
1250
1250
|
$.each(query, function (depth, value) {
|
1251
|
-
var camelCaseValue = depth
|
1251
|
+
var camelCaseValue = depth !== maxDepth
|
1252
1252
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1253
1253
|
: query;
|
1254
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1254
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1255
1255
|
object = object[camelCaseValue];
|
1256
1256
|
} else if (object[camelCaseValue] !== undefined) {
|
1257
1257
|
found = object[camelCaseValue];
|
1258
1258
|
|
1259
1259
|
return false;
|
1260
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1260
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1261
1261
|
object = object[value];
|
1262
1262
|
} else if (object[value] !== undefined) {
|
1263
1263
|
found = object[value];
|
@@ -279,7 +279,7 @@
|
|
279
279
|
storedValue = null;
|
280
280
|
}
|
281
281
|
}
|
282
|
-
if (storedValue
|
282
|
+
if (storedValue === 'undefined' || storedValue === 'null' || storedValue === undefined || storedValue === null) {
|
283
283
|
storedValue = undefined;
|
284
284
|
}
|
285
285
|
|
@@ -409,17 +409,17 @@
|
|
409
409
|
query = query.split(/[ .]/);
|
410
410
|
maxDepth = query.length - 1;
|
411
411
|
$.each(query, function (depth, value) {
|
412
|
-
var camelCaseValue = depth
|
412
|
+
var camelCaseValue = depth !== maxDepth
|
413
413
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
414
414
|
: query
|
415
415
|
;
|
416
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
416
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
417
417
|
object = object[camelCaseValue];
|
418
418
|
} else if (object[camelCaseValue] !== undefined) {
|
419
419
|
found = object[camelCaseValue];
|
420
420
|
|
421
421
|
return false;
|
422
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
422
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
423
423
|
object = object[value];
|
424
424
|
} else if (object[value] !== undefined) {
|
425
425
|
found = object[value];
|
@@ -212,7 +212,7 @@
|
|
212
212
|
[].forEach.call(mutations, function (mutation) {
|
213
213
|
if (mutation.removedNodes) {
|
214
214
|
[].forEach.call(mutation.removedNodes, function (node) {
|
215
|
-
if (node
|
215
|
+
if (node === element || $(node).find(element).length > 0) {
|
216
216
|
module.debug('Element removed from DOM, tearing down events');
|
217
217
|
module.destroy();
|
218
218
|
}
|
@@ -497,7 +497,7 @@
|
|
497
497
|
var
|
498
498
|
$popupOffsetParent = module.get.offsetParent($popup),
|
499
499
|
targetElement = $target[0],
|
500
|
-
isWindowEl = $boundary[0]
|
500
|
+
isWindowEl = $boundary[0] === window,
|
501
501
|
targetOffset = $target.offset(),
|
502
502
|
parentOffset = settings.inline || (settings.popup && settings.movePopup)
|
503
503
|
? $target.offsetParent().offset()
|
@@ -587,10 +587,10 @@
|
|
587
587
|
return id;
|
588
588
|
},
|
589
589
|
startEvent: function () {
|
590
|
-
if (settings.on
|
590
|
+
if (settings.on === 'hover') {
|
591
591
|
return 'mouseenter';
|
592
592
|
}
|
593
|
-
if (settings.on
|
593
|
+
if (settings.on === 'focus') {
|
594
594
|
return 'focus';
|
595
595
|
}
|
596
596
|
|
@@ -600,10 +600,10 @@
|
|
600
600
|
return 'scroll';
|
601
601
|
},
|
602
602
|
endEvent: function () {
|
603
|
-
if (settings.on
|
603
|
+
if (settings.on === 'hover') {
|
604
604
|
return 'mouseleave';
|
605
605
|
}
|
606
|
-
if (settings.on
|
606
|
+
if (settings.on === 'focus') {
|
607
607
|
return 'blur';
|
608
608
|
}
|
609
609
|
|
@@ -698,7 +698,7 @@
|
|
698
698
|
'bottom left': 'left center',
|
699
699
|
'left center': 'top left',
|
700
700
|
},
|
701
|
-
adjacentsAvailable = verticalPosition
|
701
|
+
adjacentsAvailable = verticalPosition === 'top' || verticalPosition === 'bottom',
|
702
702
|
oppositeTried = false,
|
703
703
|
adjacentTried = false,
|
704
704
|
nextPosition = false
|
@@ -764,11 +764,11 @@
|
|
764
764
|
|
765
765
|
if (module.should.centerArrow(calculations)) {
|
766
766
|
module.verbose('Adjusting offset to center arrow on small target element');
|
767
|
-
if (position
|
767
|
+
if (position === 'top left' || position === 'bottom left') {
|
768
768
|
offset += target.width / 2;
|
769
769
|
offset -= settings.arrowPixelsFromEdge;
|
770
770
|
}
|
771
|
-
if (position
|
771
|
+
if (position === 'top right' || position === 'bottom right') {
|
772
772
|
offset -= target.width / 2;
|
773
773
|
offset += settings.arrowPixelsFromEdge;
|
774
774
|
}
|
@@ -782,10 +782,10 @@
|
|
782
782
|
|
783
783
|
if (settings.inline) {
|
784
784
|
module.debug('Adding margin to calculation', target.margin);
|
785
|
-
if (position
|
785
|
+
if (position === 'left center' || position === 'right center') {
|
786
786
|
offset += target.margin.top;
|
787
787
|
distanceAway += -target.margin.left;
|
788
|
-
} else if (position
|
788
|
+
} else if (position === 'top left' || position === 'top center' || position === 'top right') {
|
789
789
|
offset += target.margin.left;
|
790
790
|
distanceAway -= target.margin.top;
|
791
791
|
} else {
|
@@ -798,7 +798,7 @@
|
|
798
798
|
|
799
799
|
if (module.is.rtl()) {
|
800
800
|
position = position.replace(/left|right/g, function (match) {
|
801
|
-
return match
|
801
|
+
return match === 'left'
|
802
802
|
? 'right'
|
803
803
|
: 'left';
|
804
804
|
});
|
@@ -806,12 +806,12 @@
|
|
806
806
|
}
|
807
807
|
|
808
808
|
// if last attempt use specified last resort position
|
809
|
-
if (searchDepth
|
809
|
+
if (searchDepth === settings.maxSearchDepth && typeof settings.lastResort === 'string') {
|
810
810
|
position = settings.lastResort;
|
811
811
|
}
|
812
812
|
|
813
813
|
switch (position) {
|
814
|
-
case 'top left':
|
814
|
+
case 'top left': {
|
815
815
|
positioning = {
|
816
816
|
top: 'auto',
|
817
817
|
bottom: parent.height - target.top + distanceAway,
|
@@ -820,7 +820,8 @@
|
|
820
820
|
};
|
821
821
|
|
822
822
|
break;
|
823
|
-
|
823
|
+
}
|
824
|
+
case 'top center': {
|
824
825
|
positioning = {
|
825
826
|
bottom: parent.height - target.top + distanceAway,
|
826
827
|
left: target.left + (target.width / 2) - (popup.width / 2) + offset,
|
@@ -829,7 +830,8 @@
|
|
829
830
|
};
|
830
831
|
|
831
832
|
break;
|
832
|
-
|
833
|
+
}
|
834
|
+
case 'top right': {
|
833
835
|
positioning = {
|
834
836
|
bottom: parent.height - target.top + distanceAway,
|
835
837
|
right: parent.width - target.left - target.width - offset,
|
@@ -838,7 +840,8 @@
|
|
838
840
|
};
|
839
841
|
|
840
842
|
break;
|
841
|
-
|
843
|
+
}
|
844
|
+
case 'left center': {
|
842
845
|
positioning = {
|
843
846
|
top: target.top + (target.height / 2) - (popup.height / 2) + offset,
|
844
847
|
right: parent.width - target.left + distanceAway,
|
@@ -847,7 +850,8 @@
|
|
847
850
|
};
|
848
851
|
|
849
852
|
break;
|
850
|
-
|
853
|
+
}
|
854
|
+
case 'right center': {
|
851
855
|
positioning = {
|
852
856
|
top: target.top + (target.height / 2) - (popup.height / 2) + offset,
|
853
857
|
left: target.left + target.width + distanceAway,
|
@@ -856,7 +860,8 @@
|
|
856
860
|
};
|
857
861
|
|
858
862
|
break;
|
859
|
-
|
863
|
+
}
|
864
|
+
case 'bottom left': {
|
860
865
|
positioning = {
|
861
866
|
top: target.top + target.height + distanceAway,
|
862
867
|
left: target.left + offset,
|
@@ -865,7 +870,8 @@
|
|
865
870
|
};
|
866
871
|
|
867
872
|
break;
|
868
|
-
|
873
|
+
}
|
874
|
+
case 'bottom center': {
|
869
875
|
positioning = {
|
870
876
|
top: target.top + target.height + distanceAway,
|
871
877
|
left: target.left + (target.width / 2) - (popup.width / 2) + offset,
|
@@ -874,7 +880,8 @@
|
|
874
880
|
};
|
875
881
|
|
876
882
|
break;
|
877
|
-
|
883
|
+
}
|
884
|
+
case 'bottom right': {
|
878
885
|
positioning = {
|
879
886
|
top: target.top + target.height + distanceAway,
|
880
887
|
right: parent.width - target.left - target.width - offset,
|
@@ -883,6 +890,7 @@
|
|
883
890
|
};
|
884
891
|
|
885
892
|
break;
|
893
|
+
}
|
886
894
|
}
|
887
895
|
if (positioning === undefined) {
|
888
896
|
module.error(error.invalidPosition, position);
|
@@ -980,12 +988,12 @@
|
|
980
988
|
bind: {
|
981
989
|
events: function () {
|
982
990
|
module.debug('Binding popup events to module');
|
983
|
-
if (settings.on
|
991
|
+
if (settings.on === 'click') {
|
984
992
|
$module
|
985
993
|
.on(clickEvent + eventNamespace, module.toggle)
|
986
994
|
;
|
987
995
|
}
|
988
|
-
if (settings.on
|
996
|
+
if (settings.on === 'hover') {
|
989
997
|
$module
|
990
998
|
.on('touchstart' + eventNamespace, module.event.touchstart)
|
991
999
|
;
|
@@ -1011,12 +1019,12 @@
|
|
1011
1019
|
}
|
1012
1020
|
},
|
1013
1021
|
close: function () {
|
1014
|
-
if (settings.hideOnScroll === true || (settings.hideOnScroll
|
1022
|
+
if (settings.hideOnScroll === true || (settings.hideOnScroll === 'auto' && settings.on !== 'click')) {
|
1015
1023
|
module.bind.closeOnScroll();
|
1016
1024
|
}
|
1017
1025
|
if (module.is.closable()) {
|
1018
1026
|
module.bind.clickaway();
|
1019
|
-
} else if (settings.on
|
1027
|
+
} else if (settings.on === 'hover' && openedWithTouch) {
|
1020
1028
|
module.bind.touchClose();
|
1021
1029
|
}
|
1022
1030
|
},
|
@@ -1079,8 +1087,8 @@
|
|
1079
1087
|
|
1080
1088
|
is: {
|
1081
1089
|
closable: function () {
|
1082
|
-
if (settings.closable
|
1083
|
-
return settings.on
|
1090
|
+
if (settings.closable === 'auto') {
|
1091
|
+
return settings.on !== 'hover';
|
1084
1092
|
}
|
1085
1093
|
|
1086
1094
|
return settings.closable;
|
@@ -1248,17 +1256,17 @@
|
|
1248
1256
|
query = query.split(/[ .]/);
|
1249
1257
|
maxDepth = query.length - 1;
|
1250
1258
|
$.each(query, function (depth, value) {
|
1251
|
-
var camelCaseValue = depth
|
1259
|
+
var camelCaseValue = depth !== maxDepth
|
1252
1260
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1253
1261
|
: query
|
1254
1262
|
;
|
1255
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1263
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1256
1264
|
object = object[camelCaseValue];
|
1257
1265
|
} else if (object[camelCaseValue] !== undefined) {
|
1258
1266
|
found = object[camelCaseValue];
|
1259
1267
|
|
1260
1268
|
return false;
|
1261
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1269
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1262
1270
|
object = object[value];
|
1263
1271
|
} else if (object[value] !== undefined) {
|
1264
1272
|
found = object[value];
|
@@ -309,7 +309,7 @@
|
|
309
309
|
},
|
310
310
|
|
311
311
|
updateInterval: function () {
|
312
|
-
if (settings.updateInterval
|
312
|
+
if (settings.updateInterval === 'auto') {
|
313
313
|
return settings.duration;
|
314
314
|
}
|
315
315
|
|
@@ -460,7 +460,7 @@
|
|
460
460
|
if (isMultiple && allZero) {
|
461
461
|
$bar.css('background', 'transparent');
|
462
462
|
}
|
463
|
-
if (firstNonZeroIndex
|
463
|
+
if (firstNonZeroIndex === -1) {
|
464
464
|
firstNonZeroIndex = index;
|
465
465
|
}
|
466
466
|
lastNonZeroIndex = index;
|
@@ -475,10 +475,10 @@
|
|
475
475
|
values.forEach(function (_, index) {
|
476
476
|
var $bar = $($bars[index]);
|
477
477
|
$bar.css({
|
478
|
-
borderTopLeftRadius: index
|
479
|
-
borderBottomLeftRadius: index
|
480
|
-
borderTopRightRadius: index
|
481
|
-
borderBottomRightRadius: index
|
478
|
+
borderTopLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
479
|
+
borderBottomLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
480
|
+
borderTopRightRadius: index === lastNonZeroIndex ? '' : '0',
|
481
|
+
borderBottomRightRadius: index === lastNonZeroIndex ? '' : '0',
|
482
482
|
});
|
483
483
|
});
|
484
484
|
$module
|
@@ -610,10 +610,10 @@
|
|
610
610
|
var $progress = $(element);
|
611
611
|
if (text !== undefined) {
|
612
612
|
$progress.text(module.get.text(text, index));
|
613
|
-
} else if (settings.label
|
613
|
+
} else if (settings.label === 'ratio' && module.has.total()) {
|
614
614
|
module.verbose('Adding ratio to bar label');
|
615
615
|
$progress.text(module.get.text(settings.text.ratio, index));
|
616
|
-
} else if (settings.label
|
616
|
+
} else if (settings.label === 'percent') {
|
617
617
|
module.verbose('Adding percentage to bar label');
|
618
618
|
$progress.text(module.get.text(settings.text.percent, index));
|
619
619
|
}
|
@@ -862,17 +862,17 @@
|
|
862
862
|
query = query.split(/[ .]/);
|
863
863
|
maxDepth = query.length - 1;
|
864
864
|
$.each(query, function (depth, value) {
|
865
|
-
var camelCaseValue = depth
|
865
|
+
var camelCaseValue = depth !== maxDepth
|
866
866
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
867
867
|
: query
|
868
868
|
;
|
869
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
869
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
870
870
|
object = object[camelCaseValue];
|
871
871
|
} else if (object[camelCaseValue] !== undefined) {
|
872
872
|
found = object[camelCaseValue];
|
873
873
|
|
874
874
|
return false;
|
875
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
875
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
876
876
|
object = object[value];
|
877
877
|
} else if (object[value] !== undefined) {
|
878
878
|
found = object[value];
|
@@ -143,11 +143,11 @@
|
|
143
143
|
$activeIcon = $(this),
|
144
144
|
currentRating = module.get.rating(),
|
145
145
|
rating = $icon.index($activeIcon) + 1,
|
146
|
-
canClear = settings.clearable
|
146
|
+
canClear = settings.clearable === 'auto'
|
147
147
|
? $icon.length === 1
|
148
148
|
: settings.clearable
|
149
149
|
;
|
150
|
-
if (canClear && currentRating
|
150
|
+
if (canClear && currentRating === rating) {
|
151
151
|
module.clearRating();
|
152
152
|
} else {
|
153
153
|
module.set.rating(rating);
|
@@ -414,17 +414,17 @@
|
|
414
414
|
query = query.split(/[ .]/);
|
415
415
|
maxDepth = query.length - 1;
|
416
416
|
$.each(query, function (depth, value) {
|
417
|
-
var camelCaseValue = depth
|
417
|
+
var camelCaseValue = depth !== maxDepth
|
418
418
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
419
419
|
: query
|
420
420
|
;
|
421
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
421
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
422
422
|
object = object[camelCaseValue];
|
423
423
|
} else if (object[camelCaseValue] !== undefined) {
|
424
424
|
found = object[camelCaseValue];
|
425
425
|
|
426
426
|
return false;
|
427
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
427
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
428
428
|
object = object[value];
|
429
429
|
} else if (object[value] !== undefined) {
|
430
430
|
found = object[value];
|
@@ -237,7 +237,7 @@
|
|
237
237
|
if (href) {
|
238
238
|
event.preventDefault();
|
239
239
|
module.verbose('Opening search link found in result', $link);
|
240
|
-
if (target
|
240
|
+
if (target === '_blank' || event.ctrlKey) {
|
241
241
|
window.open(href);
|
242
242
|
} else {
|
243
243
|
window.location.href = href;
|
@@ -289,7 +289,7 @@
|
|
289
289
|
newIndex
|
290
290
|
;
|
291
291
|
// search shortcuts
|
292
|
-
if (keyCode
|
292
|
+
if (keyCode === keys.escape) {
|
293
293
|
if (!module.is.visible()) {
|
294
294
|
module.verbose('Escape key pressed, blurring search field');
|
295
295
|
$prompt.trigger('blur');
|
@@ -300,7 +300,7 @@
|
|
300
300
|
resultsDismissed = true;
|
301
301
|
}
|
302
302
|
if (module.is.visible()) {
|
303
|
-
if (keyCode
|
303
|
+
if (keyCode === keys.enter) {
|
304
304
|
module.verbose('Enter key pressed, selecting active result');
|
305
305
|
if ($result.filter('.' + className.active).length > 0) {
|
306
306
|
module.event.result.click.call($result.filter('.' + className.active), event);
|
@@ -308,7 +308,7 @@
|
|
308
308
|
|
309
309
|
return false;
|
310
310
|
}
|
311
|
-
} else if (keyCode
|
311
|
+
} else if (keyCode === keys.upArrow && hasActiveResult) {
|
312
312
|
module.verbose('Up key pressed, changing active result');
|
313
313
|
newIndex = currentIndex - 1 < 0
|
314
314
|
? currentIndex
|
@@ -325,7 +325,7 @@
|
|
325
325
|
;
|
326
326
|
module.ensureVisible($result.eq(newIndex));
|
327
327
|
event.preventDefault();
|
328
|
-
} else if (keyCode
|
328
|
+
} else if (keyCode === keys.downArrow) {
|
329
329
|
module.verbose('Down key pressed, changing active result');
|
330
330
|
newIndex = currentIndex + 1 >= resultSize
|
331
331
|
? currentIndex
|
@@ -345,7 +345,7 @@
|
|
345
345
|
}
|
346
346
|
} else {
|
347
347
|
// query shortcuts
|
348
|
-
if (keyCode
|
348
|
+
if (keyCode === keys.enter) {
|
349
349
|
module.verbose('Enter key pressed, executing query');
|
350
350
|
module.query();
|
351
351
|
module.set.buttonPressed();
|
@@ -596,7 +596,7 @@
|
|
596
596
|
module.debug('Using specified max results', results);
|
597
597
|
results = results.slice(0, settings.maxResults);
|
598
598
|
}
|
599
|
-
if (settings.type
|
599
|
+
if (settings.type === 'category') {
|
600
600
|
results = module.create.categoryResults(results);
|
601
601
|
}
|
602
602
|
searchHTML = module.generateResults({
|
@@ -634,9 +634,9 @@
|
|
634
634
|
// avoid duplicates when pushing results
|
635
635
|
addResult = function (array, result) {
|
636
636
|
var
|
637
|
-
notResult = $.inArray(result, results)
|
638
|
-
notFuzzyResult = $.inArray(result, fuzzyResults)
|
639
|
-
notExactResults = $.inArray(result, exactResults)
|
637
|
+
notResult = $.inArray(result, results) === -1,
|
638
|
+
notFuzzyResult = $.inArray(result, fuzzyResults) === -1,
|
639
|
+
notExactResults = $.inArray(result, exactResults) === -1
|
640
640
|
;
|
641
641
|
if (notResult && notFuzzyResult && notExactResults) {
|
642
642
|
array.push(result);
|
@@ -782,7 +782,7 @@
|
|
782
782
|
html = $results.html()
|
783
783
|
;
|
784
784
|
|
785
|
-
return html
|
785
|
+
return html !== '';
|
786
786
|
},
|
787
787
|
},
|
788
788
|
|
@@ -1052,7 +1052,7 @@
|
|
1052
1052
|
if (isProperObject || isProperArray) {
|
1053
1053
|
if (settings.maxResults > 0) {
|
1054
1054
|
if (isProperObject) {
|
1055
|
-
if (settings.type
|
1055
|
+
if (settings.type === 'standard') {
|
1056
1056
|
module.error(error.maxResults);
|
1057
1057
|
}
|
1058
1058
|
} else {
|
@@ -1190,17 +1190,17 @@
|
|
1190
1190
|
query = query.split(/[ .]/);
|
1191
1191
|
maxDepth = query.length - 1;
|
1192
1192
|
$.each(query, function (depth, value) {
|
1193
|
-
var camelCaseValue = depth
|
1193
|
+
var camelCaseValue = depth !== maxDepth
|
1194
1194
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1195
1195
|
: query
|
1196
1196
|
;
|
1197
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1197
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1198
1198
|
object = object[camelCaseValue];
|
1199
1199
|
} else if (object[camelCaseValue] !== undefined) {
|
1200
1200
|
found = object[camelCaseValue];
|
1201
1201
|
|
1202
1202
|
return false;
|
1203
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1203
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1204
1204
|
object = object[value];
|
1205
1205
|
} else if (object[value] !== undefined) {
|
1206
1206
|
found = object[value];
|
@@ -185,7 +185,7 @@
|
|
185
185
|
|
186
186
|
is: {
|
187
187
|
complete: function () {
|
188
|
-
return $side.filter('.' + className.active)[0]
|
188
|
+
return $side.filter('.' + className.active)[0] === $nextSide[0];
|
189
189
|
},
|
190
190
|
animating: function () {
|
191
191
|
return $module.hasClass(className.animating);
|
@@ -704,17 +704,17 @@
|
|
704
704
|
query = query.split(/[ .]/);
|
705
705
|
maxDepth = query.length - 1;
|
706
706
|
$.each(query, function (depth, value) {
|
707
|
-
var camelCaseValue = depth
|
707
|
+
var camelCaseValue = depth !== maxDepth
|
708
708
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
709
709
|
: query
|
710
710
|
;
|
711
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
711
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
712
712
|
object = object[camelCaseValue];
|
713
713
|
} else if (object[camelCaseValue] !== undefined) {
|
714
714
|
found = object[camelCaseValue];
|
715
715
|
|
716
716
|
return false;
|
717
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
717
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
718
718
|
object = object[value];
|
719
719
|
} else if (object[value] !== undefined) {
|
720
720
|
found = object[value];
|