lolita-file-upload 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/lolita/file-upload/gallery.js.coffee +29 -8
- data/lolita-file-upload.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 568a9d1f6ec87704ed5601b07f0617563a96049d
|
4
|
+
data.tar.gz: 99deb330f702b59670ff76c8c31969cbd8c86da7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d5ce523bb2839b827c8c826eddd71e3a2c6caa3186b62758abc7f937cb47457c19c9b2f0eeb9a5ef6230267884fcbba4817dfd2b177f488ed527e8707548d35
|
7
|
+
data.tar.gz: 2c4e92bdf7fdaec731eb0462fda4ffe6ea9bdb81fcd88bbd8b85512fbcd8c458dc5a52162c4f8478ec198e4cefdd7b49f69d1dbadfb564616e033e9795acc91f
|
data/Gemfile.lock
CHANGED
@@ -24,12 +24,14 @@ class window.LolitaFileUploadGallery
|
|
24
24
|
@_createSlider()
|
25
25
|
@_addImagesToDOM()
|
26
26
|
@_observeCloseButton()
|
27
|
+
if tinyMCE.majorVersion == '3'
|
28
|
+
@_addButtonToTinyMCEversion3()
|
27
29
|
@._initialized = true
|
28
30
|
|
29
31
|
_observeImageDropping: ->
|
30
|
-
if
|
31
|
-
tinyMCE.onAddEditor.add (
|
32
|
-
@_observeDropOnTinyMCEEditor(
|
32
|
+
if tinyMCE.majorVersion == '3'
|
33
|
+
tinyMCE.onAddEditor.add (manager, editor) =>
|
34
|
+
@_observeDropOnTinyMCEEditor(editor)
|
33
35
|
else
|
34
36
|
tinyMCE.on "AddEditor", (e) =>
|
35
37
|
@_observeDropOnTinyMCEEditor(e.editor)
|
@@ -84,6 +86,17 @@ class window.LolitaFileUploadGallery
|
|
84
86
|
@_gallery().hide()
|
85
87
|
)
|
86
88
|
|
89
|
+
_addButtonToTinyMCEversion3: ->
|
90
|
+
TinyMCEConfigManager.get().config.addAfter("buttons", "gallery", "image")
|
91
|
+
TinyMCEConfigManager.get().config.addFunction("setup", (editor) ->
|
92
|
+
editor.addButton("gallery", {
|
93
|
+
title: window.LolitaFileUploadGallery.buttonTitle
|
94
|
+
image: window.LolitaFileUploadGallery.buttonImage
|
95
|
+
onclick: ->
|
96
|
+
window.LolitaFileUploadGallery.get().toggle()
|
97
|
+
})
|
98
|
+
)
|
99
|
+
|
87
100
|
_addButtonToTinyMCE: (editor) ->
|
88
101
|
editor.addButton "gallery",
|
89
102
|
title: LolitaFileUploadGallery.buttonTitle
|
@@ -144,11 +157,19 @@ class window.LolitaFileUploadGallery
|
|
144
157
|
|
145
158
|
_observeDropOnTinyMCEEditor: (newEditor) ->
|
146
159
|
self = this
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
160
|
+
if tinyMCE.majorVersion == '3'
|
161
|
+
newEditor.onInit.add (editor) ->
|
162
|
+
$(editor.contentDocument).ready ->
|
163
|
+
self._editorContainer(editor).droppable({
|
164
|
+
drop: (event, ui) ->
|
165
|
+
editor.selection.setContent(self._insertableTag(ui.draggable))
|
166
|
+
})
|
167
|
+
else
|
168
|
+
newEditor.on "LoadContent", (e) ->
|
169
|
+
$(e.target.getContainer()).droppable({
|
170
|
+
drop: (event, ui) ->
|
171
|
+
e.target.selection.setContent(self._insertableTag(ui.draggable))
|
172
|
+
})
|
152
173
|
|
153
174
|
_editorContainer: (editor) ->
|
154
175
|
$("#" + editor.editorContainer).find(".mceIframeContainer")
|
data/lolita-file-upload.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "lolita-file-upload"
|
6
|
-
s.version = "1.0.
|
6
|
+
s.version = "1.0.1"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["ITHouse (Latvia)", "Arturs Meisters", "Gatis Tomsons"]
|
9
9
|
s.description = "File upload gem for Lolita with with fulll integration - models, controller, views"
|