flashoff 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -0
- data/flashoff.gemspec +1 -1
- data/lib/flashoff/version.rb +1 -1
- data/vendor/assets/javascripts/file_input.js +79 -73
- data/vendor/assets/stylesheets/button.css.scss +19 -7
- data/vendor/assets/stylesheets/tab.css.scss +5 -4
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 449fd2892ecc8bfd4cd77b3f0eb631133f1b64ee
|
4
|
+
data.tar.gz: 07b6131bd4c1094311ed66d3e21323b8a1457e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2d2320bf5b2724a92433ee27d4029bf89b099024f51151d48ef726010a22644bcab4ea463695d40803e4ee06aa3fa0d3069f5ab97ce6719a2867414416ee9b
|
7
|
+
data.tar.gz: a5e32901ec9dc8a170de70b49beefc330ccc1ba1e56c0160e1a4f91d62c585408f109371074dfa7b4d6f2b2e599fc705c4b603ecf07274bdbc0c362d52891de6
|
data/Gemfile.lock
ADDED
data/flashoff.gemspec
CHANGED
data/lib/flashoff/version.rb
CHANGED
@@ -1,88 +1,94 @@
|
|
1
1
|
$(function() {
|
2
2
|
|
3
|
-
$(
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
//
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
inputWidth, inputHeight,
|
36
|
-
cursorX, cursorY;
|
37
|
-
|
38
|
-
// This wrapper elent (the button surround this file input)
|
39
|
-
wrapper = $(this);
|
40
|
-
// The invisible file input elent
|
41
|
-
input = wrapper.find("input");
|
42
|
-
// The left-most position of the wrapper
|
43
|
-
wrapperX = wrapper.offset().left;
|
44
|
-
// The top-most position of the wrapper
|
45
|
-
wrapperY = wrapper.offset().top;
|
46
|
-
// The with of the browsers input field
|
47
|
-
inputWidth= input.width();
|
48
|
-
// The height of the browsers input field
|
49
|
-
inputHeight= input.height();
|
50
|
-
//The position of the cursor in the wrapper
|
51
|
-
cursorX = cursor.pageX;
|
52
|
-
cursorY = cursor.pageY;
|
53
|
-
|
54
|
-
//The positions we are to move the invisible file input
|
55
|
-
// The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle
|
56
|
-
moveInputX = cursorX - wrapperX - inputWidth + 20;
|
57
|
-
// Slides the invisible input Browse button to be positioned middle under the cursor
|
58
|
-
moveInputY = cursorY- wrapperY - (inputHeight/2);
|
59
|
-
|
60
|
-
// Apply the positioning styles to actually move the invisible file input
|
61
|
-
input.css({
|
62
|
-
left:moveInputX,
|
63
|
-
top:moveInputY
|
3
|
+
$("input[type=file].file-input").each(function(i,el){
|
4
|
+
|
5
|
+
// Maybe some fields don't need to be standardized.
|
6
|
+
if (typeof $(this).attr("data-vendor-style") != 'undefined') {
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
|
10
|
+
// Set the word to be displayed on the button
|
11
|
+
var buttonWord = "Browse";
|
12
|
+
if (typeof $(this).attr("title") != "undefined") {
|
13
|
+
buttonWord = $(this).attr("title");
|
14
|
+
}
|
15
|
+
|
16
|
+
var input = $("<div>").append( $(el).eq(0).clone() ).html();
|
17
|
+
|
18
|
+
// Set class used to style the input
|
19
|
+
var view = "btn";
|
20
|
+
if (typeof $(this).attr("data-view") != "undefined") {
|
21
|
+
view = $(this).attr("data-view");
|
22
|
+
}
|
23
|
+
|
24
|
+
$(el).replaceWith("<a class='"+view+" file-input'>"+buttonWord+input+"</a>");
|
25
|
+
|
26
|
+
// Set class when input has changed change
|
27
|
+
var viewChanged = null;
|
28
|
+
if (typeof $(this).attr("data-view-changed") != "undefined") {
|
29
|
+
viewChanged = $(this).attr("data-view-changed");
|
30
|
+
}
|
31
|
+
|
32
|
+
// Updated button on change to show add a class which can show an indicator
|
33
|
+
$(".file-input input[type=file]").change(function(){
|
34
|
+
$("a.file-input").addClass(viewChanged);
|
64
35
|
});
|
65
|
-
})
|
36
|
+
})
|
66
37
|
|
67
|
-
|
38
|
+
// After we have found all of the file inputs let's apply a listener for tracking the mouse movement.
|
39
|
+
// 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.
|
40
|
+
.promise().done( function(){
|
68
41
|
|
69
|
-
//
|
70
|
-
|
71
|
-
$(
|
42
|
+
// 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.
|
43
|
+
// This gives us the pointer cursor that FF denies us
|
44
|
+
$(".file-input").mousemove(function(cursor) {
|
72
45
|
|
73
|
-
|
46
|
+
var input, wrapper, wrapperX, wrapperY, inputWidth, inputHeight, cursorX, cursorY;
|
74
47
|
|
48
|
+
// This wrapper elent (the button surround this file input)
|
49
|
+
wrapper = $(this);
|
75
50
|
|
51
|
+
// The invisible file input elent
|
52
|
+
input = wrapper.find("input");
|
76
53
|
|
54
|
+
// The left-most position of the wrapper
|
55
|
+
wrapperX = wrapper.offset().left;
|
56
|
+
|
57
|
+
// The top-most position of the wrapper
|
58
|
+
wrapperY = wrapper.offset().top;
|
59
|
+
|
60
|
+
// The with of the browsers input field
|
61
|
+
inputWidth= input.width();
|
62
|
+
|
63
|
+
// The height of the browsers input field
|
64
|
+
inputHeight= input.height();
|
65
|
+
|
66
|
+
//The position of the cursor in the wrapper
|
67
|
+
cursorX = cursor.pageX;
|
68
|
+
cursorY = cursor.pageY;
|
69
|
+
|
70
|
+
//The positions we are to move the invisible file input
|
71
|
+
// The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle
|
72
|
+
moveInputX = cursorX - wrapperX - inputWidth + 20;
|
73
|
+
|
74
|
+
// Slides the invisible input Browse button to be positioned middle under the cursor
|
75
|
+
moveInputY = cursorY- wrapperY - (inputHeight/2);
|
76
|
+
|
77
|
+
// Apply the positioning styles to actually move the invisible file input
|
78
|
+
input.css({
|
79
|
+
left:moveInputX,
|
80
|
+
top:moveInputY
|
81
|
+
});
|
82
|
+
});
|
77
83
|
});
|
78
84
|
|
79
85
|
// Add the styles before the first stylesheet
|
80
86
|
// This ensures they can be easily overridden with developer styles
|
81
|
-
var cssHtml =
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
$(
|
87
|
+
var cssHtml = "<style>"+
|
88
|
+
".file-input { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }"+
|
89
|
+
".file-input 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; z-index: 99; outline: 0; }"+
|
90
|
+
"</style>";
|
91
|
+
|
92
|
+
$("link[rel=stylesheet]").eq(0).before(cssHtml);
|
87
93
|
|
88
94
|
});
|
@@ -75,18 +75,18 @@ input.btn-block {
|
|
75
75
|
.btn-blue,
|
76
76
|
.btn-green,
|
77
77
|
.btn-red { color: rgba(255,255,255,1); }
|
78
|
-
.btn-blue {
|
78
|
+
.btn-blue {
|
79
79
|
background: rgba(85,115,194,1);
|
80
|
-
border-color: rgba(25,55,134,1);
|
80
|
+
border-color: rgba(25,55,134,1);
|
81
81
|
}
|
82
82
|
.btn-blue:hover { background: rgba(70,100,179,1); }
|
83
|
-
.btn-green {
|
83
|
+
.btn-green {
|
84
84
|
background: rgba(75,180,122,1);
|
85
|
-
border-color: rgba(25,130,72,1);
|
85
|
+
border-color: rgba(25,130,72,1);
|
86
86
|
}
|
87
87
|
.btn-green:hover { background: rgba(65,170,112,1); }
|
88
|
-
.btn-red {
|
89
|
-
background: rgba(220,74,56,1);
|
88
|
+
.btn-red {
|
89
|
+
background: rgba(220,74,56,1);
|
90
90
|
border-color: rgba(180,34,16,1);
|
91
91
|
}
|
92
92
|
.btn-red:hover { background: rgba(210,64,46,1); }
|
@@ -100,7 +100,7 @@ input.btn-block {
|
|
100
100
|
margin-top: 12px;
|
101
101
|
padding: 0;
|
102
102
|
}
|
103
|
-
.btn-link:hover {
|
103
|
+
.btn-link:hover {
|
104
104
|
background: none;
|
105
105
|
color: rgba(71,74,84,1);
|
106
106
|
}
|
@@ -152,6 +152,18 @@ input.btn-block {
|
|
152
152
|
.btn-large.btn-icon.btn-outline { padding: 11px 13px 11px 13px; }
|
153
153
|
.btn-small.btn-icon.btn-outline { padding: 6px 7px 6px 6px; }
|
154
154
|
.btn-mini.btn-icon.btn-outline { padding: 4px 6px 4px 6px; }
|
155
|
+
.btn-outline-blue {
|
156
|
+
border-color: rgba(58,144,216,1);
|
157
|
+
color: rgba(58,144,216,1);
|
158
|
+
}
|
159
|
+
.btn-outline-green {
|
160
|
+
border-color: rgba(75,180,122,1);
|
161
|
+
color: rgba(75,180,122,1);
|
162
|
+
}
|
163
|
+
.btn-outline-red {
|
164
|
+
border-color: rgba(220,74,56,1);
|
165
|
+
color: rgba(220,74,56,1);
|
166
|
+
}
|
155
167
|
|
156
168
|
/* #Button Styles
|
157
169
|
================================================== */
|
@@ -54,7 +54,7 @@
|
|
54
54
|
.nav-list > li > a:hover { background-color: rgba(236,238,241,1); }
|
55
55
|
.nav-list > .active > a,
|
56
56
|
.nav-list > .active > a:hover,
|
57
|
-
.nav-list > .active > a:focus {
|
57
|
+
.nav-list > .active > a:focus {
|
58
58
|
background-color: rgba(246,247,249,1);
|
59
59
|
color: rgba(71,74,84,1);
|
60
60
|
}
|
@@ -84,10 +84,11 @@
|
|
84
84
|
}
|
85
85
|
.nav-tabs > .active > a,
|
86
86
|
.nav-tabs > .active > a:hover,
|
87
|
-
.nav-tabs > .active > a:focus {
|
87
|
+
.nav-tabs > .active > a:focus {
|
88
88
|
color: rgba(58,144,216,1);
|
89
|
-
border-bottom-color: rgba(236,238,241,1);
|
89
|
+
border-bottom-color: rgba(236,238,241,1);
|
90
90
|
}
|
91
|
+
.nav-tabs .open a.dropdown-toggle { background-color: transparent; }
|
91
92
|
.nav-pills > li > a {
|
92
93
|
background-color: rgba(246,247,249,1);
|
93
94
|
border-radius: 2px;
|
@@ -132,7 +133,7 @@
|
|
132
133
|
border-bottom: 0;
|
133
134
|
padding: 10px 10px 10px 10px;
|
134
135
|
}
|
135
|
-
.nav-pills.nav-stacked > li > a {
|
136
|
+
.nav-pills.nav-stacked > li > a {
|
136
137
|
margin-bottom: 3px;
|
137
138
|
padding: 10px 10px 10px 10px;
|
138
139
|
}
|
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.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '10.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '10.1'
|
41
41
|
description: Flashoff is a refreshingly modern responsive web framework for beautiful
|
42
42
|
and faster project development.
|
43
43
|
email:
|
@@ -47,6 +47,7 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- Gemfile
|
50
|
+
- Gemfile.lock
|
50
51
|
- LICENSE.txt
|
51
52
|
- README.md
|
52
53
|
- Rakefile
|
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
141
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.2.
|
142
|
+
rubygems_version: 2.2.1
|
142
143
|
signing_key:
|
143
144
|
specification_version: 4
|
144
145
|
summary: Flashoff Responsive Web Framework
|