tinymce-rails-imageupload 3.5.8.2 → 3.5.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.asc +13 -13
- data/CHANGELOG.md +5 -0
- data/README.md +6 -0
- data/lib/tinymce-rails-imageupload/version.rb +1 -1
- data/tinymce-rails-imageupload.gemspec +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/dialog.html +10 -2
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/editor_plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en_dlg.js +2 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr_dlg.js +2 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/nb_dlg.js +2 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/pt_BR_dlg.js +2 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/pt_dlg.js +2 -1
- data/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/ru_dlg.js +2 -1
- metadata +4 -4
- metadata.gz.asc +13 -13
data.tar.gz.asc
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
+
|
16
|
-
|
17
|
-
=
|
5
|
+
iQIcBAABAgAGBQJRRv6YAAoJEH1ncb0Txu7XC7IP/25BWQn8lYTaEHKhDCjrrYeH
|
6
|
+
cuSTmNmhwCZdCl+lwPSeRcEFX1qRB04AALKw/2nr4tBBOfdbOJLBkAU5xKw99sx9
|
7
|
+
0kLYTgpvUag4j7wxOZAy+Asj4UxeQo9DJkyjrLm6Q5q6gvA8oHQWIiTDtDJONOdc
|
8
|
+
vOFVz1dA8TWggK7zlLurlo8ujXMESzdPT3YxBxW393FaJhESVBxzFuxuiiUiMORQ
|
9
|
+
aS9ck5Ty+ZC2AFh+z/jX7rcSUzBtAZgdYKnzqD6O6f5DuAzbAkoxO4P4kj8Lb+Zp
|
10
|
+
upXk1X0N6GseAsNkhHIwDltVv6qWXgHytYecBNyicBXqLXjNVZUAvxp6EWkwzAUp
|
11
|
+
k1zZirRYCEUaaIox6U2DQHXLXjo3kLSDr4/1tWN9AMemxobuaVC+ZuGrNG3++FA0
|
12
|
+
hNNNMQl+l+YHLsJEEZ3gQIyLsydKjglb8DOkOjgJgnDjvAzy/ZlMYMnty/ltyA36
|
13
|
+
5eVvkZyobUl1oYM1all4eI4PBuGMTHmq8vOWDBNDIdvNUxN997+jiA+PQ7Ovj8qj
|
14
|
+
z9j3B8Da2UP9nN+nE9QU8Tlh2PYrxBRkPZUGXg0nmA/Nxw/ewmPom+CiGpq4DLtg
|
15
|
+
2w+CBwk86mXwnF/Kgng7/9fdCoc4SYCeEAQzfNFdI35D0/HiT27BzsnDx9MTOpZh
|
16
|
+
hxURDjQbCwBQPnUsWGs5
|
17
|
+
=g0oZ
|
18
18
|
-----END PGP SIGNATURE-----
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 3.5.8.3 / 2013-03-18
|
2
|
+
|
3
|
+
* Add option for assigning class to img tag. Thanks to nathanshox (Nathan Shaughnessy)
|
4
|
+
* Add alt attribute to img tag and input for user to set it. Thanks to nathanshox (Nathan Shaughnessy)
|
5
|
+
|
1
6
|
# 3.5.8.2 / 2013-03-11
|
2
7
|
|
3
8
|
* Added fr-FR translations. Thanks to pompombidou (Harold Simpson)
|
data/README.md
CHANGED
@@ -56,6 +56,12 @@
|
|
56
56
|
|
57
57
|
If the JSON response contains a `width` and/or `height` key, those will be used in the inserted HTML (`<img src="..." width="..." height="...">`), but if those are not present, the inserted HTML is just `<img src="...">`.
|
58
58
|
|
59
|
+
### Default class for img tag
|
60
|
+
|
61
|
+
By default the plugin doesn't assign any class to the img tag. You can set the class(es) by supplying the `uploadimage_default_img_class` option in the call to `.tinymce()`.
|
62
|
+
|
63
|
+
`class="..."` will only be added to the img tag if a default is specified. Otherwise the inserted HTML is just `<img src="...">`.
|
64
|
+
|
59
65
|
## Error handling
|
60
66
|
|
61
67
|
To notify the uploader that an error occurred, return JSON containing a `error` key with a `message`.
|
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
s.add_runtime_dependency "railties", ">= 3.1"
|
19
19
|
s.add_runtime_dependency "tinymce-rails", ">= 3.4.9"
|
20
|
-
s.add_development_dependency "bundler", "~> 1.0
|
20
|
+
s.add_development_dependency "bundler", "~> 1.0"
|
21
21
|
s.add_development_dependency "rails", ">= 3.1"
|
22
22
|
end
|
@@ -65,14 +65,20 @@
|
|
65
65
|
},
|
66
66
|
|
67
67
|
buildHTML: function(json) {
|
68
|
-
var
|
68
|
+
var default_class = tinyMCEPopup.getParam("uploadimage_default_img_class", "");
|
69
|
+
var alt_text = document.getElementById("alt_text").value;
|
70
|
+
|
71
|
+
var imgstr = "<img src='" + json["image"]["url"] + "'";
|
72
|
+
|
73
|
+
if(default_class != "")
|
74
|
+
imgstr += " class='" + default_class + "'";
|
69
75
|
|
70
76
|
if(json["image"]["height"])
|
71
77
|
imgstr += " height='" + json["image"]["height"] + "'";
|
72
78
|
if(json["image"]["width"])
|
73
79
|
imgstr += " width='" + json["image"]["width"] + "'";
|
74
80
|
|
75
|
-
imgstr += "/>";
|
81
|
+
imgstr += " alt='" + alt_text + "'/>";
|
76
82
|
|
77
83
|
return imgstr;
|
78
84
|
},
|
@@ -122,6 +128,8 @@
|
|
122
128
|
<label id='file_upload_label' for='file_upload'>{#uploadimage_dlg.input}:</label>
|
123
129
|
<input type='file' name='file' id='file_upload'>
|
124
130
|
<p id="error_message"></p>
|
131
|
+
<label id='alt_text_label' for='alt_text'>{#uploadimage_dlg.alt_text}:</label>
|
132
|
+
<input type="text" name="alt" id="alt_text">
|
125
133
|
|
126
134
|
<div class="mceActionPanel">
|
127
135
|
<input type="button" id="insert" name="insert" value="{#uploadimage_dlg.insert}" onclick="UploadImageDialog.insert();"/>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
ed.addCommand('mceUploadImage', function() {
|
6
6
|
return ed.windowManager.open({
|
7
7
|
file: url + '/dialog.html',
|
8
|
-
width:
|
8
|
+
width: 350 + parseInt(ed.getLang('uploadimage.delta_width', 0)),
|
9
9
|
height: 180 + parseInt(ed.getLang('uploadimage.delta_height', 0)),
|
10
10
|
inline: 1
|
11
11
|
}, {
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: tinymce-rails-imageupload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.5.8.
|
5
|
+
version: 3.5.8.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Per Christian B. Viken
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -51,14 +51,14 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.0
|
54
|
+
version: '1.0'
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0
|
61
|
+
version: '1.0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rails
|
64
64
|
type: :development
|
metadata.gz.asc
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
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