From efb623af0bcb47d510501c282e1326b11343a29c Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 22 Sep 2012 22:27:04 -0400 Subject: site reorg --- app/lib/filebrowser/LICENSE | 24 + app/lib/filebrowser/__init__.py | 0 app/lib/filebrowser/base.py | 219 ++ app/lib/filebrowser/decorators.py | 30 + app/lib/filebrowser/fields.py | 127 + app/lib/filebrowser/forms.py | 63 + app/lib/filebrowser/functions.py | 388 +++ .../filebrowser/locale/ca/LC_MESSAGES/django.mo | Bin 0 -> 5071 bytes .../filebrowser/locale/ca/LC_MESSAGES/django.po | 328 +++ .../filebrowser/locale/de/LC_MESSAGES/django.mo | Bin 0 -> 5129 bytes .../filebrowser/locale/de/LC_MESSAGES/django.po | 408 ++++ .../filebrowser/locale/es/LC_MESSAGES/django.mo | Bin 0 -> 5093 bytes .../filebrowser/locale/es/LC_MESSAGES/django.po | 328 +++ .../filebrowser/locale/fr/LC_MESSAGES/django.mo | Bin 0 -> 5358 bytes .../filebrowser/locale/fr/LC_MESSAGES/django.po | 336 +++ .../filebrowser/locale/it/LC_MESSAGES/django.mo | Bin 0 -> 3542 bytes .../filebrowser/locale/it/LC_MESSAGES/django.po | 356 +++ .../filebrowser/locale/nl/LC_MESSAGES/django.mo | Bin 0 -> 5152 bytes .../filebrowser/locale/nl/LC_MESSAGES/django.po | 319 +++ .../filebrowser/locale/ru/LC_MESSAGES/django.mo | Bin 0 -> 6450 bytes .../filebrowser/locale/ru/LC_MESSAGES/django.po | 394 ++++ .../filebrowser/locale/sr/LC_MESSAGES/django.mo | Bin 0 -> 6382 bytes .../filebrowser/locale/sr/LC_MESSAGES/django.po | 376 +++ .../locale/sr_Latn/LC_MESSAGES/django.mo | Bin 0 -> 5292 bytes .../locale/sr_Latn/LC_MESSAGES/django.po | 376 +++ .../filebrowser/locale/zh_CN/LC_MESSAGES/django.mo | Bin 0 -> 5079 bytes .../filebrowser/locale/zh_CN/LC_MESSAGES/django.po | 370 +++ .../filebrowser/locale/zh_TW/LC_MESSAGES/django.mo | Bin 0 -> 5077 bytes .../filebrowser/locale/zh_TW/LC_MESSAGES/django.po | 370 +++ app/lib/filebrowser/management/__init__.py | 0 .../filebrowser/management/commands/__init__.py | 0 .../management/commands/fb_version_generate.py | 84 + .../management/commands/fb_version_remove.py | 132 ++ .../media/filebrowser/css/filebrowser.css | 195 ++ .../filebrowser/img/filebrowser_icon_delete.gif | Bin 0 -> 151 bytes .../img/filebrowser_icon_delete_hover.gif | Bin 0 -> 151 bytes .../filebrowser/img/filebrowser_icon_rename.gif | Bin 0 -> 222 bytes .../img/filebrowser_icon_rename_hover.gif | Bin 0 -> 222 bytes .../filebrowser/img/filebrowser_icon_select.gif | Bin 0 -> 377 bytes .../img/filebrowser_icon_select_disabled.gif | Bin 0 -> 3186 bytes .../img/filebrowser_icon_select_hover.gif | Bin 0 -> 264 bytes .../filebrowser/img/filebrowser_icon_show.gif | Bin 0 -> 427 bytes .../img/filebrowser_icon_show_hover.gif | Bin 0 -> 426 bytes .../img/filebrowser_icon_showversions.gif | Bin 0 -> 174 bytes .../img/filebrowser_icon_showversions_hover.gif | Bin 0 -> 174 bytes .../media/filebrowser/img/filebrowser_type_.gif | Bin 0 -> 113 bytes .../filebrowser/img/filebrowser_type_audio.gif | Bin 0 -> 223 bytes .../filebrowser/img/filebrowser_type_code.gif | Bin 0 -> 160 bytes .../filebrowser/img/filebrowser_type_document.gif | Bin 0 -> 118 bytes .../filebrowser/img/filebrowser_type_folder.gif | Bin 0 -> 228 bytes .../filebrowser/img/filebrowser_type_image.gif | Bin 0 -> 127 bytes .../filebrowser/img/filebrowser_type_video.gif | Bin 0 -> 147 bytes .../filebrowser/img/icon-fb-preview-hover.png | Bin 0 -> 186 bytes .../media/filebrowser/img/icon-fb-preview.png | Bin 0 -> 185 bytes .../filebrowser/img/icon-fb-view-image-hover.png | Bin 0 -> 2990 bytes .../img/icon-pulldown-actions-active.png | Bin 0 -> 439 bytes .../img/icon-pulldown-actions-hover.png | Bin 0 -> 439 bytes .../filebrowser/img/icon-pulldown-actions.png | Bin 0 -> 440 bytes .../media/filebrowser/img/icon-showversions.png | Bin 0 -> 167 bytes .../media/filebrowser/js/AddFileBrowser.js | 42 + .../media/filebrowser/js/FB_CKEditor.js | 24 + .../media/filebrowser/js/FB_FileBrowseField.js | 32 + .../filebrowser/media/filebrowser/js/FB_TinyMCE.js | 28 + .../media/filebrowser/js/TinyMCEAdmin.js | 75 + .../uploadify/Uploadify v2.1.0 Manual.pdf | Bin 0 -> 556466 bytes .../media/filebrowser/uploadify/cancel.png | Bin 0 -> 603 bytes .../media/filebrowser/uploadify/check.php | 35 + .../uploadify/com/adobe/air/logging/FileTarget.as | 98 + .../filebrowser/uploadify/com/adobe/crypto/HMAC.as | 127 + .../filebrowser/uploadify/com/adobe/crypto/MD5.as | 281 +++ .../uploadify/com/adobe/crypto/MD5Stream.as | 402 ++++ .../filebrowser/uploadify/com/adobe/crypto/SHA1.as | 271 +++ .../uploadify/com/adobe/crypto/SHA224.as | 257 ++ .../uploadify/com/adobe/crypto/SHA256.as | 261 +++ .../com/adobe/crypto/WSSEUsernameToken.as | 114 + .../com/adobe/errors/IllegalStateError.as | 63 + .../com/adobe/fileformats/vcard/Address.as | 47 + .../uploadify/com/adobe/fileformats/vcard/Email.as | 39 + .../uploadify/com/adobe/fileformats/vcard/Phone.as | 39 + .../uploadify/com/adobe/fileformats/vcard/VCard.as | 54 + .../com/adobe/fileformats/vcard/VCardParser.as | 246 ++ .../uploadify/com/adobe/images/BitString.as | 39 + .../uploadify/com/adobe/images/JPGEncoder.as | 648 +++++ .../uploadify/com/adobe/images/PNGEncoder.as | 141 ++ .../uploadify/com/adobe/net/DynamicURLLoader.as | 55 + .../uploadify/com/adobe/net/IURIResolver.as | 76 + .../uploadify/com/adobe/net/MimeTypeMap.as | 196 ++ .../filebrowser/uploadify/com/adobe/net/URI.as | 2466 ++++++++++++++++++++ .../uploadify/com/adobe/net/URIEncodingBitmap.as | 139 ++ .../com/adobe/net/proxies/RFC2817Socket.as | 198 ++ .../uploadify/com/adobe/protocols/dict/Database.as | 34 + .../com/adobe/protocols/dict/Definition.as | 39 + .../uploadify/com/adobe/protocols/dict/Dict.as | 328 +++ .../com/adobe/protocols/dict/DictionaryServer.as | 28 + .../com/adobe/protocols/dict/MatchStrategy.as | 34 + .../uploadify/com/adobe/protocols/dict/Response.as | 39 + .../adobe/protocols/dict/events/ConnectedEvent.as | 14 + .../adobe/protocols/dict/events/DatabaseEvent.as | 26 + .../adobe/protocols/dict/events/DefinitionEvent.as | 27 + .../protocols/dict/events/DefinitionHeaderEvent.as | 26 + .../protocols/dict/events/DictionaryServerEvent.as | 26 + .../protocols/dict/events/DisconnectedEvent.as | 14 + .../com/adobe/protocols/dict/events/ErrorEvent.as | 37 + .../com/adobe/protocols/dict/events/MatchEvent.as | 26 + .../protocols/dict/events/MatchStrategiesEvent.as | 26 + .../adobe/protocols/dict/events/NoMatchEvent.as | 14 + .../protocols/dict/util/CompleteResponseEvent.as | 25 + .../com/adobe/protocols/dict/util/SocketHelper.as | 49 + .../uploadify/com/adobe/serialization/json/JSON.as | 85 + .../com/adobe/serialization/json/JSONDecoder.as | 221 ++ .../com/adobe/serialization/json/JSONEncoder.as | 299 +++ .../com/adobe/serialization/json/JSONParseError.as | 87 + .../com/adobe/serialization/json/JSONToken.as | 104 + .../com/adobe/serialization/json/JSONTokenType.as | 67 + .../com/adobe/serialization/json/JSONTokenizer.as | 583 +++++ .../uploadify/com/adobe/utils/ArrayUtil.as | 187 ++ .../uploadify/com/adobe/utils/DateUtil.as | 699 ++++++ .../uploadify/com/adobe/utils/DictionaryUtil.as | 87 + .../uploadify/com/adobe/utils/IntUtil.as | 99 + .../uploadify/com/adobe/utils/NumberFormatter.as | 74 + .../uploadify/com/adobe/utils/StringUtil.as | 270 +++ .../uploadify/com/adobe/utils/XMLUtil.as | 168 ++ .../uploadify/com/adobe/webapis/ServiceBase.as | 48 + .../uploadify/com/adobe/webapis/URLLoaderBase.as | 108 + .../com/adobe/webapis/events/ServiceEvent.as | 75 + .../uploadify/example/_notes/dwsync.xml | 5 + .../media/filebrowser/uploadify/example/cancel.png | Bin 0 -> 603 bytes .../uploadify/example/css/_notes/dwsync.xml | 5 + .../filebrowser/uploadify/example/css/default.css | 10 + .../uploadify/example/css/uploadify.css | 53 + .../media/filebrowser/uploadify/example/index.php | 31 + .../uploadify/example/scripts/_notes/dwsync.xml | 10 + .../uploadify/example/scripts/check.php | 35 + .../uploadify/example/scripts/expressInstall.swf | Bin 0 -> 727 bytes .../uploadify/example/scripts/jquery-1.3.2.min.js | 19 + .../example/scripts/jquery.uploadify.v2.1.0.min.js | 26 + .../uploadify/example/scripts/swfobject.js | 4 + .../uploadify/example/scripts/uploadify.php | 46 + .../uploadify/example/scripts/uploadify.swf | Bin 0 -> 23119 bytes .../media/filebrowser/uploadify/expressInstall.swf | Bin 0 -> 727 bytes .../filebrowser/uploadify/jquery-1.3.2.min.js | 19 + .../uploadify/jquery.uploadify.v2.1.0.js | 258 ++ .../uploadify/jquery.uploadify.v2.1.0.min.js | 26 + .../media/filebrowser/uploadify/swfobject.js | 4 + .../filebrowser/uploadify/uploadify.allglyphs.swf | Bin 0 -> 239838 bytes .../media/filebrowser/uploadify/uploadify.css | 53 + .../media/filebrowser/uploadify/uploadify.fla | Bin 0 -> 125952 bytes .../media/filebrowser/uploadify/uploadify.php | 46 + .../media/filebrowser/uploadify/uploadify.swf | Bin 0 -> 23118 bytes app/lib/filebrowser/models.py | 1 + app/lib/filebrowser/settings.py | 128 + .../filebrowser/templates/filebrowser/append.html | 12 + .../templates/filebrowser/custom_field.html | 26 + .../templates/filebrowser/include/_response.html | 1 + .../templates/filebrowser/include/breadcrumbs.html | 24 + .../templates/filebrowser/include/filelisting.html | 136 ++ .../templates/filebrowser/include/filter.html | 27 + .../templates/filebrowser/include/paginator.html | 28 + .../templates/filebrowser/include/search.html | 31 + .../templates/filebrowser/include/tableheader.html | 32 + .../templates/filebrowser/include/toolbar.html | 36 + .../filebrowser/templates/filebrowser/index.html | 143 ++ .../filebrowser/templates/filebrowser/makedir.html | 45 + .../filebrowser/templates/filebrowser/rename.html | 43 + .../filebrowser/templates/filebrowser/upload.html | 113 + .../templates/filebrowser/versions.html | 156 ++ app/lib/filebrowser/templatetags/__init__.py | 0 app/lib/filebrowser/templatetags/fb_csrf.py | 30 + app/lib/filebrowser/templatetags/fb_pagination.py | 51 + app/lib/filebrowser/templatetags/fb_tags.py | 140 ++ app/lib/filebrowser/templatetags/fb_versions.py | 177 ++ app/lib/filebrowser/urls.py | 16 + app/lib/filebrowser/views.py | 494 ++++ 173 files changed, 18329 insertions(+) create mode 100644 app/lib/filebrowser/LICENSE create mode 100644 app/lib/filebrowser/__init__.py create mode 100644 app/lib/filebrowser/base.py create mode 100644 app/lib/filebrowser/decorators.py create mode 100644 app/lib/filebrowser/fields.py create mode 100644 app/lib/filebrowser/forms.py create mode 100755 app/lib/filebrowser/functions.py create mode 100644 app/lib/filebrowser/locale/ca/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/ca/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/de/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/de/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/es/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/es/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/fr/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/fr/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/it/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/it/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/nl/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/nl/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/ru/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/ru/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/sr/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/sr/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo create mode 100644 app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.po create mode 100644 app/lib/filebrowser/management/__init__.py create mode 100644 app/lib/filebrowser/management/commands/__init__.py create mode 100644 app/lib/filebrowser/management/commands/fb_version_generate.py create mode 100644 app/lib/filebrowser/management/commands/fb_version_remove.py create mode 100755 app/lib/filebrowser/media/filebrowser/css/filebrowser.css create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_audio.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_code.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_document.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_image.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/filebrowser_type_video.gif create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-fb-preview-hover.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-fb-preview.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-fb-view-image-hover.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-active.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-hover.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions.png create mode 100644 app/lib/filebrowser/media/filebrowser/img/icon-showversions.png create mode 100644 app/lib/filebrowser/media/filebrowser/js/AddFileBrowser.js create mode 100644 app/lib/filebrowser/media/filebrowser/js/FB_CKEditor.js create mode 100755 app/lib/filebrowser/media/filebrowser/js/FB_FileBrowseField.js create mode 100755 app/lib/filebrowser/media/filebrowser/js/FB_TinyMCE.js create mode 100644 app/lib/filebrowser/media/filebrowser/js/TinyMCEAdmin.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/cancel.png create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/check.php create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/HMAC.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/MD5.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/SHA1.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/SHA224.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/SHA256.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/images/BitString.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/images/JPGEncoder.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/images/PNGEncoder.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/IURIResolver.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/URI.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/Database.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/Response.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSON.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/DateUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/IntUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/StringUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/utils/XMLUtil.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/_notes/dwsync.xml create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/cancel.png create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/css/_notes/dwsync.xml create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/css/default.css create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/css/uploadify.css create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/index.php create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/check.php create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/swfobject.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.php create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/expressInstall.swf create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/swfobject.js create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/uploadify.allglyphs.swf create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/uploadify.css create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/uploadify.fla create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/uploadify.php create mode 100755 app/lib/filebrowser/media/filebrowser/uploadify/uploadify.swf create mode 100755 app/lib/filebrowser/models.py create mode 100755 app/lib/filebrowser/settings.py create mode 100644 app/lib/filebrowser/templates/filebrowser/append.html create mode 100644 app/lib/filebrowser/templates/filebrowser/custom_field.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/_response.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/breadcrumbs.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/filelisting.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/filter.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/paginator.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/search.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/tableheader.html create mode 100644 app/lib/filebrowser/templates/filebrowser/include/toolbar.html create mode 100644 app/lib/filebrowser/templates/filebrowser/index.html create mode 100644 app/lib/filebrowser/templates/filebrowser/makedir.html create mode 100644 app/lib/filebrowser/templates/filebrowser/rename.html create mode 100644 app/lib/filebrowser/templates/filebrowser/upload.html create mode 100644 app/lib/filebrowser/templates/filebrowser/versions.html create mode 100644 app/lib/filebrowser/templatetags/__init__.py create mode 100644 app/lib/filebrowser/templatetags/fb_csrf.py create mode 100644 app/lib/filebrowser/templatetags/fb_pagination.py create mode 100644 app/lib/filebrowser/templatetags/fb_tags.py create mode 100644 app/lib/filebrowser/templatetags/fb_versions.py create mode 100644 app/lib/filebrowser/urls.py create mode 100644 app/lib/filebrowser/views.py (limited to 'app/lib/filebrowser') diff --git a/app/lib/filebrowser/LICENSE b/app/lib/filebrowser/LICENSE new file mode 100644 index 0000000..3d5b09b --- /dev/null +++ b/app/lib/filebrowser/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2010, Patrick Kranzlmueller (vonautomatisch werkstaetten), +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. +3. Neither the name of FileBrowser nor the names of its contributors may be used +to endorse or promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/lib/filebrowser/__init__.py b/app/lib/filebrowser/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/lib/filebrowser/base.py b/app/lib/filebrowser/base.py new file mode 100644 index 0000000..1b60dce --- /dev/null +++ b/app/lib/filebrowser/base.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +# imports +import os, re, datetime +from time import gmtime, strftime + +# django imports +from django.conf import settings + +# filebrowser imports +from filebrowser.settings import * +from filebrowser.functions import get_file_type, url_join, is_selectable, get_version_path +from django.utils.encoding import force_unicode + +# PIL import +if STRICT_PIL: + from PIL import Image +else: + try: + from PIL import Image + except ImportError: + import Image + + +class FileObject(object): + """ + The FileObject represents a File on the Server. + + PATH has to be relative to MEDIA_ROOT. + """ + + def __init__(self, path): + path = force_unicode(path) + self.path = path + self.url_rel = path.replace("\\","/") + self.head = os.path.split(path)[0] + self.filename = os.path.split(path)[1] + self.filename_lower = self.filename.lower() # important for sorting + # ABP: fix for dotted folder names + if os.path.isdir(self.path_full): + self.filetype = 'Folder' + else: + self.filetype = get_file_type(self.filename) + + def _filesize(self): + """ + Filesize. + """ + path = self.path + if os.path.isfile(os.path.join(MEDIA_ROOT, path)) or os.path.isdir(os.path.join(MEDIA_ROOT, path)): + return os.path.getsize(os.path.join(MEDIA_ROOT, path)) + return "" + filesize = property(_filesize) + + def _date(self): + """ + Date. + """ + if os.path.isfile(os.path.join(MEDIA_ROOT, self.path)) or os.path.isdir(os.path.join(MEDIA_ROOT, self.path)): + return os.path.getmtime(os.path.join(MEDIA_ROOT, self.path)) + return "" + date = property(_date) + + def _datetime(self): + """ + Datetime Object. + """ + return datetime.datetime.fromtimestamp(self.date) + datetime = property(_datetime) + + def _extension(self): + """ + Extension. + """ + return u"%s" % os.path.splitext(self.filename)[1] + extension = property(_extension) + + def _filetype_checked(self): + if self.filetype == "Folder" and os.path.isdir(self.path_full): + return self.filetype + elif self.filetype != "Folder" and os.path.isfile(self.path_full): + return self.filetype + else: + return "" + filetype_checked = property(_filetype_checked) + + def _path_full(self): + """ + Full server PATH including MEDIA_ROOT. + """ + return os.path.join(MEDIA_ROOT, self.path) + path_full = property(_path_full) + + def _path_relative(self): + return self.path + path_relative = property(_path_relative) + + def _path_relative_directory(self): + """ + Path relative to initial directory. + """ + directory_re = re.compile(r'^(%s)' % (DIRECTORY)) + value = directory_re.sub('', self.path) + return u"%s" % value + path_relative_directory = property(_path_relative_directory) + + def _url_relative(self): + return self.url_rel + url_relative = property(_url_relative) + + def _url_full(self): + """ + Full URL including MEDIA_URL. + """ + return force_unicode(url_join(MEDIA_URL, self.url_rel)) + url_full = property(_url_full) + + def _url_save(self): + """ + URL used for the filebrowsefield. + """ + if SAVE_FULL_URL: + return self.url_full + else: + return self.url_rel + url_save = property(_url_save) + + def _url_thumbnail(self): + """ + Thumbnail URL. + """ + if self.filetype == "Image": + return u"%s" % url_join(MEDIA_URL, get_version_path(self.path, 'fb_thumb')) + else: + return "" + url_thumbnail = property(_url_thumbnail) + + def url_admin(self): + if self.filetype_checked == "Folder": + directory_re = re.compile(r'^(%s)' % (DIRECTORY)) + value = directory_re.sub('', self.path) + return u"%s" % value + else: + return u"%s" % url_join(MEDIA_URL, self.path) + + def _folder(self): + directory_re = re.compile(r'^(%s)' % (DIRECTORY.rstrip('/'))) + return u"%s/" % directory_re.sub('', self.head) + folder = property(_folder) + + def _folder_for_link(self): + directory_re = re.compile(r'^(%s)' % (DIRECTORY.rstrip('/'))) + return u"%s" % directory_re.sub('', self.head)[1:] + folder_for_link = property(_folder_for_link) + + def _dimensions(self): + """ + Image Dimensions. + """ + if self.filetype == 'Image': + try: + im = Image.open(os.path.join(MEDIA_ROOT, self.path)) + return im.size + except: + pass + else: + return False + dimensions = property(_dimensions) + + def _width(self): + """ + Image Width. + """ + return self.dimensions[0] + width = property(_width) + + def _height(self): + """ + Image Height. + """ + return self.dimensions[1] + height = property(_height) + + def _orientation(self): + """ + Image Orientation. + """ + if self.dimensions: + if self.dimensions[0] >= self.dimensions[1]: + return "Landscape" + else: + return "Portrait" + else: + return None + orientation = property(_orientation) + + def _is_empty(self): + """ + True if Folder is empty, False if not. + """ + if os.path.isdir(self.path_full): + if not os.listdir(self.path_full): + return True + else: + return False + else: + return None + is_empty = property(_is_empty) + + def __repr__(self): + return force_unicode(self.url_save) + + def __str__(self): + return force_unicode(self.url_save) + + def __unicode__(self): + return force_unicode(self.url_save) + + diff --git a/app/lib/filebrowser/decorators.py b/app/lib/filebrowser/decorators.py new file mode 100644 index 0000000..de80f3d --- /dev/null +++ b/app/lib/filebrowser/decorators.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +# django imports +from django.contrib.sessions.models import Session +from django.shortcuts import get_object_or_404, render_to_response +from django.contrib.auth.models import User +from django.template import RequestContext +from django.conf import settings + + +def flash_login_required(function): + """ + Decorator to recognize a user by its session. + Used for Flash-Uploading. + """ + + def decorator(request, *args, **kwargs): + try: + engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) + except: + import django.contrib.sessions.backends.db + engine = django.contrib.sessions.backends.db + session_data = engine.SessionStore(request.POST.get('session_key')) + user_id = session_data['_auth_user_id'] + # will return 404 if the session ID does not resolve to a valid user + request.user = get_object_or_404(User, pk=user_id) + return function(request, *args, **kwargs) + return decorator + + diff --git a/app/lib/filebrowser/fields.py b/app/lib/filebrowser/fields.py new file mode 100644 index 0000000..da19bac --- /dev/null +++ b/app/lib/filebrowser/fields.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +# imports +import os + +# django imports +from django.db import models +from django import forms +from django.forms.widgets import Input +from django.db.models.fields import Field, CharField +from django.utils.encoding import force_unicode +from django.template.loader import render_to_string +from django.utils.translation import ugettext_lazy as _ + +# filebrowser imports +from filebrowser.settings import * +from filebrowser.base import FileObject +from filebrowser.functions import url_to_path + + +class FileBrowseWidget(Input): + input_type = 'text' + + class Media: + js = (os.path.join(URL_FILEBROWSER_MEDIA, 'js/AddFileBrowser.js'), ) + + def __init__(self, attrs=None): + self.directory = attrs.get('directory', '') + self.extensions = attrs.get('extensions', '') + self.format = attrs.get('format', '') + if attrs is not None: + self.attrs = attrs.copy() + else: + self.attrs = {} + + def render(self, name, value, attrs=None): + if value is None: + value = "" + final_attrs = self.build_attrs(attrs, type=self.input_type, name=name) + final_attrs['search_icon'] = URL_FILEBROWSER_MEDIA + 'img/filebrowser_icon_show.gif' + final_attrs['directory'] = self.directory + final_attrs['extensions'] = self.extensions + final_attrs['format'] = self.format + final_attrs['ADMIN_THUMBNAIL'] = ADMIN_THUMBNAIL + final_attrs['DEBUG'] = DEBUG + if value != "": + try: + final_attrs['directory'] = os.path.split(value.path_relative_directory)[0] + except: + pass + return render_to_string("filebrowser/custom_field.html", locals()) + + +class FileBrowseFormField(forms.CharField): + widget = FileBrowseWidget + + default_error_messages = { + 'extension': _(u'Extension %(ext)s is not allowed. Only %(allowed)s is allowed.'), + } + + def __init__(self, max_length=None, min_length=None, + directory=None, extensions=None, format=None, + *args, **kwargs): + self.max_length, self.min_length = max_length, min_length + self.directory = directory + self.extensions = extensions + if format: + self.format = format or '' + self.extensions = extensions or EXTENSIONS.get(format) + super(FileBrowseFormField, self).__init__(*args, **kwargs) + + def clean(self, value): + value = super(FileBrowseFormField, self).clean(value) + if value == '': + return value + file_extension = os.path.splitext(value)[1].lower() + if self.extensions and not file_extension in self.extensions: + raise forms.ValidationError(self.error_messages['extension'] % {'ext': file_extension, 'allowed': ", ".join(self.extensions)}) + return value + + +class FileBrowseField(Field): + __metaclass__ = models.SubfieldBase + + def __init__(self, *args, **kwargs): + self.directory = kwargs.pop('directory', '') + self.extensions = kwargs.pop('extensions', '') + self.format = kwargs.pop('format', '') + return super(FileBrowseField, self).__init__(*args, **kwargs) + + def to_python(self, value): + if not value or isinstance(value, FileObject): + return value + return FileObject(url_to_path(value)) + + def get_db_prep_value(self, value): + if value is None: + return None + return unicode(value) + + + def get_manipulator_field_objs(self): + return [oldforms.TextField] + + def get_internal_type(self): + return "CharField" + + def formfield(self, **kwargs): + attrs = {} + attrs["directory"] = self.directory + attrs["extensions"] = self.extensions + attrs["format"] = self.format + defaults = { + 'form_class': FileBrowseFormField, + 'widget': FileBrowseWidget(attrs=attrs), + 'directory': self.directory, + 'extensions': self.extensions, + 'format': self.format + } + defaults.update(kwargs) + return super(FileBrowseField, self).formfield(**defaults) + +try: + from south.modelsinspector import add_introspection_rules + add_introspection_rules([], ["^filebrowser\.fields\.FileBrowseField"]) +except: + pass diff --git a/app/lib/filebrowser/forms.py b/app/lib/filebrowser/forms.py new file mode 100644 index 0000000..71a6a83 --- /dev/null +++ b/app/lib/filebrowser/forms.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +# imports +import re, os + +# django imports +from django import forms +from django.forms.formsets import BaseFormSet +from django.utils.translation import ugettext as _ + +# filebrowser imports +from filebrowser.settings import MAX_UPLOAD_SIZE, FOLDER_REGEX +from filebrowser.functions import convert_filename + +alnum_name_re = re.compile(FOLDER_REGEX, re.U) + +class MakeDirForm(forms.Form): + """ + Form for creating Folder. + """ + + def __init__(self, path, *args, **kwargs): + self.path = path + super(MakeDirForm, self).__init__(*args, **kwargs) + + dir_name = forms.CharField(widget=forms.TextInput(attrs=dict({ 'class': 'vTextField' }, max_length=50, min_length=3)), label=_(u'Name'), help_text=_(u'Only letters, numbers, underscores, spaces and hyphens are allowed.'), required=True) + + def clean_dir_name(self): + if self.cleaned_data['dir_name']: + # only letters, numbers, underscores, spaces and hyphens are allowed. + if not alnum_name_re.search(self.cleaned_data['dir_name']): + raise forms.ValidationError(_(u'Only letters, numbers, underscores, spaces and hyphens are allowed.')) + # Folder must not already exist. + if os.path.isdir(os.path.join(self.path, convert_filename(self.cleaned_data['dir_name']))): + raise forms.ValidationError(_(u'The Folder already exists.')) + return convert_filename(self.cleaned_data['dir_name']) + + +class RenameForm(forms.Form): + """ + Form for renaming Folder/File. + """ + + def __init__(self, path, file_extension, *args, **kwargs): + self.path = path + self.file_extension = file_extension + super(RenameForm, self).__init__(*args, **kwargs) + + name = forms.CharField(widget=forms.TextInput(attrs=dict({ 'class': 'vTextField' }, max_length=50, min_length=3)), label=_(u'New Name'), help_text=_('Only letters, numbers, underscores, spaces and hyphens are allowed.'), required=True) + + def clean_name(self): + if self.cleaned_data['name']: + # only letters, numbers, underscores, spaces and hyphens are allowed. + if not alnum_name_re.search(self.cleaned_data['name']): + raise forms.ValidationError(_(u'Only letters, numbers, underscores, spaces and hyphens are allowed.')) + # folder/file must not already exist. + if os.path.isdir(os.path.join(self.path, convert_filename(self.cleaned_data['name']))): + raise forms.ValidationError(_(u'The Folder already exists.')) + elif os.path.isfile(os.path.join(self.path, convert_filename(self.cleaned_data['name']) + self.file_extension)): + raise forms.ValidationError(_(u'The File already exists.')) + return convert_filename(self.cleaned_data['name']) + + diff --git a/app/lib/filebrowser/functions.py b/app/lib/filebrowser/functions.py new file mode 100755 index 0000000..3ff5cc8 --- /dev/null +++ b/app/lib/filebrowser/functions.py @@ -0,0 +1,388 @@ +# coding: utf-8 + +# imports +import os, re, decimal +from time import gmtime, strftime, localtime, mktime, time +from urlparse import urlparse + +# django imports +from django.utils.translation import ugettext as _ +from django.utils.safestring import mark_safe +from django.core.files import File +from django.core.files.storage import default_storage +from django.utils.encoding import smart_str + +# filebrowser imports +from filebrowser.settings import * + +# PIL import +if STRICT_PIL: + from PIL import Image +else: + try: + from PIL import Image + except ImportError: + import Image + + +def url_to_path(value): + """ + Change URL to PATH. + Value has to be an URL relative to MEDIA URL or a full URL (including MEDIA_URL). + + Returns a PATH relative to MEDIA_ROOT. + """ + + mediaurl_re = re.compile(r'^(%s)' % (MEDIA_URL)) + value = mediaurl_re.sub('', value) + return value + + +def path_to_url(value): + """ + Change PATH to URL. + Value has to be a PATH relative to MEDIA_ROOT. + + Return an URL relative to MEDIA_ROOT. + """ + + mediaroot_re = re.compile(r'^(%s)' % (MEDIA_ROOT)) + value = mediaroot_re.sub('', value) + return url_join(MEDIA_URL, value) + + +def dir_from_url(value): + """ + Get the relative server directory from a URL. + URL has to be an absolute URL including MEDIA_URL or + an URL relative to MEDIA_URL. + """ + + mediaurl_re = re.compile(r'^(%s)' % (MEDIA_URL)) + value = mediaurl_re.sub('', value) + directory_re = re.compile(r'^(%s)' % (DIRECTORY)) + value = directory_re.sub('', value) + return os.path.split(value)[0] + + +def get_version_path(value, version_prefix): + """ + Construct the PATH to an Image version. + Value has to be server-path, relative to MEDIA_ROOT. + + version_filename = filename + version_prefix + ext + Returns a path relative to MEDIA_ROOT. + """ + + if os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, value))): + path, filename = os.path.split(value) + filename, ext = os.path.splitext(filename) + + # check if this file is a version of an other file + # to return filename_.ext instead of filename__.ext + tmp = filename.split("_") + if tmp[len(tmp)-1] in ADMIN_VERSIONS: + # it seems like the "original" is actually a version of an other original + # so we strip the suffix (aka. version_perfix) + new_filename = filename.replace("_" + tmp[len(tmp)-1], "") + # check if the version exists when we use the new_filename + if os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, path, new_filename + "_" + version_prefix + ext))): + # our "original" filename seem to be filename_ construct + # so we replace it with the new_filename + filename = new_filename + # if a VERSIONS_BASEDIR is set we need to strip it from the path + # or we get a //... construct + if VERSIONS_BASEDIR != "": + path = path.replace(VERSIONS_BASEDIR + "/", "") + + version_filename = filename + "_" + version_prefix + ext + return os.path.join(VERSIONS_BASEDIR, path, version_filename) + else: + return None + + +def sort_by_attr(seq, attr): + """ + Sort the sequence of objects by object's attribute + + Arguments: + seq - the list or any sequence (including immutable one) of objects to sort. + attr - the name of attribute to sort by + + Returns: + the sorted list of objects. + """ + import operator + + # Use the "Schwartzian transform" + # Create the auxiliary list of tuples where every i-th tuple has form + # (seq[i].attr, i, seq[i]) and sort it. The second item of tuple is needed not + # only to provide stable sorting, but mainly to eliminate comparison of objects + # (which can be expensive or prohibited) in case of equal attribute values. + intermed = map(None, map(getattr, seq, (attr,)*len(seq)), xrange(len(seq)), seq) + intermed.sort() + return map(operator.getitem, intermed, (-1,) * len(intermed)) + + +def url_join(*args): + """ + URL join routine. + """ + + if args[0].startswith("http://"): + url = "http://" + else: + url = "/" + for arg in args: + arg = arg.replace("\\", "/") + arg_split = arg.split("/") + for elem in arg_split: + if elem != "" and elem != "http:": + url = url + elem + "/" + # remove trailing slash for filenames + if os.path.splitext(args[-1])[1]: + url = url.rstrip("/") + return url + + +def get_path(path): + """ + Get Path. + """ + + if path.startswith('.') or os.path.isabs(path) or not os.path.isdir(os.path.join(MEDIA_ROOT, DIRECTORY, path)): + return None + return path + + +def get_file(path, filename): + """ + Get File. + """ + + converted_path = smart_str(os.path.join(MEDIA_ROOT, DIRECTORY, path, filename)) + + if not os.path.isfile(converted_path) and not os.path.isdir(converted_path): + return None + return filename + + +def get_breadcrumbs(query, path): + """ + Get breadcrumbs. + """ + + breadcrumbs = [] + dir_query = "" + if path: + for item in path.split(os.sep): + dir_query = os.path.join(dir_query,item) + breadcrumbs.append([item,dir_query]) + return breadcrumbs + + +def get_filterdate(filterDate, dateTime): + """ + Get filterdate. + """ + + returnvalue = '' + dateYear = strftime("%Y", gmtime(dateTime)) + dateMonth = strftime("%m", gmtime(dateTime)) + dateDay = strftime("%d", gmtime(dateTime)) + if filterDate == 'today' and int(dateYear) == int(localtime()[0]) and int(dateMonth) == int(localtime()[1]) and int(dateDay) == int(localtime()[2]): returnvalue = 'true' + elif filterDate == 'thismonth' and dateTime >= time()-2592000: returnvalue = 'true' + elif filterDate == 'thisyear' and int(dateYear) == int(localtime()[0]): returnvalue = 'true' + elif filterDate == 'past7days' and dateTime >= time()-604800: returnvalue = 'true' + elif filterDate == '': returnvalue = 'true' + return returnvalue + + +def get_settings_var(): + """ + Get settings variables used for FileBrowser listing. + """ + + settings_var = {} + # Main + settings_var['DEBUG'] = DEBUG + settings_var['MEDIA_ROOT'] = MEDIA_ROOT + settings_var['MEDIA_URL'] = MEDIA_URL + settings_var['DIRECTORY'] = DIRECTORY + # FileBrowser + settings_var['URL_FILEBROWSER_MEDIA'] = URL_FILEBROWSER_MEDIA + settings_var['PATH_FILEBROWSER_MEDIA'] = PATH_FILEBROWSER_MEDIA + # TinyMCE + settings_var['URL_TINYMCE'] = URL_TINYMCE + settings_var['PATH_TINYMCE'] = PATH_TINYMCE + # Extensions/Formats (for FileBrowseField) + settings_var['EXTENSIONS'] = EXTENSIONS + settings_var['SELECT_FORMATS'] = SELECT_FORMATS + # Versions + settings_var['VERSIONS_BASEDIR'] = VERSIONS_BASEDIR + settings_var['VERSIONS'] = VERSIONS + settings_var['ADMIN_VERSIONS'] = ADMIN_VERSIONS + settings_var['ADMIN_THUMBNAIL'] = ADMIN_THUMBNAIL + settings_var['PREVIEW_VERSION'] = PREVIEW_VERSION + # FileBrowser Options + settings_var['MAX_UPLOAD_SIZE'] = MAX_UPLOAD_SIZE + # Convert Filenames + settings_var['CONVERT_FILENAME'] = CONVERT_FILENAME + return settings_var + + +def handle_file_upload(path, file): + """ + Handle File Upload. + """ + try: + file_path = os.path.join(path, file.name) + uploadedfile = default_storage.save(file_path, file) + except Exception, inst: + print "___filebrowser.functions.handle_file_upload(): could not save uploaded file" + print "ERROR: ", inst + print "___" + return uploadedfile + + +def get_file_type(filename): + """ + Get file type as defined in EXTENSIONS. + """ + + file_extension = os.path.splitext(filename)[1].lower() + file_type = '' + for k,v in EXTENSIONS.iteritems(): + for extension in v: + if file_extension == extension.lower(): + file_type = k + return file_type + + +def is_selectable(filename, selecttype): + """ + Get select type as defined in FORMATS. + """ + + file_extension = os.path.splitext(filename)[1].lower() + select_types = [] + for k,v in SELECT_FORMATS.iteritems(): + for extension in v: + if file_extension == extension.lower(): + select_types.append(k) + return select_types + + +def version_generator(value, version_prefix, force=None): + """ + Generate Version for an Image. + value has to be a serverpath relative to MEDIA_ROOT. + """ + + # PIL's Error "Suspension not allowed here" work around: + # s. http://mail.python.org/pipermail/image-sig/1999-August/000816.html + if STRICT_PIL: + from PIL import ImageFile + else: + try: + from PIL import ImageFile + except ImportError: + import ImageFile + ImageFile.MAXBLOCK = IMAGE_MAXBLOCK # default is 64k + + try: + im = Image.open(smart_str(os.path.join(MEDIA_ROOT, value))) + version_path = get_version_path(value, version_prefix) + absolute_version_path = smart_str(os.path.join(MEDIA_ROOT, version_path)) + version_dir = os.path.split(absolute_version_path)[0] + if not os.path.isdir(version_dir): + os.makedirs(version_dir) + os.chmod(version_dir, 0775) + version = scale_and_crop(im, VERSIONS[version_prefix]['width'], VERSIONS[version_prefix]['height'], VERSIONS[version_prefix]['opts']) + if version: + try: + version.save(absolute_version_path, quality=VERSION_QUALITY, optimize=(os.path.splitext(version_path)[1].lower() != '.gif')) + except IOError: + version.save(absolute_version_path, quality=VERSION_QUALITY) + else: + # version wasn't created + pass + return version_path + except: + return None + + +def scale_and_crop(im, width, height, opts): + """ + Scale and Crop. + """ + + x, y = [float(v) for v in im.size] + + if 'upscale' not in opts and x < width: + # version would be bigger than original + # no need to create this version, because "upscale" isn't defined. + return False + + if width: + xr = float(width) + else: + xr = float(x*height/y) + if height: + yr = float(height) + else: + yr = float(y*width/x) + + if 'crop' in opts: + r = max(xr/x, yr/y) + else: + r = min(xr/x, yr/y) + + if r < 1.0 or (r > 1.0 and 'upscale' in opts): + im = im.resize((int(x*r), int(y*r)), resample=Image.ANTIALIAS) + + if 'crop' in opts: + x, y = [float(v) for v in im.size] + ex, ey = (x-min(x, xr))/2, (y-min(y, yr))/2 + if ex or ey: + im = im.crop((int(ex), int(ey), int(x-ex), int(y-ey))) + return im + + # if 'crop' in opts: + # if 'top_left' in opts: + # #draw cropping box from upper left corner of image + # box = (0, 0, int(min(x, xr)), int(min(y, yr))) + # im = im.resize((int(x), int(y)), resample=Image.ANTIALIAS).crop(box) + # elif 'top_right' in opts: + # #draw cropping box from upper right corner of image + # box = (int(x-min(x, xr)), 0, int(x), int(min(y, yr))) + # im = im.resize((int(x), int(y)), resample=Image.ANTIALIAS).crop(box) + # elif 'bottom_left' in opts: + # #draw cropping box from lower left corner of image + # box = (0, int(y-min(y, yr)), int(xr), int(y)) + # im = im.resize((int(x), int(y)), resample=Image.ANTIALIAS).crop(box) + # elif 'bottom_right' in opts: + # #draw cropping box from lower right corner of image + # (int(x-min(x, xr)), int(y-min(y, yr)), int(x), int(y)) + # im = im.resize((int(x), int(y)), resample=Image.ANTIALIAS).crop(box) + # else: + # ex, ey = (x-min(x, xr))/2, (y-min(y, yr))/2 + # if ex or ey: + # box = (int(ex), int(ey), int(x-ex), int(y-ey)) + # im = im.resize((int(x), int(y)), resample=Image.ANTIALIAS).crop(box) + # return im + +scale_and_crop.valid_options = ('crop', 'upscale') + + +def convert_filename(value): + """ + Convert Filename. + """ + + if CONVERT_FILENAME: + return value.replace(" ", "_").lower() + else: + return value + + diff --git a/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.mo new file mode 100644 index 0000000..bd8106d Binary files /dev/null and b/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 0000000..0dca85e --- /dev/null +++ b/app/lib/filebrowser/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,328 @@ +# translation of django.po to Catalan +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# PATRICK KRANZLMUELLER , 2009. +# Antoni Aloy , 2009. +msgid "" +msgstr "" +"Project-Id-Version: django\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-02-19 21:24+0000\n" +"PO-Revision-Date: 2009-02-15 19:00+0100\n" +"Last-Translator: Antoni Aloy \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: fields.py:27 +#, python-format +msgid "Ensure this value has at most %(max)d characters (it has %(length)d)." +msgstr "" +"Confirma que aquest valor té com a màxim %(max)d caràcters (té longitud %" +"(length)d)." + +#: fields.py:28 +#, python-format +msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." +msgstr "" +"Confirma que aquest valor té com a mínim %(min)d caràcters (té longitud %" +"(length)d)." + +#: fields.py:29 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"L'extensió %(ext)s no està permesa. Sols es permeten les extensions %" +"(allowed)s." + +#: forms.py:23 +msgid "Name" +msgstr "Nom" + +#: forms.py:23 forms.py:46 +msgid "" +"The Name will automatically be converted to lowercase. Only letters, " +"numbers, underscores and hyphens are allowed." +msgstr "" +"El nom serà convertit automàticament a minúscules. Sols estan permeses le " +"lletres, nombres, subratllats i guions." + +#: forms.py:30 forms.py:53 +msgid "Only letters, numbers, underscores and hyphens are allowed." +msgstr "Sols es permeten lletres, nombres, subratllats i guions." + +#: forms.py:33 +msgid "The Folder already exists." +msgstr "La carpeta ja existeix." + +#: forms.py:46 +msgid "New Name" +msgstr "Nou nom" + +#: forms.py:56 +msgid "The File/Folder already exists." +msgstr "La carpeta/arixu ja existeix" + +#: forms.py:92 +msgid "File" +msgstr "Arxiu" + +#: forms.py:93 +msgid "Use Image Generator" +msgstr "Fer servir el generador d'imatges" + +#: forms.py:102 +msgid "File already exists." +msgstr "L'arxiu ja existeix" + +#: forms.py:108 +msgid "Filename is not allowed." +msgstr "El nom d'arxiu no està permès" + +#: forms.py:113 +msgid "File extension is not allowed." +msgstr "L'extensió de l'arxiu no està permesa" + +#: forms.py:118 +msgid "Filesize exceeds allowed Upload Size." +msgstr "El tamany de l'arxiu supera el límit permès" + +#: functions.py:84 +msgid "Home" +msgstr "Inici" + +#: functions.py:276 +msgid "Thumbnail creation failed." +msgstr "Ha fallat la creació de la miniatura" + +#: functions.py:331 functions.py:398 +msgid "Image creation failed." +msgstr "La creació de la imatge ha fallat" + +#: views.py:165 +msgid "FileBrowser" +msgstr "Visor d'arxius" + +#: views.py:188 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "La carpeta %s ha estat creada amb èxit." + +#: views.py:194 +msgid "Permission denied." +msgstr "Permís denegat." + +#: views.py:196 +msgid "Error creating directory." +msgstr "Error creant el directori." + +#: views.py:204 views.py:205 templates/filebrowser/index.html:30 +msgid "New Folder" +msgstr "Nova carpeta" + +#: views.py:250 +msgid "Upload successful." +msgstr "Pujada completada" + +#: views.py:263 templates/filebrowser/index.html:33 +#: templates/filebrowser/upload.html:62 +msgid "Upload" +msgstr "Pujar" + +#: views.py:264 +msgid "Select files to upload" +msgstr "Selecciona arxius a pujar." + +#: views.py:294 +msgid "Thumbnail creation successful." +msgstr "S'han creat les miniatures satisfactòriament." + +#: views.py:344 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "L'arxiu %s ha estat borrat amb èxit." + +#: views.py:356 +#, python-format +msgid "The directory %s was successfully deleted." +msgstr "El directori %s ha estat borrat amb èxit." + +#: views.py:407 +msgid "Error renaming Thumbnail." +msgstr "Error reanomenant la miniatura" + +#: views.py:413 +msgid "Renaming was successful." +msgstr "El canvi de nom ha tingut èxit." + +#: views.py:418 +msgid "Error." +msgstr "Error." + +#: views.py:427 templates/filebrowser/include/filelisting.html:52 +msgid "Rename" +msgstr "Reanomenar" + +#: views.py:428 +#, python-format +msgid "Rename \"%s\"" +msgstr "Reanomena \"%s\"" + +#: views.py:465 +msgid "Successfully generated Images." +msgstr "Imatges generades satisfactòriament." + +#: templates/filebrowser/index.html:31 +msgid "Make Thumbs" +msgstr "Crear miniatures" + +#: templates/filebrowser/index.html:32 +msgid "Generate Images" +msgstr "Generar imatges" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 +msgid "Please correct the following errors." +msgstr "Per favor, corregeix els següents errors" + +#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 +msgid "Submit" +msgstr "Enviar" + +#: templates/filebrowser/upload.html:37 +msgid "Will use image generator." +msgstr "Usaré el generador d'imatges" + +#: templates/filebrowser/upload.html:47 +msgid "Help" +msgstr "Ajuda" + +#: templates/filebrowser/upload.html:51 +msgid "Allowed" +msgstr "Permès" + +#: templates/filebrowser/upload.html:57 +msgid "Max. Filesize" +msgstr "Tamay màxim" + +#: templates/filebrowser/include/filelisting.html:8 +msgid "Select" +msgstr "Selecciona" + +#: templates/filebrowser/include/filelisting.html:15 +msgid "Select File" +msgstr "Selecciona fitxer" + +#: templates/filebrowser/include/filelisting.html:26 +msgid "Make Thumbnail" +msgstr "Crear miniatura" + +#: templates/filebrowser/include/filelisting.html:29 +msgid "View Image" +msgstr "Veure imatge" + +#: templates/filebrowser/include/filelisting.html:46 +msgid "Generate Image Versions" +msgstr "Generar versions de la imatge" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Are you sure you want to delete this file?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Delete File" +msgstr "Esborrar fitxer" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Are you sure you want to delete this Folder?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Delete Folder" +msgstr "Esborrar carpeta" + +#: templates/filebrowser/include/filter.html:15 +msgid "Filter" +msgstr "Filtrar" + +#: templates/filebrowser/include/filter.html:21 +msgid "By Date" +msgstr "Per data" + +#: templates/filebrowser/include/filter.html:23 +msgid "Any Date" +msgstr "Qualsevol data" + +#: templates/filebrowser/include/filter.html:25 +msgid "Today" +msgstr "Avui" + +#: templates/filebrowser/include/filter.html:27 +msgid "Past 7 days" +msgstr "Fa 7 dies" + +#: templates/filebrowser/include/filter.html:29 +msgid "Past 30 days" +msgstr "Fa 30 dies" + +#: templates/filebrowser/include/filter.html:31 +msgid "This year" +msgstr "Enguany" + +#: templates/filebrowser/include/filter.html:39 +msgid "By Type" +msgstr "Per tipus" + +#: templates/filebrowser/include/filter.html:41 +msgid "All" +msgstr "Tots" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found." +msgstr "No s'han trobat items" + +#: templates/filebrowser/include/paginator.html:10 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s Item" +msgstr[1] "%(counter)s Item" + +#: templates/filebrowser/include/paginator.html:16 +msgid "No Items." +msgstr "No hi ha items" + +#: templates/filebrowser/include/tableheader.html:13 +#: templates/filebrowser/include/tableheader.html:14 +msgid "Filename" +msgstr "Nom de fitxer" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Size" +msgstr "Tamany" + +#: templates/filebrowser/include/tableheader.html:23 +#: templates/filebrowser/include/tableheader.html:24 +msgid "Date" +msgstr "Data" + +#: templates/filebrowser/include/toolbar.html:14 +msgid "Go" +msgstr "Ves" + +#: templates/filebrowser/include/toolbar.html:16 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s trobat" +msgstr[1] "%(counter)s trobats" + +#: templates/filebrowser/include/toolbar.html:17 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "total %(counter)s item" +msgstr[1] "total %(counter)s Items" diff --git a/app/lib/filebrowser/locale/de/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 0000000..afa1e3a Binary files /dev/null and b/app/lib/filebrowser/locale/de/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/de/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/de/LC_MESSAGES/django.po new file mode 100644 index 0000000..179837f --- /dev/null +++ b/app/lib/filebrowser/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,408 @@ +# GERMAN TRANSLATION FOR THE DJANGO-FILEBROWSER. +# Copyright (C) 2010 vonautomatisch +# This file is distributed under the same license as the DJANGO-FILEBROSER package. +# PATRICK KRANZLMUELLER , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: 3.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-04 16:39+0200\n" +"PO-Revision-Date: 2010-06-05 12:00+0100\n" +"Last-Translator: PATRICK KRANZLMUELLER \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"Die Dateierweiterung %(ext)s ist nicht erlaubt. Nur die Dateierweiterungen %" +"(allowed)s sind erlaubt." + +#: forms.py:26 templates/filebrowser/versions.html:63 +msgid "Name" +msgstr "Name" + +#: forms.py:26 forms.py:32 forms.py:49 forms.py:55 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "" +"Nur Buchstaben, Zahlen, Unterstriche, Leerzeichen und Bindestriche sind " +"erlaubt." + +#: forms.py:35 forms.py:58 +msgid "The Folder already exists." +msgstr "Der Ordner existiert bereits." + +#: forms.py:49 +msgid "New Name" +msgstr "Neuer Name" + +#: forms.py:60 +msgid "The File already exists." +msgstr "Die Datei existiert bereits." + +#: settings.py:119 +msgid "Folder" +msgstr "Ordner" + +#: settings.py:120 +msgid "Image" +msgstr "Bild" + +#: settings.py:121 +msgid "Video" +msgstr "Video" + +#: settings.py:122 +msgid "Document" +msgstr "Dokument" + +#: settings.py:123 +msgid "Audio" +msgstr "Audio" + +#: settings.py:124 +msgid "Code" +msgstr "Code" + +#: views.py:56 views.py:166 views.py:221 views.py:318 views.py:400 +#: views.py:461 +msgid "The requested Folder does not exist." +msgstr "Der Ordner existiert bereits." + +#: views.py:60 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "Der Upload-Folder wurde nicht gefunden. Bitte die settings überprüfen." + +#: views.py:143 templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:8 +#: templates/filebrowser/include/breadcrumbs.html:10 +msgid "FileBrowser" +msgstr "FileBrowser" + +#: views.py:184 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "Der Ordner %s wurde erfolgreich erstellt." + +#: views.py:193 +msgid "Permission denied." +msgstr "Fehlende Zugriffsberechtigungen." + +#: views.py:195 +msgid "Error creating folder." +msgstr "Fehler beim Erstellen des Ordners." + +#: views.py:202 views.py:205 templates/filebrowser/index.html:98 +msgid "New Folder" +msgstr "Neuer Ordner" + +#: views.py:233 +msgid "Select files to upload" +msgstr "Dateien zum Upload auswählen" + +#: views.py:237 templates/filebrowser/index.html:99 +#: templates/filebrowser/upload.html:107 +msgid "Upload" +msgstr "Upload" + +#: views.py:320 views.py:402 views.py:463 +msgid "The requested File does not exist." +msgstr "Die gewünschte Datei existiert nicht." + +#: views.py:343 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Die Datei %s wurde erfolgreich gelöscht." + +#: views.py:359 +#, python-format +msgid "The folder %s was successfully deleted." +msgstr "Der Ordner %s wurde erfolgreich gelöscht." + +#: views.py:429 +msgid "Renaming was successful." +msgstr "Das Umbenennen war erfolgreich." + +#: views.py:434 +msgid "Error." +msgstr "Fehler." + +#: views.py:442 +#, python-format +msgid "Rename \"%s\"" +msgstr "\"%s\" umbenennen" + +#: views.py:445 templates/filebrowser/include/filelisting.html:89 +msgid "Rename" +msgstr "Umbenennen" + +#: views.py:471 views.py:474 +#, python-format +msgid "Versions for \"%s\"" +msgstr "Bildversionen für \"%s\"" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:24 +msgid "Please correct the following errors." +msgstr "Bitte die angeführten Fehler korrigieren." + +#: templates/filebrowser/makedir.html:33 templates/filebrowser/upload.html:99 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "" +"Der Name wird automatisch in Kleinbuchstaben konvertiert. Leerzeichen werden " +"durch Unterstriche ersetzt." + +#: templates/filebrowser/makedir.html:40 templates/filebrowser/rename.html:38 +msgid "Submit" +msgstr "Abschicken" + +#: templates/filebrowser/upload.html:45 +msgid "BROWSE" +msgstr "BROWSE" + +#: templates/filebrowser/upload.html:46 +msgid "An Error occured" +msgstr "Es sind Fehler aufgetreten" + +#: templates/filebrowser/upload.html:47 +msgid "Completed" +msgstr "Abgeschlossen" + +#: templates/filebrowser/upload.html:48 +msgid "Do you want to replace the file" +msgstr "Wollen Sie die Datei ersetzen" + +#: templates/filebrowser/upload.html:49 +msgid "KB" +msgstr "KB" + +#: templates/filebrowser/upload.html:50 +msgid "MB" +msgstr "MB" + +#: templates/filebrowser/upload.html:83 +msgid "Help" +msgstr "Hilfe" + +#: templates/filebrowser/upload.html:87 +msgid "Allowed" +msgstr "Erlaubt" + +#: templates/filebrowser/upload.html:93 +msgid "Max. Filesize" +msgstr "Max. Dateigröße" + +#: templates/filebrowser/upload.html:106 +msgid "Clear Queue" +msgstr "Stapel entfernen" + +#: templates/filebrowser/versions.html:66 +msgid "Image Version" +msgstr "Bildversion" + +#: templates/filebrowser/versions.html:69 +msgid "Debug" +msgstr "Debug" + +#: templates/filebrowser/versions.html:83 +#: templates/filebrowser/versions.html:95 +#: templates/filebrowser/versions.html:107 +#: templates/filebrowser/include/filelisting.html:11 +#: templates/filebrowser/include/filelisting.html:23 +#: templates/filebrowser/include/filelisting.html:35 +msgid "Select" +msgstr "Auswählen" + +#: templates/filebrowser/versions.html:118 +msgid "Width" +msgstr "Breite" + +#: templates/filebrowser/versions.html:119 +msgid "Height" +msgstr "Höhe" + +#: templates/filebrowser/include/breadcrumbs.html:5 +msgid "Home" +msgstr "Start" + +#: templates/filebrowser/include/filelisting.html:51 +#: templates/filebrowser/include/filelisting.html:68 +msgid "View Image" +msgstr "Originalbild anzeigen" + +#: templates/filebrowser/include/filelisting.html:66 +msgid "Preview" +msgstr "Vorschau" + +#: templates/filebrowser/include/filelisting.html:73 +msgid "Versions" +msgstr "Bildversionen" + +#: templates/filebrowser/include/filelisting.html:91 +msgid "Are you sure you want to delete this file?" +msgstr "Sind Sie sicher, dass Sie die Datei löschen wollen?" + +#: templates/filebrowser/include/filelisting.html:91 +msgid "Delete File" +msgstr "Datei löschen" + +#: templates/filebrowser/include/filelisting.html:94 +msgid "Are you sure you want to delete this Folder?" +msgstr "Sind Sie sicher, dass Sie den Ordner löschen wollen?" + +#: templates/filebrowser/include/filelisting.html:94 +msgid "Delete Folder" +msgstr "Ordner löschen" + +#: templates/filebrowser/include/filter.html:4 +msgid "Filter" +msgstr "Filter" + +#: templates/filebrowser/include/filter.html:7 +msgid "By Date" +msgstr "Nach Datum" + +#: templates/filebrowser/include/filter.html:9 +msgid "Any Date" +msgstr "Alle" + +#: templates/filebrowser/include/filter.html:10 +msgid "Today" +msgstr "Heute" + +#: templates/filebrowser/include/filter.html:11 +msgid "Past 7 days" +msgstr "Letzte Woche" + +#: templates/filebrowser/include/filter.html:12 +msgid "This Month" +msgstr "" + +#: templates/filebrowser/include/filter.html:13 +msgid "This year" +msgstr "Dieses Jahr" + +#: templates/filebrowser/include/filter.html:17 +msgid "By Type" +msgstr "Nach Typ" + +#: templates/filebrowser/include/filter.html:19 +msgid "All" +msgstr "Alle" + +#: templates/filebrowser/include/paginator.html:5 +msgid "result" +msgstr "1 Suchergebnis" + +#: templates/filebrowser/include/paginator.html:5 +msgid "results" +msgstr "Resultate" + +#: templates/filebrowser/include/paginator.html:9 +#: templates/filebrowser/include/paginator.html:11 +msgid "total" +msgstr "" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "1 Suchergebnis" +msgstr[1] "%(counter)s Suchergebnisse" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:9 +#, python-format +msgid "%(full_result_count)s total" +msgstr "%(full_result_count)s insgesamt" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "" + +#: templates/filebrowser/include/search.html:7 +#: templates/filebrowser/include/toolbar.html:16 +msgid "Search" +msgstr "Suche" + +#: templates/filebrowser/include/search.html:19 +msgid "Go" +msgstr "Los" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s Datei gefunden" +msgstr[1] "%(counter)s Dateien gefunden" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "%(counter)s Datei insgesamt" +msgstr[1] "%(counter)s Dateien insgesamt" + +#: templates/filebrowser/include/tableheader.html:9 +#: templates/filebrowser/include/tableheader.html:10 +msgid "Type" +msgstr "Nach Typ" + +#: templates/filebrowser/include/tableheader.html:12 +msgid "Thumbnail" +msgstr "" + +#: templates/filebrowser/include/tableheader.html:14 +#: templates/filebrowser/include/tableheader.html:15 +msgid "Filename" +msgstr "Dateiname" + +#: templates/filebrowser/include/tableheader.html:17 +#: templates/filebrowser/include/tableheader.html:18 +msgid "Size" +msgstr "Größe" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Date" +msgstr "Datum" + +#: templates/filebrowser/include/toolbar.html:6 +msgid "Results" +msgstr "Resultate" + +#: templates/filebrowser/include/toolbar.html:8 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s Resultat" +msgstr[1] "%(counter)s Resultate" + +#~ msgid "Select File" +#~ msgstr "Datei auswählen" + +#~ msgid "Past 30 days" +#~ msgstr "Letzter Monat" + +#~ msgid "No Items Found" +#~ msgstr "Keine Dateien gefunden" + +#~ msgid "%(counter)s Item" +#~ msgid_plural "%(counter)s Items" +#~ msgstr[0] "%(counter)s Datei" +#~ msgstr[1] "%(counter)s Dateien" + +#~ msgid "No Items" +#~ msgstr "Keine Dateien" + +#~ msgid "No Items Found." +#~ msgstr "Keine Dateien gefunden." + +#~ msgid "No Items." +#~ msgstr "Keine Dateien." diff --git a/app/lib/filebrowser/locale/es/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/es/LC_MESSAGES/django.mo new file mode 100644 index 0000000..bb698f8 Binary files /dev/null and b/app/lib/filebrowser/locale/es/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/es/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/es/LC_MESSAGES/django.po new file mode 100644 index 0000000..621979a --- /dev/null +++ b/app/lib/filebrowser/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,328 @@ +# translation of django.po to Spanish +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# PATRICK KRANZLMUELLER , 2009. +# Antoni Aloy , 2009. +msgid "" +msgstr "" +"Project-Id-Version: django\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-02-19 21:24+0000\n" +"PO-Revision-Date: 2009-02-15 19:14+0100\n" +"Last-Translator: Antoni Aloy \n" +"Language-Team: Spanish\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: fields.py:27 +#, python-format +msgid "Ensure this value has at most %(max)d characters (it has %(length)d)." +msgstr "" +"Compruebe que este valor tiene como máximo %(max)d carácters (tiene %(length)" +"d)." + +#: fields.py:28 +#, python-format +msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." +msgstr "" +"Compruebe que este valor tiene como mínimo %(min)d carácteres (tiene %" +"(length)d)." + +#: fields.py:29 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"La extensión %(ext)s no está permitida. Sólo se permiten las extensiones %" +"(allowed)s." + +#: forms.py:23 +msgid "Name" +msgstr "Nombre" + +#: forms.py:23 forms.py:46 +msgid "" +"The Name will automatically be converted to lowercase. Only letters, " +"numbers, underscores and hyphens are allowed." +msgstr "" +"El nombre se convertirá automáticamente a minúsculas. Sólo se permiten " +"letras, números, subrayado y guiones." + +#: forms.py:30 forms.py:53 +msgid "Only letters, numbers, underscores and hyphens are allowed." +msgstr "Sólo se permiten letras, números, subrayado y guiones." + +#: forms.py:33 +msgid "The Folder already exists." +msgstr "La carpeta ya existe." + +#: forms.py:46 +msgid "New Name" +msgstr "Nuevo nombre" + +#: forms.py:56 +msgid "The File/Folder already exists." +msgstr "El archivo/carpeta ya existe." + +#: forms.py:92 +msgid "File" +msgstr "Archivo" + +#: forms.py:93 +msgid "Use Image Generator" +msgstr "Emplear el generador de imágenes" + +#: forms.py:102 +msgid "File already exists." +msgstr "El archivo ya existe." + +#: forms.py:108 +msgid "Filename is not allowed." +msgstr "Nombre de archivo no permitido." + +#: forms.py:113 +msgid "File extension is not allowed." +msgstr "Extensión de archivo no permitida." + +#: forms.py:118 +msgid "Filesize exceeds allowed Upload Size." +msgstr "El tamaño del archivo excede el máximo permitido." + +#: functions.py:84 +msgid "Home" +msgstr "Inicio" + +#: functions.py:276 +msgid "Thumbnail creation failed." +msgstr "Falló la creación de la miniatura." + +#: functions.py:331 functions.py:398 +msgid "Image creation failed." +msgstr "Falló la creación de la Imagen." + +#: views.py:165 +msgid "FileBrowser" +msgstr "Visor de archivos" + +#: views.py:188 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "La carpeta %s se creó con éxito." + +#: views.py:194 +msgid "Permission denied." +msgstr "Permiso denegado." + +#: views.py:196 +msgid "Error creating directory." +msgstr "Error creando el directorio." + +#: views.py:204 views.py:205 templates/filebrowser/index.html:30 +msgid "New Folder" +msgstr "Nueva carpeta." + +#: views.py:250 +msgid "Upload successful." +msgstr "Subida completada." + +#: views.py:263 templates/filebrowser/index.html:33 +#: templates/filebrowser/upload.html:62 +msgid "Upload" +msgstr "Subir" + +#: views.py:264 +msgid "Select files to upload" +msgstr "Seleccione archivos a subir." + +#: views.py:294 +msgid "Thumbnail creation successful." +msgstr "Se creó la miniatura con éxito." + +#: views.py:344 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "El archivo %s se eliminó con éxito." + +#: views.py:356 +#, python-format +msgid "The directory %s was successfully deleted." +msgstr "El directorio %s se eliminó con éxito." + +#: views.py:407 +msgid "Error renaming Thumbnail." +msgstr "Error renombrando la miniatura." + +#: views.py:413 +msgid "Renaming was successful." +msgstr "Renombrado satisfactorio." + +#: views.py:418 +msgid "Error." +msgstr "Error." + +#: views.py:427 templates/filebrowser/include/filelisting.html:52 +msgid "Rename" +msgstr "Renombrar" + +#: views.py:428 +#, python-format +msgid "Rename \"%s\"" +msgstr "Renombrar \"%s\"" + +#: views.py:465 +msgid "Successfully generated Images." +msgstr "Las imágenes se generaron satisfactoriamente." + +#: templates/filebrowser/index.html:31 +msgid "Make Thumbs" +msgstr "Crear miniaturas" + +#: templates/filebrowser/index.html:32 +msgid "Generate Images" +msgstr "Generar imágenes" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 +msgid "Please correct the following errors." +msgstr "Por favor, corrija los siguientes errores." + +#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 +msgid "Submit" +msgstr "Enviar" + +#: templates/filebrowser/upload.html:37 +msgid "Will use image generator." +msgstr "Usa el generador de imágenes." + +#: templates/filebrowser/upload.html:47 +msgid "Help" +msgstr "Ayuda" + +#: templates/filebrowser/upload.html:51 +msgid "Allowed" +msgstr "Permitido" + +#: templates/filebrowser/upload.html:57 +msgid "Max. Filesize" +msgstr "Tamaño máx." + +#: templates/filebrowser/include/filelisting.html:8 +msgid "Select" +msgstr "Selecciona" + +#: templates/filebrowser/include/filelisting.html:15 +msgid "Select File" +msgstr "Selecciona archivo" + +#: templates/filebrowser/include/filelisting.html:26 +msgid "Make Thumbnail" +msgstr "Crear miniatura" + +#: templates/filebrowser/include/filelisting.html:29 +msgid "View Image" +msgstr "Ver imagen" + +#: templates/filebrowser/include/filelisting.html:46 +msgid "Generate Image Versions" +msgstr "Generar versiones de la imagen" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Are you sure you want to delete this file?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Delete File" +msgstr "Borrar archivo" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Are you sure you want to delete this Folder?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Delete Folder" +msgstr "Borrar carpeta" + +#: templates/filebrowser/include/filter.html:15 +msgid "Filter" +msgstr "Filtrar" + +#: templates/filebrowser/include/filter.html:21 +msgid "By Date" +msgstr "Por fecha" + +#: templates/filebrowser/include/filter.html:23 +msgid "Any Date" +msgstr "Cualquier fecha" + +#: templates/filebrowser/include/filter.html:25 +msgid "Today" +msgstr "Hoy" + +#: templates/filebrowser/include/filter.html:27 +msgid "Past 7 days" +msgstr "Hace 7 días" + +#: templates/filebrowser/include/filter.html:29 +msgid "Past 30 days" +msgstr "Hace 30 días" + +#: templates/filebrowser/include/filter.html:31 +msgid "This year" +msgstr "Este año" + +#: templates/filebrowser/include/filter.html:39 +msgid "By Type" +msgstr "Por tipo" + +#: templates/filebrowser/include/filter.html:41 +msgid "All" +msgstr "Todo" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found." +msgstr "No se encontraron items" + +#: templates/filebrowser/include/paginator.html:10 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s item" +msgstr[1] "%(counter)s items" + +#: templates/filebrowser/include/paginator.html:16 +msgid "No Items." +msgstr "No hay items." + +#: templates/filebrowser/include/tableheader.html:13 +#: templates/filebrowser/include/tableheader.html:14 +msgid "Filename" +msgstr "Nombre de archivo" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Size" +msgstr "Tamaño" + +#: templates/filebrowser/include/tableheader.html:23 +#: templates/filebrowser/include/tableheader.html:24 +msgid "Date" +msgstr "Fecha" + +#: templates/filebrowser/include/toolbar.html:14 +msgid "Go" +msgstr "Ir" + +#: templates/filebrowser/include/toolbar.html:16 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "encontrado %(counter)s Item" +msgstr[1] "encontrados %(counter)s Items" + +#: templates/filebrowser/include/toolbar.html:17 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "total %(counter)s item" +msgstr[1] "total %(counter)s items" diff --git a/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.mo new file mode 100644 index 0000000..26e610d Binary files /dev/null and b/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..5241166 --- /dev/null +++ b/app/lib/filebrowser/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,336 @@ +# Copyright (C) 2009 Rémy Hubscher +# This file is distributed under the same license as the django-filebrowser package. +# Rémy Hubscher , 2009. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-20 11:04+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: REMY HUBSCHER \n" +"Language-Team: FRENCH \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: fields.py:96 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"L'extension de fichier %(ext)s n'est pas autorisée. Les extensions suivantes " +"sont autorisées: %(allowed)s." + +#: forms.py:23 +msgid "Name" +msgstr "Nom" + +#: forms.py:23 forms.py:49 +msgid "" +"The Name will automatically be converted to lowercase. Only letters, " +"numbers, underscores and hyphens are allowed." +msgstr "" +"Le nom sera automatiquement converti en minuscule. Seul les lettres, nombres," +"tirets bas et tirets sont autorisés." + +#: forms.py:30 forms.py:56 +msgid "Only letters, numbers, underscores and hyphens are allowed." +msgstr "Seul les lettres, nombres, tirets bas et tirets sont autorisés." + +#: forms.py:33 +msgid "The Folder already exists." +msgstr "Ce répertoire existe déjà." + +#: forms.py:36 +msgid "Disallowed Folder Name." +msgstr "Nom de fichier interdit." + +#: forms.py:49 +msgid "New Name" +msgstr "Nouveau nom" + +#: forms.py:59 +msgid "The File/Folder already exists." +msgstr "Ce fichier/répertoire existe déjà." + +#: forms.py:95 +msgid "File" +msgstr "Fichier" + +#: forms.py:96 +msgid "Use Image Generator" +msgstr "Utiliser le générateur d'images" + +#: forms.py:105 +msgid "File already exists." +msgstr "Le fichier existe déjà." + +#: forms.py:111 +msgid "Filename is not allowed." +msgstr "Ce nom de fichier n'est pas autorisé." + +#: forms.py:116 +msgid "File extension is not allowed." +msgstr "Cette extension de fichier n'est pas autorisée." + +#: forms.py:121 +msgid "Filesize exceeds allowed Upload Size." +msgstr "La taille du fichier est supérieur à la taille maximale autorisée." + +#: functions.py:84 +msgid "Home" +msgstr "Accueil" + +#: functions.py:279 +msgid "Thumbnail creation failed." +msgstr "La création de miniature à échouée." + +#: functions.py:334 functions.py:389 +msgid "Image creation failed." +msgstr "La création d'image à échouée." + +#: views.py:174 +msgid "FileBrowser" +msgstr "Navigateur de Fichiers" + +#: views.py:198 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "Le répertoire %s a été créé avec succès." + +#: views.py:204 +msgid "Permission denied." +msgstr "Permission refusée." + +#: views.py:206 +msgid "Error creating directory." +msgstr "Impossible de créer le répertoire." + +#: views.py:214 views.py:215 templates/filebrowser/index.html:33 +msgid "New Folder" +msgstr "Nouveau répertoire" + +#: views.py:260 +msgid "Upload successful." +msgstr "L'envoi a réussi." + +#: views.py:273 templates/filebrowser/index.html:36 +#: templates/filebrowser/upload.html:62 +msgid "Upload" +msgstr "Upload" + +#: views.py:274 +msgid "Select files to upload" +msgstr "Sélectionner les fichiers à envoyer" + +#: views.py:304 +msgid "Thumbnail creation successful." +msgstr "Les miniatures ont été créée." + +#: views.py:354 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Le fichier %s a été supprimé." + +#: views.py:366 +#, python-format +msgid "The directory %s was successfully deleted." +msgstr "Le répertoire %s a été supprimé." + +#: views.py:417 +msgid "Error renaming Thumbnail." +msgstr "Impossible de renommer la miniature." + +#: views.py:423 +msgid "Renaming was successful." +msgstr "La miniature a été renommée." + +#: views.py:428 +msgid "Error." +msgstr "Erreur." + +#: views.py:437 templates/filebrowser/include/filelisting.html:52 +msgid "Rename" +msgstr "Renommer" + +#: views.py:438 +#, python-format +msgid "Rename \"%s\"" +msgstr "Renommer \"%s\"" + +#: views.py:475 +msgid "Successfully generated Images." +msgstr "Les images ont été générées." + +#: templates/filebrowser/append.html:5 templates/filebrowser/append.html:7 +#, fuzzy +msgid "File-Browser" +msgstr "Navigateur de Fichiers" + +#: templates/filebrowser/index.html:34 +msgid "Make Thumbs" +msgstr "Générer les miniatures" + +#: templates/filebrowser/index.html:35 +msgid "Generate Images" +msgstr "Générer les images" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 +msgid "Please correct the following errors." +msgstr "Merci de corriger les erreurs suivantes." + +#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 +msgid "Submit" +msgstr "Envoyer" + +#: templates/filebrowser/upload.html:37 +msgid "Will use image generator." +msgstr "Utiliser le générateur d'images." + +#: templates/filebrowser/upload.html:47 +msgid "Help" +msgstr "Aide" + +#: templates/filebrowser/upload.html:51 +msgid "Allowed" +msgstr "Autorisé" + +#: templates/filebrowser/upload.html:57 +msgid "Max. Filesize" +msgstr "Taille Max." + +#: templates/filebrowser/include/filelisting.html:8 +msgid "Select" +msgstr "Sélectionner" + +#: templates/filebrowser/include/filelisting.html:15 +msgid "Select File" +msgstr "Sélectionner le fichier" + +#: templates/filebrowser/include/filelisting.html:26 +msgid "Make Thumbnail" +msgstr "Générer une miniature" + +#: templates/filebrowser/include/filelisting.html:29 +msgid "View Image" +msgstr "Voir l'image" + +#: templates/filebrowser/include/filelisting.html:46 +msgid "Generate Image Versions" +msgstr "Générer des versions de l'image" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Are you sure you want to delete this file?" +msgstr "Êtes-vous sur de vouloir supprimer ce fichier ?" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Delete File" +msgstr "Supprimer le fichier" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Are you sure you want to delete this Folder?" +msgstr "Êtes-vous sur de vouloir supprimer ce répertoire ?" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Delete Folder" +msgstr "Supprimer le répertoire" + +#: templates/filebrowser/include/filter.html:15 +msgid "Filter" +msgstr "Filtrer" + +#: templates/filebrowser/include/filter.html:21 +msgid "By Date" +msgstr "Par date" + +#: templates/filebrowser/include/filter.html:23 +msgid "Any Date" +msgstr "Toutes" + +#: templates/filebrowser/include/filter.html:25 +msgid "Today" +msgstr "Aujourd'hui" + +#: templates/filebrowser/include/filter.html:27 +msgid "Past 7 days" +msgstr "Semaine dernière" + +#: templates/filebrowser/include/filter.html:29 +msgid "Past 30 days" +msgstr "Mois dernier" + +#: templates/filebrowser/include/filter.html:31 +msgid "This year" +msgstr "Cette année" + +#: templates/filebrowser/include/filter.html:39 +msgid "By Type" +msgstr "Par type" + +#: templates/filebrowser/include/filter.html:41 +msgid "All" +msgstr "Alle" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found." +msgstr "Aucun article." + +#: templates/filebrowser/include/paginator.html:10 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s article" +msgstr[1] "%(counter)s articles" + +#: templates/filebrowser/include/paginator.html:16 +msgid "No Items." +msgstr "Aucun article." + +#: templates/filebrowser/include/tableheader.html:13 +#: templates/filebrowser/include/tableheader.html:14 +msgid "Filename" +msgstr "Nom" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Size" +msgstr "Taille" + +#: templates/filebrowser/include/tableheader.html:23 +#: templates/filebrowser/include/tableheader.html:24 +msgid "Date" +msgstr "Date" + +#: templates/filebrowser/include/toolbar.html:14 +msgid "Go" +msgstr "Chercher" + +#: templates/filebrowser/include/toolbar.html:16 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s article trouvé" +msgstr[1] "%(counter)s articles trouvés" + +#: templates/filebrowser/include/toolbar.html:17 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "%(counter)s article total" +msgstr[1] "%(counter)s articles total" + +msgid "Folder" +msgstr "Répertoire" + +msgid "Image" +msgstr "Image" + +msgid "Document" +msgstr "Document" + +msgid "Code" +msgstr "Code" + +msgid "Sound" +msgstr "Son" \ No newline at end of file diff --git a/app/lib/filebrowser/locale/it/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/it/LC_MESSAGES/django.mo new file mode 100644 index 0000000..90e8cdc Binary files /dev/null and b/app/lib/filebrowser/locale/it/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/it/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/it/LC_MESSAGES/django.po new file mode 100644 index 0000000..6968286 --- /dev/null +++ b/app/lib/filebrowser/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,356 @@ +# translation of django.po to +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Alberto BOTTARINI , 2009. +msgid "" +msgstr "" +"Project-Id-Version: django\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-02-19 21:24+0000\n" +"PO-Revision-Date: 2009-02-04 14:02+0100\n" +"Last-Translator: Alberto BOTTARINI \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: fields.py:27 +#, python-format +msgid "Ensure this value has at most %(max)d characters (it has %(length)d)." +msgstr "" +"Assicurati che il testo abbia al massimo %(max)d caratteri (ora sono %" +"(length)d)" + +#: fields.py:28 +#, python-format +msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." +msgstr "" +"Assicurati che il testo abbia come minimo %(min)d caratteri (ora sono %" +"(length)d)" + +#: fields.py:29 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "L'estensione %(ext)s è vietata. Sono accettate: %(allowed)s" + +#: forms.py:23 +msgid "Name" +msgstr "" + +#: forms.py:23 forms.py:46 +#, fuzzy +msgid "" +"The Name will automatically be converted to lowercase. Only letters, " +"numbers, underscores and hyphens are allowed." +msgstr "" +"Il nome del file verrà sostituito con le lettere minuscole.Sono accettati " +"solo lettere. numeri, underscore e accenti." + +#: forms.py:30 forms.py:53 +msgid "Only letters, numbers, underscores and hyphens are allowed." +msgstr "Sono accettati solo lettere. numeri, underscore e accenti." + +#: forms.py:33 +#, fuzzy +msgid "The Folder already exists." +msgstr "La cartella esiste già" + +#: forms.py:46 +msgid "New Name" +msgstr "" + +#: forms.py:56 +#, fuzzy +msgid "The File/Folder already exists." +msgstr "Il file/cartella esiste già" + +#: forms.py:92 +#, fuzzy +msgid "File" +msgstr "Filtro" + +#: forms.py:93 +#, fuzzy +msgid "Use Image Generator" +msgstr "Usa il generatore di immagini" + +#: forms.py:102 +msgid "File already exists." +msgstr "Il file esiste già" + +#: forms.py:108 +msgid "Filename is not allowed." +msgstr "Filename non permesso" + +#: forms.py:113 +msgid "File extension is not allowed." +msgstr "Estensione non permessa" + +#: forms.py:118 +msgid "Filesize exceeds allowed Upload Size." +msgstr "Il file eccede il limite" + +#: functions.py:84 +msgid "Home" +msgstr "Home" + +#: functions.py:276 +msgid "Thumbnail creation failed." +msgstr "Errore nella creazione delle thumbnail" + +#: functions.py:331 functions.py:398 +msgid "Image creation failed." +msgstr "Errore nella creazione dell'immagine" + +#: views.py:165 +msgid "FileBrowser" +msgstr "FileBrowser" + +#: views.py:188 +#, fuzzy, python-format +msgid "The Folder %s was successfully created." +msgstr "Cartella %s creata con successo" + +#: views.py:194 +msgid "Permission denied." +msgstr "Permesso negato" + +#: views.py:196 +msgid "Error creating directory." +msgstr "Errore nella creazione della cartella" + +#: views.py:204 views.py:205 templates/filebrowser/index.html:30 +#, fuzzy +msgid "New Folder" +msgstr "Elimina la cartella" + +#: views.py:250 +msgid "Upload successful." +msgstr "Upload effettuato con successo" + +#: views.py:263 templates/filebrowser/index.html:33 +#: templates/filebrowser/upload.html:62 +msgid "Upload" +msgstr "" + +#: views.py:264 +msgid "Select files to upload" +msgstr "Seleziona i file da uploadare" + +#: views.py:294 +msgid "Thumbnail creation successful." +msgstr "Creazione thumbnail effettuata con successo" + +#: views.py:344 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Eliminazione di %s effettuata con successo" + +#: views.py:356 +#, python-format +msgid "The directory %s was successfully deleted." +msgstr "Eliminazione di %s effettuata con successo" + +#: views.py:407 +msgid "Error renaming Thumbnail." +msgstr "Errore nella rinominazione delle thumbnail" + +#: views.py:413 +msgid "Renaming was successful." +msgstr "Rinominazione effettuata con successo" + +#: views.py:418 +msgid "Error." +msgstr "Errore" + +#: views.py:427 templates/filebrowser/include/filelisting.html:52 +#, fuzzy +msgid "Rename" +msgstr "Nome del file" + +#: views.py:428 +#, python-format +msgid "Rename \"%s\"" +msgstr "Rinomina \"%s\"" + +#: views.py:465 +msgid "Successfully generated Images." +msgstr "Immagini generate con successo" + +#: templates/filebrowser/index.html:31 +msgid "Make Thumbs" +msgstr "Genera le thumbnail" + +#: templates/filebrowser/index.html:32 +msgid "Generate Images" +msgstr "Genera le immagini" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 +msgid "Please correct the following errors." +msgstr "" + +#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 +msgid "Submit" +msgstr "Invia" + +#: templates/filebrowser/upload.html:37 +#, fuzzy +msgid "Will use image generator." +msgstr "Usa il generatore di immagini" + +#: templates/filebrowser/upload.html:47 +msgid "Help" +msgstr "Aiuto" + +#: templates/filebrowser/upload.html:51 +msgid "Allowed" +msgstr "Accettate" + +#: templates/filebrowser/upload.html:57 +msgid "Max. Filesize" +msgstr "Dimensione massima" + +#: templates/filebrowser/include/filelisting.html:8 +#, fuzzy +msgid "Select" +msgstr "Seleziona un file" + +#: templates/filebrowser/include/filelisting.html:15 +msgid "Select File" +msgstr "Seleziona un file" + +#: templates/filebrowser/include/filelisting.html:26 +msgid "Make Thumbnail" +msgstr "Genera la thumbnail" + +#: templates/filebrowser/include/filelisting.html:29 +msgid "View Image" +msgstr "Guarda immagine" + +#: templates/filebrowser/include/filelisting.html:46 +msgid "Generate Image Versions" +msgstr "Genera le immagini" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Are you sure you want to delete this file?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Delete File" +msgstr "Elimina il file" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Are you sure you want to delete this Folder?" +msgstr "" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Delete Folder" +msgstr "Elimina la cartella" + +#: templates/filebrowser/include/filter.html:15 +msgid "Filter" +msgstr "Filtro" + +#: templates/filebrowser/include/filter.html:21 +msgid "By Date" +msgstr "Per data" + +#: templates/filebrowser/include/filter.html:23 +msgid "Any Date" +msgstr "Qualsiasi data" + +#: templates/filebrowser/include/filter.html:25 +msgid "Today" +msgstr "Oggi" + +#: templates/filebrowser/include/filter.html:27 +msgid "Past 7 days" +msgstr "Ultimi 7 giorni" + +#: templates/filebrowser/include/filter.html:29 +msgid "Past 30 days" +msgstr "Questo mese" + +#: templates/filebrowser/include/filter.html:31 +msgid "This year" +msgstr "Quest'anno" + +#: templates/filebrowser/include/filter.html:39 +msgid "By Type" +msgstr "Per tipo" + +#: templates/filebrowser/include/filter.html:41 +msgid "All" +msgstr "Tutti" + +#: templates/filebrowser/include/paginator.html:5 +#, fuzzy +msgid "No Items Found." +msgstr "Nessun file trovato" + +#: templates/filebrowser/include/paginator.html:10 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "" +msgstr[1] "" + +#: templates/filebrowser/include/paginator.html:16 +msgid "No Items." +msgstr "" + +#: templates/filebrowser/include/tableheader.html:13 +#: templates/filebrowser/include/tableheader.html:14 +msgid "Filename" +msgstr "Nome del file" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Size" +msgstr "Dimensione" + +#: templates/filebrowser/include/tableheader.html:23 +#: templates/filebrowser/include/tableheader.html:24 +msgid "Date" +msgstr "Data" + +#: templates/filebrowser/include/toolbar.html:14 +msgid "Go" +msgstr "" + +#: templates/filebrowser/include/toolbar.html:16 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "" +msgstr[1] "" + +#: templates/filebrowser/include/toolbar.html:17 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "" +msgstr[1] "" + +#~ msgid "" +#~ "The directory will automatically be converted to lowercase. Only letters, " +#~ "numbers, underscores and hyphens are allowed." +#~ msgstr "" +#~ "Il nome della cartella verrà sostituito con le lettere minuscole.Sono " +#~ "accettati solo lettere. numeri, underscore e accenti." + +#~ msgid "Make directory" +#~ msgstr "Nuova cartella" + +#~ msgid "Make Directory" +#~ msgstr "Nuova cartella" + +#~ msgid "Multiple Upload" +#~ msgstr "Chargement de fichiers" + +#~ msgid "Rename File" +#~ msgstr "Rinomina il file" + +#~ msgid "No Files" +#~ msgstr "Nessun file" diff --git a/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.mo new file mode 100644 index 0000000..8a0bb8f Binary files /dev/null and b/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 0000000..3503254 --- /dev/null +++ b/app/lib/filebrowser/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,319 @@ +# Dutch translation for django-filebrowser. +# Copyright (C) 2009 Patrick Kranzlmueller +# This file is distributed under the same license as the django-filebrowser package. +# Joost Cassee , 2009. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-02-16 13:51+0100\n" +"PO-Revision-Date: 2009-02-20 22:53+0100\n" +"Last-Translator: Joost Cassee \n" +"Language-Team: Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: fields.py:27 +#, python-format +msgid "Ensure this value has at most %(max)d characters (it has %(length)d)." +msgstr "" +"Dit veld mag maximaal %(max)d karakters bevatten (de huidige lengte is " +"%(length)d)." + +#: fields.py:28 +#, python-format +msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." +msgstr "" +"Dit veld moet minstens %(min)d karakters bevatten (de huidige lengte is " +"%(length)d)." + +#: fields.py:29 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "Extensie %(ext)s is niet toegestaand. Toegestaan zijn: %(allowed)s." + +#: forms.py:23 +msgid "Name" +msgstr "Naam" + +#: forms.py:23 forms.py:46 +msgid "" +"The Name will automatically be converted to lowercase. Only letters, " +"numbers, underscores and hyphens are allowed." +msgstr "" +"De naam wordt automatisch geconverteerd naar kleine letters. Alleen letters, " +"nummers, liggende streepjes en verbindingstreepjes zijn toegestaan." + +#: forms.py:30 forms.py:53 +msgid "Only letters, numbers, underscores and hyphens are allowed." +msgstr "" +"Alleen letters, nummers, liggende streepjes en verbindingstreepjes zijn " +"toegestaan." + +#: forms.py:33 +msgid "The Folder already exists." +msgstr "Deze map bestaat reeds." + +#: forms.py:46 +msgid "New Name" +msgstr "Nieuwe naam" + +#: forms.py:56 +msgid "The File/Folder already exists." +msgstr "Een map of bestand met deze naam bestaat reeds." + +#: forms.py:92 +msgid "File" +msgstr "Bestand" + +#: forms.py:93 +msgid "Use Image Generator" +msgstr "Maak afbeeldingsversies" + +#: forms.py:102 +msgid "File already exists." +msgstr "Bestand bestaat reeds." + +#: forms.py:108 +msgid "Filename is not allowed." +msgstr "Bestandsnaam is niet toegestaan." + +#: forms.py:113 +msgid "File extension is not allowed." +msgstr "Bestandsextensie is niet toegestaand" + +#: forms.py:118 +msgid "Filesize exceeds allowed Upload Size." +msgstr "Het bestand overschreidt de maximale upload grootte." + +#: functions.py:75 +msgid "Home" +msgstr "Start" + +#: functions.py:267 +msgid "Thumbnail creation failed." +msgstr "Fout bij het aanmaken van de voorbeeldafbeeldingen." + +#: functions.py:316 functions.py:377 +msgid "Image creation failed." +msgstr "Fout bij het aanmaken van de afbeeldingsversies." + +#: views.py:156 +msgid "FileBrowser" +msgstr "FileBrowser" + +#: views.py:179 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "De map %s is aangemaakt." + +#: views.py:185 +msgid "Permission denied." +msgstr "Geen toestemming." + +#: views.py:187 +msgid "Error creating directory." +msgstr "Fout bij het aanmaken van de map." + +#: views.py:195 views.py:196 templates/filebrowser/index.html:30 +msgid "New Folder" +msgstr "Nieuwe map" + +#: views.py:235 +msgid "Upload successful." +msgstr "Upload geslaagd." + +#: views.py:248 templates/filebrowser/index.html:33 +#: templates/filebrowser/upload.html:62 +msgid "Upload" +msgstr "Uploaden" + +#: views.py:249 +msgid "Select files to upload" +msgstr "Selecteer bestanden voor upload" + +#: views.py:279 +msgid "Thumbnail creation successful." +msgstr "Voorbeeldafbeeldingen aangemaakt." + +#: views.py:329 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Bestand %s verwijderd." + +#: views.py:341 +#, python-format +msgid "The directory %s was successfully deleted." +msgstr "Map %s verwijderd." + +#: views.py:392 +msgid "Error renaming Thumbnail." +msgstr "Fout bij het hernoemen van de voorbeeldafbeelding." + +#: views.py:398 +msgid "Renaming was successful." +msgstr "Hernoemen geslaagd." + +#: views.py:403 +msgid "Error." +msgstr "Fout." + +#: views.py:412 templates/filebrowser/include/filelisting.html:52 +msgid "Rename" +msgstr "Hernoemen" + +#: views.py:413 +#, python-format +msgid "Rename \"%s\"" +msgstr "Hernoem \"%s\"" + +#: views.py:450 +msgid "Successfully generated Images." +msgstr "Afbeeldingsversies aangemaakt." + +#: templates/filebrowser/index.html:31 +msgid "Make Thumbs" +msgstr "Voorbeeldafbeeldingen aanmaken" + +#: templates/filebrowser/index.html:32 +msgid "Generate Images" +msgstr "Afbeeldingsversies aanmaken" + +#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 +msgid "Please correct the following errors." +msgstr "Corrigeer onderstaande fouten." + +#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 +msgid "Submit" +msgstr "OK" + +#: templates/filebrowser/upload.html:37 +msgid "Will use image generator." +msgstr "Afbeeldingsversies zullen worden aangemaakt." + +#: templates/filebrowser/upload.html:47 +msgid "Help" +msgstr "Help" + +#: templates/filebrowser/upload.html:51 +msgid "Allowed" +msgstr "Toegestaan" + +#: templates/filebrowser/upload.html:57 +msgid "Max. Filesize" +msgstr "Max. bestandsgrootte" + +#: templates/filebrowser/include/filelisting.html:8 +msgid "Select" +msgstr "Selecteren" + +#: templates/filebrowser/include/filelisting.html:15 +msgid "Select File" +msgstr "Selecteer bestand" + +#: templates/filebrowser/include/filelisting.html:26 +msgid "Make Thumbnail" +msgstr "Maak voorbeeldafbeelding" + +#: templates/filebrowser/include/filelisting.html:29 +msgid "View Image" +msgstr "Afbeelding tonen" + +#: templates/filebrowser/include/filelisting.html:46 +msgid "Generate Image Versions" +msgstr "Afbeeldingsversies aanmaken" + +#: templates/filebrowser/include/filelisting.html:61 +msgid "Delete File" +msgstr "Bestand verwijderen" + +#: templates/filebrowser/include/filelisting.html:64 +msgid "Delete Folder" +msgstr "Verwijder map" + +#: templates/filebrowser/include/filter.html:15 +msgid "Filter" +msgstr "Filter" + +#: templates/filebrowser/include/filter.html:21 +msgid "By Date" +msgstr "Op datum" + +#: templates/filebrowser/include/filter.html:23 +msgid "Any Date" +msgstr "Alle" + +#: templates/filebrowser/include/filter.html:25 +msgid "Today" +msgstr "Vandaag" + +#: templates/filebrowser/include/filter.html:27 +msgid "Past 7 days" +msgstr "Afgelopen 7 dagen" + +#: templates/filebrowser/include/filter.html:29 +msgid "Past 30 days" +msgstr "Afgelopen 30 dagen" + +#: templates/filebrowser/include/filter.html:31 +msgid "This year" +msgstr "Dit jaar" + +#: templates/filebrowser/include/filter.html:39 +msgid "By Type" +msgstr "Op type" + +#: templates/filebrowser/include/filter.html:41 +msgid "All" +msgstr "Alle" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found." +msgstr "Geen objecten gevonden" + +#: templates/filebrowser/include/paginator.html:10 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s object" +msgstr[1] "(counter)s objecten" + +#: templates/filebrowser/include/paginator.html:16 +msgid "No Items." +msgstr "Geen objecten." + +#: templates/filebrowser/include/tableheader.html:13 +#: templates/filebrowser/include/tableheader.html:14 +msgid "Filename" +msgstr "Bestandsnaam" + +#: templates/filebrowser/include/tableheader.html:20 +#: templates/filebrowser/include/tableheader.html:21 +msgid "Size" +msgstr "Grootte" + +#: templates/filebrowser/include/tableheader.html:23 +#: templates/filebrowser/include/tableheader.html:24 +msgid "Date" +msgstr "Datum" + +#: templates/filebrowser/include/toolbar.html:14 +msgid "Go" +msgstr "Ga" + +#: templates/filebrowser/include/toolbar.html:16 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s object gevonden" +msgstr[1] "%(counter)s objecten gevonden" + +#: templates/filebrowser/include/toolbar.html:17 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "Totaal %(counter)s object" +msgstr[1] "Totaal %(counter)s objecten" diff --git a/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000..a294c14 Binary files /dev/null and b/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 0000000..55fe567 --- /dev/null +++ b/app/lib/filebrowser/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,394 @@ +# Russian translation +# This file is distributed under the same license as the django-filebrowser package. +# Ivan Gromov , 2009. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-26 22:47+0500\n" +"PO-Revision-Date: 2009-05-19 03:52\n" +"Last-Translator: Mikhail Korbov \n" +"Language-Team: Russian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "Расширение %(ext)s запрещено. Разрешено только %(allowed)s." + +#: forms.py:27 +#: templates/filebrowser/versions.html:64 +msgid "Name" +msgstr "Имя" + +#: forms.py:27 +#: forms.py:33 +#: forms.py:50 +#: forms.py:56 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "Допускается вводить буквы, цифры, символ подчеркивания и дефис." + +#: forms.py:36 +#: forms.py:59 +msgid "The Folder already exists." +msgstr "Папка уже существует." + +#: forms.py:50 +msgid "New Name" +msgstr "Новое имя" + +#: forms.py:61 +msgid "The File already exists." +msgstr "Файл уже существует." + +#: settings.py:118 +msgid "Folder" +msgstr "Папка" + +#: settings.py:119 +msgid "Image" +msgstr "Изображение" + +#: settings.py:120 +msgid "Video" +msgstr "Видео" + +#: settings.py:121 +msgid "Document" +msgstr "Документ" + +#: settings.py:122 +msgid "Audio" +msgstr "Аудио" + +#: settings.py:123 +msgid "Code" +msgstr "Код" + +#: views.py:55 +#: views.py:165 +#: views.py:230 +#: views.py:336 +#: views.py:418 +#: views.py:479 +msgid "The requested Folder does not exist." +msgstr "Запрашиваемой папки не существует." + +#: views.py:59 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "Ошибка при поиска папки для загрузки файлов. Быть может, ее не существует?" + +#: views.py:142 +#: templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:8 +#: templates/filebrowser/include/breadcrumbs.html:10 +msgid "FileBrowser" +msgstr "Файловый менеджер" + +#: views.py:183 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "Папка %s успешно создана." + +#: views.py:192 +msgid "Permission denied." +msgstr "Доступ запрещен." + +#: views.py:194 +msgid "Error creating folder." +msgstr "Ошибка создания папки." + +#: views.py:201 +#: views.py:204 +#: templates/filebrowser/index.html:54 +msgid "New Folder" +msgstr "Новая папка" + +#: views.py:242 +msgid "Select files to upload" +msgstr "Выберите файлы для загрузки" + +#: views.py:246 +#: templates/filebrowser/index.html:55 +#: templates/filebrowser/upload.html:110 +msgid "Upload" +msgstr "Загрузить" + +#: views.py:338 +#: views.py:420 +#: views.py:481 +msgid "The requested File does not exist." +msgstr "Запрашиваемого файла не существует." + +#: views.py:361 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Файл %s удален." + +#: views.py:377 +msgid "The folder %s was successfully deleted." +msgstr "Папка %s удалена." + +#: views.py:447 +msgid "Renaming was successful." +msgstr "Переименовано." + +#: views.py:452 +msgid "Error." +msgstr "Ошибка." + +#: views.py:460 +#, python-format +msgid "Rename \"%s\"" +msgstr "Переименовать \"%s\"" + +#: views.py:463 +#: templates/filebrowser/include/filelisting.html:75 +msgid "Rename" +msgstr "Переименовать" + +#: views.py:489 +#: views.py:492 +#, python-format +msgid "Versions for \"%s\"" +msgstr "Версии для \"%s\"" + +#: templates/filebrowser/makedir.html:25 +#: templates/filebrowser/rename.html:25 +msgid "Please correct the following errors." +msgstr "Пожалуйста, исправьте ошибки." + +#: templates/filebrowser/makedir.html:33 +#: templates/filebrowser/upload.html:98 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "Имя будет автоматически переведено в нижний регистр. Пробелы будут заменены на подчеркивания." + +#: templates/filebrowser/makedir.html:38 +#: templates/filebrowser/rename.html:36 +msgid "Submit" +msgstr "Отправить" + +#: templates/filebrowser/upload.html:45 +msgid "BROWSE" +msgstr "ОБЗОР" + +#: templates/filebrowser/upload.html:46 +msgid "An Error occured" +msgstr "Произошла ошибка" + +#: templates/filebrowser/upload.html:47 +msgid "Completed" +msgstr "Готово" + +#: templates/filebrowser/upload.html:48 +msgid "Do you want to replace the file" +msgstr "Вы уверены, что хотите заменить этот файл?" + +#: templates/filebrowser/upload.html:49 +msgid "KB" +msgstr "Кб" + +#: templates/filebrowser/upload.html:50 +msgid "MB" +msgstr "Мб" + +#: templates/filebrowser/upload.html:81 +msgid "Help" +msgstr "Справка" + +#: templates/filebrowser/upload.html:85 +msgid "Allowed" +msgstr "Разрешено" + +#: templates/filebrowser/upload.html:91 +msgid "Max. Filesize" +msgstr "Макс. размер" + +#: templates/filebrowser/upload.html:107 +msgid "Clear Queue" +msgstr "Очистить список" + +#: templates/filebrowser/versions.html:67 +#, fuzzy +msgid "Image Version" +msgstr "Создать миниатюры" + +#: templates/filebrowser/versions.html:70 +msgid "Debug" +msgstr "Отладка" + +#: templates/filebrowser/versions.html:84 +#: templates/filebrowser/include/filelisting.html:12 +msgid "Select" +msgstr "Выберите" + +#: templates/filebrowser/versions.html:96 +#: templates/filebrowser/versions.html:108 +#: templates/filebrowser/include/filelisting.html:26 +#: templates/filebrowser/include/filelisting.html:40 +msgid "Select File" +msgstr "Выберите файл" + +#: templates/filebrowser/versions.html:119 +msgid "Width" +msgstr "Ширина" + +#: templates/filebrowser/versions.html:120 +msgid "Height" +msgstr "Высота" + +#: templates/filebrowser/include/breadcrumbs.html:5 +msgid "Home" +msgstr "Начало" + +#: templates/filebrowser/include/filelisting.html:51 +msgid "Show Versions" +msgstr "Показать варианты" + +#: templates/filebrowser/include/filelisting.html:62 +msgid "View Image" +msgstr "Просмотреть изображение" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Are you sure you want to delete this file?" +msgstr "Вы уверены, что хотите удалить этот файл?" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Delete File" +msgstr "Удалить файл" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Are you sure you want to delete this Folder?" +msgstr "Вы уверены, что хотите удалить эту папку?" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Delete Folder" +msgstr "Удалить папку" + +#: templates/filebrowser/include/filter.html:3 +msgid "Filter" +msgstr "Фильтр" + +#: templates/filebrowser/include/filter.html:9 +msgid "By Date" +msgstr "По дате" + +#: templates/filebrowser/include/filter.html:11 +msgid "Any Date" +msgstr "За любое число" + +#: templates/filebrowser/include/filter.html:13 +msgid "Today" +msgstr "Сегодня" + +#: templates/filebrowser/include/filter.html:15 +msgid "Past 7 days" +msgstr "Последние 7 дней" + +#: templates/filebrowser/include/filter.html:17 +msgid "Past 30 days" +msgstr "Последние 30 дней" + +#: templates/filebrowser/include/filter.html:19 +msgid "This year" +msgstr "Этот год" + +#: templates/filebrowser/include/filter.html:27 +msgid "By Type" +msgstr "По типу" + +#: templates/filebrowser/include/filter.html:29 +msgid "All" +msgstr "Все" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found" +msgstr "Ничего не найдено" + +#: templates/filebrowser/include/paginator.html:11 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s элемент" +msgstr[1] "%(counter)s элемента" +msgstr[2] "%(counter)s элементов" + +#: templates/filebrowser/include/paginator.html:26 +msgid "No Items" +msgstr "Ничего нет" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s элемент" +msgstr[1] "%(counter)s элемента" +msgstr[2] "%(counter)s элементов" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:9 +msgid "%(full_result_count)s total" +msgstr "%(full_result_count)s всего" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "Снять ограничения" + +#: templates/filebrowser/include/search.html:7 +#: templates/filebrowser/include/toolbar.html:16 +msgid "Search" +msgstr "Искать" + +#: templates/filebrowser/include/search.html:19 +msgid "Go" +msgstr "Вперед" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s элемент найден" +msgstr[1] "%(counter)s элементов найдено" +msgstr[2] "%(counter)s элементов найдено" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "%(counter)s элемент всего" +msgstr[1] "%(counter)s элемента всего" +msgstr[2] "%(counter)s элементов всего" + +#: templates/filebrowser/include/tableheader.html:16 +#: templates/filebrowser/include/tableheader.html:17 +msgid "Filename" +msgstr "Имя файла" + +#: templates/filebrowser/include/tableheader.html:21 +#: templates/filebrowser/include/tableheader.html:22 +msgid "Size" +msgstr "Размер" + +#: templates/filebrowser/include/tableheader.html:24 +#: templates/filebrowser/include/tableheader.html:25 +msgid "Date" +msgstr "Дата" + +#: templates/filebrowser/include/toolbar.html:6 +msgid "Results" +msgstr "Результаты" + +#: templates/filebrowser/include/toolbar.html:8 +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s элемент" +msgstr[1] "%(counter)s элемента" +msgstr[2] "%(counter)s элементов" diff --git a/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.mo new file mode 100644 index 0000000..cc54bac Binary files /dev/null and b/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.po new file mode 100644 index 0000000..cfac502 --- /dev/null +++ b/app/lib/filebrowser/locale/sr/LC_MESSAGES/django.po @@ -0,0 +1,376 @@ +# Copyright (C) 2009 Janos Guljas +# This file is distributed under the same license as the django-filebrowser package. +# Janos Guljas , 2009. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: django-filebrowser 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-12 18:14+0100\n" +"PO-Revision-Date: 2009-05-06 22:18+0200\n" +"Last-Translator: Janos Guljas \n" +"Language-Team: Serbian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"Фајлови са екстензијом %(ext)s нису дозвољени. Само %(allowed)s екстензије " +"су дозвољене." + +#: forms.py:27 templates/filebrowser/versions.html:64 +msgid "Name" +msgstr "Назив" + +#: forms.py:27 forms.py:33 forms.py:50 forms.py:56 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "Само слова, цифре, доња црта и црта су дозвољени карактери." + +#: forms.py:36 forms.py:59 +msgid "The Folder already exists." +msgstr "Фолдер већ постоји." + +#: forms.py:50 +msgid "New Name" +msgstr "Нови назив" + +#: forms.py:61 +msgid "The File already exists." +msgstr "Фајл већ постоји." + +#: settings.py:105 +msgid "Folder" +msgstr "Фолдер" + +#: settings.py:106 +msgid "Image" +msgstr "Слика" + +#: settings.py:107 +msgid "Video" +msgstr "Видео" + +#: settings.py:108 +msgid "Document" +msgstr "Документ" + +#: settings.py:109 +msgid "Audio" +msgstr "Аудио" + +#: settings.py:110 +msgid "Code" +msgstr "Код" + +#: views.py:47 views.py:138 views.py:191 views.py:285 views.py:366 +#: views.py:426 +msgid "The requested Folder does not exist." +msgstr "Тражен фолдер не постоји." + +#: views.py:51 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "Фолдер за постављање фајлова не постоји." + +#: views.py:116 templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:7 +#: templates/filebrowser/include/breadcrumbs.html:9 +msgid "FileBrowser" +msgstr "Фајл брузер" + +#: views.py:156 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "Фолдер %s је успешно направљен." + +#: views.py:164 +msgid "Permission denied." +msgstr "Одбијен приступ." + +#: views.py:166 +msgid "Error creating folder." +msgstr "Грешка при креирању фолдера." + +#: views.py:173 views.py:175 templates/filebrowser/index.html:57 +msgid "New Folder" +msgstr "Нови фолдер" + +#: views.py:203 +msgid "Select files to upload" +msgstr "Изаберите фајлове за пренос" + +#: views.py:205 templates/filebrowser/index.html:58 +#: templates/filebrowser/upload.html:106 +msgid "Upload" +msgstr "Пренос фајла" + +#: views.py:287 views.py:368 views.py:428 +msgid "The requested File does not exist." +msgstr "Тражен фајл не постоји" + +#: views.py:310 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Фајл %s је супешно обрисан." + +#: views.py:326 +#, python-format +msgid "The folder %s was successfully deleted." +msgstr "Фолдер %s је супешно обрисан." + +#: views.py:395 +msgid "Renaming was successful." +msgstr "Успешна промена назива." + +#: views.py:400 +msgid "Error." +msgstr "Грешка." + +#: views.py:408 +#, python-format +msgid "Rename \"%s\"" +msgstr "Промени назив: „%s“" + +#: views.py:410 templates/filebrowser/include/filelisting.html:73 +msgid "Rename" +msgstr "Промени назив" + +#: views.py:436 views.py:438 +#, python-format +msgid "Versions for \"%s\"" +msgstr "Верзије за „%s“" + +#: templates/filebrowser/makedir.html:25 templates/filebrowser/rename.html:25 +msgid "Please correct the following errors." +msgstr "Исправите следеће грешке." + +#: templates/filebrowser/makedir.html:33 templates/filebrowser/upload.html:96 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "" +"Слова у називу ће аутоматски бити конвертована у мала. Празна поља ће бити " +"замењена доњим цртама." + +#: templates/filebrowser/makedir.html:38 templates/filebrowser/rename.html:36 +msgid "Submit" +msgstr "Изврши" + +#: templates/filebrowser/upload.html:44 +msgid "BROWSE" +msgstr "БИРАЈ" + +#: templates/filebrowser/upload.html:45 +msgid "An Error occured" +msgstr "Грешка се десила" + +#: templates/filebrowser/upload.html:46 +msgid "Completed" +msgstr "Завршено" + +#: templates/filebrowser/upload.html:47 +msgid "Do you want to replace the file" +msgstr "Да ли желите да замените овај фајл?" + +#: templates/filebrowser/upload.html:48 +msgid "KB" +msgstr "KB" + +#: templates/filebrowser/upload.html:49 +msgid "MB" +msgstr "MB" + +#: templates/filebrowser/upload.html:79 +msgid "Help" +msgstr "Помоћ" + +#: templates/filebrowser/upload.html:83 +msgid "Allowed" +msgstr "Дозвољено" + +#: templates/filebrowser/upload.html:89 +msgid "Max. Filesize" +msgstr "Највећа величина фајла" + +#: templates/filebrowser/upload.html:104 +msgid "Clear Queue" +msgstr "Очисти листу" + +#: templates/filebrowser/versions.html:67 +msgid "Image Version" +msgstr "Верзија слике" + +#: templates/filebrowser/versions.html:70 +msgid "Debug" +msgstr "Исправљање грешака" + +#: templates/filebrowser/versions.html:84 +#: templates/filebrowser/include/filelisting.html:10 +msgid "Select" +msgstr "Изаберите" + +#: templates/filebrowser/versions.html:96 +#: templates/filebrowser/versions.html:108 +#: templates/filebrowser/include/filelisting.html:24 +#: templates/filebrowser/include/filelisting.html:38 +msgid "Select File" +msgstr "Изаберите фајл" + +#: templates/filebrowser/versions.html:119 +msgid "Width" +msgstr "Висина" + +#: templates/filebrowser/versions.html:120 +msgid "Height" +msgstr "Ширина" + +#: templates/filebrowser/include/breadcrumbs.html:4 +msgid "Home" +msgstr "Почетни фолдер" + +#: templates/filebrowser/include/filelisting.html:49 +msgid "Show Versions" +msgstr "Прикажи верзије" + +#: templates/filebrowser/include/filelisting.html:60 +msgid "View Image" +msgstr "Преглед слике" + +#: templates/filebrowser/include/filelisting.html:85 +msgid "Are you sure you want to delete this file?" +msgstr "Да ли сте сигурни да желите да избришете овај фајл?" + +#: templates/filebrowser/include/filelisting.html:85 +msgid "Delete File" +msgstr "Избриши фајл" + +#: templates/filebrowser/include/filelisting.html:88 +msgid "Are you sure you want to delete this Folder?" +msgstr "Да ли сте сигурни да желите да избришете овај фолдер?" + +#: templates/filebrowser/include/filelisting.html:88 +msgid "Delete Folder" +msgstr "Избриши фолдер" + +#: templates/filebrowser/include/filter.html:3 +msgid "Filter" +msgstr "Филтер" + +#: templates/filebrowser/include/filter.html:9 +msgid "By Date" +msgstr "По датуму" + +#: templates/filebrowser/include/filter.html:11 +msgid "Any Date" +msgstr "Сви датуми" + +#: templates/filebrowser/include/filter.html:13 +msgid "Today" +msgstr "Данас" + +#: templates/filebrowser/include/filter.html:15 +msgid "Past 7 days" +msgstr "Последњих 7 дана" + +#: templates/filebrowser/include/filter.html:17 +msgid "Past 30 days" +msgstr "Последњих 30 дана" + +#: templates/filebrowser/include/filter.html:19 +msgid "This year" +msgstr "Ове године" + +#: templates/filebrowser/include/filter.html:27 +msgid "By Type" +msgstr "По типу" + +#: templates/filebrowser/include/filter.html:29 +msgid "All" +msgstr "Сви" + +#: templates/filebrowser/include/paginator.html:4 +msgid "No Items Found" +msgstr "Ништа није пронађено." + +#: templates/filebrowser/include/paginator.html:9 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s ставка" +msgstr[1] "%(counter)s ставки" + +#: templates/filebrowser/include/paginator.html:15 +msgid "No Items" +msgstr "Ниједна ставка" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "1 резултат" +msgstr[1] "%(counter)s резултата" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:9 +#, python-format +msgid "%(full_result_count)s total" +msgstr "%(full_result_count)s укупно" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "Очисти забране" + +#: templates/filebrowser/include/search.html:7 +#: templates/filebrowser/include/toolbar.html:16 +msgid "Search" +msgstr "Претрага" + +#: templates/filebrowser/include/search.html:19 +msgid "Go" +msgstr "Иди" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s ставка нађена" +msgstr[1] "%(counter)s ставки нађено" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "%(counter)s ставка укупно" +msgstr[1] "%(counter)s ставки укупно" + +#: templates/filebrowser/include/tableheader.html:16 +#: templates/filebrowser/include/tableheader.html:17 +msgid "Filename" +msgstr "Назив фајла" + +#: templates/filebrowser/include/tableheader.html:21 +#: templates/filebrowser/include/tableheader.html:22 +msgid "Size" +msgstr "Величина" + +#: templates/filebrowser/include/tableheader.html:24 +#: templates/filebrowser/include/tableheader.html:25 +msgid "Date" +msgstr "Датум" + +#: templates/filebrowser/include/toolbar.html:6 +msgid "Results" +msgstr "Резултати" + +#: templates/filebrowser/include/toolbar.html:8 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s резултат" +msgstr[1] "%(counter)s резултата" diff --git a/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo new file mode 100644 index 0000000..845b039 Binary files /dev/null and b/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po new file mode 100644 index 0000000..40615d9 --- /dev/null +++ b/app/lib/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po @@ -0,0 +1,376 @@ +# Copyright (C) 2009 Janos Guljas +# This file is distributed under the same license as the django-filebrowser package. +# Janos Guljas , 2009. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: django-filebrowser 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-12 18:14+0100\n" +"PO-Revision-Date: 2009-05-06 22:18+0200\n" +"Last-Translator: Janos Guljas \n" +"Language-Team: Serbian latin\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "" +"Fajlovi sa ekstenzijom %(ext)s nisu dozvoljeni. Samo %(allowed)s ekstenzije " +"su dozvoljene." + +#: forms.py:27 templates/filebrowser/versions.html:64 +msgid "Name" +msgstr "Naziv" + +#: forms.py:27 forms.py:33 forms.py:50 forms.py:56 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "Samo slova, cifre, donja crta i crta su dozvoljeni karakteri." + +#: forms.py:36 forms.py:59 +msgid "The Folder already exists." +msgstr "Folder već postoji." + +#: forms.py:50 +msgid "New Name" +msgstr "Novi naziv" + +#: forms.py:61 +msgid "The File already exists." +msgstr "Fajl već postoji." + +#: settings.py:105 +msgid "Folder" +msgstr "Folder" + +#: settings.py:106 +msgid "Image" +msgstr "Slika" + +#: settings.py:107 +msgid "Video" +msgstr "Video" + +#: settings.py:108 +msgid "Document" +msgstr "Dokument" + +#: settings.py:109 +msgid "Audio" +msgstr "Audio" + +#: settings.py:110 +msgid "Code" +msgstr "Kod" + +#: views.py:47 views.py:138 views.py:191 views.py:285 views.py:366 +#: views.py:426 +msgid "The requested Folder does not exist." +msgstr "Tražen folder ne postoji." + +#: views.py:51 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "Folder za postavljanje fajlova ne postoji." + +#: views.py:116 templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:7 +#: templates/filebrowser/include/breadcrumbs.html:9 +msgid "FileBrowser" +msgstr "Fajl bruzer" + +#: views.py:156 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "Folder %s je uspešno napravljen." + +#: views.py:164 +msgid "Permission denied." +msgstr "Odbijen pristup." + +#: views.py:166 +msgid "Error creating folder." +msgstr "Greška pri kreiranju foldera." + +#: views.py:173 views.py:175 templates/filebrowser/index.html:57 +msgid "New Folder" +msgstr "Novi folder" + +#: views.py:203 +msgid "Select files to upload" +msgstr "Izaberite fajlove za prenos" + +#: views.py:205 templates/filebrowser/index.html:58 +#: templates/filebrowser/upload.html:106 +msgid "Upload" +msgstr "Prenos fajla" + +#: views.py:287 views.py:368 views.py:428 +msgid "The requested File does not exist." +msgstr "Tražen fajl ne postoji" + +#: views.py:310 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "Fajl %s je supešno obrisan." + +#: views.py:326 +#, python-format +msgid "The folder %s was successfully deleted." +msgstr "Folder %s je supešno obrisan." + +#: views.py:395 +msgid "Renaming was successful." +msgstr "Uspešna promena naziva." + +#: views.py:400 +msgid "Error." +msgstr "Greška." + +#: views.py:408 +#, python-format +msgid "Rename \"%s\"" +msgstr "Promeni naziv: „%s“" + +#: views.py:410 templates/filebrowser/include/filelisting.html:73 +msgid "Rename" +msgstr "Promeni naziv" + +#: views.py:436 views.py:438 +#, python-format +msgid "Versions for \"%s\"" +msgstr "Verzije za „%s“" + +#: templates/filebrowser/makedir.html:25 templates/filebrowser/rename.html:25 +msgid "Please correct the following errors." +msgstr "Ispravite sledeće greške." + +#: templates/filebrowser/makedir.html:33 templates/filebrowser/upload.html:96 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "" +"Slova u nazivu će automatski biti konvertovana u mala. Prazna polja će biti " +"zamenjena donjim crtama." + +#: templates/filebrowser/makedir.html:38 templates/filebrowser/rename.html:36 +msgid "Submit" +msgstr "Izvrši" + +#: templates/filebrowser/upload.html:44 +msgid "BROWSE" +msgstr "BIRAJ" + +#: templates/filebrowser/upload.html:45 +msgid "An Error occured" +msgstr "Greška se desila" + +#: templates/filebrowser/upload.html:46 +msgid "Completed" +msgstr "Završeno" + +#: templates/filebrowser/upload.html:47 +msgid "Do you want to replace the file" +msgstr "Da li želite da zamenite ovaj fajl?" + +#: templates/filebrowser/upload.html:48 +msgid "KB" +msgstr "KB" + +#: templates/filebrowser/upload.html:49 +msgid "MB" +msgstr "MB" + +#: templates/filebrowser/upload.html:79 +msgid "Help" +msgstr "Pomoć" + +#: templates/filebrowser/upload.html:83 +msgid "Allowed" +msgstr "Dozvoljeno" + +#: templates/filebrowser/upload.html:89 +msgid "Max. Filesize" +msgstr "Najveća veličina fajla" + +#: templates/filebrowser/upload.html:104 +msgid "Clear Queue" +msgstr "Očisti listu" + +#: templates/filebrowser/versions.html:67 +msgid "Image Version" +msgstr "Verzija slike" + +#: templates/filebrowser/versions.html:70 +msgid "Debug" +msgstr "Ispravljanje grešaka" + +#: templates/filebrowser/versions.html:84 +#: templates/filebrowser/include/filelisting.html:10 +msgid "Select" +msgstr "Izaberite" + +#: templates/filebrowser/versions.html:96 +#: templates/filebrowser/versions.html:108 +#: templates/filebrowser/include/filelisting.html:24 +#: templates/filebrowser/include/filelisting.html:38 +msgid "Select File" +msgstr "Izaberite fajl" + +#: templates/filebrowser/versions.html:119 +msgid "Width" +msgstr "Visina" + +#: templates/filebrowser/versions.html:120 +msgid "Height" +msgstr "Širina" + +#: templates/filebrowser/include/breadcrumbs.html:4 +msgid "Home" +msgstr "Početni folder" + +#: templates/filebrowser/include/filelisting.html:49 +msgid "Show Versions" +msgstr "Prikaži verzije" + +#: templates/filebrowser/include/filelisting.html:60 +msgid "View Image" +msgstr "Pregled slike" + +#: templates/filebrowser/include/filelisting.html:85 +msgid "Are you sure you want to delete this file?" +msgstr "Da li ste sigurni da želite da izbrišete ovaj fajl?" + +#: templates/filebrowser/include/filelisting.html:85 +msgid "Delete File" +msgstr "Izbriši fajl" + +#: templates/filebrowser/include/filelisting.html:88 +msgid "Are you sure you want to delete this Folder?" +msgstr "Da li ste sigurni da želite da izbrišete ovaj folder?" + +#: templates/filebrowser/include/filelisting.html:88 +msgid "Delete Folder" +msgstr "Izbriši folder" + +#: templates/filebrowser/include/filter.html:3 +msgid "Filter" +msgstr "Filter" + +#: templates/filebrowser/include/filter.html:9 +msgid "By Date" +msgstr "Po datumu" + +#: templates/filebrowser/include/filter.html:11 +msgid "Any Date" +msgstr "Svi datumi" + +#: templates/filebrowser/include/filter.html:13 +msgid "Today" +msgstr "Danas" + +#: templates/filebrowser/include/filter.html:15 +msgid "Past 7 days" +msgstr "Poslednjih 7 dana" + +#: templates/filebrowser/include/filter.html:17 +msgid "Past 30 days" +msgstr "Poslednjih 30 dana" + +#: templates/filebrowser/include/filter.html:19 +msgid "This year" +msgstr "Ove godine" + +#: templates/filebrowser/include/filter.html:27 +msgid "By Type" +msgstr "Po tipu" + +#: templates/filebrowser/include/filter.html:29 +msgid "All" +msgstr "Svi" + +#: templates/filebrowser/include/paginator.html:4 +msgid "No Items Found" +msgstr "Ništa nije pronađeno." + +#: templates/filebrowser/include/paginator.html:9 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s stavka" +msgstr[1] "%(counter)s stavki" + +#: templates/filebrowser/include/paginator.html:15 +msgid "No Items" +msgstr "Nijedna stavka" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "1 rezultat" +msgstr[1] "%(counter)s rezultata" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:9 +#, python-format +msgid "%(full_result_count)s total" +msgstr "%(full_result_count)s ukupno" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "Očisti zabrane" + +#: templates/filebrowser/include/search.html:7 +#: templates/filebrowser/include/toolbar.html:16 +msgid "Search" +msgstr "Pretraga" + +#: templates/filebrowser/include/search.html:19 +msgid "Go" +msgstr "Idi" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "%(counter)s stavka nađena" +msgstr[1] "%(counter)s stavki nađeno" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "%(counter)s stavka ukupno" +msgstr[1] "%(counter)s stavki ukupno" + +#: templates/filebrowser/include/tableheader.html:16 +#: templates/filebrowser/include/tableheader.html:17 +msgid "Filename" +msgstr "Naziv fajla" + +#: templates/filebrowser/include/tableheader.html:21 +#: templates/filebrowser/include/tableheader.html:22 +msgid "Size" +msgstr "Veličina" + +#: templates/filebrowser/include/tableheader.html:24 +#: templates/filebrowser/include/tableheader.html:25 +msgid "Date" +msgstr "Datum" + +#: templates/filebrowser/include/toolbar.html:6 +msgid "Results" +msgstr "Rezultati" + +#: templates/filebrowser/include/toolbar.html:8 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s rezultat" +msgstr[1] "%(counter)s rezultata" diff --git a/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo new file mode 100644 index 0000000..f632132 Binary files /dev/null and b/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 0000000..f9ecb82 --- /dev/null +++ b/app/lib/filebrowser/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,370 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: filebrowser 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-20 17:59+0800\n" +"PO-Revision-Date: 2009-12-20 17:58+0800\n" +"Last-Translator: jianaijun \n" +"Language-Team: freeren.org \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Bookmarks: 0,1,-1,-1,-1,-1,-1,-1,-1,-1\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "扩展名 %(ext)s 是不允许的。只允许 %(allowed)s 。" + +#: forms.py:27 templates/filebrowser/versions.html:64 +msgid "Name" +msgstr "名称" + +#: forms.py:27 forms.py:33 forms.py:50 forms.py:56 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "只允许字母、数字、下划线、空格和连字符。" + +#: forms.py:36 forms.py:59 +msgid "The Folder already exists." +msgstr "这个文件夹已经存在。" + +#: forms.py:50 +msgid "New Name" +msgstr "新名称" + +#: forms.py:61 +msgid "The File already exists." +msgstr "这个文件已经存在。" + +#: settings.py:114 +msgid "Folder" +msgstr "目录" + +#: settings.py:115 +msgid "Image" +msgstr "图片" + +#: settings.py:116 +msgid "Video" +msgstr "视频" + +#: settings.py:117 +msgid "Document" +msgstr "文档" + +#: settings.py:118 +msgid "Audio" +msgstr "音频" + +#: settings.py:119 +msgid "Code" +msgstr "代码" + +#: views.py:54 views.py:164 views.py:219 views.py:316 views.py:398 +#: views.py:459 +msgid "The requested Folder does not exist." +msgstr "请求的文件夹不存在。" + +#: views.py:58 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "查找文件夹发生错误。也许它不存在?" + +#: views.py:141 templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:8 +#: templates/filebrowser/include/breadcrumbs.html:10 +msgid "FileBrowser" +msgstr "文件浏览器" + +#: views.py:182 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "文件夹 \"%s\" 创建成功。" + +#: views.py:191 +msgid "Permission denied." +msgstr "权限被拒绝。" + +#: views.py:193 +msgid "Error creating folder." +msgstr "创建文件夹错误。" + +#: views.py:200 views.py:203 templates/filebrowser/index.html:52 +msgid "New Folder" +msgstr "创建文件夹" + +#: views.py:231 +msgid "Select files to upload" +msgstr "选择上传文件" + +#: views.py:235 templates/filebrowser/index.html:53 +#: templates/filebrowser/upload.html:107 +msgid "Upload" +msgstr "上传" + +#: views.py:318 views.py:400 views.py:461 +msgid "The requested File does not exist." +msgstr "请求的文件不存在。" + +#: views.py:341 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "文件 \"%s\" 删除成功。" + +#: views.py:357 +#, python-format +msgid "The folder %s was successfully deleted." +msgstr "文件夹 \"%s\" 删除成功。" + +#: views.py:427 +msgid "Renaming was successful." +msgstr "重命名成功。" + +#: views.py:432 +msgid "Error." +msgstr "错误。" + +#: views.py:440 +#, python-format +msgid "Rename \"%s\"" +msgstr "重命名 \"%s\"" + +#: views.py:443 templates/filebrowser/include/filelisting.html:75 +msgid "Rename" +msgstr "重命名" + +#: views.py:469 views.py:472 +#, python-format +msgid "Versions for \"%s\"" +msgstr "\"%s\" 版本" + +#: templates/filebrowser/makedir.html:25 templates/filebrowser/rename.html:25 +msgid "Please correct the following errors." +msgstr "请修正下面的错误。" + +#: templates/filebrowser/makedir.html:33 templates/filebrowser/upload.html:97 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "这个名称将自动转换为小写。空格替换为下划线。" + +#: templates/filebrowser/makedir.html:38 templates/filebrowser/rename.html:36 +msgid "Submit" +msgstr "保存" + +#: templates/filebrowser/upload.html:45 +msgid "BROWSE" +msgstr "浏览..." + +#: templates/filebrowser/upload.html:46 +msgid "An Error occured" +msgstr "发生错误" + +#: templates/filebrowser/upload.html:47 +msgid "Completed" +msgstr "已完成" + +#: templates/filebrowser/upload.html:48 +msgid "Do you want to replace the file" +msgstr "你确定要替换这个文件?" + +#: templates/filebrowser/upload.html:49 +msgid "KB" +msgstr "KB" + +#: templates/filebrowser/upload.html:50 +msgid "MB" +msgstr "MB" + +#: templates/filebrowser/upload.html:80 +msgid "Help" +msgstr "帮助" + +#: templates/filebrowser/upload.html:84 +msgid "Allowed" +msgstr "允许" + +#: templates/filebrowser/upload.html:90 +msgid "Max. Filesize" +msgstr "最大文件大小" + +#: templates/filebrowser/upload.html:105 +msgid "Clear Queue" +msgstr "清除队列" + +#: templates/filebrowser/versions.html:67 +msgid "Image Version" +msgstr "图片版本" + +#: templates/filebrowser/versions.html:70 +msgid "Debug" +msgstr "调试" + +#: templates/filebrowser/versions.html:84 +#: templates/filebrowser/include/filelisting.html:12 +msgid "Select" +msgstr "选择" + +#: templates/filebrowser/versions.html:96 +#: templates/filebrowser/versions.html:108 +#: templates/filebrowser/include/filelisting.html:26 +#: templates/filebrowser/include/filelisting.html:40 +msgid "Select File" +msgstr "选择文件" + +#: templates/filebrowser/versions.html:119 +msgid "Width" +msgstr "宽" + +#: templates/filebrowser/versions.html:120 +msgid "Height" +msgstr "高" + +#: templates/filebrowser/include/breadcrumbs.html:5 +msgid "Home" +msgstr "首页" + +#: templates/filebrowser/include/filelisting.html:51 +msgid "Show Versions" +msgstr "显示版本" + +#: templates/filebrowser/include/filelisting.html:62 +msgid "View Image" +msgstr "查看图片" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Are you sure you want to delete this file?" +msgstr "你确定要删除这个文件?" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Delete File" +msgstr "删除文件" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Are you sure you want to delete this Folder?" +msgstr "你确定要删除这个文件夹?" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Delete Folder" +msgstr "删除文件夹" + +#: templates/filebrowser/include/filter.html:3 +msgid "Filter" +msgstr "过滤器" + +#: templates/filebrowser/include/filter.html:9 +msgid "By Date" +msgstr "以 日期" + +#: templates/filebrowser/include/filter.html:11 +msgid "Any Date" +msgstr "任意日期" + +#: templates/filebrowser/include/filter.html:13 +msgid "Today" +msgstr "今天" + +#: templates/filebrowser/include/filter.html:15 +msgid "Past 7 days" +msgstr "前7天" + +#: templates/filebrowser/include/filter.html:17 +msgid "Past 30 days" +msgstr "本月" + +#: templates/filebrowser/include/filter.html:19 +msgid "This year" +msgstr "本年" + +#: templates/filebrowser/include/filter.html:27 +msgid "By Type" +msgstr "以 类型" + +#: templates/filebrowser/include/filter.html:29 +msgid "All" +msgstr "全部" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found" +msgstr "没有找到。" + +#: templates/filebrowser/include/paginator.html:11 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s 条" + +#: templates/filebrowser/include/paginator.html:26 +msgid "No Items" +msgstr "没有项。" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "1 条结果" +msgstr[1] "%(counter)s 条结果" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:23 +#, python-format +msgid "%(full_result_count)s total" +msgstr "共 %(full_result_count)s 条" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "清除限制" + +#: templates/filebrowser/include/search.html:7 +msgid "Search" +msgstr "搜索" + +#: templates/filebrowser/include/search.html:19 +#: templates/filebrowser/include/toolbar.html:20 +msgid "Go" +msgstr "执行" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "找到 %(counter)s 条" +msgstr[1] "找到 %(counter)s 条" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "共 %(counter)s 条" +msgstr[1] "共 %(counter)s 条" + +#: templates/filebrowser/include/tableheader.html:16 +#: templates/filebrowser/include/tableheader.html:17 +msgid "Filename" +msgstr "文件名" + +#: templates/filebrowser/include/tableheader.html:21 +#: templates/filebrowser/include/tableheader.html:22 +msgid "Size" +msgstr "大小" + +#: templates/filebrowser/include/tableheader.html:24 +#: templates/filebrowser/include/tableheader.html:25 +msgid "Date" +msgstr "日期" + +#: templates/filebrowser/include/toolbar.html:23 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s 条结果" +msgstr[1] "%(counter)s 条结果" diff --git a/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo b/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo new file mode 100644 index 0000000..a068b39 Binary files /dev/null and b/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo differ diff --git a/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.po b/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.po new file mode 100644 index 0000000..c8773cf --- /dev/null +++ b/app/lib/filebrowser/locale/zh_TW/LC_MESSAGES/django.po @@ -0,0 +1,370 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: filebrowser 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-12-28 19:23+0800\n" +"PO-Revision-Date: 2009-12-20 17:58+0800\n" +"Last-Translator: jianaijun \n" +"Language-Team: freeren.org \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Bookmarks: 0,1,-1,-1,-1,-1,-1,-1,-1,-1\n" + +#: fields.py:58 +#, python-format +msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." +msgstr "擴展名%(ext)s 是不允許的。只允許%(allowed)s 。" + +#: forms.py:27 templates/filebrowser/versions.html:64 +msgid "Name" +msgstr "名稱" + +#: forms.py:27 forms.py:33 forms.py:50 forms.py:56 +msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." +msgstr "只允許字母、數字、下劃線、空格和連字符。" + +#: forms.py:36 forms.py:59 +msgid "The Folder already exists." +msgstr "這個文件夾已經存在。" + +#: forms.py:50 +msgid "New Name" +msgstr "新名稱" + +#: forms.py:61 +msgid "The File already exists." +msgstr "這個文件已經存在。" + +#: settings.py:114 +msgid "Folder" +msgstr "目錄" + +#: settings.py:115 +msgid "Image" +msgstr "圖片" + +#: settings.py:116 +msgid "Video" +msgstr "視頻" + +#: settings.py:117 +msgid "Document" +msgstr "文檔" + +#: settings.py:118 +msgid "Audio" +msgstr "音頻" + +#: settings.py:119 +msgid "Code" +msgstr "代碼" + +#: views.py:54 views.py:164 views.py:219 views.py:316 views.py:398 +#: views.py:459 +msgid "The requested Folder does not exist." +msgstr "請求的文件夾不存在。" + +#: views.py:58 +msgid "Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?" +msgstr "查找文件夾發生錯誤。也許它不存在?" + +#: views.py:141 templates/filebrowser/append.html:5 +#: templates/filebrowser/append.html:7 +#: templates/filebrowser/include/breadcrumbs.html:8 +#: templates/filebrowser/include/breadcrumbs.html:10 +msgid "FileBrowser" +msgstr "文件瀏覽器" + +#: views.py:182 +#, python-format +msgid "The Folder %s was successfully created." +msgstr "文件夾 \"%s\" 創建成功。" + +#: views.py:191 +msgid "Permission denied." +msgstr "權限被拒絕。" + +#: views.py:193 +msgid "Error creating folder." +msgstr "創建文件夾錯誤。" + +#: views.py:200 views.py:203 templates/filebrowser/index.html:52 +msgid "New Folder" +msgstr "創建文件夾" + +#: views.py:231 +msgid "Select files to upload" +msgstr "選擇上傳文件" + +#: views.py:235 templates/filebrowser/index.html:53 +#: templates/filebrowser/upload.html:108 +msgid "Upload" +msgstr "上傳" + +#: views.py:318 views.py:400 views.py:461 +msgid "The requested File does not exist." +msgstr "請求的文件不存在。" + +#: views.py:341 +#, python-format +msgid "The file %s was successfully deleted." +msgstr "文件 \"%s\" 刪除成功。" + +#: views.py:357 +#, python-format +msgid "The folder %s was successfully deleted." +msgstr "文件夾 \"%s\" 刪除成功。" + +#: views.py:427 +msgid "Renaming was successful." +msgstr "重命名成功。" + +#: views.py:432 +msgid "Error." +msgstr "錯誤。" + +#: views.py:440 +#, python-format +msgid "Rename \"%s\"" +msgstr "重命名 \"%s\"" + +#: views.py:443 templates/filebrowser/include/filelisting.html:75 +msgid "Rename" +msgstr "重命名" + +#: views.py:469 views.py:472 +#, python-format +msgid "Versions for \"%s\"" +msgstr "\"%s\" 版本" + +#: templates/filebrowser/makedir.html:25 templates/filebrowser/rename.html:25 +msgid "Please correct the following errors." +msgstr "請修正下面的錯誤。" + +#: templates/filebrowser/makedir.html:33 templates/filebrowser/upload.html:98 +msgid "" +"The Name will be converted to lowercase. Spaces will be replaced with " +"underscores." +msgstr "這個名稱將自動轉換為小寫。空格替換為下劃線。" + +#: templates/filebrowser/makedir.html:38 templates/filebrowser/rename.html:36 +msgid "Submit" +msgstr "保存" + +#: templates/filebrowser/upload.html:46 +msgid "BROWSE" +msgstr "瀏覽..." + +#: templates/filebrowser/upload.html:47 +msgid "An Error occured" +msgstr "發生錯誤" + +#: templates/filebrowser/upload.html:48 +msgid "Completed" +msgstr "已完成" + +#: templates/filebrowser/upload.html:49 +msgid "Do you want to replace the file" +msgstr "你確定要替換這個文件?" + +#: templates/filebrowser/upload.html:50 +msgid "KB" +msgstr "KB" + +#: templates/filebrowser/upload.html:51 +msgid "MB" +msgstr "MB" + +#: templates/filebrowser/upload.html:81 +msgid "Help" +msgstr "幫助" + +#: templates/filebrowser/upload.html:85 +msgid "Allowed" +msgstr "允許" + +#: templates/filebrowser/upload.html:91 +msgid "Max. Filesize" +msgstr "最大文件大小" + +#: templates/filebrowser/upload.html:106 +msgid "Clear Queue" +msgstr "清除隊列" + +#: templates/filebrowser/versions.html:67 +msgid "Image Version" +msgstr "圖片版本" + +#: templates/filebrowser/versions.html:70 +msgid "Debug" +msgstr "調試" + +#: templates/filebrowser/versions.html:84 +#: templates/filebrowser/include/filelisting.html:12 +msgid "Select" +msgstr "選擇" + +#: templates/filebrowser/versions.html:96 +#: templates/filebrowser/versions.html:108 +#: templates/filebrowser/include/filelisting.html:26 +#: templates/filebrowser/include/filelisting.html:40 +msgid "Select File" +msgstr "選擇文件" + +#: templates/filebrowser/versions.html:119 +msgid "Width" +msgstr "寬" + +#: templates/filebrowser/versions.html:120 +msgid "Height" +msgstr "高" + +#: templates/filebrowser/include/breadcrumbs.html:5 +msgid "Home" +msgstr "首頁" + +#: templates/filebrowser/include/filelisting.html:51 +msgid "Show Versions" +msgstr "顯示版本" + +#: templates/filebrowser/include/filelisting.html:62 +msgid "View Image" +msgstr "查看圖片" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Are you sure you want to delete this file?" +msgstr "你確定要刪除這個文件?" + +#: templates/filebrowser/include/filelisting.html:87 +msgid "Delete File" +msgstr "刪除文件" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Are you sure you want to delete this Folder?" +msgstr "你確定要刪除這個文件夾?" + +#: templates/filebrowser/include/filelisting.html:90 +msgid "Delete Folder" +msgstr "刪除文件夾" + +#: templates/filebrowser/include/filter.html:3 +msgid "Filter" +msgstr "過濾器" + +#: templates/filebrowser/include/filter.html:9 +msgid "By Date" +msgstr "以 日期" + +#: templates/filebrowser/include/filter.html:11 +msgid "Any Date" +msgstr "任意日期" + +#: templates/filebrowser/include/filter.html:13 +msgid "Today" +msgstr "今天" + +#: templates/filebrowser/include/filter.html:15 +msgid "Past 7 days" +msgstr "前7天" + +#: templates/filebrowser/include/filter.html:17 +msgid "Past 30 days" +msgstr "本月" + +#: templates/filebrowser/include/filter.html:19 +msgid "This year" +msgstr "本年" + +#: templates/filebrowser/include/filter.html:27 +msgid "By Type" +msgstr "以 類型" + +#: templates/filebrowser/include/filter.html:29 +msgid "All" +msgstr "全部" + +#: templates/filebrowser/include/paginator.html:5 +msgid "No Items Found" +msgstr "沒有找到。" + +#: templates/filebrowser/include/paginator.html:11 +#, python-format +msgid "%(counter)s Item" +msgid_plural "%(counter)s Items" +msgstr[0] "%(counter)s 條" + +#: templates/filebrowser/include/paginator.html:26 +msgid "No Items" +msgstr "沒有項。" + +#: templates/filebrowser/include/search.html:3 +#, python-format +msgid "1 result" +msgid_plural "%(counter)s results" +msgstr[0] "1 條結果" +msgstr[1] "%(counter)s 條結果" + +#: templates/filebrowser/include/search.html:4 +#: templates/filebrowser/include/toolbar.html:23 +#, python-format +msgid "%(full_result_count)s total" +msgstr "共 %(full_result_count)s 條" + +#: templates/filebrowser/include/search.html:5 +msgid "Clear Restrictions" +msgstr "清除限制" + +#: templates/filebrowser/include/search.html:7 +msgid "Search" +msgstr "搜索" + +#: templates/filebrowser/include/search.html:19 +#: templates/filebrowser/include/toolbar.html:20 +msgid "Go" +msgstr "執行" + +#: templates/filebrowser/include/search.html:24 +#, python-format +msgid "%(counter)s Item found" +msgid_plural "%(counter)s Items found" +msgstr[0] "找到 %(counter)s 條" +msgstr[1] "找到 %(counter)s 條" + +#: templates/filebrowser/include/search.html:25 +#, python-format +msgid "%(counter)s Item total" +msgid_plural "%(counter)s Items total" +msgstr[0] "共 %(counter)s 條" +msgstr[1] "共 %(counter)s 條" + +#: templates/filebrowser/include/tableheader.html:16 +#: templates/filebrowser/include/tableheader.html:17 +msgid "Filename" +msgstr "文件名" + +#: templates/filebrowser/include/tableheader.html:21 +#: templates/filebrowser/include/tableheader.html:22 +msgid "Size" +msgstr "大小" + +#: templates/filebrowser/include/tableheader.html:24 +#: templates/filebrowser/include/tableheader.html:25 +msgid "Date" +msgstr "日期" + +#: templates/filebrowser/include/toolbar.html:23 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "%(counter)s 條結果" +msgstr[1] "%(counter)s 條結果" diff --git a/app/lib/filebrowser/management/__init__.py b/app/lib/filebrowser/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/lib/filebrowser/management/commands/__init__.py b/app/lib/filebrowser/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/lib/filebrowser/management/commands/fb_version_generate.py b/app/lib/filebrowser/management/commands/fb_version_generate.py new file mode 100644 index 0000000..be33f60 --- /dev/null +++ b/app/lib/filebrowser/management/commands/fb_version_generate.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +# Python +import os, re + +# Django +from django.core.management.base import BaseCommand, CommandError + +# filebrowser +from filebrowser.settings import EXTENSION_LIST, EXCLUDE, MEDIA_ROOT, DIRECTORY, VERSIONS, EXTENSIONS +from filebrowser.functions import version_generator + +class Command(BaseCommand): + args = '' + help = "(Re)Generate versions of Images within the FILEBROWSER_DIRECTORY or a " + + def handle(self, *args, **options): + media_path = "" + + if len(args): + media_path = args[0] + path = os.path.join(MEDIA_ROOT, media_path) + else: + path = os.path.join(MEDIA_ROOT, DIRECTORY) + + if not os.path.isdir(path): + raise CommandError(' must be a directory in MEDIA_ROOT (If you don\'t add a media_path the default path is FILEBROWSER_DIRECTORY).\n"%s" is no directory.' % path); + + # get version name + while 1: + self.stdout.write('\nSelect a version you whant to generate:\n') + for version in VERSIONS: + self.stdout.write(' * %s\n' % version) + + version_name = raw_input('(leave blank to generate all versions): ') + + if version_name == "": + selected_version = None + break + else: + try: + tmp = VERSIONS[version_name] + selected_version = version_name + break + except: + self.stderr.write('Error: Version "%s" doesn\'t exist.\n' % version_name) + version_name = None + continue + + # Precompile regular expressions + filter_re = [] + for exp in EXCLUDE: + filter_re.append(re.compile(exp)) + for k,v in VERSIONS.iteritems(): + exp = (r'_%s.(%s)') % (k, '|'.join(EXTENSION_LIST)) + filter_re.append(re.compile(exp)) + + # walkt throu the filebrowser directory + # for all/new files (except file versions itself and excludes) + for dirpath,dirnames,filenames in os.walk(path): + for filename in filenames: + filtered = False + # no "hidden" files (stating with ".") + if filename.startswith('.'): + continue + # check the exclude list + for re_prefix in filter_re: + if re_prefix.search(filename): + filtered = True + if filtered: + continue + (tmp, extension) = os.path.splitext(filename) + if extension in EXTENSIONS["Image"]: + self.createVersions(os.path.join(dirpath, filename), selected_version) + + + def createVersions(self, path, selected_version): + if selected_version: + self.stdout.write('generating version "%s" for: %s\n' % (selected_version, path)) + version_generator(path, selected_version, True) + else: + self.stdout.write('generating all versions for: %s\n' % path) + for version in VERSIONS: + version_generator(path, version, True) diff --git a/app/lib/filebrowser/management/commands/fb_version_remove.py b/app/lib/filebrowser/management/commands/fb_version_remove.py new file mode 100644 index 0000000..4e4767a --- /dev/null +++ b/app/lib/filebrowser/management/commands/fb_version_remove.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +# Python +import os, re + +# Django +from django.core.management.base import BaseCommand, CommandError + +# Filebrowser +from filebrowser.settings import EXTENSION_LIST, EXCLUDE, MEDIA_ROOT, DIRECTORY, VERSIONS, EXTENSIONS + + +class Command(BaseCommand): + args = '' + help = "Remove version files of a specific version in MEDIA_ROOT or subdirectory of MEDIA_ROOT" + + def handle(self, *args, **options): + + media_path = "" + + if len(args): + media_path = args[0] + + path = os.path.join(MEDIA_ROOT, media_path) + + if not os.path.isdir(path): + raise CommandError(' must be a directory in MEDIA_ROOT. "%s" is no directory.' % path); + + self.stdout.write("\n%s\n" % self.help) + self.stdout.write("in this case: %s\n" % path) + + # get suffix or prefix + default_prefix_or_suffix = "s" + while 1: + self.stdout.write('\nOlder versions of django-filebrowser used to prefix the filename with the version name.\n') + self.stdout.write('Current version of django-filebrowser adds the version name as suffix.\n') + prefix_or_suffix = raw_input('"p" for prefix or "s" for suffix (leave blank for "%s"): ' % default_prefix_or_suffix) + + if default_prefix_or_suffix and prefix_or_suffix == '': + prefix_or_suffix = default_prefix_or_suffix + if prefix_or_suffix != "s" and prefix_or_suffix != "p": + sys.stderr.write('Error: "p" and "s" are the only valid inputs.\n') + prefix_or_suffix = None + continue + break + + # get version name + while 1: + version_name = raw_input('\nversion name ("thumb", "big",...): ') + + if version_name == "": + self.stderr.write('Error: You have to enter a version name like "thumb" or "big".\n') + version_name = None + continue + else: + break + + # get list of all matching files + files = self.get_files(path, version_name, (prefix_or_suffix == "p")) + + # output (short version) of files to be deleted + if len(files) > 15: + self.stdout.write('\nFirst/Last 5 files to remove:\n') + for current_file in files[:5]: + self.stdout.write('%s\n' % current_file) + self.stdout.write('...\n') + self.stdout.write('...\n') + for current_file in files[len(files)-5:]: + self.stdout.write('%s\n' % current_file) + else: + self.stdout.write('\nFiles to remove:\n') + for current_file in files: + self.stdout.write('%s\n' % current_file) + + # no files...done + if len(files) == 0: + self.stdout.write('0 files removed.\n\n') + return + else: + self.stdout.write('%d file(s) will be removed.\n\n' % len(files)) + + # ask to make sure + do_remove = "" + self.stdout.write('Sure you want to delete these files?\n') + do_remove = raw_input('"y" for Yes or "n" for No (leave blank for No): ') + + # if "yes" we delete. any different case we finish without removing anything + if do_remove == "y": + for current_file in files: + os.remove(current_file) + self.stdout.write('%d file(s) removed.\n\n' % len(files)) + else: + self.stdout.write('No files removed.\n\n') + return + + + # get files mathing: + # path: search recoursive in this path (os.walk) + # version_name: string is pre/suffix of filename + # search_for_prefix: if true we match against the start of the filename (default is the end) + def get_files(self, path, version_name, search_for_prefix): + file_list = [] + # Precompile regular expressions + filter_re = [] + for exp in EXCLUDE: + filter_re.append(re.compile(exp)) + + # walkt throu the filebrowser directory + # for all/new files (except file versions itself and excludes) + for dirpath,dirnames,filenames in os.walk(path): + for filename in filenames: + filtered = False + # no "hidden" files (stating with ".") + if filename.startswith('.'): + continue + # check the exclude list + for re_prefix in filter_re: + if re_prefix.search(filename): + filtered = True + if filtered: + continue + (filename_noext, extension) = os.path.splitext(filename) + # images only + if extension in EXTENSIONS["Image"]: + # if image matches with version_name we add it to the file_list + if search_for_prefix: + if filename_noext.startswith(version_name + "_"): + file_list.append(os.path.join(dirpath, filename)) + elif filename_noext.endswith("_" + version_name): + file_list.append(os.path.join(dirpath, filename)) + + return file_list diff --git a/app/lib/filebrowser/media/filebrowser/css/filebrowser.css b/app/lib/filebrowser/media/filebrowser/css/filebrowser.css new file mode 100755 index 0000000..3fcf3cb --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/css/filebrowser.css @@ -0,0 +1,195 @@ + + + +/* Filebrowser Table +------------------------------------------------------------------------------------------------------ */ + +.filebrowser table td { + font-size: 10px; +} +.filebrowser table a { + font-size: 11px; +} +.filebrowser thead th.sorted a { + padding-right: 13px; +} +.filebrowser thead th.filename { + min-width: 160px; +} +.filebrowser td { + padding: 9px 10px 6px 10px !important; +} +/*.filebrowser tr.fb_folder { + background: #e8e8e8; + background: -moz-linear-gradient(top, #ededed, #e8e8e8); + background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#e8e8e8)); +} +.filebrowser tr.fb_folder td { + border-top-color: #fff !important; + background: transparent !important; +}*/ +.filebrowser td.fb_thumbnail { + line-height: 11px; + padding-bottom: 0 !important; +} + + + +/* Filebrowser Buttons & Links +------------------------------------------------------------------------------------------------------ */ + +span.fb_type { + display: inline-block; + margin: 0 0; + padding: 1px 0; + color: #999; + font-size: 11px; + font-weight: bold; + font-style: italic; + border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; +} +span.fb_type.folder { + color: #666; + font-weight: bold; +} + + +/* Filebrowser Show-Preview-Link & Show-Versions-Link (uses Grappellis a.internal) ......................................... */ + +.filebrowser a.fb_showpreview, +.filebrowser a.fb_showversions { + display: block; + margin-top: 8px; + padding-left: 8px; + line-height: 16px; + white-space: nowrap; + background-position: 0 50%; +} +.filebrowser a.fb_showpreview { + float: left; +} +/*.filebrowser a.fb_showversions { + float: right; +}*/ +.filebrowser a.fb_showpreview { + padding-left: 16px; + background: 0 50% no-repeat scroll; +} +a.fb_showpreview:link, a.fb_showpreview:visited { + background-image: url('../img/icon-fb-preview.png'); +} +a.fb_showpreview:hover, a.fb_showpreview:active { + background-image: url('../img/icon-fb-preview-hover.png'); +} + + +/* Filebrowser View-Link (contains thumbnail) & Select-Link......................................... */ + +a.fb_viewlink, +button.fb_selectlink { + position: relative; + top: -4px !important; + margin-bottom: -5px !important; +} +button.fb_selectlink { + padding-top: 3px; + padding-bottom: 4px; + height: 24px; + font-size: 11px; +} +@media screen and (-webkit-min-device-pixel-ratio:0) { + button.fb_selectlink { + padding-top: 4px; + } +} + + +/* Filebrowser Image Preview ......................................... */ + +.filebrowser .fb_preview_container { + display: none; + position: absolute; + z-index: 1000; + margin-top: 25px; + padding: 5px 5px 1px; + border: 1px solid #bdbdbd; + border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; + background: #fff; + box-shadow: 0 10px 50px #333; -moz-box-shadow: 0 10px 50px #333; -webkit-box-shadow: 0 10px 50px #333; +} +/*.filebrowser img.fb_preview { + max-width: 400px; + max-height: 400px; +}*/ + +a.fb_view_image span { + display: none; + position: absolute; + top: 1px; + right: 0; + padding: 5px 10px 5px 20px; + width: auto; + line-height: 11px; + font-weight: bold; + border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; +} +a.fb_view_image:hover span { + display: block; + color: #83c3d9; + background: #fff url('../img/icon-fb-view-image-hover.png') 8px 7px no-repeat scroll; +} + + + +/* Filebrowser Pulldown Actions +------------------------------------------------------------------------------------------------------ */ + +.pulldown-actions-container { + position: relative; +} +.pulldown-actions-handler { + display: block; + width: 27px; + height: 17px; + background: transparent 50% 50% no-repeat scroll; +} +.pulldown-actions-handler:link, .pulldown-actions-handler:visited { + background-image: url('../img/icon-pulldown-actions.png'); +} +.pulldown-actions-handler:hover, .pulldown-actions-handler:active { + background-image: url('../img/icon-pulldown-actions-hover.png'); +} +.open .pulldown-actions-handler { + background-image: url('../img/icon-pulldown-actions-active.png'); +} +ul.pulldown-actions { + display: none; +} +.open ul.pulldown-actions { + display: block; + position: absolute; + right: 0; + z-index: 1000; + margin: 3px 0 0; + padding: 0; + border: 1px solid #ccc; + border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; + background: #eee; + box-shadow: 0 0 50px #333; -moz-box-shadow: 0 0 50px #333; -webkit-box-shadow: 0 0 50px #333; +} +ul.pulldown-actions li { + border-top: 1px solid #fff; + border-bottom: 1px solid #d4d4d4; +} +ul.pulldown-actions li:first-child { + border-top: 0; +} +ul.pulldown-actions li:last-child { + border-bottom: 0; +} +ul.pulldown-actions a { + display: block; + padding: 5px 30px 5px 10px; + font-weight: bold; + white-space: nowrap; +} \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif new file mode 100644 index 0000000..221a6e1 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif new file mode 100644 index 0000000..2a2142c Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif new file mode 100644 index 0000000..bc45fe4 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif new file mode 100644 index 0000000..be8ea08 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif new file mode 100644 index 0000000..a838427 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif new file mode 100644 index 0000000..60ad2d5 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif new file mode 100644 index 0000000..319558e Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif new file mode 100644 index 0000000..dded982 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif new file mode 100644 index 0000000..fbd1f33 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif new file mode 100644 index 0000000..71525d7 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif new file mode 100644 index 0000000..1fbe2e4 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_.gif new file mode 100644 index 0000000..6a908e2 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_audio.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_audio.gif new file mode 100644 index 0000000..8a8970a Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_audio.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_code.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_code.gif new file mode 100644 index 0000000..9650839 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_code.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_document.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_document.gif new file mode 100644 index 0000000..65ebd99 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_document.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif new file mode 100644 index 0000000..115e3fb Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_image.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_image.gif new file mode 100644 index 0000000..000b31c Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_image.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_video.gif b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_video.gif new file mode 100644 index 0000000..f456d59 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/filebrowser_type_video.gif differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview-hover.png b/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview-hover.png new file mode 100644 index 0000000..42f1790 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview-hover.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview.png b/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview.png new file mode 100644 index 0000000..dda77e6 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-fb-preview.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-fb-view-image-hover.png b/app/lib/filebrowser/media/filebrowser/img/icon-fb-view-image-hover.png new file mode 100644 index 0000000..0cc2883 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-fb-view-image-hover.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-active.png b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-active.png new file mode 100644 index 0000000..483d5a0 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-active.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-hover.png b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-hover.png new file mode 100644 index 0000000..483d5a0 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions-hover.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions.png b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions.png new file mode 100644 index 0000000..35acd02 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-pulldown-actions.png differ diff --git a/app/lib/filebrowser/media/filebrowser/img/icon-showversions.png b/app/lib/filebrowser/media/filebrowser/img/icon-showversions.png new file mode 100644 index 0000000..792548f Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/img/icon-showversions.png differ diff --git a/app/lib/filebrowser/media/filebrowser/js/AddFileBrowser.js b/app/lib/filebrowser/media/filebrowser/js/AddFileBrowser.js new file mode 100644 index 0000000..5f58b7f --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/js/AddFileBrowser.js @@ -0,0 +1,42 @@ +var FileBrowser = { + // this is set automatically + admin_media_prefix: '', + // change this + thumb_prefix: 'thumb_', + no_thumb: 'filebrowser/img/no_thumb.gif', + + init: function() { + // Deduce admin_media_prefix by looking at the + + + + + + +
+ +

