fomantic-ui 2.9.1-beta.14 → 2.9.1-beta.16
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/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +14 -12
- 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 +15 -12
- 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 +21 -21
- 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 +7 -7
- 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 +8 -8
- 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 +23 -23
- 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 +4 -4
- 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 +26 -24
- 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 +15 -15
- 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 +138 -8
- 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 +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 +30 -28
- 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 +6 -6
- 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 +9 -9
- 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 +8 -8
- 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 +4 -4
- 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 +12 -12
- 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 +9 -9
- 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 +10 -15
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +18 -13
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +4 -4
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +4 -1
- package/dist/components/statistic.min.css +2 -2
- 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 +10 -9
- 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 +11 -11
- 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 +28 -25
- 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 +4 -4
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +5 -5
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +258 -57
- package/dist/semantic.js +307 -294
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +2 -2
- package/src/definitions/behaviors/api.js +14 -11
- package/src/definitions/behaviors/form.js +14 -14
- package/src/definitions/behaviors/state.js +3 -3
- package/src/definitions/behaviors/visibility.js +4 -4
- package/src/definitions/elements/input.less +14 -5
- package/src/definitions/globals/site.js +9 -14
- package/src/definitions/modules/accordion.js +13 -11
- package/src/definitions/modules/calendar.js +20 -20
- package/src/definitions/modules/checkbox.js +6 -6
- package/src/definitions/modules/dimmer.js +7 -7
- package/src/definitions/modules/dropdown.js +22 -22
- package/src/definitions/modules/embed.js +3 -3
- package/src/definitions/modules/flyout.js +25 -23
- package/src/definitions/modules/modal.js +29 -27
- package/src/definitions/modules/nag.js +5 -5
- package/src/definitions/modules/popup.js +8 -8
- package/src/definitions/modules/progress.js +7 -7
- package/src/definitions/modules/rating.js +3 -3
- package/src/definitions/modules/search.js +11 -11
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/sidebar.js +8 -8
- package/src/definitions/modules/slider.js +17 -12
- package/src/definitions/modules/sticky.js +9 -8
- package/src/definitions/modules/tab.js +10 -10
- package/src/definitions/modules/toast.js +27 -24
- package/src/definitions/modules/transition.js +3 -3
- package/src/definitions/views/statistic.less +5 -0
- package/src/themes/default/globals/variation.variables +1 -0
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -475,10 +475,10 @@ $.fn.progress = function(parameters) {
|
|
475
475
|
values.forEach(function(_, index) {
|
476
476
|
var $bar = $($bars[index]);
|
477
477
|
$bar.css({
|
478
|
-
borderTopLeftRadius: index == firstNonZeroIndex ? '' : 0,
|
479
|
-
borderBottomLeftRadius: index == firstNonZeroIndex ? '' : 0,
|
480
|
-
borderTopRightRadius: index == lastNonZeroIndex ? '' : 0,
|
481
|
-
borderBottomRightRadius: index == lastNonZeroIndex ? '' : 0
|
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
|
@@ -906,7 +906,7 @@ $.fn.progress = function(parameters) {
|
|
906
906
|
}
|
907
907
|
});
|
908
908
|
}
|
909
|
-
if (
|
909
|
+
if ( isFunction( found ) ) {
|
910
910
|
response = found.apply(context, passedArguments);
|
911
911
|
}
|
912
912
|
else if(found !== undefined) {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -447,7 +447,7 @@ $.fn.rating = function(parameters) {
|
|
447
447
|
}
|
448
448
|
});
|
449
449
|
}
|
450
|
-
if (
|
450
|
+
if ( isFunction( found ) ) {
|
451
451
|
response = found.apply(context, passedArguments);
|
452
452
|
}
|
453
453
|
else if(found !== undefined) {
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
17
|
};
|
18
18
|
|
@@ -188,7 +188,7 @@ $.fn.search = function(parameters) {
|
|
188
188
|
$module
|
189
189
|
.one('click.close' + eventNamespace, selector.results, function(event) {
|
190
190
|
if(module.is.inMessage(event) || disabledBubbled) {
|
191
|
-
$prompt.focus
|
191
|
+
$prompt.trigger('focus');
|
192
192
|
return;
|
193
193
|
}
|
194
194
|
disabledBubbled = false;
|
@@ -228,7 +228,7 @@ $.fn.search = function(parameters) {
|
|
228
228
|
result = $result.data(metadata.result) || module.get.result(value, results)
|
229
229
|
;
|
230
230
|
var oldValue = module.get.value();
|
231
|
-
if(
|
231
|
+
if( isFunction(settings.onSelect) ) {
|
232
232
|
if(settings.onSelect.call(element, result, results) === false) {
|
233
233
|
module.debug('Custom onSelect callback cancelled default select action');
|
234
234
|
disabledBubbled = true;
|
@@ -295,7 +295,7 @@ $.fn.search = function(parameters) {
|
|
295
295
|
if(keyCode == keys.escape) {
|
296
296
|
if(!module.is.visible()) {
|
297
297
|
module.verbose('Escape key pressed, blurring search field');
|
298
|
-
$prompt.blur
|
298
|
+
$prompt.trigger('blur');
|
299
299
|
} else {
|
300
300
|
module.hideResults();
|
301
301
|
}
|
@@ -557,7 +557,7 @@ $.fn.search = function(parameters) {
|
|
557
557
|
},
|
558
558
|
|
559
559
|
query: function(callback) {
|
560
|
-
callback =
|
560
|
+
callback = isFunction(callback)
|
561
561
|
? callback
|
562
562
|
: function(){}
|
563
563
|
;
|
@@ -623,7 +623,7 @@ $.fn.search = function(parameters) {
|
|
623
623
|
});
|
624
624
|
},
|
625
625
|
remote: function(searchTerm, callback) {
|
626
|
-
callback =
|
626
|
+
callback = isFunction(callback)
|
627
627
|
? callback
|
628
628
|
: function(){}
|
629
629
|
;
|
@@ -956,7 +956,7 @@ $.fn.search = function(parameters) {
|
|
956
956
|
},
|
957
957
|
|
958
958
|
addResults: function(html) {
|
959
|
-
if(
|
959
|
+
if( isFunction(settings.onResultsAdd) ) {
|
960
960
|
if( settings.onResultsAdd.call($results, html) === false ) {
|
961
961
|
module.debug('onResultsAdd callback cancelled default action');
|
962
962
|
return false;
|
@@ -980,7 +980,7 @@ $.fn.search = function(parameters) {
|
|
980
980
|
},
|
981
981
|
|
982
982
|
showResults: function(callback) {
|
983
|
-
callback =
|
983
|
+
callback = isFunction(callback)
|
984
984
|
? callback
|
985
985
|
: function(){}
|
986
986
|
;
|
@@ -1019,7 +1019,7 @@ $.fn.search = function(parameters) {
|
|
1019
1019
|
}
|
1020
1020
|
},
|
1021
1021
|
hideResults: function(callback) {
|
1022
|
-
callback =
|
1022
|
+
callback = isFunction(callback)
|
1023
1023
|
? callback
|
1024
1024
|
: function(){}
|
1025
1025
|
;
|
@@ -1070,7 +1070,7 @@ $.fn.search = function(parameters) {
|
|
1070
1070
|
response[fields.results] = response[fields.results].slice(0, settings.maxResults);
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
|
-
if(
|
1073
|
+
if(isFunction(template)) {
|
1074
1074
|
html = template(response, fields, settings.preserveHTML);
|
1075
1075
|
}
|
1076
1076
|
else {
|
@@ -1231,7 +1231,7 @@ $.fn.search = function(parameters) {
|
|
1231
1231
|
}
|
1232
1232
|
});
|
1233
1233
|
}
|
1234
|
-
if(
|
1234
|
+
if( isFunction( found ) ) {
|
1235
1235
|
response = found.apply(context, passedArguments);
|
1236
1236
|
}
|
1237
1237
|
else if(found !== undefined) {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -735,7 +735,7 @@ $.fn.shape = function(parameters) {
|
|
735
735
|
}
|
736
736
|
});
|
737
737
|
}
|
738
|
-
if (
|
738
|
+
if ( isFunction( found ) ) {
|
739
739
|
response = found.apply(context, passedArguments);
|
740
740
|
}
|
741
741
|
else if(found !== undefined) {
|
@@ -760,7 +760,7 @@ $.fn.shape = function(parameters) {
|
|
760
760
|
}
|
761
761
|
var $inputs = $module.find('input');
|
762
762
|
if( $inputs.length > 0) {
|
763
|
-
$inputs.blur
|
763
|
+
$inputs.trigger('blur');
|
764
764
|
setTimeout(function(){
|
765
765
|
module.invoke(query);
|
766
766
|
}, 150);
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -361,7 +361,7 @@ $.fn.sidebar = function(parameters) {
|
|
361
361
|
var
|
362
362
|
$toggle = $(selector)
|
363
363
|
;
|
364
|
-
event =
|
364
|
+
event = isFunction(module[event])
|
365
365
|
? module[event]
|
366
366
|
: module.toggle
|
367
367
|
;
|
@@ -392,7 +392,7 @@ $.fn.sidebar = function(parameters) {
|
|
392
392
|
}
|
393
393
|
},
|
394
394
|
show: function(callback) {
|
395
|
-
callback =
|
395
|
+
callback = isFunction(callback)
|
396
396
|
? callback
|
397
397
|
: function(){}
|
398
398
|
;
|
@@ -435,7 +435,7 @@ $.fn.sidebar = function(parameters) {
|
|
435
435
|
},
|
436
436
|
|
437
437
|
hide: function(callback) {
|
438
|
-
callback =
|
438
|
+
callback = isFunction(callback)
|
439
439
|
? callback
|
440
440
|
: function(){}
|
441
441
|
;
|
@@ -497,7 +497,7 @@ $.fn.sidebar = function(parameters) {
|
|
497
497
|
dim,
|
498
498
|
transitionEnd
|
499
499
|
;
|
500
|
-
callback =
|
500
|
+
callback = isFunction(callback)
|
501
501
|
? callback
|
502
502
|
: function(){}
|
503
503
|
;
|
@@ -543,7 +543,7 @@ $.fn.sidebar = function(parameters) {
|
|
543
543
|
animate,
|
544
544
|
transitionEnd
|
545
545
|
;
|
546
|
-
callback =
|
546
|
+
callback = isFunction(callback)
|
547
547
|
? callback
|
548
548
|
: function(){}
|
549
549
|
;
|
@@ -1005,7 +1005,7 @@ $.fn.sidebar = function(parameters) {
|
|
1005
1005
|
}
|
1006
1006
|
});
|
1007
1007
|
}
|
1008
|
-
if (
|
1008
|
+
if ( isFunction( found ) ) {
|
1009
1009
|
response = found.apply(context, passedArguments);
|
1010
1010
|
}
|
1011
1011
|
else if(found !== undefined) {
|
@@ -12,6 +12,10 @@
|
|
12
12
|
|
13
13
|
"use strict";
|
14
14
|
|
15
|
+
function isFunction(obj) {
|
16
|
+
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
+
}
|
18
|
+
|
15
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
16
20
|
? window
|
17
21
|
: (typeof self != 'undefined' && self.Math == Math)
|
@@ -23,6 +27,7 @@ $.fn.slider = function(parameters) {
|
|
23
27
|
|
24
28
|
var
|
25
29
|
$allModules = $(this),
|
30
|
+
$document = $(document),
|
26
31
|
$window = $(window),
|
27
32
|
|
28
33
|
moduleSelector = $allModules.selector || '',
|
@@ -236,7 +241,7 @@ $.fn.slider = function(parameters) {
|
|
236
241
|
$module.on('keydown' + eventNamespace, module.event.keydown);
|
237
242
|
},
|
238
243
|
globalKeyboardEvents: function() {
|
239
|
-
$
|
244
|
+
$document.on('keydown' + eventNamespace + documentEventID, module.event.activateFocus);
|
240
245
|
},
|
241
246
|
mouseEvents: function() {
|
242
247
|
module.verbose('Binding mouse and touch events');
|
@@ -264,8 +269,8 @@ $.fn.slider = function(parameters) {
|
|
264
269
|
slidingEvents: function() {
|
265
270
|
// these don't need the identifier because we only ever want one of them to be registered with document
|
266
271
|
module.verbose('Binding page wide events while handle is being draged');
|
267
|
-
$
|
268
|
-
$
|
272
|
+
$document.on('mousemove' + eventNamespace, module.event.move);
|
273
|
+
$document.on('mouseup' + eventNamespace, module.event.up);
|
269
274
|
},
|
270
275
|
windowEvents: function() {
|
271
276
|
$window.on('resize' + eventNamespace, module.event.resize);
|
@@ -285,12 +290,12 @@ $.fn.slider = function(parameters) {
|
|
285
290
|
.off('touchcancel' + eventNamespace);
|
286
291
|
$module.off('keydown' + eventNamespace);
|
287
292
|
$module.off('focusout' + eventNamespace);
|
288
|
-
$
|
293
|
+
$document.off('keydown' + eventNamespace + documentEventID, module.event.activateFocus);
|
289
294
|
$window.off('resize' + eventNamespace);
|
290
295
|
},
|
291
296
|
slidingEvents: function() {
|
292
|
-
$
|
293
|
-
$
|
297
|
+
$document.off('mousemove' + eventNamespace);
|
298
|
+
$document.off('mouseup' + eventNamespace);
|
294
299
|
},
|
295
300
|
},
|
296
301
|
|
@@ -406,7 +411,7 @@ $.fn.slider = function(parameters) {
|
|
406
411
|
$currThumb = undefined;
|
407
412
|
}
|
408
413
|
if(module.is.focused()) {
|
409
|
-
$
|
414
|
+
$document.trigger(event);
|
410
415
|
}
|
411
416
|
if(first || module.is.focused()) {
|
412
417
|
var step = module.determine.keyMovement(event);
|
@@ -433,7 +438,7 @@ $.fn.slider = function(parameters) {
|
|
433
438
|
if(!module.is.focused() && module.is.hover() && module.determine.keyMovement(event) != NO_STEP) {
|
434
439
|
event.preventDefault();
|
435
440
|
module.event.keydown(event, true);
|
436
|
-
$module.focus
|
441
|
+
$module.trigger('focus');
|
437
442
|
}
|
438
443
|
},
|
439
444
|
resize: function(_event) {
|
@@ -657,9 +662,9 @@ $.fn.slider = function(parameters) {
|
|
657
662
|
},
|
658
663
|
gapRatio: function() {
|
659
664
|
var gapRatio = 1;
|
660
|
-
|
665
|
+
|
661
666
|
if( settings.autoAdjustLabels ) {
|
662
|
-
var
|
667
|
+
var
|
663
668
|
numLabels = module.get.numLabels(),
|
664
669
|
trackLength = module.get.trackLength(),
|
665
670
|
gapCounter = 1
|
@@ -1236,13 +1241,13 @@ $.fn.slider = function(parameters) {
|
|
1236
1241
|
}
|
1237
1242
|
});
|
1238
1243
|
}
|
1239
|
-
if (
|
1244
|
+
if ( isFunction( found ) ) {
|
1240
1245
|
response = found.apply(context, passedArguments);
|
1241
1246
|
}
|
1242
1247
|
else if(found !== undefined) {
|
1243
1248
|
response = found;
|
1244
1249
|
}
|
1245
|
-
if(
|
1250
|
+
if(Array.isArray(returnedValue)) {
|
1246
1251
|
returnedValue.push(response);
|
1247
1252
|
}
|
1248
1253
|
else if(returnedValue !== undefined) {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -26,6 +26,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
|
|
26
26
|
$.fn.sticky = function(parameters) {
|
27
27
|
var
|
28
28
|
$allModules = $(this),
|
29
|
+
$document = $(document),
|
29
30
|
moduleSelector = $allModules.selector || '',
|
30
31
|
|
31
32
|
time = new Date().getTime(),
|
@@ -53,7 +54,7 @@ $.fn.sticky = function(parameters) {
|
|
53
54
|
|
54
55
|
$module = $(this),
|
55
56
|
$window = $(window),
|
56
|
-
$scroll = [window,document].indexOf(settings.scrollContext) < 0 ? $
|
57
|
+
$scroll = [window,document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
|
57
58
|
$container,
|
58
59
|
$context,
|
59
60
|
|
@@ -139,7 +140,7 @@ $.fn.sticky = function(parameters) {
|
|
139
140
|
|
140
141
|
determineContainer: function() {
|
141
142
|
if(settings.container) {
|
142
|
-
$container = [window,document].indexOf(settings.container) < 0 ? $
|
143
|
+
$container = [window,document].indexOf(settings.container) < 0 ? $document.find(settings.container) : $(settings.container);
|
143
144
|
}
|
144
145
|
else {
|
145
146
|
$container = $module.offsetParent();
|
@@ -148,7 +149,7 @@ $.fn.sticky = function(parameters) {
|
|
148
149
|
|
149
150
|
determineContext: function() {
|
150
151
|
if(settings.context) {
|
151
|
-
$context = [window,document].indexOf(settings.context) < 0 ? $
|
152
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context);
|
152
153
|
}
|
153
154
|
else {
|
154
155
|
$context = $container;
|
@@ -430,13 +431,13 @@ $.fn.sticky = function(parameters) {
|
|
430
431
|
if( module.is.top() ) {
|
431
432
|
$module
|
432
433
|
.css('bottom', '')
|
433
|
-
.css('top', -scroll)
|
434
|
+
.css('top', (-scroll) + 'px')
|
434
435
|
;
|
435
436
|
}
|
436
437
|
if( module.is.bottom() ) {
|
437
438
|
$module
|
438
439
|
.css('top', '')
|
439
|
-
.css('bottom', scroll)
|
440
|
+
.css('bottom', scroll + 'px')
|
440
441
|
;
|
441
442
|
}
|
442
443
|
},
|
@@ -855,7 +856,7 @@ $.fn.sticky = function(parameters) {
|
|
855
856
|
}
|
856
857
|
});
|
857
858
|
}
|
858
|
-
if (
|
859
|
+
if ( isFunction( found ) ) {
|
859
860
|
response = found.apply(context, passedArguments);
|
860
861
|
}
|
861
862
|
else if(found !== undefined) {
|
@@ -12,12 +12,12 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isWindow(obj) {
|
16
16
|
return obj != null && obj === obj.window;
|
17
|
-
}
|
18
|
-
|
17
|
+
}
|
18
|
+
function isFunction(obj) {
|
19
19
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
20
|
-
}
|
20
|
+
}
|
21
21
|
|
22
22
|
window = (typeof window != 'undefined' && window.Math == Math)
|
23
23
|
? window
|
@@ -30,10 +30,10 @@ $.fn.tab = function(parameters) {
|
|
30
30
|
|
31
31
|
var
|
32
32
|
// use window context if none specified
|
33
|
-
$allModules =
|
33
|
+
$allModules = isFunction(this)
|
34
34
|
? $(window)
|
35
35
|
: $(this),
|
36
|
-
|
36
|
+
$document = $(document),
|
37
37
|
moduleSelector = $allModules.selector || '',
|
38
38
|
time = new Date().getTime(),
|
39
39
|
performance = [],
|
@@ -135,7 +135,7 @@ $.fn.tab = function(parameters) {
|
|
135
135
|
bind: {
|
136
136
|
events: function() {
|
137
137
|
// if using $.tab don't add events
|
138
|
-
if(
|
138
|
+
if( !isWindow( element ) ) {
|
139
139
|
module.debug('Attaching tab activation events to element', $module);
|
140
140
|
$module
|
141
141
|
.on('click' + eventNamespace, module.event.click)
|
@@ -162,7 +162,7 @@ $.fn.tab = function(parameters) {
|
|
162
162
|
module.verbose('Determined parent element for creating context', $context);
|
163
163
|
}
|
164
164
|
else if(settings.context) {
|
165
|
-
$context = [window,document].indexOf(settings.context) < 0 ? $
|
165
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context);
|
166
166
|
module.verbose('Using selector for tab context', settings.context, $context);
|
167
167
|
}
|
168
168
|
else {
|
@@ -453,7 +453,7 @@ $.fn.tab = function(parameters) {
|
|
453
453
|
;
|
454
454
|
if(scrollOffset !== false) {
|
455
455
|
module.debug('Forcing scroll to an in-page link in a hidden tab', scrollOffset, $element);
|
456
|
-
$
|
456
|
+
$document.scrollTop(scrollOffset);
|
457
457
|
}
|
458
458
|
},
|
459
459
|
|
@@ -897,7 +897,7 @@ $.fn.tab = function(parameters) {
|
|
897
897
|
}
|
898
898
|
});
|
899
899
|
}
|
900
|
-
if (
|
900
|
+
if ( isFunction( found ) ) {
|
901
901
|
response = found.apply(context, passedArguments);
|
902
902
|
}
|
903
903
|
else if(found !== undefined) {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -195,7 +195,7 @@ $.toast = $.fn.toast = function(parameters) {
|
|
195
195
|
.addClass(settings.class + ' ' + className.toast)
|
196
196
|
.append($content)
|
197
197
|
;
|
198
|
-
$toast.css('opacity', settings.opacity);
|
198
|
+
$toast.css('opacity', String(settings.opacity));
|
199
199
|
if (settings.closeIcon) {
|
200
200
|
$close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
|
201
201
|
if($close.hasClass(className.left)) {
|
@@ -243,17 +243,19 @@ $.toast = $.fn.toast = function(parameters) {
|
|
243
243
|
var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
244
244
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
245
245
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
246
|
-
click = el[fields.click] &&
|
246
|
+
click = el[fields.click] && isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
247
247
|
$actions.append($('<button/>', {
|
248
248
|
html: icon + text,
|
249
249
|
'aria-label': (el[fields.text] || el[fields.icon] || '').replace(/<[^>]+(>|$)/g,''),
|
250
250
|
class: className.button + ' ' + cls,
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
251
|
+
on: {
|
252
|
+
click: function () {
|
253
|
+
var $button = $(this);
|
254
|
+
if ($button.is(selector.approve) || $button.is(selector.deny) || click.call(element, $module) === false) {
|
255
|
+
return;
|
256
|
+
}
|
257
|
+
module.close();
|
255
258
|
}
|
256
|
-
module.close();
|
257
259
|
}
|
258
260
|
}));
|
259
261
|
});
|
@@ -382,7 +384,7 @@ $.toast = $.fn.toast = function(parameters) {
|
|
382
384
|
|
383
385
|
animate: {
|
384
386
|
show: function(callback) {
|
385
|
-
callback =
|
387
|
+
callback = isFunction(callback) ? callback : function(){};
|
386
388
|
if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
|
387
389
|
module.set.visible();
|
388
390
|
$toastBox
|
@@ -402,7 +404,7 @@ $.toast = $.fn.toast = function(parameters) {
|
|
402
404
|
}
|
403
405
|
},
|
404
406
|
close: function(callback) {
|
405
|
-
callback =
|
407
|
+
callback = isFunction(callback) ? callback : function(){};
|
406
408
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
407
409
|
$toastBox
|
408
410
|
.transition({
|
@@ -415,10 +417,10 @@ $.toast = $.fn.toast = function(parameters) {
|
|
415
417
|
interval : 50,
|
416
418
|
|
417
419
|
onBeforeHide: function(callback){
|
418
|
-
callback =
|
420
|
+
callback = isFunction(callback)?callback : function(){};
|
419
421
|
if(settings.transition.closeEasing !== ''){
|
420
422
|
if($toastBox) {
|
421
|
-
$toastBox.css('opacity', 0);
|
423
|
+
$toastBox.css('opacity', '0');
|
422
424
|
$toastBox.wrap('<div/>').parent().hide(settings.transition.closeDuration, settings.transition.closeEasing, function () {
|
423
425
|
if ($toastBox) {
|
424
426
|
$toastBox.parent().remove();
|
@@ -736,7 +738,7 @@ $.toast = $.fn.toast = function(parameters) {
|
|
736
738
|
}
|
737
739
|
});
|
738
740
|
}
|
739
|
-
if (
|
741
|
+
if ( isFunction( found ) ) {
|
740
742
|
response = found.apply(context, passedArguments);
|
741
743
|
}
|
742
744
|
else if(found !== undefined) {
|
@@ -906,16 +908,17 @@ $.fn.toast.settings = {
|
|
906
908
|
};
|
907
909
|
|
908
910
|
$.extend( $.easing, {
|
909
|
-
easeOutBounce: function (x
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
911
|
+
easeOutBounce: function (x) {
|
912
|
+
var n1 = 7.5625, d1 = 2.75;
|
913
|
+
if (x < 1 / d1) {
|
914
|
+
return n1 * x * x;
|
915
|
+
} else if (x < 2 / d1) {
|
916
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
917
|
+
} else if (x < 2.5 / d1) {
|
918
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
919
|
+
} else {
|
920
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
921
|
+
}
|
919
922
|
},
|
920
923
|
easeOutCubic: function (t) {
|
921
924
|
return (--t)*t*t+1;
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -992,7 +992,7 @@ $.fn.transition = function() {
|
|
992
992
|
}
|
993
993
|
});
|
994
994
|
}
|
995
|
-
if (
|
995
|
+
if ( isFunction( found ) ) {
|
996
996
|
response = found.apply(context, passedArguments);
|
997
997
|
}
|
998
998
|
else if(found !== undefined) {
|
@@ -478,6 +478,7 @@
|
|
478
478
|
@variationStatisticFloated: true;
|
479
479
|
@variationStatisticHorizontal: true;
|
480
480
|
@variationStatisticEqualWidth: true;
|
481
|
+
@variationStatisticFluid: true;
|
481
482
|
@variationStatisticSizes: @variationAllSizes;
|
482
483
|
@variationStatisticColors: @variationAllColors;
|
483
484
|
|