tinymce-rails-imageupload 3.5.8.3 → 3.5.8.4

Sign up to get free protection for your applications and to get access to all the features.
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
- 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
5
+ iQIcBAABAgAGBQJRdnMWAAoJEH1ncb0Txu7XWKEP/3DFiCqdm34hMQcug730DvsL
6
+ eRgVDtvHgAk9hCrEa7dkdKeuOsL83fw8P+mA8Krf4IdDz0iVlrCpCKDxrh1B0Jeq
7
+ ZncHkHi4D0VVFwPSUBgRfohOq9aKK4C9KHBmC9kutRdh3bjZoQ52Q+RSxyDwW2gZ
8
+ 4lgihX8ltzz5EMHqNm4Hi+J6NIyeZhe4YhhCZLIwHX3dnQE6A6PZeX+YjOjW5u14
9
+ 9LeKyz9NvGVgQ7H9s7VraNHP+1dLMMoqnPUL2rqfB3jAd8hPSg8Yr/gKpPB6gE+q
10
+ xzvMRPMX+UgUZbTS7LBlLCyNe4amerFe+q4zEA5oLFKzNIdH8LP2fHZ191YDJN53
11
+ 0dl+LoiblaKStcYUlR+/x6a4OCtnsceUPSFWOv76SP9j/w5ekTZoNvD0HF+kPzR0
12
+ b7mgwfmtB8Lc2HAyVh/t5+XIC0J/G0+qXmJ6eDIofR/hpoErBoFmxLPQQRXegXkc
13
+ 79DIFiEHRxol8qmKr63TkqOAb45YBvNro10UnpIMqA+8fkRfKQDaMwG/zpR/0K6q
14
+ 5GmmLU6YCNSZNIc9s+6gKZ3RBuXDN5EyT9eg1P622e7dflbdW/fNxmZmburonnAr
15
+ MnpBoymcjiUt5YyoAmBp1gXuFiaH8df3fpJ+y/Vg41HVBNq+4co7Bafstq+5IKMy
16
+ qtSqceCrq5FEAz1M5+96
17
+ =qWAO
18
18
  -----END PGP SIGNATURE-----
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 3.5.8.4 / 2013-04-23
2
+
3
+ * Make the plugin work in IE8 and IE9 again. Thanks to pomartel (Pierre Olivier Martel)
4
+ * Add German translations. Thanks to pomartel (Pierre Olivier Martel)
5
+ * Add Spanish translations. Thanks to pomartel (Pierre Olivier Martel)
6
+
1
7
  # 3.5.8.3 / 2013-03-18
2
8
 
3
9
  * Add option for assigning class to img tag. Thanks to nathanshox (Nathan Shaughnessy)
@@ -1,7 +1,14 @@
1
- Rake::Task['assets:precompile:primary'].enhance do
2
- assets = File.expand_path(File.dirname(__FILE__) + "/../../vendor/assets/javascripts/tinymce")
3
- target = File.join(Rails.public_path, Rails.application.config.assets.prefix)
1
+ assets_task = Rake::Task.task_defined?('assets:precompile:primary') ? 'assets:precompile:primary' : 'assets:precompile'
4
2
 
5
- mkdir_p target
6
- cp_r assets, target
3
+ Rake::Task[assets_task].enhance do
4
+ require "tinymce/rails/asset_installer"
5
+
6
+ config = Rails.application.config
7
+ target = File.join(Rails.public_path, config.assets.prefix)
8
+ manifest = config.assets.manifest
9
+
10
+ assets = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__),
11
+ "../../vendor/assets/javascripts/tinymce/plugins/uploadimage")))
12
+ TinyMCE::Rails::AssetInstaller::ASSETS = assets
13
+ TinyMCE::Rails::AssetInstaller.new(target, manifest).install
7
14
  end
@@ -3,17 +3,7 @@ module Tinymce
3
3
  module Imageupload
4
4
  class Engine < ::Rails::Engine
5
5
  initializer 'TinymceRailsImageupload.assets_pipeline' do |app|