Cancel All Uploads

+ + diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml new file mode 100755 index 0000000..13ca043 --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/check.php b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/check.php new file mode 100755 index 0000000..d7dc571 --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/check.php @@ -0,0 +1,35 @@ + $value) { + if ($key != 'folder') { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) { + $fileArray[$key] = $value; + } + } +} +echo json_encode($fileArray); +?> \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf new file mode 100755 index 0000000..0fbf8fc Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf differ diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js new file mode 100755 index 0000000..b1ae21d --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js new file mode 100755 index 0000000..04592ff --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js @@ -0,0 +1,26 @@ +/* +Uploadify v2.1.0 +Release Date: August 24, 2009 + +Copyright (c) 2009 Ronnie Garcia, Travis Nickels + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('
');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('
')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('
'+fileName+" ("+k+l+')
')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full. The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d + is released under the MIT License +*/ +var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf new file mode 100755 index 0000000..4d27952 Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf differ diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/expressInstall.swf b/app/lib/filebrowser/media/filebrowser/uploadify/expressInstall.swf new file mode 100755 index 0000000..0fbf8fc Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/uploadify/expressInstall.swf differ diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js b/app/lib/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js new file mode 100755 index 0000000..b1ae21d --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js b/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js new file mode 100755 index 0000000..9a78cd3 --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js @@ -0,0 +1,258 @@ +/* +Uploadify v2.1.0 +Release Date: August 24, 2009 + +Copyright (c) 2009 Ronnie Garcia, Travis Nickels + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +if(jQuery)( + function(jQuery){ + jQuery.extend(jQuery.fn,{ + uploadify:function(options) { + jQuery(this).each(function(){ + settings = jQuery.extend({ + id : jQuery(this).attr('id'), // The ID of the object being Uploadified + uploader : 'uploadify.swf', // The path to the uploadify swf file + script : 'uploadify.php', // The path to the uploadify backend upload script + expressInstall : null, // The path to the express install swf file + folder : '', // The path to the upload folder + height : 30, // The height of the flash button + width : 110, // The width of the flash button + cancelImg : 'cancel.png', // The path to the cancel image for the default file queue item container + wmode : 'opaque', // The wmode of the flash file + scriptAccess : 'sameDomain', // Set to "always" to allow script access across domains + fileDataName : 'Filedata', // The name of the file collection object in the backend upload script + method : 'POST', // The method for sending variables to the backend upload script + queueSizeLimit : 999, // The maximum size of the file queue + simUploadLimit : 1, // The number of simultaneous uploads allowed + queueID : false, // The optional ID of the queue container + displayData : 'percentage', // Set to "speed" to show the upload speed in the default queue item + onInit : function() {}, // Function to run when uploadify is initialized + onSelect : function() {}, // Function to run when a file is selected + onQueueFull : function() {}, // Function to run when the queue reaches capacity + onCheck : function() {}, // Function to run when script checks for duplicate files on the server + onCancel : function() {}, // Function to run when an item is cleared from the queue + onError : function() {}, // Function to run when an upload item returns an error + onProgress : function() {}, // Function to run each time the upload progress is updated + onComplete : function() {}, // Function to run when an upload is completed + onAllComplete : function() {} // Functino to run when all uploads are completed + }, options); + var pagePath = location.pathname; + pagePath = pagePath.split('/'); + pagePath.pop(); + pagePath = pagePath.join('/') + '/'; + var data = {}; + data.uploadifyID = settings.id; + data.pagepath = pagePath; + if (settings.buttonImg) data.buttonImg = escape(settings.buttonImg); + if (settings.buttonText) data.buttonText = escape(settings.buttonText); + if (settings.rollover) data.rollover = true; + data.script = settings.script; + data.folder = escape(settings.folder); + if (settings.scriptData) { + var scriptDataString = ''; + for (var name in settings.scriptData) { + scriptDataString += '&' + name + '=' + settings.scriptData[name]; + } + data.scriptData = escape(scriptDataString.substr(1)); + } + data.width = settings.width; + data.height = settings.height; + data.wmode = settings.wmode; + data.method = settings.method; + data.queueSizeLimit = settings.queueSizeLimit; + data.simUploadLimit = settings.simUploadLimit; + if (settings.hideButton) data.hideButton = true; + if (settings.fileDesc) data.fileDesc = settings.fileDesc; + if (settings.fileExt) data.fileExt = settings.fileExt; + if (settings.multi) data.multi = true; + if (settings.auto) data.auto = true; + if (settings.sizeLimit) data.sizeLimit = settings.sizeLimit; + if (settings.checkScript) data.checkScript = settings.checkScript; + if (settings.fileDataName) data.fileDataName = settings.fileDataName; + if (settings.queueID) data.queueID = settings.queueID; + if (settings.onInit() !== false) { + jQuery(this).css('display','none'); + jQuery(this).after('
'); + swfobject.embedSWF(settings.uploader, settings.id + 'Uploader', settings.width, settings.height, '9.0.24', settings.expressInstall, data, {'quality':'high','wmode':settings.wmode,'allowScriptAccess':settings.scriptAccess}); + if (settings.queueID == false) { + jQuery("#" + jQuery(this).attr('id') + "Uploader").after('
'); + } + } + if (typeof(settings.onOpen) == 'function') { + jQuery(this).bind("uploadifyOpen", settings.onOpen); + } + jQuery(this).bind("uploadifySelect", {'action': settings.onSelect, 'queueID': settings.queueID}, function(event, ID, fileObj) { + if (event.data.action(event, ID, fileObj) !== false) { + var byteSize = Math.round(fileObj.size / 1024 * 100) * .01; + var suffix = 'KB'; + if (byteSize > 1000) { + byteSize = Math.round(byteSize *.001 * 100) * .01; + suffix = 'MB'; + } + var sizeParts = byteSize.toString().split('.'); + if (sizeParts.length > 1) { + byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2); + } else { + byteSize = sizeParts[0]; + } + if (fileObj.name.length > 20) { + fileName = fileObj.name.substr(0,20) + '...'; + } else { + fileName = fileObj.name; + } + queue = '#' + jQuery(this).attr('id') + 'Queue'; + if (event.data.queueID) { + queue = '#' + event.data.queueID; + } + jQuery(queue).append('
\ +
\ + \ +
\ + ' + fileName + ' (' + byteSize + suffix + ')\ +
\ +
\ +
\ +
'); + } + }); + if (typeof(settings.onSelectOnce) == 'function') { + jQuery(this).bind("uploadifySelectOnce", settings.onSelectOnce); + } + jQuery(this).bind("uploadifyQueueFull", {'action': settings.onQueueFull}, function(event, queueSizeLimit) { + if (event.data.action(event, queueSizeLimit) !== false) { + alert('The queue is full. The max size is ' + queueSizeLimit + '.'); + } + }); + jQuery(this).bind("uploadifyCheckExist", {'action': settings.onCheck}, function(event, checkScript, fileQueueObj, folder, single) { + var postData = new Object(); + postData = fileQueueObj; + postData.folder = pagePath + folder; + if (single) { + for (var ID in fileQueueObj) { + var singleFileID = ID; + } + } + jQuery.post(checkScript, postData, function(data) { + for(var key in data) { + if (event.data.action(event, checkScript, fileQueueObj, folder, single) !== false) { + var replaceFile = confirm("Do you want to replace the file " + data[key] + "?"); + if (!replaceFile) { + document.getElementById(jQuery(event.target).attr('id') + 'Uploader').cancelFileUpload(key, true,true); + } + } + } + if (single) { + document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(singleFileID, true); + } else { + document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(null, true); + } + }, "json"); + }); + jQuery(this).bind("uploadifyCancel", {'action': settings.onCancel}, function(event, ID, fileObj, data, clearFast) { + if (event.data.action(event, ID, fileObj, data, clearFast) !== false) { + var fadeSpeed = (clearFast == true) ? 0 : 250; + jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(fadeSpeed, function() { jQuery(this).remove() }); + } + }); + if (typeof(settings.onClearQueue) == 'function') { + jQuery(this).bind("uploadifyClearQueue", settings.onClearQueue); + } + var errorArray = []; + jQuery(this).bind("uploadifyError", {'action': settings.onError}, function(event, ID, fileObj, errorObj) { + if (event.data.action(event, ID, fileObj, errorObj) !== false) { + var fileArray = new Array(ID, fileObj, errorObj); + errorArray.push(fileArray); + jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(" - " + errorObj.type + " Error"); + jQuery("#" + jQuery(this).attr('id') + ID).addClass('uploadifyError'); + } + }); + jQuery(this).bind("uploadifyProgress", {'action': settings.onProgress, 'toDisplay': settings.displayData}, function(event, ID, fileObj, data) { + if (event.data.action(event, ID, fileObj, data) !== false) { + jQuery("#" + jQuery(this).attr('id') + ID + "ProgressBar").css('width', data.percentage + '%'); + if (event.data.toDisplay == 'percentage') displayData = ' - ' + data.percentage + '%'; + if (event.data.toDisplay == 'speed') displayData = ' - ' + data.speed + 'KB/s'; + if (event.data.toDisplay == null) displayData = ' '; + jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(displayData); + } + }); + jQuery(this).bind("uploadifyComplete", {'action': settings.onComplete}, function(event, ID, fileObj, response, data) { + if (event.data.action(event, ID, fileObj, unescape(response), data) !== false) { + jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(' - Completed'); + jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(250, function() { jQuery(this).remove()}); + } + }); + if (typeof(settings.onAllComplete) == 'function') { + jQuery(this).bind("uploadifyAllComplete", {'action': settings.onAllComplete}, function(event, uploadObj) { + if (event.data.action(event, uploadObj) !== false) { + errorArray = []; + } + }); + } + }); + }, + uploadifySettings:function(settingName, settingValue, resetObject) { + var returnValue = false; + jQuery(this).each(function() { + if (settingName == 'scriptData' && settingValue != null) { + if (resetObject) { + var scriptData = settingValue; + } else { + var scriptData = jQuery.extend(settings.scriptData, settingValue); + } + var scriptDataString = ''; + for (var name in scriptData) { + scriptDataString += '&' + name + '=' + escape(scriptData[name]); + } + settingValue = scriptDataString.substr(1); + } + returnValue = document.getElementById(jQuery(this).attr('id') + 'Uploader').updateSettings(settingName, settingValue); + }); + if (settingValue == null) { + if (settingName == 'scriptData') { + var returnSplit = unescape(returnValue).split('&'); + var returnObj = new Object(); + for (var i = 0; i < returnSplit.length; i++) { + var iSplit = returnSplit[i].split('='); + returnObj[iSplit[0]] = iSplit[1]; + } + returnValue = returnObj; + } + return returnValue; + } + }, + uploadifyUpload:function(ID) { + jQuery(this).each(function() { + document.getElementById(jQuery(this).attr('id') + 'Uploader').startFileUpload(ID, false); + }); + }, + uploadifyCancel:function(ID) { + jQuery(this).each(function() { + document.getElementById(jQuery(this).attr('id') + 'Uploader').cancelFileUpload(ID, true, false); + }); + }, + uploadifyClearQueue:function() { + jQuery(this).each(function() { + document.getElementById(jQuery(this).attr('id') + 'Uploader').clearFileUploadQueue(false); + }); + } + }) +})(jQuery); \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js b/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js new file mode 100755 index 0000000..04592ff --- /dev/null +++ b/app/lib/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js @@ -0,0 +1,26 @@ +/* +Uploadify v2.1.0 +Release Date: August 24, 2009 + +Copyright (c) 2009 Ronnie Garcia, Travis Nickels + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('
');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('
')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('
'+fileName+" ("+k+l+')
')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full. The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d + is released under the MIT License +*/ +var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab \ No newline at end of file diff --git a/app/lib/filebrowser/media/filebrowser/uploadify/uploadify.swf b/app/lib/filebrowser/media/filebrowser/uploadify/uploadify.swf new file mode 100755 index 0000000..0385d9e Binary files /dev/null and b/app/lib/filebrowser/media/filebrowser/uploadify/uploadify.swf differ diff --git a/app/lib/filebrowser/models.py b/app/lib/filebrowser/models.py new file mode 100755 index 0000000..a11084e --- /dev/null +++ b/app/lib/filebrowser/models.py @@ -0,0 +1 @@ +# This file is only necessary for the tests to work \ No newline at end of file diff --git a/app/lib/filebrowser/settings.py b/app/lib/filebrowser/settings.py new file mode 100755 index 0000000..79f2fbf --- /dev/null +++ b/app/lib/filebrowser/settings.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +# imports +import os + +# django imports +from django.conf import settings +from django.utils.translation import ugettext_lazy as _ + +# settings for django-tinymce +try: + import tinymce.settings + DEFAULT_URL_TINYMCE = tinymce.settings.JS_BASE_URL + '/' + DEFAULT_PATH_TINYMCE = tinymce.settings.JS_ROOT + '/' +except ImportError: + DEFAULT_URL_TINYMCE = settings.ADMIN_MEDIA_PREFIX + "tinymce/jscripts/tiny_mce/" + DEFAULT_PATH_TINYMCE = os.path.join(settings.MEDIA_ROOT, 'admin/tinymce/jscripts/tiny_mce/') + +# Set to True in order to see the FileObject when Browsing. +DEBUG = getattr(settings, "FILEBROWSER_DEBUG", False) + +# Main Media Settings +MEDIA_ROOT = getattr(settings, "FILEBROWSER_MEDIA_ROOT", settings.MEDIA_ROOT) +MEDIA_URL = getattr(settings, "FILEBROWSER_MEDIA_URL", settings.MEDIA_URL) + +# Main FileBrowser Directory. This has to be a directory within MEDIA_ROOT. +# Leave empty in order to browse all files under MEDIA_ROOT. +# DO NOT USE A SLASH AT THE BEGINNING, DO NOT FORGET THE TRAILING SLASH AT THE END. +DIRECTORY = getattr(settings, "FILEBROWSER_DIRECTORY", 'uploads/') + +# The URL/PATH to your filebrowser media-files. +URL_FILEBROWSER_MEDIA = getattr(settings, "FILEBROWSER_URL_FILEBROWSER_MEDIA", "/media/filebrowser/") +PATH_FILEBROWSER_MEDIA = getattr(settings, "FILEBROWSER_PATH_FILEBROWSER_MEDIA", os.path.join(settings.MEDIA_ROOT, 'filebrowser/')) + +# The URL/PATH to your TinyMCE Installation. +URL_TINYMCE = getattr(settings, "FILEBROWSER_URL_TINYMCE", DEFAULT_URL_TINYMCE) +PATH_TINYMCE = getattr(settings, "FILEBROWSER_PATH_TINYMCE", DEFAULT_PATH_TINYMCE) + +# Allowed Extensions for File Upload. Lower case is important. +# Please be aware that there are Icons for the default extension settings. +# Therefore, if you add a category (e.g. "Misc"), you won't get an icon. +EXTENSIONS = getattr(settings, "FILEBROWSER_EXTENSIONS", { + 'Folder': [''], + 'Image': ['.jpg','.jpeg','.gif','.png','.tif','.tiff'], + 'Video': ['.mov','.wmv','.mpeg','.mpg','.avi','.rm'], + 'Document': ['.pdf','.doc','.rtf','.txt','.xls','.csv'], + 'Audio': ['.mp3','.mp4','.wav','.aiff','.midi','.m4p'], + 'Code': ['.html','.py','.js','.css'] +}) + +# Define different formats for allowed selections. +# This has to be a subset of EXTENSIONS. +SELECT_FORMATS = getattr(settings, "FILEBROWSER_SELECT_FORMATS", { + 'File': ['Folder','Document',], + 'Image': ['Image'], + 'Media': ['Video','Sound'], + 'Document': ['Document'], + # for TinyMCE we can also define lower-case items + 'image': ['Image'], + 'file': ['Folder','Image','Document',], + 'media': ['Video','Sound'], +}) + +# Directory to Save Image Versions (and Thumbnails). Relative to MEDIA_ROOT. +# If no directory is given, versions are stored within the Image directory. +# VERSION URL: VERSIONS_BASEDIR/original_path/originalfilename_versionsuffix.extension +VERSIONS_BASEDIR = getattr(settings, 'FILEBROWSER_VERSIONS_BASEDIR', '') +# Versions Format. Available Attributes: verbose_name, width, height, opts +VERSIONS = getattr(settings, "FILEBROWSER_VERSIONS", { + 'fb_thumb': {'verbose_name': 'Admin Thumbnail', 'width': 60, 'height': 60, 'opts': 'crop upscale'}, + 'thumbnail': {'verbose_name': 'Thumbnail (140px)', 'width': 140, 'height': '', 'opts': ''}, + 'small': {'verbose_name': 'Small (300px)', 'width': 300, 'height': '', 'opts': ''}, + 'medium': {'verbose_name': 'Medium (460px)', 'width': 460, 'height': '', 'opts': ''}, + 'big': {'verbose_name': 'Big (620px)', 'width': 620, 'height': '', 'opts': ''}, + 'cropped': {'verbose_name': 'Cropped (60x60px)', 'width': 60, 'height': 60, 'opts': 'crop'}, + 'croppedthumbnail': {'verbose_name': 'Cropped Thumbnail (140x140px)', 'width': 140, 'height': 140, 'opts': 'crop'}, +}) +# Quality of saved versions +VERSION_QUALITY = getattr(settings, 'FILEBROWSER_VERSION_QUALITY', 90) +# Versions available within the Admin-Interface. +ADMIN_VERSIONS = getattr(settings, 'FILEBROWSER_ADMIN_VERSIONS', ['thumbnail','small', 'medium','big']) +# Which Version should be used as Admin-thumbnail. +ADMIN_THUMBNAIL = getattr(settings, 'FILEBROWSER_ADMIN_THUMBNAIL', 'fb_thumb') +# Preview Version +PREVIEW_VERSION = getattr(settings, 'FILEBROWSER_PREVIEW_VERSION', 'small') + +# EXTRA SETTINGS +# True to save the URL including MEDIA_URL to your model fields +# or False (default) to save path relative to MEDIA_URL. +# Note: Full URL does not necessarily means absolute URL. +SAVE_FULL_URL = getattr(settings, "FILEBROWSER_SAVE_FULL_URL", True) +# If set to True, the FileBrowser will not try to import a mis-installed PIL. +STRICT_PIL = getattr(settings, 'FILEBROWSER_STRICT_PIL', False) +# PIL's Error "Suspension not allowed here" work around: +# s. http://mail.python.org/pipermail/image-sig/1999-August/000816.html +IMAGE_MAXBLOCK = getattr(settings, 'FILEBROWSER_IMAGE_MAXBLOCK', 1024*1024) +# Exclude files matching any of the following regular expressions +# Default is to exclude 'thumbnail' style naming of image-thumbnails. +EXTENSION_LIST = [] +for exts in EXTENSIONS.values(): + EXTENSION_LIST += exts +EXCLUDE = getattr(settings, 'FILEBROWSER_EXCLUDE', (r'_(%(exts)s)_.*_q\d{1,3}\.(%(exts)s)' % {'exts': ('|'.join(EXTENSION_LIST))},)) +# Max. Upload Size in Bytes. +MAX_UPLOAD_SIZE = getattr(settings, "FILEBROWSER_MAX_UPLOAD_SIZE", 10485760) +# Convert Filename (replace spaces and convert to lowercase) +CONVERT_FILENAME = getattr(settings, "FILEBROWSER_CONVERT_FILENAME", True) +# Max. Entries per Page +# Loading a Sever-Directory with lots of files might take a while +# Use this setting to limit the items shown +LIST_PER_PAGE = getattr(settings, "FILEBROWSER_LIST_PER_PAGE", 50) +# Default Sorting +# Options: date, filesize, filename_lower, filetype_checked +DEFAULT_SORTING_BY = getattr(settings, "FILEBROWSER_DEFAULT_SORTING_BY", "date") +# Sorting Order: asc, desc +DEFAULT_SORTING_ORDER = getattr(settings, "FILEBROWSER_DEFAULT_SORTING_ORDER", "desc") +# regex to clean dir names before creation +FOLDER_REGEX = getattr(settings, "FILEBROWSER_FOLDER_REGEX", r'^[\w._/-]+$') + +# EXTRA TRANSLATION STRINGS +# The following strings are not availabe within views or templates +_('Folder') +_('Image') +_('Video') +_('Document') +_('Audio') +_('Code') + + diff --git a/app/lib/filebrowser/templates/filebrowser/append.html b/app/lib/filebrowser/templates/filebrowser/append.html new file mode 100644 index 0000000..a96b386 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/append.html @@ -0,0 +1,12 @@ +{% load i18n %} + +
+ + + + + + + +
{% trans "FileBrowser" %}
{% trans "FileBrowser" %}
+
\ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/custom_field.html b/app/lib/filebrowser/templates/filebrowser/custom_field.html new file mode 100644 index 0000000..45c3b70 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/custom_field.html @@ -0,0 +1,26 @@ +{% load fb_versions %} + + {% comment %}{% endcomment %} + +{% ifequal value.filetype "Image" %} +

