lalala 4.1.0.dev.322 → 4.1.0.dev.324

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: ec7fac739486a98458afa0231c3d4cae6b1cdce2
4
- data.tar.gz: 9827f80097cf0d9c94e3e8ebf533d4ec769e7ce3
3
+ metadata.gz: 0fd9c3d041be7883f1e339e76504fe7da24a6f5c
4
+ data.tar.gz: 77df2687bd1950d45d43e579b27b16371abcd917
5
5
  SHA512:
6
- metadata.gz: c4c889f6b37ca982eb6921baf44f409ef2b2ca028a82afa78a25ad5fb8e2483f3b07dc7e8fe3e28dc200ce3ee28f6048e5751e5eb711fb313c27b28541812aab
7
- data.tar.gz: bdbc26d54a8d7323bc8d01de1dd512a9e7d1e928cfc8bb54c5c5cca30be89023ae5be059a498a09af5ba5f19fa311c95dba5ada5c8b7cd911cef09632a090043
6
+ metadata.gz: 30745adbc31c0ef5bc0ba9a96994376866d3eebe827791ca6590f1553bcfdc6fa4bac0ebc97c3fd1ddf5ba86c4bc9e4a60bd762b64649642871c27549f298404
7
+ data.tar.gz: dcebce27e01f21076000b67f7be1175fa66c59558f2f9cf2c34ebfe305a95cd510c08384a38f433962e915406a762eceee27657e9b5cfce6da74c51d55717156
@@ -210,6 +210,9 @@ MultipleFilesUploader.prototype.file_done_handler = function(e) {
210
210
  this.$el.removeClass("processing");
211
211
  this.$el.addClass("uploaded");
212
212
 
213
+ // title
214
+ this.$el.find(".title").html(this.metadata.file_name);
215
+
213
216
  // attr
214
217
  var id = this.$el.find("input[name$=\"[id]\"]").val();
215
218
  if (id) this.$el.attr("data-src-original", "//c.assets.sh/" + id + "/thumb");
@@ -109,6 +109,7 @@ SingleFileUploader.prototype.file_done_handler = function(e) {
109
109
 
110
110
  this.$el.removeClass("processing");
111
111
  this.$el.addClass("uploaded");
112
+ this.$el.find(".content > .title > .name").html(this.metadata.file_name);
112
113
  };
113
114
 
114
115
 
@@ -45,8 +45,8 @@ x-files[multiple-files] {
45
45
  border-right: 1px solid #E2E2E2;
46
46
  float: left;
47
47
  width: 40%;
48
- width: -webkit-calc(40% - 1px);
49
- width: calc(40% - 1px);
48
+
49
+ @include calc(width, "40% - 1px");
50
50
 
51
51
  .name {
52
52
  padding-left: 4px;
@@ -167,7 +167,10 @@ x-files[multiple-files] {
167
167
  // X-file -- Menu
168
168
  //
169
169
  x-file .menu {
170
+ bottom: 6px;
171
+ left: 8px;
170
172
  display: none;
173
+ position: absolute;
171
174
 
172
175
  a {
173
176
  background-position: center;
@@ -216,6 +219,7 @@ x-files[multiple-files] {
216
219
  > div {
217
220
  left: 0;
218
221
  top: 0;
222
+ width: 0;
219
223
  }
220
224
  }
221
225
 
@@ -8,6 +8,7 @@ x-files[single-file] {
8
8
  color: #6F6F71;
9
9
  display: block;
10
10
  font-size: 12px;
11
+ font-weight: bold;
11
12
  height: 38px;
12
13
  line-height: 38px;
13
14
  margin: 31px 0 45px;
@@ -30,7 +31,6 @@ x-files[single-file] {
30
31
  .association {
31
32
  display: inline-block;
32
33
  font-size: 14px;
33
- font-weight: bold;
34
34
  line-height: 16px;
35
35
  margin-left: 2px;
36
36
  position: relative;
@@ -63,7 +63,6 @@ x-files[single-file] {
63
63
  color: #CDCDCD;
64
64
  cursor: pointer;
65
65
  display: inline-block;
66
- font-weight: bold;
67
66
  line-height: 24px;
68
67
  padding-left: 22px;
69
68
  padding-top: 2px;
@@ -80,14 +79,16 @@ x-files[single-file] {
80
79
  //
81
80
  .content {
82
81
  @include calc(width, "80% - 101px - 26px");
82
+ height: 38px;
83
83
  position: absolute;
84
84
  right: 0;
85
85
  top: 0;
86
86
  }
87
87
 
88
+ // image
88
89
  .image {
89
90
  float: left;
90
- height: 38px;
91
+ height: 100%;
91
92
  width: 58px;
92
93
  }
93
94
 
@@ -117,14 +118,116 @@ x-files[single-file] {
117
118
  );
118
119
  }
119
120
 
121
+ // title
122
+ .title {
123
+ color: #a3a3a3;
124
+ float: left;
125
+ margin: 0 19px;
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ width: 120px;
130
+
131
+ .name {
132
+ display: none;
133
+ }
134
+ }
135
+
136
+ // status
137
+ .status {
138
+ display: none;
139
+ float: right;
140
+ height: 100%;
141
+ position: relative;
142
+
143
+ @include calc(width, "100% - 58px - 120px - (2 * 19px)");
144
+
145
+ .status-bar {
146
+ background-color: #e2e2e2;
147
+ height: 1px;
148
+ left: 0;
149
+ margin-top: -1px;
150
+ position: absolute;
151
+ right: 0;
152
+ top: 50%;
153
+ }
154
+
155
+ .status-bar > div {
156
+ height: 1px;
157
+ left: 0;
158
+ position: absolute;
159
+ top: 0;
160
+ width: 0;
161
+ }
162
+
163
+ .status-bar .upload-bar {
164
+ background-color: #FFC914;
165
+ box-shadow: 0 0 9px rgba(#FFC914, .75);
166
+ z-index: 1;
167
+ }
168
+
169
+ .status-bar .process-bar {
170
+ background-color: #36F269;
171
+ box-shadow: 0 0 9px rgba(#36F269, .75);
172
+ z-index: 2;
173
+ }
174
+ }
175
+
176
+ // actions
177
+ .actions {
178
+ border-left: 1px solid #E2E2E2;
179
+ display: none;
180
+ float: left;
181
+ padding-left: 19px;
182
+ }
183
+
120
184
 
121
185
  //
122
186
  // Statusses
123
187
  //
188
+ &.waiting .title:after {
189
+ content: "Waiting...";
190
+ }
191
+
192
+ &.uploading .title:after {
193
+ content: "Uploading...";
194
+ }
195
+
196
+ &.processing .title:after {
197
+ content: "Processing...";
198
+ }
199
+
200
+ &.waiting,
201
+ &.uploading,
202
+ &.processing { .status {
203
+ display: block;
204
+ }}
205
+
206
+ // uploaded
124
207
  &.uploaded .image canvas,
125
208
  &.uploaded .image img {
126
209
  opacity: 1;
127
210
  }
128
211
 
212
+ &.uploaded .title {
213
+ @include calc(width, "100% - 260px");
214
+
215
+ .name {
216
+ display: block;
217
+ }
218
+ }
219
+
220
+ // error
221
+ &.error {
222
+ .status .status-bar {
223
+ background-color: $red;
224
+ }
225
+
226
+ .status .upload-bar,
227
+ .status .process-bar {
228
+ display: none;
229
+ }
230
+ }
231
+
129
232
 
130
233
  }
@@ -141,6 +141,10 @@ class Formtastic::Inputs::MultipleFilesInput
141
141
  #{ template.hidden_field_tag(param_key + "[][id]", asset.id) }
142
142
  #{ template.hidden_field_tag(param_key + "[][_destroy]", "") }
143
143
 
144
+ <div class="title">
145
+ #{ asset.file_name }
146
+ </div>
147
+
144
148
  <div class="attributes">
145
149
  #{ input.asset_attributes_form(template, param_key, asset) }
146
150
  </div>
@@ -11,10 +11,11 @@ class Formtastic::Inputs::SingleFileInput
11
11
  accepts = defn.profile.try(:accepted_file_types)
12
12
  accepts = accepts.join(", ") if accepts
13
13
  versions = compile_versions_array(defn.profile)
14
+ css_class = asset ? "uploaded" : ""
14
15
 
15
16
  <<-HTML
16
17
 
17
- <x-files single-file profile="#{defn.profile.name}" accept="#{accepts}" name="#{param_key}">
18
+ <x-files single-file profile="#{defn.profile.name}" accept="#{accepts}" name="#{param_key}" class="#{css_class}">
18
19
  <div class="association">#{ title }</div>
19
20
 
20
21
  <div class="buttons">
@@ -23,14 +24,21 @@ class Formtastic::Inputs::SingleFileInput
23
24
 
24
25
  <div class="content">
25
26
  <div class="image">#{ asset ? image_html(asset, versions) : "" }</div>
27
+ <div class="title">
28
+ <span class="name">
29
+ #{ asset ? asset.file_name : "" }
30
+ </span>
31
+ </div>
26
32
  <div class="status">
27
- <div class="status-title"></div>
28
33
  <div class="status-bar">
29
34
  <div class="upload-bar"></div>
30
35
  <div class="process-bar"></div>
31
36
  </div>
32
37
  </div>
33
- <div class="name"></div>
38
+ <div class="actions">
39
+ <a data-action="delete"></a>
40
+ <a data-action="meta"></a>
41
+ </div>
34
42
  </div>
35
43
  </x-files>
36
44
 
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "322"
3
+ BUILD = "324"
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.1.0.dev.322
4
+ version: 4.1.0.dev.324
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke