lalala 4.0.0.dev.336 → 4.0.0.dev.339

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b188a038a28a5653c94779b7779ccca29ecd21a
4
- data.tar.gz: 74972285a2e94e5d6fc94daf70354014e628a926
3
+ metadata.gz: e91d1a69370ce03241a151589b88e0a541d7d907
4
+ data.tar.gz: 6f3ea642e9e3a9ec6e63468fbff5c4771c1284f9
5
5
  SHA512:
6
- metadata.gz: 01685ff57831824b64cca38ff07f54da67cdfa56810c2bfa9f2bd87d69e5823fec5c2e37994273948ebc414a19c1e407539f0c3438636559874360a776065260
7
- data.tar.gz: 720317a16f55ad7fc36aff1535dbef6263e541a32de5c130671dc2cc3bfbec59474b603c8c322ae51fb0e741231582f7dbf8ab1becf443f9e78339758ab68226
6
+ metadata.gz: 8096e0ef884dd1a46cb94f3c84f9b5df96d96fd26df0448e7585592a9cdc5d1b7017328f55b76ec24525c654b87d7d787c01b31822cbb01a4f5070672ae09921
7
+ data.tar.gz: 139132ec45b821f9301bc3115a4916f14c21da293972bd02bfd84584b66f3fbf469673ab8dd786bf2bdb45ecca76cef60f4b73f157288aaa1edc584fc3a013d1
@@ -230,26 +230,42 @@ select:focus {
230
230
  }
231
231
 
232
232
  // single file
233
- .input.single_file .file-description {
234
- font-size: 12px;
235
- margin-left: $label_width;
236
- margin-top: 7px;
237
- width: $input_width;
238
-
239
- img {
240
- display: inline-block;
233
+ .input.single_file {
234
+ .delete-button {
235
+ position: absolute;
236
+ right: 10px;
237
+ top: 0;
238
+ width: 60px;
239
+
240
+ input {
241
+ width: auto;
242
+ padding: 0;
243
+ margin: 0 0 0 5px;
244
+ }
241
245
  }
242
246
 
243
- span {
244
- display: inline-block;
245
- font-size: 13px;
246
- margin-left: 8px;
247
- vertical-align: top;
247
+ .file-description {
248
+ font-size: 12px;
249
+ margin-left: $label_width;
250
+ margin-top: 7px;
251
+ width: $input_width;
252
+
253
+ img {
254
+ display: inline-block;
255
+ }
256
+
257
+ span {
258
+ display: inline-block;
259
+ font-size: 13px;
260
+ margin-left: 8px;
261
+ vertical-align: top;
262
+ }
248
263
  }
249
264
  }
250
265
 
251
266
 
252
267
 
268
+
253
269
  /*
254
270
 
255
271
  FORMS / CHOSEN
@@ -8,8 +8,18 @@ class Formtastic::Inputs::SingleFileInput
8
8
 
9
9
  html = template.raw("")
10
10
  html << label_html
11
- html << builder.fields_for(method, model_class.new) do |f|
12
- f.file_field :asset, accept: model_class.extension_white_list, id: input_html_options[:id]
11
+ html << builder.fields_for(method, model_instance || model_class.new) do |f|
12
+ f_html = template.raw("")
13
+ f_html << f.file_field(:asset, accept: model_class.extension_white_list, id: input_html_options[:id])
14
+ if model_instance
15
+ f_html << template.content_tag(:div, class: "delete-button") do
16
+ b_html = template.raw("")
17
+ b_html << f.label(:_destroy, "delete")
18
+ b_html << f.check_box(:_destroy)
19
+ b_html
20
+ end
21
+ end
22
+ f_html
13
23
  end
14
24
 
15
25
  if model_instance
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "336"
3
+ BUILD = "339"
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.336
4
+ version: 4.0.0.dev.339
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-04-18 00:00:00.000000000 Z
16
+ date: 2014-07-03 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activeadmin