6
- app.config.assets.precompile << "tinymce/plugins/uploadimage/editor_plugin.js"
7
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/en.js"
8
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/en_dlg.js"
9
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/fr.js"
10
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/fr_dlg.js"
11
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/nb.js"
12
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/nb_dlg.js"
13
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/pt.js"
14
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/pt_dlg.js"
15
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/ru.js"
16
- app.config.assets.precompile << "tinymce/plugins/uploadimage/langs/ru_dlg.js"
6
+ app.config.assets.precompile << "tinymce/plugins/uploadimage/*"
17
7
  end
18
8
  end
19
9
  end
@@ -1,7 +1,7 @@
1
1
  module Tinymce
2
2
  module Rails
3
3
  module Imageupload
4
- VERSION = "3.5.8.3"
4
+ VERSION = "3.5.8.4"
5
5
  end
6
6
  end
7
7
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
 
18
18
  s.add_runtime_dependency "railties", ">= 3.1"
19
- s.add_runtime_dependency "tinymce-rails", ">= 3.4.9"
19
+ s.add_runtime_dependency "tinymce-rails", "~> 3.5.8"
20
20
  s.add_development_dependency "bundler", "~> 1.0"
21
21
  s.add_development_dependency "rails", ">= 3.1"
22
22
  end
@@ -23,30 +23,36 @@
23
23
  document.getElementById("authenticity_token").value = this.getMetaContents('csrf-token');
24
24
 
25
25
  this.iframe = document.getElementById("hidden_upload");
26
- if(this.iframe.attachEvent)
27
- this.iframe.attachEvent('onload', UploadImageDialog.uploadDone);
28
- else
29
- this.iframe.addEventListener('load', UploadImageDialog.uploadDone, false);
30
26
  },
31
27
 
32
28
  insert: function() {
29
+ // Detach events first, then attach to avoid double event triggering
30
+ if(this.iframe.attachEvent) {
31
+ this.iframe.detachEvent('onload', UploadImageDialog.uploadDone);
32
+ this.iframe.attachEvent('onload', UploadImageDialog.uploadDone);
33
+ } else {
34
+ this.iframe.removeEventListener('load', UploadImageDialog.uploadDone);
35
+ this.iframe.addEventListener('load', UploadImageDialog.uploadDone, false);
36
+ }
33
37
  var input = document.getElementById("file_upload");
34
38
 
35
39
  if(input.value != "") {
36
40
  document.getElementById("upload_spinner").className = '';
37
41
  this.f.submit();
38
- } else
42
+ } else {
39
43
  this.handleError(tinyMCEPopup.getLang("uploadimage_dlg.blank_input", "Must choose a file"));
44
+ }
40
45
  },
41
46
 
42
47
  uploadDone: function() {
43
48
  document.getElementById("upload_spinner").className = 'inactive';
44
-
45
- if(this.document || this.contentDocument) {
46
- var doc = this.document ? this.document : this.contentDocument;
49
+ var iframe = document.getElementById("hidden_upload");
50
+ if(iframe.document || iframe.contentDocument) {
51
+ var doc = iframe.contentDocument || iframe.contentWindow.document;
47
52
  UploadImageDialog.handleResponse(doc.getElementsByTagName("body")[0].innerHTML);
48
- } else
53
+ } else {
49
54
  UploadImageDialog.handleError(tinyMCEPopup.getLang("uploadimage_dlg.blank_response", "Didn't get a response from the server"));
55
+ }
50
56
  },
51
57
 
