refinerycms-photo-gallery 0.0.1.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/Gemfile +26 -0
  2. data/LICENSE.md +8 -0
  3. data/README.md +224 -0
  4. data/app/assets/images/refinery/photo_gallery/admin/chosen-sprite.png +0 -0
  5. data/app/assets/images/refinery/photo_gallery/admin/icons/album.png +0 -0
  6. data/app/assets/images/refinery/photo_gallery/admin/icons/album_add.png +0 -0
  7. data/app/assets/images/refinery/photo_gallery/admin/icons/album_edit.png +0 -0
  8. data/app/assets/images/refinery/photo_gallery/admin/icons/cog.png +0 -0
  9. data/app/assets/images/refinery/photo_gallery/admin/icons/down.gif +0 -0
  10. data/app/assets/images/refinery/photo_gallery/admin/icons/folder.png +0 -0
  11. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_add.png +0 -0
  12. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_edit.png +0 -0
  13. data/app/assets/images/refinery/photo_gallery/admin/icons/loading.gif +0 -0
  14. data/app/assets/images/refinery/photo_gallery/admin/icons/page_copy.png +0 -0
  15. data/app/assets/images/refinery/photo_gallery/admin/icons/photo.png +0 -0
  16. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_add.png +0 -0
  17. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_edit.png +0 -0
  18. data/app/assets/images/refinery/photo_gallery/admin/icons/up.gif +0 -0
  19. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/backgrounds.gif +0 -0
  20. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons-disabled.png +0 -0
  21. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons.png +0 -0
  22. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/delete.gif +0 -0
  23. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/done.gif +0 -0
  24. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/error.gif +0 -0
  25. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/throbber.gif +0 -0
  26. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/transp50.png +0 -0
  27. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload-bw.png +0 -0
  28. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload.png +0 -0
  29. data/app/assets/images/refinery/photo_gallery/admin/rss-feed.png +0 -0
  30. data/app/assets/images/refinery/photo_gallery/fancybox/blank.gif +0 -0
  31. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_loading.gif +0 -0
  32. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_sprite.png +0 -0
  33. data/app/assets/images/refinery/photo_gallery/fancybox/helpers/fancybox_buttons.png +0 -0
  34. data/app/assets/javascripts/refinery/photo_gallery/admin/jquery.chosen.min.js +10 -0
  35. data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js +28 -0
  36. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/changelog.txt +218 -0
  37. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cs.js +14 -0
  38. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/da.js +12 -0
  39. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/de.js +24 -0
  40. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js +14 -0
  41. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js +25 -0
  42. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js +33 -0
  43. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js +37 -0
  44. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js +33 -0
  45. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js +35 -0
  46. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js +25 -0
  47. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hr.js +25 -0
  48. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hu.js +33 -0
  49. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/it.js +24 -0
  50. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ja.js +37 -0
  51. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ko.js +36 -0
  52. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lv.js +33 -0
  53. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/nl.js +21 -0
  54. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pl.js +24 -0
  55. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt-br.js +35 -0
  56. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ro.js +24 -0
  57. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ru.js +21 -0
  58. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sk.js +37 -0
  59. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sr.js +14 -0
  60. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sv.js +12 -0
  61. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js +195 -0
  62. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.js +383 -0
  63. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/license.txt +339 -0
  64. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.browserplus.js +1 -0
  65. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.js +226 -0
  66. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.swf +0 -0
  67. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js +2525 -0
  68. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js.default +2525 -0
  69. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.gears.js +1 -0
  70. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html4.js +1 -0
  71. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js +765 -0
  72. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js.default +765 -0
  73. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.js +618 -0
  74. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.js +1 -0
  75. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap +0 -0
  76. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/readme.md +46 -0
  77. data/app/assets/javascripts/refinery/photo_gallery/fancybox/CHANGELOG.md +68 -0
  78. data/app/assets/javascripts/refinery/photo_gallery/fancybox/README.md +212 -0
  79. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.js +115 -0
  80. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-media.js +85 -0
  81. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.js +157 -0
  82. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.js +1463 -0
  83. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.pack.js +35 -0
  84. data/app/assets/javascripts/refinery/photo_gallery/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +13 -0
  85. data/app/assets/stylesheets/refinery/photo_gallery/admin/chosen.css.scss +396 -0
  86. data/app/assets/stylesheets/refinery/photo_gallery/admin/photo_gallery.css.scss +109 -0
  87. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css.scss +177 -0
  88. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.css.scss +147 -0
  89. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.css.scss +85 -0
  90. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.css +54 -0
  91. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/jquery.fancybox.css.scss +234 -0
  92. data/app/controllers/refinery/photo_gallery/admin/albums_controller.rb +23 -0
  93. data/app/controllers/refinery/photo_gallery/admin/collections_controller.rb +10 -0
  94. data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +67 -0
  95. data/app/controllers/refinery/photo_gallery/albums_controller.rb +21 -0
  96. data/app/controllers/refinery/photo_gallery/collections_controller.rb +28 -0
  97. data/app/helpers/refinery/photo_gallery/admin/photos_helper.rb +10 -0
  98. data/app/helpers/refinery/photo_gallery/albums_helper.rb +11 -0
  99. data/app/helpers/refinery/photo_gallery/photo_gallery_helper.rb +58 -0
  100. data/app/middleware/refinery/photo_gallery/admin/flash_session_cookie_middleware.rb +27 -0
  101. data/app/models/refinery/photo_gallery/album.rb +60 -0
  102. data/app/models/refinery/photo_gallery/collection.rb +29 -0
  103. data/app/models/refinery/photo_gallery/collection_album.rb +8 -0
  104. data/app/models/refinery/photo_gallery/photo.rb +54 -0
  105. data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +121 -0
  106. data/app/views/refinery/photo_gallery/admin/_submenu.html.erb +44 -0
  107. data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +31 -0
  108. data/app/views/refinery/photo_gallery/admin/albums/_form.html.erb +78 -0
  109. data/app/views/refinery/photo_gallery/admin/albums/_sortable_list.html.erb +7 -0
  110. data/app/views/refinery/photo_gallery/admin/albums/edit.html.erb +2 -0
  111. data/app/views/refinery/photo_gallery/admin/albums/index.html.erb +28 -0
  112. data/app/views/refinery/photo_gallery/admin/albums/new.html.erb +2 -0
  113. data/app/views/refinery/photo_gallery/admin/collections/_collection.html.erb +23 -0
  114. data/app/views/refinery/photo_gallery/admin/collections/_form.html.erb +32 -0
  115. data/app/views/refinery/photo_gallery/admin/collections/_sortable_list.html.erb +7 -0
  116. data/app/views/refinery/photo_gallery/admin/collections/edit.html.erb +2 -0
  117. data/app/views/refinery/photo_gallery/admin/collections/index.html.erb +28 -0
  118. data/app/views/refinery/photo_gallery/admin/collections/new.html.erb +2 -0
  119. data/app/views/refinery/photo_gallery/admin/collections/test.html.erb +39 -0
  120. data/app/views/refinery/photo_gallery/admin/photos/_destroy.js.erb +15 -0
  121. data/app/views/refinery/photo_gallery/admin/photos/_form.html.erb +7 -0
  122. data/app/views/refinery/photo_gallery/admin/photos/_form_actions.html.erb +6 -0
  123. data/app/views/refinery/photo_gallery/admin/photos/_form_fields.html.erb +31 -0
  124. data/app/views/refinery/photo_gallery/admin/photos/_form_fields_actions.html.erb +15 -0
  125. data/app/views/refinery/photo_gallery/admin/photos/edit_multiple.html.erb +9 -0
  126. data/app/views/refinery/photo_gallery/admin/photos/upload.html.erb +87 -0
  127. data/app/views/refinery/photo_gallery/albums/show.html.erb +26 -0
  128. data/app/views/refinery/photo_gallery/collections/index.html.erb +9 -0
  129. data/app/views/refinery/photo_gallery/collections/show.html.erb +19 -0
  130. data/app/views/refinery/photo_gallery/shared/_layout.html.erb +22 -0
  131. data/app/views/refinery/photo_gallery/shared/_submenu.html.erb +4 -0
  132. data/config/initializers/carrierwave.rb +7 -0
  133. data/config/initializers/form_builder.rb +26 -0
  134. data/config/initializers/refinery/core.rb +10 -0
  135. data/config/initializers/s3.rb +13 -0
  136. data/config/initializers/session_store.rb +10 -0
  137. data/config/locales/en.yml +95 -0
  138. data/config/locales/sk.yml +94 -0
  139. data/config/routes.rb +37 -0
  140. data/db/migrate/20120804063842_create_albums.rb +18 -0
  141. data/db/migrate/20120805131321_create_collections.rb +14 -0
  142. data/db/migrate/20120805131547_create_collection_albums.rb +12 -0
  143. data/db/migrate/20120805165238_create_photos.rb +19 -0
  144. data/db/migrate/20120805222125_add_indexes.rb +24 -0
  145. data/db/seeds.rb +21 -0
  146. data/lib/generators/refinery/photo_gallery_generator.rb +25 -0
  147. data/lib/generators/refinery/templates/config/initializers/refinery/photo_gallery.rb.erb +40 -0
  148. data/lib/refinery/photo_gallery.rb +30 -0
  149. data/lib/refinery/photo_gallery/configuration.rb +33 -0
  150. data/lib/refinery/photo_gallery/engine.rb +33 -0
  151. data/lib/refinery/photo_gallery/version.rb +17 -0
  152. data/lib/refinerycms-photo-gallery.rb +1 -0
  153. data/refinerycms-balder-photo-gallery.gemspec +30 -0
  154. data/screenshots/01_collections#index.png +0 -0
  155. data/screenshots/02_albums#create.png +0 -0
  156. data/screenshots/03_photos#upload.png +0 -0
  157. data/screenshots/04_photos#upload- chooser.png +0 -0
  158. data/screenshots/05_photo#upoad-queue.png +0 -0
  159. data/screenshots/06_photos#upload-uploading.png +0 -0
  160. data/screenshots/07_photos#upload-uploading_2.png +0 -0
  161. data/screenshots/08_photos#edit_multiple.png +0 -0
  162. data/screenshots/09_albums#index.png +0 -0
  163. data/screenshots/10_albums_EXIF_reading.png +0 -0
  164. data/screenshots/11_frontend_show.png +0 -0
  165. data/screenshots/12_show_photo_using_fancybox.png +0 -0
  166. metadata +323 -0
