cutlass_js_rails 0.4.10 → 0.5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3519b2b2a8c788c3311a306c9e90dabb9c9ee312
|
4
|
+
data.tar.gz: ff84af7f7228d651fa58af0abc721eb5530b1573
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 814ba8afdce259dd768e454d805596215d915283e13d5e9686ce18f5b3eeb57cbc764f6caf08c9560c2160bf38623a4c94486a111c01869c99588beca09d8692
|
7
|
+
data.tar.gz: 29bebc7524b0e035087872e2572826db6dfcd71578473e15fbaa2c7f57218ded47be85ff8dc15586980ef90ca694a2fee1c5106a13e09e86d5608ea7ab8bae09
|
@@ -18,15 +18,23 @@ Cutlass.generateHTML = function(inputTypes){
|
|
18
18
|
|
19
19
|
// HELPERS =====================
|
20
20
|
Cutlass.wrapInItem = function($el, cssClass){
|
21
|
-
|
22
|
-
$
|
23
|
-
|
24
|
-
$
|
21
|
+
$el.closest('.input').addClass('Cutlass-item ' + cssClass);
|
22
|
+
// var $div = $('<div class="Cutlass-item ' + cssClass + '"></div>');
|
23
|
+
// $el.before($div)
|
24
|
+
// var $input = $el.detach();
|
25
|
+
// $div.append($input)
|
25
26
|
}
|
26
27
|
Cutlass.addLabel = function($input){
|
27
|
-
var text = $input.data('label');
|
28
|
-
var $label = $('
|
29
|
-
|
28
|
+
// // var text = $input.data('label');
|
29
|
+
// var $label = $input.closest('.Cutlass-item').find('.Cutlass-label');
|
30
|
+
// console.log('label', $label);
|
31
|
+
// if($label.hasClass('outside-label')) {
|
32
|
+
// console.log('ahh');
|
33
|
+
// // $input.before($label)
|
34
|
+
// // $label.remove()
|
35
|
+
// } else {
|
36
|
+
// console.log('err');
|
37
|
+
// }
|
30
38
|
}
|
31
39
|
Cutlass.addDescription = function($input){
|
32
40
|
var desc = $input.data('description');
|
@@ -37,9 +45,10 @@ Cutlass.addDescription = function($input){
|
|
37
45
|
}
|
38
46
|
Cutlass.addError = function($input){
|
39
47
|
var text = $input.data('error');
|
40
|
-
|
41
|
-
|
42
|
-
|
48
|
+
var $error = $input.closest('.input').next('.cutlass_error');
|
49
|
+
$error.remove();
|
50
|
+
if($error.find('.Cutlass-error').html() && $error.find('.Cutlass-error').html().length > 0) {
|
51
|
+
$input.before($error);
|
43
52
|
}
|
44
53
|
}
|
45
54
|
Cutlass.removeError = function($input){
|
@@ -50,13 +59,13 @@ Cutlass.addWrapperClasses = function($input){
|
|
50
59
|
if(classes){
|
51
60
|
classes = classes.split(' ');
|
52
61
|
classes.forEach(function(klass){
|
53
|
-
$input.
|
62
|
+
$input.closest('.input').addClass(klass)
|
54
63
|
})
|
55
64
|
}
|
56
65
|
}
|
57
66
|
Cutlass.ifAlwaysActive = function($input){
|
58
67
|
if($input.data('always-active')){
|
59
|
-
$input.
|
68
|
+
$input.closest('.input').addClass('m-always-active')
|
60
69
|
}
|
61
70
|
}
|
62
71
|
Cutlass.addFlag = function(){
|
@@ -154,6 +154,7 @@ $cutlass-link-color: #ff7c14 !default;
|
|
154
154
|
.Cutlass-label{
|
155
155
|
opacity: 1;
|
156
156
|
padding: 18px ($right-padding+60) 19px $left-padding;
|
157
|
+
display: block;
|
157
158
|
}
|
158
159
|
.switchery{
|
159
160
|
position: absolute;
|
@@ -166,9 +167,11 @@ $cutlass-link-color: #ff7c14 !default;
|
|
166
167
|
// RADIO INPUT
|
167
168
|
// ========================================================
|
168
169
|
.m-radio{
|
170
|
+
padding: 18px $right-padding 13px $left-padding;
|
169
171
|
.Cutlass-label{
|
170
172
|
opacity: 1;
|
171
|
-
|
173
|
+
display: block;
|
174
|
+
padding: 0 0 13px 0;
|
172
175
|
}
|
173
176
|
.Cutlass-input-radio{
|
174
177
|
padding: 0 15px 25px 30px;
|
@@ -223,6 +226,13 @@ $cutlass-link-color: #ff7c14 !default;
|
|
223
226
|
}
|
224
227
|
}
|
225
228
|
|
229
|
+
.input.dob {
|
230
|
+
.Cutlass-label{
|
231
|
+
font-size: 12px;
|
232
|
+
transform: translateY(-6px);
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
226
236
|
// ========================================================
|
227
237
|
// STATES
|
228
238
|
// ========================================================
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cutlass_js_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chardos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|