52
58
  handleResponse: function(ret) {
@@ -123,7 +129,7 @@
123
129
  <input type="hidden" name="utf8" value="✓">
124
130
  <input type="hidden" name="authenticity_token" id="authenticity_token" value="#replaceme">
125
131
  <input type="hidden" name="hint" id="hint" value="#replaceme">
126
- <iframe id="hidden_upload" name="hidden_upload" src="" style='width:0;height:0;border:0px solid #fff'></iframe>
132
+ <iframe id="hidden_upload" name="hidden_upload" src="javascript:void(0)" style='width:0;height:0;border:0px solid #fff'></iframe>
127
133
 
128
134
  <label id='file_upload_label' for='file_upload'>{#uploadimage_dlg.input}:</label>
129
135
  <input type='file' name='file' id='file_upload'>
@@ -0,0 +1,3 @@
1
+ tinyMCE.addI18n('de.uploadimage', {
2
+ desc: 'Bild vom Computer einfügen'
3
+ });
@@ -0,0 +1,12 @@
1
+ tinyMCE.addI18n('de.uploadimage_dlg', {
2
+ title: 'Bild einfügen',
3
+ header: "Bild einfügen",
4
+ input: "Bild auswählen",
5
+ uploading: "Wird geladen...",
6
+ blank_input: "Datei auswählen",
7
+ bad_response: "Ungültige Antwort vom Server",
8
+ blank_response: "Server antwortet nicht",
9
+ insert: "Einfügen",
10
+ cancel: "Abbrechen",
11
+ alt_text: "Bildbeschreibung"
12
+ });
@@ -0,0 +1,3 @@
1
+ tinyMCE.addI18n('es.uploadimage', {
2
+ desc: 'Insertar una imagen desde su computadora'
3
+ });
@@ -0,0 +1,12 @@
1
+ tinyMCE.addI18n('es.uploadimage_dlg', {
2
+ title: 'Insertar una imagen',
3
+ header: "Insertar una imagen",
4
+ input: "Elija una imagen",
5
+ uploading: "Subiendo…",
6
+ blank_input: "Debe elegir un archivo",
7
+ bad_response: "Mala respuesta del servidor",
8
+ blank_response: "No se recibió respuesta del servidor",
9
+ insert: "Insertar",
10
+ cancel: "Cancelar",
11
+ alt_text: "Descripción de la imagen"
12
+ });
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.3
5
+ version: 3.5.8.4
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-18 00:00:00.000000000 Z
12
+ date: 2013-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -33,16 +33,16 @@ dependencies:
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  none: false
35
35
  requirements:
36
- - - ! '>='
36
+ - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 3.4.9
38
+ version: 3.5.8
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 3.4.9
45
+ version: 3.5.8
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: bundler
48
48
  type: :development
@@ -97,8 +97,12 @@ files:
97
97
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/editor_plugin.js
98
98
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/img/spinner.gif
99
99
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/img/uploadimage.png
100
+ - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/de.js
101
+ - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/de_dlg.js
100
102
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en.js
101
103
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en_dlg.js
104
+ - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/es.js
105
+ - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/es_dlg.js
102
106
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr.js
103
107
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr_dlg.js
104
108
  - vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/nb.js
@@ -134,3 +138,4 @@ signing_key:
134
138
  specification_version: 3
135
139
  summary: TinyMCE plugin for taking image uploads in Rails >= 3.1
136
140
  test_files: []
141
+ has_rdoc:
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
- iQIcBAABAgAGBQJRRv6YAAoJEH1ncb0Txu7XCHYP/Akwj0cFKxLbQ6iA23FDEEdy
6
- 0k8y07AqPi61LGFlzGVjKckB0TtTrM4+t0R4D9RgOfav8KNQWYy450OZQ02vHI0x
7
- a6omrzIPvTi8JqN6IOqgCJdUKd/G+Trwu93SwNwkH+oHI+k+JSDO92pyuz6vTyyB
8
- 23JcAlU62AbA1dLCC59L3rR2Z2w+OE5q5CLCDb7hdnP7nY9TPeFrfRlNrMkv/tqG
9
- /lry3hKRKf6i24y0/cUA215rrtLFRXSTE3t+UgCG8sM4FLEBXgEms5EB9adW+piH
10
- Y7AYCLhZ/k1GWCCKZu64n9ehH4uYyHYUFtPhP/L1x0TsnCerHVDWfUi6bLFFUNIe
11
- 3uwr203v6BXH8zCqUlOnUl6m9Uyj3dZ5YMMjZcCYRQ05b87x6tAjATWP71KqWYdW
12
- LM2G3DUzUiU/8pWzT/jx9mbZENW8VOURGwkh8wgnnKxwcsMR+mvaNNIRj7aeJ3jI
13
- j6cYx+eG7Keg4zV1gksFy7PLjE+BhUMwSRI4WpZXBKo8POGx/IdQq+s/HEAi2IrB
14
- 3HRY7uuR1s0gCZHw1SSDZE37uJhl3Tua5QBK+OQeQD+qhcnhnHJvm+MITKzRP3QM
15
- Xztd40JzbsiMu9MvuZCjqxedetytf+WegaSH48G/XmzJLRGXnpqZkhoykkqV3AOH
16
- IZoOnwhPg/th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