effective_bootstrap 0.9.40 → 0.9.41
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b496c8193535d6f7bb0a74e49665dec14d0330b26682753c5b8721a00da0288
|
4
|
+
data.tar.gz: 20d00e39d97d38d350f81c69abb3fbe35a4e9950b5807108a1c5b819cf596545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e8e3c0416424d8f2a675f704a7088b9a5edbc8cbb26d8d8853ad1b9c7d2dac98cf2c7a4352e23ad9a5fd6398c7713d7602cd552e9d95311cf74ea0fdc1b0e51
|
7
|
+
data.tar.gz: 5c5bd0a118f9a68b8901fab25692e95a1728ebdb9a00744a93567fe1185fc23f02d4948609906c75b949440e1340ceaa298fb053f5807cd24195bc825fc2666d
|
@@ -6,7 +6,25 @@ uploadActiveStorage = (editor, data) ->
|
|
6
6
|
|
7
7
|
upload.create (error, blob) =>
|
8
8
|
url = '/rails/active_storage/blobs/redirect/' + blob.signed_id + '/' + blob.filename
|
9
|
-
editor.complete({ file: { url: url }}, data.e)
|
9
|
+
editor.complete({ file: { url: url, name: blob.filename, content_type: blob.content_type }}, data.e)
|
10
|
+
|
11
|
+
insertUploadByDrop = (response, e) ->
|
12
|
+
if @app.block.is()
|
13
|
+
instance = @app.block.get()
|
14
|
+
target = e.target
|
15
|
+
type = instance.getType()
|
16
|
+
|
17
|
+
if ((type == 'card' && target && target.tagName == 'IMG' && instance.hasImage()) || type == 'image')
|
18
|
+
return @change(response)
|
19
|
+
else if (e && type != 'card' && instance.isEditable())
|
20
|
+
@app.insertion.insertPoint(e)
|
21
|
+
|
22
|
+
content_type = (response.file.content_type || '')
|
23
|
+
|
24
|
+
unless content_type.startsWith('image') && @app.filelink
|
25
|
+
@app.filelink._insert(response)
|
26
|
+
else
|
27
|
+
@insert(response)
|
10
28
|
|
11
29
|
(this.EffectiveBootstrap || {}).effective_article_editor = ($element, options) ->
|
12
30
|
|
@@ -15,4 +33,9 @@ uploadActiveStorage = (editor, data) ->
|
|
15
33
|
upload: (editor, data) -> uploadActiveStorage(editor, data)
|
16
34
|
}
|
17
35
|
|
18
|
-
|
36
|
+
options['filelink'] = {
|
37
|
+
upload: (editor, data) -> uploadActiveStorage(editor, data)
|
38
|
+
}
|
39
|
+
|
40
|
+
editor = ArticleEditor($element, options)
|
41
|
+
editor.app.image.insertByDrop = insertUploadByDrop
|
@@ -14,6 +14,7 @@ module Effective
|
|
14
14
|
body: 'article-editor-body',
|
15
15
|
table: 'table'
|
16
16
|
},
|
17
|
+
filelink: nil,
|
17
18
|
grid: {
|
18
19
|
classname: 'row',
|
19
20
|
columns: 12,
|
@@ -40,7 +41,7 @@ module Effective
|
|
40
41
|
'12': 'col-sm-12'
|
41
42
|
}
|
42
43
|
},
|
43
|
-
plugins: ['blockcode', 'cellcolor', 'imageposition', 'imageresize', 'inlineformat', 'listitem', 'removeformat', 'reorder', 'style'],
|
44
|
+
plugins: ['blockcode', 'cellcolor', 'imageposition', 'imageresize', 'inlineformat', 'listitem', 'removeformat', 'reorder', 'style', 'filelink'],
|
44
45
|
quote: {
|
45
46
|
template: '<blockquote><p></p></blockquote>'
|
46
47
|
},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08
|
11
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|