@@ -0,0 +1,21 @@
1
+ // Dutch
2
+ plupload.addI18n({
3
+ 'Select files' : 'Selecteer bestand(en):',
4
+ 'Add files to the upload queue and click the start button.' : 'Voeg bestanden toe aan de wachtrij en druk op \'Start\'.',
5
+ 'Filename' : 'Bestandsnaam',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Grootte',
8
+ 'Add files' : 'Voeg bestanden toe',
9
+ 'Stop current upload' : 'Stop upload',
10
+ 'Start uploading queue' : 'Start upload',
11
+ 'Uploaded %d/%d files': '%d/%d bestanden ge-upload',
12
+ 'N/A' : 'Niet beschikbaar',
13
+ 'Drag files here.' : 'Sleep bestanden hierheen.',
14
+ 'File extension error.': 'Ongeldig bestandstype.',
15
+ 'File size error.': 'Bestandsgrootte Error.',
16
+ 'Init error.': 'Initialisatie error.',
17
+ 'HTTP Error.': 'HTTP Error.',
18
+ 'Security error.': 'Beveiliging error.',
19
+ 'Generic error.': 'Onbekende error.',
20
+ 'IO error.': 'IO error.'
21
+ });
@@ -0,0 +1,24 @@
1
+ plupload.addI18n({
2
+ 'Select files' : 'Wybierz pliki:',
3
+ 'Add files to the upload queue and click the start button.' : 'Dodaj pliki i kliknij \'Rozpocznij transfer\'.',
4
+ 'Filename' : 'Nazwa pliku',
5
+ 'Status' : 'Status',
6
+ 'Size' : 'Rozmiar',
7
+ 'Add files' : 'Dodaj pliki',
8
+ 'Stop current upload' : 'Przerwij aktualny transfer',
9
+ 'Start uploading queue' : 'Rozpocznij wysyłanie',
10
+ 'Uploaded %d/%d files': 'Wysłano %d/%d plików',
11
+ 'N/A' : 'Nie dostępne',
12
+ 'Drag files here.' : 'Przeciągnij tu pliki',
13
+ 'File extension error.': 'Nieobsługiwany format pliku.',
14
+ 'File size error.': 'Plik jest zbyt duży.',
15
+ 'Init error.': 'Błąd inicjalizacji.',
16
+ 'HTTP Error.': 'Błąd HTTP.',
17
+ 'Security error.': 'Błąd bezpieczeństwa.',
18
+ 'Generic error.': 'Błąd ogólny.',
19
+ 'IO error.': 'Błąd IO.',
20
+ 'Stop Upload': 'Przerwij transfer.',
21
+ 'Add Files': 'Dodaj pliki',
22
+ 'Start upload': 'Rozpocznij transfer.',
23
+ '%d files queued': '%d plików w kolejce.'
24
+ });
@@ -0,0 +1,35 @@
1
+ // Brazilian Portuguese
2
+ plupload.addI18n({
3
+ 'Select files' : 'Escolha os arquivos',
4
+ 'Add files to the upload queue and click the start button.' : 'Adicione os arquivos abaixo e clique no botão "Iniciar o envio".',
5
+ 'Filename' : 'Nome do arquivo',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Tamanho',
8
+ 'Add Files' : 'Adicionar arquivo(s)',
9
+ 'Stop Upload' : 'Parar o envio',
10
+ 'Start Upload' : 'Iniciar o envio',
11
+ 'Add files' : 'Adicionar arquivo(s)',
12
+ 'Add files.' : 'Adicionar arquivo(s)',
13
+ 'Stop upload' : 'Parar o envio',
14
+ 'Start upload' : 'Iniciar o envio',
15
+ 'Uploaded %d/%d files': 'Enviado(s) %d/%d arquivo(s)',
16
+ 'N/A' : 'N/D',
17
+ 'Drag files here.' : 'Arraste os arquivos pra cá',
18
+ 'File extension error.': 'Tipo de arquivo não permitido.',
19
+ 'File size error.': 'Tamanho de arquivo não permitido.',
20
+ 'File count error.': 'Erro na contagem dos arquivos',
21
+ 'Init error.': 'Erro inicializando.',
22
+ 'HTTP Error.': 'Erro HTTP.',
23
+ 'Security error.': 'Erro de segurança.',
24
+ 'Generic error.': 'Erro genérico.',
25
+ 'IO error.': 'Erro de E/S.',
26
+ 'File: %s': 'Arquivo: %s',
27
+ 'Close': 'Fechar',
28
+ '%d files queued': '%d arquivo(s)',
29
+ 'Using runtime: ': 'Usando: ',
30
+ 'File: %f, size: %s, max file size: %m': 'Arquivo: %f, tamanho: %s, máximo: %m',
31
+ '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.',
32
+ 'Upload URL might be wrong or doesn\'t exist': 'URL de envio está errada ou não existe',
33
+ 'Error: File too large: ': 'Erro: Arquivo muito grande: ',
34
+ 'Error: Invalid file extension: ': 'Erro: Tipo de arquivo não permitido: '
35
+ });
@@ -0,0 +1,24 @@
1
+ // Romanian
2
+ plupload.addI18n({
3
+ 'Select files' : 'Selectare fişiere',
4
+ 'Add files to the upload queue and click the start button.' : 'Adaugă fişiere în lista apoi apasă butonul \'Începe încărcare\'.',
5
+ 'Filename' : 'Nume fişier',
6
+ 'Status' : 'Stare',
7
+ 'Size' : 'Mărime',
8
+ 'Add files' : 'Adăugare fişiere',
9
+ 'Stop current upload' : 'Întrerupe încărcarea curentă',
10
+ 'Start uploading queue' : 'Începe incărcarea',
11
+ 'Uploaded %d/%d files': 'Fişiere încărcate %d/%d',
12
+ 'N/A' : 'N/A',
13
+ 'Drag files here.' : 'Trage aici fişierele',
14
+ 'File extension error.': 'Extensie fişier eronată',
15
+ 'File size error.': 'Eroare dimensiune fişier',
16
+ 'Init error.': 'Eroare iniţializare',
17
+ 'HTTP Error.': 'Eroare HTTP',
18
+ 'Security error.': 'Eroare securitate',
19
+ 'Generic error.': 'Eroare generică',
20
+ 'IO error.': 'Eroare Intrare/Ieşire',
21
+ 'Stop Upload': 'Oprire încărcare',
22
+ 'Start upload': 'Începe încărcare',
23
+ '%d files queued': '%d fişiere listate'
24
+ });
@@ -0,0 +1,21 @@
1
+ // Russian
2
+ plupload.addI18n({
3
+ 'Select files' : 'Выберите файлы',
4
+ 'Add files to the upload queue and click the start button.' : 'Добавьте файлы в очередь и нажмите кнопку "Загрузить файлы".',
5
+ 'Filename' : 'Имя файла',
6
+ 'Status' : 'Статус',
7
+ 'Size' : 'Размер',
8
+ 'Add files' : 'Добавить файлы',
9
+ 'Stop current upload' : 'Остановить загрузку',
10
+ 'Start uploading queue' : 'Загрузить файлы',
11
+ 'Uploaded %d/%d files': 'Загружено %d из %d файлов',
12
+ 'N/A' : 'N/D',
13
+ 'Drag files here.' : 'Перетащите файлы сюда.',
14
+ 'File extension error.': 'Неправильное расширение файла.',
15
+ 'File size error.': 'Неправильный размер файла.',
16
+ 'Init error.': 'Ошибка инициализации.',
17
+ 'HTTP Error.': 'Ошибка HTTP.',
18
+ 'Security error.': 'Ошибка безопасности.',
19
+ 'Generic error.': 'Общая ошибка.',
20
+ 'IO error.': 'Ошибка ввода-вывода.'
21
+ });
@@ -0,0 +1,37 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Vyberte súbory',
4
+ 'Add files to the upload queue and click the start button.' : 'Pridajte súbory do frontu nahrávania a kliknite spustiť nahrávanie.',
5
+ 'Filename' : 'Názov súboru',
6
+ 'Status' : 'Stav',
7
+ 'Size' : 'Veľkosť',
8
+ 'Add files' : 'Pridať súbory',
9
+ 'Start upload': 'Spustiť nahrávanie',
10
+ 'Stop Upload': 'Zastaviť nahrávanie.',
11
+ 'Drag files here.' : 'Sem pretiahnite súbory.',
12
+ 'Uploaded %d/%d files': 'Nahraných súborov: %d/%d ',
13
+ 'Error: File too large: ': 'Chyba: Súbor je príliš veľký.',
14
+ 'Error: Invalid file extension: ': 'Chyba: Nesprávna prípona súboru',
15
+ 'Stop current upload' : 'Zastaviť prebiehajúce nahrávanie',
16
+ 'Start uploading queue' : 'Spustiť nahrávanie frontu',
17
+ 'Using runtime:': 'Pomocou ',
18
+ 'N/A' : 'Nie je k dispozícii',
19
+ 'File extension error.': 'Nesprávna prípona súboru.',
20
+ 'File size error.': 'Nesprávna veľkosť súboru.',
21
+ 'Init error.': 'Chyba počas inicializácie',
22
+ 'HTTP Error.': 'HTTP chyba.',
23
+ 'Security error.': 'Chyba zabezpečenia.',
24
+ 'Generic error.': 'Všeobecná chyba.',
25
+ 'IO error.': 'Vstupno - výstupná chyba.',
26
+ '%d files queued': '%d súborov čakajúcich vo fronte.',
27
+ 'File: %s': 'Súbor: %s',
28
+ 'File: %f, size: %s, max file size: %m': 'Súbor: % f, veľkosť: % s, maximálna veľkosť súboru: % m',
29
+ 'Upload element accepts only % d file (s) at a time. Extra files were stripped': 'Naraz môžete nahrávať iba % d súborov. Ostatné súbory boli vynechané.',
30
+ 'Upload URL might be wrong or doesn \'t exist ':'Adresa nahrávanie je asi nesprávna, alebo neexistujúca.',
31
+
32
+ 'File count error.': 'File count error.',
33
+ 'Image format either wrong or not supported.': 'Image format either wrong or not supported.',
34
+ 'Runtime ran out of available memory.': 'Image format either wrong or not supported.',
35
+ 'Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.': 'Image format either wrong or not supported.',
36
+
37
+ });
@@ -0,0 +1,14 @@
1
+ // Serbian
2
+ plupload.addI18n({
3
+ 'Select files' : 'Izaberite fajlove',
4
+ 'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.',
5
+ 'Filename' : 'Naziv fajla',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Veličina',
8
+ 'Add Files' : 'Dodaj fajlove',
9
+ 'Stop current upload' : 'Zaustavi upload',
10
+ 'Start uploading queue' : 'Počni upload',
11
+ 'Drag files here.' : 'Prevucite fajlove ovde.',
12
+ 'Start Upload': 'Počni upload',
13
+ 'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
14
+ });
@@ -0,0 +1,12 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Välj filer',
4
+ 'Add files to the upload queue and click the start button.' : 'Lägg till filer till kön och tryck på start.',
5
+ 'Filename' : 'Filnamn',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Storlek',
8
+ 'Add files' : 'Lägg till filer',
9
+ 'Stop current upload' : 'Stoppa uppladdningen',
10
+ 'Start uploading queue' : 'Starta uppladdningen',
11
+ 'Drag files here.' : 'Dra filer hit'
12
+ });
@@ -0,0 +1,195 @@
1
+ (function (c) {
2
+ var d = {};
3
+
4
+ function a(e) {
5
+ return plupload.translate(e) || e
6
+ }
7
+
8
+ function b(f, e) {
9
+ e.contents().each(function (g, h) {
10
+ h = c(h);
11
+ if (!h.is(".plupload")) {
12
+ h.remove()
13
+ }
14
+ });
15
+ e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="' + f + '_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">' + a("Select files") + '</div><div class="plupload_header_text">' + a("Add files to the upload queue and click the start button.") + '</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">' + a("Filename") + '</div><div class="plupload_file_action">&nbsp;</div><div class="plupload_file_status"><span>' + a("Status") + '</span></div><div class="plupload_file_size">' + a("Size") + '</div><div class="plupload_clearer">&nbsp;</div></div><ul id="' + f + '_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">' + a("Add files") + '</a><a href="#" class="plupload_button plupload_start">' + a("Start upload") + '</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer">&nbsp;</div></div></div></div></div><input type="hidden" id="' + f + '_count" name="' + f + '_count" value="0" /></div>')
16
+ }
17
+
18
+ c.fn.pluploadQueue = function (e) {
19
+ if (e) {
20
+ this.each(function () {
21
+ var j, i, k;
22
+ i = c(this);
23
+ k = i.attr("id");
24
+ if (!k) {
25
+ k = plupload.guid();
26
+ i.attr("id", k)
27
+ }
28
+ j = new plupload.Uploader(c.extend({dragdrop:true, container:k}, e));
29
+ d[k] = j;
30
+ function h(l) {
31
+ var n;
32
+ if (l.status == plupload.DONE) {
33
+ n = "plupload_done"
34
+ }
35
+ if (l.status == plupload.FAILED) {
36
+ n = "plupload_failed"
37
+ }
38
+ if (l.status == plupload.QUEUED) {
39
+ n = "plupload_delete"
40
+ }
41
+ if (l.status == plupload.UPLOADING) {
42
+ n = "plupload_uploading"
43
+ }
44
+ var m = c("#" + l.id).attr("class", n).find("a").css("display", "block");
45
+ if (l.hint) {
46
+ m.attr("title", l.hint)
47
+ }
48
+ }
49
+
50
+ function f() {
51
+ c("span.plupload_total_status", i).html(j.total.percent + "%");
52
+ c("div.plupload_progress_bar", i).css("width", j.total.percent + "%");
53
+ c("span.plupload_upload_status", i).text(a("Uploaded %d/%d files").replace(/%d\/%d/, j.total.uploaded + "/" + j.files.length))
54
+ }
55
+
56
+ function g() {
57
+ var m = c("ul.plupload_filelist", i).html(""), n = 0, l;
58
+ c.each(j.files, function (p, o) {
59
+ l = "";
60
+ if (o.status == plupload.DONE) {
61
+ if (o.target_name) {
62
+ l += '<input type="hidden" name="' + k + "_" + n + '_tmpname" value="' + plupload.xmlEncode(o.target_name) + '" />'
63
+ }
64
+ l += '<input type="hidden" name="' + k + "_" + n + '_name" value="' + plupload.xmlEncode(o.name) + '" />';
65
+ l += '<input type="hidden" name="' + k + "_" + n + '_status" value="' + (o.status == plupload.DONE ? "done" : "failed") + '" />';
66
+ n++;
67
+ c("#" + k + "_count").val(n)
68
+ }
69
+ m.append('<li id="' + o.id + '"><div class="plupload_file_name"><span>' + o.name + '</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">' + o.percent + '%</div><div class="plupload_file_size">' + plupload.formatSize(o.size) + '</div><div class="plupload_clearer">&nbsp;</div>' + l + "</li>");
70
+ h(o);
71
+ c("#" + o.id + ".plupload_delete a").click(function (q) {
72
+ c("#" + o.id).remove();
73
+ j.removeFile(o);
74
+ q.preventDefault()
75
+ })
76
+ });
77
+ c("span.plupload_total_file_size", i).html(plupload.formatSize(j.total.size));
78
+ if (j.total.queued === 0) {
79
+ c("span.plupload_add_text", i).text(a("Add files."))
80
+ } else {
81
+ c("span.plupload_add_text", i).text(j.total.queued + " files queued.")
82
+ }
83
+ c("a.plupload_start", i).toggleClass("plupload_disabled", j.files.length == (j.total.uploaded + j.total.failed));
84
+ m[0].scrollTop = m[0].scrollHeight;
85
+ f();
86
+ if (!j.files.length && j.features.dragdrop && j.settings.dragdrop) {
87
+ c("#" + k + "_filelist").append('<li class="plupload_droptext">' + a("Drag files here.") + "</li>")
88
+ }
89
+ }
90
+
91
+ j.bind("UploadFile", function (l, m) {
92
+ c("#" + m.id).addClass("plupload_current_file")
93
+ });
94
+ j.bind("Init", function (l, m) {
95
+ b(k, i);
96
+ if (!e.unique_names && e.rename) {
97
+ c("#" + k + "_filelist div.plupload_file_name span", i).live("click", function (s) {
98
+ var q = c(s.target), o, r, n, p = "";
99
+ o = l.getFile(q.parents("li")[0].id);
100
+ n = o.name;
101
+ r = /^(.+)(\.[^.]+)$/.exec(n);
102
+ if (r) {
103
+ n = r[1];
104
+ p = r[2]
105
+ }
106
+ q.hide().after('<input type="text" />');
107
+ q.next().val(n).focus().blur(
108
+ function () {
109
+ q.show().next().remove()
110
+ }).keydown(function (u) {
111
+ var t = c(this);
112
+ if (u.keyCode == 13) {
113
+ u.preventDefault();
114
+ o.name = t.val() + p;
115
+ q.text(o.name);
116
+ t.blur()
117
+ }
118
+ })
119
+ })
120
+ }
121
+ c("a.plupload_add", i).attr("id", k + "_browse");
122
+ l.settings.browse_button = k + "_browse";
123
+ if (l.features.dragdrop && l.settings.dragdrop) {
124
+ l.settings.drop_element = k + "_filelist";
125
+ c("#" + k + "_filelist").append('<li class="plupload_droptext">' + a("Drag files here.") + "</li>")
126
+ }
127
+ c("#" + k + "_container").attr("title", "Using runtime: " + m.runtime);
128
+ c("a.plupload_start", i).click(function (n) {
129
+ if (!c(this).hasClass("plupload_disabled")) {
130
+ j.start()
131
+ }
132
+ n.preventDefault()
133
+ });
134
+ c("a.plupload_stop", i).click(function (n) {
135
+ n.preventDefault();
136
+ j.stop()
137
+ });
138
+ c("a.plupload_start", i).addClass("plupload_disabled")
139
+ });
140
+ j.init();
141
+ j.bind("Error", function (l, o) {
142
+ var m = o.file, n;
143
+ if (m) {
144
+ n = o.message;
145
+ if (o.details) {
146
+ n += " (" + o.details + ")"
147
+ }
148
+ if (o.code == plupload.FILE_SIZE_ERROR) {
149
+ alert(a("Error: File too large: ") + m.name)
150
+ }
151
+ if (o.code == plupload.FILE_EXTENSION_ERROR) {
152
+ alert(a("Error: Invalid file extension: ") + m.name)
153
+ }
154
+ m.hint = n;
155
+ c("#" + m.id).attr("class", "plupload_failed").find("a").css("display", "block").attr("title", n)
156
+ }
157
+ });
158
+ j.bind("StateChanged", function () {
159
+ if (j.state === plupload.STARTED) {
160
+ c("li.plupload_delete a,div.plupload_buttons", i).hide();
161
+ c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop", i).css("display", "block");
162
+ c("span.plupload_upload_status", i).text("Uploaded " + j.total.uploaded + "/" + j.files.length + " files");
163
+ if (e.multiple_queues) {
164
+ c("span.plupload_total_status,span.plupload_total_file_size", i).show()
165
+ }
166
+ } else {
167
+ g();
168
+ c("a.plupload_stop,div.plupload_progress", i).hide();
169
+ c("a.plupload_delete", i).css("display", "block")
170
+ }
171
+ });
172
+ j.bind("QueueChanged", g);
173
+ j.bind("FileUploaded", function (l, m) {
174
+ h(m)
175
+ });
176
+ j.bind("UploadProgress", function (l, m) {
177
+ c("#" + m.id + " div.plupload_file_status", i).html(m.percent + "%");
178
+ h(m);
179
+ f();
180
+ if (e.multiple_queues && j.total.uploaded + j.total.failed == j.files.length) {
181
+ c(".plupload_buttons,.plupload_upload_status", i).css("display", "inline");
182
+ c(".plupload_start", i).addClass("plupload_disabled");
183
+ c("span.plupload_total_status,span.plupload_total_file_size", i).hide()
184
+ }
185
+ });
186
+ if (e.setup) {
187
+ e.setup(j)
188
+ }
189
+ });
190
+ return this
191
+ } else {
192
+ return d[c(this[0]).attr("id")]
193
+ }
194
+ }
195
+ })(jQuery);
@@ -0,0 +1,383 @@
1
+ (function (f, a, c, g, e) {
2
+ var h = {};
3
+
4
+ function b(i) {
5
+ return c.translate(i) || i
6
+ }
7
+
8
+ function d(i) {
9
+ i.html('<div class="plupload_wrapper"><div class="ui-widget-content plupload_container"><div class="plupload"><div class="ui-state-default ui-widget-header plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">' + b("Select files") + '</div><div class="plupload_header_text">' + b("Add files to the upload queue and click the start button.") + '</div></div></div><div class="plupload_content"><table class="plupload_filelist"><tr class="ui-widget-header plupload_filelist_header"><td class="plupload_cell plupload_file_name">' + b("Filename") + '</td><td class="plupload_cell plupload_file_status">' + b("Status") + '</td><td class="plupload_cell plupload_file_size">' + b("Size") + '</td><td class="plupload_cell plupload_file_action">&nbsp;</td></tr></table><div class="plupload_scroll"><table class="plupload_filelist_content"></table></div><table class="plupload_filelist"><tr class="ui-widget-header ui-widget-content plupload_filelist_footer"><td class="plupload_cell plupload_file_name"><div class="plupload_buttons"><!-- Visible --><a class="plupload_button plupload_add">' + b("Add Files") + '</a>&nbsp;<a class="plupload_button plupload_start">' + b("Start Upload") + '</a>&nbsp;<a class="plupload_button plupload_stop plupload_hidden">' + b("Stop Upload") + '</a>&nbsp;</div><div class="plupload_started plupload_hidden"><!-- Hidden --><div class="plupload_progress plupload_right"><div class="plupload_progress_container"></div></div><div class="plupload_cell plupload_upload_status"></div><div class="plupload_clearer">&nbsp;</div></div></td><td class="plupload_file_status"><span class="plupload_total_status">0%</span></td><td class="plupload_file_size"><span class="plupload_total_file_size">0 kb</span></td><td class="plupload_file_action"></td></tr></table></div></div></div><input class="plupload_count" value="0" type="hidden"></div>')
10
+ }
11
+
12
+ 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 () {
13
+ var i = this, k, j;
14
+ k = this.element.attr("id");
15
+ if (!k) {
16
+ k = c.guid();
17
+ this.element.attr("id", k)
18
+ }
19
+ this.id = k;
20
+ this.contents_bak = this.element.html();
21
+ d(this.element);
22
+ this.container = g(".plupload_container", this.element).attr("id", k + "_container");
23
+ this.filelist = g(".plupload_filelist_content", this.container).attr({id:k + "_filelist", unselectable:"on"});
24
+ this.browse_button = g(".plupload_add", this.container).attr("id", k + "_browse");
25
+ this.start_button = g(".plupload_start", this.container).attr("id", k + "_start");
26
+ this.stop_button = g(".plupload_stop", this.container).attr("id", k + "_stop");
27
+ if (g.ui.button) {
28
+ this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});
29
+ this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"}, disabled:true});
30
+ this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})
31
+ }
32
+ this.progressbar = g(".plupload_progress_container", this.container);
33
+ if (g.ui.progressbar) {
34
+ this.progressbar.progressbar()
35
+ }
36
+ this.counter = g(".plupload_count", this.element).attr({id:k + "_count", name:k + "_count"});
37
+ j = this.uploader = h[k] = new c.Uploader(g.extend({container:k, browse_button:k + "_browse"}, this.options));
38
+ j.bind("Error", function (l, m) {
39
+ if (m.code === c.INIT_ERROR) {
40
+ i.destroy()
41
+ }
42
+ });
43
+ j.bind("Init", function (l, m) {
44
+ if (!i.options.buttons.browse) {
45
+ i.browse_button.button("disable").hide();
46
+ l.disableBrowse(true)
47
+ }
48
+ if (!i.options.buttons.start) {
49
+ i.start_button.button("disable").hide()
50
+ }
51
+ if (!i.options.buttons.stop) {
52
+ i.stop_button.button("disable").hide()
53
+ }
54
+ if (!i.options.unique_names && i.options.rename) {
55
+ i._enableRenaming()
56
+ }
57
+ if (j.features.dragdrop && i.options.dragdrop) {
58
+ i._enableDragAndDrop()
59
+ }
60
+ i.container.attr("title", b("Using runtime: ") + (i.runtime = m.runtime));
61
+ i.start_button.click(function (n) {
62
+ if (!g(this).button("option", "disabled")) {
63
+ i.start()
64
+ }
65
+ n.preventDefault()
66
+ });
67
+ i.stop_button.click(function (n) {
68
+ i.stop();
69
+ n.preventDefault()
70
+ })
71
+ });
72
+ if (i.options.max_file_count) {
73
+ j.bind("FilesAdded", function (l, n) {
74
+ var o = [], m = n.length;
75
+ var p = l.files.length + m - i.options.max_file_count;
76
+ if (p > 0) {
77
+ o = n.splice(m - p, p);
78
+ l.trigger("Error", {code:i.FILE_COUNT_ERROR, message:b("File count error."), file:o})
79
+ }
80
+ })
81
+ }
82
+ j.init();
83
+ j.bind("FilesAdded", function (l, m) {
84
+ i._trigger("selected", null, {up:l, files:m});
85
+ if (i.options.autostart) {
86
+ setTimeout(function () {
87
+ i.start()
88
+ }, 10)
89
+ }
90
+ });
91
+ j.bind("FilesRemoved", function (l, m) {
92
+ i._trigger("removed", null, {up:l, files:m})
93
+ });
94
+ j.bind("QueueChanged", function () {
95
+ i._updateFileList()
96
+ });
97
+ j.bind("StateChanged", function () {
98
+ i._handleState()
99
+ });
100
+ j.bind("UploadFile", function (l, m) {
101
+ i._handleFileStatus(m)
102
+ });
103
+ j.bind("FileUploaded", function (l, m) {
104
+ i._handleFileStatus(m);
105
+ i._trigger("uploaded", null, {up:l, file:m})
106
+ });
107
+ j.bind("UploadProgress", function (l, m) {
108
+ g("#" + m.id).find(".plupload_file_status").html(m.percent + "%").end().find(".plupload_file_size").html(c.formatSize(m.size));
109
+ i._handleFileStatus(m);
110
+ i._updateTotalProgress();
111
+ i._trigger("progress", null, {up:l, file:m})
112
+ });
113
+ j.bind("UploadComplete", function (l, m) {
114
+ i._trigger("complete", null, {up:l, files:m})
115
+ });
116
+ j.bind("Error", function (l, p) {
117
+ var n = p.file, o, m;
118
+ if (n) {
119
+ o = "<strong>" + p.message + "</strong>";
120
+ m = p.details;
121
+ if (m) {
122
+ o += " <br /><i>" + p.details + "</i>"
123
+ } else {
124
+ switch (p.code) {
125
+ case c.FILE_EXTENSION_ERROR:
126
+ m = b("File: %s").replace("%s", n.name);
127
+ break;
128
+ case c.FILE_SIZE_ERROR:
129
+ m = b("File: %f, size: %s, max file size: %m").replace(/%([fsm])/g, function (r, q) {
130
+ switch (q) {
131
+ case"f":
132
+ return n.name;
133
+ case"s":
134
+ return n.size;
135
+ case"m":
136
+ return c.parseSize(i.options.max_file_size)
137
+ }
138
+ });
139
+ break;
140
+ case i.FILE_COUNT_ERROR:
141
+ m = b("Upload element accepts only %d file(s) at a time. Extra files were stripped.").replace("%d", i.options.max_file_count);
142
+ break;
143
+ case c.IMAGE_FORMAT_ERROR:
144
+ m = c.translate("Image format either wrong or not supported.");
145
+ break;
146
+ case c.IMAGE_MEMORY_ERROR:
147
+ m = c.translate("Runtime ran out of available memory.");
148
+ break;
149
+ case c.IMAGE_DIMENSIONS_ERROR:
150
+ m = c.translate("Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.").replace(/%([swh])/g, function (r, q) {
151
+ switch (q) {
152
+ case"s":
153
+ return l.runtime;
154
+ case"w":
155
+ return l.features.maxWidth;
156
+ case"h":
157
+ return l.features.maxHeight
158
+ }
159
+ });
160
+ break;
161
+ case c.HTTP_ERROR:
162
+ m = b("Upload URL might be wrong or doesn't exist");
163
+ break
164
+ }
165
+ o += " <br /><i>" + m + "</i>"
166
+ }
167
+ i.notify("error", o);
168
+ i._trigger("error", null, {up:l, file:n, error:o})
169
+ }
170
+ })
171
+ }, _setOption:function (j, k) {
172
+ var i = this;
173
+ if (j == "buttons" && typeof(k) == "object") {
174
+ k = g.extend(i.options.buttons, k);
175
+ if (!k.browse) {
176
+ i.browse_button.button("disable").hide();
177
+ up.disableBrowse(true)
178
+ } else {
179
+ i.browse_button.button("enable").show();
180
+ up.disableBrowse(false)
181
+ }
182
+ if (!k.start) {
183
+ i.start_button.button("disable").hide()
184
+ } else {
185
+ i.start_button.button("enable").show()
186
+ }
187
+ if (!k.stop) {
188
+ i.stop_button.button("disable").hide()
189
+ } else {
190
+ i.start_button.button("enable").show()
191
+ }
192
+ }
193
+ i.uploader.settings[j] = k
194
+ }, start:function () {
195
+ this.uploader.start();
196
+ this._trigger("start", null)
197
+ }, stop:function () {
198
+ this.uploader.stop();
199
+ this._trigger("stop", null)
200
+ }, getFile:function (j) {
201
+ var i;
202
+ if (typeof j === "number") {
203
+ i = this.uploader.files[j]
204
+ } else {
205
+ i = this.uploader.getFile(j)
206
+ }
207
+ return i
208
+ }, removeFile:function (j) {
209
+ var i = this.getFile(j);
210
+ if (i) {
211
+ this.uploader.removeFile(i)
212
+ }
213
+ }, clearQueue:function () {
214
+ this.uploader.splice()
215
+ }, getUploader:function () {
216
+ return this.uploader
217
+ }, refresh:function () {
218
+ this.uploader.refresh()
219
+ }, _handleState:function () {
220
+ var j = this, i = this.uploader;
221
+ if (i.state === c.STARTED) {
222
+ g(j.start_button).button("disable");
223
+ g([]).add(j.stop_button).add(".plupload_started").removeClass("plupload_hidden");
224
+ g(".plupload_upload_status", j.element).text(b("Uploaded %d/%d files").replace("%d/%d", i.total.uploaded + "/" + i.files.length));
225
+ g(".plupload_header_content", j.element).addClass("plupload_header_content_bw")
226
+ } else {
227
+ g([]).add(j.stop_button).add(".plupload_started").addClass("plupload_hidden");
228
+ if (j.options.multiple_queues) {
229
+ g(j.start_button).button("enable");
230
+ g(".plupload_header_content", j.element).removeClass("plupload_header_content_bw")
231
+ }
232
+ j._updateFileList()
233
+ }
234
+ }, _handleFileStatus:function (l) {
235
+ var n, j;
236
+ if (!g("#" + l.id).length) {
237
+ return
238
+ }
239
+ switch (l.status) {
240
+ case c.DONE:
241
+ n = "plupload_done";
242
+ j = "ui-icon ui-icon-circle-check";
243
+ break;
244
+ case c.FAILED:
245
+ n = "ui-state-error plupload_failed";
246
+ j = "ui-icon ui-icon-alert";
247
+ break;
248
+ case c.QUEUED:
249
+ n = "plupload_delete";
250
+ j = "ui-icon ui-icon-circle-minus";
251
+ break;
252
+ case c.UPLOADING:
253
+ n = "ui-state-highlight plupload_uploading";
254
+ j = "ui-icon ui-icon-circle-arrow-w";
255
+ var i = g(".plupload_scroll", this.container), m = i.scrollTop(), o = i.height(), k = g("#" + l.id).position().top + g("#" + l.id).height();
256
+ if (o < k) {
257
+ i.scrollTop(m + k - o)
258
+ }
259
+ break
260
+ }
261
+ n += " ui-state-default plupload_file";
262
+ g("#" + l.id).attr("class", n).find(".ui-icon").attr("class", j)
263
+ }, _updateTotalProgress:function () {
264
+ var i = this.uploader;
265
+ this.progressbar.progressbar("value", i.total.percent);
266
+ this.element.find(".plupload_total_status").html(i.total.percent + "%").end().find(".plupload_total_file_size").html(c.formatSize(i.total.size)).end().find(".plupload_upload_status").text(b("Uploaded %d/%d files").replace("%d/%d", i.total.uploaded + "/" + i.files.length))
267
+ }, _updateFileList:function () {
268
+ var k = this, j = this.uploader, m = this.filelist, l = 0, o, n = this.id + "_", i;
269
+ if (g.ui.sortable && this.options.sortable) {
270
+ g("tbody", m).sortable("destroy")
271
+ }
272
+ m.empty();
273
+ g.each(j.files, function (q, p) {
274
+ i = "";
275
+ o = n + l;
276
+ if (p.status === c.DONE) {
277
+ if (p.target_name) {
278
+ i += '<input type="hidden" name="' + o + '_tmpname" value="' + c.xmlEncode(p.target_name) + '" />'
279
+ }
280
+ i += '<input type="hidden" name="' + o + '_name" value="' + c.xmlEncode(p.name) + '" />';
281
+ i += '<input type="hidden" name="' + o + '_status" value="' + (p.status === c.DONE ? "done" : "failed") + '" />';
282
+ l++;
283
+ k.counter.val(l)
284
+ }
285
+ m.append('<tr class="ui-state-default plupload_file" id="' + p.id + '"><td class="plupload_cell plupload_file_name"><span>' + p.name + '</span></td><td class="plupload_cell plupload_file_status">' + p.percent + '%</td><td class="plupload_cell plupload_file_size">' + c.formatSize(p.size) + '</td><td class="plupload_cell plupload_file_action"><div class="ui-icon"></div>' + i + "</td></tr>");
286
+ k._handleFileStatus(p);
287
+ g("#" + p.id + ".plupload_delete .ui-icon, #" + p.id + ".plupload_done .ui-icon").click(function (r) {
288
+ g("#" + p.id).remove();
289
+ j.removeFile(p);
290
+ r.preventDefault()
291
+ });
292
+ k._trigger("updatelist", null, m)
293
+ });
294
+ if (j.total.queued === 0) {
295
+ g(".ui-button-text", k.browse_button).text(b("Add Files"))
296
+ } else {
297
+ g(".ui-button-text", k.browse_button).text(b("%d files queued").replace("%d", j.total.queued))
298
+ }
299
+ if (j.files.length === (j.total.uploaded + j.total.failed)) {
300
+ k.start_button.button("disable")
301
+ } else {
302
+ k.start_button.button("enable")
303
+ }
304
+ m[0].scrollTop = m[0].scrollHeight;
305
+ k._updateTotalProgress();
306
+ if (!j.files.length && j.features.dragdrop && j.settings.dragdrop) {
307
+ g("#" + o + "_filelist").append('<tr><td class="plupload_droptext">' + b("Drag files here.") + "</td></tr>")
308
+ } else {
309
+ if (k.options.sortable && g.ui.sortable) {
310
+ k._enableSortingList()
311
+ }
312
+ }
313
+ }, _enableRenaming:function () {
314
+ var i = this;
315
+ g(".plupload_delete .plupload_file_name span", this.filelist).live("click", function (o) {
316
+ var m = g(o.target), k, n, j, l = "";
317
+ k = i.uploader.getFile(m.parents("tr")[0].id);
318
+ j = k.name;
319
+ n = /^(.+)(\.[^.]+)$/.exec(j);
320
+ if (n) {
321
+ j = n[1];
322
+ l = n[2]
323
+ }
324
+ m.hide().after('<input class="plupload_file_rename" type="text" />');
325
+ m.next().val(j).focus().blur(
326
+ function () {
327
+ m.show().next().remove()
328
+ }).keydown(function (q) {
329
+ var p = g(this);
330
+ if (g.inArray(q.keyCode, [13, 27]) !== -1) {
331
+ q.preventDefault();
332
+ if (q.keyCode === 13) {
333
+ k.name = p.val() + l;
334
+ m.text(k.name)
335
+ }
336
+ p.blur()
337
+ }
338
+ })
339
+ })
340
+ }, _enableDragAndDrop:function () {
341
+ this.filelist.append('<tr><td class="plupload_droptext">' + b("Drag files here.") + "</td></tr>");
342
+ this.filelist.parent().attr("id", this.id + "_dropbox");
343
+ this.uploader.settings.drop_element = this.options.drop_element = this.id + "_dropbox"
344
+ }, _enableSortingList:function () {
345
+ var j, i = this;
346
+ if (g("tbody tr", this.filelist).length < 2) {
347
+ return
348
+ }
349
+ g("tbody", this.filelist).sortable({containment:"parent", items:".plupload_delete", helper:function (l, k) {
350
+ return k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width", "100%")
351
+ }, stop:function (p, o) {
352
+ var l, n, k, m = [];
353
+ g.each(g(this).sortable("toArray"), function (q, r) {
354
+ m[m.length] = i.uploader.getFile(r)
355
+ });
356
+ m.unshift(m.length);
357
+ m.unshift(0);
358
+ Array.prototype.splice.apply(i.uploader.files, m)
359
+ }})
360
+ }, notify:function (j, k) {
361
+ var i = g('<div class="plupload_message"><span class="plupload_message_close ui-icon ui-icon-circle-close" title="' + b("Close") + '"></span><p><span class="ui-icon"></span>' + k + "</p></div>");
362
+ 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(
363
+ function () {
364
+ i.remove()
365
+ }).end();
366
+ g(".plupload_header_content", this.container).append(i)
367
+ }, destroy:function () {
368
+ g(".plupload_button", this.element).unbind();
369
+ if (g.ui.button) {
370
+ g(".plupload_add, .plupload_start, .plupload_stop", this.container).button("destroy")
371
+ }
372
+ if (g.ui.progressbar) {
373
+ this.progressbar.progressbar("destroy")
374
+ }
375
+ if (g.ui.sortable && this.options.sortable) {
376
+ g("tbody", this.filelist).sortable("destroy")
377
+ }
378
+ this.uploader.destroy();
379
+ this.element.empty().html(this.contents_bak);
380
+ this.contents_bak = "";
381
+ g.Widget.prototype.destroy.apply(this)
382
+ }})
383
+ }(window, document, plupload, jQuery));