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 +4 -4
- data/lib/flashoff/version.rb +2 -2
- data/vendor/assets/javascripts/file_input.js +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec588448bcb412bc2ac683352fd20b8c5585a481
|
4
|
+
data.tar.gz: 1333bc60d38202c6c3075b0f1e48cdee3c3ed423
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14145d41572491e71e9768ed7f695493a71c661195a3f860f3fa8733115f38bc3fe9591e88c76094188e663841651685fd8a2c13251a59d745fe22201ab8d062
|
7
|
+
data.tar.gz: d51ab3aa6d57b631a75bb8431bc44889a618707a5a14c3bb7fee628e7d927445eb6db81a60da760809bd35f41f82758d1edae53b3be8ce322f1d0f9b06d3afb6
|
data/lib/flashoff/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Flashoff
|
2
|
-
VERSION = "0.0.
|
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="
|
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
|
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
|
67
|
+
$('.btn-file input[type=file]').change(function(){
|
68
68
|
|
69
69
|
// Remove any previous file names
|
70
|
-
$(this).parent().next().has('file-
|
71
|
-
$(this).parent().after('<span class="file-
|
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
|
83
|
-
'.file
|
84
|
-
'.file-
|
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.
|
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-
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|