thin_man 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ea65cc7eb9403aa149efbc574c727c2bbeb4dd5
4
- data.tar.gz: 9d0905c165b0c2b35f8957c1f6d9a2b576635993
3
+ metadata.gz: f4555e531b38eefff98fc01ebdbd869b54f8011a
4
+ data.tar.gz: 24fbd4bb20119da7cd42ff0eaec8aec4f3205901
5
5
  SHA512:
6
- metadata.gz: cb42f201fb2a3de7e948707031d49fa72778d943253cf033b61d685af1db2bae094cd71b1c4f26691fa988e5b45db513cb88f5d7afb79ff031cfe71789095f8b
7
- data.tar.gz: e8b34df68d87260afa68bf50f4b8dc7b2d9fee4064eeb8306ce0fae03ef4340dbf0ecf7e2146556b3f081189c10d5c9260f040a5b2b310e75bff9aee4d9ad1ad
6
+ metadata.gz: fae8fcbaf27f789d768da717ad28bf32e0baf9c182aee947b192afbac4da23cc23a991fbf5ce366975467c14b408d8bfd06149a2439b87db0592b9d868eaa20d
7
+ data.tar.gz: 0b1c4b9ac4579d82efcfcf4eae2f0bc8a8bf49d19cc6fc1366ea61a40e0f4d5f82a162499787f892865ffe131fd72e9fe855acefb55fadf00b1084c81514cc7a
@@ -23,7 +23,7 @@ var initThinMan = function(){
23
23
  this.progress_color = jq_obj.data('progress-color');
24
24
  this.progress_target = $(jq_obj.data('progress-target'));
25
25
  this.custom_progress = typeof(jq_obj.data('custom-progress')) != 'undefined';
26
- if(!this.progress_target){
26
+ if(this.progress_target.length == 0){
27
27
  this.progress_target = this.trigger
28
28
  }
29
29
  this.insert_method = this.getInsertMethod();
@@ -262,7 +262,7 @@ var initThinMan = function(){
262
262
  }),
263
263
  AjaxProgress: Class.extend({
264
264
  init: function(target,alt,progress_color){
265
- if(target.length > 0){
265
+ if(target.length > 0 && target.is(':visible')){
266
266
  this.progress_target = target;
267
267
  } else if(typeof(alt) != 'undefined' && alt.is(':visible')) {
268
268
  this.progress_target = alt;
@@ -276,13 +276,17 @@ var initThinMan = function(){
276
276
  uuid = new UUID;
277
277
  this.progress_container.prop('id', 'thin_man_ajax_progress_' + uuid.value);
278
278
  this.progress_target.append(this.progress_container);
279
- this.progress_container.css({
280
- display: 'block', visibility: 'visible', position: 'absolute', top: '50%', left: '50%',
281
- 'color': progress_color, 'z-index': 1000000,
282
- '-ms-transform': 'translate(-50%, -50%)', /* IE 9 */
283
- '-webkit-transform': 'translate(-50%, -50%)', /* Safari */
284
- 'transform': 'translate(-50%, -50%)'
285
- })
279
+ var css = {display: 'block', visibility: 'visible','color': progress_color, 'z-index': 1000000}
280
+ if(this.progress_target.css('position') == 'absolute' || this.progress_target.css('position') == 'relative'){
281
+ $.extend(css,
282
+ {position: 'absolute', top: '50%', left: '50%',
283
+ '-ms-transform': 'translate(-50%, -50%)', /* IE 9 */
284
+ '-webkit-transform': 'translate(-50%, -50%)', /* Safari */
285
+ 'transform': 'translate(-50%, -50%)'})
286
+ } else {
287
+ $.extend(css, {position: 'absolute', top: 0, left: 0})
288
+ }
289
+ this.progress_container.css(css)
286
290
  },
287
291
  stop: function(){
288
292
  this.progress_container.remove();
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.15.1"
2
+ VERSION = "0.15.2"
3
3
  end
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.15.1
4
+ version: 0.15.2
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: 2016-10-12 00:00:00.000000000 Z
11
+ date: 2016-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4.3'
22
+ version: '6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4.3'
32
+ version: '6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: sqlite3
35
35
  requirement: !ruby/object:Gem::Requirement