├── changelog.txt ├── js ├── Moxie.swf ├── Moxie.xap ├── jquery.plupload.queue │ ├── img │ │ ├── done.gif │ │ ├── error.gif │ │ ├── buttons.png │ │ ├── delete.gif │ │ ├── throbber.gif │ │ ├── transp50.png │ │ ├── backgrounds.gif │ │ └── buttons-disabled.png │ ├── css │ │ └── jquery.plupload.queue.css │ ├── jquery.plupload.queue.min.js │ └── jquery.plupload.queue.js ├── jquery.ui.plupload │ ├── img │ │ ├── loading.gif │ │ └── plupload.png │ ├── css │ │ └── jquery.ui.plupload.css │ ├── jquery.ui.plupload.min.js │ └── jquery.ui.plupload.js ├── i18n │ ├── zh_CN.js │ ├── ko.js │ ├── ja.js │ ├── da.js │ ├── sv.js │ ├── hy.js │ ├── el.js │ ├── sr.js │ ├── cs.js │ ├── fa.js │ ├── pl.js │ ├── hu.js │ ├── ro.js │ ├── fi.js │ ├── lv.js │ ├── sk.js │ ├── nl.js │ ├── uk_UA.js │ ├── et.js │ ├── de.js │ ├── en.js │ ├── pt_BR.js │ ├── fr.js │ ├── ru.js │ ├── tr.js │ ├── es.js │ ├── cy.js │ ├── lt.js │ ├── it.js │ ├── ka.js │ └── hr.js └── plupload.min.js ├── examples ├── dump.php ├── jquery │ ├── queue_widget.html │ ├── jquery_ui_widget.html │ ├── all_runtimes.html │ └── s3.php ├── custom.html └── upload.php ├── readme.md └── license.txt /changelog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/changelog.txt -------------------------------------------------------------------------------- /js/Moxie.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/Moxie.swf -------------------------------------------------------------------------------- /js/Moxie.xap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/Moxie.xap -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/done.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/done.gif -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/error.gif -------------------------------------------------------------------------------- /js/jquery.ui.plupload/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.ui.plupload/img/loading.gif -------------------------------------------------------------------------------- /js/jquery.ui.plupload/img/plupload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.ui.plupload/img/plupload.png -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/buttons.png -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/delete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/delete.gif -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/throbber.gif -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/transp50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/transp50.png -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/backgrounds.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/backgrounds.gif -------------------------------------------------------------------------------- /js/jquery.plupload.queue/img/buttons-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidchase/plupload/master/js/jquery.plupload.queue/img/buttons-disabled.png -------------------------------------------------------------------------------- /examples/dump.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Plupload - Form dump 6 | 7 | 8 | 9 |

Post dump

10 | 11 |

Shows the form items posted.

12 | 13 | 14 | 15 | 16 | 17 | 18 | $value) { ?> 19 | 20 | 21 | 22 | 23 | 24 |
NameValue
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /js/i18n/zh_CN.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"停止上传","Upload URL might be wrong or doesn't exist.":"上传的URL可能是错误的或不存在。","tb":"tb","Size":"大小","Close":"关闭","Init error.":"初始化错误。","Add files to the upload queue and click the start button.":"将文件添加到上传队列,然后点击”开始上传“按钮。","Filename":"文件名","Image format either wrong or not supported.":"图片格式错误或者不支持。","Status":"状态","HTTP Error.":"HTTP 错误。","Start Upload":"开始上传","mb":"mb","kb":"kb","Duplicate file error.":"重复文件错误。","File size error.":"文件大小错误。","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"错误:无效的文件扩展名:","Select files":"选择文件","%s already present in the queue.":"%s 已经在当前队列里。","File: %s":"文件: %s","b":"b","Uploaded %d/%d files":"已上传 %d/%d 个文件","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"每次只接受同时上传 %d 个文件,多余的文件将会被删除。","%d files queued":"%d 个文件加入到队列","File: %s, size: %d, max file size: %d":"文件: %s, 大小: %d, 最大文件大小: %d","Drag files here.":"把文件拖到这里。","Runtime ran out of available memory.":"运行时已消耗所有可用内存。","File count error.":"文件数量错误。","File extension error.":"文件扩展名错误。","Error: File too large:":"错误: 文件太大:","Add Files":"增加文件"}); -------------------------------------------------------------------------------- /js/i18n/ko.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"업로드 중지","Upload URL might be wrong or doesn't exist.":"업로드할 URL이 존재하지 않습니다","tb":"","Size":"크기","Close":"닫기","Init error.":"초기화 오류","Add files to the upload queue and click the start button.":"파일을 업로드 큐에 추가하여 시작 버튼을 클릭하십시오.","Filename":"파일 이름","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"상태","HTTP Error.":"HTTP 오류","Start Upload":"업로드","mb":"","kb":"","Duplicate file error.":"","File size error.":"파일 크기 오류","N/A":"N/A","gb":"","Error: Invalid file extension:":"오류 : 확장자가 허용되지 않습니다 :","Select files":"파일 선택","%s already present in the queue.":"","File: %s":"파일 % s","b":"","Uploaded %d/%d files":"업로드 중 % d / % d 파일","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"업로드 가능한 파일의 수는 % d입니다. 불필요한 파일은 삭제되었습니다","%d files queued":"% d 파일이 추가되었습니다","File: %s, size: %d, max file size: %d":"","Drag files here.":"여기에 파일을 드래그","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"이미지 : 오류","File extension error.":"파일 확장자 오류","Error: File too large:":"오류 : 크기가 너무 큽니다","Add Files":"파일 추가"}); -------------------------------------------------------------------------------- /js/i18n/ja.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"アップロード停止","Upload URL might be wrong or doesn't exist.":"アップロード先の URL が存在しません","tb":"","Size":"サイズ","Close":"閉じる","Init error.":"イニシャライズエラー","Add files to the upload queue and click the start button.":"ファイルをアップロードキューに追加してスタートボタンをクリックしてください","Filename":"ファイル名","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"ステータス","HTTP Error.":"HTTP エラー","Start Upload":"アップロード","mb":"","kb":"","Duplicate file error.":"","File size error.":"ファイルサイズエラー","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"ファイル選択","%s already present in the queue.":"","File: %s":"ファイル: %s","b":"","Uploaded %d/%d files":"アップロード中 %d/%d ファイル","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"アップロード可能なファイル数は %d です。余分なファイルは削除されました","%d files queued":"%d ファイルが追加されました","File: %s, size: %d, max file size: %d":"","Drag files here.":"ここにファイルをドラッグ","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"ファイル数エラー","File extension error.":"ファイル拡張子エラー","Error: File too large:":"Error: File too large:","Add Files":"ファイルを追加"}); -------------------------------------------------------------------------------- /js/i18n/da.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Størrelse","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Tilføj filer til køen","Filename":"Filnavn","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vælg filer","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Træk filer her.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/sv.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Storlek","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Lägg till filer till kön och tryck på start.","Filename":"Filnamn","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Välj filer","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Dra filer hit","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/hy.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Կանգնեցնել","Upload URL might be wrong or doesn't exist.":"Ավեցաված URL-ը սխալ է կամ գոյություն չունի։","tb":"տբ","Size":"Չափ","Close":"Փակել","Init error.":"Ստեղծման սխալ","Add files to the upload queue and click the start button.":"Ավելացրեք ֆայլեր ցուցակում և սեղմեք \"Վերբեռնել\"։","Filename":"Ֆայլի անուն","Image format either wrong or not supported.":"Նկարի ֆորմատը սխալ է կամ չի ընդունվում։","Status":"","HTTP Error.":"HTTP սխալ","Start Upload":"Վերբեռնել","mb":"մբ","kb":"կբ","Duplicate file error.":"Ֆայլի կրկնման սխալ","File size error.":"Ֆայլի չափի սխալ","N/A":"N/A","gb":"գբ","Error: Invalid file extension:":"Սխալ։ Ֆայլի ընդլայնումը սխալ է։","Select files":"Ընտրեք ֆայլերը","%s already present in the queue.":"%s ֆայլը արդեն ավելացված է ցուցակում.","File: %s":"Ֆայլ: %s","b":"բ","Uploaded %d/%d files":"Վերբեռնվել են %d/%d ֆայլերը","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"","%d files queued":"ցուցակում կա %d ֆայլ","File: %s, size: %d, max file size: %d":"Ֆայլ: %s, չափ: %d, ֆայլի մաքսիմում չափ: %d","Drag files here.":"Տեղափոխեք ֆայլերը այստեղ","Runtime ran out of available memory.":"","File count error.":"Ֆայլերի քանակի սխալ","File extension error.":"Ֆայլի ընդլայնման սխալ","Error: File too large:":"Սխալ։ Ֆայլի չափը մեծ է։","Add Files":"Ավելացնել ֆայլեր"}); -------------------------------------------------------------------------------- /js/i18n/el.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Μέγεθος","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Προσθήκη αρχείων στην ουρά μεταφόρτωσης","Filename":"Όνομα αρχείου","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Κατάσταση","HTTP Error.":"HTTP Error.","Start Upload":"Εκκίνηση μεταφόρτωσης","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Επιλέξτε Αρχεία","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Ανέβηκαν %d/%d αρχεία","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Σύρετε αρχεία εδώ","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Προσθέστε αρχεία"}); -------------------------------------------------------------------------------- /js/i18n/sr.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Veličina","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Dodajte fajlove u listu i kliknite na dugme Start.","Filename":"Naziv fajla","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Počni upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Izaberite fajlove","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Snimljeno %d/%d fajlova","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Prevucite fajlove ovde.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Dodaj fajlove"}); -------------------------------------------------------------------------------- /js/i18n/cs.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Velikost","Close":"Close","Init error.":"Init error.","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","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Spustit nahrávání","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vyberte soubory","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Nahráno %d/%d souborů","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Sem přetáhněte soubory.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Přidat soubory"}); -------------------------------------------------------------------------------- /js/i18n/fa.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"توقف انتقال","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"سایز","Close":"بستن","Init error.":"خطا در استارت اسکریپت","Add files to the upload queue and click the start button.":"اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.","Filename":"نام فایل","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"وضعیت","HTTP Error.":"HTTP خطای","Start Upload":"شروع انتقال","mb":"","kb":"","Duplicate file error.":"","File size error.":"خطای سایز فایل","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"انتخاب فایل","%s already present in the queue.":"","File: %s":" فایل ها : %s","b":"","Uploaded %d/%d files":"منتقل شد %d/%d از فایلها","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.","%d files queued":"%d فایل در صف","File: %s, size: %d, max file size: %d":"","Drag files here.":"بکشید فایل ها رو به اینجا","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"خطای تعداد فایل","File extension error.":"خطا پیشوند فایل","Error: File too large:":"Error: File too large:","Add Files":"افزودن فایل"}); -------------------------------------------------------------------------------- /js/i18n/pl.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Przerwij transfer.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Rozmiar","Close":"Close","Init error.":"Błąd inicjalizacji.","Add files to the upload queue and click the start button.":"Dodaj pliki i kliknij 'Rozpocznij transfer'.","Filename":"Nazwa pliku","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"Błąd HTTP.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Plik jest zbyt duży.","N/A":"Nie dostępne","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Wybierz pliki:","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Wysłano %d/%d plików","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d plików w kolejce.","File: %s, size: %d, max file size: %d":"","Drag files here.":"Przeciągnij tu pliki","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Nieobsługiwany format pliku.","Error: File too large:":"Error: File too large:","Add Files":"Dodaj pliki"}); -------------------------------------------------------------------------------- /js/i18n/hu.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"A megadott URL hibás vagy nem létezik.","tb":"","Size":"Méret","Close":"Bezárás","Init error.":"Init hiba.","Add files to the upload queue and click the start button.":"Válaszd ki a fájlokat, majd kattints az Indítás gombra.","Filename":"Fájlnév","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Állapot","HTTP Error.":"HTTP hiba.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Hibás fájlméret.","N/A":"Nem elérhető","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Fájlok kiválasztása","%s already present in the queue.":"","File: %s":"Fájl: %s","b":"","Uploaded %d/%d files":"Feltöltött fájlok: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"A feltöltés egyszerre csak %d fájlt fogad el, a többi fájl nem lesz feltöltve.","%d files queued":"%d fájl sorbaállítva","File: %s, size: %d, max file size: %d":"","Drag files here.":"Húzd ide a fájlokat.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"A fájlok számával kapcsolatos hiba.","File extension error.":"Hibás fájlkiterjesztés.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/ro.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Oprire încărcare","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Mărime","Close":"Close","Init error.":"Eroare iniţializare","Add files to the upload queue and click the start button.":"Adaugă fişiere în lista apoi apasă butonul 'Începe încărcare'.","Filename":"Nume fişier","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Stare","HTTP Error.":"Eroare HTTP","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Eroare dimensiune fişier","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Selectare fişiere","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Fişiere încărcate %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d fişiere listate","File: %s, size: %d, max file size: %d":"","Drag files here.":"Trage aici fişierele","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Extensie fişier eronată","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/fi.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Koko","Close":"Sulje","Init error.":"Init virhe.","Add files to the upload queue and click the start button.":"Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.","Filename":"Tiedostonimi","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Tila","HTTP Error.":"HTTP virhe.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Tiedostokokovirhe.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Valitse tiedostoja","%s already present in the queue.":"","File: %s":"Tiedosto: %s","b":"","Uploaded %d/%d files":"Ladattu %d/%d tiedostoa","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.","%d files queued":"%d tiedostoa jonossa","File: %s, size: %d, max file size: %d":"","Drag files here.":"Raahaa tiedostot tänne.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Tiedostolaskentavirhe.","File extension error.":"Tiedostopäätevirhe.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/lv.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Izmērs","Close":"Aizvērt","Init error.":"Inicializācijas kļūda.","Add files to the upload queue and click the start button.":"Pieveinojiet failus rindai un klikšķiniet uz","Filename":"Faila nosaukums","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Statuss","HTTP Error.":"HTTP kļūda.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Faila izmēra kļūda.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Izvēlieties failus","%s already present in the queue.":"","File: %s":"Fails: %s","b":"","Uploaded %d/%d files":"Augšupielādēti %d/%d faili","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","%d files queued":"%d faili pievienoti rindai","File: %s, size: %d, max file size: %d":"","Drag files here.":"Ievelciet failus šeit","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Failu skaita kļūda","File extension error.":"Faila paplašinājuma kļūda.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/sk.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Zastaviť nahrávanie","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Veľkosť","Close":"Close","Init error.":"Chyba inicializácie.","Add files to the upload queue and click the start button.":"Pridajte súbory do zoznamu a potom spustite nahrávanie.","Filename":"Názov súboru","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Stav","HTTP Error.":"HTTP Chyba.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Súbor je príliš veľký.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vyberte súbory","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Nahraných %d/%d súborov","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d súborov pridaných do zoznamu","File: %s, size: %d, max file size: %d":"","Drag files here.":"Sem pretiahnite súbory.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Chybný typ súboru.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/nl.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Grootte","Close":"Close","Init error.":"Initialisatie error.","Add files to the upload queue and click the start button.":"Voeg bestanden toe aan de wachtrij en druk op 'Start'.","Filename":"Bestandsnaam","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Bestandsgrootte Error.","N/A":"Niet beschikbaar","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Selecteer bestand(en):","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"%d/%d bestanden ge-upload","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Sleep bestanden hierheen.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Ongeldig bestandstype.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/uk_UA.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Зупинити завантаження","Upload URL might be wrong or doesn't exist.":"Адреса завантаження неправильна або не існує.","tb":"","Size":"Розмір","Close":"Закрити","Init error.":"Помилка ініціалізації.","Add files to the upload queue and click the start button.":"Додайте файли в чергу та натисніть кнопку \"Завантажити файли\".","Filename":"Назва файлу","Image format either wrong or not supported.":"Формат картинки не правильний або не підтримується.","Status":"Статус","HTTP Error.":"Помилка HTTP.","Start Upload":"Почати завантаження","mb":"","kb":"","Duplicate file error.":"","File size error.":"Неправильний розмір файлу.","N/A":"Н/Д","gb":"","Error: Invalid file extension:":"Помилка: У файлу неправильне розширення:","Select files":"Оберіть файли","%s already present in the queue.":"","File: %s":"Файл: %s","b":"","Uploaded %d/%d files":"Завантажено %d/%d файлів","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"","%d files queued":"В черзі %d файл(ів)","File: %s, size: %d, max file size: %d":"","Drag files here.":"Перетягніть файли сюди.","Runtime ran out of available memory.":"Робоче середовище перевищило ліміт доступної пам'яті.","File count error.":"Занадто багато файлів.","File extension error.":"Неправильне розширення файлу.","Error: File too large:":"Помилка: Файл занадто великий:","Add Files":"Додати файли"}); -------------------------------------------------------------------------------- /js/i18n/et.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Üleslaadimise URL võib olla vale või seda pole.","tb":"","Size":"Suurus","Close":"Sulge","Init error.":"Lähtestamise viga.","Add files to the upload queue and click the start button.":"Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.","Filename":"Failinimi","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Olek","HTTP Error.":"HTTP ühenduse viga.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Failisuuruse viga.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vali faile","%s already present in the queue.":"","File: %s":"Fail: %s","b":"","Uploaded %d/%d files":"Üles laaditud %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Üleslaadimise element saab vastu võtta ainult %d faili ühe korraga. Ülejäänud failid jäetakse laadimata.","%d files queued":"Järjekorras on %d faili","File: %s, size: %d, max file size: %d":"","Drag files here.":"Lohista failid siia.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Failide arvu viga.","File extension error.":"Faililaiendi viga.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/de.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Hochladen stoppen","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Größe","Close":"Close","Init error.":"Initialisierungsfehler","Add files to the upload queue and click the start button.":"Dateien hinzufügen und auf 'Hochladen' klicken.","Filename":"Dateiname","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP-Fehler","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Fehler bei Dateigröße","N/A":"Nicht verfügbar","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Dateien hochladen","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"%d/%d Dateien sind hochgeladen","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d Dateien in der Warteschlange","File: %s, size: %d, max file size: %d":"","Drag files here.":"Ziehen Sie die Dateien hier hin","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Fehler bei Dateiendung","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/en.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Size","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Add files to the upload queue and click the start button.","Filename":"Filename","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"mb","kb":"kb","Duplicate file error.":"Duplicate file error.","File size error.":"File size error.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Select files","%s already present in the queue.":"%s already present in the queue.","File: %s":"File: %s","b":"b","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"File: %s, size: %d, max file size: %d","Drag files here.":"Drag files here.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"}); -------------------------------------------------------------------------------- /js/i18n/pt_BR.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Parar o envio","Upload URL might be wrong or doesn't exist.":"URL de envio está errada ou não existe","tb":"","Size":"Tamanho","Close":"Fechar","Init error.":"Erro inicializando.","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","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"Erro HTTP.","Start Upload":"Iniciar o envio","mb":"","kb":"","Duplicate file error.":"","File size error.":"Tamanho de arquivo não permitido.","N/A":"N/D","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Escolha os arquivos","%s already present in the queue.":"","File: %s":"Arquivo: %s","b":"","Uploaded %d/%d files":"Enviado(s) %d/%d arquivo(s)","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.","%d files queued":"%d arquivo(s)","File: %s, size: %d, max file size: %d":"","Drag files here.":"Arraste os arquivos pra cá","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Erro na contagem dos arquivos","File extension error.":"Tipo de arquivo não permitido.","Error: File too large:":"Error: File too large:","Add Files":"Adicionar arquivo(s)"}); -------------------------------------------------------------------------------- /js/i18n/fr.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Arrêter les envois.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Taille","Close":"Close","Init error.":"Erreur d'initialisation.","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","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"Erreur HTTP.","Start Upload":"Démarrer les envois.","mb":"","kb":"","Duplicate file error.":"","File size error.":"Erreur taille fichier.","N/A":"Non applicable","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Sélectionnez les fichiers","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"%d/%d fichiers envoyés","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d fichiers en attente.","File: %s, size: %d, max file size: %d":"","Drag files here.":"Déposer les fichiers ici.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Erreur extension fichier","Error: File too large:":"Error: File too large:","Add Files":"Ajouter des fichiers"}); -------------------------------------------------------------------------------- /js/i18n/ru.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Остановить Загрузку","Upload URL might be wrong or doesn't exist.":"Адрес заргузки неправильный или он не существует.","tb":"","Size":"Размер","Close":"Закрыть","Init error.":"Ошибка инициализации.","Add files to the upload queue and click the start button.":"Добавьте файлы в очередь и нажмите кнопку \"Загрузить файлы\".","Filename":"Имя файла","Image format either wrong or not supported.":"Формат картинки неправильный или он не поддерживается.","Status":"Статус","HTTP Error.":"Ошибка HTTP.","Start Upload":"Начать загрузку","mb":"","kb":"","Duplicate file error.":"","File size error.":"Неправильный размер файла.","N/A":"N/D","gb":"","Error: Invalid file extension:":"Ошибка: У файла неправильное расширение:","Select files":"Выберите файлы","%s already present in the queue.":"","File: %s":"Файл: %s","b":"","Uploaded %d/%d files":"Загружено %d/%d файлов","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Загрузочный элемент за раз принимает только %d файл(ов). Лишние файлы были отброшены.","%d files queued":"В очереди %d файл(ов)","File: %s, size: %d, max file size: %d":"","Drag files here.":"Перетащите файлы сюда.","Runtime ran out of available memory.":"Рабочая среда превысила лимит достуной памяти.","File count error.":"Слишком много файлов.","File extension error.":"Неправильное расширение файла.","Error: File too large:":"Ошибка: Файл слишком большой:","Add Files":"Добавьте файлы"}); -------------------------------------------------------------------------------- /js/i18n/tr.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Yüklemeyi durdur","Upload URL might be wrong or doesn't exist.":"URL yok ya da hatalı olabilir.","tb":"tb","Size":"Boyut","Close":"Kapat","Init error.":"Başlangıç hatası.","Add files to the upload queue and click the start button.":"Dosyaları kuyruğa ekleyin ve başlatma butonuna tıklayın.","Filename":"Dosya adı","Image format either wrong or not supported.":"Resim formatı yanlış ya da desteklenmiyor.","Status":"Durum","HTTP Error.":"HTTP hatası.","Start Upload":"Yüklemeyi başlat","mb":"mb","kb":"kb","Duplicate file error.":"Yinelenen dosya hatası.","File size error.":"Dosya boyutu hatası.","N/A":"-","gb":"gb","Error: Invalid file extension:":"Hata: Geçersiz dosya uzantısı:","Select files":"Dosyaları seç","%s already present in the queue.":"%s kuyrukta zaten mevcut.","File: %s":"Dosya: %s","b":"bayt","Uploaded %d/%d files":"%d/%d dosya yüklendi","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Yükleme elemanı aynı anda %d dosya kabul eder. Ekstra dosyalar işleme konulmaz.","%d files queued":"Kuyrukta %d dosya var.","File: %s, size: %d, max file size: %d":"Dosya: %s, boyut: %d, maksimum dosya boyutu: %d","Drag files here.":"Dosyaları buraya bırakın.","Runtime ran out of available memory.":"İşlem için yeterli bellek yok.","File count error.":"Dosya sayım hatası.","File extension error.":"Dosya uzantısı hatası.","Error: File too large:":"Hata: Dosya çok büyük:","Add Files":"Dosya ekle"}); -------------------------------------------------------------------------------- /js/i18n/es.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Detener Subida.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Tamaño","Close":"Close","Init error.":"Error de inicialización.","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","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Estado","HTTP Error.":"Error de HTTP.","Start Upload":"Comenzar Subida.","mb":"","kb":"","Duplicate file error.":"","File size error.":"Error de tamaño de archivo.","N/A":"No disponible","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Elija archivos","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Subidos %d/%d archivos","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d archivos en cola.","File: %s, size: %d, max file size: %d":"","Drag files here.":"Arrastre archivos aquí","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Error de extensión de archivo.","Error: File too large:":"Error: File too large:","Add Files":"Agregar Archivos"}); -------------------------------------------------------------------------------- /js/i18n/cy.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Atal Lanlwytho","Upload URL might be wrong or doesn't exist.":"URL y lanlwythiad ynb anghywir neu ddim yn bodoli.","tb":"tb","Size":"Maint","Close":"Cau","Init error.":"Gwall cych.","Add files to the upload queue and click the start button.":"Ychwanegwch ffeiliau i'r ciw lanlwytho a chlicio'r botwm dechrau.","Filename":"Enw'r ffeil","Image format either wrong or not supported.":"Fformat delwedd yn anghywir neu heb ei gynnal.","Status":"Statws","HTTP Error.":"Gwall HTTP.","Start Upload":"Dechrau Lanlwytho","mb":"mb","kb":"kb","Duplicate file error.":"Gwall ffeil ddyblyg.","File size error.":"Gwall maint ffeil.","N/A":"Dd/A","gb":"gb","Error: Invalid file extension:":"Gwall: estyniad ffeil annilys:","Select files":"Dewis ffeiliau","%s already present in the queue.":"%s yn y ciw yn barod.","File: %s":"Ffeil: %s","b":"b","Uploaded %d/%d files":"Lanlwythwyd %d/%d ffeil","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Mae'r elfen lanlwytho yn derbyn %d ffeil ar y tro. Caiff ffeiliau ychwanegol eu tynnu.","%d files queued":"%d ffeil mewn ciw","File: %s, size: %d, max file size: %d":"Ffeil: %s, maint: %d, maint mwyaf ffeil: %d","Drag files here.":"Llusgwch ffeiliau yma.","Runtime ran out of available memory.":"Allan o gof.","File count error.":"Gwall cyfri ffeiliau.","File extension error.":"Gwall estyniad ffeil.","Error: File too large:":"Gwall: Ffeil yn rhy fawr:","Add Files":"Ychwanegu Ffeiliau"}); -------------------------------------------------------------------------------- /js/i18n/lt.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Stabdyti įkėlimą","Upload URL might be wrong or doesn't exist.":"Klaidinga arba neegzistuojanti įkėlimo nuoroda.","tb":"tb","Size":"Dydis","Close":"Uždaryti","Init error.":"Įkrovimo klaida.","Add files to the upload queue and click the start button.":"Pridėkite bylas į įkėlimo eilę ir paspauskite starto mygtuką.","Filename":"Bylos pavadinimas","Image format either wrong or not supported.":"Paveiksliuko formatas klaidingas arba nebepalaikomas.","Status":"Statusas","HTTP Error.":"HTTP klaida.","Start Upload":"Pradėti įkėlimą","mb":"mb","kb":"kb","Duplicate file error.":"Pasikartojanti byla.","File size error.":"Netinkamas bylos dydis.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Klaida: Netinkamas bylos plėtinys:","Select files":"Žymėti bylas","%s already present in the queue.":"%s jau yra eilėje.","File: %s":"Byla: %s","b":"b","Uploaded %d/%d files":"Įkelta bylų: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Vienu metu galima įkelti tik %d bylas(ų). Papildomos bylos buvo pašalintos.","%d files queued":"%d bylų eilėje","File: %s, size: %d, max file size: %d":"Byla: %s, dydis: %d, galimas dydis: %d","Drag files here.":"Padėti bylas čia.","Runtime ran out of available memory.":"Išeikvota darbinė atmintis.","File count error.":"Netinkamas bylų kiekis.","File extension error.":"Netinkamas pletinys.","Error: File too large:":"Klaida: Byla per didelė:","Add Files":"Pridėti bylas"}); -------------------------------------------------------------------------------- /js/i18n/it.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Ferma Upload","Upload URL might be wrong or doesn't exist.":"URL di Upload errata o non esistente","tb":"tb","Size":"Dimensione","Close":"Chiudi","Init error.":"Errore inizializzazione.","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","Image format either wrong or not supported.":"Formato immagine errato o non supportato.","Status":"Stato","HTTP Error.":"Errore HTTP.","Start Upload":"Inizia Upload","mb":"mb","kb":"kb","Duplicate file error.":"Errore file duplicato.","File size error.":"Errore dimensione file.","N/A":"N/D","gb":"gb","Error: Invalid file extension:":"Errore: Estensione file non valida:","Select files":"Seleziona i files","%s already present in the queue.":"%s già presente nella coda.","File: %s":"File: %s","b":"byte","Uploaded %d/%d files":"Caricati %d/%d file","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d file in coda","File: %s, size: %d, max file size: %d":"File: %s, dimensione: %d, dimensione max file: %d","Drag files here.":"Trascina i files qui.","Runtime ran out of available memory.":"Runtime ha esaurito la memoria disponibile.","File count error.":"File count error.","File extension error.":"Errore estensione file.","Error: File too large:":"Errore: File troppo grande:","Add Files":"Aggiungi file"}); -------------------------------------------------------------------------------- /js/i18n/ka.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"ატვირთვის შეჩერება","Upload URL might be wrong or doesn't exist.":"ატვირთვის მისამართი არასწორია ან არ არსებობს.","tb":"ტბ","Size":"ზომა","Close":"დავხუროთ","Init error.":"ინიციალიზაციის შეცდომა.","Add files to the upload queue and click the start button.":"დაამატეთ ფაილები და დააჭირეთ ღილაკს - ატვირთვა.","Filename":"ფაილის სახელი","Image format either wrong or not supported.":"ფაილის ფორმატი არ არის მხარდაჭერილი ან არასწორია.","Status":"სტატუსი","HTTP Error.":"HTTP შეცდომა.","Start Upload":"ატვირთვა","mb":"მბ","kb":"კბ","Duplicate file error.":"ესეთი ფაილი უკვე დამატებულია.","File size error.":"ფაილის ზომა დაშვებულზე დიდია.","N/A":"N/A","gb":"გბ","Error: Invalid file extension:":"შეცდომა: ფაილს აქვს არასწორი გაფართოება.","Select files":"ფაილების მონიშვნა","%s already present in the queue.":"%s უკვე დამატებულია.","File: %s":"ფაილი: %s","b":"ბ","Uploaded %d/%d files":"ატვირთულია %d/%d ფაილი","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"ერთდროულად დაშვებულია მხოლოდ %d ფაილის დამატება.","%d files queued":"რიგშია %d ფაილი","File: %s, size: %d, max file size: %d":"ფაილი: %s, ზომა: %d, მაქსიმალური დაშვებული ზომა: %d","Drag files here.":"ჩააგდეთ ფაილები აქ.","Runtime ran out of available memory.":"ხელმისაწვდომი მეხსიერება გადაივსო.","File count error.":"აღმოჩენილია ზედმეტი ფაილები.","File extension error.":"ფაილის ფორმატი დაშვებული არ არის.","Error: File too large:":"შეცდომა: ფაილი ზედმეტად დიდია.","Add Files":"დაამატეთ ფაილები"}); -------------------------------------------------------------------------------- /js/i18n/hr.js: -------------------------------------------------------------------------------- 1 | plupload.addI18n({"Stop Upload":"Zaustavi upload.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Veličina","Close":"Zatvori","Init error.":"Greška inicijalizacije.","Add files to the upload queue and click the start button.":"Dodajte datoteke u listu i kliknite Upload.","Filename":"Ime datoteke","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP greška.","Start Upload":"Pokreni upload.","mb":"mb","kb":"kb","Duplicate file error.":"Pogreška dvostruke datoteke.","File size error.":"Greška veličine datoteke.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Pogreška: Nevažeći nastavak datoteke:","Select files":"Odaberite datoteke:","%s already present in the queue.":"%s je već prisutan u listi čekanja.","File: %s":"Datoteka: %s","b":"b","Uploaded %d/%d files":"Uploadano %d/%d datoteka","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d datoteka na čekanju.","File: %s, size: %d, max file size: %d":"Datoteka: %s, veličina: %d, maksimalna veličina: %d","Drag files here.":"Dovucite datoteke ovdje","Runtime ran out of available memory.":"Runtime aplikaciji je ponestalo memorije.","File count error.":"Pogreška u broju datoteka.","File extension error.":"Pogreška u nastavku datoteke.","Error: File too large:":"Pogreška: Datoteka je prevelika:","Add Files":"Dodaj datoteke"}); -------------------------------------------------------------------------------- /examples/jquery/queue_widget.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Plupload - Queue widget example 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 |

