fomantic-ui 2.9.0-beta.310 → 2.9.0-beta.313
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 +2 -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 +4 -4
- 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 +3 -4
- 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 +2 -2
- 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 +3 -6
- 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 +24 -50
- 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 +3 -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/form.css +1 -1
- package/dist/components/form.js +8 -13
- 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 +8 -7
- 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 +2 -2
- 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 +5 -13
- 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 +3 -3
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +2 -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 +1 -1
- package/dist/components/search.js +11 -8
- 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 +2 -2
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +7 -3
- package/dist/components/sidebar.js +105 -28
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +2 -2
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +12 -14
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +2 -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 +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +6 -13
- 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 +2 -2
- 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 +6 -8
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +56 -51
- package/dist/semantic.js +224 -199
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +3 -3
- package/src/definitions/behaviors/form.js +7 -12
- package/src/definitions/behaviors/state.js +1 -1
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/globals/site.js +1 -1
- package/src/definitions/modules/accordion.js +1 -1
- package/src/definitions/modules/calendar.js +2 -3
- package/src/definitions/modules/checkbox.js +1 -1
- package/src/definitions/modules/dimmer.js +2 -5
- package/src/definitions/modules/dropdown.js +23 -49
- package/src/definitions/modules/embed.js +2 -4
- package/src/definitions/modules/modal.js +7 -6
- package/src/definitions/modules/nag.js +1 -1
- package/src/definitions/modules/popup.js +4 -12
- package/src/definitions/modules/progress.js +2 -2
- package/src/definitions/modules/rating.js +1 -1
- package/src/definitions/modules/search.js +10 -7
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +104 -27
- package/src/definitions/modules/sidebar.less +6 -2
- package/src/definitions/modules/slider.js +11 -13
- package/src/definitions/modules/sticky.js +5 -12
- package/src/definitions/modules/tab.js +1 -1
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/transition.js +5 -7
@@ -28,6 +28,7 @@ $.fn.sidebar = function(parameters) {
|
|
28
28
|
$allModules = $(this),
|
29
29
|
$window = $(window),
|
30
30
|
$document = $(document),
|
31
|
+
$body = $('body'),
|
31
32
|
$html = $('html'),
|
32
33
|
$head = $('head'),
|
33
34
|
|
@@ -66,7 +67,8 @@ $.fn.sidebar = function(parameters) {
|
|
66
67
|
moduleNamespace = 'module-' + namespace,
|
67
68
|
|
68
69
|
$module = $(this),
|
69
|
-
$context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $
|
70
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $body,
|
71
|
+
isBody = $context[0] === $body[0],
|
70
72
|
|
71
73
|
$sidebars = $module.children(selector.sidebar),
|
72
74
|
$fixed = $context.children(selector.fixed),
|
@@ -80,6 +82,9 @@ $.fn.sidebar = function(parameters) {
|
|
80
82
|
id,
|
81
83
|
currentScroll,
|
82
84
|
transitionEvent,
|
85
|
+
initialBodyMargin = '',
|
86
|
+
tempBodyMargin = '',
|
87
|
+
hadScrollbar = false,
|
83
88
|
|
84
89
|
module
|
85
90
|
;
|
@@ -185,9 +190,12 @@ $.fn.sidebar = function(parameters) {
|
|
185
190
|
scrollLock: function() {
|
186
191
|
if(settings.scrollLock) {
|
187
192
|
module.debug('Disabling page scroll');
|
188
|
-
|
189
|
-
|
190
|
-
|
193
|
+
hadScrollbar = module.has.scrollbar();
|
194
|
+
if(hadScrollbar) {
|
195
|
+
module.save.bodyMargin();
|
196
|
+
module.set.bodyMargin();
|
197
|
+
}
|
198
|
+
$context.addClass(className.locked);
|
191
199
|
}
|
192
200
|
module.verbose('Adding events to contain sidebar scroll');
|
193
201
|
$document
|
@@ -205,8 +213,11 @@ $.fn.sidebar = function(parameters) {
|
|
205
213
|
},
|
206
214
|
scrollLock: function() {
|
207
215
|
module.verbose('Removing scroll lock from page');
|
216
|
+
if(hadScrollbar) {
|
217
|
+
module.restore.bodyMargin();
|
218
|
+
}
|
219
|
+
$context.removeClass(className.locked);
|
208
220
|
$document.off(elementNamespace);
|
209
|
-
$window.off(elementNamespace);
|
210
221
|
$module.off('scroll' + eventNamespace);
|
211
222
|
}
|
212
223
|
},
|
@@ -364,7 +375,22 @@ $.fn.sidebar = function(parameters) {
|
|
364
375
|
module.error(error.notFound, selector);
|
365
376
|
}
|
366
377
|
},
|
367
|
-
|
378
|
+
can: {
|
379
|
+
leftBodyScrollbar: function () {
|
380
|
+
if (module.cache.leftBodyScrollbar === undefined) {
|
381
|
+
module.cache.leftBodyScrollbar = module.is.rtl() && ((module.is.iframe && !module.is.firefox()) || module.is.safari() || module.is.edge() || module.is.ie());
|
382
|
+
}
|
383
|
+
return module.cache.leftBodyScrollbar;
|
384
|
+
}
|
385
|
+
},
|
386
|
+
save: {
|
387
|
+
bodyMargin: function() {
|
388
|
+
initialBodyMargin = $context.css((isBody ? 'margin-':'padding-')+(module.can.leftBodyScrollbar() ? 'left':'right'));
|
389
|
+
var bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
|
390
|
+
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
|
391
|
+
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
392
|
+
}
|
393
|
+
},
|
368
394
|
show: function(callback) {
|
369
395
|
callback = $.isFunction(callback)
|
370
396
|
? callback
|
@@ -475,9 +501,13 @@ $.fn.sidebar = function(parameters) {
|
|
475
501
|
? callback
|
476
502
|
: function(){}
|
477
503
|
;
|
478
|
-
if(settings.
|
504
|
+
if(settings.returnScroll) {
|
505
|
+
currentScroll = (isBody ? $window : $context).scrollTop();
|
506
|
+
}
|
507
|
+
if(settings.transition === 'scale down') {
|
479
508
|
module.scrollToTop();
|
480
509
|
}
|
510
|
+
module.bind.scrollLock();
|
481
511
|
module.set.transition(transition);
|
482
512
|
module.repaint();
|
483
513
|
animate = function() {
|
@@ -493,7 +523,6 @@ $.fn.sidebar = function(parameters) {
|
|
493
523
|
if( event.target == $transition[0] ) {
|
494
524
|
$transition.off(transitionEvent + elementNamespace, transitionEnd);
|
495
525
|
module.remove.animating();
|
496
|
-
module.bind.scrollLock();
|
497
526
|
callback.call(element);
|
498
527
|
}
|
499
528
|
};
|
@@ -537,7 +566,7 @@ $.fn.sidebar = function(parameters) {
|
|
537
566
|
module.remove.animating();
|
538
567
|
module.remove.transition();
|
539
568
|
module.remove.inlineCSS();
|
540
|
-
if(transition
|
569
|
+
if(transition === 'scale down' || settings.returnScroll) {
|
541
570
|
module.scrollBack();
|
542
571
|
}
|
543
572
|
callback.call(element);
|
@@ -550,14 +579,13 @@ $.fn.sidebar = function(parameters) {
|
|
550
579
|
|
551
580
|
scrollToTop: function() {
|
552
581
|
module.verbose('Scrolling to top of page to avoid animation issues');
|
553
|
-
currentScroll = $(window).scrollTop();
|
554
582
|
$module.scrollTop(0);
|
555
|
-
window.scrollTo(0, 0);
|
583
|
+
(isBody ? $window : $context)[0].scrollTo(0, 0);
|
556
584
|
},
|
557
585
|
|
558
586
|
scrollBack: function() {
|
559
587
|
module.verbose('Scrolling back to original page position');
|
560
|
-
window.scrollTo(0, currentScroll);
|
588
|
+
(isBody ? $window : $context)[0].scrollTo(0, currentScroll);
|
561
589
|
},
|
562
590
|
|
563
591
|
clear: {
|
@@ -568,7 +596,16 @@ $.fn.sidebar = function(parameters) {
|
|
568
596
|
},
|
569
597
|
|
570
598
|
set: {
|
571
|
-
|
599
|
+
bodyMargin: function() {
|
600
|
+
var position = module.can.leftBodyScrollbar() ? 'left':'right';
|
601
|
+
$context.css((isBody ? 'margin-':'padding-')+position, tempBodyMargin + 'px');
|
602
|
+
$context.find(selector.bodyFixed.replace('right',position)).each(function(){
|
603
|
+
var el = $(this),
|
604
|
+
attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
|
605
|
+
;
|
606
|
+
el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
|
607
|
+
});
|
608
|
+
},
|
572
609
|
// ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
|
573
610
|
// (This is no longer necessary in latest iOS)
|
574
611
|
ios: function() {
|
@@ -654,7 +691,18 @@ $.fn.sidebar = function(parameters) {
|
|
654
691
|
$module.removeClass(className.overlay);
|
655
692
|
}
|
656
693
|
},
|
657
|
-
|
694
|
+
restore: {
|
695
|
+
bodyMargin: function() {
|
696
|
+
var position = module.can.leftBodyScrollbar() ? 'left':'right';
|
697
|
+
$context.css((isBody ? 'margin-':'padding-')+position, initialBodyMargin);
|
698
|
+
$context.find(selector.bodyFixed.replace('right',position)).each(function(){
|
699
|
+
var el = $(this),
|
700
|
+
attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
|
701
|
+
;
|
702
|
+
el.css(attribute, '');
|
703
|
+
});
|
704
|
+
}
|
705
|
+
},
|
658
706
|
get: {
|
659
707
|
direction: function() {
|
660
708
|
if($module.hasClass(className.top)) {
|
@@ -702,15 +750,42 @@ $.fn.sidebar = function(parameters) {
|
|
702
750
|
}
|
703
751
|
}
|
704
752
|
},
|
705
|
-
|
753
|
+
has: {
|
754
|
+
scrollbar: function() {
|
755
|
+
return isBody || $context.css('overflow-y') !== 'hidden';
|
756
|
+
}
|
757
|
+
},
|
706
758
|
is: {
|
707
|
-
|
759
|
+
safari: function() {
|
760
|
+
if(module.cache.isSafari === undefined) {
|
761
|
+
module.cache.isSafari = /constructor/i.test(window.HTMLElement) || !!window.ApplePaySession;
|
762
|
+
}
|
763
|
+
return module.cache.isSafari;
|
764
|
+
},
|
765
|
+
edge: function(){
|
766
|
+
if(module.cache.isEdge === undefined) {
|
767
|
+
module.cache.isEdge = !!window.setImmediate && !module.is.ie();
|
768
|
+
}
|
769
|
+
return module.cache.isEdge;
|
770
|
+
},
|
771
|
+
firefox: function(){
|
772
|
+
if(module.cache.isFirefox === undefined) {
|
773
|
+
module.cache.isFirefox = !!window.InstallTrigger;
|
774
|
+
}
|
775
|
+
return module.cache.isFirefox;
|
776
|
+
},
|
777
|
+
iframe: function() {
|
778
|
+
return !(self === top);
|
779
|
+
},
|
708
780
|
ie: function() {
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
781
|
+
if(module.cache.isIE === undefined) {
|
782
|
+
var
|
783
|
+
isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
|
784
|
+
isIE = ('ActiveXObject' in window)
|
785
|
+
;
|
786
|
+
module.cache.isIE = (isIE11 || isIE);
|
787
|
+
}
|
788
|
+
return module.cache.isIE;
|
714
789
|
},
|
715
790
|
|
716
791
|
ios: function() {
|
@@ -760,12 +835,12 @@ $.fn.sidebar = function(parameters) {
|
|
760
835
|
animating: function() {
|
761
836
|
return $context.hasClass(className.animating);
|
762
837
|
},
|
763
|
-
rtl: function
|
764
|
-
if(module.cache.
|
765
|
-
module.cache.
|
838
|
+
rtl: function() {
|
839
|
+
if(module.cache.isRTL === undefined) {
|
840
|
+
module.cache.isRTL = $module.attr('dir') === 'rtl' || $module.css('direction') === 'rtl' || $body.attr('dir') === 'rtl' || $body.css('direction') === 'rtl' || $context.attr('dir') === 'rtl' || $context.css('direction') === 'rtl';
|
766
841
|
}
|
767
|
-
return module.cache.
|
768
|
-
}
|
842
|
+
return module.cache.isRTL;
|
843
|
+
},
|
769
844
|
},
|
770
845
|
|
771
846
|
setting: function(name, value) {
|
@@ -883,7 +958,7 @@ $.fn.sidebar = function(parameters) {
|
|
883
958
|
response
|
884
959
|
;
|
885
960
|
passedArguments = passedArguments || queryArguments;
|
886
|
-
context =
|
961
|
+
context = context || element;
|
887
962
|
if(typeof query == 'string' && object !== undefined) {
|
888
963
|
query = query.split(/[\. ]/);
|
889
964
|
maxDepth = query.length - 1;
|
@@ -1002,6 +1077,7 @@ $.fn.sidebar.settings = {
|
|
1002
1077
|
animating : 'animating',
|
1003
1078
|
dimmed : 'dimmed',
|
1004
1079
|
ios : 'ios',
|
1080
|
+
locked : 'locked',
|
1005
1081
|
pushable : 'pushable',
|
1006
1082
|
pushed : 'pushed',
|
1007
1083
|
right : 'right',
|
@@ -1012,6 +1088,7 @@ $.fn.sidebar.settings = {
|
|
1012
1088
|
},
|
1013
1089
|
|
1014
1090
|
selector: {
|
1091
|
+
bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close',
|
1015
1092
|
fixed : '.fixed',
|
1016
1093
|
omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed',
|
1017
1094
|
pusher : '.pusher',
|
@@ -95,10 +95,14 @@
|
|
95
95
|
Pushable
|
96
96
|
---------------*/
|
97
97
|
|
98
|
-
.pushable {
|
98
|
+
.pushable.pushable.pushable {
|
99
99
|
height: 100%;
|
100
100
|
overflow-x: hidden;
|
101
|
-
padding: 0
|
101
|
+
padding: 0;
|
102
|
+
&.locked {
|
103
|
+
overflow-y: hidden;
|
104
|
+
background: inherit;
|
105
|
+
}
|
102
106
|
}
|
103
107
|
|
104
108
|
/* Whole Page */
|
@@ -454,8 +454,8 @@ $.fn.slider = function(parameters) {
|
|
454
454
|
module.setup.labels();
|
455
455
|
},
|
456
456
|
takeStep: function(multiplier) {
|
457
|
+
multiplier = multiplier != undefined ? multiplier : 1;
|
457
458
|
var
|
458
|
-
multiplier = multiplier != undefined ? multiplier : 1,
|
459
459
|
step = module.get.step(),
|
460
460
|
currValue = module.get.currentThumbValue()
|
461
461
|
;
|
@@ -472,8 +472,8 @@ $.fn.slider = function(parameters) {
|
|
472
472
|
},
|
473
473
|
|
474
474
|
backStep: function(multiplier) {
|
475
|
+
multiplier = multiplier != undefined ? multiplier : 1;
|
475
476
|
var
|
476
|
-
multiplier = multiplier != undefined ? multiplier : 1,
|
477
477
|
step = module.get.step(),
|
478
478
|
currValue = module.get.currentThumbValue()
|
479
479
|
;
|
@@ -721,11 +721,11 @@ $.fn.slider = function(parameters) {
|
|
721
721
|
;
|
722
722
|
return pos;
|
723
723
|
},
|
724
|
-
positionFromValue: function(
|
724
|
+
positionFromValue: function(val) {
|
725
725
|
var
|
726
726
|
min = module.get.min(),
|
727
727
|
max = module.get.max(),
|
728
|
-
value =
|
728
|
+
value = val > max ? max : val < min ? min : val,
|
729
729
|
trackLength = module.get.trackLength(),
|
730
730
|
ratio = (value - min) / (max - min),
|
731
731
|
position = Math.round(ratio * trackLength)
|
@@ -933,14 +933,12 @@ $.fn.slider = function(parameters) {
|
|
933
933
|
},
|
934
934
|
position: function(position, which) {
|
935
935
|
var thumbVal = module.determine.value(position);
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
module.thumbVal = thumbVal;
|
943
|
-
module.update.position(thumbVal, $thumb);
|
936
|
+
if (which === 'second') {
|
937
|
+
module.secondThumbVal = thumbVal;
|
938
|
+
module.update.position(thumbVal, $secondThumb);
|
939
|
+
} else {
|
940
|
+
module.thumbVal = thumbVal;
|
941
|
+
module.update.position(thumbVal, $thumb);
|
944
942
|
}
|
945
943
|
value = Math.abs(module.thumbVal - (module.secondThumbVal || 0));
|
946
944
|
module.set.value(value);
|
@@ -1209,7 +1207,7 @@ $.fn.slider = function(parameters) {
|
|
1209
1207
|
response
|
1210
1208
|
;
|
1211
1209
|
passedArguments = passedArguments || queryArguments;
|
1212
|
-
context =
|
1210
|
+
context = context || element;
|
1213
1211
|
if(typeof query == 'string' && object !== undefined) {
|
1214
1212
|
query = query.split(/[\. ]/);
|
1215
1213
|
maxDepth = query.length - 1;
|
@@ -155,7 +155,6 @@ $.fn.sticky = function(parameters) {
|
|
155
155
|
}
|
156
156
|
if($context.length === 0) {
|
157
157
|
module.error(error.invalidContext, settings.context, $module);
|
158
|
-
return;
|
159
158
|
}
|
160
159
|
},
|
161
160
|
|
@@ -166,7 +165,6 @@ $.fn.sticky = function(parameters) {
|
|
166
165
|
if(module.cache.element.height > module.cache.context.height) {
|
167
166
|
module.reset();
|
168
167
|
module.error(error.elementSize, $module);
|
169
|
-
return;
|
170
168
|
}
|
171
169
|
},
|
172
170
|
|
@@ -317,13 +315,8 @@ $.fn.sticky = function(parameters) {
|
|
317
315
|
direction = 'down'
|
318
316
|
;
|
319
317
|
scroll = scroll || $scroll.scrollTop();
|
320
|
-
if(module.lastScroll
|
321
|
-
if(module.lastScroll < scroll) {
|
322
|
-
direction = 'down';
|
323
|
-
}
|
324
|
-
else if(module.lastScroll > scroll) {
|
318
|
+
if(module.lastScroll && module.lastScroll > scroll) {
|
325
319
|
direction = 'up';
|
326
|
-
}
|
327
320
|
}
|
328
321
|
return direction;
|
329
322
|
},
|
@@ -371,7 +364,7 @@ $.fn.sticky = function(parameters) {
|
|
371
364
|
lastScroll: function() {
|
372
365
|
delete module.lastScroll;
|
373
366
|
},
|
374
|
-
elementScroll: function(
|
367
|
+
elementScroll: function() {
|
375
368
|
delete module.elementScroll;
|
376
369
|
},
|
377
370
|
minimumSize: function() {
|
@@ -467,9 +460,9 @@ $.fn.sticky = function(parameters) {
|
|
467
460
|
}
|
468
461
|
},
|
469
462
|
|
470
|
-
stick: function(
|
463
|
+
stick: function(scrollPosition) {
|
471
464
|
var
|
472
|
-
cachedPosition =
|
465
|
+
cachedPosition = scrollPosition || $scroll.scrollTop(),
|
473
466
|
cache = module.cache,
|
474
467
|
fits = cache.fits,
|
475
468
|
sameHeight = cache.sameHeight,
|
@@ -816,7 +809,7 @@ $.fn.sticky = function(parameters) {
|
|
816
809
|
response
|
817
810
|
;
|
818
811
|
passedArguments = passedArguments || queryArguments;
|
819
|
-
context =
|
812
|
+
context = context || element;
|
820
813
|
if(typeof query == 'string' && object !== undefined) {
|
821
814
|
query = query.split(/[\. ]/);
|
822
815
|
maxDepth = query.length - 1;
|
@@ -868,7 +868,7 @@ $.fn.tab = function(parameters) {
|
|
868
868
|
response
|
869
869
|
;
|
870
870
|
passedArguments = passedArguments || queryArguments;
|
871
|
-
context =
|
871
|
+
context = context || element;
|
872
872
|
if(typeof query == 'string' && object !== undefined) {
|
873
873
|
query = query.split(/[\. ]/);
|
874
874
|
maxDepth = query.length - 1;
|
@@ -23,7 +23,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
|
|
23
23
|
: Function('return this')()
|
24
24
|
;
|
25
25
|
|
26
|
-
$.fn.toast = function(parameters) {
|
26
|
+
$.toast = $.fn.toast = function(parameters) {
|
27
27
|
var
|
28
28
|
$allModules = $(this),
|
29
29
|
moduleSelector = $allModules.selector || '',
|
@@ -575,7 +575,7 @@ $.fn.toast = function(parameters) {
|
|
575
575
|
}
|
576
576
|
;
|
577
577
|
if(shouldEscape.test(string)) {
|
578
|
-
string = string.replace(/&(?![a-z0-9#]{1,
|
578
|
+
string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&");
|
579
579
|
return string.replace(badChars, escapedChar);
|
580
580
|
}
|
581
581
|
return string;
|
@@ -707,7 +707,7 @@ $.fn.toast = function(parameters) {
|
|
707
707
|
response
|
708
708
|
;
|
709
709
|
passedArguments = passedArguments || queryArguments;
|
710
|
-
context =
|
710
|
+
context = context || element;
|
711
711
|
if(typeof query == 'string' && object !== undefined) {
|
712
712
|
query = query.split(/[\. ]/);
|
713
713
|
maxDepth = query.length - 1;
|
@@ -86,7 +86,7 @@ $.fn.transition = function() {
|
|
86
86
|
if(methodInvoked === false) {
|
87
87
|
module.verbose('Converted arguments into settings object', settings);
|
88
88
|
if(settings.interval) {
|
89
|
-
module.delay(settings.
|
89
|
+
module.delay(settings.interval);
|
90
90
|
}
|
91
91
|
else {
|
92
92
|
module.animate();
|
@@ -153,9 +153,9 @@ $.fn.transition = function() {
|
|
153
153
|
: settings.interval
|
154
154
|
;
|
155
155
|
shouldReverse = (settings.reverse == 'auto' && direction == className.outward);
|
156
|
-
delay = (shouldReverse || settings.reverse
|
157
|
-
? ($allModules.length - index) *
|
158
|
-
: index *
|
156
|
+
delay = (shouldReverse || settings.reverse === true)
|
157
|
+
? ($allModules.length - index) * interval
|
158
|
+
: index * interval
|
159
159
|
;
|
160
160
|
module.debug('Delaying animation by', delay);
|
161
161
|
setTimeout(module.animate, delay);
|
@@ -792,7 +792,6 @@ $.fn.transition = function() {
|
|
792
792
|
module.force.hidden();
|
793
793
|
settings.onHidden.call(element);
|
794
794
|
settings.onComplete.call(element);
|
795
|
-
// module.repaint();
|
796
795
|
},
|
797
796
|
|
798
797
|
show: function(display) {
|
@@ -807,7 +806,6 @@ $.fn.transition = function() {
|
|
807
806
|
module.set.visible();
|
808
807
|
settings.onVisible.call(element);
|
809
808
|
settings.onComplete.call(element);
|
810
|
-
// module.repaint();
|
811
809
|
},
|
812
810
|
|
813
811
|
toggle: function() {
|
@@ -966,7 +964,7 @@ $.fn.transition = function() {
|
|
966
964
|
response
|
967
965
|
;
|
968
966
|
passedArguments = passedArguments || queryArguments;
|
969
|
-
context =
|
967
|
+
context = context || element;
|
970
968
|
if(typeof query == 'string' && object !== undefined) {
|
971
969
|
query = query.split(/[\. ]/);
|
972
970
|
maxDepth = query.length - 1;
|