semantic-ui-sass 2.3.1.2 → 2.4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/semantic-ui/dimmer.js +27 -4
- data/app/assets/javascripts/semantic-ui/dropdown.js +40 -8
- 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 +3 -3
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +151 -1
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
- 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 +14 -14
- 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 +63 -1
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +1 -1
- 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 +13 -1
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +25 -16
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +31 -2
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +1 -1
- 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 +3 -1
- 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 +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
- 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 +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +23 -26
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/tasks/converter.rb +12 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 924405dbd2602b4cc0e2a691130007e86de39542262053e3fd73d0c26341f1f2
|
4
|
+
data.tar.gz: f475d83de5c7aeb54fce1ab34b49df1a86faea4ac7458d19f559c0752c2e1a9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58471b5095deb0c7f72155999324ca7c9ddc7b066abbdd3714f8efef6f1330816f40a2ee61b4108ab2cd40e7351cda188d21380bedd10c341306ad8bd172595d
|
7
|
+
data.tar.gz: 10bf58e088eab66adcae25b96ddb0dd32c72ca4fd480f54ccdd5f5dd745e53f60ec078e93c4322eb6b6279ee96c250c09f73ffbc546b5a98f469c59fe944ec64
|
data/CHANGELOG.md
CHANGED
@@ -83,7 +83,6 @@ $.fn.dimmer = function(parameters) {
|
|
83
83
|
else {
|
84
84
|
$dimmer = module.create();
|
85
85
|
}
|
86
|
-
module.set.variation();
|
87
86
|
}
|
88
87
|
},
|
89
88
|
|
@@ -157,7 +156,7 @@ $.fn.dimmer = function(parameters) {
|
|
157
156
|
module.hide();
|
158
157
|
event.stopImmediatePropagation();
|
159
158
|
}
|
160
|
-
}
|
159
|
+
},
|
161
160
|
},
|
162
161
|
|
163
162
|
addContent: function(element) {
|
@@ -190,6 +189,7 @@ $.fn.dimmer = function(parameters) {
|
|
190
189
|
: function(){}
|
191
190
|
;
|
192
191
|
module.debug('Showing dimmer', $dimmer, settings);
|
192
|
+
module.set.variation();
|
193
193
|
if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {
|
194
194
|
module.animate.show(callback);
|
195
195
|
settings.onShow.call(element);
|
@@ -233,12 +233,22 @@ $.fn.dimmer = function(parameters) {
|
|
233
233
|
: function(){}
|
234
234
|
;
|
235
235
|
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
|
236
|
+
if(settings.useFlex) {
|
237
|
+
module.debug('Using flex dimmer');
|
238
|
+
module.remove.legacy();
|
239
|
+
}
|
240
|
+
else {
|
241
|
+
module.debug('Using legacy non-flex dimmer');
|
242
|
+
module.set.legacy();
|
243
|
+
}
|
236
244
|
if(settings.opacity !== 'auto') {
|
237
245
|
module.set.opacity();
|
238
246
|
}
|
239
247
|
$dimmer
|
240
248
|
.transition({
|
241
|
-
displayType :
|
249
|
+
displayType : settings.useFlex
|
250
|
+
? 'flex'
|
251
|
+
: 'block',
|
242
252
|
animation : settings.transition + ' in',
|
243
253
|
queue : false,
|
244
254
|
duration : module.get.duration(),
|
@@ -283,7 +293,9 @@ $.fn.dimmer = function(parameters) {
|
|
283
293
|
module.verbose('Hiding dimmer with css');
|
284
294
|
$dimmer
|
285
295
|
.transition({
|
286
|
-
displayType :
|
296
|
+
displayType : settings.useFlex
|
297
|
+
? 'flex'
|
298
|
+
: 'block',
|
287
299
|
animation : settings.transition + ' out',
|
288
300
|
queue : false,
|
289
301
|
duration : module.get.duration(),
|
@@ -292,6 +304,7 @@ $.fn.dimmer = function(parameters) {
|
|
292
304
|
module.remove.dimmed();
|
293
305
|
},
|
294
306
|
onComplete : function() {
|
307
|
+
module.remove.variation();
|
295
308
|
module.remove.active();
|
296
309
|
callback();
|
297
310
|
}
|
@@ -405,6 +418,9 @@ $.fn.dimmer = function(parameters) {
|
|
405
418
|
module.debug('Setting opacity to', opacity);
|
406
419
|
$dimmer.css('background-color', color);
|
407
420
|
},
|
421
|
+
legacy: function() {
|
422
|
+
$dimmer.addClass(className.legacy);
|
423
|
+
},
|
408
424
|
active: function() {
|
409
425
|
$dimmer.addClass(className.active);
|
410
426
|
},
|
@@ -434,6 +450,9 @@ $.fn.dimmer = function(parameters) {
|
|
434
450
|
.removeClass(className.active)
|
435
451
|
;
|
436
452
|
},
|
453
|
+
legacy: function() {
|
454
|
+
$dimmer.removeClass(className.legacy);
|
455
|
+
},
|
437
456
|
dimmed: function() {
|
438
457
|
$dimmable.removeClass(className.dimmed);
|
439
458
|
},
|
@@ -647,6 +666,9 @@ $.fn.dimmer.settings = {
|
|
647
666
|
verbose : false,
|
648
667
|
performance : true,
|
649
668
|
|
669
|
+
// whether should use flex layout
|
670
|
+
useFlex : true,
|
671
|
+
|
650
672
|
// name to distinguish between multiple dimmers in context
|
651
673
|
dimmerName : false,
|
652
674
|
|
@@ -690,6 +712,7 @@ $.fn.dimmer.settings = {
|
|
690
712
|
dimmer : 'dimmer',
|
691
713
|
disabled : 'disabled',
|
692
714
|
hide : 'hide',
|
715
|
+
legacy : 'legacy',
|
693
716
|
pageDimmer : 'page',
|
694
717
|
show : 'show'
|
695
718
|
},
|
@@ -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 {
|
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',
|
@@ -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'
|