diff --git a/public/javascripts/plupload/changelog.txt b/public/javascripts/plupload/changelog.txt index 639ba99..a47fc5a 100644 --- a/public/javascripts/plupload/changelog.txt +++ b/public/javascripts/plupload/changelog.txt @@ -1,3 +1,49 @@ +Version 1.5.4 (2012-04-12) + Flash: Disable scripting if swf was loaded from another domain. +Version 1.5.3 (2012-04-05) + HTML5: Check if xhr object is initialized, before calling abort() on it. + HTML4: Postpone form removal until uploaders state changes, to avoid error on resuming stopped uploads. + BrowserPlus: Fix mechanical typo, that caused error during mime type check. + BrowserPlus: browserPlus.Uploader.Cancel() has two required parameters, dies with the error if not passed. + Flash: Improve runtime's behaviour during upload cancellation. + Flash: Survive the case when GPSVersionID contains unexpected value. + Flash: Fix random freeze in Chrome's bundled Flash Player. + Flash: Avoid the silent break when URLStream not yet open, but close is called on it. + Flash: Move Destroy handler out of Flash:Init handler, since it might be called not only after Flash:Init but also before it. + Flash: Avoid warning during build with mxmlc. + Try removeEventListener first in IE and only if it fails - detachEvent. + Fix plupload.getPos to return proper value in IE8+. + Do not initiate plupload.STARTED state, if file queue is empty. + Additional language packs: Estonian, Polish, Korean, French-Canadian, Greek, Persian/Farsi. +Version 1.5.2 (2012-01-06) + UI Widget: Do not show UI if no runtime can be initialized. + UI Widget: Timely update file size and total size if resize in action. + UI Widget: Constrain renaming feature to queued files only. + UI Widget: Disable Add button properly, if requested, rather then just hide. + HTML4/HTML5/BrowserPlus: Avoid adding mime type twice to dialog trigger. + HTML5: fix regression, when unresized images were failing on FF3.6. + HTML5: Constrain Gecko 2,5,6 workaround to multipart mode only. + HTML5/Flash: Take into account weird possibilities of ExifVersion being a string, rather then standard Undefined. + Flash: Simplify event dispatching in BitmapDataUnlimited class, in order to avoid freezing on resizing in FP11. + Add ability to disable file dialog trigger on request (uploader.disableBrowse(true/false)). + Support for immediate abort of upload process, be it chunked upload or regular one. + Abort all activity, before destroying uploader. + Revive temporary file removal logic in upload.php. + Fix potential vulnerability in dump.php and upload.php. + Additional MIME types: application/vnd.openxmlformats-officedocument.*, application/x-javascript, application/json, text/css,css, application/vnd.oasis.opendocument.formula-templat. + Additional language packs: Hungarian, Croatian, Serbian, Romanian. +Version 1.5.1.1 (2011-09-27) + HTML5: Fix mechanical typo, that successfully broke drag and drop, wherever could. +Version 1.5.1 (2011-09-26) + HTML4: Add support for server responses in HTML format. + HTML5: Disable multiple file selection in Safari 5.x for Windows (see #363). + HTML5: Gecko 2/5/6 should upload chunks as binary strings when in chunking mode and client side resize is requested. + Flash: Enforce URLStream mode when custom headers are passed. + Flash: Fix embedding problems in IE9 (and all other IEs). + Flash/Gears/BrowserPlus/SilverLight: Expose multi_selection feature, to be used in required_features (mainly to overcome Safari for Windows problem). + SilverLight: Properly handle custom and null headers. + UploadComplete moved to fire after the last StateChanged event. + Additional language packs: Finnish. Version 1.5b (2011-09-11) UI Widget: Fix sortable logic. UI Widget: Fix bug, when message was displayed simultaneously across all Plupload UI instances on the page. diff --git a/public/javascripts/plupload/examples/bg.jpg b/public/javascripts/plupload/examples/bg.jpg deleted file mode 100644 index 9b27383..0000000 Binary files a/public/javascripts/plupload/examples/bg.jpg and /dev/null differ diff --git a/public/javascripts/plupload/examples/custom.html b/public/javascripts/plupload/examples/custom.html deleted file mode 100644 index 92f73b8..0000000 --- a/public/javascripts/plupload/examples/custom.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - -Plupload - Queue widget example - - - - - - - - - - - - - - - - - - -

Custom example

- -

Shows you how to use the core plupload API.

- -
-
No runtime found.
-
- [Select files] - [Upload files] -
- - - - - \ No newline at end of file diff --git a/public/javascripts/plupload/examples/dump.php b/public/javascripts/plupload/examples/dump.php deleted file mode 100644 index e4b42e4..0000000 --- a/public/javascripts/plupload/examples/dump.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - -Plupload - Form dump - - - - -

Post dump

- -

Shows the form items posted.

- - - - - - - $value) { ?> - - - - - -
NameValue
- - - diff --git a/public/javascripts/plupload/examples/jquery/events.html b/public/javascripts/plupload/examples/jquery/events.html deleted file mode 100644 index 263e814..0000000 --- a/public/javascripts/plupload/examples/jquery/events.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - -Plupload - Events example - - - - - - - - - - - - - - - - - -
-

Events example

- -

Shows how to bind and use all available events.

- -

Log messages

- - -

Queue widget

-
You browser doesn't support upload.
- Clear queue -
- - - \ No newline at end of file diff --git a/public/javascripts/plupload/examples/jquery/jquery_ui_widget.html b/public/javascripts/plupload/examples/jquery/jquery_ui_widget.html deleted file mode 100644 index dac522e..0000000 --- a/public/javascripts/plupload/examples/jquery/jquery_ui_widget.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - -Plupload - Queue widget example - - - - - - - - - - - - - - - - - - - - - -

jQuery UI Widget

- -

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

- -
-
-

You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

-
-
- - - \ No newline at end of file diff --git a/public/javascripts/plupload/examples/jquery/queue_widget.html b/public/javascripts/plupload/examples/jquery/queue_widget.html deleted file mode 100644 index 569564a..0000000 --- a/public/javascripts/plupload/examples/jquery/queue_widget.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - -Plupload - Queue widget example - - - - - - - - - - - - - - - - - - - -
-

Queue widget example

- -

Shows the jQuery Plupload Queue widget and under different runtimes.

- -
-

Flash runtime

-
You browser doesn't have Flash installed.
- -

Gears runtime

-
You browser doesn't have Gears installed.
-
- -
-

Silverlight runtime

-
You browser doesn't have Silverlight installed.
- -

HTML 5 runtime

-
You browser doesn't support native upload. Try Firefox 3 or Safari 4.
-
- -
-

BrowserPlus runtime

-
You browser doesn't have BrowserPlus installed.
- -

HTML 4 runtime

-
You browser doesn't have HTML 4 support.
-
- -
- - -
- - - - - \ No newline at end of file diff --git a/public/javascripts/plupload/examples/jquery/s3.php b/public/javascripts/plupload/examples/jquery/s3.php deleted file mode 100644 index 6c8be8a..0000000 --- a/public/javascripts/plupload/examples/jquery/s3.php +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - -In our tests SilverLight didn't require anything special and worked with this configuration just fine. It may fail back -to the same crossdomain.xml as last resort. - -!!!Important!!! Plupload UI Widget here, is used only for demo purposes and is not required for uploading to S3. -*/ - -// important variables that will be used throughout this example -$bucket = 'BUCKET'; - -// these can be found on your Account page, under Security Credentials > Access Keys -$accessKeyId = 'ACCESS_KEY_ID'; -$secret = 'SECRET_ACCESS_KEY'; - - -// hash_hmac — Generate a keyed hash value using the HMAC method -// (PHP 5 >= 5.1.2, PECL hash >= 1.1) -if (!function_exists('hash_hmac')) : -// based on: http://www.php.net/manual/en/function.sha1.php#39492 -function hash_hmac($algo, $data, $key, $raw_output = false) -{ - $blocksize = 64; - if (strlen($key) > $blocksize) - $key = pack('H*', $algo($key)); - - $key = str_pad($key, $blocksize, chr(0x00)); - $ipad = str_repeat(chr(0x36), $blocksize); - $opad = str_repeat(chr(0x5c), $blocksize); - $hmac = pack('H*', $algo(($key^$opad) . pack('H*', $algo(($key^$ipad) . $data)))); - - return $raw_output ? $hmac : bin2hex($hmac); -} -endif; - -// prepare policy -$policy = base64_encode(json_encode(array( - // ISO 8601 - date('c'); generates uncompatible date, so better do it manually - 'expiration' => date('Y-m-d\TH:i:s.000\Z', strtotime('+1 day')), - 'conditions' => array( - array('bucket' => $bucket), - array('acl' => 'public-read'), - array('starts-with', '$key', ''), - // for demo purposes we are accepting only images - array('starts-with', '$Content-Type', 'image/'), - // "Some versions of the Adobe Flash Player do not properly handle HTTP responses that have an empty body. - // To configure POST to return a response that does not have an empty body, set success_action_status to 201. - // When set, Amazon S3 returns an XML document with a 201 status code." - // http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html - array('success_action_status' => '201'), - // Plupload internally adds name field, so we need to mention it here - array('starts-with', '$name', ''), - // One more field to take into account: Filename - gets silently sent by FileReference.upload() in Flash - // http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html - array('starts-with', '$Filename', ''), - ) -))); - -// sign policy -$signature = base64_encode(hash_hmac('sha1', $policy, $secret, true)); - -?> - - - - -Plupload to Amazon S3 Example - - - - - - - - - - - - - - - - - - - - - - - -

Plupload to Amazon S3 Example

- -
-

You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

-
- - - - - \ No newline at end of file diff --git a/public/javascripts/plupload/examples/upload.php b/public/javascripts/plupload/examples/upload.php deleted file mode 100644 index 6cf7f85..0000000 --- a/public/javascripts/plupload/examples/upload.php +++ /dev/null @@ -1,124 +0,0 @@ - \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/de.js b/public/javascripts/plupload/js/i18n/de.js index 96429d3..4c4de07 100644 --- a/public/javascripts/plupload/js/i18n/de.js +++ b/public/javascripts/plupload/js/i18n/de.js @@ -1,25 +1,24 @@ // German plupload.addI18n({ - 'Select files' : 'Wählen Sie die Dateien:', - 'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und danach auf \'Starten des Uploads\' klicken und die Datei hochzuladen.', - 'Filename' : 'Dateiname', - 'Status' : 'Status', - 'Size' : 'Größe', - 'Add files' : 'Hinzufügen von Dateien', - 'Stop current upload' : 'Stop aktuellen Upload', - 'Start uploading queue' : 'Starte Upload', - 'Uploaded %d/%d files': '%d/%d Dateien sind Hochgeladen', - 'N/A' : 'Nicht verfügbar', - 'Drag files here.' : 'Ziehen Sie die Dateien hier hin', - 'File extension error.': 'Dateiendungs Fehler.', - 'File size error.': 'Dateigrößen Fehler.', - 'Init error.': 'Initialisierungs Fehler.', - 'HTTP Error.': 'HTTP Fehler.', - 'Security error.': 'Sicherheits Fehler.', - 'Generic error.': 'Generic Fehler.', - 'IO error.': 'Ein/Ausgabe Fehler.', - 'Stop Upload': 'Stoppen des Uploads.', - 'Add Files': 'Dateien hinzufügen', - 'Start Upload': 'Starten des Uploads.', - '%d files queued': '%d Dateien in der Warteschlange.' + 'Select files' : 'Dateien hochladen', + 'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und auf \'Hochladen\' klicken.', + 'Filename' : 'Dateiname', + 'Status' : 'Status', + 'Size' : 'Größe', + 'Add files' : 'Dateien', // hinzufügen', + 'Stop current upload' : 'Aktuelles Hochladen stoppen', + 'Start uploading queue' : 'Hochladen starten', + 'Uploaded %d/%d files': '%d/%d Dateien sind hochgeladen', + 'N/A' : 'Nicht verfügbar', + 'Drag files here.' : 'Ziehen Sie die Dateien hier hin', + 'File extension error.': 'Fehler bei Dateiendung', + 'File size error.': 'Fehler bei Dateigröße', + 'Init error.': 'Initialisierungsfehler', + 'HTTP Error.': 'HTTP-Fehler', + 'Security error.': 'Sicherheitsfehler', + 'Generic error.': 'Typischer Fehler', + 'IO error.': 'Ein/Ausgabe-Fehler', + 'Stop Upload': 'Hochladen stoppen', + 'Start upload': 'Hochladen', + '%d files queued': '%d Dateien in der Warteschlange' }); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/el.js b/public/javascripts/plupload/js/i18n/el.js new file mode 100644 index 0000000..aafbaf1 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/el.js @@ -0,0 +1,14 @@ +// Greek +plupload.addI18n({ + 'Select files' : 'Επιλέξτε Αρχεία', + 'Add files to the upload queue and click the start button.' : 'Προσθήκη αρχείων στην ουρά μεταφόρτωσης', + 'Filename' : 'Όνομα αρχείου', + 'Status' : 'Κατάσταση', + 'Size' : 'Μέγεθος', + 'Add Files' : 'Προσθέστε αρχεία', + 'Stop current upload' : 'Διακοπή τρέχουσας μεταφόρτωσης', + 'Start uploading queue' : 'Εκκίνηση μεταφόρτωσης ουράς αρχείων', + 'Drag files here.' : 'Σύρετε αρχεία εδώ', + 'Start Upload': 'Εκκίνηση μεταφόρτωσης', + 'Uploaded %d/%d files': 'Ανέβηκαν %d/%d αρχεία' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/et.js b/public/javascripts/plupload/js/i18n/et.js new file mode 100644 index 0000000..a4a5e3a --- /dev/null +++ b/public/javascripts/plupload/js/i18n/et.js @@ -0,0 +1,33 @@ +// Estonian translation, et.js +plupload.addI18n({ + 'Select files' : 'Vali faile', + 'Add files to the upload queue and click the start button.' : 'Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.', + 'Filename' : 'Failinimi', + 'Status' : 'Olek', + 'Size' : 'Suurus', + 'Add files' : 'Lisa faile', + 'Stop current upload' : 'Praeguse üleslaadimise peatamine', + 'Start uploading queue' : 'Järjekorras ootavate failide üleslaadimise alustamine', + 'Drag files here.' : 'Lohista failid siia.', + 'Start upload' : 'Alusta üleslaadimist', + 'Uploaded %d/%d files': 'Üles laaditud %d/%d', + 'Stop upload': 'Peata üleslaadimine', + 'Start upload': 'Alusta üleslaadimist', + '%d files queued': 'Järjekorras on %d faili', + 'File: %s': 'Fail: %s', + 'Close': 'Sulge', + 'Using runtime: ': 'Kasutatakse varianti: ', + 'File: %f, size: %s, max file size: %m': 'Fail: %f, suurus: %s, suurim failisuurus: %m', + '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.', + 'Upload URL might be wrong or doesn\'t exist': 'Üleslaadimise URL võib olla vale või seda pole', + 'Error: File too large: ': 'Viga: fail on liiga suur: ', + 'Error: Invalid file extension: ': 'Viga: sobimatu faililaiend: ', + 'File extension error.': 'Faililaiendi viga.', + 'File size error.': 'Failisuuruse viga.', + 'File count error.': 'Failide arvu viga.', + 'Init error.': 'Lähtestamise viga.', + 'HTTP Error.': 'HTTP ühenduse viga.', + 'Security error.': 'Turvaviga.', + 'Generic error.': 'Üldine viga.', + 'IO error.': 'S/V (I/O) viga.' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/fa.js b/public/javascripts/plupload/js/i18n/fa.js new file mode 100644 index 0000000..af36e22 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/fa.js @@ -0,0 +1,37 @@ +// Persian +plupload.addI18n({ + 'Select files' : 'انتخاب فایل', + 'Add files to the upload queue and click the start button.' : 'اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.', + 'Filename' : 'نام فایل', + 'Status' : 'وضعیت', + 'Size' : 'سایز', + 'Add Files' : 'افزودن فایل', + 'Stop Upload' : 'توقف انتقال', + 'Start Upload' : 'شروع انتقال', + 'Add files' : 'افزودن فایل', + 'Add files.' : 'افزودن فایل', + 'Stop current upload' : 'توقف انتقال جاری', + 'Start uploading queue' : 'شروع صف انتقال', + 'Stop upload' : 'توقف انتقال', + 'Start upload' : 'شروع انتقال', + 'Uploaded %d/%d files': 'منتقل شد %d/%d از فایلها', + 'N/A' : 'N/A', + 'Drag files here.' : 'بکشید فایل ها رو به اینجا', + 'File extension error.': 'خطا پیشوند فایل', + 'File size error.': 'خطای سایز فایل', + 'File count error.': 'خطای تعداد فایل', + 'Init error.': 'خطا در استارت اسکریپت', + 'HTTP Error.': 'HTTP خطای', + 'Security error.': 'خطای امنیتی', + 'Generic error.': 'خطای عمومی', + 'IO error.': 'IO خطای', + 'File: %s': ' فایل ها : %s', + 'Close': 'بستن', + '%d files queued': '%d فایل در صف', + 'Using runtime: ': 'استفاده میکنید از : ', + 'File: %f, size: %s, max file size: %m': فایل: %f, سایز: %s, بزرگترین سایز فایل: %m', + 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.', + 'Upload URL might be wrong or doesn\'t exist': 'آدرس آپلود اشتباه می باشد یا وجود ندارد', + 'Error: File too large: ': 'خطا: فایل حجیم است :: ', + 'Error: Invalid file extension: ': 'خطا پسوند فایل معتبر نمی باشد : ' +}); diff --git a/public/javascripts/plupload/js/i18n/fi.js b/public/javascripts/plupload/js/i18n/fi.js new file mode 100644 index 0000000..12a639e --- /dev/null +++ b/public/javascripts/plupload/js/i18n/fi.js @@ -0,0 +1,33 @@ +// .fi file like language pack +plupload.addI18n({ + 'Select files' : 'Valitse tiedostoja', + 'Add files to the upload queue and click the start button.' : 'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.', + 'Filename' : 'Tiedostonimi', + 'Status' : 'Tila', + 'Size' : 'Koko', + 'Add files' : 'Lisää tiedostoja', + 'Stop current upload' : 'Pysäytä nykyinen lataus', + 'Start uploading queue' : 'Aloita jonon lataus', + 'Drag files here.' : 'Raahaa tiedostot tänne.', + 'Start upload' : 'Aloita lataus', + 'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa', + 'Stop upload': 'Pysäytä lataus', + 'Start upload': 'Aloita lataus', + '%d files queued': '%d tiedostoa jonossa', + 'File: %s': 'Tiedosto: %s', + 'Close': 'Sulje', + 'Using runtime: ': 'Käytetään ajonaikaista: ', + 'File: %f, size: %s, max file size: %m': 'Tiedosto: %f, koko: %s, maksimi tiedostokoko: %m', + 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.', + 'Upload URL might be wrong or doesn\'t exist': 'Lataus URL saattaa olla väärin tai ei ole olemassa', + 'Error: File too large: ': 'Virhe: Tiedosto liian suuri: ', + 'Error: Invalid file extension: ': 'Virhe: Kelpaamaton tiedostopääte: ', + 'File extension error.': 'Tiedostopäätevirhe.', + 'File size error.': 'Tiedostokokovirhe.', + 'File count error.': 'Tiedostolaskentavirhe.', + 'Init error.': 'Init virhe.', + 'HTTP Error.': 'HTTP virhe.', + 'Security error.': 'Tietoturvavirhe.', + 'Generic error.': 'Yleinen virhe.', + 'IO error.': 'I/O virhe.' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/fr-ca.js b/public/javascripts/plupload/js/i18n/fr-ca.js new file mode 100644 index 0000000..61aba23 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/fr-ca.js @@ -0,0 +1,35 @@ +// French-Canadian +plupload.addI18n({ + 'Select files' : 'Sélectionnez les fichiers', + 'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file d\'attente et appuyez sur le bouton démarrer.', + 'Filename' : 'Nom du fichier', + 'Status' : 'Statut', + 'Size' : 'Taille', + 'Add files' : 'Ajouter Fichiers', + 'Stop current upload' : 'Arrêter le téléversement actuel', + 'Start uploading queue' : 'Démarrer le téléversement', + 'Uploaded %d/%d files': '%d/%d fichiers envoyés', + 'N/A' : 'Non applicable', + 'Drag files here.' : 'Glisser-déposer les fichiers ici', + 'File extension error.': 'Erreur d\'extension de fichier', + 'File size error.': 'Erreur de taille de fichier', + 'Init error.': 'Erreur d\'initialisation', + 'HTTP Error.': 'Erreur HTTP', + 'Security error.': 'Erreur de sécurité', + 'Generic error.': 'Erreur commune', + 'IO error.': 'Erreur E/S', + 'Stop Upload': 'Arrêter le téléversement', + 'Add Files': 'Ajouter des fichiers', + 'Start upload': 'Démarrer le téléversement', + '%d files queued': '%d fichiers en attente', + 'File: %s':'Fichier: %s', + 'Close':'Fermer', + 'Using runtime:':'Moteur logiciel:', + 'File: %f, size: %s, max file size: %m':'Fichier: %f, poids: %s, poids maximal: %m', + 'Upload element accepts only %d file(s) at a time. Extra files were stripped.':'La file accepte %d fichier(s) à la fois. Les fichiers en trop sont ignorés', + 'Upload URL might be wrong or doesn\'t exist':'L\'URL de téléversement est erroné ou inexistant', + 'Error: File to large: ':'Fichier trop volumineux: ', + 'Error: Invalid file extension: ':'Extension de fichier invalide: ', + 'File size error.':'Erreur de taile de fichier', + 'File count error.':'Erreur de décompte des fichiers' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/fr.js b/public/javascripts/plupload/js/i18n/fr.js index c534ec4..53dbe28 100644 --- a/public/javascripts/plupload/js/i18n/fr.js +++ b/public/javascripts/plupload/js/i18n/fr.js @@ -1,4 +1,4 @@ -// .po file like language pack +// French plupload.addI18n({ 'Select files' : 'Sélectionnez les fichiers', 'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.', diff --git a/public/javascripts/plupload/js/i18n/hr.js b/public/javascripts/plupload/js/i18n/hr.js new file mode 100644 index 0000000..084be51 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/hr.js @@ -0,0 +1,25 @@ +// Croatian +plupload.addI18n({ + 'Select files': 'Izaberite datoteke:', + 'Add files to the upload queue and click the start button.': 'Dodajte datoteke u listu i kliknite Upload.', + 'Filename': 'Ime datoteke', + 'Status': 'Status', + 'Size': 'Veličina', + 'Add files': 'Dodajte datoteke', + 'Stop current upload': 'Zaustavi trenutan upload', + 'Start uploading queue': 'Pokreni Upload', + 'Uploaded %d/%d files': 'Uploadano %d/%d datoteka', + 'N/A': 'N/A', + 'Drag files here.': 'Dovucite datoteke ovdje', + 'File extension error.': 'Greška ekstenzije datoteke.', + 'File size error.': 'Greška veličine datoteke.', + 'Init error.': 'Greška inicijalizacije.', + 'HTTP Error.': 'HTTP greška.', + 'Security error.': 'Sigurnosna greška.', + 'Generic error.': 'Generička greška.', + 'IO error.': 'I/O greška.', + 'Stop Upload': 'Zaustavi upload.', + 'Add Files': 'Dodaj datoteke', + 'Start Upload': 'Pokreni upload.', + '%d files queued': '%d datoteka na čekanju.' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/hu.js b/public/javascripts/plupload/js/i18n/hu.js new file mode 100644 index 0000000..87070ba --- /dev/null +++ b/public/javascripts/plupload/js/i18n/hu.js @@ -0,0 +1,33 @@ +// Hungarian +plupload.addI18n({ + 'Select files' : 'Fájlok kiválasztása', + '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', + 'Status' : 'Állapot', + 'Size' : 'Méret', + 'Add files' : 'Hozzáadás', + 'Stop current upload' : 'Jelenlegi feltöltés megszakítása', + 'Start uploading queue' : 'Várakozási sor feltöltésének indítása', + 'Uploaded %d/%d files': 'Feltöltött fájlok: %d/%d', + 'N/A': 'Nem elérhető', + 'Drag files here.' : 'Húzd ide a fájlokat.', + 'Stop upload': 'Feltöltés megszakítása', + 'Start upload': 'Indítás', + '%d files queued': '%d fájl sorbaállítva', + 'File: %s': 'Fájl: %s', + 'Close': 'Bezárás', + 'Using runtime: ': 'Használt runtime: ', + 'File: %f, size: %s, max file size: %m': 'Fájl: %f, méret: %s, maximális fájlméret: %m', + '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.', + 'Upload URL might be wrong or doesn\'t exist': 'A megadott URL hibás vagy nem létezik', + 'Error: File too large: ': 'Hiba: A fájl túl nagy: ', + 'Error: Invalid file extension: ': 'Hiba: Érvénytelen fájlkiterjesztés: ', + 'File extension error.': 'Hibás fájlkiterjesztés.', + 'File size error.': 'Hibás fájlméret.', + 'File count error.': 'A fájlok számával kapcsolatos hiba.', + 'Init error.': 'Init hiba.', + 'HTTP Error.': 'HTTP hiba.', + 'Security error.': 'Biztonsági hiba.', + 'Generic error.': 'Általános hiba.', + 'IO error.': 'I/O hiba.' +}); diff --git a/public/javascripts/plupload/js/i18n/it.js b/public/javascripts/plupload/js/i18n/it.js index 7946578..891e4fb 100644 --- a/public/javascripts/plupload/js/i18n/it.js +++ b/public/javascripts/plupload/js/i18n/it.js @@ -1,21 +1,24 @@ -// .po file like language pack -plupload.addI18n({ - 'Select files' : 'Seleziona i files', - 'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.', - 'Filename' : 'Nome file', - 'Status' : 'Stato', - 'Size' : 'Dimensione', - 'Add files' : 'Aggiungi file', - 'Stop current upload' : 'Interrompi il caricamento', - 'Start uploading queue' : 'Avvia il caricamento', - 'Uploaded %d/%d files': 'Caricati %d/%d file', - 'N/A' : 'N/D', - 'Drag files here.' : 'Trascina i file qui.', - 'File extension error.': 'Errore estensione file.', - 'File size error.': 'Errore dimensione file.', - 'Init error.': 'Errore inizializzazione.', - 'HTTP Error.': 'Errore HTTP.', - 'Security error.': 'Errore sicurezza.', - 'Generic error.': 'Errore generico.', - 'IO error.': 'Errore IO.' +// Italian +plupload.addI18n({ + 'Select files' : 'Seleziona i files', + 'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.', + 'Filename' : 'Nome file', + 'Status' : 'Stato', + 'Size' : 'Dimensione', + 'Add Files' : 'Aggiungi file', + 'Stop current upload' : 'Interrompi il caricamento', + 'Start uploading queue' : 'Avvia il caricamento', + 'Uploaded %d/%d files': 'Caricati %d/%d file', + 'N/A' : 'N/D', + 'Drag files here.' : 'Trascina i file qui.', + 'File extension error.': 'Errore estensione file.', + 'File size error.': 'Errore dimensione file.', + 'Init error.': 'Errore inizializzazione.', + 'HTTP Error.': 'Errore HTTP.', + 'Security error.': 'Errore sicurezza.', + 'Generic error.': 'Errore generico.', + 'IO error.': 'Errore IO.', + 'Stop Upload': 'Ferma Upload', + 'Start Upload': 'Inizia Upload', + '%d files queued': '%d file in lista' }); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/ko.js b/public/javascripts/plupload/js/i18n/ko.js new file mode 100644 index 0000000..a2c5e66 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/ko.js @@ -0,0 +1,36 @@ +// Republic of Korea +plupload.addI18n({ + 'Select files' : '파일 선택', + 'Add files to the upload queue and click the start button.' : '파일을 업로드 큐에 추가하여 시작 버튼을 클릭하십시오.', + 'Filename' : '파일 이름', + 'Status' : '상태', + 'Size' : '크기', + 'Add Files' : '파일 추가', + 'Stop Upload': '업로드 중지', + 'Start Upload': '업로드', + 'Add files': '파일 추가', + 'Stop current upload': '현재 업로드를 정지', + 'Start uploading queue': '업로드', + 'Stop upload': '업로드 중지', + 'Start upload': '업로드', + 'Uploaded % d / % d files': '업로드 중 % d / % d 파일', + 'N / A': 'N / A', + 'Drag files here': '여기에 파일을 드래그', + 'File extension error': '파일 확장자 오류', + 'File size error': '파일 크기 오류', + 'File count error': '이미지 : 오류', + 'Init error': '초기화 오류', + 'HTTP Error': 'HTTP 오류', + 'Security error': '보안 오류', + 'Generic error': '오류', + 'IO error': 'IO 오류', + 'File : % s': '파일 % s', + 'Close': '닫기', + '% d files queued': '% d 파일이 추가되었습니다', + 'Using runtime :': '모드', + 'File : % f, size : % s, max file size : % m': '파일 : % f, 크기 : % s, 최대 파일 크기 : % m', + 'Upload element accepts only % d file (s) at a time. Extra files were stripped': '업로드 가능한 파일의 수는 % d입니다. 불필요한 파일은 삭제되었습니다 ', + 'Upload URL might be wrong or doesn \'t exist ':'업로드할 URL이 존재하지 않습니다 ', + 'Error : File too large :': '오류 : 크기가 너무 큽니다', + 'Error : Invalid file extension :': '오류 : 확장자가 허용되지 않습니다 :' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/pl.js b/public/javascripts/plupload/js/i18n/pl.js new file mode 100644 index 0000000..3d1b9be --- /dev/null +++ b/public/javascripts/plupload/js/i18n/pl.js @@ -0,0 +1,24 @@ +plupload.addI18n({ +'Select files' : 'Wybierz pliki:', +'Add files to the upload queue and click the start button.' : 'Dodaj pliki i kliknij \'Rozpocznij transfer\'.', +'Filename' : 'Nazwa pliku', +'Status' : 'Status', +'Size' : 'Rozmiar', +'Add files' : 'Dodaj pliki', +'Stop current upload' : 'Przerwij aktualny transfer', +'Start uploading queue' : 'Rozpocznij wysyłanie', +'Uploaded %d/%d files': 'Wysłano %d/%d plików', +'N/A' : 'Nie dostępne', +'Drag files here.' : 'Przeciągnij tu pliki', +'File extension error.': 'Nieobsługiwany format pliku.', +'File size error.': 'Plik jest zbyt duży.', +'Init error.': 'Błąd inicjalizacji.', +'HTTP Error.': 'Błąd HTTP.', +'Security error.': 'Błąd bezpieczeństwa.', +'Generic error.': 'Błąd ogólny.', +'IO error.': 'Błąd IO.', +'Stop Upload': 'Przerwij transfer.', +'Add Files': 'Dodaj pliki', +'Start upload': 'Rozpocznij transfer.', +'%d files queued': '%d plików w kolejce.' +}); diff --git a/public/javascripts/plupload/js/i18n/ro.js b/public/javascripts/plupload/js/i18n/ro.js new file mode 100644 index 0000000..fd198f0 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/ro.js @@ -0,0 +1,24 @@ +// Romanian +plupload.addI18n({ + 'Select files' : 'Selectare fişiere', + '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', + 'Status' : 'Stare', + 'Size' : 'Mărime', + 'Add files' : 'Adăugare fişiere', + 'Stop current upload' : 'Întrerupe încărcarea curentă', + 'Start uploading queue' : 'Începe incărcarea', + 'Uploaded %d/%d files': 'Fişiere încărcate %d/%d', + 'N/A' : 'N/A', + 'Drag files here.' : 'Trage aici fişierele', + 'File extension error.': 'Extensie fişier eronată', + 'File size error.': 'Eroare dimensiune fişier', + 'Init error.': 'Eroare iniţializare', + 'HTTP Error.': 'Eroare HTTP', + 'Security error.': 'Eroare securitate', + 'Generic error.': 'Eroare generică', + 'IO error.': 'Eroare Intrare/Ieşire', + 'Stop Upload': 'Oprire încărcare', + 'Start upload': 'Începe încărcare', + '%d files queued': '%d fişiere listate' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/i18n/sr.js b/public/javascripts/plupload/js/i18n/sr.js new file mode 100644 index 0000000..59dc0a9 --- /dev/null +++ b/public/javascripts/plupload/js/i18n/sr.js @@ -0,0 +1,14 @@ +// Serbian +plupload.addI18n({ + 'Select files' : 'Izaberite fajlove', + 'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.', + 'Filename' : 'Naziv fajla', + 'Status' : 'Status', + 'Size' : 'Veličina', + 'Add Files' : 'Dodaj fajlove', + 'Stop current upload' : 'Zaustavi upload', + 'Start uploading queue' : 'Počni upload', + 'Drag files here.' : 'Prevucite fajlove ovde.', + 'Start Upload': 'Počni upload', + 'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova' +}); \ No newline at end of file diff --git a/public/javascripts/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js b/public/javascripts/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js index 3076e13..a836bb6 100644 --- a/public/javascripts/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js +++ b/public/javascripts/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js @@ -1 +1 @@ -(function(f,a,c,g,e){var h={};function b(i){return c.translate(i)||i}function d(i){i.html('
'+b("Select files")+'
'+b("Add files to the upload queue and click the start button.")+'
'+b("Filename")+''+b("Status")+''+b("Size")+' 
')}g.widget("ui.plupload",{contents_bak:"",runtime:null,options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:true,multiple_queues:true,buttons:{browse:true,start:true,stop:true},autostart:false,sortable:false,rename:false,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var i=this,k,j;k=this.element.attr("id");if(!k){k=c.guid();this.element.attr("id",k)}this.id=k;this.contents_bak=this.element.html();d(this.element);this.container=g(".plupload_container",this.element).attr("id",k+"_container");this.filelist=g(".plupload_filelist_content",this.container).attr({id:k+"_filelist",unselectable:"on"});this.browse_button=g(".plupload_add",this.container).attr("id",k+"_browse");this.start_button=g(".plupload_start",this.container).attr("id",k+"_start");this.stop_button=g(".plupload_stop",this.container).attr("id",k+"_stop");if(g.ui.button){this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:true});this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})}if(!this.options.buttons.browse){this.browse_button.button("disable").hide();g("#"+k+i.runtime+"_container").hide()}if(!this.options.buttons.start){this.start_button.button("disable").hide()}if(!this.options.buttons.stop){this.stop_button.button("disable").hide()}this.progressbar=g(".plupload_progress_container",this.container);if(g.ui.progressbar){this.progressbar.progressbar()}this.counter=g(".plupload_count",this.element).attr({id:k+"_count",name:k+"_count"});j=this.uploader=h[k]=new c.Uploader(g.extend({container:k,browse_button:k+"_browse"},this.options));j.bind("Init",function(l,m){if(!i.options.unique_names&&i.options.rename){i._enableRenaming()}if(j.features.dragdrop&&i.options.dragdrop){i._enableDragAndDrop()}i.container.attr("title",b("Using runtime: ")+(i.runtime=m.runtime));i.start_button.click(function(n){if(!g(this).button("option","disabled")){i.start()}n.preventDefault()});i.stop_button.click(function(n){j.stop();n.preventDefault()})});if(i.options.max_file_count){j.bind("FilesAdded",function(l,n){var o=[],m=n.length;var p=l.files.length+m-i.options.max_file_count;if(p>0){o=n.splice(m-p,p);l.trigger("Error",{code:i.FILE_COUNT_ERROR,message:b("File count error."),file:o})}})}j.init();j.bind("FilesAdded",function(l,m){i._trigger("selected",null,{up:l,files:m});if(i.options.autostart){i.start()}});j.bind("FilesRemoved",function(l,m){i._trigger("removed",null,{up:l,files:m})});j.bind("QueueChanged",function(){i._updateFileList()});j.bind("StateChanged",function(){i._handleState()});j.bind("UploadFile",function(l,m){i._handleFileStatus(m)});j.bind("FileUploaded",function(l,m){i._handleFileStatus(m);i._trigger("uploaded",null,{up:l,file:m})});j.bind("UploadProgress",function(l,m){g("#"+m.id+" .plupload_file_status",i.element).html(m.percent+"%");i._handleFileStatus(m);i._updateTotalProgress();i._trigger("progress",null,{up:l,file:m})});j.bind("UploadComplete",function(l,m){i._trigger("complete",null,{up:l,files:m})});j.bind("Error",function(l,p){var n=p.file,o,m;if(n){o=""+p.message+"";m=p.details;if(m){o+="
"+p.details+""}else{switch(p.code){case c.FILE_EXTENSION_ERROR:m=b("File: %s").replace("%s",n.name);break;case c.FILE_SIZE_ERROR:m=b("File: %f, size: %s, max file size: %m").replace(/%([fsm])/g,function(r,q){switch(q){case"f":return n.name;case"s":return n.size;case"m":return c.parseSize(i.options.max_file_size)}});break;case i.FILE_COUNT_ERROR:m=b("Upload element accepts only %d file(s) at a time. Extra files were stripped.").replace("%d",i.options.max_file_count);break;case c.IMAGE_FORMAT_ERROR:m=c.translate("Image format either wrong or not supported.");break;case c.IMAGE_MEMORY_ERROR:m=c.translate("Runtime ran out of available memory.");break;case c.IMAGE_DIMENSIONS_ERROR:m=c.translate("Resoultion out of boundaries! %s runtime supports images only up to %wx%hpx.").replace(/%([swh])/g,function(r,q){switch(q){case"s":return l.runtime;case"w":return l.features.maxWidth;case"h":return l.features.maxHeight}});break;case c.HTTP_ERROR:m=b("Upload URL might be wrong or doesn't exist");break}o+="
"+m+""}i.notify("error",o);i._trigger("error",null,{up:l,file:n,error:o})}})},_setOption:function(j,k){var i=this;if(j=="buttons"&&typeof(k)=="object"){k=g.extend(i.options.buttons,k);if(!k.browse){i.browse_button.button("disable").hide();g("#"+i.id+i.runtime+"_container").hide()}else{i.browse_button.button("enable").show();g("#"+i.id+i.runtime+"_container").show()}if(!k.start){i.start_button.button("disable").hide()}else{i.start_button.button("enable").show()}if(!k.stop){i.stop_button.button("disable").hide()}else{i.start_button.button("enable").show()}}i.uploader.settings[j]=k},start:function(){this.uploader.start();this._trigger("start",null)},stop:function(){this.uploader.stop();this._trigger("stop",null)},getFile:function(j){var i;if(typeof j==="number"){i=this.uploader.files[j]}else{i=this.uploader.getFile(j)}return i},removeFile:function(j){var i=this.getFile(j);if(i){this.uploader.removeFile(i)}},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},_handleState:function(){var i=this,j=this.uploader;if(j.state===c.STARTED){g(i.start_button).button("disable");g([]).add(i.stop_button).add(".plupload_started").removeClass("plupload_hidden");g(".plupload_upload_status",i.element).text(b("Uploaded %d/%d files").replace("%d/%d",j.total.uploaded+"/"+j.files.length));g(".plupload_header_content",i.element).addClass("plupload_header_content_bw")}else{g([]).add(i.stop_button).add(".plupload_started").addClass("plupload_hidden");if(i.options.multiple_queues){g(i.start_button).button("enable");g(".plupload_header_content",i.element).removeClass("plupload_header_content_bw")}i._updateFileList()}},_handleFileStatus:function(l){var n,j;switch(l.status){case c.DONE:n="plupload_done";j="ui-icon ui-icon-circle-check";break;case c.FAILED:n="ui-state-error plupload_failed";j="ui-icon ui-icon-alert";break;case c.QUEUED:n="plupload_delete";j="ui-icon ui-icon-circle-minus";break;case c.UPLOADING:n="ui-state-highlight plupload_uploading";j="ui-icon ui-icon-circle-arrow-w";var i=g(".plupload_scroll",this.container),m=i.scrollTop(),o=i.height(),k=g("#"+l.id).position().top+g("#"+l.id).height();if(o'}i+='';i+='';k++;j.counter.val(k)}l.append(''+p.name+''+p.percent+'%'+c.formatSize(p.size)+'
'+i+"");j._handleFileStatus(p);g("#"+p.id+".plupload_delete .ui-icon, #"+p.id+".plupload_done .ui-icon").click(function(r){g("#"+p.id).remove();n.removeFile(p);r.preventDefault()});j._trigger("updatelist",null,l)});g(".plupload_total_file_size",j.element).html(c.formatSize(n.total.size));if(n.total.queued===0){g(".ui-button-text",j.browse_button).text(b("Add Files"))}else{g(".ui-button-text",j.browse_button).text(b("%d files queued").replace("%d",n.total.queued))}if(n.files.length===(n.total.uploaded+n.total.failed)){j.start_button.button("disable")}else{j.start_button.button("enable")}l[0].scrollTop=l[0].scrollHeight;j._updateTotalProgress();if(!n.files.length&&n.features.dragdrop&&n.settings.dragdrop){g("#"+o+"_filelist").append(''+b("Drag files here.")+"")}else{if(j.options.sortable&&g.ui.sortable){j._enableSortingList()}}},_enableRenaming:function(){var i=this;g(".plupload_file_name span",this.filelist).live("click",function(o){var m=g(o.target),k,n,j,l="";k=i.uploader.getFile(m.parents("tr")[0].id);j=k.name;n=/^(.+)(\.[^.]+)$/.exec(j);if(n){j=n[1];l=n[2]}m.hide().after('');m.next().val(j).focus().blur(function(){m.show().next().remove()}).keydown(function(q){var p=g(this);if(g.inArray(q.keyCode,[13,27])!==-1){q.preventDefault();if(q.keyCode===13){k.name=p.val()+l;m.text(k.name)}p.blur()}})})},_enableDragAndDrop:function(){this.filelist.append(''+b("Drag files here.")+"");this.filelist.parent().attr("id",this.id+"_dropbox");this.uploader.settings.drop_element=this.options.drop_element=this.id+"_dropbox"},_enableSortingList:function(){var j,i=this;if(g("tbody tr",this.filelist).length<2){return}g("tbody",this.filelist).sortable({containment:"parent",items:".plupload_delete",helper:function(l,k){return k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width","100%")},stop:function(p,o){var l,n,k,m=[];g.each(g(this).sortable("toArray"),function(q,r){m[m.length]=i.uploader.getFile(r)});m.unshift(m.length);m.unshift(0);Array.prototype.splice.apply(i.uploader.files,m)}})},notify:function(j,k){var i=g('

'+k+"

");i.addClass("ui-state-"+(j==="error"?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+(j==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end();g(".plupload_header_content",this.container).append(i)},destroy:function(){g(".plupload_button",this.element).unbind();if(g.ui.button){g(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy")}if(g.ui.progressbar){this.progressbar.progressbar("destroy")}if(g.ui.sortable&&this.options.sortable){g("tbody",this.filelist).sortable("destroy")}this.uploader.destroy();this.element.empty().html(this.contents_bak);this.contents_bak="";g.Widget.prototype.destroy.apply(this)}})}(window,document,plupload,jQuery)); \ No newline at end of file +(function(f,a,c,g,e){var h={};function b(i){return c.translate(i)||i}function d(i){i.html('
'+b("Select files")+'
'+b("Add files to the upload queue and click the start button.")+'
'+b("Filename")+''+b("Status")+''+b("Size")+' 
')}g.widget("ui.plupload",{contents_bak:"",runtime:null,options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:true,multiple_queues:true,buttons:{browse:true,start:true,stop:true},autostart:false,sortable:false,rename:false,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var i=this,k,j;k=this.element.attr("id");if(!k){k=c.guid();this.element.attr("id",k)}this.id=k;this.contents_bak=this.element.html();d(this.element);this.container=g(".plupload_container",this.element).attr("id",k+"_container");this.filelist=g(".plupload_filelist_content",this.container).attr({id:k+"_filelist",unselectable:"on"});this.browse_button=g(".plupload_add",this.container).attr("id",k+"_browse");this.start_button=g(".plupload_start",this.container).attr("id",k+"_start");this.stop_button=g(".plupload_stop",this.container).attr("id",k+"_stop");if(g.ui.button){this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:true});this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})}this.progressbar=g(".plupload_progress_container",this.container);if(g.ui.progressbar){this.progressbar.progressbar()}this.counter=g(".plupload_count",this.element).attr({id:k+"_count",name:k+"_count"});j=this.uploader=h[k]=new c.Uploader(g.extend({container:k,browse_button:k+"_browse"},this.options));j.bind("Error",function(l,m){if(m.code===c.INIT_ERROR){i.destroy()}});j.bind("Init",function(l,m){if(!i.options.buttons.browse){i.browse_button.button("disable").hide();l.disableBrowse(true)}if(!i.options.buttons.start){i.start_button.button("disable").hide()}if(!i.options.buttons.stop){i.stop_button.button("disable").hide()}if(!i.options.unique_names&&i.options.rename){i._enableRenaming()}if(j.features.dragdrop&&i.options.dragdrop){i._enableDragAndDrop()}i.container.attr("title",b("Using runtime: ")+(i.runtime=m.runtime));i.start_button.click(function(n){if(!g(this).button("option","disabled")){i.start()}n.preventDefault()});i.stop_button.click(function(n){i.stop();n.preventDefault()})});if(i.options.max_file_count){j.bind("FilesAdded",function(l,n){var o=[],m=n.length;var p=l.files.length+m-i.options.max_file_count;if(p>0){o=n.splice(m-p,p);l.trigger("Error",{code:i.FILE_COUNT_ERROR,message:b("File count error."),file:o})}})}j.init();j.bind("FilesAdded",function(l,m){i._trigger("selected",null,{up:l,files:m});if(i.options.autostart){setTimeout(function(){i.start()},10)}});j.bind("FilesRemoved",function(l,m){i._trigger("removed",null,{up:l,files:m})});j.bind("QueueChanged",function(){i._updateFileList()});j.bind("StateChanged",function(){i._handleState()});j.bind("UploadFile",function(l,m){i._handleFileStatus(m)});j.bind("FileUploaded",function(l,m){i._handleFileStatus(m);i._trigger("uploaded",null,{up:l,file:m})});j.bind("UploadProgress",function(l,m){g("#"+m.id).find(".plupload_file_status").html(m.percent+"%").end().find(".plupload_file_size").html(c.formatSize(m.size));i._handleFileStatus(m);i._updateTotalProgress();i._trigger("progress",null,{up:l,file:m})});j.bind("UploadComplete",function(l,m){i._trigger("complete",null,{up:l,files:m})});j.bind("Error",function(l,p){var n=p.file,o,m;if(n){o=""+p.message+"";m=p.details;if(m){o+="
"+p.details+""}else{switch(p.code){case c.FILE_EXTENSION_ERROR:m=b("File: %s").replace("%s",n.name);break;case c.FILE_SIZE_ERROR:m=b("File: %f, size: %s, max file size: %m").replace(/%([fsm])/g,function(r,q){switch(q){case"f":return n.name;case"s":return n.size;case"m":return c.parseSize(i.options.max_file_size)}});break;case i.FILE_COUNT_ERROR:m=b("Upload element accepts only %d file(s) at a time. Extra files were stripped.").replace("%d",i.options.max_file_count);break;case c.IMAGE_FORMAT_ERROR:m=c.translate("Image format either wrong or not supported.");break;case c.IMAGE_MEMORY_ERROR:m=c.translate("Runtime ran out of available memory.");break;case c.IMAGE_DIMENSIONS_ERROR:m=c.translate("Resoultion out of boundaries! %s runtime supports images only up to %wx%hpx.").replace(/%([swh])/g,function(r,q){switch(q){case"s":return l.runtime;case"w":return l.features.maxWidth;case"h":return l.features.maxHeight}});break;case c.HTTP_ERROR:m=b("Upload URL might be wrong or doesn't exist");break}o+="
"+m+""}i.notify("error",o);i._trigger("error",null,{up:l,file:n,error:o})}})},_setOption:function(j,k){var i=this;if(j=="buttons"&&typeof(k)=="object"){k=g.extend(i.options.buttons,k);if(!k.browse){i.browse_button.button("disable").hide();up.disableBrowse(true)}else{i.browse_button.button("enable").show();up.disableBrowse(false)}if(!k.start){i.start_button.button("disable").hide()}else{i.start_button.button("enable").show()}if(!k.stop){i.stop_button.button("disable").hide()}else{i.start_button.button("enable").show()}}i.uploader.settings[j]=k},start:function(){this.uploader.start();this._trigger("start",null)},stop:function(){this.uploader.stop();this._trigger("stop",null)},getFile:function(j){var i;if(typeof j==="number"){i=this.uploader.files[j]}else{i=this.uploader.getFile(j)}return i},removeFile:function(j){var i=this.getFile(j);if(i){this.uploader.removeFile(i)}},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},_handleState:function(){var j=this,i=this.uploader;if(i.state===c.STARTED){g(j.start_button).button("disable");g([]).add(j.stop_button).add(".plupload_started").removeClass("plupload_hidden");g(".plupload_upload_status",j.element).text(b("Uploaded %d/%d files").replace("%d/%d",i.total.uploaded+"/"+i.files.length));g(".plupload_header_content",j.element).addClass("plupload_header_content_bw")}else{g([]).add(j.stop_button).add(".plupload_started").addClass("plupload_hidden");if(j.options.multiple_queues){g(j.start_button).button("enable");g(".plupload_header_content",j.element).removeClass("plupload_header_content_bw")}j._updateFileList()}},_handleFileStatus:function(l){var n,j;if(!g("#"+l.id).length){return}switch(l.status){case c.DONE:n="plupload_done";j="ui-icon ui-icon-circle-check";break;case c.FAILED:n="ui-state-error plupload_failed";j="ui-icon ui-icon-alert";break;case c.QUEUED:n="plupload_delete";j="ui-icon ui-icon-circle-minus";break;case c.UPLOADING:n="ui-state-highlight plupload_uploading";j="ui-icon ui-icon-circle-arrow-w";var i=g(".plupload_scroll",this.container),m=i.scrollTop(),o=i.height(),k=g("#"+l.id).position().top+g("#"+l.id).height();if(o'}i+='';i+='';l++;k.counter.val(l)}m.append(''+p.name+''+p.percent+'%'+c.formatSize(p.size)+'
'+i+"");k._handleFileStatus(p);g("#"+p.id+".plupload_delete .ui-icon, #"+p.id+".plupload_done .ui-icon").click(function(r){g("#"+p.id).remove();j.removeFile(p);r.preventDefault()});k._trigger("updatelist",null,m)});if(j.total.queued===0){g(".ui-button-text",k.browse_button).text(b("Add Files"))}else{g(".ui-button-text",k.browse_button).text(b("%d files queued").replace("%d",j.total.queued))}if(j.files.length===(j.total.uploaded+j.total.failed)){k.start_button.button("disable")}else{k.start_button.button("enable")}m[0].scrollTop=m[0].scrollHeight;k._updateTotalProgress();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){g("#"+o+"_filelist").append(''+b("Drag files here.")+"")}else{if(k.options.sortable&&g.ui.sortable){k._enableSortingList()}}},_enableRenaming:function(){var i=this;g(".plupload_delete .plupload_file_name span",this.filelist).live("click",function(o){var m=g(o.target),k,n,j,l="";k=i.uploader.getFile(m.parents("tr")[0].id);j=k.name;n=/^(.+)(\.[^.]+)$/.exec(j);if(n){j=n[1];l=n[2]}m.hide().after('');m.next().val(j).focus().blur(function(){m.show().next().remove()}).keydown(function(q){var p=g(this);if(g.inArray(q.keyCode,[13,27])!==-1){q.preventDefault();if(q.keyCode===13){k.name=p.val()+l;m.text(k.name)}p.blur()}})})},_enableDragAndDrop:function(){this.filelist.append(''+b("Drag files here.")+"");this.filelist.parent().attr("id",this.id+"_dropbox");this.uploader.settings.drop_element=this.options.drop_element=this.id+"_dropbox"},_enableSortingList:function(){var j,i=this;if(g("tbody tr",this.filelist).length<2){return}g("tbody",this.filelist).sortable({containment:"parent",items:".plupload_delete",helper:function(l,k){return k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width","100%")},stop:function(p,o){var l,n,k,m=[];g.each(g(this).sortable("toArray"),function(q,r){m[m.length]=i.uploader.getFile(r)});m.unshift(m.length);m.unshift(0);Array.prototype.splice.apply(i.uploader.files,m)}})},notify:function(j,k){var i=g('

'+k+"

");i.addClass("ui-state-"+(j==="error"?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+(j==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end();g(".plupload_header_content",this.container).append(i)},destroy:function(){g(".plupload_button",this.element).unbind();if(g.ui.button){g(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy")}if(g.ui.progressbar){this.progressbar.progressbar("destroy")}if(g.ui.sortable&&this.options.sortable){g("tbody",this.filelist).sortable("destroy")}this.uploader.destroy();this.element.empty().html(this.contents_bak);this.contents_bak="";g.Widget.prototype.destroy.apply(this)}})}(window,document,plupload,jQuery)); \ No newline at end of file diff --git a/public/javascripts/plupload/js/plupload.browserplus.js b/public/javascripts/plupload/js/plupload.browserplus.js index 77a0f11..e66404b 100644 --- a/public/javascripts/plupload/js/plupload.browserplus.js +++ b/public/javascripts/plupload/js/plupload.browserplus.js @@ -1 +1 @@ -(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l0){q(++s,u)}else{j.status=a.DONE;m.trigger("FileUploaded",j,{response:w.value.body,status:v});if(v>=400){m.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:j,status:v})}}}else{m.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:j,details:w.error})}})}function p(s){j.size=s.size;if(k){e.FileAccess.chunk({file:s,chunkSize:k},function(v){if(v.success){var w=v.value,t=w.length;n=Array(t);for(var u=0;u0){r(++t,v)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:x.value.body,status:w});if(w>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:k,status:w})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:k,details:x.error})}})}function q(t){k.size=t.size;if(l){e.FileAccess.chunk({file:t,chunkSize:l},function(w){if(w.success){var x=w.value,u=x.length;o=Array(u);for(var v=0;v';function m(){return b.getElementById(j.id+"_flash")}function l(){if(p++>5000){o({success:false});return}if(!g[j.id]){setTimeout(l,1)}}l();n=i=null;j.bind("Flash:Init",function(){var r={},q;m().setFileFilters(j.settings.filters,j.settings.multi_selection);if(g[j.id]){return}g[j.id]=true;j.bind("UploadFile",function(s,u){var v=s.settings,t=j.settings.resize||{};m().uploadFile(r[u.id],v.url,{name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,width:t.width,height:t.height,quality:t.quality,multipart:v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,format:/\.(jpg|jpeg)$/i.test(u.name)?"jpg":"png",headers:v.headers,urlstream_upload:v.urlstream_upload})});j.bind("Flash:UploadProcess",function(t,s){var u=t.getFile(r[s.id]);if(u.status!=d.FAILED){u.loaded=s.loaded;u.size=s.size;t.trigger("UploadProgress",u)}});j.bind("Flash:UploadChunkComplete",function(s,u){var v,t=s.getFile(r[u.id]);v={chunk:u.chunk,chunks:u.chunks,response:u.text};s.trigger("ChunkUploaded",t,v);if(t.status!=d.FAILED){m().uploadNextChunk()}if(u.chunk==u.chunks-1){t.status=d.DONE;s.trigger("FileUploaded",t,{response:u.text})}});j.bind("Flash:SelectFiles",function(s,v){var u,t,w=[],x;for(t=0;t';if(d.ua.ie){q=b.createElement("div");l.appendChild(q);q.outerHTML=p;q=null}else{l.innerHTML=p}}());function n(){return b.getElementById(m.id+"_flash")}function j(){if(h++>5000){o({success:false});return}if(g[m.id]===false){setTimeout(j,1)}}j();k=l=null;m.bind("Destroy",function(p){var q;d.removeAllEvents(b.body,p.id);delete g[p.id];delete a[p.id];q=b.getElementById(p.id+"_flash_container");if(q){i.removeChild(q)}});m.bind("Flash:Init",function(){var r={},q;try{n().setFileFilters(m.settings.filters,m.settings.multi_selection)}catch(p){o({success:false});return}if(g[m.id]){return}g[m.id]=true;m.bind("UploadFile",function(s,u){var v=s.settings,t=m.settings.resize||{};n().uploadFile(r[u.id],v.url,{name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,width:t.width,height:t.height,quality:t.quality,multipart:v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,format:/\.(jpg|jpeg)$/i.test(u.name)?"jpg":"png",headers:v.headers,urlstream_upload:v.urlstream_upload})});m.bind("CancelUpload",function(){n().cancelUpload()});m.bind("Flash:UploadProcess",function(t,s){var u=t.getFile(r[s.id]);if(u.status!=d.FAILED){u.loaded=s.loaded;u.size=s.size;t.trigger("UploadProgress",u)}});m.bind("Flash:UploadChunkComplete",function(s,u){var v,t=s.getFile(r[u.id]);v={chunk:u.chunk,chunks:u.chunks,response:u.text};s.trigger("ChunkUploaded",t,v);if(t.status!==d.FAILED&&s.state!==d.STOPPED){n().uploadNextChunk()}if(u.chunk==u.chunks-1){t.status=d.DONE;s.trigger("FileUploaded",t,{response:u.text})}});m.bind("Flash:SelectFiles",function(s,v){var u,t,w=[],x;for(t=0;t":"gt","&":"amp",'"':"quot","'":"#39"},m=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function k(){this.cancelBubble=true}(function(o){var p=o.split(/,/),q,s,r;for(q=0;q0){g.each(p,function(s,r){o[r]=s})}});return o},cleanName:function(o){var p,q;q=[/[\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(p=0;p0?"&":"?")+q}return p},each:function(r,s){var q,p,o;if(r){q=r.length;if(q===b){for(p in r){if(r.hasOwnProperty(p)){if(s(r[p],p)===false){return}}}}else{for(o=0;o1073741824){return Math.round(o/1073741824,1)+" GB"}if(o>1048576){return Math.round(o/1048576,1)+" MB"}if(o>1024){return Math.round(o/1024,1)+" KB"}return o+" b"},getPos:function(p,t){var u=0,s=0,w,v=document,q,r;p=p;t=t||v.body;function o(C){var A,B,z=0,D=0;if(C){B=C.getBoundingClientRect();A=v.compatMode==="CSS1Compat"?v.documentElement:v.body;z=B.left+A.scrollLeft;D=B.top+A.scrollTop}return{x:z,y:D}}if(p&&p.getBoundingClientRect&&(navigator.userAgent.indexOf("MSIE")>0&&v.documentMode!==8)){q=o(p);r=o(t);return{x:q.x-r.x,y:q.y-r.y}}w=p;while(w&&w!=t&&w.nodeType){u+=w.offsetLeft||0;s+=w.offsetTop||0;w=w.offsetParent}w=p.parentNode;while(w&&w!=t&&w.nodeType){u-=w.scrollLeft||0;s-=w.scrollTop||0;w=w.parentNode}return{x:u,y:s}},getSize:function(o){return{w:o.offsetWidth||o.clientWidth,h:o.offsetHeight||o.clientHeight}},parseSize:function(o){var p;if(typeof(o)=="string"){o=/^([0-9]+)([mgk]?)$/.exec(o.toLowerCase().replace(/[^0-9mkg]/g,""));p=o[2];o=+o[1];if(p=="g"){o*=1073741824}if(p=="m"){o*=1048576}if(p=="k"){o*=1024}}return o},xmlEncode:function(o){return o?(""+o).replace(m,function(p){return a[p]?"&"+a[p]+";":p}):o},toArray:function(q){var p,o=[];for(p=0;p=0;p--){if(r[p].key===q||r[p].orig===u){if(t.detachEvent){t.detachEvent("on"+o,r[p].func)}else{if(t.removeEventListener){t.removeEventListener(o,r[p].func,false)}}r[p].orig=null;r[p].func=null;r.splice(p,1);if(u!==b){break}}}if(!r.length){delete d[t[e]][o]}if(g.isEmptyObj(d[t[e]])){delete d[t[e]];try{delete t[e]}catch(s){t[e]=b}}},removeAllEvents:function(p){var o=arguments[1];if(p[e]===b||!p[e]){return}g.each(d[p[e]],function(r,q){g.removeEvent(p,q,o)})}};g.Uploader=function(r){var p={},u,t=[],q;u=new g.QueueProgress();r=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},r);function s(){var w,x=0,v;if(this.state==g.STARTED){for(v=0;v0?Math.ceil(u.uploaded/t.length*100):0}else{u.bytesPerSec=Math.ceil(u.loaded/((+new Date()-q||1)/1000));u.percent=u.size>0?Math.ceil(u.loaded/u.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:t,settings:r,total:u,id:g.guid(),init:function(){var A=this,B,x,w,z=0,y;if(typeof(r.preinit)=="function"){r.preinit(A)}else{g.each(r.preinit,function(D,C){A.bind(C,D)})}r.page_url=r.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(r.url)){r.url=r.page_url+r.url}r.chunk_size=g.parseSize(r.chunk_size);r.max_file_size=g.parseSize(r.max_file_size);A.bind("FilesAdded",function(C,F){var E,D,H=0,I,G=r.filters;if(G&&G.length){I=[];g.each(G,function(J){g.each(J.extensions.split(/,/),function(K){if(/^\s*\*\s*$/.test(K)){I.push("\\.*")}else{I.push("\\."+K.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});I=new RegExp(I.join("|")+"$","i")}for(E=0;Er.max_file_size){C.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:D});continue}t.push(D);H++}if(H){c(function(){A.trigger("QueueChanged");A.refresh()},1)}else{return false}});if(r.unique_names){A.bind("UploadFile",function(C,D){var F=D.name.match(/\.([^.]+)$/),E="tmp";if(F){E=F[1]}D.target_name=D.id+"."+E})}A.bind("UploadProgress",function(C,D){D.percent=D.size>0?Math.ceil(D.loaded/D.size*100):100;o()});A.bind("StateChanged",function(C){if(C.state==g.STARTED){q=(+new Date())}else{if(C.state==g.STOPPED){for(B=C.files.length-1;B>=0;B--){if(C.files[B].status==g.UPLOADING){C.files[B].status=g.QUEUED;o()}}}}});A.bind("QueueChanged",o);A.bind("Error",function(C,D){if(D.file){D.file.status=g.FAILED;o();if(C.state==g.STARTED){c(function(){s.call(A)},1)}}});A.bind("FileUploaded",function(C,D){D.status=g.DONE;D.loaded=D.size;C.trigger("UploadProgress",D);c(function(){s.call(A)},1)});if(r.runtimes){x=[];y=r.runtimes.split(/\s?,\s?/);for(B=0;B=0;v--){if(t[v].id===w){return t[v]}}},removeFile:function(w){var v;for(v=t.length-1;v>=0;v--){if(t[v].id===w.id){return this.splice(v,1)[0]}}},splice:function(x,v){var w;w=t.splice(x===b?0:x,v===b?t.length:v);this.trigger("FilesRemoved",w);this.trigger("QueueChanged");return w},trigger:function(w){var y=p[w.toLowerCase()],x,v;if(y){v=Array.prototype.slice.call(arguments);v[0]=this;for(x=0;x=0;w--){if(y[w].func===x){y.splice(w,1);break}}}else{y=[]}if(!y.length){delete p[v]}}},unbindAll:function(){var v=this;g.each(p,function(x,w){v.unbind(w)})},destroy:function(){this.trigger("Destroy");this.unbindAll()}})};g.File=function(r,p,q){var o=this;o.id=r;o.name=p;o.size=q;o.loaded=0;o.percent=0;o.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(o,p){}};g.QueueProgress=function(){var o=this;o.size=0;o.loaded=0;o.uploaded=0;o.failed=0;o.queued=0;o.percent=0;o.bytesPerSec=0;o.reset=function(){o.size=o.loaded=o.uploaded=o.failed=o.queued=o.percent=o.bytesPerSec=0}};g.runtimes={};window.plupload=g})();(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,k,m){var g,j,l,o;j=google.gears.factory.create("beta.canvas");try{j.decode(h);if(!k.width){k.width=j.width}if(!k.height){k.height=j.height}o=Math.min(width/j.width,height/j.height);if(o<1||(o===1&&m==="image/jpeg")){j.resize(Math.round(j.width*o),Math.round(j.height*o));if(k.quality){return j.encode(m,{quality:k.quality/100})}return j.encode(m)}}catch(n){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(j,l){var k;if(!e.google||!google.gears){return l({success:false})}try{k=google.gears.factory.create("beta.desktop")}catch(h){return l({success:false})}function g(o){var n,m,p=[],q;for(m=0;m0;t=Math.ceil(p.size/q);if(!m){q=p.size;t=1}function n(){var z,B,w=s.settings.multipart,v=0,A={name:p.target_name||p.name},x=s.settings.url;function y(D){var C,I="----pluploadboundary"+c.guid(),F="--",H="\r\n",E,G;if(w){z.setRequestHeader("Content-Type","multipart/form-data; boundary="+I);C=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(A,s.settings.multipart_params),function(K,J){C.append(F+I+H+'Content-Disposition: form-data; name="'+J+'"'+H+H);C.append(K+H)});G=c.mimeTypes[p.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";C.append(F+I+H+'Content-Disposition: form-data; name="'+s.settings.file_data_name+'"; filename="'+p.name+'"'+H+"Content-Type: "+G+H+H);C.append(D);C.append(H+F+I+F+H);E=C.getAsBlob();v=E.length-D.length;D=E}z.send(D)}if(p.status==c.DONE||p.status==c.FAILED||s.state==c.STOPPED){return}if(m){A.chunk=u;A.chunks=t}B=Math.min(q,p.size-(u*q));if(!w){x=c.buildUrl(s.settings.url,A)}z=google.gears.factory.create("beta.httprequest");z.open("POST",x);if(!w){z.setRequestHeader("Content-Disposition",'attachment; filename="'+p.name+'"');z.setRequestHeader("Content-Type","application/octet-stream")}c.each(s.settings.headers,function(D,C){z.setRequestHeader(C,D)});z.upload.onprogress=function(C){p.loaded=r+C.loaded-v;s.trigger("UploadProgress",p)};z.onreadystatechange=function(){var C;if(z.readyState==4){if(z.status==200){C={chunk:u,chunks:t,response:z.responseText,status:z.status};s.trigger("ChunkUploaded",p,C);if(C.cancelled){p.status=c.FAILED;return}r+=B;if(++u>=t){p.status=c.DONE;s.trigger("FileUploaded",p,{response:z.responseText,status:z.status})}else{n()}}else{s.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:p,chunk:u,chunks:t,status:z.status})}}};if(u3){l.pop()}while(l.length<4){l.push(0)}m=s.split(".");while(m.length>4){m.pop()}do{u=parseInt(m[q],10);n=parseInt(l[q],10);q++}while(q8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var r,s={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(t){r=[]});p.bind("Silverlight:SelectFile",function(t,w,u,v){var x;x=d.guid();s[x]=w;s[w]=x;r.push(new d.File(x,u,v))});p.bind("Silverlight:SelectSuccessful",function(){if(r.length){p.trigger("FilesAdded",r)}});p.bind("Silverlight:UploadChunkError",function(t,w,u,x,v){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:v,file:t.getFile(s[w])})});p.bind("Silverlight:UploadFileProgress",function(t,x,u,w){var v=t.getFile(s[x]);if(v.status!=d.FAILED){v.size=w;v.loaded=u;t.trigger("UploadProgress",v)}});p.bind("Refresh",function(t){var u,v,w;u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_silverlight_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(t,w,u,z,y){var x,v=t.getFile(s[w]);x={chunk:u,chunks:z,response:y};t.trigger("ChunkUploaded",v,x);if(v.status!=d.FAILED){j().UploadNextChunk()}if(u==z-1){v.status=d.DONE;t.trigger("FileUploaded",v,{response:y})}});p.bind("Silverlight:UploadSuccessful",function(t,w,u){var v=t.getFile(s[w]);v.status=d.DONE;t.trigger("FileUploaded",v,{response:u})});p.bind("FilesRemoved",function(t,v){var u;for(u=0;u';function n(){return b.getElementById(k.id+"_flash")}function m(){if(q++>5000){p({success:false});return}if(!g[k.id]){setTimeout(m,1)}}m();o=j=null;k.bind("Flash:Init",function(){var s={},r;n().setFileFilters(k.settings.filters,k.settings.multi_selection);if(g[k.id]){return}g[k.id]=true;k.bind("UploadFile",function(t,v){var w=t.settings,u=k.settings.resize||{};n().uploadFile(s[v.id],w.url,{name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,width:u.width,height:u.height,quality:u.quality,multipart:w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,format:/\.(jpg|jpeg)$/i.test(v.name)?"jpg":"png",headers:w.headers,urlstream_upload:w.urlstream_upload})});k.bind("Flash:UploadProcess",function(u,t){var v=u.getFile(s[t.id]);if(v.status!=d.FAILED){v.loaded=t.loaded;v.size=t.size;u.trigger("UploadProgress",v)}});k.bind("Flash:UploadChunkComplete",function(t,v){var w,u=t.getFile(s[v.id]);w={chunk:v.chunk,chunks:v.chunks,response:v.text};t.trigger("ChunkUploaded",u,w);if(u.status!=d.FAILED){n().uploadNextChunk()}if(v.chunk==v.chunks-1){u.status=d.DONE;t.trigger("FileUploaded",u,{response:v.text})}});k.bind("Flash:SelectFiles",function(t,w){var v,u,x=[],y;for(u=0;u0){r(++t,v)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:x.value.body,status:w});if(w>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:k,status:w})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:k,details:x.error})}})}function q(t){k.size=t.size;if(l){e.FileAccess.chunk({file:t,chunkSize:l},function(w){if(w.success){var x=w.value,u=x.length;o=Array(u);for(var v=0;v";F.scrollTop=100;D=k.getElementById(p.id+"_html5");if(v.features.triggerDialog){j.extend(D.style,{position:"absolute",width:"100%",height:"100%"})}else{j.extend(D.style,{cssFloat:"right",styleFloat:"right"})}D.onchange=function(){o(this.files);this.value=""};E=k.getElementById(v.settings.browse_button);if(E){var x=v.settings.browse_button_hover,z=v.settings.browse_button_active,w=v.features.triggerDialog?E:F;if(x){j.addEvent(w,"mouseover",function(){j.addClass(E,x)},v.id);j.addEvent(w,"mouseout",function(){j.removeClass(E,x)},v.id)}if(z){j.addEvent(w,"mousedown",function(){j.addClass(E,z)},v.id);j.addEvent(k.body,"mouseup",function(){j.removeClass(E,z)},v.id)}if(v.features.triggerDialog){j.addEvent(E,"click",function(y){k.getElementById(v.id+"_html5").click();y.preventDefault()},v.id)}}});p.bind("PostInit",function(){var r=k.getElementById(p.settings.drop_element);if(r){if(g){j.addEvent(r,"dragenter",function(v){var u,s,t;u=k.getElementById(p.id+"_drop");if(!u){u=k.createElement("input");u.setAttribute("type","file");u.setAttribute("id",p.id+"_drop");u.setAttribute("multiple","multiple");j.addEvent(u,"change",function(){o(this.files);j.removeEvent(u,"change",p.id);u.parentNode.removeChild(u)},p.id);r.appendChild(u)}s=j.getPos(r,k.getElementById(p.settings.container));t=j.getSize(r);if(j.getStyle(r,"position")==="static"){j.extend(r.style,{position:"relative"})}j.extend(u.style,{position:"absolute",display:"block",top:0,left:0,width:t.w+"px",height:t.h+"px",opacity:0})},p.id);return}j.addEvent(r,"dragover",function(s){s.preventDefault()},p.id);j.addEvent(r,"drop",function(t){var s=t.dataTransfer;if(s&&s.files){o(s.files)}t.preventDefault()},p.id)}});p.bind("Refresh",function(r){var s,t,u,w,v;s=k.getElementById(p.settings.browse_button);if(s){t=j.getPos(s,k.getElementById(r.settings.container));u=j.getSize(s);w=k.getElementById(p.id+"_html5_container");j.extend(w.style,{top:t.y+"px",left:t.x+"px",width:u.w+"px",height:u.h+"px"});if(p.features.triggerDialog){if(j.getStyle(s,"position")==="static"){j.extend(s.style,{position:"relative"})}v=parseInt(j.getStyle(s,"z-index"),10);if(isNaN(v)){v=0}j.extend(s.style,{zIndex:v});j.extend(w.style,{zIndex:v-1})}}});p.bind("UploadFile",function(r,t){var u=r.settings,x,s;function w(z,C,y){var A;if(File.prototype.slice){try{z.slice();return z.slice(C,y)}catch(B){return z.slice(C,y-C)}}else{if(A=File.prototype.webkitSlice||File.prototype.mozSlice){return A.call(z,C,y)}else{return null}}}function v(z){var C=0,B=0,y=("FileReader" in h)?new FileReader:null,D=typeof(z)==="string";function A(){var I,M,K,L,H,J,F,E=r.settings.url;function G(W){var T=0,U=new XMLHttpRequest,X=U.upload,N="----pluploadboundary"+j.guid(),O,P="--",V="\r\n",R="";if(X){X.onprogress=function(Y){t.loaded=Math.min(t.size,B+Y.loaded-T);r.trigger("UploadProgress",t)}}U.onreadystatechange=function(){var Y,aa;if(U.readyState==4){try{Y=U.status}catch(Z){Y=0}if(Y>=400){r.trigger("Error",{code:j.HTTP_ERROR,message:j.translate("HTTP Error."),file:t,status:Y})}else{if(K){aa={chunk:C,chunks:K,response:U.responseText,status:Y};r.trigger("ChunkUploaded",t,aa);B+=J;if(aa.cancelled){t.status=j.FAILED;return}t.loaded=Math.min(t.size,(C+1)*H)}else{t.loaded=t.size}r.trigger("UploadProgress",t);W=I=O=R=null;if(!K||++C>=K){t.status=j.DONE;r.trigger("FileUploaded",t,{response:U.responseText,status:Y})}else{A()}}U=null}};if(r.settings.multipart&&n.multipart){L.name=t.target_name||t.name;U.open("post",E,true);j.each(r.settings.headers,function(Z,Y){U.setRequestHeader(Y,Z)});if(!D&&!!h.FormData){O=new FormData();j.each(j.extend(L,r.settings.multipart_params),function(Z,Y){O.append(Y,Z)});O.append(r.settings.file_data_name,W);U.send(O);return}if(D){U.setRequestHeader("Content-Type","multipart/form-data; boundary="+N);j.each(j.extend(L,r.settings.multipart_params),function(Z,Y){R+=P+N+V+'Content-Disposition: form-data; name="'+Y+'"'+V+V;R+=unescape(encodeURIComponent(Z))+V});F=j.mimeTypes[t.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";R+=P+N+V+'Content-Disposition: form-data; name="'+r.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(t.name))+'"'+V+"Content-Type: "+F+V+V+W+V+P+N+P+V;T=R.length-W.length;W=R;if(U.sendAsBinary){U.sendAsBinary(W)}else{if(n.canSendBinary){var S=new Uint8Array(W.length);for(var Q=0;Qu.chunk_size&&(n.chunks||typeof(z)=="string")){H=u.chunk_size;K=Math.ceil(t.size/H);J=Math.min(H,t.size-(C*H));if(typeof(z)=="string"){I=z.substring(C*H,C*H+J)}else{I=w(z,C*H,C*H+J)}L.chunk=C;L.chunks=K}else{J=t.size;I=z}if(y&&n.cantSendBlobInFormData&&n.chunks&&r.settings.chunk_size){y.onload=function(){D=true;G(y.result)};y.readAsBinaryString(I)}else{G(I)}}A()}x=c[t.id];if(n.jpgresize&&r.settings.resize&&/\.(png|jpg|jpeg)$/i.test(t.name)){d.call(r,t,r.settings.resize,/\.png$/i.test(t.name)?"image/png":"image/jpeg",function(y){if(y.success){t.size=y.data.length;v(y.data)}else{v(x)}})}else{if(!n.chunks&&n.jpgresize){l(x,v)}else{v(x)}}});p.bind("Destroy",function(r){var t,u,s=k.body,v={inputContainer:r.id+"_html5_container",inputFile:r.id+"_html5",browseButton:r.settings.browse_button,dropElm:r.settings.drop_element};for(t in v){u=k.getElementById(v[t]);if(u){j.removeAllEvents(u,r.id)}}j.removeAllEvents(k.body,r.id);if(r.settings.container){s=k.getElementById(r.settings.container)}s.removeChild(k.getElementById(v.inputContainer))});q({success:true})}});function b(){var q=false,o;function r(t,v){var s=q?0:-8*(v-1),w=0,u;for(u=0;u>Math.abs(s+v*8))&255)}n(x,t,w)}return{II:function(s){if(s===e){return q}else{q=s}},init:function(s){q=false;o=s},SEGMENT:function(s,u,t){switch(arguments.length){case 1:return o.substr(s,o.length-s-1);case 2:return o.substr(s,u);case 3:n(t,s,u);break;default:return o}},BYTE:function(s){return r(s,1)},SHORT:function(s){return r(s,2)},LONG:function(s,t){if(t===e){return r(s,4)}else{p(s,t,4)}},SLONG:function(s){var t=r(s,4);return(t>2147483647?t-4294967296:t)},STRING:function(s,t){var u="";for(t+=s;s=65488&&p<=65495){n+=2;continue}if(p===65498||p===65497){break}q=r.SHORT(n+2)+2;if(u[p]&&r.STRING(n+4,u[p].signature.length)===u[p].signature){t.push({hex:p,app:u[p].app.toUpperCase(),name:u[p].name.toUpperCase(),start:n,length:q,segment:r.SEGMENT(n,q)})}n+=q}r.init(null);return{headers:t,restore:function(y){r.init(y);var w=new f(y);if(!w.headers){return false}for(var x=w.headers.length;x>0;x--){var z=w.headers[x-1];r.SEGMENT(z.start,z.length,"")}w.purge();n=r.SHORT(2)==65504?4+r.SHORT(4):2;for(var x=0,v=t.length;x=z.length){break}}},purge:function(){t=[];r.init(null)}}}function a(){var q,n,o={},t;q=new b();n={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};t={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function p(u,C){var w=q.SHORT(u),z,F,G,B,A,v,x,D,E=[],y={};for(z=0;z4){x=q.LONG(x)+o.tiffHeader}for(F=0;F4){x=q.LONG(x)+o.tiffHeader}y[G]=q.STRING(x,A-1);continue;case 3:if(A>2){x=q.LONG(x)+o.tiffHeader}for(F=0;F1){x=q.LONG(x)+o.tiffHeader}for(F=0;F