Skip to content
Browse files

some cleanups and fixes + readme fix (replaced photos with photos_att…

…ributes in :field_name option)
  • Loading branch information...
1 parent 8aa93fd commit ea27695820cdfa91c6560a164cddf08eda981adf @fsmanuel fsmanuel committed Nov 2, 2011
View
2 README.md
@@ -90,7 +90,7 @@ Consider the common case of an Album which has_many Photos.
In your form for an album, you can use:
- <%= plupload(@album, :photos, options={:plupload_container=>'uploader', :pluploader=>true, :field_name=>'album[photos][][payload]'}) %>
+ <%= plupload(@album, :photos, options={:plupload_container=>'uploader', :pluploader=>true, :field_name=>'album[photos_attributes][][payload]'}) %>
<div id="uploader" name="uploader" style="width: 100%;"></div>
View
46 lib/app/controllers/plupload_rails_controller.rb
@@ -5,32 +5,32 @@ def _plupload_uploader
FileUtils.mv(params[:file].tempfile, plupload_temp_path)
add_fields_for_files_to_forms =<<END
function _pluploadRails_addFieldsForFilesToForms(){
- for(var i=0; document.forms.length; i++) {
- var theForm = document.forms[i];
- var input = document.createElement("input");
- input.name='_plupload_files[]';
- input.type='hidden';
- input.value='#{File.expand_path(params[:file].tempfile.path)}';
- theForm.appendChild(input);
+ $('form').each(function() {
+ var theForm = $(this);
- var input = document.createElement("input");
- input.name='_plupload_original_names[]';
- input.type='hidden';
- input.value='#{params[:file].original_filename}';
- theForm.appendChild(input);
+ var default_input = $('<input />').attr('type', 'hidden');
- var input = document.createElement("input");
- input.name='_plupload_content_types[]';
- input.type='hidden';
- input.value='#{params[:file].content_type}';
- theForm.appendChild(input);
+ var input = default_input.clone()
+ .attr('name', '_plupload_files[]')
+ .val('#{File.expand_path(params[:file].tempfile.path)}');
+ theForm.append(input);
- var input = document.createElement("input");
- input.name='_plupload_upload';
- input.type='hidden';
- input.value='#{params[:_plupload_upload]}';
- if(document.getElementsByName(input.name).length == 0) theForm.appendChild(input);
- }
+ var input = default_input.clone()
+ .attr('name', '_plupload_original_names[]')
+ .val('#{params[:file].original_filename}');
+ theForm.append(input);
+
+ var input = default_input.clone()
+ .attr('name', '_plupload_content_types[]')
+ .val('#{params[:file].content_type}');
+ theForm.append(input);
+
+ var input = default_input.clone()
+ .attr('name', '_plupload_upload')
+ .val('#{params[:_plupload_upload]}');
+ if(document.getElementsByName(input.name).length == 0) theForm.append(input);
+
+ });
}
_pluploadRails_addFieldsForFilesToForms();
END
View
9 lib/app/helpers/plupload_helper.rb
@@ -6,10 +6,11 @@ def plupload(model_object, model_object_method, options={})
options[:params] ||= {}
options[:field_name] ||= [model_object].flatten.pop.class.name.underscore.downcase + "[#{model_object_method}]"
options[:runtimes] ||= "html5,flash,silverlight,gears,browserplus"
- render :partial=>'plupload/uploader_scripts', :locals=>{
- :model_object=>model_object,
- :model_object_method=>model_object_method,
- :options=>options
+ render :partial => 'plupload/uploader_scripts',
+ :locals => {
+ :model_object => model_object,
+ :model_object_method => model_object_method,
+ :options => options
}
end
end
View
13 lib/app/middleware/plupload_params_renamer.rb
@@ -9,10 +9,10 @@ def call(env)
req = Rack::Request.new(env)
form_hash = Rails.version < "3.1" ? req.POST : env['rack.request.form_hash']
form_hash ||= {}
-
+
if form_hash["_plupload_upload"]
object, method = form_hash["_plupload_upload"].split(/[\[\]]/)
- submethod = form_hash["_plupload_upload"].split(/[\[\]]/)[-1]
+ submethod = form_hash["_plupload_upload"].split(/[\[\]]/)[-1]
form_hash[object] ||= {}
if form_hash["_plupload_files"]
form_hash[object][method] = []
@@ -23,9 +23,14 @@ def call(env)
original_filename = form_hash["_plupload_original_names"][i]
content_type = form_hash["_plupload_content_types"][i]
- uploaded_file = ActionDispatch::Http::UploadedFile.new(:tempfile=>File.new(file), :content_type=>content_type, :filename=>original_filename)
+ uploaded_file = ActionDispatch::Http::UploadedFile.new(
+ :tempfile => File.new(file),
+ :type => content_type,
+ :head => "Content-Disposition: form-data; name=\"file\"; filename=\"#{original_filename}\"\r\nContent-Type: #{content_type}\r\n",
+ :filename => original_filename
+ )
- form_hash[object][method] << {submethod=>uploaded_file}
+ form_hash[object][method] << {submethod => uploaded_file}
end
else
form_hash[object][method] = form_hash["file"]
View
3 lib/app/views/plupload/_uploader_scripts.html.erb
@@ -18,7 +18,6 @@
<% else %>
<style type="text/css">@import url(/assets/plupload-rails3/plupload.queue.3.1.css);</style>
- <%= stylesheet_link_tag 'plupload-rails3/plupload/js/plupload.full.js' %>
<%= javascript_include_tag 'plupload-rails3/plupload/js/plupload.full.js' %>
<%= javascript_include_tag 'plupload-rails3/plupload/js/jquery.plupload.queue/jquery.plupload.queue.js' %>
<%= javascript_include_tag 'plupload-rails3/plupload/js/plupload.gears.js' %>
@@ -27,7 +26,7 @@
<script type="text/javascript">
-
+
// Convert divs to queue widgets when the DOM is ready
$(function() {
var authtoken = $("input[name=authenticity_token]").val();
View
6 lib/plupload-rails3/asset_mover.rb
@@ -38,17 +38,17 @@ def install_plupload_assets
dest = File.join(Rails.root, 'tmp/plupload-rails3')
puts "Creating tmp folder at #{dest}"
- FileUtils.mkdir(dest)
+ FileUtils.mkdir(dest) unless File.exists?(dest)
end
def uninstall_plupload_assets
plupload_asset_destination.keys.each do |asset_type|
directory = File.join(Rails.root, plupload_asset_destination[asset_type], "plupload-rails3")
puts "Removing directory #{directory} and its contents"
- FileUtils.rm_r(directory)
+ FileUtils.rm_r(directory) if File.exists?(directory)
end
directory = File.join(Rails.root,'tmp/plupload-rails3')
puts "Removing directory #{directory} and its contents"
- FileUtils.rm_r(directory)
+ FileUtils.rm_r(directory) if File.exists?(directory)
end
View
BIN lib/public/images/plupload-rails3/plupload/throbber.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 lib/public/javascripts/plupload-rails3/plupload/js/i18n/cs.js
@@ -0,0 +1,14 @@
+// .po file like language pack
+plupload.addI18n({
+ 'Select files' : 'Vyberte soubory',
+ 'Add files to the upload queue and click the start button.' : 'Přidejte soubory do fronty a pak spusťte nahrávání.',
+ 'Filename' : 'Název souboru',
+ 'Status' : 'Status',
+ 'Size' : 'Velikost',
+ 'Add Files' : 'Přidat soubory',
+ 'Stop current upload' : 'Zastavit nahrávání',
+ 'Start uploading queue' : 'Spustit frontu nahrávání',
+ 'Drag files here.' : 'Sem přetáhněte soubory.',
+ 'Start Upload': 'Spustit nahrávání',
+ 'Uploaded %d/%d files': 'Nahráno %d/%d souborů'
+});
View
12 lib/public/javascripts/plupload-rails3/plupload/js/i18n/da.js
@@ -0,0 +1,12 @@
+// .po file like language pack
+plupload.addI18n({
+ 'Select files' : 'Vælg filer',
+ 'Add files to the upload queue and click the start button.' : 'Tilføj filer til køen, og tryk på start.',
+ 'Filename' : 'Filnavn',
+ 'Status' : 'Status',
+ 'Size' : 'Størrelse',
+ 'Add files' : 'Tilføj filer',
+ 'Stop current upload' : 'Stop upload',
+ 'Start uploading queue' : 'Start upload',
+ 'Drag files here.' : 'Træk filer her.'
+});
View
25 lib/public/javascripts/plupload-rails3/plupload/js/i18n/de.js
@@ -0,0 +1,25 @@
+// German
+plupload.addI18n({
+ 'Select files' : 'W&auml;hlen Sie die Dateien:',
+ 'Add files to the upload queue and click the start button.' : 'Dateien hinzuf&uuml;gen und danach auf \'Starten des Uploads\' klicken und die Datei hochzuladen.',
+ 'Filename' : 'Dateiname',
+ 'Status' : 'Status',
+ 'Size' : 'Gr&ouml;&szlig;e',
+ 'Add files' : 'Hinzuf&uuml;gen von Dateien',
+ 'Stop current upload' : 'Stop aktuellen Upload',
+ 'Start uploading queue' : 'Starte Upload',
+ 'Uploaded %d/%d files': '%d/%d Dateien sind Hochgeladen',
+ 'N/A' : 'Nicht verf&uuml;gbar',
+ 'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
+ 'File extension error.': 'Dateiendungs Fehler.',
+ 'File size error.': 'Dateigr&ouml;ßen Fehler.',
+ 'Init error.': 'Initialisierungs Fehler.',
+ 'HTTP Error.': 'HTTP Fehler.',
+ 'Security error.': 'Sicherheits Fehler.',
+ 'Generic error.': 'Generic Fehler.',
+ 'IO error.': 'Ein/Ausgabe Fehler.',
+ 'Stop Upload': 'Stoppen des Uploads.',
+ 'Add Files': 'Dateien hinzuf&uuml;gen',
+ 'Start Upload': 'Starten des Uploads.',
+ '%d files queued': '%d Dateien in der Warteschlange.'
+});
View
25 lib/public/javascripts/plupload-rails3/plupload/js/i18n/es.js
@@ -0,0 +1,25 @@
+// Spanish
+plupload.addI18n({
+ 'Select files' : 'Elija archivos:',
+ 'Add files to the upload queue and click the start button.' : 'Agregue archivos a la cola de subida y haga click en el boton de iniciar.',
+ 'Filename' : 'Nombre de archivo',
+ 'Status' : 'Estado',
+ 'Size' : 'Tama&ntilde;o',
+ 'Add files' : 'Agregue archivos',
+ 'Stop current upload' : 'Detener subida actual',
+ 'Start uploading queue' : 'Iniciar subida de cola',
+ 'Uploaded %d/%d files': 'Subidos %d/%d archivos',
+ 'N/A' : 'No disponible',
+ 'Drag files here.' : 'Arrastre archivos aqu&iacute;',
+ 'File extension error.': 'Error de extensi&oacute;n de archivo.',
+ 'File size error.': 'Error de tama&ntilde;o de archivo.',
+ 'Init error.': 'Error de inicializaci&oacute;n.',
+ 'HTTP Error.': 'Error de HTTP.',
+ 'Security error.': 'Error de seguridad.',
+ 'Generic error.': 'Error gen&eacute;rico.',
+ 'IO error.': 'Error de entrada/salida.',
+ 'Stop Upload': 'Detener Subida.',
+ 'Add Files': 'Agregar Archivos',
+ 'Start Upload': 'Comenzar Subida.',
+ '%d files queued': '%d archivos en cola.'
+});
View
33 lib/public/javascripts/plupload-rails3/plupload/js/i18n/fi.js
@@ -0,0 +1,33 @@
+// .fi file like language pack
+plupload.addI18n({
+ 'Select files' : 'Valitse tiedostoja',
+ 'Add files to the upload queue and click the start button.' : 'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.',
+ 'Filename' : 'Tiedostonimi',
+ 'Status' : 'Tila',
+ 'Size' : 'Koko',
+ 'Add files' : 'Lisää tiedostoja',
+ 'Stop current upload' : 'Pysäytä nykyinen lataus',
+ 'Start uploading queue' : 'Aloita jonon lataus',
+ 'Drag files here.' : 'Raahaa tiedostot tänne.',
+ 'Start upload' : 'Aloita lataus',
+ 'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa',
+ 'Stop upload': 'Pysäytä lataus',
+ 'Start upload': 'Aloita lataus',
+ '%d files queued': '%d tiedostoa jonossa',
+ 'File: %s': 'Tiedosto: %s',
+ 'Close': 'Sulje',
+ 'Using runtime: ': 'Käytetään ajonaikaista: ',
+ 'File: %f, size: %s, max file size: %m': 'Tiedosto: %f, koko: %s, maksimi tiedostokoko: %m',
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.',
+ 'Upload URL might be wrong or doesn\'t exist': 'Lataus URL saattaa olla väärin tai ei ole olemassa',
+ 'Error: File too large: ': 'Virhe: Tiedosto liian suuri: ',
+ 'Error: Invalid file extension: ': 'Virhe: Kelpaamaton tiedostopääte: ',
+ 'File extension error.': 'Tiedostopäätevirhe.',
+ 'File size error.': 'Tiedostokokovirhe.',
+ 'File count error.': 'Tiedostolaskentavirhe.',
+ 'Init error.': 'Init virhe.',
+ 'HTTP Error.': 'HTTP virhe.',
+ 'Security error.': 'Tietoturvavirhe.',
+ 'Generic error.': 'Yleinen virhe.',
+ 'IO error.': 'I/O virhe.'
+});
View
25 lib/public/javascripts/plupload-rails3/plupload/js/i18n/fr.js
@@ -0,0 +1,25 @@
+// .po file like language pack
+plupload.addI18n({
+ 'Select files' : 'Sélectionnez les fichiers',
+ 'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.',
+ 'Filename' : 'Nom de fichier',
+ 'Status' : 'Status',
+ 'Size' : 'Taille',
+ 'Add files' : 'Ajouter Fichiers',
+ 'Stop current upload' : 'Arrêter l\'envoi en cours',
+ 'Start uploading queue' : 'Démarrer l\'envoi',
+ 'Uploaded %d/%d files': '%d/%d fichiers envoyés',
+ 'N/A' : 'Non applicable',
+ 'Drag files here.' : 'Déposer les fichiers ici.',
+ 'File extension error.': 'Erreur extension fichier',
+ 'File size error.': 'Erreur taille fichier.',
+ 'Init error.': 'Erreur d\'initialisation.',
+ 'HTTP Error.': 'Erreur HTTP.',
+ 'Security error.': 'Erreur de sécurité.',
+ 'Generic error.': 'Erreur générique.',
+ 'IO error.': 'Erreur E/S.',
+ 'Stop Upload': 'Arrêter les envois.',
+ 'Add Files': 'Ajouter des fichiers',
+ 'Start Upload': 'Démarrer les envois.',
+ '%d files queued': '%d fichiers en attente.'
+});
View
21 lib/public/javascripts/plupload-rails3/plupload/js/i18n/it.js
@@ -0,0 +1,21 @@
+// .po file like language pack
+plupload.addI18n({
+ 'Select files' : 'Seleziona i files',
+ 'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.',
+ 'Filename' : 'Nome file',
+ 'Status' : 'Stato',
+ 'Size' : 'Dimensione',
+ 'Add files' : 'Aggiungi file',
+ 'Stop current upload' : 'Interrompi il caricamento',
+ 'Start uploading queue' : 'Avvia il caricamento',
+ 'Uploaded %d/%d files': 'Caricati %d/%d file',
+ 'N/A' : 'N/D',
+ 'Drag files here.' : 'Trascina i file qui.',
+ 'File extension error.': 'Errore estensione file.',
+ 'File size error.': 'Errore dimensione file.',
+ 'Init error.': 'Errore inizializzazione.',
+ 'HTTP Error.': 'Errore HTTP.',
+ 'Security error.': 'Errore sicurezza.',
+ 'Generic error.': 'Errore generico.',
+ 'IO error.': 'Errore IO.'
+});
View
37 lib/public/javascripts/plupload-rails3/plupload/js/i18n/ja.js
@@ -0,0 +1,37 @@
+// Japanese
+plupload.addI18n({
+ 'Select files' : 'ファイル選択',
+ 'Add files to the upload queue and click the start button.' : 'ファイルをアップロードキューに追加してスタートボタンをクリックしてください',
+ 'Filename' : 'ファイル名',
+ 'Status' : 'ステータス',
+ 'Size' : 'サイズ',
+ 'Add Files' : 'ファイルを追加',
+ 'Stop Upload' : 'アップロード停止',
+ 'Start Upload' : 'アップロード',
+ 'Add files' : 'ファイルを追加',
+ 'Add files.' : 'ファイルを追加',
+ 'Stop current upload' : '現在のアップロードを停止',
+ 'Start uploading queue' : 'アップロード',
+ 'Stop upload' : 'アップロード停止',
+ 'Start upload' : 'アップロード',
+ 'Uploaded %d/%d files': 'アップロード中 %d/%d ファイル',
+ 'N/A' : 'N/A',
+ 'Drag files here.' : 'ここにファイルをドラッグ',
+ 'File extension error.': 'ファイル拡張子エラー',
+ 'File size error.': 'ファイルサイズエラー',
+ 'File count error.': 'ファイル数エラー',
+ 'Init error.': 'イニシャライズエラー',
+ 'HTTP Error.': 'HTTP エラー',
+ 'Security error.': 'セキュリティエラー',
+ 'Generic error.': 'エラー',
+ 'IO error.': 'IO エラー',
+ 'File: %s': 'ファイル: %s',
+ 'Close': '閉じる',
+ '%d files queued': '%d ファイルが追加されました',
+ 'Using runtime: ': 'モード: ',
+ 'File: %f, size: %s, max file size: %m': 'ファイル: %f, サイズ: %s, 最大ファイルサイズ: %m',
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'アップロード可能なファイル数は %d です。余分なファイルは削除されました',
+ 'Upload URL might be wrong or doesn\'t exist': 'アップロード先の URL が存在しません',
+ 'Error: File too large: ': 'エラー: サイズが大きすぎます: ',
+ 'Error: Invalid file extension: ': 'エラー: 拡張子が許可されていません: '
+});
View
33 lib/public/javascripts/plupload-rails3/plupload/js/i18n/lv.js
@@ -0,0 +1,33 @@
+// .lv file like language pack
+plupload.addI18n({
+ 'Select files' : 'Izvēlieties failus',
+ 'Add files to the upload queue and click the start button.' : 'Pieveinojiet failus rindai un klikšķiniet uz "Sākt augšupielādi" pogas.',
+ 'Filename' : 'Faila nosaukums',
+ 'Status' : 'Statuss',
+ 'Size' : 'Izmērs',
+ 'Add files' : 'Pievienot failus',
+ 'Stop current upload' : 'Apturēt pašreizējo augšupielādi',
+ 'Start uploading queue' : 'Sākt augšupielādi',
+ 'Drag files here.' : 'Ievelciet failus šeit',
+ 'Start upload' : 'Sākt augšupielādi',
+ 'Uploaded %d/%d files': 'Augšupielādēti %d/%d faili',
+ 'Stop upload': 'Pārtraukt augšupielādi',
+ 'Start upload': 'Sākt augšupielādi',
+ '%d files queued': '%d faili pievienoti rindai',
+ 'File: %s': 'Fails: %s',
+ 'Close': 'Aizvērt',
+ 'Using runtime: ': 'Lieto saskarni: ',
+ 'File: %f, size: %s, max file size: %m': 'Fails: %f, izmērs: %s, maksimālais faila izmērs: %m',
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Iespējams ielādēt tikai %d failus vienā reizē. Atlikušie faili netika pievienoti',
+ 'Upload URL might be wrong or doesn\'t exist': 'Augšupielādes URL varētu būt nepareizs vai neeksistē',
+ 'Error: File too large: ': 'Kļūda: Fails pārāk liels: ',
+ 'Error: Invalid file extension: ': 'Kļūda: Nekorekts faila paplašinājums:',
+ 'File extension error.': 'Faila paplašinājuma kļūda.',
+ 'File size error.': 'Faila izmēra kļūda.',
+ 'File count error.': 'Failu skaita kļūda',
+ 'Init error.': 'Inicializācijas kļūda.',
+ 'HTTP Error.': 'HTTP kļūda.',
+ 'Security error.': 'Drošības kļūda.',
+ 'Generic error.': 'Vispārēja rakstura kļūda.',
+ 'IO error.': 'Ievades/Izvades kļūda.'
+});
View
21 lib/public/javascripts/plupload-rails3/plupload/js/i18n/nl.js
@@ -0,0 +1,21 @@
+// Dutch
+plupload.addI18n({
+ 'Select files' : 'Selecteer bestand(en):',
+ 'Add files to the upload queue and click the start button.' : 'Voeg bestanden toe aan de wachtrij en druk op \'Start\'.',
+ 'Filename' : 'Bestandsnaam',
+ 'Status' : 'Status',
+ 'Size' : 'Grootte',
+ 'Add files' : 'Voeg bestanden toe',
+ 'Stop current upload' : 'Stop upload',
+ 'Start uploading queue' : 'Start upload',
+ 'Uploaded %d/%d files': '%d/%d bestanden ge-upload',
+ 'N/A' : 'Niet beschikbaar',
+ 'Drag files here.' : 'Sleep bestanden hierheen.',
+ 'File extension error.': 'Ongeldig bestandstype.',
+ 'File size error.': 'Bestandsgrootte Error.',
+ 'Init error.': 'Initialisatie error.',
+ 'HTTP Error.': 'HTTP Error.',
+ 'Security error.': 'Beveiliging error.',
+ 'Generic error.': 'Onbekende error.',
+ 'IO error.': 'IO error.'
+});
View
35 lib/public/javascripts/plupload-rails3/plupload/js/i18n/pt-br.js
@@ -0,0 +1,35 @@
+// Brazilian Portuguese
+plupload.addI18n({
+ 'Select files' : 'Escolha os arquivos',
+ 'Add files to the upload queue and click the start button.' : 'Adicione os arquivos abaixo e clique no botão "Iniciar o envio".',
+ 'Filename' : 'Nome do arquivo',
+ 'Status' : 'Status',
+ 'Size' : 'Tamanho',
+ 'Add Files' : 'Adicionar arquivo(s)',
+ 'Stop Upload' : 'Parar o envio',
+ 'Start Upload' : 'Iniciar o envio',
+ 'Add files' : 'Adicionar arquivo(s)',
+ 'Add files.' : 'Adicionar arquivo(s)',
+ 'Stop upload' : 'Parar o envio',
+ 'Start upload' : 'Iniciar o envio',
+ 'Uploaded %d/%d files': 'Enviado(s) %d/%d arquivo(s)',
+ 'N/A' : 'N/D',
+ 'Drag files here.' : 'Arraste os arquivos pra cá',
+ 'File extension error.': 'Tipo de arquivo não permitido.',
+ 'File size error.': 'Tamanho de arquivo não permitido.',
+ 'File count error.': 'Erro na contagem dos arquivos',
+ 'Init error.': 'Erro inicializando.',
+ 'HTTP Error.': 'Erro HTTP.',
+ 'Security error.': 'Erro de segurança.',
+ 'Generic error.': 'Erro genérico.',
+ 'IO error.': 'Erro de E/S.',
+ 'File: %s': 'Arquivo: %s',
+ 'Close': 'Fechar',
+ '%d files queued': '%d arquivo(s)',
+ 'Using runtime: ': 'Usando: ',
+ 'File: %f, size: %s, max file size: %m': 'Arquivo: %f, tamanho: %s, máximo: %m',
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Só são aceitos %d arquivos por vez. O que passou disso foi descartado.',
+ 'Upload URL might be wrong or doesn\'t exist': 'URL de envio está errada ou não existe',
+ 'Error: File too large: ': 'Erro: Arquivo muito grande: ',
+ 'Error: Invalid file extension: ': 'Erro: Tipo de arquivo não permitido: '
+});
View
21 lib/public/javascripts/plupload-rails3/plupload/js/i18n/ru.js
@@ -0,0 +1,21 @@
+// Russian
+plupload.addI18n({
+ 'Select files' : 'Выберите файлы',
+ 'Add files to the upload queue and click the start button.' : 'Добавьте файлы в очередь и нажмите кнопку "Загрузить файлы".',
+ 'Filename' : 'Имя файла',
+ 'Status' : 'Статус',
+ 'Size' : 'Размер',
+ 'Add files' : 'Добавить файлы',
+ 'Stop current upload' : 'Остановить загрузку',
+ 'Start uploading queue' : 'Загрузить файлы',
+ 'Uploaded %d/%d files': 'Загружено %d из %d файлов',
+ 'N/A' : 'N/D',
+ 'Drag files here.' : 'Перетащите файлы сюда.',
+ 'File extension error.': 'Неправильное расширение файла.',
+ 'File size error.': 'Неправильный размер файла.',
+ 'Init error.': 'Ошибка инициализации.',
+ 'HTTP Error.': 'Ошибка HTTP.',
+ 'Security error.': 'Ошибка безопасности.',
+ 'Generic error.': 'Общая ошибка.',
+ 'IO error.': 'Ошибка ввода-вывода.'
+});
View
12 lib/public/javascripts/plupload-rails3/plupload/js/i18n/sv.js
@@ -0,0 +1,12 @@
+// .po file like language pack
+plupload.addI18n({
+ 'Select files' : 'Välj filer',
+ 'Add files to the upload queue and click the start button.' : 'Lägg till filer till kön och tryck på start.',
+ 'Filename' : 'Filnamn',
+ 'Status' : 'Status',
+ 'Size' : 'Storlek',
+ 'Add files' : 'Lägg till filer',
+ 'Stop current upload' : 'Stoppa uppladdningen',
+ 'Start uploading queue' : 'Starta uppladdningen',
+ 'Drag files here.' : 'Dra filer hit'
+});
View
348 lib/public/stylesheets/plupload-rails3/plupload.queue.3.1.css
@@ -1,171 +1,177 @@
-/*
- Plupload
-------------------------------------------------------------------- */
-
-.plupload_button {
- display: -moz-inline-box; /* FF < 3*/
- display: inline-block;
- font: normal 12px sans-serif;
- text-decoration: none;
- color: #42454a;
- border: 1px solid #bababa;
- padding: 2px 8px 3px 20px;
- margin-right: 4px;
- background: #f3f3f3 url('/assets/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
- outline: 0;
-
- /* Optional rounded corners for browsers that support it */
- -moz-border-radius: 3px;
- -khtml-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.plupload_button:hover {
- color: #000;
- text-decoration: none;
-}
-
-.plupload_disabled, a.plupload_disabled:hover {
- color: #737373;
- border-color: #c5c5c5;
- background: #ededed url('/assets/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
- cursor: default;
-}
-
-.plupload_add {
- background-position: -181px center;
-}
-
-.plupload_wrapper {
- font: normal 11px Verdana,sans-serif;
- width: 100%;
-}
-
-.plupload_container {
- padding: 8px;
- background: url('/assets/plupload-rails3/plupload/transp50.png');
- /*-moz-border-radius: 5px;*/
-}
-
-.plupload_header {background: #2A2C2E url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
-.plupload_header_content {
- background: url('/assets/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
- min-height: 56px;
- padding-left: 60px;
- color: #FFF;
-}
-.plupload_header_title {
- font: normal 18px sans-serif;
- padding: 6px 0 3px;
-}
-.plupload_header_text {
- font: normal 12px sans-serif;
-}
-
-.plupload_filelist {
- margin: 0;
- padding: 0;
- list-style: none;
-}
-
-.plupload_scroll .plupload_filelist {
- height: 185px;
- background: #F5F5F5;
- overflow-y: scroll;
-}
-
-.plupload_filelist li {
- padding: 10px 8px;
- background: #F5F5F5 url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
- border-bottom: 1px solid #DDD;
-}
-
-.plupload_filelist_header, .plupload_filelist_footer {
- background: #DFDFDF;
- padding: 8px 8px;
- color: #42454A;
-}
-.plupload_filelist_header {
- border-top: 1px solid #EEE;
- border-bottom: 1px solid #CDCDCD;
-}
-
-.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
-.plupload_file_name {float: left; overflow: hidden}
-.plupload_file_status {color: #777;}
-.plupload_file_status span {color: #42454A;}
-.plupload_file_size, .plupload_file_status, .plupload_progress {
- float: right;
- width: 80px;
-}
-.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
-
-.plupload_filelist .plupload_file_name {width: 205px}
-
-.plupload_file_action {
- float: right;
- width: 16px;
- height: 16px;
- margin-left: 15px;
-}
-
-.plupload_file_action * {
- display: none;
- width: 16px;
- height: 16px;
-}
-
-li.plupload_uploading {background: #ECF3DC url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
-li.plupload_done {color:#AAA}
-
-li.plupload_delete a {
- background: url('/assets/plupload-rails3/plupload/delete.gif');
-}
-
-li.plupload_failed a {
- background: url('/assets/plupload-rails3/plupload/error.gif');
- cursor: default;
-}
-
-li.plupload_done a {
- background: url('/assets/plupload-rails3/plupload/done.gif');
- cursor: default;
-}
-
-.plupload_progress, .plupload_upload_status {
- display: none;
-}
-
-.plupload_progress_container {
- margin-top: 3px;
- border: 1px solid #CCC;
- background: #FFF;
- padding: 1px;
-}
-.plupload_progress_bar {
- width: 0px;
- height: 7px;
- background: #CDEB8B;
-}
-
-.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
- margin-right: 17px;
-}
-
-/* Floats */
-
-.plupload_clear,.plupload_clearer {clear: both;}
-.plupload_clearer, .plupload_progress_bar {
- display: block;
- font-size: 0;
- line-height: 0;
-}
-
-li.plupload_droptext {
- background: transparent;
- text-align: center;
- vertical-align: middle;
- border: 0;
- line-height: 165px;
-}
+/*
+ Plupload
+------------------------------------------------------------------- */
+
+.plupload_button {
+ display: -moz-inline-box; /* FF < 3*/
+ display: inline-block;
+ font: normal 12px sans-serif;
+ text-decoration: none;
+ color: #42454a;
+ border: 1px solid #bababa;
+ padding: 2px 8px 3px 20px;
+ margin-right: 4px;
+ background: #f3f3f3 url('/assets/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
+ outline: 0;
+
+ /* Optional rounded corners for browsers that support it */
+ -moz-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.plupload_button:hover {
+ color: #000;
+ text-decoration: none;
+}
+
+.plupload_disabled, a.plupload_disabled:hover {
+ color: #737373;
+ border-color: #c5c5c5;
+ background: #ededed url('/assets/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
+ cursor: default;
+}
+
+.plupload_add {
+ background-position: -181px center;
+}
+
+.plupload_wrapper {
+ font: normal 11px Verdana,sans-serif;
+ width: 100%;
+}
+
+.plupload_container {
+ padding: 8px;
+ background: url('/assets/plupload-rails3/plupload/transp50.png');
+ /*-moz-border-radius: 5px;*/
+}
+
+.plupload_container input {
+ border: 1px solid #DDD;
+ font: normal 11px Verdana,sans-serif;
+ width: 98%;
+}
+
+.plupload_header {background: #2A2C2E url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
+.plupload_header_content {
+ background: url('/assets/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
+ min-height: 56px;
+ padding-left: 60px;
+ color: #FFF;
+}
+.plupload_header_title {
+ font: normal 18px sans-serif;
+ padding: 6px 0 3px;
+}
+.plupload_header_text {
+ font: normal 12px sans-serif;
+}
+
+.plupload_filelist {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.plupload_scroll .plupload_filelist {
+ height: 185px;
+ background: #F5F5F5;
+ overflow-y: scroll;
+}
+
+.plupload_filelist li {
+ padding: 10px 8px;
+ background: #F5F5F5 url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
+ border-bottom: 1px solid #DDD;
+}
+
+.plupload_filelist_header, .plupload_filelist_footer {
+ background: #DFDFDF;
+ padding: 8px 8px;
+ color: #42454A;
+}
+.plupload_filelist_header {
+ border-top: 1px solid #EEE;
+ border-bottom: 1px solid #CDCDCD;
+}
+
+.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
+.plupload_file_name {float: left; overflow: hidden}
+.plupload_file_status {color: #777;}
+.plupload_file_status span {color: #42454A;}
+.plupload_file_size, .plupload_file_status, .plupload_progress {
+ float: right;
+ width: 80px;
+}
+.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
+
+.plupload_filelist .plupload_file_name {width: 205px}
+
+.plupload_file_action {
+ float: right;
+ width: 16px;
+ height: 16px;
+ margin-left: 15px;
+}
+
+.plupload_file_action * {
+ display: none;
+ width: 16px;
+ height: 16px;
+}
+
+li.plupload_uploading {background: #ECF3DC url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
+li.plupload_done {color:#AAA}
+
+li.plupload_delete a {
+ background: url('/assets/plupload-rails3/plupload/delete.gif');
+}
+
+li.plupload_failed a {
+ background: url('/assets/plupload-rails3/plupload/error.gif');
+ cursor: default;
+}
+
+li.plupload_done a {
+ background: url('/assets/plupload-rails3/plupload/done.gif');
+ cursor: default;
+}
+
+.plupload_progress, .plupload_upload_status {
+ display: none;
+}
+
+.plupload_progress_container {
+ margin-top: 3px;
+ border: 1px solid #CCC;
+ background: #FFF;
+ padding: 1px;
+}
+.plupload_progress_bar {
+ width: 0px;
+ height: 7px;
+ background: #CDEB8B;
+}
+
+.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
+ margin-right: 17px;
+}
+
+/* Floats */
+
+.plupload_clear,.plupload_clearer {clear: both;}
+.plupload_clearer, .plupload_progress_bar {
+ display: block;
+ font-size: 0;
+ line-height: 0;
+}
+
+li.plupload_droptext {
+ background: transparent;
+ text-align: center;
+ vertical-align: middle;
+ border: 0;
+ line-height: 165px;
+}
View
348 lib/public/stylesheets/plupload-rails3/plupload.queue.css
@@ -1,171 +1,177 @@
-/*
- Plupload
-------------------------------------------------------------------- */
-
-.plupload_button {
- display: -moz-inline-box; /* FF < 3*/
- display: inline-block;
- font: normal 12px sans-serif;
- text-decoration: none;
- color: #42454a;
- border: 1px solid #bababa;
- padding: 2px 8px 3px 20px;
- margin-right: 4px;
- background: #f3f3f3 url('/images/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
- outline: 0;
-
- /* Optional rounded corners for browsers that support it */
- -moz-border-radius: 3px;
- -khtml-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.plupload_button:hover {
- color: #000;
- text-decoration: none;
-}
-
-.plupload_disabled, a.plupload_disabled:hover {
- color: #737373;
- border-color: #c5c5c5;
- background: #ededed url('/images/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
- cursor: default;
-}
-
-.plupload_add {
- background-position: -181px center;
-}
-
-.plupload_wrapper {
- font: normal 11px Verdana,sans-serif;
- width: 100%;
-}
-
-.plupload_container {
- padding: 8px;
- background: url('/images/plupload-rails3/plupload/transp50.png');
- /*-moz-border-radius: 5px;*/
-}
-
-.plupload_header {background: #2A2C2E url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
-.plupload_header_content {
- background: url('/images/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
- min-height: 56px;
- padding-left: 60px;
- color: #FFF;
-}
-.plupload_header_title {
- font: normal 18px sans-serif;
- padding: 6px 0 3px;
-}
-.plupload_header_text {
- font: normal 12px sans-serif;
-}
-
-.plupload_filelist {
- margin: 0;
- padding: 0;
- list-style: none;
-}
-
-.plupload_scroll .plupload_filelist {
- height: 185px;
- background: #F5F5F5;
- overflow-y: scroll;
-}
-
-.plupload_filelist li {
- padding: 10px 8px;
- background: #F5F5F5 url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
- border-bottom: 1px solid #DDD;
-}
-
-.plupload_filelist_header, .plupload_filelist_footer {
- background: #DFDFDF;
- padding: 8px 8px;
- color: #42454A;
-}
-.plupload_filelist_header {
- border-top: 1px solid #EEE;
- border-bottom: 1px solid #CDCDCD;
-}
-
-.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
-.plupload_file_name {float: left; overflow: hidden}
-.plupload_file_status {color: #777;}
-.plupload_file_status span {color: #42454A;}
-.plupload_file_size, .plupload_file_status, .plupload_progress {
- float: right;
- width: 80px;
-}
-.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
-
-.plupload_filelist .plupload_file_name {width: 205px}
-
-.plupload_file_action {
- float: right;
- width: 16px;
- height: 16px;
- margin-left: 15px;
-}
-
-.plupload_file_action * {
- display: none;
- width: 16px;
- height: 16px;
-}
-
-li.plupload_uploading {background: #ECF3DC url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
-li.plupload_done {color:#AAA}
-
-li.plupload_delete a {
- background: url('/images/plupload-rails3/plupload/delete.gif');
-}
-
-li.plupload_failed a {
- background: url('/images/plupload-rails3/plupload/error.gif');
- cursor: default;
-}
-
-li.plupload_done a {
- background: url('/images/plupload-rails3/plupload/done.gif');
- cursor: default;
-}
-
-.plupload_progress, .plupload_upload_status {
- display: none;
-}
-
-.plupload_progress_container {
- margin-top: 3px;
- border: 1px solid #CCC;
- background: #FFF;
- padding: 1px;
-}
-.plupload_progress_bar {
- width: 0px;
- height: 7px;
- background: #CDEB8B;
-}
-
-.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
- margin-right: 17px;
-}
-
-/* Floats */
-
-.plupload_clear,.plupload_clearer {clear: both;}
-.plupload_clearer, .plupload_progress_bar {
- display: block;
- font-size: 0;
- line-height: 0;
-}
-
-li.plupload_droptext {
- background: transparent;
- text-align: center;
- vertical-align: middle;
- border: 0;
- line-height: 165px;
-}
+/*
+ Plupload
+------------------------------------------------------------------- */
+
+.plupload_button {
+ display: -moz-inline-box; /* FF < 3*/
+ display: inline-block;
+ font: normal 12px sans-serif;
+ text-decoration: none;
+ color: #42454a;
+ border: 1px solid #bababa;
+ padding: 2px 8px 3px 20px;
+ margin-right: 4px;
+ background: #f3f3f3 url('/images/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
+ outline: 0;
+
+ /* Optional rounded corners for browsers that support it */
+ -moz-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.plupload_button:hover {
+ color: #000;
+ text-decoration: none;
+}
+
+.plupload_disabled, a.plupload_disabled:hover {
+ color: #737373;
+ border-color: #c5c5c5;
+ background: #ededed url('/images/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
+ cursor: default;
+}
+
+.plupload_add {
+ background-position: -181px center;
+}
+
+.plupload_wrapper {
+ font: normal 11px Verdana,sans-serif;
+ width: 100%;
+}
+
+.plupload_container {
+ padding: 8px;
+ background: url('/images/plupload-rails3/plupload/transp50.png');
+ /*-moz-border-radius: 5px;*/
+}
+
+.plupload_container input {
+ border: 1px solid #DDD;
+ font: normal 11px Verdana,sans-serif;
+ width: 98%;
+}
+
+.plupload_header {background: #2A2C2E url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
+.plupload_header_content {
+ background: url('/images/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
+ min-height: 56px;
+ padding-left: 60px;
+ color: #FFF;
+}
+.plupload_header_title {
+ font: normal 18px sans-serif;
+ padding: 6px 0 3px;
+}
+.plupload_header_text {
+ font: normal 12px sans-serif;
+}
+
+.plupload_filelist {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.plupload_scroll .plupload_filelist {
+ height: 185px;
+ background: #F5F5F5;
+ overflow-y: scroll;
+}
+
+.plupload_filelist li {
+ padding: 10px 8px;
+ background: #F5F5F5 url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
+ border-bottom: 1px solid #DDD;
+}
+
+.plupload_filelist_header, .plupload_filelist_footer {
+ background: #DFDFDF;
+ padding: 8px 8px;
+ color: #42454A;
+}
+.plupload_filelist_header {
+ border-top: 1px solid #EEE;
+ border-bottom: 1px solid #CDCDCD;
+}
+
+.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
+.plupload_file_name {float: left; overflow: hidden}
+.plupload_file_status {color: #777;}
+.plupload_file_status span {color: #42454A;}
+.plupload_file_size, .plupload_file_status, .plupload_progress {
+ float: right;
+ width: 80px;
+}
+.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
+
+.plupload_filelist .plupload_file_name {width: 205px}
+
+.plupload_file_action {
+ float: right;
+ width: 16px;
+ height: 16px;
+ margin-left: 15px;
+}
+
+.plupload_file_action * {
+ display: none;
+ width: 16px;
+ height: 16px;
+}
+
+li.plupload_uploading {background: #ECF3DC url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
+li.plupload_done {color:#AAA}
+
+li.plupload_delete a {
+ background: url('/images/plupload-rails3/plupload/delete.gif');
+}
+
+li.plupload_failed a {
+ background: url('/images/plupload-rails3/plupload/error.gif');
+ cursor: default;
+}
+
+li.plupload_done a {
+ background: url('/images/plupload-rails3/plupload/done.gif');
+ cursor: default;
+}
+
+.plupload_progress, .plupload_upload_status {
+ display: none;
+}
+
+.plupload_progress_container {
+ margin-top: 3px;
+ border: 1px solid #CCC;
+ background: #FFF;
+ padding: 1px;
+}
+.plupload_progress_bar {
+ width: 0px;
+ height: 7px;
+ background: #CDEB8B;
+}
+
+.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
+ margin-right: 17px;
+}
+
+/* Floats */
+
+.plupload_clear,.plupload_clearer {clear: both;}
+.plupload_clearer, .plupload_progress_bar {
+ display: block;
+ font-size: 0;
+ line-height: 0;
+}
+
+li.plupload_droptext {
+ background: transparent;
+ text-align: center;
+ vertical-align: middle;
+ border: 0;
+ line-height: 165px;
+}

0 comments on commit ea27695

Please sign in to comment.
Something went wrong with that request. Please try again.