tinymce-rails-imageupload 3.5.6.3 → 3.5.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## 3.5.6.4 (December 10, 2012)
2
+
3
+ * Convert CoffeeScript to JavaScript to avoid depending on CoffeeScript (#19). Thanks to sobrinho (Gabriel Sobrinho)
4
+
1
5
  ## 3.5.6.3 (August 27, 2012)
2
6
 
3
7
  * Make the POST URL configurable (#3). Thanks to minaguib (Mina Naguib)
@@ -10,7 +10,7 @@
10
10
  ## Requirements
11
11
 
12
12
  * Rails >= 3.1
13
- * TinyMCE using the advanced theme and jQuery
13
+ * TinyMCE using the advanced theme
14
14
 
15
15
  ## Setup
16
16
 
@@ -62,6 +62,12 @@ I18n is taken care of by `tinymce-rails`. This gem includes strings for english,
62
62
  To add your own language, create the files `<code>.js` and `<code>_dlg.js` in `vendor/assets/javascripts/tinymce/plugins/uploadimage/langs` in your application,
63
63
  or fork the gem and add your own translations there.
64
64
 
65
+ To get your custom language precompiled, you have to add it to the list of files manually.
66
+ If you have a fork, just add it to the list in `lib/tinymce-rails-imageupload/rails.rb`, but if you have the translations in the application,
67
+ you can add it like this in `config/application.rb`:
68
+
69
+ config.assets.precompile += %w(tinymce/plugins/uploadimage/langs/fr.js tinymce/plugins/uploadimage/langs/fr_dlg.js)
70
+
65
71
  The available strings are listed below:
66
72
 
67
73
  ### en.js
@@ -1,7 +1,7 @@
1
1
  module Tinymce
2
2
  module Rails
3
3
  module Imageupload
4
- VERSION = "3.5.6.3"
4
+ VERSION = "3.5.6.4"
5
5
  end
6
6
  end
7
7
  end
@@ -15,6 +15,17 @@
15
15
  return null;
16
16
  }
17
17
 
18
+ function getMetaContents(mn)
19
+ {
20
+ var m = (window.opener || window.parent).document.getElementsByTagName('meta');
21
+
22
+ for(var i in m)
23
+ if(m[i].name == mn)
24
+ return m[i].content;
25
+
26
+ return null;
27
+ }
28
+
18
29
  function uploadDone(name)
19
30
  {
20
31
  var frame = getFrameByName(name);
@@ -44,7 +55,7 @@
44
55
  this.f = document.forms[0];
45
56
  this.f.action = tinyMCEPopup.getParam("uploadimage_form_url", "/tinymce_assets");
46
57
  document.getElementById("hint").value = tinyMCEPopup.getParam("uploadimage_hint", "");
47
- document.getElementById("authenticity_token").value = (window.opener || window.parent).$("meta[name='csrf-token']")[0].content;
58
+ document.getElementById("authenticity_token").value = getMetaContents('csrf-token');
48
59
  },
49
60
 
50
61
  insert: function() {
@@ -0,0 +1,38 @@
1
+ (function() {
2
+ tinymce.PluginManager.requireLangPack('uploadimage');
3
+ tinymce.create('tinymce.plugins.UploadImagePlugin', {
4
+ init: function(ed, url) {
5
+ ed.addCommand('mceUploadImage', function() {
6
+ return ed.windowManager.open({
7
+ file: url + '/dialog.html',
8
+ width: 320 + parseInt(ed.getLang('uploadimage.delta_width', 0)),
9
+ height: 180 + parseInt(ed.getLang('uploadimage.delta_height', 0)),
10
+ inline: 1
11
+ }, {
12
+ plugin_url: url
13
+ });
14
+ });
15
+ ed.addButton('uploadimage', {
16
+ title: 'uploadimage.desc',
17
+ cmd: 'mceUploadImage',
18
+ image: url + '/img/uploadimage.png'
19
+ });
20
+ return ed.onNodeChange.add(function(ed, cm, n) {
21
+ return cm.setActive('uploadimage', n.nodeName === 'IMG');
22
+ });
23
+ },
24
+ createControl: function(n, cm) {
25
+ return null;
26
+ },
27
+ getInfo: function() {
28
+ return {
29
+ longname: 'UploadImage plugin',
30
+ author: 'Per Christian B. Viken (borrows heavily from work done by Peter Shoukry of 77effects.com)',
31
+ authorurl: 'eastblue.org/oss',
32
+ infourl: 'eastblue.org/oss',
33
+ version: '1.0'
34
+ };
35
+ }
36
+ });
37
+ return tinymce.PluginManager.add('uploadimage', tinymce.plugins.UploadImagePlugin);
38
+ })();
metadata CHANGED
@@ -1,100 +1,100 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tinymce-rails-imageupload
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 3
7
- - 5
8
- - 6
9
- - 3
10
- version: 3.5.6.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.5.6.4
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Per Christian B. Viken
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-08-27 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: railties
23
16
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 3
30
- - 1
31
- version: "3.1"
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ none: false
32
23
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ! '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '3.1'
29
+ none: false
30
+ - !ruby/object:Gem::Dependency
35
31
  name: tinymce-rails
36
32
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 3
43
- - 4
44
- - 9
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
45
37
  version: 3.4.9
38
+ none: false
46
39
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 3.4.9
45
+ none: false
46
+ - !ruby/object:Gem::Dependency
49
47
  name: bundler
50
48
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
53
51
  - - ~>
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 0
58
- - 0
52
+ - !ruby/object:Gem::Version
59
53
  version: 1.0.0
54
+ none: false
60
55
  type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: 1.0.0
61
+ none: false
62
+ - !ruby/object:Gem::Dependency
63
63
  name: rails
64
64
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 3
71
- - 1
72
- version: "3.1"
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '3.1'
70
+ none: false
73
71
  type: :development
74
- version_requirements: *id004
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '3.1'
77
+ none: false
75
78
  description: TinyMCE plugin for taking image uploads in Rails >= 3.1
76
- email:
79
+ email:
77
80
  - perchr@northblue.org
78
81
  executables: []
79
-
80
82
  extensions: []
81
-
82
83
  extra_rdoc_files: []
83
-
84
- files:
84
+ files:
85
85
  - .gitignore
86
86
  - CHANGELOG.markdown
87
87
  - Gemfile
88
88
  - LICENSE
89
89
  - README.markdown
90
90
  - Rakefile
91
- - app/assets/javascripts/tinymce/plugins/uploadimage/editor_plugin.js.coffee
92
91
  - lib/tasks/tinymce-uploadimage-assets.rake
93
92
  - lib/tinymce-rails-imageupload.rb
94
93
  - lib/tinymce-rails-imageupload/rails.rb
95
94
  - lib/tinymce-rails-imageupload/version.rb
96
95
  - tinymce-rails-imageupload.gemspec
97
96
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/dialog.html
97
+ - vendor/assets/javascripts/tinymce/plugins/uploadimage/editor_plugin.js
98
98
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/img/uploadimage.png
99
99
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en.js
100
100
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en_dlg.js
@@ -104,35 +104,28 @@ files:
104
104
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/pt_dlg.js
105
105
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/ru.js
106
106
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/ru_dlg.js
107
- has_rdoc: true
108
107
  homepage: http://eastblue.org/oss
109
108
  licenses: []
110
-
111
109
  post_install_message:
112
110
  rdoc_options: []
113
-
114
- require_paths:
111
+ require_paths:
115
112
  - lib
116
- required_ruby_version: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- segments:
121
- - 0
122
- version: "0"
123
- required_rubygems_version: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- segments:
128
- - 0
129
- version: "0"
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ none: false
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ none: false
130
125
  requirements: []
131
-
132
126
  rubyforge_project:
133
- rubygems_version: 1.3.6
127
+ rubygems_version: 1.8.24
134
128
  signing_key:
135
129
  specification_version: 3
136
130
  summary: TinyMCE plugin for taking image uploads in Rails >= 3.1
137
131
  test_files: []
138
-
@@ -1,40 +0,0 @@
1
- (->
2
- tinymce.PluginManager.requireLangPack('uploadimage')
3
-
4
- tinymce.create 'tinymce.plugins.UploadImagePlugin', {
5
- init: (ed, url) ->
6
- ed.addCommand 'mceUploadImage', ->
7
- ed.windowManager.open {
8
- file: url + '/dialog.html',
9
- width: 320 + parseInt(ed.getLang('uploadimage.delta_width', 0)),
10
- height: 180 + parseInt(ed.getLang('uploadimage.delta_height', 0)),
11
- inline: 1
12
- }, {
13
- plugin_url: url
14
- }
15
-
16
- ed.addButton 'uploadimage', {
17
- title: 'uploadimage.desc',
18
- cmd: 'mceUploadImage',
19
- image: url + '/img/uploadimage.png'
20
- }
21
-
22
- # Selects the button in the UI when a image is selected
23
- ed.onNodeChange.add (ed, cm, n) ->
24
- cm.setActive('uploadimage', n.nodeName == 'IMG')
25
-
26
- createControl: (n, cm) ->
27
- null
28
-
29
- getInfo: () ->
30
- {
31
- longname: 'UploadImage plugin',
32
- author: 'Per Christian B. Viken (borrows heavily from work done by Peter Shoukry of 77effects.com)',
33
- authorurl: 'eastblue.org/oss',
34
- infourl: 'eastblue.org/oss',
35
- version: '1.0'
36
- }
37
- }
38
-
39
- tinymce.PluginManager.add 'uploadimage', tinymce.plugins.UploadImagePlugin
40
- )()