latest plupload. beta - beware
This commit is contained in:
parent
f67c12b1d1
commit
69ed47079f
|
@ -1,3 +1,23 @@
|
|||
Version 1.5b (2011-09-11)
|
||||
UI Widget: Fix sortable logic.
|
||||
UI Widget: Fix bug, when message was displayed simultaneously across all Plupload UI instances on the page.
|
||||
UI Widget: notify() method is now public - users can throw their own messages into the widget header.
|
||||
HTML4/HTML5: Revise input[type=file] placement logic to support cursor styling on Geko 2+.
|
||||
HTML5: Revise Drag'n'Drop detection logic.
|
||||
HTML5: Make Exif and GPS information available to user, introduce two new events: ExifData and GpsData.
|
||||
HTML5: Add support for File.prototype.slice() method (mozSlice/webkitSlice) in order to be able to upload files in chunks without preloading.
|
||||
HTML5: Remove any JPEG headers before restoring them, 'cause user agent (like Chrome), might be inserting it's own.
|
||||
Flash: Remove a limit on the depth of image header check, since it still fails in some cases and performance gain is negligible.
|
||||
Flash: Fix regression, when runtime hanged when not images where passed in as images.
|
||||
SilverLight: Fix bug, when JSON serializer was failing on null.
|
||||
SilverLight: Remove cast to integer for chunk boundary, which resulted in a wrong size for last chunks on huge files.
|
||||
SilverLight: Increase read buffer, add disposal of ImageStream and FileStream, optimize for performance.
|
||||
Updated build.xml to include language packs in release package under js/ folder.
|
||||
Gears/BrowserPlus: Add support for * file filter.
|
||||
BeforeUpload now can cancel upload if required.
|
||||
Additional MIME types: text/csv, image/photoshop, video/x-ms-wmv, video/avi, video/webm support
|
||||
Additional language packs: Japanese
|
||||
Cleaned examples.
|
||||
Version 1.4.3.2 (2011-04-13)
|
||||
Fixed bug in HTML5 runtime, when was reduced by a factor of 100 after every upload.
|
||||
Version 1.4.3.1 (2011-04-12)
|
||||
|
|
|
@ -29,20 +29,17 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<form id="submit-form" method="post" action="dump.php">
|
||||
<h1>Custom example</h1>
|
||||
|
||||
<p>Shows you how to use the core plupload API.</p>
|
||||
|
||||
<div>
|
||||
<div id="container">
|
||||
<div id="filelist">No runtime found.</div>
|
||||
<br />
|
||||
<a id="pickfiles" href="javascript:;">[Select files]</a>
|
||||
<a id="uploadfiles" href="javascript:;">[Upload files]</a>
|
||||
</div>
|
||||
|
||||
<input type="submit" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Custom example logic
|
||||
|
@ -54,6 +51,7 @@ function $(id) {
|
|||
var uploader = new plupload.Uploader({
|
||||
runtimes : 'gears,html5,flash,silverlight,browserplus',
|
||||
browse_button : 'pickfiles',
|
||||
container: 'container',
|
||||
max_file_size : '10mb',
|
||||
url : 'upload.php',
|
||||
resize : {width : 320, height : 240, quality : 90},
|
||||
|
@ -75,10 +73,6 @@ uploader.bind('FilesAdded', function(up, files) {
|
|||
}
|
||||
});
|
||||
|
||||
uploader.bind('UploadFile', function(up, file) {
|
||||
$('submit-form').innerHTML += '<input type="hidden" name="file-' + file.id + '" value="' + file.name + '" />';
|
||||
});
|
||||
|
||||
uploader.bind('UploadProgress', function(up, file) {
|
||||
$(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
||||
});
|
||||
|
|
|
@ -79,24 +79,23 @@ $(function() {
|
|||
$('form').submit(function(e) {
|
||||
var uploader = $('#uploader').plupload('getUploader');
|
||||
|
||||
// Validate number of uploaded files
|
||||
if (uploader.total.uploaded == 0) {
|
||||
// Files in queue upload them first
|
||||
if (uploader.files.length > 0) {
|
||||
// When all files are uploaded submit form
|
||||
uploader.bind('UploadProgress', function() {
|
||||
if (uploader.total.uploaded == uploader.files.length)
|
||||
$('form').submit();
|
||||
uploader.bind('StateChanged', function() {
|
||||
if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
|
||||
$('form')[0].submit();
|
||||
}
|
||||
});
|
||||
|
||||
uploader.start();
|
||||
} else
|
||||
alert('You must at least upload one file.');
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
14
public/javascripts/plupload/js/i18n/cs.js
Normal file
14
public/javascripts/plupload/js/i18n/cs.js
Normal file
|
@ -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ů'
|
||||
});
|
12
public/javascripts/plupload/js/i18n/da.js
Normal file
12
public/javascripts/plupload/js/i18n/da.js
Normal file
|
@ -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.'
|
||||
});
|
25
public/javascripts/plupload/js/i18n/de.js
Normal file
25
public/javascripts/plupload/js/i18n/de.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// German
|
||||
plupload.addI18n({
|
||||
'Select files' : 'Wählen Sie die Dateien:',
|
||||
'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und danach auf \'Starten des Uploads\' klicken und die Datei hochzuladen.',
|
||||
'Filename' : 'Dateiname',
|
||||
'Status' : 'Status',
|
||||
'Size' : 'Größe',
|
||||
'Add files' : 'Hinzufü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ügbar',
|
||||
'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
|
||||
'File extension error.': 'Dateiendungs Fehler.',
|
||||
'File size error.': 'Dateigröß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ügen',
|
||||
'Start Upload': 'Starten des Uploads.',
|
||||
'%d files queued': '%d Dateien in der Warteschlange.'
|
||||
});
|
25
public/javascripts/plupload/js/i18n/es.js
Normal file
25
public/javascripts/plupload/js/i18n/es.js
Normal file
|
@ -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ñ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í',
|
||||
'File extension error.': 'Error de extensión de archivo.',
|
||||
'File size error.': 'Error de tamaño de archivo.',
|
||||
'Init error.': 'Error de inicialización.',
|
||||
'HTTP Error.': 'Error de HTTP.',
|
||||
'Security error.': 'Error de seguridad.',
|
||||
'Generic error.': 'Error gené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.'
|
||||
});
|
25
public/javascripts/plupload/js/i18n/fr.js
Normal file
25
public/javascripts/plupload/js/i18n/fr.js
Normal file
|
@ -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.'
|
||||
});
|
21
public/javascripts/plupload/js/i18n/it.js
Normal file
21
public/javascripts/plupload/js/i18n/it.js
Normal file
|
@ -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.'
|
||||
});
|
37
public/javascripts/plupload/js/i18n/ja.js
Normal file
37
public/javascripts/plupload/js/i18n/ja.js
Normal file
|
@ -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: ': 'エラー: 拡張子が許可されていません: '
|
||||
});
|
33
public/javascripts/plupload/js/i18n/lv.js
Normal file
33
public/javascripts/plupload/js/i18n/lv.js
Normal file
|
@ -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.'
|
||||
});
|
21
public/javascripts/plupload/js/i18n/nl.js
Normal file
21
public/javascripts/plupload/js/i18n/nl.js
Normal file
|
@ -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.'
|
||||
});
|
35
public/javascripts/plupload/js/i18n/pt-br.js
Normal file
35
public/javascripts/plupload/js/i18n/pt-br.js
Normal file
|
@ -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: '
|
||||
});
|
21
public/javascripts/plupload/js/i18n/ru.js
Normal file
21
public/javascripts/plupload/js/i18n/ru.js
Normal file
|
@ -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.': 'Ошибка ввода-вывода.'
|
||||
});
|
12
public/javascripts/plupload/js/i18n/sv.js
Normal file
12
public/javascripts/plupload/js/i18n/sv.js
Normal file
|
@ -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'
|
||||
});
|
File diff suppressed because one or more lines are too long
|
@ -40,6 +40,9 @@ div.plupload div.plupload_header {border-width: 0 0 1px 0; position: relative;}
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
-moz-user-select:none;
|
||||
-webkit-user-select:none;
|
||||
user-select:none;
|
||||
}
|
||||
|
||||
.plupload_cell {padding: 8px 6px;}
|
||||
|
@ -49,6 +52,11 @@ div.plupload div.plupload_header {border-width: 0 0 1px 0; position: relative;}
|
|||
border-right: none;
|
||||
}
|
||||
|
||||
.plupload .ui-sortable-helper,
|
||||
.plupload .ui-sortable .plupload_file {
|
||||
cursor:move;
|
||||
}
|
||||
|
||||
.plupload_scroll {
|
||||
max-height: 180px;
|
||||
min-height: 168px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(m,j){var l=h[j.id],r={},k=m.settings.chunk_size,n,o=[];function q(s,u){var t;if(j.status==a.FAILED){return}r.name=j.target_name||j.name;if(k){r.chunk=""+s;r.chunks=""+u}t=o.shift();e.Uploader.upload({url:m.settings.url,files:{file:t},cookies:document.cookies,postvars:a.extend(r,m.settings.multipart_params),progressCallback:function(x){var w,v=0;n[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<n.length;w++){v+=n[w]}j.loaded=v;m.trigger("UploadProgress",j)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(k){m.trigger("ChunkUploaded",j,{chunk:s,chunks:u,response:w.value.body,status:v})}if(o.length>0){q(++s,u)}else{j.status=a.DONE;m.trigger("FileUploaded",j,{response:w.value.body,status:v});if(v>=400){m.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:j,status:v})}}}else{m.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:j,details:w.error})}})}function p(s){j.size=s.size;if(k){e.FileAccess.chunk({file:s,chunkSize:k},function(v){if(v.success){var w=v.value,t=w.length;n=Array(t);for(var u=0;u<t;u++){n[u]=0;o.push(w[u])}q(0,t)}})}else{n=Array(1);o.push(s);q(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(j.name)){BrowserPlus.ImageAlter.transform({file:l,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){p(s.value.file)}})}else{p(l)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
|
||||
(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();no_type_restriction:for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){if(s[q]==="*"){t=[];break no_type_restriction}t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(m,j){var l=h[j.id],r={},k=m.settings.chunk_size,n,o=[];function q(s,u){var t;if(j.status==a.FAILED){return}r.name=j.target_name||j.name;if(k){r.chunk=""+s;r.chunks=""+u}t=o.shift();e.Uploader.upload({url:m.settings.url,files:{file:t},cookies:document.cookies,postvars:a.extend(r,m.settings.multipart_params),progressCallback:function(x){var w,v=0;n[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<n.length;w++){v+=n[w]}j.loaded=v;m.trigger("UploadProgress",j)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(k){m.trigger("ChunkUploaded",j,{chunk:s,chunks:u,response:w.value.body,status:v})}if(o.length>0){q(++s,u)}else{j.status=a.DONE;m.trigger("FileUploaded",j,{response:w.value.body,status:v});if(v>=400){m.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:j,status:v})}}}else{m.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:j,details:w.error})}})}function p(s){j.size=s.size;if(k){e.FileAccess.chunk({file:s,chunkSize:k},function(v){if(v.success){var w=v.value,t=w.length;n=Array(t);for(var u=0;u<t;u++){n[u]=0;o.push(w[u])}q(0,t)}})}else{n=Array(1);o.push(s);q(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(j.name)){BrowserPlus.ImageAlter.transform({file:l,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){p(s.value.file)}})}else{p(l)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,j,l){var g,i,k,n;i=google.gears.factory.create("beta.canvas");try{i.decode(h);if(!j.width){j.width=i.width}if(!j.height){j.height=i.height}n=Math.min(width/i.width,height/i.height);if(n<1||(n===1&&l==="image/jpeg")){i.resize(Math.round(i.width*n),Math.round(i.height*n));if(j.quality){return i.encode(l,{quality:j.quality/100})}return i.encode(l)}}catch(m){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(i,k){var j;if(!e.google||!google.gears){return k({success:false})}try{j=google.gears.factory.create("beta.desktop")}catch(h){return k({success:false})}function g(n){var m,l,o=[],p;for(l=0;l<n.length;l++){m=n[l];p=c.guid();f[p]=m.blob;o.push(new c.File(p,m.name,m.blob.length))}i.trigger("FilesAdded",o)}i.bind("PostInit",function(){var m=i.settings,l=b.getElementById(m.drop_element);if(l){c.addEvent(l,"dragover",function(n){j.setDropEffect(n,"copy");n.preventDefault()},i.id);c.addEvent(l,"drop",function(o){var n=j.getDragData(o,"application/x-gears-files");if(n){g(n.files)}o.preventDefault()},i.id);l=0}c.addEvent(b.getElementById(m.browse_button),"click",function(r){var q=[],o,n,p;r.preventDefault();for(o=0;o<m.filters.length;o++){p=m.filters[o].extensions.split(",");for(n=0;n<p.length;n++){q.push("."+p[n])}}j.openFiles(g,{singleFile:!m.multi_selection,filter:q})},i.id)});i.bind("UploadFile",function(r,o){var t=0,s,p,q=0,n=r.settings.resize,l;if(n&&/\.(png|jpg|jpeg)$/i.test(o.name)){f[o.id]=a(f[o.id],n,/\.png$/i.test(o.name)?"image/png":"image/jpeg")}o.size=f[o.id].length;p=r.settings.chunk_size;l=p>0;s=Math.ceil(o.size/p);if(!l){p=o.size;s=1}function m(){var y,A,v=r.settings.multipart,u=0,z={name:o.target_name||o.name},w=r.settings.url;function x(C){var B,H="----pluploadboundary"+c.guid(),E="--",G="\r\n",D,F;if(v){y.setRequestHeader("Content-Type","multipart/form-data; boundary="+H);B=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(z,r.settings.multipart_params),function(J,I){B.append(E+H+G+'Content-Disposition: form-data; name="'+I+'"'+G+G);B.append(J+G)});F=c.mimeTypes[o.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";B.append(E+H+G+'Content-Disposition: form-data; name="'+r.settings.file_data_name+'"; filename="'+o.name+'"'+G+"Content-Type: "+F+G+G);B.append(C);B.append(G+E+H+E+G);D=B.getAsBlob();u=D.length-C.length;C=D}y.send(C)}if(o.status==c.DONE||o.status==c.FAILED||r.state==c.STOPPED){return}if(l){z.chunk=t;z.chunks=s}A=Math.min(p,o.size-(t*p));if(!v){w=c.buildUrl(r.settings.url,z)}y=google.gears.factory.create("beta.httprequest");y.open("POST",w);if(!v){y.setRequestHeader("Content-Disposition",'attachment; filename="'+o.name+'"');y.setRequestHeader("Content-Type","application/octet-stream")}c.each(r.settings.headers,function(C,B){y.setRequestHeader(B,C)});y.upload.onprogress=function(B){o.loaded=q+B.loaded-u;r.trigger("UploadProgress",o)};y.onreadystatechange=function(){var B;if(y.readyState==4){if(y.status==200){B={chunk:t,chunks:s,response:y.responseText,status:y.status};r.trigger("ChunkUploaded",o,B);if(B.cancelled){o.status=c.FAILED;return}q+=A;if(++t>=s){o.status=c.DONE;r.trigger("FileUploaded",o,{response:y.responseText,status:y.status})}else{m()}}else{r.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:o,chunk:t,chunks:s,status:y.status})}}};if(t<s){x(f[o.id].slice(t*p,A))}}m()});i.bind("Destroy",function(l){var m,n,o={browseButton:l.settings.browse_button,dropElm:l.settings.drop_element};for(m in o){n=b.getElementById(o[m]);if(n){c.removeAllEvents(n,l.id)}}});k({success:true})}})})(window,document,plupload);
|
||||
(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,j,l){var g,i,k,n;i=google.gears.factory.create("beta.canvas");try{i.decode(h);if(!j.width){j.width=i.width}if(!j.height){j.height=i.height}n=Math.min(width/i.width,height/i.height);if(n<1||(n===1&&l==="image/jpeg")){i.resize(Math.round(i.width*n),Math.round(i.height*n));if(j.quality){return i.encode(l,{quality:j.quality/100})}return i.encode(l)}}catch(m){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(i,k){var j;if(!e.google||!google.gears){return k({success:false})}try{j=google.gears.factory.create("beta.desktop")}catch(h){return k({success:false})}function g(n){var m,l,o=[],p;for(l=0;l<n.length;l++){m=n[l];p=c.guid();f[p]=m.blob;o.push(new c.File(p,m.name,m.blob.length))}i.trigger("FilesAdded",o)}i.bind("PostInit",function(){var m=i.settings,l=b.getElementById(m.drop_element);if(l){c.addEvent(l,"dragover",function(n){j.setDropEffect(n,"copy");n.preventDefault()},i.id);c.addEvent(l,"drop",function(o){var n=j.getDragData(o,"application/x-gears-files");if(n){g(n.files)}o.preventDefault()},i.id);l=0}c.addEvent(b.getElementById(m.browse_button),"click",function(r){var q=[],o,n,p;r.preventDefault();no_type_restriction:for(o=0;o<m.filters.length;o++){p=m.filters[o].extensions.split(",");for(n=0;n<p.length;n++){if(p[n]==="*"){q=[];break no_type_restriction}q.push("."+p[n])}}j.openFiles(g,{singleFile:!m.multi_selection,filter:q})},i.id)});i.bind("UploadFile",function(r,o){var t=0,s,p,q=0,n=r.settings.resize,l;if(n&&/\.(png|jpg|jpeg)$/i.test(o.name)){f[o.id]=a(f[o.id],n,/\.png$/i.test(o.name)?"image/png":"image/jpeg")}o.size=f[o.id].length;p=r.settings.chunk_size;l=p>0;s=Math.ceil(o.size/p);if(!l){p=o.size;s=1}function m(){var y,A,v=r.settings.multipart,u=0,z={name:o.target_name||o.name},w=r.settings.url;function x(C){var B,H="----pluploadboundary"+c.guid(),E="--",G="\r\n",D,F;if(v){y.setRequestHeader("Content-Type","multipart/form-data; boundary="+H);B=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(z,r.settings.multipart_params),function(J,I){B.append(E+H+G+'Content-Disposition: form-data; name="'+I+'"'+G+G);B.append(J+G)});F=c.mimeTypes[o.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";B.append(E+H+G+'Content-Disposition: form-data; name="'+r.settings.file_data_name+'"; filename="'+o.name+'"'+G+"Content-Type: "+F+G+G);B.append(C);B.append(G+E+H+E+G);D=B.getAsBlob();u=D.length-C.length;C=D}y.send(C)}if(o.status==c.DONE||o.status==c.FAILED||r.state==c.STOPPED){return}if(l){z.chunk=t;z.chunks=s}A=Math.min(p,o.size-(t*p));if(!v){w=c.buildUrl(r.settings.url,z)}y=google.gears.factory.create("beta.httprequest");y.open("POST",w);if(!v){y.setRequestHeader("Content-Disposition",'attachment; filename="'+o.name+'"');y.setRequestHeader("Content-Type","application/octet-stream")}c.each(r.settings.headers,function(C,B){y.setRequestHeader(B,C)});y.upload.onprogress=function(B){o.loaded=q+B.loaded-u;r.trigger("UploadProgress",o)};y.onreadystatechange=function(){var B;if(y.readyState==4){if(y.status==200){B={chunk:t,chunks:s,response:y.responseText,status:y.status};r.trigger("ChunkUploaded",o,B);if(B.cancelled){o.status=c.FAILED;return}q+=A;if(++t>=s){o.status=c.DONE;r.trigger("FileUploaded",o,{response:y.responseText,status:y.status})}else{m()}}else{r.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:o,chunk:t,chunks:s,status:y.status})}}};if(t<s){x(f[o.id].slice(t*p,A))}}m()});i.bind("Destroy",function(l){var m,n,o={browseButton:l.settings.browse_button,dropElm:l.settings.drop_element};for(m in o){n=b.getElementById(o[m]);if(n){c.removeAllEvents(n,l.id)}}});k({success:true})}})})(window,document,plupload);
|
|
@ -1 +1 @@
|
|||
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,canOpenDialog:navigator.userAgent.indexOf("WebKit")!==-1}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.canOpenDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){y.click();C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.canOpenDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':""" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.documentElement.innerText||B.documentElement.textContent;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit();B.parentNode.removeChild(B)});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);n.parentNode.removeChild(n)},0)}});p.bind("Refresh",function(A){var F,B,C,D,i,G,H,E,y;F=e(A.settings.browse_button);if(F){i=b.getPos(F,e(A.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(A.features.canOpenDialog){y=parseInt(F.parentNode.style.zIndex,10);if(isNaN(y)){y=0}b.extend(F.style,{zIndex:y});if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}b.extend(H.style,{zIndex:y-1})}C=A.settings.browse_button_hover;D=A.settings.browse_button_active;B=A.features.canOpenDialog?F:H;if(C){b.addEvent(B,"mouseover",function(){b.addClass(F,C)},A.id);b.addEvent(B,"mouseout",function(){b.removeClass(F,C)},A.id)}if(D){b.addEvent(B,"mousedown",function(){b.addClass(F,D)},A.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,D)},A.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);
|
||||
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){var f=(function(){var k=navigator,j=k.userAgent,l=k.vendor,h,g,i;h=/WebKit/.test(j);i=h&&l.indexOf("Apple")!==-1;g=d.opera&&d.opera.buildNumber;return{ie:!h&&!g&&(/MSIE/gi).test(j)&&(/Explorer/gi).test(k.appName),webkit:h,gecko:!h&&/Gecko/.test(j),safari:i,safariwin:i&&navigator.platform.indexOf("Win")!==-1,opera:!!g}}());return{multipart:true,triggerDialog:(f.gecko&&d.FormData||f.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){y.click();C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"999px"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':""" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.documentElement.innerText||B.documentElement.textContent;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit();B.parentNode.removeChild(B)});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);n.parentNode.removeChild(n)},0)}});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in a new issue