Your browser doesn't have Flash, Silverlight or HTML5 support.

29 |
30 | 31 |
32 | 33 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /examples/custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Plupload - Custom example 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | 20 |

Custom example

21 | 22 |

Shows you how to use the core plupload API.

23 | 24 |
Your browser doesn't have Flash, Silverlight or HTML5 support.
25 |
26 | 27 |
28 | [Select files] 29 | [Upload files] 30 |
31 | 32 |
33 |

34 | 
35 | 
36 | 
84 | 
85 | 
86 | 


--------------------------------------------------------------------------------
/examples/jquery/jquery_ui_widget.html:
--------------------------------------------------------------------------------
  1 | 
  2 | 
  3 | 
  4 | 
  5 | 
  6 | Plupload - jQuery UI Widget
  7 | 
  8 | 
  9 | 
 10 | 
 11 | 
 12 | 
 13 | 
 14 | 
 15 | 
 16 | 
 17 | 
 18 | 
 23 | 
 24 | 
 25 | 
 26 | 
 27 | 

jQuery UI Widget

28 | 29 |

You can see this example with different themes on the www.plupload.com website.

30 | 31 |
32 |
33 |

Your browser doesn't have Flash, Silverlight or HTML5 support.

34 |
35 |
36 | 37 |
38 | 39 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /examples/upload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Plupload - Queue widget example 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 |
26 |

Queue widget example

27 | 28 |

Shows the jQuery Plupload Queue widget and under different runtimes.

29 | 30 |
31 |

Flash runtime

32 |
Your browser doesn't have Flash installed.
33 | 34 |

Silverlight runtime

35 |
Your browser doesn't have Silverlight installed.
36 |
37 | 38 |
39 |

HTML 4 runtime

40 |
Your browser doesn't have HTML 4 support.
41 | 42 |

HTML 5 runtime