+ + + +

+{% else %} + +{% endifequal %} +{% if final_attrs.DEBUG %} +

+ Path {{ value.path }}
+ FileType {{ value.filetype }}

+ Directory {{ final_attrs.directory }}
+ Extensions {{ final_attrs.extensions }}
+ Format {{ final_attrs.format }} +

+{% endif %} \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/_response.html b/app/lib/filebrowser/templates/filebrowser/include/_response.html new file mode 100644 index 0000000..e7dff2c --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/_response.html @@ -0,0 +1 @@ +{{ response }} \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/breadcrumbs.html b/app/lib/filebrowser/templates/filebrowser/include/breadcrumbs.html new file mode 100644 index 0000000..c6f539d --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/breadcrumbs.html @@ -0,0 +1,24 @@ +{% load i18n fb_tags %} + + \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/filelisting.html b/app/lib/filebrowser/templates/filebrowser/include/filelisting.html new file mode 100644 index 0000000..f3ec09d --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/filelisting.html @@ -0,0 +1,136 @@ +{% load i18n adminmedia fb_tags fb_versions %} + +{% for file in page.object_list %} + + + + {% if query.pop == "1" and results_var.select_total %} + + {% selectable file.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% endif %} + + + {% if query.pop == "2" and results_var.select_total %} + + {% selectable file.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% endif %} + + + {% if query.pop == "3" and results_var.select_total %} + + {% selectable file.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% endif %} + + + + {% comment %}{% endcomment %} + {{ file.filetype }} + + + + + {% if file.filetype == "Image" %} + + {% endif %} + + + + {% if file.filetype == "Folder" %} + {{ file.filename }} + {% else %} + + {{ file.filename }} + {% if file.dimensions %} +
{{ file.dimensions.0 }} x {{ file.dimensions.1 }} px
+ {% endif %} + {% comment %} + {% if file.filetype == "Image" %} + {% trans 'Preview' %} + + {% endif %} + {% endcomment %} + {% if results_var.images_total and settings_var.ADMIN_VERSIONS and file.filetype == "Image" %} + {% trans 'Versions' %} + {% endif %} + + {% endif %} + + + {% if q %}{{ file.folder }}{% endif %} + + + {{ file.filesize|filesizeformat }} + + + {{ file.datetime|date:"N j, Y" }} + + + +
+   + +
+ + + + {% if settings_var.DEBUG %} + + Filename {{ file.filename }}
+ Filetype {{ file.filetype }}
+ Filesize {{ file.filesize }}
+ Extension {{ file.extension }}
+ Date {{ file.date }}
+ Datetime Object {{ file.datetime }}

