semantic-ui-sass 2.3.1.1 → 2.4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/CHANGELOG.md +126 -98
- data/README.md +56 -2
- data/app/assets/fonts/semantic-ui/icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/icons.otf +0 -0
- data/app/assets/fonts/semantic-ui/icons.svg +1515 -944
- data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.svg +366 -0
- data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
- data/app/assets/javascripts/semantic-ui/dimmer.js +27 -4
- data/app/assets/javascripts/semantic-ui/dropdown.js +41 -9
- data/app/assets/javascripts/semantic-ui/embed.js +11 -1
- data/app/assets/javascripts/semantic-ui/modal.js +85 -10
- data/app/assets/javascripts/semantic-ui/popup.js +14 -5
- data/app/assets/javascripts/semantic-ui/search.js +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +5 -5
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +28 -28
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +11 -11
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +5 -5
- data/app/assets/stylesheets/semantic-ui/elements/_all.scss +2 -0
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +153 -3
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +30 -31
- data/app/assets/stylesheets/semantic-ui/elements/_container_variables.scss +48 -0
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +2 -1
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +36 -17
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +22 -22
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +3 -1
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +239 -0
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +65 -3
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +6 -6
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +39 -37
- data/app/assets/stylesheets/semantic-ui/globals/_variables.scss +46 -2
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +27 -13
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +38 -29
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +60 -35
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +4 -2
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +23 -26
- data/lib/semantic-ui-sass.rb +2 -2
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/semantic-ui-sass.gemspec +2 -2
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/tasks/converter.rb +29 -2
- metadata +21 -13
@@ -605,7 +605,6 @@ $.fn.dropdown = function(parameters) {
|
|
605
605
|
else {
|
606
606
|
if(settings.on == 'click') {
|
607
607
|
$module
|
608
|
-
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
|
609
608
|
.on('click' + eventNamespace, module.event.test.toggle)
|
610
609
|
;
|
611
610
|
}
|
@@ -621,6 +620,7 @@ $.fn.dropdown = function(parameters) {
|
|
621
620
|
;
|
622
621
|
}
|
623
622
|
$module
|
623
|
+
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
|
624
624
|
.on('mousedown' + eventNamespace, module.event.mousedown)
|
625
625
|
.on('mouseup' + eventNamespace, module.event.mouseup)
|
626
626
|
.on('focus' + eventNamespace, module.event.focus)
|
@@ -754,10 +754,19 @@ $.fn.dropdown = function(parameters) {
|
|
754
754
|
callback();
|
755
755
|
},
|
756
756
|
onSuccess : function(response) {
|
757
|
-
|
758
|
-
|
759
|
-
values
|
760
|
-
|
757
|
+
var
|
758
|
+
values = response[fields.remoteValues],
|
759
|
+
hasRemoteValues = ($.isArray(values) && values.length > 0)
|
760
|
+
;
|
761
|
+
if(hasRemoteValues) {
|
762
|
+
module.remove.message();
|
763
|
+
module.setup.menu({
|
764
|
+
values: response[fields.remoteValues]
|
765
|
+
});
|
766
|
+
}
|
767
|
+
else {
|
768
|
+
module.add.message(message.noResults);
|
769
|
+
}
|
761
770
|
callback();
|
762
771
|
}
|
763
772
|
}
|
@@ -1010,7 +1019,12 @@ $.fn.dropdown = function(parameters) {
|
|
1010
1019
|
},
|
1011
1020
|
icon: {
|
1012
1021
|
click: function(event) {
|
1013
|
-
|
1022
|
+
if($icon.hasClass(className.clear)) {
|
1023
|
+
module.clear();
|
1024
|
+
}
|
1025
|
+
else if (module.can.click()) {
|
1026
|
+
module.toggle();
|
1027
|
+
}
|
1014
1028
|
}
|
1015
1029
|
},
|
1016
1030
|
text: {
|
@@ -1637,7 +1651,7 @@ $.fn.dropdown = function(parameters) {
|
|
1637
1651
|
},
|
1638
1652
|
|
1639
1653
|
hide: function(text, value, element) {
|
1640
|
-
module.set.value(value, text);
|
1654
|
+
module.set.value(value, text, $(element));
|
1641
1655
|
module.hideAndClear();
|
1642
1656
|
}
|
1643
1657
|
|
@@ -2472,6 +2486,15 @@ $.fn.dropdown = function(parameters) {
|
|
2472
2486
|
$module.data(metadata.value, stringValue);
|
2473
2487
|
}
|
2474
2488
|
}
|
2489
|
+
if(module.is.single() && settings.clearable) {
|
2490
|
+
// treat undefined or '' as empty
|
2491
|
+
if(!escapedValue) {
|
2492
|
+
module.remove.clearable();
|
2493
|
+
}
|
2494
|
+
else {
|
2495
|
+
module.set.clearable();
|
2496
|
+
}
|
2497
|
+
}
|
2475
2498
|
if(settings.fireOnInit === false && module.is.initialLoad()) {
|
2476
2499
|
module.verbose('No callback on initial load', settings.onChange);
|
2477
2500
|
}
|
@@ -2567,7 +2590,10 @@ $.fn.dropdown = function(parameters) {
|
|
2567
2590
|
}
|
2568
2591
|
})
|
2569
2592
|
;
|
2570
|
-
}
|
2593
|
+
},
|
2594
|
+
clearable: function() {
|
2595
|
+
$icon.addClass(className.clear);
|
2596
|
+
},
|
2571
2597
|
},
|
2572
2598
|
|
2573
2599
|
add: {
|
@@ -2765,7 +2791,7 @@ $.fn.dropdown = function(parameters) {
|
|
2765
2791
|
}
|
2766
2792
|
module.set.value(newValue, addedValue, addedText, $selectedItem);
|
2767
2793
|
module.check.maxSelections();
|
2768
|
-
}
|
2794
|
+
},
|
2769
2795
|
},
|
2770
2796
|
|
2771
2797
|
remove: {
|
@@ -2990,6 +3016,9 @@ $.fn.dropdown = function(parameters) {
|
|
2990
3016
|
.removeAttr('tabindex')
|
2991
3017
|
;
|
2992
3018
|
}
|
3019
|
+
},
|
3020
|
+
clearable: function() {
|
3021
|
+
$icon.removeClass(className.clear);
|
2993
3022
|
}
|
2994
3023
|
},
|
2995
3024
|
|
@@ -3677,6 +3706,8 @@ $.fn.dropdown.settings = {
|
|
3677
3706
|
|
3678
3707
|
values : false, // specify values to use for dropdown
|
3679
3708
|
|
3709
|
+
clearable : false, // whether the value of the dropdown can be cleared
|
3710
|
+
|
3680
3711
|
apiSettings : false,
|
3681
3712
|
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
|
3682
3713
|
minCharacters : 0, // Minimum characters required to trigger API call
|
@@ -3829,6 +3860,7 @@ $.fn.dropdown.settings = {
|
|
3829
3860
|
active : 'active',
|
3830
3861
|
addition : 'addition',
|
3831
3862
|
animating : 'animating',
|
3863
|
+
clear : 'clear',
|
3832
3864
|
disabled : 'disabled',
|
3833
3865
|
empty : 'empty',
|
3834
3866
|
dropdown : 'ui dropdown',
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
;(function ($, window, document, undefined) {
|
12
12
|
|
13
|
-
|
13
|
+
"use strict";
|
14
14
|
|
15
15
|
window = (typeof window != 'undefined' && window.Math == Math)
|
16
16
|
? window
|
@@ -181,6 +181,7 @@ $.fn.embed = function(parameters) {
|
|
181
181
|
// clears embed
|
182
182
|
reset: function() {
|
183
183
|
module.debug('Clearing embed and showing placeholder');
|
184
|
+
module.remove.data();
|
184
185
|
module.remove.active();
|
185
186
|
module.remove.embed();
|
186
187
|
module.showPlaceholder();
|
@@ -300,6 +301,15 @@ $.fn.embed = function(parameters) {
|
|
300
301
|
},
|
301
302
|
|
302
303
|
remove: {
|
304
|
+
data: function() {
|
305
|
+
$module
|
306
|
+
.removeData(metadata.id)
|
307
|
+
.removeData(metadata.icon)
|
308
|
+
.removeData(metadata.placeholder)
|
309
|
+
.removeData(metadata.source)
|
310
|
+
.removeData(metadata.url)
|
311
|
+
;
|
312
|
+
},
|
303
313
|
active: function() {
|
304
314
|
$module.removeClass(className.active);
|
305
315
|
},
|
@@ -110,8 +110,7 @@ $.fn.modal = function(parameters) {
|
|
110
110
|
debug : settings.debug,
|
111
111
|
variation : settings.centered
|
112
112
|
? false
|
113
|
-
: 'top aligned'
|
114
|
-
,
|
113
|
+
: 'top aligned',
|
115
114
|
dimmerName : 'modals'
|
116
115
|
},
|
117
116
|
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
|
@@ -132,7 +131,7 @@ $.fn.modal = function(parameters) {
|
|
132
131
|
$dimmer = $dimmable.dimmer('get dimmer');
|
133
132
|
},
|
134
133
|
id: function() {
|
135
|
-
id = (Math.random().toString(16) + '000000000').substr(2,8);
|
134
|
+
id = (Math.random().toString(16) + '000000000').substr(2, 8);
|
136
135
|
elementEventNamespace = '.' + id;
|
137
136
|
module.verbose('Creating unique id for element', id);
|
138
137
|
}
|
@@ -167,6 +166,9 @@ $.fn.modal = function(parameters) {
|
|
167
166
|
refresh: function() {
|
168
167
|
module.remove.scrolling();
|
169
168
|
module.cacheSizes();
|
169
|
+
if(!module.can.useFlex()) {
|
170
|
+
module.set.modalOffset();
|
171
|
+
}
|
170
172
|
module.set.screenHeight();
|
171
173
|
module.set.type();
|
172
174
|
},
|
@@ -207,12 +209,22 @@ $.fn.modal = function(parameters) {
|
|
207
209
|
$window
|
208
210
|
.on('resize' + elementEventNamespace, module.event.resize)
|
209
211
|
;
|
212
|
+
},
|
213
|
+
scrollLock: function() {
|
214
|
+
// touch events default to passive, due to changes in chrome to optimize mobile perf
|
215
|
+
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
|
216
|
+
}
|
217
|
+
},
|
218
|
+
|
219
|
+
unbind: {
|
220
|
+
scrollLock: function() {
|
221
|
+
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
|
210
222
|
}
|
211
223
|
},
|
212
224
|
|
213
225
|
get: {
|
214
226
|
id: function() {
|
215
|
-
return (Math.random().toString(16) + '000000000').substr(2,8);
|
227
|
+
return (Math.random().toString(16) + '000000000').substr(2, 8);
|
216
228
|
}
|
217
229
|
},
|
218
230
|
|
@@ -227,6 +239,9 @@ $.fn.modal = function(parameters) {
|
|
227
239
|
ignoreRepeatedEvents = false;
|
228
240
|
});
|
229
241
|
},
|
242
|
+
preventScroll: function(event) {
|
243
|
+
event.preventDefault();
|
244
|
+
},
|
230
245
|
deny: function() {
|
231
246
|
if(ignoreRepeatedEvents || settings.onDeny.call(element, $(this)) === false) {
|
232
247
|
module.verbose('Deny callback returned false cancelling hide');
|
@@ -304,6 +319,8 @@ $.fn.modal = function(parameters) {
|
|
304
319
|
;
|
305
320
|
module.refreshModals();
|
306
321
|
module.set.dimmerSettings();
|
322
|
+
module.set.dimmerStyles();
|
323
|
+
|
307
324
|
module.showModal(callback);
|
308
325
|
},
|
309
326
|
|
@@ -322,9 +339,16 @@ $.fn.modal = function(parameters) {
|
|
322
339
|
: function(){}
|
323
340
|
;
|
324
341
|
if( module.is.animating() || !module.is.active() ) {
|
325
|
-
|
326
342
|
module.showDimmer();
|
327
343
|
module.cacheSizes();
|
344
|
+
if(module.can.useFlex()) {
|
345
|
+
module.remove.legacy();
|
346
|
+
}
|
347
|
+
else {
|
348
|
+
module.set.legacy();
|
349
|
+
module.set.modalOffset();
|
350
|
+
module.debug('Using non-flex legacy modal positioning.');
|
351
|
+
}
|
328
352
|
module.set.screenHeight();
|
329
353
|
module.set.type();
|
330
354
|
module.set.clickaway();
|
@@ -402,6 +426,7 @@ $.fn.modal = function(parameters) {
|
|
402
426
|
},
|
403
427
|
onComplete : function() {
|
404
428
|
settings.onHidden.call(element);
|
429
|
+
module.remove.dimmerStyles();
|
405
430
|
module.restore.focus();
|
406
431
|
callback();
|
407
432
|
}
|
@@ -426,6 +451,7 @@ $.fn.modal = function(parameters) {
|
|
426
451
|
|
427
452
|
hideDimmer: function() {
|
428
453
|
if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
|
454
|
+
module.unbind.scrollLock();
|
429
455
|
$dimmable.dimmer('hide', function() {
|
430
456
|
module.remove.clickaway();
|
431
457
|
module.remove.screenHeight();
|
@@ -513,11 +539,18 @@ $.fn.modal = function(parameters) {
|
|
513
539
|
active: function() {
|
514
540
|
$module.removeClass(className.active);
|
515
541
|
},
|
542
|
+
legacy: function() {
|
543
|
+
$module.removeClass(className.legacy);
|
544
|
+
},
|
516
545
|
clickaway: function() {
|
517
546
|
$dimmer
|
518
547
|
.off('click' + elementEventNamespace)
|
519
548
|
;
|
520
549
|
},
|
550
|
+
dimmerStyles: function() {
|
551
|
+
$dimmer.removeClass(className.inverted);
|
552
|
+
$dimmable.removeClass(className.blurring);
|
553
|
+
},
|
521
554
|
bodyStyle: function() {
|
522
555
|
if($body.attr('style') === '') {
|
523
556
|
module.verbose('Removing style attribute');
|
@@ -546,11 +579,13 @@ $.fn.modal = function(parameters) {
|
|
546
579
|
$module.addClass(className.loading);
|
547
580
|
var
|
548
581
|
scrollHeight = $module.prop('scrollHeight'),
|
582
|
+
modalWidth = $module.outerWidth(),
|
549
583
|
modalHeight = $module.outerHeight()
|
550
584
|
;
|
551
585
|
if(module.cache === undefined || modalHeight !== 0) {
|
552
586
|
module.cache = {
|
553
587
|
pageHeight : $(document).outerHeight(),
|
588
|
+
width : modalWidth,
|
554
589
|
height : modalHeight + settings.offset,
|
555
590
|
scrollHeight : scrollHeight + settings.offset,
|
556
591
|
contextHeight : (settings.context == 'body')
|
@@ -564,6 +599,12 @@ $.fn.modal = function(parameters) {
|
|
564
599
|
},
|
565
600
|
|
566
601
|
can: {
|
602
|
+
useFlex: function() {
|
603
|
+
return (settings.useFlex == 'auto')
|
604
|
+
? settings.detachable && !module.is.ie()
|
605
|
+
: settings.useFlex
|
606
|
+
;
|
607
|
+
},
|
567
608
|
fit: function() {
|
568
609
|
var
|
569
610
|
contextHeight = module.cache.contextHeight,
|
@@ -585,6 +626,13 @@ $.fn.modal = function(parameters) {
|
|
585
626
|
active: function() {
|
586
627
|
return $module.hasClass(className.active);
|
587
628
|
},
|
629
|
+
ie: function() {
|
630
|
+
var
|
631
|
+
isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
|
632
|
+
isIE = ('ActiveXObject' in window)
|
633
|
+
;
|
634
|
+
return (isIE11 || isIE);
|
635
|
+
},
|
588
636
|
animating: function() {
|
589
637
|
return $module.transition('is supported')
|
590
638
|
? $module.transition('is animating')
|
@@ -596,7 +644,7 @@ $.fn.modal = function(parameters) {
|
|
596
644
|
},
|
597
645
|
modernBrowser: function() {
|
598
646
|
// appName for IE11 reports 'Netscape' can no longer use
|
599
|
-
return !(window.ActiveXObject ||
|
647
|
+
return !(window.ActiveXObject || 'ActiveXObject' in window);
|
600
648
|
}
|
601
649
|
},
|
602
650
|
|
@@ -628,10 +676,10 @@ $.fn.modal = function(parameters) {
|
|
628
676
|
debug : settings.debug,
|
629
677
|
dimmerName : 'modals',
|
630
678
|
closable : 'auto',
|
679
|
+
useFlex : module.can.useFlex(),
|
631
680
|
variation : settings.centered
|
632
681
|
? false
|
633
|
-
: 'top aligned'
|
634
|
-
,
|
682
|
+
: 'top aligned',
|
635
683
|
duration : {
|
636
684
|
show : settings.duration,
|
637
685
|
hide : settings.duration
|
@@ -644,6 +692,11 @@ $.fn.modal = function(parameters) {
|
|
644
692
|
? dimmerSettings.variation + ' inverted'
|
645
693
|
: 'inverted'
|
646
694
|
;
|
695
|
+
}
|
696
|
+
$context.dimmer('setting', dimmerSettings);
|
697
|
+
},
|
698
|
+
dimmerStyles: function() {
|
699
|
+
if(settings.inverted) {
|
647
700
|
$dimmer.addClass(className.inverted);
|
648
701
|
}
|
649
702
|
else {
|
@@ -655,7 +708,21 @@ $.fn.modal = function(parameters) {
|
|
655
708
|
else {
|
656
709
|
$dimmable.removeClass(className.blurring);
|
657
710
|
}
|
658
|
-
|
711
|
+
},
|
712
|
+
modalOffset: function() {
|
713
|
+
var
|
714
|
+
width = module.cache.width,
|
715
|
+
height = module.cache.height
|
716
|
+
;
|
717
|
+
$module
|
718
|
+
.css({
|
719
|
+
marginTop: (settings.centered && module.can.fit())
|
720
|
+
? -(height / 2)
|
721
|
+
: 0,
|
722
|
+
marginLeft: -(width / 2)
|
723
|
+
})
|
724
|
+
;
|
725
|
+
module.verbose('Setting modal offset for legacy mode');
|
659
726
|
},
|
660
727
|
screenHeight: function() {
|
661
728
|
if( module.can.fit() ) {
|
@@ -674,12 +741,17 @@ $.fn.modal = function(parameters) {
|
|
674
741
|
scrolling: function() {
|
675
742
|
$dimmable.addClass(className.scrolling);
|
676
743
|
$module.addClass(className.scrolling);
|
744
|
+
module.unbind.scrollLock();
|
745
|
+
},
|
746
|
+
legacy: function() {
|
747
|
+
$module.addClass(className.legacy);
|
677
748
|
},
|
678
749
|
type: function() {
|
679
750
|
if(module.can.fit()) {
|
680
751
|
module.verbose('Modal fits on screen');
|
681
752
|
if(!module.others.active() && !module.others.animating()) {
|
682
753
|
module.remove.scrolling();
|
754
|
+
module.bind.scrollLock();
|
683
755
|
}
|
684
756
|
}
|
685
757
|
else {
|
@@ -880,6 +952,9 @@ $.fn.modal.settings = {
|
|
880
952
|
name : 'Modal',
|
881
953
|
namespace : 'modal',
|
882
954
|
|
955
|
+
useFlex : 'auto',
|
956
|
+
offset : 0,
|
957
|
+
|
883
958
|
silent : false,
|
884
959
|
debug : false,
|
885
960
|
verbose : false,
|
@@ -909,7 +984,6 @@ $.fn.modal.settings = {
|
|
909
984
|
|
910
985
|
queue : false,
|
911
986
|
duration : 500,
|
912
|
-
offset : 0,
|
913
987
|
transition : 'scale',
|
914
988
|
|
915
989
|
// padding with edge of page
|
@@ -949,6 +1023,7 @@ $.fn.modal.settings = {
|
|
949
1023
|
animating : 'animating',
|
950
1024
|
blurring : 'blurring',
|
951
1025
|
inverted : 'inverted',
|
1026
|
+
legacy : 'legacy',
|
952
1027
|
loading : 'loading',
|
953
1028
|
scrolling : 'scrolling',
|
954
1029
|
undetached : 'undetached'
|
@@ -1012,12 +1012,12 @@ $.fn.popup = function(parameters) {
|
|
1012
1012
|
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
|
1013
1013
|
module.bind.closeOnScroll();
|
1014
1014
|
}
|
1015
|
-
if(
|
1016
|
-
module.bind.touchClose();
|
1017
|
-
}
|
1018
|
-
if(settings.on == 'click' && settings.closable) {
|
1015
|
+
if(module.is.closable()) {
|
1019
1016
|
module.bind.clickaway();
|
1020
1017
|
}
|
1018
|
+
else if(settings.on == 'hover' && openedWithTouch) {
|
1019
|
+
module.bind.touchClose();
|
1020
|
+
}
|
1021
1021
|
},
|
1022
1022
|
closeOnScroll: function() {
|
1023
1023
|
module.verbose('Binding scroll close event to document');
|
@@ -1073,10 +1073,19 @@ $.fn.popup = function(parameters) {
|
|
1073
1073
|
should: {
|
1074
1074
|
centerArrow: function(calculations) {
|
1075
1075
|
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
|
1076
|
-
}
|
1076
|
+
},
|
1077
1077
|
},
|
1078
1078
|
|
1079
1079
|
is: {
|
1080
|
+
closable: function() {
|
1081
|
+
if(settings.closable == 'auto') {
|
1082
|
+
if(settings.on == 'hover') {
|
1083
|
+
return false;
|
1084
|
+
}
|
1085
|
+
return true;
|
1086
|
+
}
|
1087
|
+
return settings.closable;
|
1088
|
+
},
|
1080
1089
|
offstage: function(distanceFromBoundary, position) {
|
1081
1090
|
var
|
1082
1091
|
offstage = []
|