brightcontent-attachments 2.3.0 → 2.3.1
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: e5fdc34f41c4c7f4dcb884c3ea3f317707b8f882
|
4
|
+
data.tar.gz: 4f6b6840592d60a6a4e1b8c3f610fa7d703615fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf821102f7280df10d5f8a7eae57c26da07e42325408c7b80a907a61c4dfcf522ef6e5e67ceaf9efd23a47977cd6a31215bebd735e52ca200906a948e46c7158
|
7
|
+
data.tar.gz: dbf29736c369161493fb37d5a60f719172ff294a4e738e02e618b4efe6d29a8027b8a46afa8f7408fa6804e86648f0b449828cdf6ea5c8d719ede4094cf22850
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
$ ->
|
5
5
|
request_url = $("#attachable_url").val()
|
6
|
+
editor = $("#insertable").data("wysihtml5").editor
|
6
7
|
|
7
8
|
spinner = new Spinner().spin()
|
8
9
|
$('#fileupload').fileupload
|
@@ -20,8 +21,20 @@ $ ->
|
|
20
21
|
$("#fileupload").attr disabled: false
|
21
22
|
$("#attachments-controls").css opacity: 1
|
22
23
|
|
24
|
+
$("#attachments").on "click", ".insert-image", (e) ->
|
25
|
+
e.preventDefault()
|
26
|
+
editor.composer.commands.exec "insertImage",
|
27
|
+
src: $(this).attr "href"
|
23
28
|
|
24
|
-
$("#attachments").on "click", ".
|
29
|
+
$("#attachments").on "click", ".insert-link", (e) ->
|
30
|
+
e.preventDefault()
|
31
|
+
editor.composer.commands.exec "createLink",
|
32
|
+
href: $(this).attr "href"
|
33
|
+
target: "_blank"
|
34
|
+
rel: "nofollow"
|
35
|
+
text: $(this).data("name")
|
36
|
+
|
37
|
+
$("#attachments").on "click", ".delete", (e) ->
|
25
38
|
el = $(this).parents(".attachment")
|
26
39
|
spinner.spin el[0]
|
27
40
|
el.css opacity: 0.5
|
@@ -6,11 +6,11 @@
|
|
6
6
|
<div class="media-body">
|
7
7
|
<h4 class="attachment-file media-heading"><%= attachment.asset_file_name %></h4>
|
8
8
|
<% if attachment.image? %>
|
9
|
-
<%= link_to "Insert",
|
9
|
+
<%= link_to "Insert", attachment.url(:main), class: "insert insert-image btn btn-primary btn-xs" %>
|
10
10
|
<% else %>
|
11
|
-
<%= link_to "Insert",
|
11
|
+
<%= link_to "Insert", attachment.url(:original), class: "insert insert-link btn btn-primary btn-xs", data: { name: attachment.asset_file_name } %>
|
12
12
|
<% end %>
|
13
|
-
<%= link_to "Delete", destroy_attachment_path(attachment.id), class: "delete btn btn-danger btn-xs"
|
13
|
+
<%= link_to "Delete", destroy_attachment_path(attachment.id), class: "delete btn btn-danger btn-xs" %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
</li>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-attachments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developers at Brightin
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.3.
|
19
|
+
version: 2.3.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.3.
|
26
|
+
version: 2.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paperclip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|