lalala 4.0.0.dev.155 → 4.0.0.dev.156
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: aa6c7eb72f5278074e2bbb18931f5e7f53f6c70d
|
4
|
+
data.tar.gz: af5b20136b6554acb756a89fafb8d2848d401e30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91a9b7efbaff2a6e5b80539d549c853c9b8f2f0cfdd9a97d940dd487d028ce1fda184f190b3e86976d1e5a8b9fabdd8ca3f2b72937eef285a74ccd8e00ecccb5
|
7
|
+
data.tar.gz: 196b3dfde73286ecb479e7e87fe0353408b8f47ec84ffdb84d9c6ef68bce2dc40fa74f14db0a6e11b56aab2907c2fef38f34cbb372a033260d9598836d9c1faf
|
@@ -24,7 +24,8 @@ Grid = (function() {
|
|
24
24
|
|
25
25
|
|
26
26
|
G.prototype.transform_html = function(grid_element) {
|
27
|
-
var fragment, el, el_assets, el_actions, el_errors,
|
27
|
+
var fragment, clear_element, el, el_assets, el_actions, el_errors,
|
28
|
+
$grid, $original_list;
|
28
29
|
|
29
30
|
// elements
|
30
31
|
$grid = $(grid_element);
|
@@ -48,9 +49,13 @@ Grid = (function() {
|
|
48
49
|
el = document.createElement("div");
|
49
50
|
el.className = "mod-grid";
|
50
51
|
|
52
|
+
clear_element = document.createElement("div");
|
53
|
+
clear_element.className = "clear";
|
54
|
+
|
51
55
|
el_assets = document.createElement("ul");
|
52
56
|
el_assets.className = "assets";
|
53
57
|
el_assets.appendChild(fragment);
|
58
|
+
el_assets.appendChild(clear_element);
|
54
59
|
|
55
60
|
el_actions = document.createElement("div");
|
56
61
|
el_actions.className = "actions";
|
@@ -11,11 +11,14 @@
|
|
11
11
|
|
12
12
|
@include border-radius(5px);
|
13
13
|
|
14
|
-
.assets,
|
15
14
|
.actions {
|
16
15
|
overflow: hidden;
|
17
16
|
}
|
18
17
|
|
18
|
+
.clear {
|
19
|
+
clear: both;
|
20
|
+
}
|
21
|
+
|
19
22
|
.assets {
|
20
23
|
padding-top: 10px - 3px;
|
21
24
|
}
|
@@ -103,12 +106,16 @@
|
|
103
106
|
}
|
104
107
|
|
105
108
|
// attributes
|
106
|
-
.asset .attributes {
|
109
|
+
.asset .attributes {
|
110
|
+
display: none;
|
111
|
+
margin-left: 115px;
|
112
|
+
position: relative;
|
113
|
+
}
|
107
114
|
|
108
115
|
.asset .attributes input,
|
109
|
-
.asset .attributes textarea
|
116
|
+
.asset .attributes textarea,
|
117
|
+
.asset .attributes select {
|
110
118
|
margin-bottom: 6px;
|
111
|
-
margin-left: 115px;
|
112
119
|
resize: none;
|
113
120
|
width: 300px;
|
114
121
|
}
|
@@ -32,7 +32,13 @@ class Formtastic::Inputs::GridInput
|
|
32
32
|
asset_html << template.link_to(link_inner_html, f.object.asset.url)
|
33
33
|
asset_html << template.content_tag(:ol, { class: "attributes" }) do
|
34
34
|
inputs = asset_attributes.map do |ia|
|
35
|
-
|
35
|
+
if ia.include?("_id")
|
36
|
+
collection_name = ia.chomp("_id").pluralize
|
37
|
+
collection = f.object.send(collection_name.to_sym)
|
38
|
+
f.input ia.to_sym, as: :select, collection: collection
|
39
|
+
else
|
40
|
+
f.input ia.to_sym, placeholder: ia
|
41
|
+
end
|
36
42
|
end
|
37
43
|
|
38
44
|
template.raw(inputs.join) + template.content_tag(
|
data/lib/lalala/version.rb
CHANGED