+ Relative Path {{ file.path_relative }}
+ Full Path {{ file.path_full }}
+ Relative URL {{ file.url_relative }}
+ Full URL {{ file.url_full }}

+ URL for FileBrowseField {{ file.url_save }}
+ Thumbnail URL {{ file.url_thumbnail }} + {% if file.filetype == "Image" %} +

+ Dimensions {{ file.dimensions }}
+ Width {{ file.width }}
+ Height {{ file.height }}
+ Orientation {{ file.orientation }} + {% endif %} + {% if file.filetype == "Folder" %} +

+ Is Empty {{ file.is_empty }} + {% endif %} + + {% endif %} + + +{% endfor %} + + \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/filter.html b/app/lib/filebrowser/templates/filebrowser/include/filter.html new file mode 100644 index 0000000..fd7966a --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/filter.html @@ -0,0 +1,27 @@ +{% load i18n fb_tags %} +
+
+ {% trans 'Filter' %} +
+
+ + +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/paginator.html b/app/lib/filebrowser/templates/filebrowser/include/paginator.html new file mode 100644 index 0000000..b35e4fb --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/paginator.html @@ -0,0 +1,28 @@ +{% load i18n fb_tags %} + \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/search.html b/app/lib/filebrowser/templates/filebrowser/include/search.html new file mode 100644 index 0000000..bff5955 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/search.html @@ -0,0 +1,31 @@ +{% load i18n adminmedia fb_tags %} +
+

