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: 8f4cbfe91014d4fe64f61abe68328a8c2f012da7
4
- data.tar.gz: 6dc0b55a2fa383aa355bdb76091025e0dcabdc57
3
+ metadata.gz: aa6c7eb72f5278074e2bbb18931f5e7f53f6c70d
4
+ data.tar.gz: af5b20136b6554acb756a89fafb8d2848d401e30
5
5
  SHA512:
6
- metadata.gz: 234a578728e6e41997078875a9308993e1689ce093676b029097bf46dc9ebd7683ed333d41978299986eb51fedbce8d6312f2de7fc083a8d70ebec17cf520af4
7
- data.tar.gz: c88e615d58106256a4e8ab12e8c1ed514cef8bfcdb038cf8d88bdb7ac3f626e9fc90b7a8cf075984c9446d704b8f6b604f6f6a324bff671587a446d676b92a10
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, $grid, $original_list;
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 { display: none; position: relative }
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
- f.input ia.to_sym, placeholder: ia
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(
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "155"
3
+ BUILD = "156"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.155
4
+ version: 4.0.0.dev.156
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke