lalala 4.1.0.dev.390 → 4.1.0.dev.391

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: dfdb52b5dc9c54660630ef7bdd70e511bbecb2de
4
- data.tar.gz: 747f630687e09134e7ecdf357b97a24a029839fe
3
+ metadata.gz: 06124eebfc551071567f66a7e3107be4de300b3b
4
+ data.tar.gz: 155dd70459f66d797294c4110193bb28c80c8a70
5
5
  SHA512:
6
- metadata.gz: b5b418eb403c559caf3a0988db3dae010f50b6c50d79567713c53edbcaff41e6aaf0ae4b6e4d3d07f196ee3ae859dcc02fb877bd124ed484f2dca4c8b9e08a90
7
- data.tar.gz: 178d30c7bc1619a47e227c07b5339d87d83231f9fbdb6d1087a0acf51a248c0440f8c90122ecbbee0a8acb2f56b41dd9eaeda24e6aec5d8e99b631d118540059
6
+ metadata.gz: 8269bdf38ddc846460f4671c31e4f1ae73a773bee454640c7d191010b9be6aba4a4874dfbb501e4f4e34d5edbaafb7ad363e6bdc2d69a1ce5ffe94befe9579c4
7
+ data.tar.gz: c26bcb8306e83d32cfe7ad74c43c92871785f76ab1ee3e4a4bc8591167cdad45e96b4cb2765fe451e57156fd80972621444a13bb6b6e825e7dd30d50231e5f42
@@ -93,6 +93,7 @@ MediaSelector.prototype.collect_data_from_self = function() {
93
93
  var $xfile = $(this);
94
94
 
95
95
  data.push({
96
+ file_name: $xfile.find("[name$=\"[file_name]\"]").attr("value"),
96
97
  id: $xfile.find("[name$=\"[id]\"]").attr("value"),
97
98
  thumb_url: $xfile.attr("data-src-original").replace(/original$/, "thumb"),
98
99
  versions: versions
@@ -227,7 +228,18 @@ MediaSelector.prototype.add_selected_to_editor_textarea = function() {
227
228
 
228
229
  // build markdown text
229
230
  for (var i=0, j=selected.length; i<j; ++i) {
230
- markdown = markdown + "![](asset://" + selected[i];
231
+ var file_name = null;
232
+
233
+ $.each(this.last_rendered_data, function(idx, value){
234
+ if ( value.id == selected[i]) {
235
+ file_name = value.file_name;
236
+ }
237
+ });
238
+
239
+ file_name;
240
+
241
+ markdown = markdown + "![" + file_name + "](asset://" + selected[i];
242
+
231
243
  if (version) markdown = markdown + "/" + version;
232
244
  markdown = markdown + ")";
233
245
  }
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "390"
3
+ BUILD = "391"
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.390
4
+ version: 4.1.0.dev.391
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: 2015-04-01 00:00:00.000000000 Z
16
+ date: 2015-04-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activeadmin