{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}

+ {% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %} + {% blocktrans with cl.full_result_count as full_result_count %}Clear Restrictions{% endblocktrans %} +
+

{% trans 'Search' %}xx

+
+ +
+ \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/tableheader.html b/app/lib/filebrowser/templates/filebrowser/include/tableheader.html new file mode 100644 index 0000000..c58cd0c --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/tableheader.html @@ -0,0 +1,32 @@ +{% load i18n fb_tags %} + + + + {% if query.pop == "1" and results_var.select_total %}{% endif %} + {% if query.pop == "2" and results_var.select_total %}{% endif %} + {% if query.pop == "3" and results_var.select_total %}{% endif %} + + {% ifequal query.o "filetype_checked" %}{% trans "Type" %}{% endifequal %} + {% ifnotequal query.o "filetype_checked" %}{% trans "Type" %}{% endifnotequal %} + + {% trans "Thumbnail" %} + + {% ifequal query.o "filename_lower" %}{% trans "Filename" %}{% endifequal %} + {% ifnotequal query.o "filename_lower" %}{% trans "Filename" %}{% endifnotequal %} + + {% if q %} + {% ifequal query.o 'folder' %}{% trans 'Folder' %}{% endifequal %} + {% ifnotequal query.o 'folder' %}{% trans 'Folder' %}{% endifnotequal %} + {% endif %} + + {% ifequal query.o "filesize" %}{% trans "Size" %}{% endifequal %} + {% ifnotequal query.o "filesize" %}{% trans "Size" %}{% endifnotequal %} + + {% ifequal query.o "date" %}{% trans "Date" %}{% endifequal %} + {% ifnotequal query.o "date" %}{% trans "Date" %}{% endifnotequal %} + +   + + {% if settings_var.DEBUG %}Debug{% endif %} + + \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/include/toolbar.html b/app/lib/filebrowser/templates/filebrowser/include/toolbar.html new file mode 100644 index 0000000..99b31aa --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/include/toolbar.html @@ -0,0 +1,36 @@ +{% load i18n adminmedia fb_tags %} + +{% if results_var.results_total %} +{% if query.filter_type or query.filter_date or query.q %} +
+