43 |
Your browser doesn't support native upload.
44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /js/jquery.plupload.queue/css/jquery.plupload.queue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Plupload 3 | ------------------------------------------------------------------- */ 4 | 5 | .plupload_button { 6 | display: -moz-inline-box; /* FF < 3*/ 7 | display: inline-block; 8 | font: normal 12px sans-serif; 9 | text-decoration: none; 10 | color: #42454a; 11 | border: 1px solid #bababa; 12 | padding: 2px 8px 3px 20px; 13 | margin-right: 4px; 14 | background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center; 15 | outline: 0; 16 | 17 | /* Optional rounded corners for browsers that support it */ 18 | -moz-border-radius: 3px; 19 | -khtml-border-radius: 3px; 20 | -webkit-border-radius: 3px; 21 | border-radius: 3px; 22 | } 23 | 24 | .plupload_button:hover { 25 | color: #000; 26 | text-decoration: none; 27 | } 28 | 29 | .plupload_disabled, a.plupload_disabled:hover { 30 | color: #737373; 31 | border-color: #c5c5c5; 32 | background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center; 33 | cursor: default; 34 | } 35 | 36 | .plupload_add { 37 | background-position: -181px center; 38 | } 39 | 40 | .plupload_wrapper { 41 | font: normal 11px Verdana,sans-serif; 42 | width: 100%; 43 | } 44 | 45 | .plupload_container { 46 | padding: 8px; 47 | background: url('../img/transp50.png'); 48 | /*-moz-border-radius: 5px;*/ 49 | } 50 | 51 | .plupload_container input { 52 | border: 1px solid #DDD; 53 | font: normal 11px Verdana,sans-serif; 54 | width: 98%; 55 | } 56 | 57 | .plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;} 58 | .plupload_header_content { 59 | background: url('../img/backgrounds.gif') no-repeat 0 -317px; 60 | min-height: 56px; 61 | padding-left: 60px; 62 | color: #FFF; 63 | } 64 | .plupload_header_title { 65 | font: normal 18px sans-serif; 66 | padding: 6px 0 3px; 67 | } 68 | .plupload_header_text { 69 | font: normal 12px sans-serif; 70 | } 71 | 72 | .plupload_filelist { 73 | margin: 0; 74 | padding: 0; 75 | list-style: none; 76 | } 77 | 78 | .plupload_scroll .plupload_filelist { 79 | height: 185px; 80 | background: #F5F5F5; 81 | overflow-y: scroll; 82 | } 83 | 84 | .plupload_filelist li { 85 | padding: 10px 8px; 86 | background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px; 87 | border-bottom: 1px solid #DDD; 88 | } 89 | 90 | .plupload_filelist_header, .plupload_filelist_footer { 91 | background: #DFDFDF; 92 | padding: 8px 8px; 93 | color: #42454A; 94 | } 95 | .plupload_filelist_header { 96 | border-top: 1px solid #EEE; 97 | border-bottom: 1px solid #CDCDCD; 98 | } 99 | 100 | .plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;} 101 | .plupload_file_name {float: left; overflow: hidden} 102 | .plupload_file_status {color: #777;} 103 | .plupload_file_status span {color: #42454A;} 104 | .plupload_file_size, .plupload_file_status, .plupload_progress { 105 | float: right; 106 | width: 80px; 107 | } 108 | .plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;} 109 | 110 | .plupload_filelist .plupload_file_name {width: 205px} 111 | 112 | .plupload_file_action { 113 | float: right; 114 | width: 16px; 115 | height: 16px; 116 | margin-left: 15px; 117 | } 118 | 119 | .plupload_file_action * { 120 | display: none; 121 | width: 16px; 122 | height: 16px; 123 | } 124 | 125 | li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;} 126 | li.plupload_done {color:#AAA} 127 | 128 | li.plupload_delete a { 129 | background: url('../img/delete.gif'); 130 | } 131 | 132 | li.plupload_failed a { 133 | background: url('../img/error.gif'); 134 | cursor: default; 135 | } 136 | 137 | li.plupload_done a { 138 | background: url('../img/done.gif'); 139 | cursor: default; 140 | } 141 | 142 | .plupload_progress, .plupload_upload_status { 143 | display: none; 144 | } 145 | 146 | .plupload_progress_container { 147 | margin-top: 3px; 148 | border: 1px solid #CCC; 149 | background: #FFF; 150 | padding: 1px; 151 | } 152 | .plupload_progress_bar { 153 | width: 0px; 154 | height: 7px; 155 | background: #CDEB8B; 156 | } 157 | 158 | .plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { 159 | margin-right: 17px; 160 | } 161 | 162 | /* Floats */ 163 | 164 | .plupload_clear,.plupload_clearer {clear: both;} 165 | .plupload_clearer, .plupload_progress_bar { 166 | display: block; 167 | font-size: 0; 168 | line-height: 0; 169 | } 170 | 171 | li.plupload_droptext { 172 | background: transparent; 173 | text-align: center; 174 | vertical-align: middle; 175 | border: 0; 176 | line-height: 165px; 177 | } 178 | -------------------------------------------------------------------------------- /examples/jquery/s3.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | In our tests SilverLight didn't require anything special and worked with this configuration just fine. It may fail back 13 | to the same crossdomain.xml as last resort. 14 | 15 | !!!Important!!! Plupload UI Widget here, is used only for demo purposes and is not required for uploading to S3. 16 | */ 17 | 18 | // important variables that will be used throughout this example 19 | $bucket = 'BUCKET'; 20 | 21 | // these can be found on your Account page, under Security Credentials > Access Keys 22 | $accessKeyId = 'ACCESS_KEY_ID'; 23 | $secret = 'SECRET_ACCESS_KEY'; 24 | 25 | 26 | // hash_hmac — Generate a keyed hash value using the HMAC method 27 | // (PHP 5 >= 5.1.2, PECL hash >= 1.1) 28 | if (!function_exists('hash_hmac')) : 29 | // based on: http://www.php.net/manual/en/function.sha1.php#39492 30 | function hash_hmac($algo, $data, $key, $raw_output = false) 31 | { 32 | $blocksize = 64; 33 | if (strlen($key) > $blocksize) 34 | $key = pack('H*', $algo($key)); 35 | 36 | $key = str_pad($key, $blocksize, chr(0x00)); 37 | $ipad = str_repeat(chr(0x36), $blocksize); 38 | $opad = str_repeat(chr(0x5c), $blocksize); 39 | $hmac = pack('H*', $algo(($key^$opad) . pack('H*', $algo(($key^$ipad) . $data)))); 40 | 41 | return $raw_output ? $hmac : bin2hex($hmac); 42 | } 43 | endif; 44 | 45 | // prepare policy 46 | $policy = base64_encode(json_encode(array( 47 | // ISO 8601 - date('c'); generates uncompatible date, so better do it manually 48 | 'expiration' => date('Y-m-d\TH:i:s.000\Z', strtotime('+1 day')), 49 | 'conditions' => array( 50 | array('bucket' => $bucket), 51 | array('acl' => 'public-read'), 52 | array('starts-with', '$key', ''), 53 | // for demo purposes we are accepting only images 54 | array('starts-with', '$Content-Type', 'image/'), 55 | // "Some versions of the Adobe Flash Player do not properly handle HTTP responses that have an empty body. 56 | // To configure POST to return a response that does not have an empty body, set success_action_status to 201. 57 | // When set, Amazon S3 returns an XML document with a 201 status code." 58 | // http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html 59 | array('success_action_status' => '201'), 60 | // Plupload internally adds name field, so we need to mention it here 61 | array('starts-with', '$name', ''), 62 | // One more field to take into account: Filename - gets silently sent by FileReference.upload() in Flash 63 | // http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html 64 | array('starts-with', '$Filename', ''), 65 | ) 66 | ))); 67 | 68 | // sign policy 69 | $signature = base64_encode(hash_hmac('sha1', $policy, $secret, true)); 70 | 71 | ?> 72 | 73 | 74 | 75 | 76 | 77 | Plupload to Amazon S3 Example 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 96 | 97 | 98 | 99 | 100 |

Plupload to Amazon S3 Example

101 | 102 |
103 |

Your browser doesn't have Flash, Silverlight or HTML5 support.

104 |
105 | 106 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /js/jquery.plupload.queue/jquery.plupload.queue.min.js: -------------------------------------------------------------------------------- 1 | ;(function(e){function n(e){return plupload.translate(e)||e}function r(t,r){r.contents().each(function(t,n){n=e(n),n.is(".plupload")||n.remove()}),r.prepend('
'+'
'+'
'+'
'+'
'+n("Select files")+"
"+'
'+n("Add files to the upload queue and click the start button.")+"
"+"
"+"
"+'
'+'
'+'
'+n("Filename")+"
"+'
 
'+'
'+n("Status")+"
"+'
'+n("Size")+"
"+'
 
'+"
"+'
    '+'"+"
    "+"
    "+"
    "+''+"
    ")}var t={};e.fn.pluploadQueue=function(i){return i?(this.each(function(){function f(t){var n;t.status==plupload.DONE&&(n="plupload_done"),t.status==plupload.FAILED&&(n="plupload_failed"),t.status==plupload.QUEUED&&(n="plupload_delete"),t.status==plupload.UPLOADING&&(n="plupload_uploading");var r=e("#"+t.id).attr("class",n).find("a").css("display","block");t.hint&&r.attr("title",t.hint)}function l(){e("span.plupload_total_status",o).html(s.total.percent+"%"),e("div.plupload_progress_bar",o).css("width",s.total.percent+"%"),e("span.plupload_upload_status",o).html(n("Uploaded %d/%d files").replace(/%d\/%d/,s.total.uploaded+"/"+s.files.length))}function c(){var t=e("ul.plupload_filelist",o).html(""),r=0,i;e.each(s.files,function(n,o){i="",o.status==plupload.DONE&&(o.target_name&&(i+=''),i+='',i+='',r++,e("#"+u+"_count").val(r)),t.append('
  • '+'
    '+o.name+"
    "+'
    '+'
    '+o.percent+"%
    "+'
    '+plupload.formatSize(o.size)+"
    "+'
     
    '+i+"
  • "),f(o),e("#"+o.id+".plupload_delete a").click(function(t){e("#"+o.id).remove(),s.removeFile(o),t.preventDefault()})}),e("span.plupload_total_file_size",o).html(plupload.formatSize(s.total.size)),s.total.queued===0?e("span.plupload_add_text",o).html(n("Add Files")):e("span.plupload_add_text",o).html(n("%d files queued").replace(/%d/,s.total.queued)),e("a.plupload_start",o).toggleClass("plupload_disabled",s.files.length==s.total.uploaded+s.total.failed),t[0].scrollTop=t[0].scrollHeight,l(),!s.files.length&&s.features.dragdrop&&s.settings.dragdrop&&e("#"+u+"_filelist").append('
  • '+n("Drag files here.")+"
  • ")}function h(){delete t[u],s.destroy(),o.html(a),s=o=a=null}var s,o,u,a;o=e(this),u=o.attr("id"),u||(u=plupload.guid(),o.attr("id",u)),a=o.html(),r(u,o),s=new plupload.Uploader(e.extend({dragdrop:!0,browse_button:u+"_browse",container:u},i)),t[u]=s,s.bind("UploadFile",function(t,n){e("#"+n.id).addClass("plupload_current_file")}),s.bind("Init",function(t,n){!i.unique_names&&i.rename&&o.on("click","#"+u+"_filelist div.plupload_file_name span",function(n){var r=e(n.target),i,s,o,u="";i=t.getFile(r.parents("li")[0].id),o=i.name,s=/^(.+)(\.[^.]+)$/.exec(o),s&&(o=s[1],u=s[2]),r.hide().after(''),r.next().val(o).focus().blur(function(){r.show().next().remove()}).keydown(function(t){var n=e(this);t.keyCode==13&&(t.preventDefault(),i.name=n.val()+u,r.html(i.name),n.blur())})}),t.settings.dragdrop&&(t.settings.drop_element=u+"_filelist"),e("#"+u+"_container").attr("title","Using runtime: "+n.runtime),e("a.plupload_start",o).click(function(t){e(this).hasClass("plupload_disabled")||s.start(),t.preventDefault()}),e("a.plupload_stop",o).click(function(e){e.preventDefault(),s.stop()}),e("a.plupload_start",o).addClass("plupload_disabled")}),s.bind("Error",function(t,r){var i=r.file,s;i&&(s=r.message,r.details&&(s+=" ("+r.details+")"),r.code==plupload.FILE_SIZE_ERROR&&alert(n("Error: File too large:")+" "+i.name),r.code==plupload.FILE_EXTENSION_ERROR&&alert(n("Error: Invalid file extension:")+" "+i.name),i.hint=s,e("#"+i.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",s)),r.code===plupload.INIT_ERROR&&setTimeout(function(){h()},1)}),s.bind("PostInit",function(t){t.settings.dragdrop&&t.features.dragdrop&&e("#"+u+"_filelist").append('
  • '+n("Drag files here.")+"
  • ")}),s.init(),s.bind("StateChanged",function(){s.state===plupload.STARTED?(e("li.plupload_delete a,div.plupload_buttons",o).hide(),e("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",o).css("display","block"),e("span.plupload_upload_status",o).html("Uploaded "+s.total.uploaded+"/"+s.files.length+" files"),i.multiple_queues&&e("span.plupload_total_status,span.plupload_total_file_size",o).show()):(c(),e("a.plupload_stop,div.plupload_progress",o).hide(),e("a.plupload_delete",o).css("display","block"),i.multiple_queues&&s.total.uploaded+s.total.failed==s.files.length&&(e(".plupload_buttons,.plupload_upload_status",o).css("display","inline"),e(".plupload_start",o).addClass("plupload_disabled"),e("span.plupload_total_status,span.plupload_total_file_size",o).hide()))}),s.bind("QueueChanged",c),s.bind("FileUploaded",function(e,t){f(t)}),s.bind("UploadProgress",function(t,n){e("#"+n.id+" div.plupload_file_status",o).html(n.percent+"%"),f(n),l()}),i.setup&&i.setup(s)}),this):t[e(this[0]).attr("id")]}})(jQuery); -------------------------------------------------------------------------------- /js/jquery.ui.plupload/css/jquery.ui.plupload.css: -------------------------------------------------------------------------------- 1 | /* 2 | Plupload 3 | ------------------------------------------------------------------- */ 4 | 5 | .plupload_button { 6 | cursor: pointer; 7 | outline: none; 8 | } 9 | 10 | .plupload_wrapper { 11 | font: normal 11px Verdana,sans-serif; 12 | width: 100%; 13 | min-width: 520px; 14 | } 15 | 16 | .plupload_container { 17 | _height: 300px; 18 | min-height: 300px; 19 | position: relative; 20 | } 21 | 22 | .plupload_filelist_footer {border-width: 1px 0 0 0} 23 | .plupload_file {border-width: 0 0 1px 0} 24 | .plupload_container .plupload_header {border-width: 0 0 1px 0; position: relative;} 25 | 26 | .plupload_delete .ui-icon, 27 | .plupload_done .ui-icon, 28 | .plupload_failed .ui-icon { 29 | cursor:pointer; 30 | } 31 | 32 | .plupload_header_content { 33 | height: 56px; 34 | padding: 0 160px 0 60px; 35 | position: relative; 36 | } 37 | 38 | .plupload_logo { 39 | width: 40px; 40 | height: 40px; 41 | background: url('../img/plupload.png') no-repeat 0 0; 42 | position: absolute; 43 | top: 8px; 44 | left: 8px; 45 | } 46 | 47 | .plupload_header_content_bw .plupload_logo { 48 | background-position: -40px 0; 49 | } 50 | 51 | .plupload_header_title { 52 | font: normal 18px sans-serif; 53 | padding: 6px 0 3px; 54 | } 55 | 56 | .plupload_header_text { 57 | font: normal 12px sans-serif; 58 | } 59 | 60 | .plupload_view_switch { 61 | position: absolute; 62 | right: 16px; 63 | bottom: 8px; 64 | margin: 0; 65 | display: none; 66 | } 67 | 68 | .plupload_view_switch .ui-button { 69 | margin-right: -0.31em; 70 | } 71 | 72 | .plupload_content { 73 | position: absolute; 74 | top: 87px; 75 | bottom: 44px; 76 | left: 0; 77 | right: 0; 78 | overflow-y: auto; 79 | width: 100%; 80 | } 81 | 82 | .plupload_filelist { 83 | border-collapse: collapse; 84 | border-left: none; 85 | border-right: none; 86 | margin: 0; 87 | padding: 0; 88 | width: 100%; 89 | -moz-user-select: none; 90 | -webkit-user-select: none; 91 | user-select: none; 92 | } 93 | 94 | .plupload_filelist_content { 95 | padding: 0; 96 | margin: 0; 97 | } 98 | 99 | .plupload_cell {padding: 8px 6px;} 100 | 101 | .plupload_file { 102 | list-style: none; 103 | display: block; 104 | position: relative; 105 | overflow: hidden; 106 | width: 100%; 107 | } 108 | 109 | .plupload_file_thumb { 110 | position: absolute; 111 | left: 6px; 112 | top: 6px; 113 | background: #eee url(../img/loading.gif) center no-repeat; 114 | } 115 | 116 | .plupload_file_thumb_loaded { 117 | background-image: none; 118 | } 119 | 120 | .plupload_file_name { 121 | overflow: hidden; 122 | text-overflow: ellipsis; 123 | white-space: nowrap; 124 | } 125 | 126 | .plupload_filelist_header { 127 | border-top: none; 128 | } 129 | 130 | .plupload_filelist_footer { 131 | position: absolute; 132 | bottom: 0; 133 | left: 0; 134 | right: 0; 135 | } 136 | 137 | .plupload_buttons { 138 | position: relative; 139 | } 140 | 141 | /* list view */ 142 | .plupload_view_list .plupload_file { 143 | border-left: none; 144 | border-right: none; 145 | border-top: none; 146 | height: 29px; 147 | } 148 | 149 | .plupload_view_list div.plupload_file_size, 150 | .plupload_view_list div.plupload_file_status, 151 | .plupload_view_list div.plupload_file_action { 152 | padding: 8px 6px; 153 | position: absolute; 154 | top: 0; 155 | right: 0; 156 | } 157 | 158 | .plupload_view_list div.plupload_file_name { 159 | margin-right: 156px; 160 | padding: 8px 6px; 161 | _width: 75%; 162 | } 163 | 164 | .plupload_view_list div.plupload_file_size { 165 | right: 28px; 166 | } 167 | 168 | .plupload_view_list div.plupload_file_status { 169 | right: 82px; 170 | } 171 | 172 | .plupload_view_list .plupload_file_rename { 173 | margin-left: -2px; 174 | } 175 | 176 | .plupload_view_list .plupload_file_size, 177 | .plupload_view_list .plupload_file_status, 178 | .plupload_filelist_footer .plupload_file_size, 179 | .plupload_filelist_footer .plupload_file_status { 180 | text-align: right; 181 | width: 52px; 182 | } 183 | 184 | .plupload_view_list .plupload_file_thumb, 185 | .plupload_view_list .plupload_file_dummy { 186 | top: -999px; 187 | } 188 | 189 | .plupload_view_list .plupload_file_progress { 190 | display: none; 191 | } 192 | 193 | 194 | /* thumbs view */ 195 | .plupload_view_thumbs .plupload_content { 196 | top: 57px; 197 | } 198 | 199 | .plupload_view_thumbs .plupload_filelist_header { 200 | display: none; 201 | } 202 | 203 | .plupload_view_thumbs .plupload_file { 204 | width: 100px; 205 | padding: 72px 6px 6px; 206 | margin: 10px; 207 | border: 1px solid #fff; 208 | float: left; 209 | } 210 | 211 | .plupload_view_thumbs .plupload_file_thumb, 212 | .plupload_view_thumbs .plupload_file_dummy { 213 | width: 100px; 214 | height: 60px; 215 | text-align: center; 216 | overflow: hidden; 217 | } 218 | 219 | .plupload_view_thumbs .plupload_file_dummy { 220 | font-size: 21px; 221 | font-weight: bold; 222 | text-transform: lowercase; 223 | overflow: hidden; 224 | line-height: 60px; 225 | border: none; 226 | } 227 | 228 | .plupload_view_thumbs div.plupload_file_action { 229 | position: absolute; 230 | top: 0; 231 | right: 0; 232 | } 233 | 234 | .plupload_view_thumbs div.plupload_file_name { 235 | padding: 0; 236 | font-weight: bold; 237 | } 238 | 239 | .plupload_view_thumbs .plupload_file_rename { 240 | padding: 1px 0; 241 | width: 100% !important; 242 | } 243 | 244 | .plupload_view_thumbs div.plupload_file_size { 245 | font-size: 0.8em; 246 | font-weight: normal; 247 | } 248 | 249 | .plupload_view_thumbs div.plupload_file_status { 250 | position: absolute; 251 | top: 67px; 252 | left: 6px; 253 | width: 100px; 254 | height: 3px; 255 | overflow: hidden; 256 | text-indent: -999px; 257 | } 258 | 259 | .plupload_view_thumbs div.plupload_file_progress { 260 | border: none; 261 | height: 100%; 262 | } 263 | 264 | .plupload .ui-sortable-helper, 265 | .plupload .ui-sortable .plupload_file { 266 | cursor:move; 267 | } 268 | 269 | .plupload_file_action {width: 16px;} 270 | .plupload_file_name { 271 | overflow: hidden; 272 | padding-left: 10px; 273 | } 274 | 275 | .plupload_file_rename { 276 | border: none; 277 | font: normal 11px Verdana, sans-serif; 278 | padding: 1px 2px; 279 | line-height: 11px; 280 | height: 11px; 281 | } 282 | 283 | .plupload_progress {width: 60px;} 284 | .plupload_progress_container {padding: 1px;} 285 | 286 | 287 | /* Floats */ 288 | 289 | .plupload_right {float: right;} 290 | .plupload_left {float: left;} 291 | .plupload_clear,.plupload_clearer {clear: both;} 292 | .plupload_clearer, .plupload_progress_bar { 293 | display: block; 294 | font-size: 0; 295 | line-height: 0; 296 | } 297 | .plupload_clearer {height: 0;} 298 | 299 | /* Misc */ 300 | .plupload_hidden {display: none;} 301 | 302 | .plupload_droptext { 303 | position: absolute; 304 | top: 0; 305 | left: 0; 306 | right: 0; 307 | bottom: 0; 308 | background: transparent; 309 | text-align: center; 310 | vertical-align: middle; 311 | border: 0; 312 | line-height: 160px; 313 | display: none; 314 | } 315 | 316 | .plupload_dropbox .plupload_droptext { 317 | display: block; 318 | } 319 | 320 | .plupload_buttons, .plupload_upload_status {float: left} 321 | 322 | .plupload_message { 323 | position: absolute; 324 | top: -1px; 325 | left: -1px; 326 | height: 100%; 327 | width: 100%; 328 | } 329 | 330 | .plupload_message p { 331 | padding:0.7em; 332 | margin:0; 333 | } 334 | 335 | .plupload_message strong { 336 | font-weight: bold; 337 | } 338 | 339 | plupload_message i { 340 | font-style: italic; 341 | } 342 | 343 | .plupload_message p span.ui-icon { 344 | float: left; 345 | margin-right: 0.3em; 346 | } 347 | 348 | .plupload_header_content .ui-state-error, 349 | .plupload_header_content .ui-state-highlight { 350 | border:none; 351 | } 352 | 353 | .plupload_message_close { 354 | position:absolute; 355 | top:5px; 356 | right:5px; 357 | cursor:pointer; 358 | } 359 | 360 | .plupload .ui-sortable-placeholder { 361 | height:35px; 362 | } 363 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Plupload 2 | 3 | Plupload is a cross-browser multi-runtime file uploading API. Basically, a set of tools that will help you to 4 | build a reliable and visually appealing file uploader in minutes. 5 | 6 | Historically, Plupload comes from a dark and hostile age of no HTML5, hence all the alternative fallbacks, 7 | like Flash, Silverlight and Java (still in development). It is meant to provide an API, that 8 | will work anywhere and in any case, in one way or another. While having very solid fallbacks, Plupload 9 | is built with the future of HTML5 in mind. 10 | 11 | ### Table of Contents 12 | * [Backstory](https://github.com/moxiecode/plupload/blob/master/readme.md#backstory) 13 | * [Structure](https://github.com/moxiecode/plupload/blob/master/readme.md#structure) 14 | * [File API and XHR L2 pollyfills](https://github.com/moxiecode/moxie/blob/master/README.md) 15 | * [Plupload API](https://github.com/moxiecode/plupload/wiki/API) 16 | * [UI Widget](https://github.com/moxiecode/plupload/wiki/UI.Plupload) 17 | * [Queue Widget](https://github.com/moxiecode/plupload/wiki/pluploadQueue) 18 | * [Demos](https://github.com/jayarjo/plupload-demos/blob/master/README.md) 19 | * [Building Instructions](https://github.com/moxiecode/plupload/blob/master/readme.md#build) 20 | * [Getting Started](https://github.com/moxiecode/plupload/wiki/Getting-Started) 21 | * [Plupload in Your Language](https://github.com/moxiecode/plupload/wiki/Plupload-in-Your-Language) 22 | * [File Filters](https://github.com/moxiecode/plupload/wiki/File-Filters) 23 | * [Image Resizing on Client-Side](https://github.com/moxiecode/plupload/wiki/Image-Resizing-on-Client-Side) 24 | * [Chunking](https://github.com/moxiecode/plupload/wiki/Chunking) 25 | * [Upload to Amazon S3](https://github.com/moxiecode/plupload/wiki/Upload-to-Amazon-S3) 26 | * [FAQ](https://github.com/moxiecode/plupload/wiki/Frequently-Asked-Questions) 27 | * [Support](https://github.com/moxiecode/plupload/blob/master/readme.md##support) 28 | * [Create a Fiddle](https://github.com/moxiecode/plupload/wiki/Create-a-Fiddle) 29 | * [Contributing](https://github.com/moxiecode/plupload/blob/master/readme.md#contribute) 30 | * [License](https://github.com/moxiecode/plupload/blob/master/readme.md#license) 31 | * [Contact Us](http://www.moxiecode.com/contact.php) 32 | 33 | 34 | ### Backstory 35 | 36 | Plupload started in a time when uploading a file in a responsive and customizable manner was a real pain. 37 | Internally, browsers only had the `input[type="file"]` element. It was ugly and clunky at the same time. 38 | One couldn't even change it's visuals, without hiding it and coding another one on top of it from scratch. 39 | And then there was no progress indication for the upload process... Sounds pretty crazy today. 40 | 41 | It was very logical for developers to look for alternatives and writing their own implementations, using 42 | Flash and Java, in order to somehow extend limited browser capabilities. And so did we, in our search for 43 | a reliable and flexible file uploader for 44 | our [TinyMCE](http://www.tinymce.com/index.php)'s 45 | [MCImageManager](http://www.tinymce.com/enterprise/mcimagemanager.php). 46 | 47 | Quickly enough though, Plupload grew big. It easily split into a standalone project. 48 | With major *version 2.0* it underwent another huge reconstruction, basically 49 | [from the ground up](http://blog.moxiecode.com/2012/11/28/first-public-beta-plupload-2/), 50 | as all the low-level runtime logic has been extracted into separate [File API](http://www.w3.org/TR/FileAPI/) 51 | and [XHR L2](http://www.w3.org/TR/XMLHttpRequest/) pollyfills (currently known under combined name of [mOxie](https://github.com/moxiecode/moxie)), 52 | giving Plupload a chance to evolve further. 53 | 54 | 55 | ### Structure 56 | 57 | Currently, Plupload may be considered as consisting of three parts: low-level pollyfills, 58 | Plupload API and Widgets (UI and Queue). Initially, Widgets were meant only to serve as examples 59 | of the API, but quickly formed into fully-functional API implementations that now come bundled with 60 | the Plupload API. This has been a source for multiple misconceptions about the API as Widgets were 61 | easily mistaken for the Plupload itself. They are only implementations, such as any of you can 62 | build by yourself out of the API. 63 | 64 | * [Low-level pollyfills (mOxie)](https://github.com/moxiecode/moxie) - have their own [code base](https://github.com/moxiecode/moxie) and [documentation](https://github.com/moxiecode/moxie/wiki) on GitHub. 65 | * [Plupload API](https://github.com/moxiecode/plupload/wiki/API) 66 | * [UI Widget](https://github.com/moxiecode/plupload/wiki/UI.Plupload) 67 | * [Queue Widget](https://github.com/moxiecode/plupload/wiki/pluploadQueue) 68 | 69 | 70 | ### Building instructions 71 | 72 | Plupload depends on File API and XHR2 L2 pollyfills that currently have their 73 | [own repository](https://github.com/moxiecode/moxie) on GitHub. However, in most cases you shouldn't 74 | care as we bundled the latest build of mOxie, including full and minified JavaScript source and 75 | pre-compiled `SWF` and `XAP` components, with the repository here. You can find everything you may 76 | need under `js/` folder. 77 | 78 | There are cases where you might need a custom build, for example free of unnecessary runtimes, half the 79 | original size, etc. The difficult part of this task comes from mOxie and its set of additional runtimes 80 | that require special tools on your workstation in order to compile. 81 | Consider [build instructions for mOxie](https://github.com/moxiecode/moxie#build-instructions) - 82 | everything applies to Plupload as well. 83 | 84 | First of all, if you want to build custom Plupload packages you will require [Node.js](http://nodejs.org/), 85 | as this is our build environment of choice. Node.js binaries (as well as Source) 86 | [are available](http://nodejs.org/download/) for all major operating systems. 87 | 88 | Plupload includes _mOxie_ as a submodule, it also depends on some other repositories for building up it's dev 89 | environment - to avoid necessity of downloading them one by one, we recommended you to simply clone Plupload 90 | with [git](http://git-scm.com/) recursively (you will require git installed on your system for this operation 91 | to succeed): 92 | 93 | ``` 94 | git clone --recursive https://github.com/moxiecode/plupload.git 95 | ``` 96 | 97 | And finalize the preparation stage with: `npm install` - this will install all additional modules, including those 98 | required by dev and test environments. In case you would rather keep it minimal, add a `--production` flag. 99 | 100 | *Note:* Currently, for an unknown reason, locally installed Node.js modules on Windows, may not be automatically 101 | added to the system PATH. So, if `jake` commands below are not recognized you will need to add them manually: 102 | 103 | ``` 104 | set PATH=%PATH%;%CD%\node_modules\.bin\ 105 | ``` 106 | 107 | 108 | ### Support 109 | 110 | We are actively standing behind the Plupload and now that we are done with major rewrites and refactoring, 111 | the only real goal that we have ahead is making it as reliable and bulletproof as possible. We are open to 112 | all the suggestions and feature requests. We ask you to file bug reports if you encounter any. We may not 113 | react to them instantly, but we constantly bear them in my mind as we extend the code base. 114 | 115 | In addition to dedicated support for those who dare to buy our OEM licenses, we got 116 | [discussion boards](http://www.plupload.com/punbb/index.php), which is like an enormous FAQ, 117 | covering every possible application case. Of course, you are welcome to file a bug report or feature request, 118 | here on [GitHub](https://github.com/moxiecode/plupload/issues). 119 | 120 | Sometimes it is easier to notice the problem when bug report is accompained by the actual code. Consider providing 121 | [a Plupload fiddle](https://github.com/moxiecode/plupload/wiki/Create-a-Fiddle) for the troublesome code. 122 | 123 | 124 | ### Contributing 125 | 126 | We are open to suggestions and code revisions, however there are some rules and limitations that you might 127 | want to consider first. 128 | 129 | * Code that you contribute will automatically be licensed under the LGPL, but will not be limited to LGPL. 130 | * Although all contributors will get the credit for their work, copyright notices will be changed to [Moxiecode Systems AB](http://www.moxiecode.com/). 131 | * Third party code will be reviewed, tested and possibly modified before being released. 132 | 133 | These basic rules help us earn a living and ensure that code remains Open Source and compatible with LGPL license. All contributions will be added to the changelog and appear in every release and on the site. 134 | 135 | An easy place to start is to [translate Plupload to your language](https://github.com/moxiecode/plupload/wiki/Plupload-in-Your-Language#contribute). 136 | 137 | You can read more about how to contribute at: [http://www.plupload.com/contributing](http://www.plupload.com/contributing) 138 | 139 | 140 | ### License 141 | 142 | Copyright 2013, [Moxiecode Systems AB](http://www.moxiecode.com/) 143 | Released under [GPLv2 License](https://github.com/moxiecode/plupload/blob/master/license.txt). 144 | 145 | We also provide [commercial license](http://www.plupload.com/commercial.php). 146 | -------------------------------------------------------------------------------- /js/plupload.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Plupload - multi-runtime File Uploader 3 | * v2.0.0beta 4 | * 5 | * Copyright 2013, Moxiecode Systems AB 6 | * Released under GPL License. 7 | * 8 | * License: http://www.plupload.com/license 9 | * Contributing: http://www.plupload.com/contributing 10 | * 11 | * Date: 2012-11-30 12 | */ 13 | ;(function(e,t,n){function s(e){function r(e,t,r){var i={chunks:"slice_blob",resize:"send_binary_string",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",max_file_size:"access_binary",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};i[e]?n[i[e]]=t:r||(n[e]=t)}var t=e.required_features,n={};return typeof t=="string"?o.each(t.split(/\s*,\s*/),function(e){r(e,!0)}):typeof t=="object"?o.each(t,function(e,t){r(t,e)}):t===!0&&(e.multipart||(n.send_binary_string=!0),e.chunk_size>0&&(n.slice_blob=!0),o.each(e,function(e,t){r(t,!!e,!0)})),n}var r=e.setTimeout,i={},o={VERSION:"2.0.0beta",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(t=0;t0?"&":"?")+n),e},formatSize:function(e){return e===n||/\D/.test(e)?o.translate("N/A"):e>1099511627776?Math.round(e/1099511627776,1)+" "+o.translate("tb"):e>1073741824?Math.round(e/1073741824,1)+" "+o.translate("gb"):e>1048576?Math.round(e/1048576,1)+" "+o.translate("mb"):e>1024?Math.round(e/1024,1)+" "+o.translate("kb"):e+" "+o.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,t){var n,r;return t&&(e.runtimes=t),n=new o.Uploader(e),r=n.runtime,n.destroy(),r},addFileFilter:function(e,t){i[e]=t}};o.addFileFilter("mime_types",function(){function n(e){var t=[];return o.each(e,function(e){o.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}var e,t;return function(r,i,s){if(!t||r!=e)t=n(r),e=[].slice.call(r);t.test(i.name)?s(!0):(this.trigger("Error",{code:o.FILE_EXTENSION_ERROR,message:o.translate("File extension error."),file:i}),s(!1))}}()),o.addFileFilter("max_file_size",function(e,t,n){var r;t.size!==r&&e&&t.size>e?(this.trigger("Error",{code:o.FILE_SIZE_ERROR,message:o.translate("File size error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("prevent_duplicates",function(e,t,n){if(e){var r=this.files.length;while(r--)if(t.name===this.files[r].name&&t.size===this.files[r].size){this.trigger("Error",{code:o.FILE_DUPLICATE_ERROR,message:o.translate("Duplicate file error."),file:t}),n(!1);return}}n(!0)}),o.Uploader=function(e){function m(){var e,t=0,n;if(this.state==o.STARTED){for(n=0;n0?Math.ceil(e.loaded/e.size*100):100,y()}function y(){var e,t;c.reset();for(e=0;e0?Math.ceil(c.uploaded/u.length*100):0:(c.bytesPerSec=Math.ceil(c.loaded/((+(new Date)-l||1)/1e3)),c.percent=c.size>0?Math.ceil(c.loaded/c.size*100):0)}function b(){var n=this,r=0,i={accept:e.filters.mime_types,runtime_order:e.runtimes,required_caps:f,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};o.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(i[t]=e[t])}),t.inSeries([function(s){e.browse_button?(p=new t.FileInput(o.extend({},i,{name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:e.browse_button})),p.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(n.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),r++,s()},p.onchange=function(){n.addFile(this.files)},p.bind("mouseenter mouseleave mousedown mouseup",function(n){if(!h){var r=t.get(e.browse_button);r&&(e.browse_button_hover&&("mouseenter"===n.type?t.addClass(r,e.browse_button_hover):"mouseleave"===n.type&&t.removeClass(r,e.browse_button_hover)),e.browse_button_active&&("mousedown"===n.type?t.addClass(r,e.browse_button_active):"mouseup"===n.type&&t.removeClass(r,e.browse_button_active)),r=null)}}),p.bind("error runtimeerror",function(){p=null,s()}),p.init()):s()},function(s){e.drop_element?(d=new t.FileDrop(o.extend({},i,{drop_zone:e.drop_element})),d.onready=function(){var e=t.Runtime.getInfo(this.ruid);n.features.dragdrop=e.can("drag_and_drop"),r++,s()},d.ondrop=function(){n.addFile(this.files)},d.bind("error runtimeerror",function(){d=null,s()}),d.init()):s()}],function(){typeof e.init=="function"?e.init(n):o.each(e.init,function(e,t){n.bind(t,e)}),r?n.trigger("PostInit"):n.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})})}function w(e,n){if(e.ruid){var r=t.Runtime.getInfo(e.ruid);if(r)return r.can(n)}return!1}function E(e,n,r){var i=new t.Image;try{i.onload=function(){i.downsize(n.width,n.height,n.crop,n.preserve_headers)},i.onresize=function(){r(this.getAsBlob(e.type,n.quality)),this.destroy()},i.onerror=function(){r(e)},i.load(e)}catch(s){r(e)}}var u=[],a={},f={},l,c,h=!1,p,d,v;c=new o.QueueProgress,e=o.extend({runtimes:t.Runtime.order,max_retries:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",send_chunk_number:!0},e),e.resize&&(e.resize=o.extend({preserve_headers:!0,crop:!1},e.resize)),e.chunk_size=o.parseSize(e.chunk_size)||0,o.typeOf(e.filters)==="array"&&(e.filters={mime_types:e.filters}),e.filters=o.extend({mime_types:[],prevent_duplicates:!!e.prevent_duplicates,max_file_size:o.parseSize(e.max_file_size)||0},e.filters),e.required_features=f=s(o.extend({},e)),o.extend(this,{id:o.guid(),state:o.STOPPED,features:{},runtime:t.Runtime.thatCan(f,e.runtimes),files:u,settings:e,total:c,init:function(){var n=this;e.browse_button=t.get(e.browse_button),e.drop_element=t.get(e.drop_element),typeof e.preinit=="function"?e.preinit(n):o.each(e.preinit,function(e,t){n.bind(t,e)});if(!e.browse_button||!e.url){this.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")});return}n.bind("FilesAdded",function(e,t){[].push.apply(u,t),r(function(){n.trigger("QueueChanged"),n.refresh()},1)}),n.bind("CancelUpload",function(){v&&v.abort()}),e.unique_names&&n.bind("BeforeUpload",function(e,t){var n=t.name.match(/\.([^.]+)$/),r="part";n&&(r=n[1]),t.target_name=t.id+"."+r}),n.bind("UploadFile",function(n,i){function p(){l-->0?r(d,1):(i.loaded=h,n.trigger("Error",{code:o.HTTP_ERROR,message:o.translate("HTTP Error."),file:i,response:v.responseText,status:v.status,responseHeaders:v.getAllResponseHeaders()}))}function d(){var l,m,g,y;if(i.status==o.DONE||i.status==o.FAILED||n.state==o.STOPPED)return;g={name:i.target_name||i.name},a&&u.chunks&&c.size>a?(y=Math.min(a,c.size-h),l=c.slice(h,h+y)):(y=c.size,l=c),a&&u.chunks&&(e.send_chunk_number?(g.chunk=Math.ceil(h/a),g.chunks=Math.ceil(c.size/a)):(g.offset=h,g.total=c.size)),v=new t.XMLHttpRequest,v.upload&&(v.upload.onprogress=function(e){i.loaded=Math.min(i.size,h+e.loaded),n.trigger("UploadProgress",i)}),v.onload=function(){if(v.status>=400){p();return}y=c.size?(i.size!=i.origSize&&(c.destroy(),c=null),n.trigger("UploadProgress",i),i.status=o.DONE,n.trigger("FileUploaded",i,{response:v.responseText,status:v.status,responseHeaders:v.getAllResponseHeaders()})):r(d,1)},v.onerror=function(){p()},v.onloadend=function(){this.destroy(),v=null},n.settings.multipart&&u.multipart?(g.name=i.target_name||i.name,v.open("post",s,!0),o.each(n.settings.headers,function(e,t){v.setRequestHeader(t,e)}),m=new t.FormData,o.each(o.extend(g,n.settings.multipart_params),function(e,t){m.append(t,e)}),m.append(n.settings.file_data_name,l),v.send(m,{runtime_order:n.settings.runtimes,required_caps:f,swf_url:n.settings.flash_swf_url,xap_url:n.settings.silverlight_xap_url})):(s=o.buildUrl(n.settings.url,o.extend(g,n.settings.multipart_params)),v.open("post",s,!0),v.setRequestHeader("Content-Type","application/octet-stream"),o.each(n.settings.headers,function(e,t){v.setRequestHeader(t,e)}),v.send(l,{runtime_order:n.settings.runtimes,required_caps:f,swf_url:n.settings.flash_swf_url,xap_url:n.settings.silverlight_xap_url}))}var s=n.settings.url,u=n.features,a=e.chunk_size,l=e.max_retries,c,h=0;i.loaded&&(h=i.loaded=a*Math.floor(i.loaded/a)),c=i.getSource(),!t.isEmptyObj(n.settings.resize)&&w(c,"send_binary_string")&&!!~t.inArray(c.type,["image/jpeg","image/png"])?E.call(this,c,n.settings.resize,function(e){c=e,i.size=e.size,d()}):d()}),n.bind("UploadProgress",function(e,t){g(t)}),n.bind("StateChanged",function(e){if(e.state==o.STARTED)l=+(new Date);else if(e.state==o.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==o.UPLOADING&&(e.files[t].status=o.QUEUED,y())}),n.bind("QueueChanged",y),n.bind("Error",function(e,t){t.file&&(t.file.status=o.FAILED,g(t.file),e.state==o.STARTED&&r(function(){m.call(n)},1))}),n.bind("FileUploaded",function(){y(),r(function(){m.call(n)},1)}),n.trigger("Init",{runtime:this.runtime}),b.call(this)},refresh:function(){p&&p.trigger("Refresh"),this.trigger("Refresh")},start:function(){this.state!=o.STARTED&&(this.state=o.STARTED,this.trigger("StateChanged"),m.call(this))},stop:function(){this.state!=o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){h=arguments[0]!==n?arguments[0]:!0,p&&p.disable(h),this.trigger("DisableBrowse",h)},getFile:function(e){var t;for(t=u.length-1;t>=0;t--)if(u[t].id===e)return u[t]},addFile:function(e,n){function f(){var e=d||p;return e?e.getRuntime().uid:!1}function l(e,n){var s=[];t.each(r.settings.filters,function(t,n){i[n]&&s.push(function(s){i[n].call(r,t,e,function(e){s(!e)})})}),t.inSeries(s,n)}function c(e){var r=t.typeOf(e);if(e instanceof t.File){if(!e.ruid){if(!a)return!1;e.ruid=a,e.connectRuntime(a)}c(new o.File(e))}else e instanceof t.Blob?(c(e.getSource()),e.destroy()):e instanceof o.File?(n&&(e.name=n),s.push(function(t){l(e,function(n){n||u.push(e),t()})})):t.inArray(r,["file","blob"])!==-1?c(new t.File(null,e)):r==="node"&&t.typeOf(e.files)==="filelist"?t.each(e.files,c):r==="array"&&(n=null,t.each(e,c))}var r=this,s=[],u=[],a;a=f(),c(e),s.length&&t.inSeries(s,function(){u.length&&r.trigger("FilesAdded",u)})},removeFile:function(e){var t=typeof e=="string"?e:e.id;for(var n=u.length-1;n>=0;n--)if(u[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var r=u.splice(e===n?0:e,t===n?u.length:t);return this.trigger("FilesRemoved",r),this.trigger("QueueChanged"),o.each(r,function(e){e.destroy()}),r},trigger:function(e){var t=a[e.toLowerCase()],n,r;if(t){r=Array.prototype.slice.call(arguments),r[0]=this;for(n=0;n=0;r--)if(t[r].func===i){t.splice(r,1);break}}else t=[];t.length||delete a[e]}},unbindAll:function(){var e=this;o.each(a,function(t,n){e.unbind(n)})},destroy:function(){this.stop(),o.each(u,function(e){e.destroy()}),u=[],p&&(p.destroy(),p=null),d&&(d.destroy(),d=null),f={},l=c=h=v=null,this.trigger("Destroy"),this.unbindAll(),a={}}})},o.File=function(){function n(n){o.extend(this,{id:o.guid(),name:n.name||n.fileName,type:n.type||"",size:n.size||n.fileSize,origSize:n.size||n.fileSize,loaded:0,percent:0,status:o.QUEUED,lastModifiedDate:n.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return t.inArray(t.typeOf(e),["blob","file"])!==-1?e:null},getSource:function(){return e[this.id]?e[this.id]:null},destroy:function(){var t=this.getSource();t&&(t.destroy(),delete e[this.id])}}),e[this.id]=n}var e={};return n}(),o.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=o})(window,mOxie); -------------------------------------------------------------------------------- /js/jquery.ui.plupload/jquery.ui.plupload.min.js: -------------------------------------------------------------------------------- 1 | ;(function(e,t,n,r){function s(e){return n.translate(e)||e}function u(e){e.id=e.attr("id"),e.html('
    '+s("Select files")+"
    "+'
    '+s("Add files to the upload queue and click the start button.")+"
    "+'
    '+' "+' "+"
    "+"
    "+"
    "+''+""+'"+'"+'"+''+""+"
    '+s("Filename")+"'+s("Status")+"'+s("Size")+" 
    "+'
    '+'
    '+s("Drag files here.")+"
    "+'
    '+'
     
    '+"
    "+''+""+'"+''+''+''+""+""+"
    "+''+"
    ")}var i={};r.widget("ui.plupload",{widgetEventPrefix:"",imgs:{},contents_bak:"",options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:!0,multiple_queues:!0,buttons:{browse:!0,start:!0,stop:!0},views:{list:!0,thumbs:!1,active:"list",remember:!0},autostart:!1,sortable:!1,rename:!1,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var e=this.element.attr("id");e||(e=n.guid(),this.element.attr("id",e)),this.id=e,this.contents_bak=this.element.html(),u(this.element),this.container=r(".plupload_container",this.element).attr("id",e+"_container"),this.content=r(".plupload_content",this.element),r.fn.resizable&&this.container.resizable({handles:"s",minHeight:300}),this.filelist=r(".plupload_filelist_content",this.container).attr({id:e+"_filelist",unselectable:"on"}),this.browse_button=r(".plupload_add",this.container).attr("id",e+"_browse"),this.start_button=r(".plupload_start",this.container).attr("id",e+"_start"),this.stop_button=r(".plupload_stop",this.container).attr("id",e+"_stop"),this.thumbs_switcher=r("#"+e+"_view_thumbs"),this.list_switcher=r("#"+e+"_view_list"),r.ui.button&&(this.browse_button.button({icons:{primary:"ui-icon-circle-plus"},disabled:!0}),this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:!0}),this.stop_button.button({icons:{primary:"ui-icon-circle-close"}}),this.list_switcher.button({text:!1,icons:{secondary:"ui-icon-grip-dotted-horizontal"}}),this.thumbs_switcher.button({text:!1,icons:{secondary:"ui-icon-image"}})),this.progressbar=r(".plupload_progress_container",this.container),r.ui.progressbar&&this.progressbar.progressbar(),this.counter=r(".plupload_count",this.element).attr({id:e+"_count",name:e+"_count"}),this._initUploader()},_initUploader:function(){var e=this,t=this.id,u,a={container:t+"_buttons",browse_button:t+"_browse"};r(".plupload_buttons",this.element).attr("id",t+"_buttons"),e.options.dragdrop&&(this.filelist.parent().attr("id",this.id+"_dropbox"),a.drop_element=this.id+"_dropbox"),e.options.views.thumbs&&(o.typeOf(e.options.required_features)==="string"?e.options.required_features+=",display_media":e.options.required_features="display_media"),u=this.uploader=i[t]=new n.Uploader(r.extend(this.options,a)),u.bind("Error",function(t,r){var i,u="";i=""+r.message+"";switch(r.code){case n.FILE_EXTENSION_ERROR:u=o.sprintf(s("File: %s"),r.file.name);break;case n.FILE_SIZE_ERROR:u=o.sprintf(s("File: %f, size: %s, max file size: %m"),r.file.name,r.file.size,n.parseSize(e.options.max_file_size));break;case n.FILE_DUPLICATE_ERROR:u=o.sprintf(s("%s already present in the queue."),r.file.name);break;case e.FILE_COUNT_ERROR:u=o.sprintf(s("Upload element accepts only %d file(s) at a time. Extra files were stripped."),e.options.max_file_count);break;case n.IMAGE_FORMAT_ERROR:u=s("Image format either wrong or not supported.");break;case n.IMAGE_MEMORY_ERROR:u=s("Runtime ran out of available memory.");break;case n.HTTP_ERROR:u=s("Upload URL might be wrong or doesn't exist.")}i+="
    "+u+"",e._trigger("error",null,{up:t,error:r}),r.code===n.INIT_ERROR?setTimeout(function(){e.destroy()},1):e.notify("error",i)}),u.bind("PostInit",function(t){e.options.buttons.browse?e.browse_button.button("enable"):(e.browse_button.button("disable").hide(),t.disableBrowse(!0)),e.options.buttons.start||e.start_button.button("disable").hide(),e.options.buttons.stop||e.stop_button.button("disable").hide(),!e.options.unique_names&&e.options.rename&&e._enableRenaming(),e.options.dragdrop&&t.features.dragdrop&&e.filelist.parent().addClass("plupload_dropbox"),e._enableViewSwitcher(),e.start_button.click(function(t){r(this).button("option","disabled")||e.start(),t.preventDefault()}),e.stop_button.click(function(t){e.stop(),t.preventDefault()}),e._trigger("ready",null,{up:t})}),e.options.max_file_count&&(e.options.multiple_queues=!1,u.bind("FilesAdded",function(t,n){var r=n.length,i=t.files.length+r-e.options.max_file_count;i>0&&(n.splice(r-i,i),t.trigger("Error",{code:e.FILE_COUNT_ERROR,message:s("File count error.")}))})),u.init(),u.bind("FilesAdded",function(t,n){e._addFiles(n),e._trigger("selected",null,{up:t,files:n}),e.options.autostart&&setTimeout(function(){e.start()},10)}),u.bind("FilesRemoved",function(t,n){e._trigger("removed",null,{up:t,files:n})}),u.bind("QueueChanged",function(){e._handleState(),e._updateTotalProgress()}),u.bind("StateChanged",function(){e._handleState()}),u.bind("UploadFile",function(t,n){e._handleFileStatus(n)}),u.bind("FileUploaded",function(t,n){e._handleFileStatus(n),e._trigger("uploaded",null,{up:t,file:n})}),u.bind("UploadProgress",function(t,n){e._handleFileStatus(n),e._updateTotalProgress(),e._trigger("progress",null,{up:t,file:n})}),u.bind("UploadComplete",function(t,n){e._addFormFields(),e._trigger("complete",null,{up:t,files:n})})},_setOption:function(e,t){var n=this;e=="buttons"&&typeof t=="object"&&(t=r.extend(n.options.buttons,t),t.browse?(n.browse_button.button("enable").show(),n.uploader.disableBrowse(!1)):(n.browse_button.button("disable").hide(),n.uploader.disableBrowse(!0)),t.start?n.start_button.button("enable").show():n.start_button.button("disable").hide(),t.stop?n.start_button.button("enable").show():n.stop_button.button("disable").hide()),n.uploader.settings[e]=t},start:function(){this.uploader.start(),this._trigger("start",null,{up:this.uploader})},stop:function(){this.uploader.stop(),this._trigger("stop",null,{up:this.uploader})},enable:function(){this.browse_button.button("enable"),this.uploader.disableBrowse(!1)},disable:function(){this.browse_button.button("disable"),this.uploader.disableBrowse(!0)},getFile:function(e){var t;return typeof e=="number"?t=this.uploader.files[e]:t=this.uploader.getFile(e),t},getFiles:function(){return this.uploader.files},removeFile:function(e){n.typeOf(e)==="string"&&(e=this.getFile(e)),this._removeFiles(e)},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},notify:function(e,t){var n=r('
    '+'

    '+t+"

    "+"
    ");n.addClass("ui-state-"+(e==="error"?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+(e==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){n.remove()}).end(),r(".plupload_header",this.container).append(n)},destroy:function(){this._removeFiles([].slice.call(this.uploader.files)),this.uploader.destroy(),r(".plupload_button",this.element).unbind(),r.ui.button&&r(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy"),r.ui.progressbar&&this.progressbar.progressbar("destroy"),r.ui.sortable&&this.options.sortable&&r("tbody",this.filelist).sortable("destroy"),this.element.empty().html(this.contents_bak),this.contents_bak="",r.Widget.prototype.destroy.apply(this)},_handleState:function(){var e=this.uploader;e.state===n.STARTED?(r(this.start_button).button("disable"),r([]).add(this.stop_button).add(".plupload_started").removeClass("plupload_hidden"),r(".plupload_upload_status",this.element).html(o.sprintf(s("Uploaded %d/%d files"),e.total.uploaded,e.files.length)),r(".plupload_header_content",this.element).addClass("plupload_header_content_bw")):e.state===n.STOPPED&&(r([]).add(this.stop_button).add(".plupload_started").addClass("plupload_hidden"),this.options.multiple_queues?r(".plupload_header_content",this.element).removeClass("plupload_header_content_bw"):(r([]).add(this.browse_button).add(this.start_button).button("disable"),e.disableBrowse()),e.files.length===e.total.uploaded+e.total.failed?this.start_button.button("disable"):this.start_button.button("enable"),this._updateTotalProgress()),e.total.queued===0?r(".ui-button-text",this.browse_button).html(s("Add Files")):r(".ui-button-text",this.browse_button).html(o.sprintf(s("%d files queued"),e.total.queued)),e.refresh()},_handleFileStatus:function(e){var t=this,i,s;if(!r("#"+e.id).length)return;switch(e.status){case n.DONE:i="plupload_done",s="ui-icon ui-icon-circle-check";break;case n.FAILED:i="ui-state-error plupload_failed",s="ui-icon ui-icon-alert";break;case n.QUEUED:i="plupload_delete",s="ui-icon ui-icon-circle-minus";break;case n.UPLOADING:i="ui-state-highlight plupload_uploading",s="ui-icon ui-icon-circle-arrow-w";var o=r(".plupload_scroll",this.container),u=o.scrollTop(),a=o.height(),f=r("#"+e.id).position().top+r("#"+e.id).height();a
    %name%
    %size%
    ',n.typeOf(e)!=="array"&&(e=[e]),r.ui.sortable&&this.options.sortable&&r("tbody",t.filelist).sortable("destroy"),r.each(e,function(e,u){t.filelist.append(i.replace(/%(\w+)%/g,function(e,t){return"size"===t?n.formatSize(u.size):u[t]||""})),t.options.views.thumbs&&s.push(function(e){var n=new o.Image;n.onload=function(){this.embed(r("#"+u.id+" .plupload_file_thumb",t.filelist)[0],{width:100,height:60,crop:!0,swf_url:mOxie.resolveUrl(t.options.flash_swf_url),xap_url:mOxie.resolveUrl(t.options.silverlight_xap_url)})},n.onembedded=function(){r("#"+u.id+" .plupload_file_thumb",t.filelist).addClass("plupload_file_thumb_loaded"),this.destroy(),setTimeout(e,1)},n.onerror=function(){var n=u.name.match(/\.([^\.]{1,7})$/);r("#"+u.id+" .plupload_file_thumb",t.filelist).html('
    '+(n?n[1]:"none")+"
    "),this.destroy(),setTimeout(e,1)},n.load(u.getSource())}),t._handleFileStatus(u)}),s.length&&o.inSeries(s),this.options.sortable&&r.ui.sortable&&this._enableSortingList(),this._trigger("updatelist",null,{filelist:this.filelist})},_removeFiles:function(e){var t=this,i=this.uploader;n.typeOf(e)!=="array"&&(e=[e]),r.ui.sortable&&this.options.sortable&&r("tbody",t.filelist).sortable("destroy"),r.each(e,function(e,t){t.imgs&&t.imgs.length&&(r.each(t.imgs,function(e,t){t.destroy()}),t.imgs=[]),r("#"+t.id).remove(),i.removeFile(t)}),i.files.length&&this.options.sortable&&r.ui.sortable&&this._enableSortingList(),this._trigger("updatelist",null,{filelist:this.filelist})},_addFormFields:function(){var e=this;r(".plupload_file_fields",this.filelist).html(""),n.each(this.uploader.files,function(t,i){var s="",o=e.id+"_"+i;t.target_name&&(s+=''),s+='',s+='',r("#"+t.id).find(".plupload_file_fields").html(s)}),this.counter.val(this.uploader.files.length)},_viewChanged:function(e){this.options.views.remember&&r.cookie&&r.cookie("plupload_ui_view",e,{expires:7,path:"/"}),mOxie.Env.browser==="IE"&&mOxie.Env.version<7&&this.content.attr("style",'height:expression(document.getElementById("'+this.id+"_container"+'").clientHeight - '+(e==="list"?133:103)+");"),this.container.removeClass("plupload_view_list plupload_view_thumbs").addClass("plupload_view_"+e),this.view_mode=e,this._trigger("viewchanged",null,{view:e})},_enableViewSwitcher:function(){var e=this,t,i=r(".plupload_view_switch",this.container),s,o;n.each(["list","thumbs"],function(t){e.options.views[t]||i.find('[for="'+e.id+"_view_"+t+'"], #'+e.id+"_view_"+t).remove()}),s=i.find(".plupload_button"),s.length===1?(i.hide(),t=s.eq(0).data("view"),this._viewChanged(t)):r.ui.button&&s.length>1?(this.options.views.remember&&r.cookie&&(t=r.cookie("plupload_ui_view")),~n.inArray(t,["list","thumbs"])||(t=this.options.views.active),i.show().buttonset().find(".ui-button").click(function(n){t=r(this).data("view"),e._viewChanged(t),n.preventDefault()}),o=i.find('[for="'+e.id+"_view_"+t+'"]'),o.length&&o.trigger("click")):(i.show(),this._viewChanged(this.options.views.active))},_enableRenaming:function(){var e=this;this.filelist.dblclick(function(t){var n=r(t.target),i,s,o,u,a="";if(!n.hasClass("plupload_file_namespan"))return;s=e.uploader.getFile(n.closest(".plupload_file")[0].id),u=s.name,o=/^(.+)(\.[^.]+)$/.exec(u),o&&(u=o[1],a=o[2]),i=r('').width(n.width()).insertAfter(n.hide()),i.val(u).blur(function(){n.show().parent().scrollLeft(0).end().next().remove()}).keydown(function(e){var t=r(this);r.inArray(e.keyCode,[13,27])!==-1&&(e.preventDefault(),e.keyCode===13&&(s.name=t.val()+a,n.html(s.name)),t.blur())})[0].focus()})},_enableSortingList:function(){var e=this,t=r(".plupload_filelist_content",this.element);if(r(".plupload_file",t).length<2)return;t.sortable({items:".plupload_delete",cancel:"object, .plupload_clearer",stop:function(){var t=[];r.each(r(this).sortable("toArray"),function(n,r){t[t.length]=e.uploader.getFile(r)}),t.unshift(t.length),t.unshift(0),Array.prototype.splice.apply(e.uploader.files,t)}})}})})(window,document,plupload,jQuery); -------------------------------------------------------------------------------- /js/jquery.plupload.queue/jquery.plupload.queue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jquery.plupload.queue.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under GPL License. 6 | * 7 | * License: http://www.plupload.com/license 8 | * Contributing: http://www.plupload.com/contributing 9 | */ 10 | 11 | /* global jQuery:true, alert:true */ 12 | 13 | /** 14 | jQuery based implementation of the Plupload API - multi-runtime file uploading API. 15 | 16 | To use the widget you must include _jQuery_. It is not meant to be extended in any way and is provided to be 17 | used as it is. 18 | 19 | @example 20 | 21 |
    22 |

    Your browser doesn't have Flash, Silverlight or HTML5 support.

    23 |
    24 | 25 | 36 | 37 | @example 38 | // Retrieving a reference to plupload.Uploader object 39 | var uploader = $('#uploader').pluploadQueue(); 40 | 41 | uploader.bind('FilesAdded', function() { 42 | 43 | // Autostart 44 | setTimeout(uploader.start, 1); // "detach" from the main thread 45 | }); 46 | 47 | @class pluploadQueue 48 | @constructor 49 | @param {Object} settings For detailed information about each option check documentation. 50 | @param {String} settings.url URL of the server-side upload handler. 51 | @param {Number|String} [settings.chunk_size=0] Chunk size in bytes to slice the file into. Shorcuts with b, kb, mb, gb, tb suffixes also supported. `e.g. 204800 or "204800b" or "200kb"`. By default - disabled. 52 | @param {String} [settings.file_data_name="file"] Name for the file field in Multipart formated message. 53 | @param {Array} [settings.filters=[]] Set of file type filters, each one defined by hash of title and extensions. `e.g. {title : "Image files", extensions : "jpg,jpeg,gif,png"}`. Dispatches `plupload.FILE_EXTENSION_ERROR` 54 | @param {String} [settings.flash_swf_url] URL of the Flash swf. 55 | @param {Object} [settings.headers] Custom headers to send with the upload. Hash of name/value pairs. 56 | @param {Number|String} [settings.max_file_size] Maximum file size that the user can pick, in bytes. Optionally supports b, kb, mb, gb, tb suffixes. `e.g. "10mb" or "1gb"`. By default - not set. Dispatches `plupload.FILE_SIZE_ERROR`. 57 | @param {Number} [settings.max_retries=0] How many times to retry the chunk or file, before triggering Error event. 58 | @param {Boolean} [settings.multipart=true] Whether to send file and additional parameters as Multipart formated message. 59 | @param {Object} [settings.multipart_params] Hash of key/value pairs to send with every file upload. 60 | @param {Boolean} [settings.multi_selection=true] Enable ability to select multiple files at once in file dialog. 61 | @param {Boolean} [settings.prevent_duplicates=false] Do not let duplicates into the queue. Dispatches `plupload.FILE_DUPLICATE_ERROR`. 62 | @param {String|Object} [settings.required_features] Either comma-separated list or hash of required features that chosen runtime should absolutely possess. 63 | @param {Object} [settings.resize] Enable resizng of images on client-side. Applies to `image/jpeg` and `image/png` only. `e.g. {width : 200, height : 200, quality : 90, crop: true}` 64 | @param {Number} [settings.resize.width] If image is bigger, it will be resized. 65 | @param {Number} [settings.resize.height] If image is bigger, it will be resized. 66 | @param {Number} [settings.resize.quality=90] Compression quality for jpegs (1-100). 67 | @param {Boolean} [settings.resize.crop=false] Whether to crop images to exact dimensions. By default they will be resized proportionally. 68 | @param {String} [settings.runtimes="html5,flash,silverlight,html4"] Comma separated list of runtimes, that Plupload will try in turn, moving to the next if previous fails. 69 | @param {String} [settings.silverlight_xap_url] URL of the Silverlight xap. 70 | @param {Boolean} [settings.unique_names=false] If true will generate unique filenames for uploaded files. 71 | 72 | @param {Boolean} [settings.dragdrop=true] Enable ability to add file to the queue by drag'n'dropping them from the desktop. 73 | @param {Boolean} [settings.rename=false] Enable ability to rename files in the queue. 74 | @param {Boolean} [settings.multiple_queues=true] Re-activate the widget after each upload procedure. 75 | */ 76 | (function($) { 77 | var uploaders = {}; 78 | 79 | function _(str) { 80 | return plupload.translate(str) || str; 81 | } 82 | 83 | function renderUI(id, target) { 84 | // Remove all existing non plupload items 85 | target.contents().each(function(i, node) { 86 | node = $(node); 87 | 88 | if (!node.is('.plupload')) { 89 | node.remove(); 90 | } 91 | }); 92 | 93 | target.prepend( 94 | '
    ' + 95 | '
    ' + 96 | '' + 135 | '
    ' + 136 | '' + 137 | '
    ' 138 | ); 139 | } 140 | 141 | $.fn.pluploadQueue = function(settings) { 142 | if (settings) { 143 | this.each(function() { 144 | var uploader, target, id, contents_bak; 145 | 146 | target = $(this); 147 | id = target.attr('id'); 148 | 149 | if (!id) { 150 | id = plupload.guid(); 151 | target.attr('id', id); 152 | } 153 | 154 | contents_bak = target.html(); 155 | renderUI(id, target); 156 | 157 | uploader = new plupload.Uploader($.extend({ 158 | dragdrop : true, 159 | browse_button : id + '_browse', 160 | container : id 161 | }, settings)); 162 | 163 | uploaders[id] = uploader; 164 | 165 | function handleStatus(file) { 166 | var actionClass; 167 | 168 | if (file.status == plupload.DONE) { 169 | actionClass = 'plupload_done'; 170 | } 171 | 172 | if (file.status == plupload.FAILED) { 173 | actionClass = 'plupload_failed'; 174 | } 175 | 176 | if (file.status == plupload.QUEUED) { 177 | actionClass = 'plupload_delete'; 178 | } 179 | 180 | if (file.status == plupload.UPLOADING) { 181 | actionClass = 'plupload_uploading'; 182 | } 183 | 184 | var icon = $('#' + file.id).attr('class', actionClass).find('a').css('display', 'block'); 185 | if (file.hint) { 186 | icon.attr('title', file.hint); 187 | } 188 | } 189 | 190 | function updateTotalProgress() { 191 | $('span.plupload_total_status', target).html(uploader.total.percent + '%'); 192 | $('div.plupload_progress_bar', target).css('width', uploader.total.percent + '%'); 193 | $('span.plupload_upload_status', target).html( 194 | _('Uploaded %d/%d files').replace(/%d\/%d/, uploader.total.uploaded+'/'+uploader.files.length) 195 | ); 196 | } 197 | 198 | function updateList() { 199 | var fileList = $('ul.plupload_filelist', target).html(''), inputCount = 0, inputHTML; 200 | 201 | $.each(uploader.files, function(i, file) { 202 | inputHTML = ''; 203 | 204 | if (file.status == plupload.DONE) { 205 | if (file.target_name) { 206 | inputHTML += ''; 207 | } 208 | 209 | inputHTML += ''; 210 | inputHTML += ''; 211 | 212 | inputCount++; 213 | 214 | $('#' + id + '_count').val(inputCount); 215 | } 216 | 217 | fileList.append( 218 | '
  • ' + 219 | '
    ' + file.name + '
    ' + 220 | '
    ' + 221 | '
    ' + file.percent + '%
    ' + 222 | '
    ' + plupload.formatSize(file.size) + '
    ' + 223 | '
     
    ' + 224 | inputHTML + 225 | '
  • ' 226 | ); 227 | 228 | handleStatus(file); 229 | 230 | $('#' + file.id + '.plupload_delete a').click(function(e) { 231 | $('#' + file.id).remove(); 232 | uploader.removeFile(file); 233 | 234 | e.preventDefault(); 235 | }); 236 | }); 237 | 238 | $('span.plupload_total_file_size', target).html(plupload.formatSize(uploader.total.size)); 239 | 240 | if (uploader.total.queued === 0) { 241 | $('span.plupload_add_text', target).html(_('Add Files')); 242 | } else { 243 | $('span.plupload_add_text', target).html(_('%d files queued').replace(/%d/, uploader.total.queued)); 244 | } 245 | 246 | $('a.plupload_start', target).toggleClass('plupload_disabled', uploader.files.length == (uploader.total.uploaded + uploader.total.failed)); 247 | 248 | // Scroll to end of file list 249 | fileList[0].scrollTop = fileList[0].scrollHeight; 250 | 251 | updateTotalProgress(); 252 | 253 | // Re-add drag message if there is no files 254 | if (!uploader.files.length && uploader.features.dragdrop && uploader.settings.dragdrop) { 255 | $('#' + id + '_filelist').append('
  • ' + _("Drag files here.") + '
  • '); 256 | } 257 | } 258 | 259 | function destroy() { 260 | delete uploaders[id]; 261 | uploader.destroy(); 262 | target.html(contents_bak); 263 | uploader = target = contents_bak = null; 264 | } 265 | 266 | uploader.bind("UploadFile", function(up, file) { 267 | $('#' + file.id).addClass('plupload_current_file'); 268 | }); 269 | 270 | uploader.bind('Init', function(up, res) { 271 | // Enable rename support 272 | if (!settings.unique_names && settings.rename) { 273 | target.on('click', '#' + id + '_filelist div.plupload_file_name span', function(e) { 274 | var targetSpan = $(e.target), file, parts, name, ext = ""; 275 | 276 | // Get file name and split out name and extension 277 | file = up.getFile(targetSpan.parents('li')[0].id); 278 | name = file.name; 279 | parts = /^(.+)(\.[^.]+)$/.exec(name); 280 | if (parts) { 281 | name = parts[1]; 282 | ext = parts[2]; 283 | } 284 | 285 | // Display input element 286 | targetSpan.hide().after(''); 287 | targetSpan.next().val(name).focus().blur(function() { 288 | targetSpan.show().next().remove(); 289 | }).keydown(function(e) { 290 | var targetInput = $(this); 291 | 292 | if (e.keyCode == 13) { 293 | e.preventDefault(); 294 | 295 | // Rename file and glue extension back on 296 | file.name = targetInput.val() + ext; 297 | targetSpan.html(file.name); 298 | targetInput.blur(); 299 | } 300 | }); 301 | }); 302 | } 303 | 304 | 305 | // Enable drag/drop (see PostInit handler as well) 306 | if (up.settings.dragdrop) { 307 | up.settings.drop_element = id + '_filelist'; 308 | } 309 | 310 | $('#' + id + '_container').attr('title', 'Using runtime: ' + res.runtime); 311 | 312 | $('a.plupload_start', target).click(function(e) { 313 | if (!$(this).hasClass('plupload_disabled')) { 314 | uploader.start(); 315 | } 316 | 317 | e.preventDefault(); 318 | }); 319 | 320 | $('a.plupload_stop', target).click(function(e) { 321 | e.preventDefault(); 322 | uploader.stop(); 323 | }); 324 | 325 | $('a.plupload_start', target).addClass('plupload_disabled'); 326 | }); 327 | 328 | uploader.bind("Error", function(up, err) { 329 | var file = err.file, message; 330 | 331 | if (file) { 332 | message = err.message; 333 | 334 | if (err.details) { 335 | message += " (" + err.details + ")"; 336 | } 337 | 338 | if (err.code == plupload.FILE_SIZE_ERROR) { 339 | alert(_("Error: File too large:") + " " + file.name); 340 | } 341 | 342 | if (err.code == plupload.FILE_EXTENSION_ERROR) { 343 | alert(_("Error: Invalid file extension:") + " " + file.name); 344 | } 345 | 346 | file.hint = message; 347 | $('#' + file.id).attr('class', 'plupload_failed').find('a').css('display', 'block').attr('title', message); 348 | } 349 | 350 | if (err.code === plupload.INIT_ERROR) { 351 | setTimeout(function() { 352 | destroy(); 353 | }, 1); 354 | } 355 | }); 356 | 357 | uploader.bind("PostInit", function(up) { 358 | // features are populated only after input components are fully instantiated 359 | if (up.settings.dragdrop && up.features.dragdrop) { 360 | $('#' + id + '_filelist').append('
  • ' + _("Drag files here.") + '
  • '); 361 | } 362 | }); 363 | 364 | uploader.init(); 365 | 366 | uploader.bind('StateChanged', function() { 367 | if (uploader.state === plupload.STARTED) { 368 | $('li.plupload_delete a,div.plupload_buttons', target).hide(); 369 | $('span.plupload_upload_status,div.plupload_progress,a.plupload_stop', target).css('display', 'block'); 370 | $('span.plupload_upload_status', target).html('Uploaded ' + uploader.total.uploaded + '/' + uploader.files.length + ' files'); 371 | 372 | if (settings.multiple_queues) { 373 | $('span.plupload_total_status,span.plupload_total_file_size', target).show(); 374 | } 375 | } else { 376 | updateList(); 377 | $('a.plupload_stop,div.plupload_progress', target).hide(); 378 | $('a.plupload_delete', target).css('display', 'block'); 379 | 380 | if (settings.multiple_queues && uploader.total.uploaded + uploader.total.failed == uploader.files.length) { 381 | $(".plupload_buttons,.plupload_upload_status", target).css("display", "inline"); 382 | $(".plupload_start", target).addClass("plupload_disabled"); 383 | $('span.plupload_total_status,span.plupload_total_file_size', target).hide(); 384 | } 385 | } 386 | }); 387 | 388 | uploader.bind('QueueChanged', updateList); 389 | 390 | uploader.bind('FileUploaded', function(up, file) { 391 | handleStatus(file); 392 | }); 393 | 394 | uploader.bind("UploadProgress", function(up, file) { 395 | // Set file specific progress 396 | $('#' + file.id + ' div.plupload_file_status', target).html(file.percent + '%'); 397 | 398 | handleStatus(file); 399 | updateTotalProgress(); 400 | }); 401 | 402 | // Call setup function 403 | if (settings.setup) { 404 | settings.setup(uploader); 405 | } 406 | }); 407 | 408 | return this; 409 | } else { 410 | // Get uploader instance for specified element 411 | return uploaders[$(this[0]).attr('id')]; 412 | } 413 | }; 414 | })(jQuery); 415 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /js/jquery.ui.plupload/jquery.ui.plupload.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jquery.ui.plupload.js 3 | * 4 | * Copyright 2013, Moxiecode Systems AB 5 | * Released under GPL License. 6 | * 7 | * License: http://www.plupload.com/license 8 | * Contributing: http://www.plupload.com/contributing 9 | * 10 | * Depends: 11 | * jquery.ui.core.js 12 | * jquery.ui.widget.js 13 | * jquery.ui.button.js 14 | * jquery.ui.progressbar.js 15 | * 16 | * Optionally: 17 | * jquery.ui.sortable.js 18 | */ 19 | 20 | /* global jQuery:true */ 21 | 22 | /** 23 | jQuery UI based implementation of the Plupload API - multi-runtime file uploading API. 24 | 25 | To use the widget you must include _jQuery_ and _jQuery UI_ bundle (including `ui.core`, `ui.widget`, `ui.button`, 26 | `ui.progressbar` and `ui.sortable`). 27 | 28 | In general the widget is designed the way that you do not usually need to do anything to it after you instantiate it. 29 | But! You still can intervenue, to some extent, in case you need to. Although, due to the fact that widget is based on 30 | _jQuery UI_ widget factory, there are some specifics. See examples below for more details. 31 | 32 | @example 33 | 34 |
    35 |

    Your browser doesn't have Flash, Silverlight or HTML5 support.

    36 |
    37 | 38 | 50 | 51 | @example 52 | // Invoking methods: 53 | $('#uploader').plupload(options); 54 | 55 | // Display welcome message in the notification area 56 | $('#uploader').plupload('notify', 'info', "This might be obvious, but you need to click 'Add Files' to add some files."); 57 | 58 | @example 59 | // Subscribing to the events... 60 | // ... on initialization: 61 | $('#uploader').plupload({ 62 | ... 63 | viewchanged: function(event, args) { 64 | // stuff ... 65 | } 66 | }); 67 | // ... or after initialization 68 | $('#uploader').on("viewchanged", function(event, args) { 69 | // stuff ... 70 | }); 71 | 72 | @class UI.Plupload 73 | @constructor 74 | @param {Object} settings For detailed information about each option check documentation. 75 | @param {String} settings.url URL of the server-side upload handler. 76 | @param {Number|String} [settings.chunk_size=0] Chunk size in bytes to slice the file into. Shorcuts with b, kb, mb, gb, tb suffixes also supported. `e.g. 204800 or "204800b" or "200kb"`. By default - disabled. 77 | @param {String} [settings.file_data_name="file"] Name for the file field in Multipart formated message. 78 | @param {Array} [settings.filters=[]] Set of file type filters, each one defined by hash of title and extensions. `e.g. {title : "Image files", extensions : "jpg,jpeg,gif,png"}`. Dispatches `plupload.FILE_EXTENSION_ERROR` 79 | @param {String} [settings.flash_swf_url] URL of the Flash swf. 80 | @param {Object} [settings.headers] Custom headers to send with the upload. Hash of name/value pairs. 81 | @param {Number|String} [settings.max_file_size] Maximum file size that the user can pick, in bytes. Optionally supports b, kb, mb, gb, tb suffixes. `e.g. "10mb" or "1gb"`. By default - not set. Dispatches `plupload.FILE_SIZE_ERROR`. 82 | @param {Number} [settings.max_retries=0] How many times to retry the chunk or file, before triggering Error event. 83 | @param {Boolean} [settings.multipart=true] Whether to send file and additional parameters as Multipart formated message. 84 | @param {Object} [settings.multipart_params] Hash of key/value pairs to send with every file upload. 85 | @param {Boolean} [settings.multi_selection=true] Enable ability to select multiple files at once in file dialog. 86 | @param {Boolean} [settings.prevent_duplicates=false] Do not let duplicates into the queue. Dispatches `plupload.FILE_DUPLICATE_ERROR`. 87 | @param {String|Object} [settings.required_features] Either comma-separated list or hash of required features that chosen runtime should absolutely possess. 88 | @param {Object} [settings.resize] Enable resizng of images on client-side. Applies to `image/jpeg` and `image/png` only. `e.g. {width : 200, height : 200, quality : 90, crop: true}` 89 | @param {Number} [settings.resize.width] If image is bigger, it will be resized. 90 | @param {Number} [settings.resize.height] If image is bigger, it will be resized. 91 | @param {Number} [settings.resize.quality=90] Compression quality for jpegs (1-100). 92 | @param {Boolean} [settings.resize.crop=false] Whether to crop images to exact dimensions. By default they will be resized proportionally. 93 | @param {String} [settings.runtimes="html5,flash,silverlight,html4"] Comma separated list of runtimes, that Plupload will try in turn, moving to the next if previous fails. 94 | @param {String} [settings.silverlight_xap_url] URL of the Silverlight xap. 95 | @param {Boolean} [settings.unique_names=false] If true will generate unique filenames for uploaded files. 96 | 97 | @param {Boolean} [settings.autostart=false] Whether to auto start uploading right after file selection. 98 | @param {Boolean} [settings.dragdrop=true] Enable ability to add file to the queue by drag'n'dropping them from the desktop. 99 | @param {Boolean} [settings.rename=false] Enable ability to rename files in the queue. 100 | @param {Boolean} [settings.sortable=false] Enable ability to sort files in the queue, changing their uploading priority. 101 | @param {Object} [settings.buttons] Control the visibility of functional buttons. 102 | @param {Boolean} [settings.buttons.browse=true] Display browse button. 103 | @param {Boolean} [settings.buttons.start=true] Display start button. 104 | @param {Boolean} [settings.buttons.stop=true] Display stop button. 105 | @param {Object} [settings.views] Control various views of the file queue. 106 | @param {Boolean} [settings.views.list=true] Enable list view. 107 | @param {Boolean} [settings.views.thumbs=false] Enable thumbs view. 108 | @param {String} [settings.views.default='list'] Default view. 109 | @param {Boolean} [settings.views.remember=true] Whether to remember the current view (requires jQuery Cookie plugin). 110 | @param {Boolean} [settings.multiple_queues=true] Re-activate the widget after each upload procedure. 111 | @param {Number} [settings.max_file_count=0] Limit the number of files user is able to upload in one go, autosets _multiple_queues_ to _false_ (default is 0 - no limit). 112 | */ 113 | (function(window, document, plupload, $) { 114 | 115 | /** 116 | Dispatched when the widget is initialized and ready. 117 | 118 | @event ready 119 | @param {plupload.Uploader} uploader Uploader instance sending the event. 120 | */ 121 | 122 | /** 123 | Dispatched when file dialog is closed. 124 | 125 | @event selected 126 | @param {plupload.Uploader} uploader Uploader instance sending the event. 127 | @param {Array} files Array of selected files represented by plupload.File objects 128 | */ 129 | 130 | /** 131 | Dispatched when file dialog is closed. 132 | 133 | @event removed 134 | @param {plupload.Uploader} uploader Uploader instance sending the event. 135 | @param {Array} files Array of removed files represented by plupload.File objects 136 | */ 137 | 138 | /** 139 | Dispatched when upload is started. 140 | 141 | @event start 142 | @param {plupload.Uploader} uploader Uploader instance sending the event. 143 | */ 144 | 145 | /** 146 | Dispatched when upload is stopped. 147 | 148 | @event stop 149 | @param {plupload.Uploader} uploader Uploader instance sending the event. 150 | */ 151 | 152 | /** 153 | Dispatched during the upload process. 154 | 155 | @event progress 156 | @param {plupload.Uploader} uploader Uploader instance sending the event. 157 | @param {plupload.File} file File that is being uploaded (includes loaded and percent properties among others). 158 | @param {Number} size Total file size in bytes. 159 | @param {Number} loaded Number of bytes uploaded of the files total size. 160 | @param {Number} percent Number of percentage uploaded of the file. 161 | */ 162 | 163 | /** 164 | Dispatched when file is uploaded. 165 | 166 | @event uploaded 167 | @param {plupload.Uploader} uploader Uploader instance sending the event. 168 | @param {plupload.File} file File that was uploaded. 169 | @param {Enum} status Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE. 170 | */ 171 | 172 | /** 173 | Dispatched when upload of the whole queue is complete. 174 | 175 | @event complete 176 | @param {plupload.Uploader} uploader Uploader instance sending the event. 177 | @param {Array} files Array of uploaded files represented by plupload.File objects 178 | */ 179 | 180 | /** 181 | Dispatched when the view is changed, e.g. from `list` to `thumbs` or vice versa. 182 | 183 | @event viewchanged 184 | @param {plupload.Uploader} uploader Uploader instance sending the event. 185 | @param {String} type Current view type. 186 | */ 187 | 188 | /** 189 | Dispatched when error of some kind is detected. 190 | 191 | @event error 192 | @param {plupload.Uploader} uploader Uploader instance sending the event. 193 | @param {String} error Error message. 194 | @param {plupload.File} file File that was uploaded. 195 | @param {Enum} status Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE. 196 | */ 197 | 198 | var uploaders = {}; 199 | 200 | function _(str) { 201 | return plupload.translate(str) || str; 202 | } 203 | 204 | function renderUI(obj) { 205 | obj.id = obj.attr('id'); 206 | 207 | obj.html( 208 | '
    ' + 209 | '
    ' + 210 | '
    ' + 211 | '
    ' + 212 | '' + 213 | '
    ' + _('Select files') + '
    ' + 214 | '
    ' + _('Add files to the upload queue and click the start button.') + '
    ' + 215 | '
    ' + 216 | ' ' + 217 | ' ' + 218 | '
    ' + 219 | '
    ' + 220 | '
    ' + 221 | 222 | '' + 223 | '' + 224 | '' + 225 | '' + 226 | '' + 227 | '' + 228 | '' + 229 | '
    ' + _('Filename') + '' + _('Status') + '' + _('Size') + ' 
    ' + 230 | 231 | '
    ' + 232 | '
    ' + _("Drag files here.") + '
    ' + 233 | '
    ' + 234 | '
     
    ' + 235 | '
    ' + 236 | 237 | '' + 238 | '' + 239 | '' + 256 | '' + 257 | '' + 258 | '' + 259 | '' + 260 | '' + 261 | 262 | '
    ' + 263 | '' + 264 | '
    ' 265 | ); 266 | } 267 | 268 | 269 | $.widget("ui.plupload", { 270 | 271 | widgetEventPrefix: '', 272 | 273 | imgs: {}, 274 | 275 | contents_bak: '', 276 | 277 | options: { 278 | browse_button_hover: 'ui-state-hover', 279 | browse_button_active: 'ui-state-active', 280 | 281 | // widget specific 282 | dragdrop : true, 283 | multiple_queues: true, // re-use widget by default 284 | buttons: { 285 | browse: true, 286 | start: true, 287 | stop: true 288 | }, 289 | views: { 290 | list: true, 291 | thumbs: false, 292 | active: 'list', 293 | remember: true // requires: https://github.com/carhartl/jquery-cookie, otherwise disabled even if set to true 294 | }, 295 | autostart: false, 296 | sortable: false, 297 | rename: false, 298 | max_file_count: 0 // unlimited 299 | }, 300 | 301 | FILE_COUNT_ERROR: -9001, 302 | 303 | _create: function() { 304 | var id = this.element.attr('id'); 305 | if (!id) { 306 | id = plupload.guid(); 307 | this.element.attr('id', id); 308 | } 309 | this.id = id; 310 | 311 | // backup the elements initial state 312 | this.contents_bak = this.element.html(); 313 | renderUI(this.element); 314 | 315 | // container, just in case 316 | this.container = $('.plupload_container', this.element).attr('id', id + '_container'); 317 | 318 | this.content = $('.plupload_content', this.element); 319 | 320 | if ($.fn.resizable) { 321 | this.container.resizable({ 322 | handles: 's', 323 | minHeight: 300 324 | }); 325 | } 326 | 327 | // list of files, may become sortable 328 | this.filelist = $('.plupload_filelist_content', this.container) 329 | .attr({ 330 | id: id + '_filelist', 331 | unselectable: 'on' 332 | }); 333 | 334 | 335 | // buttons 336 | this.browse_button = $('.plupload_add', this.container).attr('id', id + '_browse'); 337 | this.start_button = $('.plupload_start', this.container).attr('id', id + '_start'); 338 | this.stop_button = $('.plupload_stop', this.container).attr('id', id + '_stop'); 339 | this.thumbs_switcher = $('#' + id + '_view_thumbs'); 340 | this.list_switcher = $('#' + id + '_view_list'); 341 | 342 | if ($.ui.button) { 343 | this.browse_button.button({ 344 | icons: { primary: 'ui-icon-circle-plus' }, 345 | disabled: true 346 | }); 347 | 348 | this.start_button.button({ 349 | icons: { primary: 'ui-icon-circle-arrow-e' }, 350 | disabled: true 351 | }); 352 | 353 | this.stop_button.button({ 354 | icons: { primary: 'ui-icon-circle-close' } 355 | }); 356 | 357 | this.list_switcher.button({ 358 | text: false, 359 | icons: { secondary: "ui-icon-grip-dotted-horizontal" } 360 | }); 361 | 362 | this.thumbs_switcher.button({ 363 | text: false, 364 | icons: { secondary: "ui-icon-image" } 365 | }); 366 | } 367 | 368 | // progressbar 369 | this.progressbar = $('.plupload_progress_container', this.container); 370 | 371 | if ($.ui.progressbar) { 372 | this.progressbar.progressbar(); 373 | } 374 | 375 | // counter 376 | this.counter = $('.plupload_count', this.element) 377 | .attr({ 378 | id: id + '_count', 379 | name: id + '_count' 380 | }); 381 | 382 | // initialize uploader instance 383 | this._initUploader(); 384 | }, 385 | 386 | _initUploader: function() { 387 | var self = this 388 | , id = this.id 389 | , uploader 390 | , options = { 391 | container: id + '_buttons', 392 | browse_button: id + '_browse' 393 | } 394 | ; 395 | 396 | $('.plupload_buttons', this.element).attr('id', id + '_buttons'); 397 | 398 | if (self.options.dragdrop) { 399 | this.filelist.parent().attr('id', this.id + '_dropbox'); 400 | options.drop_element = this.id + '_dropbox'; 401 | } 402 | 403 | if (self.options.views.thumbs) { 404 | if (o.typeOf(self.options.required_features) === 'string') { 405 | self.options.required_features += ",display_media"; 406 | } else { 407 | self.options.required_features = "display_media"; 408 | } 409 | } 410 | 411 | uploader = this.uploader = uploaders[id] = new plupload.Uploader($.extend(this.options, options)); 412 | 413 | uploader.bind('Error', function(up, err) { 414 | var message, details = ""; 415 | 416 | message = '' + err.message + ''; 417 | 418 | switch (err.code) { 419 | case plupload.FILE_EXTENSION_ERROR: 420 | details = o.sprintf(_("File: %s"), err.file.name); 421 | break; 422 | 423 | case plupload.FILE_SIZE_ERROR: 424 | details = o.sprintf(_("File: %f, size: %s, max file size: %m"), err.file.name, err.file.size, plupload.parseSize(self.options.max_file_size)); 425 | break; 426 | 427 | case plupload.FILE_DUPLICATE_ERROR: 428 | details = o.sprintf(_("%s already present in the queue."), err.file.name); 429 | break; 430 | 431 | case self.FILE_COUNT_ERROR: 432 | details = o.sprintf(_("Upload element accepts only %d file(s) at a time. Extra files were stripped."), self.options.max_file_count); 433 | break; 434 | 435 | case plupload.IMAGE_FORMAT_ERROR : 436 | details = _("Image format either wrong or not supported."); 437 | break; 438 | 439 | case plupload.IMAGE_MEMORY_ERROR : 440 | details = _("Runtime ran out of available memory."); 441 | break; 442 | 443 | /* // This needs a review 444 | case plupload.IMAGE_DIMENSIONS_ERROR : 445 | details = o.sprintf(_('Resoultion out of boundaries! %s runtime supports images only up to %wx%hpx.'), up.runtime, up.features.maxWidth, up.features.maxHeight); 446 | break; */ 447 | 448 | case plupload.HTTP_ERROR: 449 | details = _("Upload URL might be wrong or doesn't exist."); 450 | break; 451 | } 452 | 453 | message += "
    " + details + ""; 454 | 455 | self._trigger('error', null, { up: up, error: err } ); 456 | 457 | // do not show UI if no runtime can be initialized 458 | if (err.code === plupload.INIT_ERROR) { 459 | setTimeout(function() { 460 | self.destroy(); 461 | }, 1); 462 | } else { 463 | self.notify('error', message); 464 | } 465 | }); 466 | 467 | 468 | uploader.bind('PostInit', function(up) { 469 | // all buttons are optional, so they can be disabled and hidden 470 | if (!self.options.buttons.browse) { 471 | self.browse_button.button('disable').hide(); 472 | up.disableBrowse(true); 473 | } else { 474 | self.browse_button.button('enable'); 475 | } 476 | 477 | if (!self.options.buttons.start) { 478 | self.start_button.button('disable').hide(); 479 | } 480 | 481 | if (!self.options.buttons.stop) { 482 | self.stop_button.button('disable').hide(); 483 | } 484 | 485 | if (!self.options.unique_names && self.options.rename) { 486 | self._enableRenaming(); 487 | } 488 | 489 | if (self.options.dragdrop && up.features.dragdrop) { 490 | self.filelist.parent().addClass('plupload_dropbox'); 491 | } 492 | 493 | self._enableViewSwitcher(); 494 | 495 | self.start_button.click(function(e) { 496 | if (!$(this).button('option', 'disabled')) { 497 | self.start(); 498 | } 499 | e.preventDefault(); 500 | }); 501 | 502 | self.stop_button.click(function(e) { 503 | self.stop(); 504 | e.preventDefault(); 505 | }); 506 | 507 | self._trigger('ready', null, { up: up }); 508 | }); 509 | 510 | 511 | // check if file count doesn't exceed the limit 512 | if (self.options.max_file_count) { 513 | self.options.multiple_queues = false; // one go only 514 | 515 | uploader.bind('FilesAdded', function(up, selectedFiles) { 516 | var selectedCount = selectedFiles.length 517 | , extraCount = up.files.length + selectedCount - self.options.max_file_count 518 | ; 519 | 520 | if (extraCount > 0) { 521 | selectedFiles.splice(selectedCount - extraCount, extraCount); 522 | 523 | up.trigger('Error', { 524 | code : self.FILE_COUNT_ERROR, 525 | message : _('File count error.') 526 | }); 527 | } 528 | }); 529 | } 530 | 531 | // uploader internal events must run first 532 | uploader.init(); 533 | 534 | uploader.bind('FilesAdded', function(up, files) { 535 | self._addFiles(files); 536 | self._trigger('selected', null, { up: up, files: files } ); 537 | 538 | if (self.options.autostart) { 539 | // set a little delay to make sure that QueueChanged triggered by the core has time to complete 540 | setTimeout(function() { 541 | self.start(); 542 | }, 10); 543 | } 544 | }); 545 | 546 | uploader.bind('FilesRemoved', function(up, files) { 547 | self._trigger('removed', null, { up: up, files: files } ); 548 | }); 549 | 550 | uploader.bind('QueueChanged', function() { 551 | self._handleState(); 552 | self._updateTotalProgress(); 553 | }); 554 | 555 | uploader.bind('StateChanged', function() { 556 | self._handleState(); 557 | }); 558 | 559 | uploader.bind('UploadFile', function(up, file) { 560 | self._handleFileStatus(file); 561 | }); 562 | 563 | uploader.bind('FileUploaded', function(up, file) { 564 | self._handleFileStatus(file); 565 | self._trigger('uploaded', null, { up: up, file: file } ); 566 | }); 567 | 568 | uploader.bind('UploadProgress', function(up, file) { 569 | self._handleFileStatus(file); 570 | self._updateTotalProgress(); 571 | self._trigger('progress', null, { up: up, file: file } ); 572 | }); 573 | 574 | uploader.bind('UploadComplete', function(up, files) { 575 | self._addFormFields(); 576 | self._trigger('complete', null, { up: up, files: files } ); 577 | }); 578 | }, 579 | 580 | 581 | _setOption: function(key, value) { 582 | var self = this; 583 | 584 | if (key == 'buttons' && typeof(value) == 'object') { 585 | value = $.extend(self.options.buttons, value); 586 | 587 | if (!value.browse) { 588 | self.browse_button.button('disable').hide(); 589 | self.uploader.disableBrowse(true); 590 | } else { 591 | self.browse_button.button('enable').show(); 592 | self.uploader.disableBrowse(false); 593 | } 594 | 595 | if (!value.start) { 596 | self.start_button.button('disable').hide(); 597 | } else { 598 | self.start_button.button('enable').show(); 599 | } 600 | 601 | if (!value.stop) { 602 | self.stop_button.button('disable').hide(); 603 | } else { 604 | self.start_button.button('enable').show(); 605 | } 606 | } 607 | 608 | self.uploader.settings[key] = value; 609 | }, 610 | 611 | 612 | /** 613 | Start upload. Triggers `start` event. 614 | 615 | @method start 616 | */ 617 | start: function() { 618 | this.uploader.start(); 619 | this._trigger('start', null, { up: this.uploader }); 620 | }, 621 | 622 | 623 | /** 624 | Stop upload. Triggers `stop` event. 625 | 626 | @method stop 627 | */ 628 | stop: function() { 629 | this.uploader.stop(); 630 | this._trigger('stop', null, { up: this.uploader }); 631 | }, 632 | 633 | 634 | /** 635 | Enable browse button. 636 | 637 | @method enable 638 | */ 639 | enable: function() { 640 | this.browse_button.button('enable'); 641 | this.uploader.disableBrowse(false); 642 | }, 643 | 644 | 645 | /** 646 | Disable browse button. 647 | 648 | @method disable 649 | */ 650 | disable: function() { 651 | this.browse_button.button('disable'); 652 | this.uploader.disableBrowse(true); 653 | }, 654 | 655 | 656 | /** 657 | Retrieve file by it's unique id. 658 | 659 | @method getFile 660 | @param {String} id Unique id of the file 661 | @return {plupload.File} 662 | */ 663 | getFile: function(id) { 664 | var file; 665 | 666 | if (typeof id === 'number') { 667 | file = this.uploader.files[id]; 668 | } else { 669 | file = this.uploader.getFile(id); 670 | } 671 | return file; 672 | }, 673 | 674 | /** 675 | Return array of files currently in the queue. 676 | 677 | @method getFiles 678 | @return {Array} Array of files in the queue represented by plupload.File objects 679 | */ 680 | getFiles: function() { 681 | return this.uploader.files; 682 | }, 683 | 684 | 685 | /** 686 | Remove the file from the queue. 687 | 688 | @method removeFile 689 | @param {plupload.File|String} file File to remove, might be specified directly or by it's unique id 690 | */ 691 | removeFile: function(file) { 692 | if (plupload.typeOf(file) === 'string') { 693 | file = this.getFile(file); 694 | } 695 | this._removeFiles(file); 696 | }, 697 | 698 | 699 | /** 700 | Clear the file queue. 701 | 702 | @method clearQueue 703 | */ 704 | clearQueue: function() { 705 | this.uploader.splice(); 706 | }, 707 | 708 | 709 | /** 710 | Retrieve internal plupload.Uploader object (usually not required). 711 | 712 | @method getUploader 713 | @return {plupload.Uploader} 714 | */ 715 | getUploader: function() { 716 | return this.uploader; 717 | }, 718 | 719 | 720 | /** 721 | Trigger refresh procedure, specifically browse_button re-measure and re-position operations. 722 | Might get handy, when UI Widget is placed within the popup, that is constantly hidden and shown 723 | again - without calling this method after each show operation, dialog trigger might get displaced 724 | and disfunctional. 725 | 726 | @method refresh 727 | */ 728 | refresh: function() { 729 | this.uploader.refresh(); 730 | }, 731 | 732 | 733 | /** 734 | Display a message in notification area. 735 | 736 | @method notify 737 | @param {Enum} type Type of the message, either `error` or `info` 738 | @param {String} message The text message to display. 739 | */ 740 | notify: function(type, message) { 741 | var popup = $( 742 | '
    ' + 743 | '' + 744 | '

    ' + message + '

    ' + 745 | '
    ' 746 | ); 747 | 748 | popup 749 | .addClass('ui-state-' + (type === 'error' ? 'error' : 'highlight')) 750 | .find('p .ui-icon') 751 | .addClass('ui-icon-' + (type === 'error' ? 'alert' : 'info')) 752 | .end() 753 | .find('.plupload_message_close') 754 | .click(function() { 755 | popup.remove(); 756 | }) 757 | .end(); 758 | 759 | $('.plupload_header', this.container).append(popup); 760 | }, 761 | 762 | 763 | /** 764 | Destroy the widget, the uploader, free associated resources and bring back original html. 765 | 766 | @method destroy 767 | */ 768 | destroy: function() { 769 | this._removeFiles([].slice.call(this.uploader.files)); 770 | 771 | // destroy uploader instance 772 | this.uploader.destroy(); 773 | 774 | // unbind all button events 775 | $('.plupload_button', this.element).unbind(); 776 | 777 | // destroy buttons 778 | if ($.ui.button) { 779 | $('.plupload_add, .plupload_start, .plupload_stop', this.container) 780 | .button('destroy'); 781 | } 782 | 783 | // destroy progressbar 784 | if ($.ui.progressbar) { 785 | this.progressbar.progressbar('destroy'); 786 | } 787 | 788 | // destroy sortable behavior 789 | if ($.ui.sortable && this.options.sortable) { 790 | $('tbody', this.filelist).sortable('destroy'); 791 | } 792 | 793 | // restore the elements initial state 794 | this.element 795 | .empty() 796 | .html(this.contents_bak); 797 | this.contents_bak = ''; 798 | 799 | $.Widget.prototype.destroy.apply(this); 800 | }, 801 | 802 | 803 | _handleState: function() { 804 | var up = this.uploader; 805 | 806 | if (up.state === plupload.STARTED) { 807 | $(this.start_button).button('disable'); 808 | 809 | $([]) 810 | .add(this.stop_button) 811 | .add('.plupload_started') 812 | .removeClass('plupload_hidden'); 813 | 814 | $('.plupload_upload_status', this.element).html(o.sprintf(_('Uploaded %d/%d files'), up.total.uploaded, up.files.length)); 815 | $('.plupload_header_content', this.element).addClass('plupload_header_content_bw'); 816 | } else if (up.state === plupload.STOPPED) { 817 | $([]) 818 | .add(this.stop_button) 819 | .add('.plupload_started') 820 | .addClass('plupload_hidden'); 821 | 822 | if (this.options.multiple_queues) { 823 | $('.plupload_header_content', this.element).removeClass('plupload_header_content_bw'); 824 | } else { 825 | $([]) 826 | .add(this.browse_button) 827 | .add(this.start_button) 828 | .button('disable'); 829 | 830 | up.disableBrowse(); 831 | } 832 | 833 | if (up.files.length === (up.total.uploaded + up.total.failed)) { 834 | this.start_button.button('disable'); 835 | } else { 836 | this.start_button.button('enable'); 837 | } 838 | 839 | this._updateTotalProgress(); 840 | } 841 | 842 | if (up.total.queued === 0) { 843 | $('.ui-button-text', this.browse_button).html(_('Add Files')); 844 | } else { 845 | $('.ui-button-text', this.browse_button).html(o.sprintf(_('%d files queued'), up.total.queued)); 846 | } 847 | 848 | up.refresh(); 849 | }, 850 | 851 | 852 | _handleFileStatus: function(file) { 853 | var self = this, actionClass, iconClass; 854 | 855 | // since this method might be called asynchronously, file row might not yet be rendered 856 | if (!$('#' + file.id).length) { 857 | return; 858 | } 859 | 860 | switch (file.status) { 861 | case plupload.DONE: 862 | actionClass = 'plupload_done'; 863 | iconClass = 'ui-icon ui-icon-circle-check'; 864 | break; 865 | 866 | case plupload.FAILED: 867 | actionClass = 'ui-state-error plupload_failed'; 868 | iconClass = 'ui-icon ui-icon-alert'; 869 | break; 870 | 871 | case plupload.QUEUED: 872 | actionClass = 'plupload_delete'; 873 | iconClass = 'ui-icon ui-icon-circle-minus'; 874 | break; 875 | 876 | case plupload.UPLOADING: 877 | actionClass = 'ui-state-highlight plupload_uploading'; 878 | iconClass = 'ui-icon ui-icon-circle-arrow-w'; 879 | 880 | // scroll uploading file into the view if its bottom boundary is out of it 881 | var scroller = $('.plupload_scroll', this.container) 882 | , scrollTop = scroller.scrollTop() 883 | , scrollerHeight = scroller.height() 884 | , rowOffset = $('#' + file.id).position().top + $('#' + file.id).height() 885 | ; 886 | 887 | if (scrollerHeight < rowOffset) { 888 | scroller.scrollTop(scrollTop + rowOffset - scrollerHeight); 889 | } 890 | 891 | // Set file specific progress 892 | $('#' + file.id) 893 | .find('.plupload_file_percent') 894 | .html(file.percent + '%') 895 | .end() 896 | .find('.plupload_file_progress') 897 | .css('width', file.percent + '%') 898 | .end() 899 | .find('.plupload_file_size') 900 | .html(plupload.formatSize(file.size)); 901 | break; 902 | } 903 | actionClass += ' ui-state-default plupload_file'; 904 | 905 | $('#' + file.id) 906 | .attr('class', actionClass) 907 | .find('.ui-icon') 908 | .attr('class', iconClass) 909 | .end() 910 | .filter('.plupload_delete, .plupload_done, .plupload_failed') 911 | .find('.ui-icon') 912 | .click(function(e) { 913 | self._removeFiles(file); 914 | e.preventDefault(); 915 | }); 916 | }, 917 | 918 | 919 | _updateTotalProgress: function() { 920 | var up = this.uploader; 921 | 922 | // Scroll to end of file list 923 | this.filelist[0].scrollTop = this.filelist[0].scrollHeight; 924 | 925 | this.progressbar.progressbar('value', up.total.percent); 926 | 927 | this.element 928 | .find('.plupload_total_status') 929 | .html(up.total.percent + '%') 930 | .end() 931 | .find('.plupload_total_file_size') 932 | .html(plupload.formatSize(up.total.size)) 933 | .end() 934 | .find('.plupload_upload_status') 935 | .html(o.sprintf(_('Uploaded %d/%d files'), up.total.uploaded, up.files.length)); 936 | }, 937 | 938 | 939 | _addFiles: function(files) { 940 | var self = this, file_html, queue = []; 941 | 942 | file_html = '
  • ' + 943 | '
    ' + 944 | '
    %name%
    ' + 945 | '
    ' + 946 | '
    %size%
    ' + 947 | '
    ' + 948 | '
  • '; 949 | 950 | if (plupload.typeOf(files) !== 'array') { 951 | files = [files]; 952 | } 953 | 954 | // destroy sortable if enabled 955 | if ($.ui.sortable && this.options.sortable) { 956 | $('tbody', self.filelist).sortable('destroy'); 957 | } 958 | 959 | // loop over files to add 960 | $.each(files, function(i, file) { 961 | 962 | self.filelist.append(file_html.replace(/%(\w+)%/g, function($0, $1) { 963 | if ('size' === $1) { 964 | return plupload.formatSize(file.size); 965 | } else { 966 | return file[$1] || ''; 967 | } 968 | })); 969 | 970 | if (self.options.views.thumbs) { 971 | queue.push(function(cb) { 972 | var img = new o.Image(); 973 | 974 | img.onload = function() { 975 | this.embed($('#' + file.id + ' .plupload_file_thumb', self.filelist)[0], { 976 | width: 100, 977 | height: 60, 978 | crop: true, 979 | swf_url: mOxie.resolveUrl(self.options.flash_swf_url), 980 | xap_url: mOxie.resolveUrl(self.options.silverlight_xap_url) 981 | }); 982 | }; 983 | 984 | img.onembedded = function() { 985 | $('#' + file.id + ' .plupload_file_thumb', self.filelist).addClass('plupload_file_thumb_loaded'); 986 | this.destroy(); 987 | setTimeout(cb, 1); // detach, otherwise ui might hang (in SilverLight for example) 988 | }; 989 | 990 | img.onerror = function() { 991 | var ext = file.name.match(/\.([^\.]{1,7})$/); 992 | $('#' + file.id + ' .plupload_file_thumb', self.filelist) 993 | .html('
    ' + (ext ? ext[1] : 'none') + '
    '); 994 | this.destroy(); 995 | setTimeout(cb, 1); 996 | }; 997 | img.load(file.getSource()); 998 | }); 999 | } 1000 | 1001 | self._handleFileStatus(file); 1002 | }); 1003 | 1004 | if (queue.length) { 1005 | o.inSeries(queue); 1006 | } 1007 | 1008 | // re-enable sortable 1009 | if (this.options.sortable && $.ui.sortable) { 1010 | this._enableSortingList(); 1011 | } 1012 | 1013 | this._trigger('updatelist', null, { filelist: this.filelist }); 1014 | }, 1015 | 1016 | 1017 | _removeFiles: function(files) { 1018 | var self = this, up = this.uploader; 1019 | 1020 | if (plupload.typeOf(files) !== 'array') { 1021 | files = [files]; 1022 | } 1023 | 1024 | // destroy sortable if enabled 1025 | if ($.ui.sortable && this.options.sortable) { 1026 | $('tbody', self.filelist).sortable('destroy'); 1027 | } 1028 | 1029 | $.each(files, function(i, file) { 1030 | if (file.imgs && file.imgs.length) { 1031 | $.each(file.imgs, function(ii, img) { 1032 | img.destroy(); 1033 | }); 1034 | file.imgs = []; 1035 | } 1036 | $('#' + file.id).remove(); 1037 | up.removeFile(file); 1038 | }); 1039 | 1040 | 1041 | if (up.files.length) { 1042 | // re-initialize sortable 1043 | if (this.options.sortable && $.ui.sortable) { 1044 | this._enableSortingList(); 1045 | } 1046 | } 1047 | 1048 | this._trigger('updatelist', null, { filelist: this.filelist }); 1049 | }, 1050 | 1051 | 1052 | _addFormFields: function() { 1053 | var self = this; 1054 | 1055 | // re-add from fresh 1056 | $('.plupload_file_fields', this.filelist).html(''); 1057 | 1058 | plupload.each(this.uploader.files, function(file, count) { 1059 | var fields = '' 1060 | , id = self.id + '_' + count 1061 | ; 1062 | 1063 | if (file.target_name) { 1064 | fields += ''; 1065 | } 1066 | fields += ''; 1067 | fields += ''; 1068 | 1069 | $('#' + file.id).find('.plupload_file_fields').html(fields); 1070 | }); 1071 | 1072 | this.counter.val(this.uploader.files.length); 1073 | }, 1074 | 1075 | 1076 | _viewChanged: function(view) { 1077 | // update or write a new cookie 1078 | if (this.options.views.remember && $.cookie) { 1079 | $.cookie('plupload_ui_view', view, { expires: 7, path: '/' }); 1080 | } 1081 | 1082 | // ugly fix for IE6 - make content area stretchable 1083 | if (mOxie.Env.browser === 'IE' && mOxie.Env.version < 7) { 1084 | this.content.attr('style', 'height:expression(document.getElementById("' + this.id + '_container' + '").clientHeight - ' + (view === 'list' ? 133 : 103) + ');'); 1085 | } 1086 | 1087 | this.container.removeClass('plupload_view_list plupload_view_thumbs').addClass('plupload_view_' + view); 1088 | this.view_mode = view; 1089 | this._trigger('viewchanged', null, { view: view }); 1090 | }, 1091 | 1092 | 1093 | _enableViewSwitcher: function() { 1094 | var self = this 1095 | , view 1096 | , switcher = $('.plupload_view_switch', this.container) 1097 | , buttons 1098 | , button 1099 | ; 1100 | 1101 | plupload.each(['list', 'thumbs'], function(view) { 1102 | if (!self.options.views[view]) { 1103 | switcher.find('[for="' + self.id + '_view_' + view + '"], #'+ self.id +'_view_' + view).remove(); 1104 | } 1105 | }); 1106 | 1107 | // check if any visible left 1108 | buttons = switcher.find('.plupload_button'); 1109 | 1110 | if (buttons.length === 1) { 1111 | switcher.hide(); 1112 | view = buttons.eq(0).data('view'); 1113 | this._viewChanged(view); 1114 | } else if ($.ui.button && buttons.length > 1) { 1115 | if (this.options.views.remember && $.cookie) { 1116 | view = $.cookie('plupload_ui_view'); 1117 | } 1118 | 1119 | // if wierd case, bail out to default 1120 | if (!~plupload.inArray(view, ['list', 'thumbs'])) { 1121 | view = this.options.views.active; 1122 | } 1123 | 1124 | switcher 1125 | .show() 1126 | .buttonset() 1127 | .find('.ui-button') 1128 | .click(function(e) { 1129 | view = $(this).data('view'); 1130 | self._viewChanged(view); 1131 | e.preventDefault(); // avoid auto scrolling to widget in IE and FF (see #850) 1132 | }); 1133 | 1134 | // if view not active - happens when switcher wasn't clicked manually 1135 | button = switcher.find('[for="' + self.id + '_view_'+view+'"]'); 1136 | if (button.length) { 1137 | button.trigger('click'); 1138 | } 1139 | } else { 1140 | switcher.show(); 1141 | this._viewChanged(this.options.views.active); 1142 | } 1143 | }, 1144 | 1145 | 1146 | _enableRenaming: function() { 1147 | var self = this; 1148 | 1149 | this.filelist.dblclick(function(e) { 1150 | var nameSpan = $(e.target), nameInput, file, parts, name, ext = ""; 1151 | 1152 | if (!nameSpan.hasClass('plupload_file_namespan')) { 1153 | return; 1154 | } 1155 | 1156 | // Get file name and split out name and extension 1157 | file = self.uploader.getFile(nameSpan.closest('.plupload_file')[0].id); 1158 | name = file.name; 1159 | parts = /^(.+)(\.[^.]+)$/.exec(name); 1160 | if (parts) { 1161 | name = parts[1]; 1162 | ext = parts[2]; 1163 | } 1164 | 1165 | // Display input element 1166 | nameInput = $('').width(nameSpan.width()).insertAfter(nameSpan.hide()); 1167 | nameInput.val(name).blur(function() { 1168 | nameSpan.show().parent().scrollLeft(0).end().next().remove(); 1169 | }).keydown(function(e) { 1170 | var nameInput = $(this); 1171 | 1172 | if ($.inArray(e.keyCode, [13, 27]) !== -1) { 1173 | e.preventDefault(); 1174 | 1175 | // Rename file and glue extension back on 1176 | if (e.keyCode === 13) { 1177 | file.name = nameInput.val() + ext; 1178 | nameSpan.html(file.name); 1179 | } 1180 | nameInput.blur(); 1181 | } 1182 | })[0].focus(); 1183 | }); 1184 | }, 1185 | 1186 | 1187 | _enableSortingList: function() { 1188 | var self = this, filelist = $('.plupload_filelist_content', this.element); 1189 | 1190 | if ($('.plupload_file', filelist).length < 2) { 1191 | return; 1192 | } 1193 | 1194 | filelist.sortable({ 1195 | items: '.plupload_delete', 1196 | 1197 | cancel: 'object, .plupload_clearer', 1198 | 1199 | stop: function() { 1200 | var files = []; 1201 | 1202 | $.each($(this).sortable('toArray'), function(i, id) { 1203 | files[files.length] = self.uploader.getFile(id); 1204 | }); 1205 | 1206 | files.unshift(files.length); 1207 | files.unshift(0); 1208 | 1209 | // re-populate files array 1210 | Array.prototype.splice.apply(self.uploader.files, files); 1211 | } 1212 | }); 1213 | } 1214 | }); 1215 | 1216 | } (window, document, plupload, jQuery)); 1217 | --------------------------------------------------------------------------------