thin_man 0.20.7 → 0.20.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/thin_man.js +46 -25
- data/lib/thin_man/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 785077cef9f4272c5ef085fd46a0fff922f2948f38b0bd3d35f09f52e2eaeac5
|
4
|
+
data.tar.gz: 7aea9de5c7bf16ecc9e0de2be2ebb9a368b73b16943b26362675664c33930918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a01759d57c9c137c5520373f2d314c8e6a3697167e5d97be18f2750dd6cda7464b2dce872394d7a952df868f98461dcb968457ec048030f78181f3524bb78a54
|
7
|
+
data.tar.gz: 91589300a0b542377d987f37fd38d7bed4c3d25f0dc2a6c61fc447f65d52130f9dda18ca5045cd780c49a4f8520a0d64f1fb93ac87c826c88f533906d1e00938
|
@@ -75,7 +75,8 @@ var initThinMan = function() {
|
|
75
75
|
this.getErrorTarget()
|
76
76
|
this.progress_color = jq_obj.data('progress-color')
|
77
77
|
this.progress_target = $(jq_obj.data('progress-target'))
|
78
|
-
this
|
78
|
+
this.mask_target = jq_obj.data('mask-target')
|
79
|
+
if(this.mask_target){this.$mask_target = $(this.mask_target)}
|
79
80
|
this.$mask_message = jq_obj.data('mask-message')
|
80
81
|
this.custom_progress = typeof(jq_obj.data('custom-progress')) != 'undefined';
|
81
82
|
this.scroll_to = jq_obj.data('scroll-to')
|
@@ -520,31 +521,51 @@ var initThinMan = function() {
|
|
520
521
|
}
|
521
522
|
}),
|
522
523
|
AjaxMask: Class.extend({
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
524
|
+
init: function($mask_target, mask_message) {
|
525
|
+
var uuid = new UUID;
|
526
|
+
this.$mask_target = $mask_target
|
527
|
+
this.$mask = $('#thin_man_mask').clone()
|
528
|
+
this.$mask.prop('id', 'thin_man_mask' + uuid.value)
|
529
|
+
if (typeof mask_message != 'undefined') {
|
530
|
+
var $message = this.$mask.find('[data-thin-man-mask-message]')
|
531
|
+
$message.html(mask_message)
|
532
|
+
}
|
533
|
+
var height = this.$mask_target.outerHeight()
|
534
|
+
var width = this.$mask_target.outerWidth()
|
535
|
+
var radius = this.$mask_target.css('border-radius')
|
536
|
+
this.$mask.css({ 'height': height, 'width': width, 'left': 0, 'top': 0, 'border-radius': radius })
|
537
|
+
this.$mask.css({ 'position': 'absolute', 'z-index': 10000 })
|
537
538
|
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
}
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
539
|
+
this.$mask_target.append(this.$mask)
|
540
|
+
|
541
|
+
this.disableScroll()
|
542
|
+
this.arrangeContent()
|
543
|
+
},
|
544
|
+
arrangeContent: function(){
|
545
|
+
this.$mask.css({'max-height': window.innerHeight})
|
546
|
+
this.$mask.show()
|
547
|
+
},
|
548
|
+
disableScroll: function(){
|
549
|
+
if($(window).width() >= 640){
|
550
|
+
var mask = this
|
551
|
+
mask.old_height = $('body')[0].style.height
|
552
|
+
mask.old_overflow = $('body')[0].style.overflow
|
553
|
+
$('body').css({height: '100%',overflow: 'hidden'})
|
554
|
+
} else {
|
555
|
+
$('body').children().not('.ajax-mask-public').hide()
|
556
|
+
}
|
557
|
+
},
|
558
|
+
enableScroll: function(){
|
559
|
+
if($(window).width() >= 640){
|
560
|
+
$('body').css({height: this.old_height, overflow: this.old_overflow})
|
561
|
+
} else {
|
562
|
+
$('body').children().not('#ajax-mask-public').show()
|
563
|
+
}
|
564
|
+
},
|
565
|
+
remove: function() {
|
566
|
+
this.enableScroll()
|
567
|
+
this.$mask.remove()
|
568
|
+
}
|
548
569
|
}),
|
549
570
|
AjaxFlash: Class.extend({
|
550
571
|
init: function(type, message, elem, duration) {
|
data/lib/thin_man/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut, Adam Bialek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|