{% trans 'Results' %}

+
+

{% blocktrans count results_var.results_current as counter %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %}

+

{% blocktrans with results_var.results_total as full_result_count %}{{ full_result_count }} total{% endblocktrans %}

+
+
+{% endif %} +{% endif %} + + + \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/index.html b/app/lib/filebrowser/templates/filebrowser/index.html new file mode 100644 index 0000000..17896c7 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/index.html @@ -0,0 +1,143 @@ +{% extends "admin/base_site.html" %} + + +{% load i18n adminmedia fb_tags fb_pagination %} + + +{% block stylesheets %} + {{ block.super }} + {# #} + +{% endblock %} + + +{% block javascripts %} + {{ block.super }} + {% ifequal query.pop '1' %} + + {% endifequal %} + {% ifequal query.pop '2' %} + + + {% if query.mce_rdomain %}{% endif %} + {% endifequal %} + {% ifequal query.pop '3' %} + + {% endifequal %} + {{ media }} + + + +{% endblock %} + + +{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} + +{% block object-tools %} + +{% endblock %} + + +{% block content %} +
+ + {% pagination %} + + {% include "filebrowser/include/filter.html" %} + + +
+
+
+ + {% if results_var.results_current %} +
+ + {% include "filebrowser/include/tableheader.html" %} + + {% include "filebrowser/include/filelisting.html" %} + +
+
+ {% endif %} + + {% pagination %} +
+ +{% endblock %} diff --git a/app/lib/filebrowser/templates/filebrowser/makedir.html b/app/lib/filebrowser/templates/filebrowser/makedir.html new file mode 100644 index 0000000..3595514 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/makedir.html @@ -0,0 +1,45 @@ +{% extends "admin/base_site.html" %} + + +{% load i18n adminmedia fb_tags fb_csrf %} + + +{% block stylesheets %} + {{ block.super }} + + +{% endblock %} + + +{% block bodyclass %}change-form filebrowser{% if query.pop %} popup{% endif %}{% endblock %} +{% block content-class %}content-flexible{% endblock %} + + +{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} + + +{% block content %} +
+
{% fb_csrf_token %} + {% if form.errors %}

{% trans 'Please correct the following errors.' %}

{% endif %} +
+
+
+
+ {{ form.dir_name }} + {% if form.dir_name.errors %}
    {{ form.dir_name.errors }}
{% endif %} +

+ {{ form.dir_name.help_text|safe }} + {% if settings_var.CONVERT_FILENAME %}
{% trans "The Name will be converted to lowercase. Spaces will be replaced with underscores." %}{% endif %} +

+
+
+
+ +
+
+{% endblock %} \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/rename.html b/app/lib/filebrowser/templates/filebrowser/rename.html new file mode 100644 index 0000000..a3ecf77 --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/rename.html @@ -0,0 +1,43 @@ +{% extends "admin/base_site.html" %} + + +{% load i18n adminmedia fb_tags fb_csrf %} + + +{% block stylesheets %} + {{ block.super }} + + +{% endblock %} + + +{% block bodyclass %}change-form filebrowser{% if query.pop %} popup{% endif %}{% endblock %} +{% block content-class %}content-flexible{% endblock %} + + +{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} + + +{% block content %} +
+
{% fb_csrf_token %} + {% if form.errors %}

{% trans 'Please correct the following errors.' %}

{% endif %} +
+
+
+
+ {{ form.name }} + {% if file_extension %}{{ file_extension }}{% endif %} + {% if form.name.errors %}
    {{ form.name.errors }}
{% endif %} + {% if form.name.help_text %}

{{ form.name.help_text|safe }}

{% endif %} +
+
+
+ +
+
+{% endblock %} \ No newline at end of file diff --git a/app/lib/filebrowser/templates/filebrowser/upload.html b/app/lib/filebrowser/templates/filebrowser/upload.html new file mode 100644 index 0000000..aee862a --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/upload.html @@ -0,0 +1,113 @@ +{% extends "admin/base_site.html" %} + + +{% load i18n adminmedia fb_tags %} + + +{% block stylesheets %} + {{ block.super }} + + + +{% endblock %} + + +{% block javascripts %} + {{ block.super }} + + + + + + + +{% endblock %} + + +{% block bodyclass %}change-form filebrowser{% if query.pop %} popup{% endif %}{% endblock %} +{% block content-class %}content-flexible{% endblock %} + + +{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} + + +{% block content %} +
+
+
+
+ +
+
+
+

{% trans "Help" %}

+
+ {% for extension in settings_var.EXTENSIONS.items %} + {% ifnotequal extension.0 'Folder' %} +
+

{{ extension.0|safe }} ({{ extension.1|join:", "|safe }})


+ {% endifnotequal %} + {% endfor %} +
+
+
+

{{ settings_var.MAX_UPLOAD_SIZE|filesizeformat }}


+
+ {% if settings_var.CONVERT_FILENAME %} +
+

+ {% trans "The Name will be converted to lowercase. Spaces will be replaced with underscores." %} +


+
+ {% endif %} +
+ +
+
+{% endblock %} diff --git a/app/lib/filebrowser/templates/filebrowser/versions.html b/app/lib/filebrowser/templates/filebrowser/versions.html new file mode 100644 index 0000000..f82b15c --- /dev/null +++ b/app/lib/filebrowser/templates/filebrowser/versions.html @@ -0,0 +1,156 @@ +{% extends "admin/base_site.html" %} + + +{% load i18n adminmedia fb_tags fb_versions %} + + +{% block stylesheets %} + {{ block.super }} + + + {% if query.pop %} + + {% endif %} +{% endblock %} + + +{% block javascripts %} + {{ block.super }} + + {% ifequal query.pop '1' %} + + + {% endifequal %} + + {% ifequal query.pop '2' %} + + + + {% if query.mce_rdomain %}{% endif %} + {% endifequal %} + + {% ifequal query.pop '3' %} + + + {% endifequal %} + + {{ media }} +{% endblock %} + + +{% block bodyclass %}change-list filebrowser{% if query.pop %} popup{% endif %}{% endblock %} +{% block content-class %}content-flexible{% endblock %} + + +{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} + + +{% block content %} +
+
+ + + + + + {% ifequal query.pop '1' %}{% endifequal %} + {% ifequal query.pop '2' %}{% endifequal %} + {% ifequal query.pop '3' %}{% endifequal %} + + + + + + + + + {% if settings_var.DEBUG %}{% endif %} + + + + + {% for version in settings_var.ADMIN_VERSIONS %} + {% version_object original version as image_version %} + + + + {% ifequal query.pop '1' %} + + {% endifequal %} + + + {% ifequal query.pop '2' %} + + {% endifequal %} + + + {% ifequal query.pop '3' %} + + {% endifequal %} + + + + + + + + + {% if settings_var.DEBUG %} + + {% endif %} + + + {% endfor %} + +
{% trans 'Name' %}{% trans 'Image Version' %}{% trans "Debug" %}
+ {% selectable image_version.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% selectable image_version.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% selectable image_version.filetype query.type %} + {% if selectable %} + + {% else %} +   + {% endif %} + + {% version_setting version %} + {{ version_setting.verbose_name }}
+ {% if version_setting.width %}{% trans "Width" %}: {{ version_setting.width }}px
{% endif %} + {% if version_setting.height %}{% trans "Height" %}: {{ version_setting.height }}px{% endif %} +
+ Filename {{ image_version.filename }}
+ Filetype {{ image_version.filetype }}
+ Filesize {{ image_version.filesize }}
+ Extension {{ image_version.extension }}
+ Date {{ image_version.date }}
+ Datetime Object {{ image_version.datetime }}

+ + Relative Path {{ image_version.path_relative }}
+ Full Path {{ image_version.path_full }}
+ Relative URL {{ image_version.url_relative }}
+ Full URL {{ image_version.url_full }}

+ + URL for FileBrowseField {{ image_version.url_save }}
+ Thumbnail URL {{ image_version.url_thumbnail }}

+ + Dimensions {{ image_version.dimensions }}
+ Width {{ image_version.width }}
+ Height {{ image_version.height }}
+ Orientation {{ image_version.orientation }} +
+
+
+{% endblock %} \ No newline at end of file diff --git a/app/lib/filebrowser/templatetags/__init__.py b/app/lib/filebrowser/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/lib/filebrowser/templatetags/fb_csrf.py b/app/lib/filebrowser/templatetags/fb_csrf.py new file mode 100644 index 0000000..2c3e78b --- /dev/null +++ b/app/lib/filebrowser/templatetags/fb_csrf.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +# django imports +from django.template import Node +from django.template import Library +from django.utils.safestring import mark_safe + +register = Library() + + +class CsrfTokenNode(Node): + def render(self, context): + csrf_token = context.get('csrf_token', None) + if csrf_token: + if csrf_token == 'NOTPROVIDED': + return mark_safe(u"") + else: + return mark_safe(u"
" % (csrf_token)) + else: + # It's very probable that the token is missing because of + # misconfiguration, so we raise a warning + from django.conf import settings + if settings.DEBUG: + import warnings + warnings.warn("A {% csrf_token %} was used in a template, but the context did not provide the value. This is usually caused by not using RequestContext.") + return u'' + +def fb_csrf_token(parser, token): + return CsrfTokenNode() +register.tag(fb_csrf_token) diff --git a/app/lib/filebrowser/templatetags/fb_pagination.py b/app/lib/filebrowser/templatetags/fb_pagination.py new file mode 100644 index 0000000..f0adac1 --- /dev/null +++ b/app/lib/filebrowser/templatetags/fb_pagination.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +from django.utils.html import escape +from django.utils.safestring import mark_safe +from django.template import Library + +register = Library() + +DOT = '.' + +@register.inclusion_tag('filebrowser/include/paginator.html', takes_context=True) +def pagination(context): + page_num = context['page'].number-1 + paginator = context['p'] + + if not paginator.num_pages or paginator.num_pages == 1: + page_range = [] + else: + ON_EACH_SIDE = 3 + ON_ENDS = 2 + + # If there are 10 or fewer pages, display links to every page. + # Otherwise, do some fancy + if paginator.num_pages <= 10: + page_range = range(paginator.num_pages) + else: + # Insert "smart" pagination links, so that there are always ON_ENDS + # links at either end of the list of pages, and there are always + # ON_EACH_SIDE links at either end of the "current page" link. + page_range = [] + if page_num > (ON_EACH_SIDE + ON_ENDS): + page_range.extend(range(0, ON_EACH_SIDE - 1)) + page_range.append(DOT) + page_range.extend(range(page_num - ON_EACH_SIDE, page_num + 1)) + else: + page_range.extend(range(0, page_num + 1)) + if page_num < (paginator.num_pages - ON_EACH_SIDE - ON_ENDS - 1): + page_range.extend(range(page_num + 1, page_num + ON_EACH_SIDE + 1)) + page_range.append(DOT) + page_range.extend(range(paginator.num_pages - ON_ENDS, paginator.num_pages)) + else: + page_range.extend(range(page_num + 1, paginator.num_pages)) + + return { + 'page_range': page_range, + 'page_num': page_num, + 'results_var': context['results_var'], + 'query': context['query'], + } + + diff --git a/app/lib/filebrowser/templatetags/fb_tags.py b/app/lib/filebrowser/templatetags/fb_tags.py new file mode 100644 index 0000000..a4ce9b4 --- /dev/null +++ b/app/lib/filebrowser/templatetags/fb_tags.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +# django imports +from django import template +from django.utils.encoding import smart_unicode +from django.utils.safestring import mark_safe + +# filebrowser imports +from filebrowser.settings import SELECT_FORMATS + +register = template.Library() + + +@register.inclusion_tag('filebrowser/include/_response.html', takes_context=True) +def query_string(context, add=None, remove=None): + """ + Allows the addition and removal of query string parameters. + + _response.html is just {{ response }} + + Usage: + http://www.url.com/{% query_string "param_to_add=value, param_to_add=value" "param_to_remove, params_to_remove" %} + http://www.url.com/{% query_string "" "filter" %}filter={{new_filter}} + http://www.url.com/{% query_string "sort=value" "sort" %} + """ + + # Written as an inclusion tag to simplify getting the context. + add = string_to_dict(add) + remove = string_to_list(remove) + params = context['query'].copy() + response = get_query_string(params, add, remove) + return {'response': response } + + +def query_helper(query, add=None, remove=None): + """ + Helper Function for use within views. + """ + + add = string_to_dict(add) + remove = string_to_list(remove) + params = query.copy() + return get_query_string(params, add, remove) + + +def get_query_string(p, new_params=None, remove=None): + """ + Add and remove query parameters. From `django.contrib.admin`. + """ + + if new_params is None: new_params = {} + if remove is None: remove = [] + for r in remove: + for k in p.keys(): + #if k.startswith(r): + if k == r: + del p[k] + for k, v in new_params.items(): + if k in p and v is None: + del p[k] + elif v is not None: + p[k] = v + return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20')) + + +def string_to_dict(string): + """ + Usage: + {{ url|thumbnail:"width=10,height=20" }} + {{ url|thumbnail:"width=10" }} + {{ url|thumbnail:"height=20" }} + """ + + kwargs = {} + if string: + string = str(string) + if ',' not in string: + # ensure at least one ',' + string += ',' + for arg in string.split(','): + arg = arg.strip() + if arg == '': continue + kw, val = arg.split('=', 1) + kwargs[kw] = val + return kwargs + + +def string_to_list(string): + """ + Usage: + {{ url|thumbnail:"width,height" }} + """ + + args = [] + if string: + string = str(string) + if ',' not in string: + # ensure at least one ',' + string += ',' + for arg in string.split(','): + arg = arg.strip() + if arg == '': continue + args.append(arg) + return args + + +class SelectableNode(template.Node): + def __init__(self, filetype, format): + self.filetype = template.Variable(filetype) + self.format = template.Variable(format) + + def render(self, context): + try: + filetype = self.filetype.resolve(context) + except template.VariableDoesNotExist: + filetype = '' + try: + format = self.format.resolve(context) + except template.VariableDoesNotExist: + format = '' + if filetype and format and filetype in SELECT_FORMATS[format]: + selectable = True + elif filetype and format and filetype not in SELECT_FORMATS[format]: + selectable = False + else: + selectable = True + context['selectable'] = selectable + return '' + + +def selectable(parser, token): + + try: + tag, filetype, format = token.split_contents() + except: + raise TemplateSyntaxError, "%s tag requires 2 arguments" % token.contents.split()[0] + + return SelectableNode(filetype, format) + +register.tag(selectable) diff --git a/app/lib/filebrowser/templatetags/fb_versions.py b/app/lib/filebrowser/templatetags/fb_versions.py new file mode 100644 index 0000000..954c743 --- /dev/null +++ b/app/lib/filebrowser/templatetags/fb_versions.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +# imports +import os, re +from time import gmtime + +# django imports +from django.template import Library, Node, Variable, VariableDoesNotExist, TemplateSyntaxError +from django.conf import settings +from django.utils.encoding import force_unicode, smart_str + +# filebrowser imports +from filebrowser.settings import MEDIA_ROOT, MEDIA_URL, VERSIONS +from filebrowser.functions import url_to_path, path_to_url, get_version_path, version_generator +from filebrowser.base import FileObject + +register = Library() + + +class VersionNode(Node): + def __init__(self, src, version_prefix): + self.src = Variable(src) + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")): + self.version_prefix = version_prefix[1:-1] + else: + self.version_prefix = None + self.version_prefix_var = Variable(version_prefix) + + def render(self, context): + try: + source = self.src.resolve(context) + except VariableDoesNotExist: + return None + if self.version_prefix: + version_prefix = self.version_prefix + else: + try: + version_prefix = self.version_prefix_var.resolve(context) + except VariableDoesNotExist: + return None + try: + source = force_unicode(source) + version_path = get_version_path(url_to_path(source), version_prefix) + if not os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, version_path))): + # create version + version_path = version_generator(url_to_path(source), version_prefix) + elif os.path.getmtime(smart_str(os.path.join(MEDIA_ROOT, url_to_path(source)))) > os.path.getmtime(smart_str(os.path.join(MEDIA_ROOT, version_path))): + # recreate version if original image was updated + version_path = version_generator(url_to_path(source), version_prefix, force=True) + return path_to_url(version_path) + except: + return "" + + +def version(parser, token): + """ + Displaying a version of an existing Image according to the predefined VERSIONS settings (see filebrowser settings). + {% version field_name version_prefix %} + + Use {% version my_image 'medium' %} in order to display the medium-size + version of an Image stored in a field name my_image. + + version_prefix can be a string or a variable. if version_prefix is a string, use quotes. + """ + + try: + tag, src, version_prefix = token.split_contents() + except: + raise TemplateSyntaxError, "%s tag requires 2 arguments" % token.contents.split()[0] + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")) and version_prefix.lower()[1:-1] not in VERSIONS: + raise TemplateSyntaxError, "%s tag received bad version_prefix %s" % (tag, version_prefix) + return VersionNode(src, version_prefix) + + +class VersionObjectNode(Node): + def __init__(self, src, version_prefix, var_name): + self.var_name = var_name + self.src = Variable(src) + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")): + self.version_prefix = version_prefix[1:-1] + else: + self.version_prefix = None + self.version_prefix_var = Variable(version_prefix) + + def render(self, context): + try: + source = self.src.resolve(context) + except VariableDoesNotExist: + return None + if self.version_prefix: + version_prefix = self.version_prefix + else: + try: + version_prefix = self.version_prefix_var.resolve(context) + except VariableDoesNotExist: + return None + try: + source = force_unicode(source) + version_path = get_version_path(url_to_path(source), version_prefix) + if not os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, version_path))): + # create version + version_path = version_generator(url_to_path(source), version_prefix) + elif os.path.getmtime(smart_str(os.path.join(MEDIA_ROOT, url_to_path(source)))) > os.path.getmtime(smart_str(os.path.join(MEDIA_ROOT, version_path))): + # recreate version if original image was updated + version_path = version_generator(url_to_path(source), version_prefix, force=True) + context[self.var_name] = FileObject(version_path) + except: + context[self.var_name] = "" + return '' + + +def version_object(parser, token): + """ + Returns a context variable 'version_object'. + {% version_object field_name version_prefix %} + + Use {% version_object my_image 'medium' %} in order to retrieve the medium + version of an Image stored in a field name my_image. + Use {% version_object my_image 'medium' as var %} in order to use 'var' as + your context variable. + + version_prefix can be a string or a variable. if version_prefix is a string, use quotes. + """ + + try: + #tag, src, version_prefix = token.split_contents() + tag, arg = token.contents.split(None, 1) + except: + raise TemplateSyntaxError, "%s tag requires arguments" % token.contents.split()[0] + m = re.search(r'(.*?) (.*?) as (\w+)', arg) + if not m: + raise TemplateSyntaxError, "%r tag had invalid arguments" % tag + src, version_prefix, var_name = m.groups() + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")) and version_prefix.lower()[1:-1] not in VERSIONS: + raise TemplateSyntaxError, "%s tag received bad version_prefix %s" % (tag, version_prefix) + return VersionObjectNode(src, version_prefix, var_name) + + +class VersionSettingNode(Node): + def __init__(self, version_prefix): + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")): + self.version_prefix = version_prefix[1:-1] + else: + self.version_prefix = None + self.version_prefix_var = Variable(version_prefix) + + def render(self, context): + if self.version_prefix: + version_prefix = self.version_prefix + else: + try: + version_prefix = self.version_prefix_var.resolve(context) + except VariableDoesNotExist: + return None + context['version_setting'] = VERSIONS[version_prefix] + return '' + + +def version_setting(parser, token): + """ + Get Information about a version setting. + """ + + try: + tag, version_prefix = token.split_contents() + except: + raise TemplateSyntaxError, "%s tag requires 1 argument" % token.contents.split()[0] + if (version_prefix[0] == version_prefix[-1] and version_prefix[0] in ('"', "'")) and version_prefix.lower()[1:-1] not in VERSIONS: + raise TemplateSyntaxError, "%s tag received bad version_prefix %s" % (tag, version_prefix) + return VersionSettingNode(version_prefix) + + +register.tag(version) +register.tag(version_object) +register.tag(version_setting) + + diff --git a/app/lib/filebrowser/urls.py b/app/lib/filebrowser/urls.py new file mode 100644 index 0000000..97e7135 --- /dev/null +++ b/app/lib/filebrowser/urls.py @@ -0,0 +1,16 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + + # filebrowser urls + url(r'^browse/$', 'filebrowser.views.browse', name="fb_browse"), + url(r'^mkdir/', 'filebrowser.views.mkdir', name="fb_mkdir"), + url(r'^upload/', 'filebrowser.views.upload', name="fb_upload"), + url(r'^rename/$', 'filebrowser.views.rename', name="fb_rename"), + url(r'^delete/$', 'filebrowser.views.delete', name="fb_delete"), + url(r'^versions/$', 'filebrowser.views.versions', name="fb_versions"), + + url(r'^check_file/$', 'filebrowser.views._check_file', name="fb_check"), + url(r'^upload_file/$', 'filebrowser.views._upload_file', name="fb_do_upload"), + +) diff --git a/app/lib/filebrowser/views.py b/app/lib/filebrowser/views.py new file mode 100644 index 0000000..eece2b2 --- /dev/null +++ b/app/lib/filebrowser/views.py @@ -0,0 +1,494 @@ +# coding: utf-8 + +# general imports +import itertools, os, re +from time import gmtime, strftime + +# django imports +from django.shortcuts import render_to_response, HttpResponse +from django.template import RequestContext as Context +from django.http import HttpResponseRedirect +from django.contrib.admin.views.decorators import staff_member_required +from django.views.decorators.cache import never_cache +from django.utils.translation import ugettext as _ +from django.conf import settings +from django import forms +from django.core.urlresolvers import reverse +from django.core.exceptions import ImproperlyConfigured +from django.dispatch import Signal +from django.core.paginator import Paginator, InvalidPage, EmptyPage +from django.utils.encoding import smart_str + +try: + # django SVN + from django.views.decorators.csrf import csrf_exempt +except: + # django 1.1 + from django.contrib.csrf.middleware import csrf_exempt + +# filebrowser imports +from filebrowser.settings import * +from filebrowser.functions import path_to_url, sort_by_attr, get_path, get_file, get_version_path, get_breadcrumbs, get_filterdate, get_settings_var, handle_file_upload, convert_filename +from filebrowser.templatetags.fb_tags import query_helper +from filebrowser.base import FileObject +from filebrowser.decorators import flash_login_required + +# Precompile regular expressions +filter_re = [] +for exp in EXCLUDE: + filter_re.append(re.compile(exp)) +for k,v in VERSIONS.iteritems(): + exp = (r'_%s.(%s)') % (k, '|'.join(EXTENSION_LIST)) + filter_re.append(re.compile(exp)) + + +def browse(request): + """ + Browse Files/Directories. + """ + + # QUERY / PATH CHECK + query = request.GET.copy() + path = get_path(query.get('dir', '')) + directory = get_path('') + q = request.GET.get('q') + + if path is None: + msg = _('The requested Folder does not exist.') + request.user.message_set.create(message=msg) + if directory is None: + # The DIRECTORY does not exist, raise an error to prevent eternal redirecting. + raise ImproperlyConfigured, _("Error finding Upload-Folder (MEDIA_ROOT + FILEBROWSER_DIRECTORY). Maybe it does not exist?") + redirect_url = reverse("fb_browse") + query_helper(query, "", "dir") + return HttpResponseRedirect(redirect_url) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + + # INITIAL VARIABLES + results_var = {'results_total': 0, 'results_current': 0, 'delete_total': 0, 'images_total': 0, 'select_total': 0 } + counter = {} + for k,v in EXTENSIONS.iteritems(): + counter[k] = 0 + + if q: + m_root = os.path.normpath(MEDIA_ROOT) + dirs = [] + for root, _subdirs, filenames in os.walk(abs_path): + dirs_2 = [] + items = _subdirs + filenames + for f in items: + dirs_2.append((os.path.normpath(root)[len(m_root)+1:], f)) + # append result of every iteration to dirs + dirs.append(dirs_2) + dir_list = itertools.chain(*dirs) + else: + root = os.path.join(DIRECTORY, path) + dir_list = ((root, f) for f in os.listdir(abs_path)) + + files = [] + for file_dir, file in dir_list: + # EXCLUDE FILES MATCHING VERSIONS_PREFIX OR ANY OF THE EXCLUDE PATTERNS + filtered = file.startswith('.') + for re_prefix in filter_re: + if re_prefix.search(file): + filtered = True + if filtered: + continue + results_var['results_total'] += 1 + + # CREATE FILEOBJECT + fileobject = FileObject(os.path.join(file_dir, file)) + + # FILTER / SEARCH + append = False + if fileobject.filetype == request.GET.get('filter_type', fileobject.filetype) and get_filterdate(request.GET.get('filter_date', ''), fileobject.date or 0): + append = True + if q and not re.compile(q.lower(), re.M).search(file.lower()): + append = False + + # APPEND FILE_LIST + if append: + try: + # COUNTER/RESULTS + if fileobject.filetype == 'Image': + results_var['images_total'] += 1 + if fileobject.filetype != 'Folder': + results_var['delete_total'] += 1 + elif fileobject.filetype == 'Folder' and fileobject.is_empty: + results_var['delete_total'] += 1 + if query.get('type') and query.get('type') in SELECT_FORMATS and fileobject.filetype in SELECT_FORMATS[query.get('type')]: + results_var['select_total'] += 1 + elif not query.get('type'): + results_var['select_total'] += 1 + except OSError: + # Ignore items that have problems + continue + else: + files.append(fileobject) + results_var['results_current'] += 1 + + # COUNTER/RESULTS + if fileobject.filetype: + counter[fileobject.filetype] += 1 + + # SORTING + query['o'] = request.GET.get('o', DEFAULT_SORTING_BY) + query['ot'] = request.GET.get('ot', DEFAULT_SORTING_ORDER) + files = sort_by_attr(files, request.GET.get('o', DEFAULT_SORTING_BY)) + if not request.GET.get('ot') and DEFAULT_SORTING_ORDER == "desc" or request.GET.get('ot') == "desc": + files.reverse() + + p = Paginator(files, LIST_PER_PAGE) + try: + page_nr = request.GET.get('p', '1') + except: + page_nr = 1 + try: + page = p.page(page_nr) + except (EmptyPage, InvalidPage): + page = p.page(p.num_pages) + + return render_to_response('filebrowser/index.html', { + 'dir': path, + 'p': p, + 'q': q, + 'page': page, + 'results_var': results_var, + 'counter': counter, + 'query': query, + 'title': _(u'FileBrowser'), + 'settings_var': get_settings_var(), + 'breadcrumbs': get_breadcrumbs(query, path), + 'breadcrumbs_title': "" + }, context_instance=Context(request)) +browse = staff_member_required(never_cache(browse)) + + +# mkdir signals +filebrowser_pre_createdir = Signal(providing_args=["path", "dirname"]) +filebrowser_post_createdir = Signal(providing_args=["path", "dirname"]) + +def mkdir(request): + """ + Make Directory. + """ + + from filebrowser.forms import MakeDirForm + + # QUERY / PATH CHECK + query = request.GET + path = get_path(query.get('dir', '')) + if path is None: + msg = _('The requested Folder does not exist.') + request.user.message_set.create(message=msg) + return HttpResponseRedirect(reverse("fb_browse")) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + + if request.method == 'POST': + form = MakeDirForm(abs_path, request.POST) + if form.is_valid(): + server_path = os.path.join(abs_path, form.cleaned_data['dir_name']) + try: + # PRE CREATE SIGNAL + filebrowser_pre_createdir.send(sender=request, path=path, dirname=form.cleaned_data['dir_name']) + # CREATE FOLDER + os.mkdir(server_path) + os.chmod(server_path, 0775) + # POST CREATE SIGNAL + filebrowser_post_createdir.send(sender=request, path=path, dirname=form.cleaned_data['dir_name']) + # MESSAGE & REDIRECT + msg = _('The Folder %s was successfully created.') % (form.cleaned_data['dir_name']) + request.user.message_set.create(message=msg) + # on redirect, sort by date desc to see the new directory on top of the list + # remove filter in order to actually _see_ the new folder + # remove pagination + redirect_url = reverse("fb_browse") + query_helper(query, "ot=desc,o=date", "ot,o,filter_type,filter_date,q,p") + return HttpResponseRedirect(redirect_url) + except OSError, (errno, strerror): + if errno == 13: + form.errors['dir_name'] = forms.util.ErrorList([_('Permission denied.')]) + else: + form.errors['dir_name'] = forms.util.ErrorList([_('Error creating folder.')]) + else: + form = MakeDirForm(abs_path) + + return render_to_response('filebrowser/makedir.html', { + 'form': form, + 'query': query, + 'title': _(u'New Folder'), + 'settings_var': get_settings_var(), + 'breadcrumbs': get_breadcrumbs(query, path), + 'breadcrumbs_title': _(u'New Folder') + }, context_instance=Context(request)) +mkdir = staff_member_required(never_cache(mkdir)) + + +def upload(request): + """ + Multipe File Upload. + """ + + from django.http import parse_cookie + + # QUERY / PATH CHECK + query = request.GET + path = get_path(query.get('dir', '')) + if path is None: + msg = _('The requested Folder does not exist.') + request.user.message_set.create(message=msg) + return HttpResponseRedirect(reverse("fb_browse")) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + + # SESSION (used for flash-uploading) + cookie_dict = parse_cookie(request.META.get('HTTP_COOKIE', '')) + engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) + session_key = cookie_dict.get(settings.SESSION_COOKIE_NAME, None) + + return render_to_response('filebrowser/upload.html', { + 'query': query, + 'title': _(u'Select files to upload'), + 'settings_var': get_settings_var(), + 'session_key': session_key, + 'breadcrumbs': get_breadcrumbs(query, path), + 'breadcrumbs_title': _(u'Upload') + }, context_instance=Context(request)) +upload = staff_member_required(never_cache(upload)) + + +@csrf_exempt +def _check_file(request): + """ + Check if file already exists on the server. + """ + + from django.utils import simplejson + + folder = request.POST.get('folder') + fb_uploadurl_re = re.compile(r'^.*(%s)' % reverse("fb_upload")) + folder = fb_uploadurl_re.sub('', folder) + + fileArray = {} + if request.method == 'POST': + for k,v in request.POST.items(): + if k != "folder": + v = convert_filename(v) + if os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, DIRECTORY, folder, v))): + fileArray[k] = v + + return HttpResponse(simplejson.dumps(fileArray)) + + +# upload signals +filebrowser_pre_upload = Signal(providing_args=["path", "file"]) +filebrowser_post_upload = Signal(providing_args=["path", "file"]) + +@csrf_exempt +@flash_login_required +def _upload_file(request): + """ + Upload file to the server. + """ + + from django.core.files.move import file_move_safe + + if request.method == 'POST': + folder = request.POST.get('folder') + fb_uploadurl_re = re.compile(r'^.*(%s)' % reverse("fb_upload")) + folder = fb_uploadurl_re.sub('', folder) + abs_path = os.path.join(MEDIA_ROOT, DIRECTORY, folder) + if request.FILES: + filedata = request.FILES['Filedata'] + filedata.name = convert_filename(filedata.name) + # PRE UPLOAD SIGNAL + filebrowser_pre_upload.send(sender=request, path=request.POST.get('folder'), file=filedata) + # HANDLE UPLOAD + uploadedfile = handle_file_upload(abs_path, filedata) + # MOVE UPLOADED FILE + # if file already exists + if os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, DIRECTORY, folder, filedata.name))): + old_file = smart_str(os.path.join(abs_path, filedata.name)) + new_file = smart_str(os.path.join(abs_path, uploadedfile)) + file_move_safe(new_file, old_file, allow_overwrite=True) + # POST UPLOAD SIGNAL + filebrowser_post_upload.send(sender=request, path=request.POST.get('folder'), file=FileObject(smart_str(os.path.join(DIRECTORY, folder, filedata.name)))) + return HttpResponse('True') +#_upload_file = flash_login_required(_upload_file) + + +# delete signals +filebrowser_pre_delete = Signal(providing_args=["path", "filename"]) +filebrowser_post_delete = Signal(providing_args=["path", "filename"]) + +def delete(request): + """ + Delete existing File/Directory. + + When trying to delete a Directory, the Directory has to be empty. + """ + + # QUERY / PATH CHECK + query = request.GET + path = get_path(query.get('dir', '')) + filename = get_file(query.get('dir', ''), query.get('filename', '')) + if path is None or filename is None: + if path is None: + msg = _('The requested Folder does not exist.') + else: + msg = _('The requested File does not exist.') + request.user.message_set.create(message=msg) + return HttpResponseRedirect(reverse("fb_browse")) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + + msg = "" + if request.GET: + if request.GET.get('filetype') != "Folder": + relative_server_path = os.path.join(DIRECTORY, path, filename) + try: + # PRE DELETE SIGNAL + filebrowser_pre_delete.send(sender=request, path=path, filename=filename) + # DELETE IMAGE VERSIONS/THUMBNAILS + for version in VERSIONS: + try: + os.unlink(os.path.join(MEDIA_ROOT, get_version_path(relative_server_path, version))) + except: + pass + # DELETE FILE + os.unlink(smart_str(os.path.join(abs_path, filename))) + # POST DELETE SIGNAL + filebrowser_post_delete.send(sender=request, path=path, filename=filename) + # MESSAGE & REDIRECT + msg = _('The file %s was successfully deleted.') % (filename.lower()) + request.user.message_set.create(message=msg) + redirect_url = reverse("fb_browse") + query_helper(query, "", "filename,filetype") + return HttpResponseRedirect(redirect_url) + except OSError: + # todo: define error message + msg = OSError + else: + try: + # PRE DELETE SIGNAL + filebrowser_pre_delete.send(sender=request, path=path, filename=filename) + # DELETE FOLDER + os.rmdir(os.path.join(abs_path, filename)) + # POST DELETE SIGNAL + filebrowser_post_delete.send(sender=request, path=path, filename=filename) + # MESSAGE & REDIRECT + msg = _('The folder %s was successfully deleted.') % (filename.lower()) + request.user.message_set.create(message=msg) + redirect_url = reverse("fb_browse") + query_helper(query, "", "filename,filetype") + return HttpResponseRedirect(redirect_url) + except OSError: + # todo: define error message + msg = OSError + + if msg: + request.user.message_set.create(message=msg) + + return render_to_response('filebrowser/index.html', { + 'dir': dir_name, + 'file': request.GET.get('filename', ''), + 'query': query, + 'settings_var': get_settings_var(), + 'breadcrumbs': get_breadcrumbs(query, dir_name), + 'breadcrumbs_title': "" + }, context_instance=Context(request)) +delete = staff_member_required(never_cache(delete)) + + +# rename signals +filebrowser_pre_rename = Signal(providing_args=["path", "filename", "new_filename"]) +filebrowser_post_rename = Signal(providing_args=["path", "filename", "new_filename"]) + +def rename(request): + """ + Rename existing File/Directory. + + Includes renaming existing Image Versions/Thumbnails. + """ + + from filebrowser.forms import RenameForm + + # QUERY / PATH CHECK + query = request.GET + path = get_path(query.get('dir', '')) + filename = get_file(query.get('dir', ''), query.get('filename', '')) + if path is None or filename is None: + if path is None: + msg = _('The requested Folder does not exist.') + else: + msg = _('The requested File does not exist.') + request.user.message_set.create(message=msg) + return HttpResponseRedirect(reverse("fb_browse")) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + file_extension = os.path.splitext(filename)[1].lower() + + if request.method == 'POST': + form = RenameForm(abs_path, file_extension, request.POST) + if form.is_valid(): + relative_server_path = os.path.join(DIRECTORY, path, filename) + new_filename = form.cleaned_data['name'] + file_extension + new_relative_server_path = os.path.join(DIRECTORY, path, new_filename) + try: + # PRE RENAME SIGNAL + filebrowser_pre_rename.send(sender=request, path=path, filename=filename, new_filename=new_filename) + # DELETE IMAGE VERSIONS/THUMBNAILS + # regenerating versions/thumbs will be done automatically + for version in VERSIONS: + try: + os.unlink(os.path.join(MEDIA_ROOT, get_version_path(relative_server_path, version))) + except: + pass + # RENAME ORIGINAL + os.rename(os.path.join(MEDIA_ROOT, relative_server_path), os.path.join(MEDIA_ROOT, new_relative_server_path)) + # POST RENAME SIGNAL + filebrowser_post_rename.send(sender=request, path=path, filename=filename, new_filename=new_filename) + # MESSAGE & REDIRECT + msg = _('Renaming was successful.') + request.user.message_set.create(message=msg) + redirect_url = reverse("fb_browse") + query_helper(query, "", "filename") + return HttpResponseRedirect(redirect_url) + except OSError, (errno, strerror): + form.errors['name'] = forms.util.ErrorList([_('Error.')]) + else: + form = RenameForm(abs_path, file_extension) + + return render_to_response('filebrowser/rename.html', { + 'form': form, + 'query': query, + 'file_extension': file_extension, + 'title': _(u'Rename "%s"') % filename, + 'settings_var': get_settings_var(), + 'breadcrumbs': get_breadcrumbs(query, path), + 'breadcrumbs_title': _(u'Rename') + }, context_instance=Context(request)) +rename = staff_member_required(never_cache(rename)) + + +def versions(request): + """ + Show all Versions for an Image according to ADMIN_VERSIONS. + """ + + # QUERY / PATH CHECK + query = request.GET + path = get_path(query.get('dir', '')) + filename = get_file(query.get('dir', ''), query.get('filename', '')) + if path is None or filename is None: + if path is None: + msg = _('The requested Folder does not exist.') + else: + msg = _('The requested File does not exist.') + request.user.message_set.create(message=msg) + return HttpResponseRedirect(reverse("fb_browse")) + abs_path = u'%s' % os.path.join(MEDIA_ROOT, DIRECTORY, path) + + return render_to_response('filebrowser/versions.html', { + 'original': path_to_url(os.path.join(DIRECTORY, path, filename)), + 'query': query, + 'title': _(u'Versions for "%s"') % filename, + 'settings_var': get_settings_var(), + 'breadcrumbs': get_breadcrumbs(query, path), + 'breadcrumbs_title': _(u'Versions for "%s"') % filename + }, context_instance=Context(request)) +versions = staff_member_required(never_cache(versions)) + + -- cgit v1.2.3-70-g09d2