flashoff 0.0.11 → 0.0.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cb13dae378148544be4d0c39eada60aa12b7651
4
- data.tar.gz: 09d24cd834afff47021734f6d717a8131c5c3ca4
3
+ metadata.gz: ec588448bcb412bc2ac683352fd20b8c5585a481
4
+ data.tar.gz: 1333bc60d38202c6c3075b0f1e48cdee3c3ed423
5
5
  SHA512:
6
- metadata.gz: 39269102f3f63a45757c531b5099b9e83a653e981d9eb1141d311f81a0ee10bfbfca4be81ab0f63dd0db3c2ab09b19942b742e4b307d283ab8f2e23f2e118fa4
7
- data.tar.gz: 89452f4f9e131b9d1380247ecf3d8612b32be40599b321a70ad021f3c4d2c1d533e83d45f57545054b91f096a1b97cd7fd6c118730c26f20d3baaf54b310d144
6
+ metadata.gz: 14145d41572491e71e9768ed7f695493a71c661195a3f860f3fa8733115f38bc3fe9591e88c76094188e663841651685fd8a2c13251a59d745fe22201ab8d062
7
+ data.tar.gz: d51ab3aa6d57b631a75bb8431bc44889a618707a5a14c3bb7fee628e7d927445eb6db81a60da760809bd35f41f82758d1edae53b3be8ce322f1d0f9b06d3afb6
@@ -1,3 +1,3 @@
1
1
  module Flashoff
2
- VERSION = "0.0.11"
3
- end
2
+ VERSION = "0.0.12"
3
+ end
@@ -20,7 +20,7 @@ $('input[type=file].btn-file').each(function(i,elem){
20
20
 
21
21
  // Now we're going to replace that input field with a Bootstrap button.
22
22
  // The input will actually still be there, it will just be float above and transparent (done with the CSS).
23
- $(elem).replaceWith('<a class="file-input-wrapper btn btn-block">'+buttonWord+input+'</a>');
23
+ $(elem).replaceWith('<a class="btn btn-small btn-block btn-file">'+buttonWord+input+'</a>');
24
24
  })
25
25
  // After we have found all of the file inputs let's apply a listener for tracking the mouse movement.
26
26
  // This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh.
@@ -28,7 +28,7 @@ $('input[type=file].btn-file').each(function(i,elem){
28
28
 
29
29
  // As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor.
30
30
  // This gives us the pointer cursor that FF denies us
31
- $('.file-input-wrapper').mousemove(function(cursor) {
31
+ $('.btn-file').mousemove(function(cursor) {
32
32
 
33
33
  var input, wrapper,
34
34
  wrapperX, wrapperY,
@@ -64,11 +64,11 @@ $('input[type=file].btn-file').each(function(i,elem){
64
64
  });
65
65
  });
66
66
 
67
- $('.file-input-wrapper input[type=file]').change(function(){
67
+ $('.btn-file input[type=file]').change(function(){
68
68
 
69
69
  // Remove any previous file names
70
- $(this).parent().next().has('file-input-name').remove();
71
- $(this).parent().after('<span class="file-input-name">'+$(this).val()+'</span>');
70
+ $(this).parent().next().has('btn-file-name').remove();
71
+ $(this).parent().after('<span class="btn-file-name">'+$(this).val()+'</span>');
72
72
 
73
73
  });
74
74
 
@@ -79,9 +79,9 @@ $('input[type=file].btn-file').each(function(i,elem){
79
79
  // Add the styles before the first stylesheet
80
80
  // This ensures they can be easily overridden with developer styles
81
81
  var cssHtml = '<style>'+
82
- '.file-input-wrapper { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }'+
83
- '.file-input-wrapper input[type=file], .file-input-wrapper input[type=file]:focus, .file-input-wrapper input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; filter: alpha(opacity=0); z-index: 99; outline: 0; }'+
84
- '.file-input-name { margin-left: 8px; }'+
82
+ '.btn-file { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }'+
83
+ '.btn-file input[type=file], .btn-file input[type=file]:focus, .btn-file input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; filter: alpha(opacity=0); z-index: 99; outline: 0; }'+
84
+ '.btn-file-name { margin-left: 8px; }'+
85
85
  '</style>';
86
86
  $('link[rel=stylesheet]').eq(0).before(cssHtml);
87
87
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flashoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2013-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler