From: Radek Czajka Date: Wed, 26 Mar 2014 15:32:58 +0000 (+0100) Subject: Merge with master. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/ec5b493bff5efa683aadf5f78aa891eff3550156?hp=e7927df2744d46e176c7114bf63f1bd8f5746168 Merge with master. --- diff --git a/.gitignore b/.gitignore index 0d555842..318e02d0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ dev.sqlite requirements.pybundle *~ *.orig +/redakcja/media +/static +.sass-cache # Python garbage *.pyc @@ -26,5 +29,8 @@ nbproject/* .project .pydevproject .settings -platforma/static/compressed -platforma/static/compressed/* + +node_modules + +/static_test +chromedriver.log \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 56b9c425..004f6f37 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "lib/librarian"] path = lib/librarian - url = git://github.com/fnp/librarian.git + url = git://git.nowoczesnapolska.org.pl/librarian.git diff --git a/README.md b/README.md index 47fad0c8..93ffb1c4 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,14 @@ Wdrożenie fab production deploy +Testy +==== + + $ pip install -r requirements-test.txt + $ python redakcja/manage.py test --settings=settings.test + +JavaScript (wymagany node.js i xsltproc): + + $ npm install + $ ./node_modules/.bin/mocha -u tdd $(find -name *_test.js) + \ No newline at end of file diff --git a/apps/apiclient/settings.py b/apps/apiclient/settings.py index 5fbf18ee..f1eb34a4 100755 --- a/apps/apiclient/settings.py +++ b/apps/apiclient/settings.py @@ -5,7 +5,7 @@ WL_CONSUMER_KEY = getattr(settings, 'APICLIENT_WL_CONSUMER_KEY', None) WL_CONSUMER_SECRET = getattr(settings, 'APICLIENT_WL_CONSUMER_SECRET', None) WL_API_URL = getattr(settings, 'APICLIENT_WL_API_URL', - 'http://www.wolnelektury.pl/api/') + 'http://wolnelektury.pl/api/') WL_REQUEST_TOKEN_URL = getattr(settings, 'APICLIENT_WL_REQUEST_TOKEN_URL', WL_API_URL + 'oauth/request_token/') diff --git a/apps/apiclient/urls.py b/apps/apiclient/urls.py index 87d9997d..55cc4669 100755 --- a/apps/apiclient/urls.py +++ b/apps/apiclient/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url urlpatterns = patterns('apiclient.views', url(r'^oauth/$', 'oauth', name='apiclient_oauth'), diff --git a/apps/catalogue/admin.py b/apps/catalogue/admin.py index 8ba803e7..53e8a256 100644 --- a/apps/catalogue/admin.py +++ b/apps/catalogue/admin.py @@ -3,10 +3,13 @@ from django.contrib import admin from catalogue import models class BookAdmin(admin.ModelAdmin): + list_display = ['title', 'public', '_published', '_new_publishable', 'project'] + list_filter = ['public', '_published', '_new_publishable', 'project'] prepopulated_fields = {'slug': ['title']} search_fields = ['title'] +admin.site.register(models.Project) admin.site.register(models.Book, BookAdmin) admin.site.register(models.Chunk) admin.site.register(models.Chunk.tag_model) diff --git a/apps/catalogue/constants.py b/apps/catalogue/constants.py index d75d6b4b..0c842324 100644 --- a/apps/catalogue/constants.py +++ b/apps/catalogue/constants.py @@ -1,5 +1,8 @@ # -*- coding: utf-8 -*- - +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# TRIM_BEGIN = " TRIM_BEGIN " TRIM_END = " TRIM_END " diff --git a/apps/catalogue/ebook_utils.py b/apps/catalogue/ebook_utils.py index 1fcf8d33..d9c99227 100644 --- a/apps/catalogue/ebook_utils.py +++ b/apps/catalogue/ebook_utils.py @@ -13,7 +13,8 @@ class RedakcjaDocProvider(DocProvider): def by_slug(self, slug): return StringIO(Book.objects.get(dc_slug=slug - ).materialize(publishable=self.publishable)) + ).materialize(publishable=self.publishable + ).encode('utf-8')) def serve_file(file_path, name, mime_type): diff --git a/apps/catalogue/feeds.py b/apps/catalogue/feeds.py new file mode 100644 index 00000000..4884a4cd --- /dev/null +++ b/apps/catalogue/feeds.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from django.contrib.syndication.views import Feed +from django.shortcuts import get_object_or_404 +from catalogue.models import Book, Chunk + +class PublishTrackFeed(Feed): + title = u"Planowane publikacje" + link = "/" + + def description(self, obj): + tag, published = obj + return u"Publikacje, które dotarły co najmniej do etapu: %s" % tag.name + + def get_object(self, request, slug): + published = request.GET.get('published') + if published is not None: + published = published == 'true' + return get_object_or_404(Chunk.tag_model, slug=slug), published + + def item_title(self, item): + return item.title + + def items(self, obj): + tag, published = obj + books = Book.objects.filter(public=True, _on_track__gte=tag.ordering + ).order_by('-_on_track', 'title') + if published is not None: + books = books.filter(_published=published) + return books diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 26d14aa4..83b16523 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -20,7 +20,7 @@ class DocumentCreateForm(forms.ModelForm): class Meta: model = Book - exclude = ['parent', 'parent_number'] + exclude = ['parent', 'parent_number', 'project'] def __init__(self, *args, **kwargs): super(DocumentCreateForm, self).__init__(*args, **kwargs) @@ -72,7 +72,7 @@ class ChunkForm(forms.ModelForm): """ user = forms.ModelChoiceField(queryset= User.objects.annotate(count=Count('chunk')). - order_by('-count', 'last_name', 'first_name'), required=False, + order_by('last_name', 'first_name'), required=False, label=_('Assigned to')) class Meta: @@ -130,6 +130,7 @@ class BookForm(forms.ModelForm): class Meta: model = Book + exclude = ['project'] def __init__(self, *args, **kwargs): ret = super(BookForm, self).__init__(*args, **kwargs) diff --git a/apps/catalogue/helpers.py b/apps/catalogue/helpers.py index df64ade1..d340b461 100644 --- a/apps/catalogue/helpers.py +++ b/apps/catalogue/helpers.py @@ -1,5 +1,11 @@ from datetime import date from functools import wraps +from os.path import join +from os import listdir, stat +from shutil import move, rmtree +from django.conf import settings +import re +import filecmp from django.db.models import Count @@ -36,3 +42,107 @@ def parse_isodate(isodate): return date(*[int(p) for p in isodate.split('-')]) except (AttributeError, TypeError, ValueError): raise ValueError("Not a date in ISO format.") + + +class GalleryMerger(object): + def __init__(self, dest_gallery, src_gallery): + self.dest = dest_gallery + self.src = src_gallery + self.dest_size = None + self.src_size = None + self.num_deleted = 0 + + @staticmethod + def path(gallery): + return join(settings.MEDIA_ROOT, settings.IMAGE_DIR, gallery) + + @staticmethod + def get_prefix(name): + m = re.match(r"^([0-9])-", name) + if m: + return int(m.groups()[0]) + return None + + @staticmethod + def set_prefix(name, prefix, always=False): + m = not always and re.match(r"^([0-9])-", name) + return "%1d-%s" % (prefix, m and name[2:] or name) + + @property + def was_merged(self): + "Check if we have gallery size recorded" + return self.dest_size is not None + + def merge(self): + if not self.dest: + return self.src + if not self.src: + return self.dest + + files = listdir(self.path(self.dest)) + files.sort() + self.dest_size = len(files) + files_other = listdir(self.path(self.src)) + files_other.sort() + self.src_size = len(files_other) + + if files and files_other: + print "compare %s with %s" % (files[-1], files_other[0]) + if filecmp.cmp( + join(self.path(self.dest), files[-1]), + join(self.path(self.src), files_other[0]), + False + ): + files_other.pop(0) + self.num_deleted = 1 + + prefixes = {} + renamed_files = {} + renamed_files_other = {} + last_pfx = -1 + + # check if all elements of my files have a prefix + files_prefixed = True + for f in files: + p = self.get_prefix(f) + if p: + if p > last_pfx: last_pfx = p + else: + files_prefixed = False + break + + # if not, add a 0 prefix to them + if not files_prefixed: + prefixes[0] = 0 + for f in files: + renamed_files[f] = self.set_prefix(f, 0, True) + + # two cases here - either all are prefixed or not. + files_other_prefixed = True + for f in files_other: + pfx = self.get_prefix(f) + if pfx is not None: + if not pfx in prefixes: + last_pfx += 1 + prefixes[pfx] = last_pfx + renamed_files_other[f] = self.set_prefix(f, prefixes[pfx]) + else: + # ops, not all files here were prefixed. + files_other_prefixed = False + break + + # just set a 1- prefix to all of them + if not files_other_prefixed: + for f in files_other: + renamed_files_other[f] = self.set_prefix(f, 1, True) + + # finally, move / rename files. + for frm, to in renamed_files.items(): + move(join(self.path(self.dest), frm), + join(self.path(self.dest), to)) + for frm, to in renamed_files_other.items(): + move(join(self.path(self.src), frm), + join(self.path(self.dest), to)) + + rmtree(join(self.path(self.src))) + return self.dest diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index d933b5a9..64f78b46 100644 Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.po b/apps/catalogue/locale/pl/LC_MESSAGES/django.po index 99241c46..d98440f3 100644 --- a/apps/catalogue/locale/pl/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/pl/LC_MESSAGES/django.po @@ -7,15 +7,18 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-12-21 12:44+0100\n" -"PO-Revision-Date: 2011-12-21 12:45+0100\n" +"POT-Creation-Date: 2014-03-26 16:13+0100\n" +"PO-Revision-Date: 2014-03-26 16:14+0100\n" "Last-Translator: Radek Czajka \n" -"Language-Team: Fundacja Nowoczesna Polska \n" +"Language-Team: Fundacja Nowoczesna Polska \n" "Language: pl\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==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.5.4\n" #: forms.py:39 msgid "Text file must be UTF-8 encoded." @@ -33,13 +36,11 @@ msgstr "Plik ZIP" msgid "Directories are documents in chunks" msgstr "Katalogi zawierają dokumenty w częściach" -#: forms.py:76 -#: forms.py:164 +#: forms.py:76 forms.py:165 msgid "Assigned to" msgstr "Przypisane do" -#: forms.py:97 -#: forms.py:111 +#: forms.py:97 forms.py:111 msgid "Chunk with this slug already exists" msgstr "Część z tym slugiem już istnieje" @@ -47,83 +48,76 @@ msgstr "Część z tym slugiem już istnieje" msgid "Append to" msgstr "Dołącz do" -#: views.py:165 +#: views.py:166 #, python-format msgid "Slug already used for %s" msgstr "Slug taki sam jak dla pliku %s" -#: views.py:167 +#: views.py:168 msgid "Slug already used in repository." msgstr "Dokument o tym slugu już istnieje w repozytorium." -#: views.py:173 +#: views.py:174 msgid "File should be UTF-8 encoded." msgstr "Plik powinien mieć kodowanie UTF-8." -#: models/book.py:21 -#: models/chunk.py:23 -#: models/image.py:21 +#: views.py:552 models/book.py:56 +msgid "books" +msgstr "książki" + +#: views.py:554 +msgid "scan gallery" +msgstr "galeria skanów" + +#: models/book.py:28 models/chunk.py:23 models/image.py:21 msgid "title" msgstr "tytuł" -#: models/book.py:22 -#: models/chunk.py:24 -#: models/image.py:22 +#: models/book.py:29 models/chunk.py:24 models/image.py:22 msgid "slug" msgstr "slug" -#: models/book.py:23 -#: models/image.py:23 +#: models/book.py:30 models/image.py:23 msgid "public" msgstr "publiczna" -#: models/book.py:24 +#: models/book.py:31 msgid "scan gallery name" msgstr "nazwa galerii skanów" -#: models/book.py:27 +#: models/book.py:35 msgid "parent" msgstr "rodzic" -#: models/book.py:28 +#: models/book.py:36 msgid "parent number" msgstr "numeracja rodzica" -#: models/book.py:44 -#: models/chunk.py:21 -#: models/publish_log.py:17 +#: models/book.py:55 models/chunk.py:21 models/publish_log.py:17 msgid "book" msgstr "książka" -#: models/book.py:45 -msgid "books" -msgstr "książki" - -#: models/book.py:220 +#: models/book.py:255 msgid "No chunks in the book." msgstr "Książka nie ma części." -#: models/book.py:224 +#: models/book.py:259 msgid "Not all chunks have publishable revisions." msgstr "Niektóre części nie są gotowe do publikacji." -#: models/book.py:233 -#: models/image.py:80 +#: models/book.py:266 models/image.py:80 msgid "Invalid XML" msgstr "Nieprawidłowy XML" -#: models/book.py:235 -#: models/image.py:82 +#: models/book.py:268 models/image.py:82 msgid "No Dublin Core found." msgstr "Brak sekcji Dublin Core." -#: models/book.py:237 -#: models/image.py:84 +#: models/book.py:270 models/image.py:84 msgid "Invalid Dublin Core" msgstr "Nieprawidłowy Dublin Core" -#: models/book.py:240 -#: models/image.py:88 +#: models/book.py:273 models/image.py:88 msgid "rdf:about is not" msgstr "rdf:about jest różny od" @@ -143,9 +137,7 @@ msgstr "część" msgid "chunks" msgstr "części" -#: models/image.py:20 -#: models/image.py:34 -#: models/publish_log.py:45 +#: models/image.py:20 models/image.py:34 models/publish_log.py:45 msgid "image" msgstr "obraz" @@ -157,19 +149,32 @@ msgstr "obrazy" msgid "There is no publishable revision" msgstr "Żadna wersja nie została oznaczona do publikacji." -#: models/publish_log.py:18 -#: models/publish_log.py:46 +#: models/project.py:13 +msgid "name" +msgstr "nazwa" + +#: models/project.py:14 +msgid "notes" +msgstr "notatki" + +#: models/project.py:19 templates/catalogue/book_list/book_list.html:64 +msgid "project" +msgstr "projekt" + +#: models/project.py:20 +msgid "projects" +msgstr "projekty" + +#: models/publish_log.py:18 models/publish_log.py:46 msgid "time" msgstr "czas" -#: models/publish_log.py:19 -#: models/publish_log.py:47 -#: templates/catalogue/wall.html:18 +#: models/publish_log.py:19 models/publish_log.py:47 +#: templates/catalogue/wall.html:19 msgid "user" msgstr "użytkownik" -#: models/publish_log.py:24 -#: models/publish_log.py:33 +#: models/publish_log.py:24 models/publish_log.py:33 msgid "book publish record" msgstr "zapis publikacji książki" @@ -177,8 +182,7 @@ msgstr "zapis publikacji książki" msgid "book publish records" msgstr "zapisy publikacji książek" -#: models/publish_log.py:34 -#: models/publish_log.py:48 +#: models/publish_log.py:34 models/publish_log.py:48 msgid "change" msgstr "zmiana" @@ -198,7 +202,7 @@ msgstr "zapis publikacji obrazu" msgid "image publish records" msgstr "zapisy publikacji obrazów" -#: templates/catalogue/activity.html:10 +#: templates/catalogue/activity.html:6 templates/catalogue/activity.html:12 #: templatetags/catalogue.py:29 msgid "Activity" msgstr "Aktywność" @@ -207,81 +211,89 @@ msgstr "Aktywność" msgid "Platforma Redakcyjna" msgstr "Platforma Redakcyjna" -#: templates/catalogue/book_append_to.html:9 +#: templates/catalogue/book_append_to.html:4 +#: templates/catalogue/book_append_to.html:11 msgid "Append book" msgstr "Dołącz książkę" -#: templates/catalogue/book_detail.html:14 -#: templates/catalogue/book_edit.html:9 -#: templates/catalogue/chunk_edit.html:13 -#: templates/catalogue/image_detail.html:14 +#: templates/catalogue/book_detail.html:18 +#: templates/catalogue/book_edit.html:13 +#: templates/catalogue/chunk_edit.html:16 +#: templates/catalogue/image_detail.html:18 msgid "Save" msgstr "Zapisz" -#: templates/catalogue/book_detail.html:21 +#: templates/catalogue/book_detail.html:25 +msgid "Edit gallery" +msgstr "Edytuj galerię" + +#: templates/catalogue/book_detail.html:28 msgid "Append to other book" msgstr "Dołącz do innej książki" -#: templates/catalogue/book_detail.html:27 +#: templates/catalogue/book_detail.html:34 msgid "Chunks" msgstr "Części" -#: templates/catalogue/book_detail.html:42 -#: templates/catalogue/image_detail.html:32 -#: templatetags/wall.py:78 +#: templates/catalogue/book_detail.html:49 +#: templates/catalogue/image_detail.html:36 templatetags/wall.py:78 msgid "Publication" msgstr "Publikacja" -#: templates/catalogue/book_detail.html:44 -#: templates/catalogue/image_detail.html:34 +#: templates/catalogue/book_detail.html:58 +#: templates/catalogue/image_detail.html:38 msgid "Last published" msgstr "Ostatnio opublikowano" -#: templates/catalogue/book_detail.html:54 +#: templates/catalogue/book_detail.html:68 msgid "Full XML" msgstr "Pełny XML" -#: templates/catalogue/book_detail.html:55 +#: templates/catalogue/book_detail.html:69 msgid "HTML version" msgstr "Wersja HTML" -#: templates/catalogue/book_detail.html:56 +#: templates/catalogue/book_detail.html:70 msgid "TXT version" msgstr "Wersja TXT" -#: templates/catalogue/book_detail.html:57 +#: templates/catalogue/book_detail.html:71 msgid "PDF version" msgstr "Wersja PDF" -#: templates/catalogue/book_detail.html:58 +#: templates/catalogue/book_detail.html:72 msgid "EPUB version" msgstr "Wersja EPUB" -#: templates/catalogue/book_detail.html:71 -#: templates/catalogue/image_detail.html:53 +#: templates/catalogue/book_detail.html:85 +#: templates/catalogue/image_detail.html:57 msgid "Publish" msgstr "Opublikuj" -#: templates/catalogue/book_detail.html:75 -#: templates/catalogue/image_detail.html:57 +#: templates/catalogue/book_detail.html:89 +#: templates/catalogue/image_detail.html:61 msgid "Log in to publish." msgstr "Zaloguj się, aby opublikować." -#: templates/catalogue/book_detail.html:78 -#: templates/catalogue/image_detail.html:60 +#: templates/catalogue/book_detail.html:92 +#: templates/catalogue/image_detail.html:64 msgid "This book can't be published yet, because:" msgstr "Ta książka nie może jeszcze zostać opublikowana. Powód:" -#: templates/catalogue/book_detail.html:87 -#: templates/catalogue/image_detail.html:68 +#: templates/catalogue/book_detail.html:102 +#: templates/catalogue/image_detail.html:72 msgid "Comments" msgstr "Komentarze" -#: templates/catalogue/book_html.html:13 +#: templates/catalogue/book_edit.html:5 +msgid "Edit book" +msgstr "Edytuj książkę" + +#: templates/catalogue/book_html.html:13 templates/catalogue/book_text.html:15 msgid "Table of contents" msgstr "Spis treści" -#: templates/catalogue/book_html.html:14 +#: templates/catalogue/book_html.html:14 templates/catalogue/book_text.html:17 msgid "Edit. note" msgstr "Nota red." @@ -289,115 +301,137 @@ msgstr "Nota red." msgid "Infobox" msgstr "Informacje" -#: templates/catalogue/chunk_add.html:5 -#: templates/catalogue/chunk_edit.html:19 +#: templates/catalogue/book_text.html:7 +msgid "Redakcja" +msgstr "" + +#: templates/catalogue/chunk_add.html:5 templates/catalogue/chunk_add.html:9 +#: templates/catalogue/chunk_edit.html:22 msgid "Split chunk" msgstr "Podziel część" -#: templates/catalogue/chunk_add.html:10 +#: templates/catalogue/chunk_add.html:14 msgid "Insert empty chunk after" msgstr "Wstaw pustą część po" -#: templates/catalogue/chunk_add.html:13 +#: templates/catalogue/chunk_add.html:17 msgid "Add chunk" msgstr "Dodaj część" -#: templates/catalogue/chunk_edit.html:6 -#: templates/catalogue/book_list/book.html:7 -#: templates/catalogue/book_list/chunk.html:5 +#: templates/catalogue/chunk_edit.html:5 templates/catalogue/chunk_edit.html:9 +#: templates/catalogue/book_list/book.html:8 +#: templates/catalogue/book_list/chunk.html:6 msgid "Chunk settings" msgstr "Ustawienia części" -#: templates/catalogue/chunk_edit.html:11 +#: templates/catalogue/chunk_edit.html:14 msgid "Book" msgstr "Książka" #: templates/catalogue/document_create_missing.html:5 +#: templates/catalogue/document_create_missing.html:9 msgid "Create a new book" msgstr "Utwórz nową książkę" -#: templates/catalogue/document_create_missing.html:11 +#: templates/catalogue/document_create_missing.html:15 msgid "Create book" msgstr "Utwórz książkę" -#: templates/catalogue/document_upload.html:8 -msgid "Bulk documents upload" +#: templates/catalogue/document_list.html:7 +msgid "Book list" +msgstr "Lista książek" + +#: templates/catalogue/document_upload.html:5 +msgid "Bulk document upload" msgstr "Hurtowe dodawanie dokumentów" #: templates/catalogue/document_upload.html:11 -msgid "Please submit a ZIP with UTF-8 encoded XML files. Files not ending with .xml will be ignored." -msgstr "Proszę wskazać archiwum ZIP z plikami XML w kodowaniu UTF-8. Pliki nie kończące się na .xml zostaną zignorowane." +msgid "Bulk documents upload" +msgstr "Hurtowe dodawanie dokumentów" + +#: templates/catalogue/document_upload.html:14 +msgid "" +"Please submit a ZIP with UTF-8 encoded XML files. Files not ending with " +".xml will be ignored." +msgstr "" +"Proszę wskazać archiwum ZIP z plikami XML w kodowaniu UTF-8. Pliki nie " +"kończące się na .xml zostaną zignorowane." -#: templates/catalogue/document_upload.html:17 -#: templates/catalogue/upload_pdf.html:13 -#: templatetags/catalogue.py:36 +#: templates/catalogue/document_upload.html:20 +#: templates/catalogue/upload_pdf.html:16 templatetags/catalogue.py:36 msgid "Upload" msgstr "Załaduj" -#: templates/catalogue/document_upload.html:24 -msgid "There have been some errors. No files have been added to the repository." +#: templates/catalogue/document_upload.html:27 +msgid "" +"There have been some errors. No files have been added to the repository." msgstr "Wystąpiły błędy. Żadne pliki nie zostały dodane do repozytorium." -#: templates/catalogue/document_upload.html:25 +#: templates/catalogue/document_upload.html:28 msgid "Offending files" msgstr "Błędne pliki" -#: templates/catalogue/document_upload.html:33 +#: templates/catalogue/document_upload.html:36 msgid "Correct files" msgstr "Poprawne pliki" -#: templates/catalogue/document_upload.html:44 +#: templates/catalogue/document_upload.html:47 msgid "Files have been successfully uploaded to the repository." msgstr "Pliki zostały dodane do repozytorium." -#: templates/catalogue/document_upload.html:45 +#: templates/catalogue/document_upload.html:48 msgid "Uploaded files" msgstr "Dodane pliki" -#: templates/catalogue/document_upload.html:55 +#: templates/catalogue/document_upload.html:58 msgid "Skipped files" msgstr "Pominięte pliki" -#: templates/catalogue/document_upload.html:56 +#: templates/catalogue/document_upload.html:59 msgid "Files skipped due to no .xml extension" msgstr "Pliki pominięte z powodu braku rozszerzenia .xml." -#: templates/catalogue/image_detail.html:22 +#: templates/catalogue/image_detail.html:26 msgid "Editor" msgstr "Edytor" -#: templates/catalogue/image_detail.html:24 +#: templates/catalogue/image_detail.html:28 msgid "Proceed to the editor." msgstr "Przejdź do edytora." +#: templates/catalogue/image_list.html:7 +msgid "Image list" +msgstr "Lista obrazów" + #: templates/catalogue/image_short.html:4 msgid "Image settings" msgstr "Ustawienia obrazu" #: templates/catalogue/image_table.html:19 -#: templates/catalogue/book_list/book_list.html:24 +#: templates/catalogue/book_list/book_list.html:27 msgid "Search in book titles" msgstr "Szukaj w tytułach książek" #: templates/catalogue/image_table.html:24 -#: templates/catalogue/book_list/book_list.html:29 +#: templates/catalogue/book_list/book_list.html:32 msgid "stage" msgstr "etap" #: templates/catalogue/image_table.html:26 #: templates/catalogue/image_table.html:37 -#: templates/catalogue/book_list/book_list.html:31 -#: templates/catalogue/book_list/book_list.html:42 +#: templates/catalogue/book_list/book_list.html:34 +#: templates/catalogue/book_list/book_list.html:45 +#: templates/catalogue/book_list/book_list.html:66 msgid "none" msgstr "brak" #: templates/catalogue/image_table.html:35 -#: templates/catalogue/book_list/book_list.html:40 +#: templates/catalogue/book_list/book_list.html:43 msgid "editor" msgstr "redaktor" #: templates/catalogue/image_table.html:46 -#: templates/catalogue/book_list/book_list.html:51 +#: templates/catalogue/book_list/book_list.html:56 msgid "status" msgstr "status" @@ -413,42 +447,46 @@ msgstr[2] "%(c)s obrazów" msgid "No images found." msgstr "Nie znaleziono obrazów." -#: templates/catalogue/my_page.html:13 +#: templates/catalogue/my_page.html:15 templatetags/catalogue.py:27 +msgid "My page" +msgstr "Moja strona" + +#: templates/catalogue/my_page.html:24 msgid "Your last edited documents" msgstr "Twoje ostatnie edycje" -#: templates/catalogue/my_page.html:22 -#: templates/catalogue/user_page.html:13 +#: templates/catalogue/my_page.html:33 templates/catalogue/user_page.html:16 msgid "Recent activity for" msgstr "Ostatnia aktywność dla:" -#: templates/catalogue/upload_pdf.html:8 +#: templates/catalogue/upload_pdf.html:5 +#: templates/catalogue/upload_pdf.html:11 msgid "PDF file upload" -msgstr "" +msgstr "Ładowanie pliku PDF" -#: templates/catalogue/user_list.html:7 +#: templates/catalogue/user_list.html:6 templates/catalogue/user_list.html:11 #: templatetags/catalogue.py:32 msgid "Users" msgstr "Użytkownicy" -#: templates/catalogue/wall.html:28 +#: templates/catalogue/wall.html:29 msgid "not logged in" msgstr "nie zalogowany" -#: templates/catalogue/wall.html:33 +#: templates/catalogue/wall.html:34 msgid "No activity recorded." msgstr "Nie zanotowano aktywności." -#: templates/catalogue/book_list/book.html:6 -#: templates/catalogue/book_list/book.html:25 +#: templates/catalogue/book_list/book.html:7 +#: templates/catalogue/book_list/book.html:28 msgid "Book settings" msgstr "Ustawienia książki" -#: templates/catalogue/book_list/book_list.html:19 +#: templates/catalogue/book_list/book_list.html:22 msgid "Show hidden books" msgstr "Pokaż ukryte książki" -#: templates/catalogue/book_list/book_list.html:75 +#: templates/catalogue/book_list/book_list.html:90 #, python-format msgid "%(c)s book" msgid_plural "%(c)s books" @@ -456,39 +494,54 @@ msgstr[0] "%(c)s książka" msgstr[1] "%(c)s książki" msgstr[2] "%(c)s książek" -#: templates/catalogue/book_list/book_list.html:80 +#: templates/catalogue/book_list/book_list.html:95 msgid "No books found." msgstr "Nie znaleziono książek." -#: templatetags/book_list.py:84 -#: templatetags/book_list.py:145 +#: templates/catalogue/book_list/book_list.html:101 +msgid "Set stage" +msgstr "Ustaw etap" + +#: templates/catalogue/book_list/book_list.html:102 +msgid "Set user" +msgstr "Przypisz redaktora" + +#: templates/catalogue/book_list/book_list.html:104 +msgid "Project" +msgstr "Projekt" + +#: templates/catalogue/book_list/book_list.html:105 +msgid "Mark publishable" +msgstr "Oznacz do publikacji" + +#: templates/catalogue/book_list/book_list.html:106 +msgid "Mark not publishable" +msgstr "Odznacz do publikacji" + +#: templates/catalogue/book_list/book_list.html:107 +msgid "Other user" +msgstr "Inny użytkownik" + +#: templatetags/book_list.py:84 templatetags/book_list.py:152 msgid "publishable" msgstr "do publikacji" -#: templatetags/book_list.py:85 -#: templatetags/book_list.py:146 +#: templatetags/book_list.py:85 templatetags/book_list.py:153 msgid "changed" msgstr "zmienione" -#: templatetags/book_list.py:86 -#: templatetags/book_list.py:147 +#: templatetags/book_list.py:86 templatetags/book_list.py:154 msgid "published" msgstr "opublikowane" -#: templatetags/book_list.py:87 -#: templatetags/book_list.py:148 +#: templatetags/book_list.py:87 templatetags/book_list.py:155 msgid "unpublished" msgstr "nie opublikowane" -#: templatetags/book_list.py:88 -#: templatetags/book_list.py:149 +#: templatetags/book_list.py:88 templatetags/book_list.py:156 msgid "empty" msgstr "puste" -#: templatetags/catalogue.py:27 -msgid "My page" -msgstr "Moja strona" - #: templatetags/catalogue.py:30 msgid "All" msgstr "Wszystkie" @@ -501,6 +554,10 @@ msgstr "Obrazy" msgid "Add" msgstr "Dodaj" +#: templatetags/catalogue.py:38 +msgid "Covers" +msgstr "Okładki" + #: templatetags/wall.py:49 msgid "Related edit" msgstr "Powiązana zmiana" @@ -570,9 +627,6 @@ msgstr "Komentarz" #~ msgid "Describe the reason for reverting." #~ msgstr "Opisz powód przywrócenia." -#~ msgid "name" -#~ msgstr "nazwa" - #~ msgid "theme" #~ msgstr "motyw" @@ -687,9 +741,6 @@ msgstr "Komentarz" #~ msgid "Last edited by" #~ msgstr "Ostatnio edytowane przez" -#~ msgid "Link to gallery" -#~ msgstr "Link do galerii" - #~ msgid "Summary" #~ msgstr "Podsumowanie" diff --git a/apps/catalogue/management/__init__.py b/apps/catalogue/management/__init__.py old mode 100755 new mode 100644 index e69de29b..f7731d72 --- a/apps/catalogue/management/__init__.py +++ b/apps/catalogue/management/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from collections import defaultdict +from django.db import transaction +from lxml import etree + + +class XmlUpdater(object): + """A base class for massive XML updates. + + In a subclass, override `fix_tree` and/or use `fixes_field` decorator. + Attributes: + * commit_desc: commits description + * retain_publishable: set publishable if head is (default: True) + * only_first_chunk: process only first chunks of books (default: False) + """ + commit_desc = "auto-update" + retain_publishable = True + only_first_chunk = False + + _element_fixers = defaultdict(list) + + def __init__(self): + self.counters = defaultdict(lambda: 0) + + @classmethod + def fixes_elements(cls, xpath): + """Decorator, registering a function as a fixer for given field type. + + Any decorated function will be called like + f(element, change=..., verbose=...) + providing changeset as context. + + :param xpath: element lookup, e.g. ".//{namespace-uri}tag-name" + :returns: True if anything changed + """ + def wrapper(fixer): + cls._element_fixers[xpath].append(fixer) + return fixer + return wrapper + + def fix_tree(self, tree, verbose): + """Override to provide general tree-fixing mechanism. + + :param tree: the parsed XML tree + :param verbose: verbosity level + :returns: True if anythig changed + """ + return False + + def fix_chunk(self, chunk, user, verbose=0, dry_run=False): + """Runs the update for a single chunk.""" + if verbose >= 2: + print chunk.get_absolute_url() + old_head = chunk.head + src = old_head.materialize() + try: + tree = etree.fromstring(src) + except: + if verbose: + print "%s: invalid XML" % chunk.get_absolute_url() + self.counters['Bad XML'] += 1 + return + + dirty = False + # Call the general fixing function. + if self.fix_tree(tree, verbose=verbose): + dirty = True + # Call the registered fixers. + for xpath, fixers in self._element_fixers.items(): + for elem in tree.findall(xpath): + for fixer in fixers: + if fixer(elem, change=old_head, verbose=verbose): + dirty = True + + if not dirty: + self.counters['Clean'] += 1 + return + + if not dry_run: + new_head = chunk.commit( + etree.tostring(tree, encoding=unicode), + author=user, + description=self.commit_desc + ) + if self.retain_publishable: + if old_head.publishable: + new_head.set_publishable(True) + if verbose >= 2: + print "done" + self.counters['Updated chunks'] += 1 + + def run(self, user, verbose=0, dry_run=False, books=None): + """Runs the actual update.""" + if books is None: + from catalogue.models import Book + books = Book.objects.all() + + # Start transaction management. + transaction.commit_unless_managed() + transaction.enter_transaction_management() + transaction.managed(True) + + for book in books: + self.counters['All books'] += 1 + chunks = book.chunk_set.all() + if self.only_first_chunk: + chunks = chunks[:1] + for chunk in chunks: + self.counters['All chunks'] += 1 + self.fix_chunk(chunk, user, verbose, dry_run) + + transaction.commit() + transaction.leave_transaction_management() + + def print_results(self): + """Prints the counters.""" + for item in sorted(self.counters.items()): + print "%s: %d" % item diff --git a/apps/catalogue/management/commands/__init__.py b/apps/catalogue/management/commands/__init__.py old mode 100755 new mode 100644 index e69de29b..e6f146f8 --- a/apps/catalogue/management/commands/__init__.py +++ b/apps/catalogue/management/commands/__init__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +import sys +from optparse import make_option +from django.contrib.auth.models import User +from django.core.management.base import BaseCommand +from catalogue.models import Book + + +class XmlUpdaterCommand(BaseCommand): + """Base class for creating massive XML-updating commands. + + In a subclass, provide an XmlUpdater class in the `updater' attribute. + """ + option_list = BaseCommand.option_list + ( + make_option('-q', '--quiet', action='store_false', dest='verbose', + default=True, help='Less output'), + make_option('-d', '--dry-run', action='store_true', dest='dry_run', + default=False, help="Don't actually touch anything"), + make_option('-u', '--username', dest='username', metavar='USER', + help='Assign commits to this user (required, preferably yourself).'), + ) + args = "[slug]..." + + def handle(self, *args, **options): + verbose = options.get('verbose') + dry_run = options.get('dry_run') + username = options.get('username') + + if username: + user = User.objects.get(username=username) + else: + print 'Please provide a username.' + sys.exit(1) + + books = Book.objects.filter(slug__in=args) if args else None + + updater = self.updater() + updater.run(user, verbose=verbose, dry_run=dry_run, books=books) + updater.print_results() diff --git a/apps/catalogue/management/commands/assign_from_redmine.py b/apps/catalogue/management/commands/assign_from_redmine.py old mode 100755 new mode 100644 diff --git a/apps/catalogue/management/commands/fix_rdf_about.py b/apps/catalogue/management/commands/fix_rdf_about.py deleted file mode 100755 index c252c208..00000000 --- a/apps/catalogue/management/commands/fix_rdf_about.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- - -from optparse import make_option - -from django.contrib.auth.models import User -from django.core.management.base import BaseCommand -from django.db import transaction - -from catalogue.models import Book - - -class Command(BaseCommand): - option_list = BaseCommand.option_list + ( - make_option('-q', '--quiet', action='store_false', dest='verbose', - default=True, help='Less output'), - make_option('-d', '--dry-run', action='store_true', dest='dry_run', - default=False, help="Don't actually touch anything"), - ) - help = 'Updates the rdf:about metadata field.' - - def handle(self, *args, **options): - from lxml import etree - - verbose = options.get('verbose') - dry_run = options.get('dry_run') - - # Start transaction management. - transaction.commit_unless_managed() - transaction.enter_transaction_management() - transaction.managed(True) - - all_books = 0 - nonxml = 0 - nordf = 0 - already = 0 - done = 0 - - for b in Book.objects.all(): - all_books += 1 - if verbose: - print "%s: " % b.title, - chunk = b[0] - old_head = chunk.head - src = old_head.materialize() - - try: - t = etree.fromstring(src) - except: - nonxml += 1 - if verbose: - print "invalid XML" - continue - desc = t.find(".//{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description") - if desc is None: - nordf += 1 - if verbose: - print "no RDF found" - continue - - correct_about = b.correct_about() - attr_name = "{http://www.w3.org/1999/02/22-rdf-syntax-ns#}about" - if desc.get(attr_name) == correct_about: - already += 1 - if verbose: - print "already correct" - continue - desc.set(attr_name, correct_about) - if not dry_run: - new_head = chunk.commit(etree.tostring(t, encoding=unicode), - author_name='platforma redakcyjna', - description='auto-update rdf:about' - ) - # retain the publishable status - if old_head.publishable: - new_head.set_publishable(True) - if verbose: - print "done" - done += 1 - - # Print results - print "All books: ", all_books - print "Invalid XML: ", nonxml - print "No RDF found: ", nordf - print "Already correct: ", already - print "Books updated: ", done - - transaction.commit() - transaction.leave_transaction_management() - diff --git a/apps/catalogue/management/commands/fixdc.py b/apps/catalogue/management/commands/fixdc.py new file mode 100644 index 00000000..3f997d0c --- /dev/null +++ b/apps/catalogue/management/commands/fixdc.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from librarian import RDFNS, WLURI, ValidationError +from librarian.dcparser import BookInfo +from catalogue.management import XmlUpdater +from catalogue.management.commands import XmlUpdaterCommand + + +class FixDC(XmlUpdater): + commit_desc = "auto-fixing DC" + retain_publishable = True + only_first_chunk = True + + def fix_wluri(elem, change, verbose): + try: + WLURI.strict(elem.text) + except ValidationError: + correct_field = unicode(WLURI.from_slug( + WLURI(elem.text.strip()).slug)) + try: + WLURI.strict(correct_field) + except ValidationError: + # Can't make a valid WLURI out of it, leave as is. + return False + if verbose: + print "Changing %s from %s to %s" % ( + elem.tag, elem.text, correct_field + ) + elem.text = correct_field + return True + for field in BookInfo.FIELDS: + if field.validator == WLURI: + XmlUpdater.fixes_elements('.//' + field.uri)(fix_wluri) + + @XmlUpdater.fixes_elements(".//" + RDFNS("Description")) + def fix_rdfabout(elem, change, verbose): + correct_about = change.tree.book.correct_about() + attr_name = RDFNS("about") + current_about = elem.get(attr_name) + if current_about != correct_about: + if verbose: + print "Changing rdf:about from %s to %s" % ( + current_about, correct_about + ) + elem.set(attr_name, correct_about) + return True + + +class Command(XmlUpdaterCommand): + updater = FixDC + help = 'Fixes obvious errors in DC: rdf:about and WLURI format.' diff --git a/apps/catalogue/management/commands/import_wl.py b/apps/catalogue/management/commands/import_wl.py old mode 100755 new mode 100644 diff --git a/apps/catalogue/management/commands/merge_books.py b/apps/catalogue/management/commands/merge_books.py old mode 100755 new mode 100644 diff --git a/apps/catalogue/migrations/0003_from_hg.py b/apps/catalogue/migrations/0003_from_hg.py index 1816af90..d8360676 100644 --- a/apps/catalogue/migrations/0003_from_hg.py +++ b/apps/catalogue/migrations/0003_from_hg.py @@ -7,7 +7,6 @@ import re import urllib from django.db import models -from mercurial import hg, ui from south.db import db from south.v2 import DataMigration @@ -160,6 +159,8 @@ class Migration(DataMigration): except: print 'repository not configured, skipping' else: + from mercurial import hg, ui + print 'migrate from', hg_path repo = hg.repository(ui.ui(), hg_path) tip = repo['tip'] diff --git a/apps/catalogue/migrations/0009_auto__add_field_book__on_track.py b/apps/catalogue/migrations/0009_auto__add_field_book__on_track.py new file mode 100644 index 00000000..f0509c42 --- /dev/null +++ b/apps/catalogue/migrations/0009_auto__add_field_book__on_track.py @@ -0,0 +1,128 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding field 'Book._on_track' + db.add_column('catalogue_book', '_on_track', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True), keep_default=False) + + + def backwards(self, orm): + + # Deleting field 'Book._on_track' + db.delete_column('catalogue_book', '_on_track') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'catalogue.book': { + 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'}, + '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) + }, + 'catalogue.bookpublishrecord': { + 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'}, + 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'catalogue.chunk': { + 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'}, + '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': "orm['auth.User']"}), + 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), + 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'number': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), + 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.chunkchange': { + 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), + 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}), + 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"}) + }, + 'catalogue.chunkpublishrecord': { + 'Meta': {'object_name': 'ChunkPublishRecord'}, + 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}), + 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'catalogue.chunktag': { + 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'ordering': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['catalogue'] diff --git a/apps/catalogue/migrations/0009_auto__add_imagechange__add_unique_imagechange_tree_revision__add_image.py b/apps/catalogue/migrations/0009_auto__add_imagechange__add_unique_imagechange_tree_revision__add_image.py deleted file mode 100644 index 4de5212e..00000000 --- a/apps/catalogue/migrations/0009_auto__add_imagechange__add_unique_imagechange_tree_revision__add_image.py +++ /dev/null @@ -1,251 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'ImageChange' - db.create_table('catalogue_imagechange', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), - ('author_name', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), - ('author_email', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), - ('revision', self.gf('django.db.models.fields.IntegerField')(db_index=True)), - ('parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='children', null=True, blank=True, to=orm['catalogue.ImageChange'])), - ('merge_parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='merge_children', null=True, blank=True, to=orm['catalogue.ImageChange'])), - ('description', self.gf('django.db.models.fields.TextField')(default='', blank=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)), - ('publishable', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('tree', self.gf('django.db.models.fields.related.ForeignKey')(related_name='change_set', to=orm['catalogue.Image'])), - ('data', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - )) - db.send_create_signal('catalogue', ['ImageChange']) - - # Adding M2M table for field tags on 'ImageChange' - db.create_table('catalogue_imagechange_tags', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('imagechange', models.ForeignKey(orm['catalogue.imagechange'], null=False)), - ('imagetag', models.ForeignKey(orm['catalogue.imagetag'], null=False)) - )) - db.create_unique('catalogue_imagechange_tags', ['imagechange_id', 'imagetag_id']) - - # Adding unique constraint on 'ImageChange', fields ['tree', 'revision'] - db.create_unique('catalogue_imagechange', ['tree_id', 'revision']) - - # Adding model 'ImagePublishRecord' - db.create_table('catalogue_imagepublishrecord', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.Image'])), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('change', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.ImageChange'])), - )) - db.send_create_signal('catalogue', ['ImagePublishRecord']) - - # Adding model 'ImageTag' - db.create_table('catalogue_imagetag', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('slug', self.gf('django.db.models.fields.SlugField')(db_index=True, max_length=64, unique=True, null=True, blank=True)), - ('ordering', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('catalogue', ['ImageTag']) - - # Adding model 'Image' - db.create_table('catalogue_image', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), - ('image', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)), - ('public', self.gf('django.db.models.fields.BooleanField')(default=True, db_index=True)), - ('_short_html', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('_new_publishable', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('_published', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('_changed', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('stage', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.ImageTag'], null=True, blank=True)), - ('head', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['catalogue.ImageChange'], null=True, blank=True)), - ('creator', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created_image', null=True, to=orm['auth.User'])), - )) - db.send_create_signal('catalogue', ['Image']) - - - def backwards(self, orm): - - # Removing unique constraint on 'ImageChange', fields ['tree', 'revision'] - db.delete_unique('catalogue_imagechange', ['tree_id', 'revision']) - - # Deleting model 'ImageChange' - db.delete_table('catalogue_imagechange') - - # Removing M2M table for field tags on 'ImageChange' - db.delete_table('catalogue_imagechange_tags') - - # Deleting model 'ImagePublishRecord' - db.delete_table('catalogue_imagepublishrecord') - - # Deleting model 'ImageTag' - db.delete_table('catalogue_imagetag') - - # Deleting model 'Image' - db.delete_table('catalogue_image') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'catalogue.book': { - 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'}, - '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), - 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'catalogue.bookpublishrecord': { - 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'}, - 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'catalogue.chunk': { - 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'}, - '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': "orm['auth.User']"}), - 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), - 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'number': ('django.db.models.fields.IntegerField', [], {}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) - }, - 'catalogue.chunkchange': { - 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), - 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), - 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}), - 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"}) - }, - 'catalogue.chunkpublishrecord': { - 'Meta': {'object_name': 'ChunkPublishRecord'}, - 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}), - 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'catalogue.chunktag': { - 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'ordering': ('django.db.models.fields.IntegerField', [], {}), - 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'catalogue.image': { - 'Meta': {'ordering': "['title']", 'object_name': 'Image'}, - '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_image'", 'null': 'True', 'to': "orm['auth.User']"}), - 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ImageChange']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ImageTag']", 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) - }, - 'catalogue.imagechange': { - 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ImageChange'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), - 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}), - 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ImageTag']"}), - 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Image']"}) - }, - 'catalogue.imagepublishrecord': { - 'Meta': {'ordering': "['-timestamp']", 'object_name': 'ImagePublishRecord'}, - 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ImageChange']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Image']"}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'catalogue.imagetag': { - 'Meta': {'ordering': "['ordering']", 'object_name': 'ImageTag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'ordering': ('django.db.models.fields.IntegerField', [], {}), - 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['catalogue'] diff --git a/apps/catalogue/migrations/0010_auto__add_field_book_dc_cover_image.py b/apps/catalogue/migrations/0010_auto__add_field_book_dc_cover_image.py new file mode 100644 index 00000000..aebbed95 --- /dev/null +++ b/apps/catalogue/migrations/0010_auto__add_field_book_dc_cover_image.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + depends_on = ( + ("cover", "0001_initial"), + ) + + def forwards(self, orm): + # Adding field 'Book.dc_cover_image' + db.add_column('catalogue_book', 'dc_cover_image', + self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cover.Image'], null=True, on_delete=models.SET_NULL, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'Book.dc_cover_image' + db.delete_column('catalogue_book', 'dc_cover_image_id') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'catalogue.book': { + 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'}, + '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) + }, + 'catalogue.bookpublishrecord': { + 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'}, + 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'catalogue.chunk': { + 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'}, + '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': "orm['auth.User']"}), + 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), + 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'number': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), + 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.chunkchange': { + 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), + 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}), + 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"}) + }, + 'catalogue.chunkpublishrecord': { + 'Meta': {'object_name': 'ChunkPublishRecord'}, + 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}), + 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'catalogue.chunktag': { + 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'ordering': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['catalogue'] \ No newline at end of file diff --git a/apps/catalogue/migrations/0011_auto__add_project__add_field_book_project.py b/apps/catalogue/migrations/0011_auto__add_project__add_field_book_project.py new file mode 100644 index 00000000..6f30cb4f --- /dev/null +++ b/apps/catalogue/migrations/0011_auto__add_project__add_field_book_project.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Project' + db.create_table(u'catalogue_project', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), + ('notes', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + )) + db.send_create_signal('catalogue', ['Project']) + + # Adding field 'Book.project' + db.add_column(u'catalogue_book', 'project', + self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Project'], null=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting model 'Project' + db.delete_table(u'catalogue_project') + + # Deleting field 'Book.project' + db.delete_column(u'catalogue_book', 'project_id') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'catalogue.book': { + 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'}, + '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) + }, + 'catalogue.bookpublishrecord': { + 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'}, + 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + 'catalogue.chunk': { + 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'}, + '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), + 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'number': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), + 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.chunkchange': { + 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), + 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}), + 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"}) + }, + 'catalogue.chunkpublishrecord': { + 'Meta': {'object_name': 'ChunkPublishRecord'}, + 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}), + 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'catalogue.chunktag': { + 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'ordering': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.project': { + 'Meta': {'ordering': "['name']", 'object_name': 'Project'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['catalogue'] \ No newline at end of file diff --git a/apps/catalogue/migrations/0012_auto__add_imagepublishrecord__add_imagechange__add_unique_imagechange_.py b/apps/catalogue/migrations/0012_auto__add_imagepublishrecord__add_imagechange__add_unique_imagechange_.py new file mode 100644 index 00000000..599e103e --- /dev/null +++ b/apps/catalogue/migrations/0012_auto__add_imagepublishrecord__add_imagechange__add_unique_imagechange_.py @@ -0,0 +1,270 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'ImagePublishRecord' + db.create_table(u'catalogue_imagepublishrecord', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('image', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.Image'])), + ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), + ('change', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.ImageChange'])), + )) + db.send_create_signal('catalogue', ['ImagePublishRecord']) + + # Adding model 'ImageChange' + db.create_table(u'catalogue_imagechange', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), + ('author_name', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), + ('author_email', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), + ('revision', self.gf('django.db.models.fields.IntegerField')(db_index=True)), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='children', null=True, blank=True, to=orm['catalogue.ImageChange'])), + ('merge_parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='merge_children', null=True, blank=True, to=orm['catalogue.ImageChange'])), + ('description', self.gf('django.db.models.fields.TextField')(default='', blank=True)), + ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)), + ('publishable', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('tree', self.gf('django.db.models.fields.related.ForeignKey')(related_name='change_set', to=orm['catalogue.Image'])), + ('data', self.gf('django.db.models.fields.files.FileField')(max_length=100)), + )) + db.send_create_signal('catalogue', ['ImageChange']) + + # Adding M2M table for field tags on 'ImageChange' + db.create_table(u'catalogue_imagechange_tags', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('imagechange', models.ForeignKey(orm['catalogue.imagechange'], null=False)), + ('imagetag', models.ForeignKey(orm['catalogue.imagetag'], null=False)) + )) + db.create_unique(u'catalogue_imagechange_tags', ['imagechange_id', 'imagetag_id']) + + # Adding unique constraint on 'ImageChange', fields ['tree', 'revision'] + db.create_unique(u'catalogue_imagechange', ['tree_id', 'revision']) + + # Adding model 'ImageTag' + db.create_table(u'catalogue_imagetag', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), + ('slug', self.gf('django.db.models.fields.SlugField')(max_length=64, unique=True, null=True, blank=True)), + ('ordering', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('catalogue', ['ImageTag']) + + # Adding model 'Image' + db.create_table(u'catalogue_image', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), + ('image', self.gf('django.db.models.fields.files.FileField')(max_length=100)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), + ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)), + ('public', self.gf('django.db.models.fields.BooleanField')(default=True, db_index=True)), + ('_short_html', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('_new_publishable', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('_published', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('_changed', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('stage', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.ImageTag'], null=True, blank=True)), + ('head', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['catalogue.ImageChange'], null=True, blank=True)), + ('creator', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created_image', null=True, to=orm['auth.User'])), + )) + db.send_create_signal('catalogue', ['Image']) + + + def backwards(self, orm): + # Removing unique constraint on 'ImageChange', fields ['tree', 'revision'] + db.delete_unique(u'catalogue_imagechange', ['tree_id', 'revision']) + + # Deleting model 'ImagePublishRecord' + db.delete_table(u'catalogue_imagepublishrecord') + + # Deleting model 'ImageChange' + db.delete_table(u'catalogue_imagechange') + + # Removing M2M table for field tags on 'ImageChange' + db.delete_table('catalogue_imagechange_tags') + + # Deleting model 'ImageTag' + db.delete_table(u'catalogue_imagetag') + + # Deleting model 'Image' + db.delete_table(u'catalogue_image') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'catalogue.book': { + 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'}, + '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True', 'blank': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) + }, + 'catalogue.bookpublishrecord': { + 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'}, + 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + 'catalogue.chunk': { + 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'}, + '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), + 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'number': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), + 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.chunkchange': { + 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), + 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}), + 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}), + 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"}) + }, + 'catalogue.chunkpublishrecord': { + 'Meta': {'object_name': 'ChunkPublishRecord'}, + 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}), + 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'catalogue.chunktag': { + 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'ordering': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.image': { + 'Meta': {'ordering': "['title']", 'object_name': 'Image'}, + '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_image'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ImageChange']", 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'image': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), + 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ImageTag']", 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.imagechange': { + 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ImageChange'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}), + 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}), + 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ImageTag']"}), + 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Image']"}) + }, + 'catalogue.imagepublishrecord': { + 'Meta': {'ordering': "['-timestamp']", 'object_name': 'ImagePublishRecord'}, + 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ImageChange']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Image']"}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + 'catalogue.imagetag': { + 'Meta': {'ordering': "['ordering']", 'object_name': 'ImageTag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'ordering': ('django.db.models.fields.IntegerField', [], {}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'catalogue.project': { + 'Meta': {'ordering': "['name']", 'object_name': 'Project'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True', 'blank': 'True'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['catalogue'] \ No newline at end of file diff --git a/apps/catalogue/models/__init__.py b/apps/catalogue/models/__init__.py index 08cedd00..d0015c79 100755 --- a/apps/catalogue/models/__init__.py +++ b/apps/catalogue/models/__init__.py @@ -3,6 +3,7 @@ # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # +from catalogue.models.project import Project from catalogue.models.chunk import Chunk from catalogue.models.image import Image from catalogue.models.publish_log import (BookPublishRecord, diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 90327b26..7c2bccc4 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -7,13 +7,20 @@ from django.contrib.sites.models import Site from django.db import models, transaction from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ +from django.conf import settings from slughifi import slughifi -from catalogue.helpers import cached_in_field -from catalogue.models import BookPublishRecord, ChunkPublishRecord + +import apiclient +from catalogue.helpers import cached_in_field, GalleryMerger +from catalogue.models import BookPublishRecord, ChunkPublishRecord, Project +from catalogue.signals import post_publish from catalogue.tasks import refresh_instance, book_content_updated from catalogue.xml_tools import compile_text, split_xml - +from cover.models import Image +import os +import shutil +import re class Book(models.Model): """ A document edited on the wiki """ @@ -22,6 +29,7 @@ class Book(models.Model): slug = models.SlugField(_('slug'), max_length=128, unique=True, db_index=True) public = models.BooleanField(_('public'), default=True, db_index=True) gallery = models.CharField(_('scan gallery name'), max_length=255, blank=True) + project = models.ForeignKey(Project, null=True, blank=True) #wl_slug = models.CharField(_('title'), max_length=255, null=True, db_index=True, editable=False) parent = models.ForeignKey('self', null=True, blank=True, verbose_name=_('parent'), related_name="children", editable=False) @@ -32,6 +40,9 @@ class Book(models.Model): _single = models.NullBooleanField(editable=False, db_index=True) _new_publishable = models.NullBooleanField(editable=False) _published = models.NullBooleanField(editable=False) + _on_track = models.IntegerField(null=True, blank=True, db_index=True, editable=False) + dc_cover_image = models.ForeignKey(Image, blank=True, null=True, + db_index=True, on_delete=models.SET_NULL, editable=False) dc_slug = models.CharField(max_length=128, null=True, blank=True, editable=False, db_index=True) @@ -188,8 +199,20 @@ class Book(models.Model): chunk.save() number += 1 assert not other.chunk_set.exists() + + gm = GalleryMerger(self.gallery, other.gallery) + self.gallery = gm.merge() + + # and move the gallery starts + if gm.was_merged: + for chunk in self[len(self) - len_other:]: + old_start = chunk.gallery_start or 1 + chunk.gallery_start = old_start + gm.dest_size - gm.num_deleted + chunk.save() + other.delete() + @transaction.commit_on_success def prepend_history(self, other): """Prepend history from all the other book's chunks to own.""" @@ -206,6 +229,18 @@ class Book(models.Model): assert not other.chunk_set.exists() other.delete() + def split(self): + """Splits all the chunks into separate books.""" + self.title + for chunk in self: + book = Book.objects.create(title=chunk.title, slug=chunk.slug, + public=self.public, gallery=self.gallery) + book[0].delete() + chunk.book = book + chunk.number = 1 + chunk.save() + assert not self.chunk_set.exists() + self.delete() # State & cache # ============= @@ -222,23 +257,29 @@ class Book(models.Model): changes = self.get_current_changes(publishable=True) except self.NoTextError: raise AssertionError(_('Not all chunks have publishable revisions.')) - book_xml = self.materialize(changes=changes) - from librarian.dcparser import BookInfo from librarian import NoDublinCore, ParseError, ValidationError try: - bi = BookInfo.from_string(book_xml.encode('utf-8')) + bi = self.wldocument(changes=changes, strict=True).book_info except ParseError, e: - raise AssertionError(_('Invalid XML') + ': ' + str(e)) + raise AssertionError(_('Invalid XML') + ': ' + unicode(e)) except NoDublinCore: raise AssertionError(_('No Dublin Core found.')) except ValidationError, e: - raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e)) + raise AssertionError(_('Invalid Dublin Core') + ': ' + unicode(e)) valid_about = self.correct_about() assert bi.about == valid_about, _("rdf:about is not") + " " + valid_about + def publishable_error(self): + try: + return self.assert_publishable() + except AssertionError, e: + return e + else: + return None + def hidden(self): return self.slug.startswith('.') @@ -265,6 +306,16 @@ class Book(models.Model): return self.publish_log.exists() published = cached_in_field('_published')(is_published) + def get_on_track(self): + if self.published: + return -1 + stages = [ch.stage.ordering if ch.stage is not None else 0 + for ch in self] + if not len(stages): + return 0 + return min(stages) + on_track = cached_in_field('_on_track')(get_on_track) + def is_single(self): return len(self) == 1 single = cached_in_field('_single')(is_single) @@ -289,11 +340,20 @@ class Book(models.Model): def refresh_dc_cache(self): update = { 'dc_slug': None, + 'dc_cover_image': None, } info = self.book_info() if info is not None: - update['dc_slug'] = info.slug + update['dc_slug'] = info.url.slug + if info.cover_source: + try: + image = Image.objects.get(pk=int(info.cover_source.rstrip('/').rsplit('/', 1)[-1])) + except: + pass + else: + if info.cover_source == image.get_full_url(): + update['dc_cover_image'] = image Book.objects.filter(pk=self.pk).update(**update) def touch(self): @@ -304,6 +364,7 @@ class Book(models.Model): "_new_publishable": self.is_new_publishable(), "_published": self.is_published(), "_single": self.is_single(), + "_on_track": self.get_on_track(), "_short_html": None, } Book.objects.filter(pk=self.pk).update(**update) @@ -344,13 +405,21 @@ class Book(models.Model): changes = self.get_current_changes(publishable) return compile_text(change.materialize() for change in changes) + def wldocument(self, publishable=True, changes=None, + parse_dublincore=True, strict=False): + from catalogue.ebook_utils import RedakcjaDocProvider + from librarian.parser import WLDocument + + return WLDocument.from_string( + self.materialize(publishable=publishable, changes=changes), + provider=RedakcjaDocProvider(publishable=publishable), + parse_dublincore=parse_dublincore, + strict=strict) + def publish(self, user): """ Publishes a book on behalf of a (local) user. """ - import apiclient - from catalogue.signals import post_publish - self.assert_publishable() changes = self.get_current_changes(publishable=True) book_xml = self.materialize(changes=changes) diff --git a/apps/catalogue/models/image.py b/apps/catalogue/models/image.py index 558f4c1f..7b5ce1f2 100755 --- a/apps/catalogue/models/image.py +++ b/apps/catalogue/models/image.py @@ -87,6 +87,14 @@ class Image(dvcs_models.Document): assert picture.picture_info.about == valid_about, \ _("rdf:about is not") + " " + valid_about + def publishable_error(self): + try: + return self.assert_publishable() + except AssertionError, e: + return e + else: + return None + def accessible(self, request): return self.public or request.user.is_authenticated() diff --git a/apps/catalogue/models/project.py b/apps/catalogue/models/project.py new file mode 100755 index 00000000..eb951021 --- /dev/null +++ b/apps/catalogue/models/project.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.db import models +from django.utils.translation import ugettext_lazy as _ + + +class Project(models.Model): + """ A project, tracked for funding purposes. """ + + name = models.CharField(_('name'), max_length=255, unique=True) + notes = models.TextField(_('notes'), blank=True, null=True) + + class Meta: + app_label = 'catalogue' + ordering = ['name'] + verbose_name = _('project') + verbose_name_plural = _('projects') + + def __unicode__(self): + return self.name diff --git a/apps/catalogue/tasks.py b/apps/catalogue/tasks.py index 547f36b4..c386c22b 100644 --- a/apps/catalogue/tasks.py +++ b/apps/catalogue/tasks.py @@ -1,9 +1,8 @@ from celery.task import task from django.utils import translation -from django.conf import settings -@task +@task(ignore_result=True) def _refresh_by_pk(cls, pk, language=None): prev_language = translation.get_language() language and translation.activate(language) @@ -16,24 +15,6 @@ def refresh_instance(instance): _refresh_by_pk.delay(type(instance), instance.pk, translation.get_language()) -@task -def _publishable_error(book, language=None): - prev_language = translation.get_language() - language and translation.activate(language) - try: - return book.assert_publishable() - except AssertionError, e: - return e - else: - return None - finally: - translation.activate(prev_language) - -def publishable_error(book): - return _publishable_error.delay(book, - translation.get_language()).wait() - - -@task +@task(ignore_result=True) def book_content_updated(book): book.refresh_dc_cache() diff --git a/apps/catalogue/templates/catalogue/activity.html b/apps/catalogue/templates/catalogue/activity.html index 125ae28e..3bb8afb2 100755 --- a/apps/catalogue/templates/catalogue/activity.html +++ b/apps/catalogue/templates/catalogue/activity.html @@ -1,6 +1,5 @@ {% extends "catalogue/base.html" %} {% load i18n %} -{% load url from future %} {% load wall %} diff --git a/apps/catalogue/templates/catalogue/base.html b/apps/catalogue/templates/catalogue/base.html index 78a8ee51..9a56d726 100644 --- a/apps/catalogue/templates/catalogue/base.html +++ b/apps/catalogue/templates/catalogue/base.html @@ -7,12 +7,13 @@ {% compressed_css 'catalogue' %} {% block title %}{% trans "Platforma Redakcyjna" %} :: {% block titleextra %}{% endblock %}{% endblock title %} + {% block add_css %}{% endblock %}
- + @@ -43,8 +44,9 @@
- + {% compressed_js 'catalogue' %} +{% block add_js %}{% endblock %} {% block extrabody %} {% endblock %} diff --git a/apps/catalogue/templates/catalogue/book_detail.html b/apps/catalogue/templates/catalogue/book_detail.html index cbc6c32a..4db8a9be 100755 --- a/apps/catalogue/templates/catalogue/book_detail.html +++ b/apps/catalogue/templates/catalogue/book_detail.html @@ -20,9 +20,12 @@ {% if editable %}{% endif %} - {% if editable %} -

{% trans "Append to other book" %}

+ {% if book.gallery %} +

{% trans "Edit gallery" %}

+ {% endif %} + +

{% trans "Append to other book" %}

{% endif %} @@ -45,6 +48,13 @@

{% trans "Publication" %}

+
+ +{% if book.dc_cover_image %} + {{ book.dc_cover_image }} +{% endif %} +
+

{% trans "Last published" %}: {% if book.last_published %} {{ book.last_published }} @@ -55,11 +65,11 @@ {% if publishable %}

- {% trans "Full XML" %}
- {% trans "HTML version" %}
- {% trans "TXT version" %}
- {% trans "PDF version" %}
- {% trans "EPUB version" %}
+ {% trans "Full XML" %}
+ {% trans "HTML version" %}
+ {% trans "TXT version" %}
+ {% trans "PDF version" %}
+ {% trans "EPUB version" %}

{% if user.is_authenticated %} @@ -69,20 +79,21 @@ mira66 (http://www.flickr.com/photos/21804434@N02/) / CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/) --> -
{% csrf_token %} + {% csrf_token %}
{% else %} - {% trans "Log in to publish." %} + {% trans "Log in to publish." %} {% endif %} {% else %}

{% trans "This book can't be published yet, because:" %}

  • {{ publishable_error }}
{% endif %} +
diff --git a/apps/catalogue/templates/catalogue/book_list/book.html b/apps/catalogue/templates/catalogue/book_list/book.html index 46d5ae12..5866e6ac 100755 --- a/apps/catalogue/templates/catalogue/book_list/book.html +++ b/apps/catalogue/templates/catalogue/book_list/book.html @@ -3,26 +3,29 @@ {% if book.single %} {% with book.0 as chunk %} - [B] - [c] + + [B] + [c] + href="{% url 'wiki_editor' book.slug %}"> {{ book.title }} {% if chunk.stage %} {{ chunk.stage }} {% else %}– {% endif %} - {% if chunk.user %}{{ chunk.user.first_name }} {{ chunk.user.last_name }}{% endif %} + {% if chunk.user %}{{ chunk.user.first_name }} {{ chunk.user.last_name }}{% endif %} {% if chunk.published %}P{% endif %} {% if book.new_publishable %}p{% endif %} {% if chunk.changed %}+{% endif %} + {{ book.project.name }} {% endwith %} {% else %} - [B] + + [B] {{ book.title }} @@ -31,5 +34,6 @@ {% if book.published %}P{% endif %} {% if book.new_publishable %}p{% endif %} + {{ book.project.name }} {% endif %} diff --git a/apps/catalogue/templates/catalogue/book_list/book_list.html b/apps/catalogue/templates/catalogue/book_list/book_list.html index f8d18d57..8e254363 100755 --- a/apps/catalogue/templates/catalogue/book_list/book_list.html +++ b/apps/catalogue/templates/catalogue/book_list/book_list.html @@ -10,10 +10,13 @@ {% endif %} + + + + + {% with cnt=books|length %} @@ -81,3 +94,22 @@ {% if not books %}

{% trans "No books found." %}

{% endif %} + + +{% csrf_token %} + + + + + + + + + + + diff --git a/apps/catalogue/templates/catalogue/book_list/chunk.html b/apps/catalogue/templates/catalogue/book_list/chunk.html index 14599428..7bdf3aa9 100755 --- a/apps/catalogue/templates/catalogue/book_list/chunk.html +++ b/apps/catalogue/templates/catalogue/book_list/chunk.html @@ -1,8 +1,9 @@ {% load i18n %} + - + @@ -12,7 +13,7 @@ – {% endif %} - + - + ","
[c][c] {{ chunk.number }}. {{ chunk.title }} {% if chunk.user %} - + {{ chunk.user.first_name }} {{ chunk.user.last_name }} {% else %} diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html new file mode 100644 index 00000000..b9cc2f0c --- /dev/null +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -0,0 +1,28 @@ +{% load i18n compressed %} + + + + + {% trans "Redakcja" %} :: {{ book.title }} + {% compressed_css 'book' %} + + {% compressed_js 'book' %} + + + + + {{ html|safe }} + + diff --git a/apps/catalogue/templates/catalogue/chunk_edit.html b/apps/catalogue/templates/catalogue/chunk_edit.html index cac192a2..20062265 100755 --- a/apps/catalogue/templates/catalogue/chunk_edit.html +++ b/apps/catalogue/templates/catalogue/chunk_edit.html @@ -1,5 +1,4 @@ {% extends "catalogue/base.html" %} -{% load url from future %} {% load i18n %} diff --git a/apps/catalogue/templates/catalogue/document_list.html b/apps/catalogue/templates/catalogue/document_list.html index 2d608dcf..f0bd50c8 100644 --- a/apps/catalogue/templates/catalogue/document_list.html +++ b/apps/catalogue/templates/catalogue/document_list.html @@ -2,10 +2,19 @@ {% load i18n %} {% load catalogue book_list %} +{% load compressed %} {% block titleextra %}{% trans "Book list" %}{% endblock %} +{% block add_js %} +{% compressed_js 'book_list' %} +{% endblock %} + +{% block add_css %} +{% compressed_css 'book_list' %} +{% endblock %} + {% block content %} {% book_list %} {% endblock content %} diff --git a/apps/catalogue/templates/catalogue/document_upload.html b/apps/catalogue/templates/catalogue/document_upload.html index 0f8929cc..009d1540 100644 --- a/apps/catalogue/templates/catalogue/document_upload.html +++ b/apps/catalogue/templates/catalogue/document_upload.html @@ -48,7 +48,7 @@

{% trans "Uploaded files" %}

    {% for filename, slug, title in ok_list %} -
  • {{ title }} ({{ filename }})
  • +
  • {{ title }} ({{ filename }})
  • {% endfor %}
{% endif %} diff --git a/apps/catalogue/templates/catalogue/image_detail.html b/apps/catalogue/templates/catalogue/image_detail.html index cd77654f..d791bfd8 100755 --- a/apps/catalogue/templates/catalogue/image_detail.html +++ b/apps/catalogue/templates/catalogue/image_detail.html @@ -25,7 +25,7 @@ @@ -51,14 +51,14 @@ mira66 (http://www.flickr.com/photos/21804434@N02/) / CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/) --> -
{% csrf_token %} + {% csrf_token %}
{% else %} - {% trans "Log in to publish." %} + {% trans "Log in to publish." %} {% endif %} {% else %}

{% trans "This book can't be published yet, because:" %}

diff --git a/apps/catalogue/templates/catalogue/image_short.html b/apps/catalogue/templates/catalogue/image_short.html index 2e2b386c..e64733b6 100755 --- a/apps/catalogue/templates/catalogue/image_short.html +++ b/apps/catalogue/templates/catalogue/image_short.html @@ -1,15 +1,15 @@ {% load i18n %}
[B][B] + href="{% url 'wiki_img_editor' image.slug %}"> {{ image.title }} {% if image.stage %} {{ image.stage }} {% else %}– {% endif %}{% if image.user %}{{ image.user.first_name }} {{ image.user.last_name }}{% endif %}{% if image.user %}{{ image.user.first_name }} {{ image.user.last_name }}{% endif %} {% if image.published %}P{% endif %} {% if image.new_publishable %}p{% endif %} diff --git a/apps/catalogue/templates/catalogue/my_page.html b/apps/catalogue/templates/catalogue/my_page.html index 07b92422..c6b61ce8 100755 --- a/apps/catalogue/templates/catalogue/my_page.html +++ b/apps/catalogue/templates/catalogue/my_page.html @@ -2,7 +2,15 @@ {% load i18n %} {% load catalogue book_list wall %} +{% load compressed %} +{% block add_js %} +{% compressed_js 'book_list' %} +{% endblock %} + +{% block add_css %} +{% compressed_css 'book_list' %} +{% endblock %} {% block titleextra %}{% trans "My page" %}{% endblock %} @@ -16,7 +24,7 @@

{% trans "Your last edited documents" %}

    {% for slugs, item in last_books %} -
  1. {{ item.title }}
    ({{ item.time|date:"H:i:s, d/m/Y" }})
  2. {% endfor %}
diff --git a/apps/catalogue/templates/catalogue/user_list.html b/apps/catalogue/templates/catalogue/user_list.html index bc8af637..26434053 100755 --- a/apps/catalogue/templates/catalogue/user_list.html +++ b/apps/catalogue/templates/catalogue/user_list.html @@ -12,7 +12,7 @@
    {% for user in users %} -
  • +
  • {{ forloop.counter }}. {{ user.first_name }} {{ user.last_name }} ({{ user.count }})
  • diff --git a/apps/catalogue/templates/catalogue/wall.html b/apps/catalogue/templates/catalogue/wall.html index c277f940..d7f6c9e6 100755 --- a/apps/catalogue/templates/catalogue/wall.html +++ b/apps/catalogue/templates/catalogue/wall.html @@ -18,7 +18,7 @@ {{ item.title }}
    {% trans "user" %}: {% if item.user %} - + {{ item.user.first_name }} {{ item.user.last_name }} <{{ item.user.email|email_link }}> {% else %} diff --git a/apps/catalogue/templatetags/book_list.py b/apps/catalogue/templatetags/book_list.py index 9344053b..1357c321 100755 --- a/apps/catalogue/templatetags/book_list.py +++ b/apps/catalogue/templatetags/book_list.py @@ -5,7 +5,7 @@ from django.db.models import Q, Count from django import template from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User -from catalogue.models import Chunk, Image +from catalogue.models import Chunk, Image, Project register = template.Library() @@ -113,6 +113,7 @@ def document_list_filter(request, **kwargs): chunks = foreign_filter(chunks, arg_or_GET('user'), 'user', User, 'username') chunks = foreign_filter(chunks, arg_or_GET('stage'), 'stage', Chunk.tag_model, 'slug') chunks = search_filter(chunks, arg_or_GET('title'), ['book__title', 'title']) + chunks = foreign_filter(chunks, arg_or_GET('project'), 'book__project', Project, 'pk') return chunks @@ -125,9 +126,14 @@ def book_list(context, user=None): new_context = {"viewed_user": user} else: filters = {} - new_context = {"users": User.objects.annotate( + new_context = { + "users": User.objects.annotate( count=Count('chunk')).filter(count__gt=0).order_by( - '-count', 'last_name', 'first_name')} + '-count', 'last_name', 'first_name'), + "other_users": User.objects.annotate( + count=Count('chunk')).filter(count=0).order_by( + 'last_name', 'first_name'), + } new_context.update({ "filters": True, @@ -135,6 +141,7 @@ def book_list(context, user=None): "books": ChunksList(document_list_filter(request, **filters)), "stages": Chunk.tag_model.objects.all(), "states": _states_options, + "projects": Project.objects.all(), }) return new_context diff --git a/apps/catalogue/templatetags/catalogue.py b/apps/catalogue/templatetags/catalogue.py index 0b57b498..07c5cf9d 100644 --- a/apps/catalogue/templatetags/catalogue.py +++ b/apps/catalogue/templatetags/catalogue.py @@ -35,6 +35,8 @@ def main_tabs(context): tabs.append(Tab('create', _('Add'), reverse("catalogue_create_missing"))) tabs.append(Tab('upload', _('Upload'), reverse("catalogue_upload"))) + tabs.append(Tab('cover', _('Covers'), reverse("cover_image_list"))) + return {"tabs": tabs, "active_tab": active} diff --git a/apps/catalogue/templatetags/common_tags.py b/apps/catalogue/templatetags/common_tags.py new file mode 100755 index 00000000..ccaf03bf --- /dev/null +++ b/apps/catalogue/templatetags/common_tags.py @@ -0,0 +1,7 @@ +from django import template +register = template.Library() + + +@register.filter +def build_absolute_uri(uri, request): + return request.build_absolute_uri(uri) diff --git a/apps/catalogue/test_utils.py b/apps/catalogue/test_utils.py new file mode 100644 index 00000000..2b085450 --- /dev/null +++ b/apps/catalogue/test_utils.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""Testing utilities.""" + +from os.path import abspath, dirname, join + + +def get_fixture(path): + f_path = join(dirname(abspath(__file__)), 'tests/files', path) + with open(f_path) as f: + return unicode(f.read(), 'utf-8') diff --git a/apps/catalogue/tests/__init__.py b/apps/catalogue/tests/__init__.py old mode 100755 new mode 100644 index b03701f8..533a6c53 --- a/apps/catalogue/tests/__init__.py +++ b/apps/catalogue/tests/__init__.py @@ -1,72 +1,9 @@ -from os.path import abspath, dirname, join -from nose.tools import * -from mock import patch -from django.test import TestCase -from django.contrib.auth.models import User -from catalogue.models import Book, BookPublishRecord - - -def get_fixture(path): - f_path = join(dirname(abspath(__file__)), 'files', path) - with open(f_path) as f: - return unicode(f.read(), 'utf-8') - - -class PublishTests(TestCase): - - def setUp(self): - self.user = User.objects.create(username='tester') - self.text1 = get_fixture('chunk1.xml') - self.book = Book.create(self.user, self.text1, slug='test-book') - - @patch('apiclient.api_call') - def test_unpublishable(self, api_call): - with self.assertRaises(AssertionError): - self.book.publish(self.user) - - @patch('apiclient.api_call') - def test_publish(self, api_call): - self.book[0].head.set_publishable(True) - self.book.publish(self.user) - api_call.assert_called_with(self.user, 'books/', {"book_xml": self.text1}) - - @patch('apiclient.api_call') - def test_publish_multiple(self, api_call): - self.book[0].head.set_publishable(True) - self.book[0].split(slug='part-2') - self.book[1].commit(get_fixture('chunk2.xml')) - self.book[1].head.set_publishable(True) - self.book.publish(self.user) - api_call.assert_called_with(self.user, 'books/', {"book_xml": get_fixture('expected.xml')}) - - -class ManipulationTests(TestCase): - - def setUp(self): - self.user = User.objects.create(username='tester') - self.book1 = Book.create(self.user, 'book 1', slug='book1') - self.book2 = Book.create(self.user, 'book 2', slug='book2') - - def test_append(self): - self.book1.append(self.book2) - self.assertEqual(Book.objects.all().count(), 1) - self.assertEqual(len(self.book1), 2) - - def test_append_to_self(self): - with self.assertRaises(AssertionError): - self.book1.append(Book.objects.get(pk=self.book1.pk)) - self.assertEqual(Book.objects.all().count(), 2) - self.assertEqual(len(self.book1), 1) - - def test_prepend_history(self): - self.book1.prepend_history(self.book2) - self.assertEqual(Book.objects.all().count(), 1) - self.assertEqual(len(self.book1), 1) - self.assertEqual(self.book1.materialize(), 'book 1') - - def test_prepend_history_to_self(self): - with self.assertRaises(AssertionError): - self.book1.prepend_history(self.book1) - self.assertEqual(Book.objects.all().count(), 2) - self.assertEqual(self.book1.materialize(), 'book 1') - self.assertEqual(self.book2.materialize(), 'book 2') +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from catalogue.tests.book import * +from catalogue.tests.gallery import * +from catalogue.tests.publish import * +from catalogue.tests.xml_updater import * diff --git a/apps/catalogue/tests/book.py b/apps/catalogue/tests/book.py new file mode 100644 index 00000000..df6f3b4f --- /dev/null +++ b/apps/catalogue/tests/book.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""Tests for manipulating books in the catalogue.""" + +from django.test import TestCase +from django.contrib.auth.models import User +from catalogue.models import Book + + +class ManipulationTests(TestCase): + + def setUp(self): + self.user = User.objects.create(username='tester') + self.book1 = Book.create(self.user, 'book 1', slug='book1') + self.book2 = Book.create(self.user, 'book 2', slug='book2') + + def test_append(self): + self.book1.append(self.book2) + self.assertEqual(Book.objects.all().count(), 1) + self.assertEqual(len(self.book1), 2) + + def test_append_to_self(self): + with self.assertRaises(AssertionError): + self.book1.append(Book.objects.get(pk=self.book1.pk)) + self.assertEqual(Book.objects.all().count(), 2) + self.assertEqual(len(self.book1), 1) + + def test_prepend_history(self): + self.book1.prepend_history(self.book2) + self.assertEqual(Book.objects.all().count(), 1) + self.assertEqual(len(self.book1), 1) + self.assertEqual(self.book1.materialize(), 'book 1') + + def test_prepend_history_to_self(self): + with self.assertRaises(AssertionError): + self.book1.prepend_history(self.book1) + self.assertEqual(Book.objects.all().count(), 2) + self.assertEqual(self.book1.materialize(), 'book 1') + self.assertEqual(self.book2.materialize(), 'book 2') + + def test_split_book(self): + self.book1.chunk_set.create(number=2, title='Second chunk', + slug='book3') + self.book1[1].commit('I survived!') + self.assertEqual(len(self.book1), 2) + self.book1.split() + self.assertEqual(set([b.slug for b in Book.objects.all()]), + set(['book2', '1', 'book3'])) + self.assertEqual( + Book.objects.get(slug='book3').materialize(), + 'I survived!') diff --git a/apps/catalogue/tests/files/chunk1.xml b/apps/catalogue/tests/files/chunk1.xml index 8497f606..6a75580a 100755 --- a/apps/catalogue/tests/files/chunk1.xml +++ b/apps/catalogue/tests/files/chunk1.xml @@ -20,6 +20,7 @@ text text 2007-09-06 +pol diff --git a/apps/catalogue/tests/files/expected.xml b/apps/catalogue/tests/files/expected.xml index ccbeefbb..ff225a03 100755 --- a/apps/catalogue/tests/files/expected.xml +++ b/apps/catalogue/tests/files/expected.xml @@ -20,6 +20,7 @@ text text 2007-09-06 +pol diff --git a/apps/catalogue/tests/gallery.py b/apps/catalogue/tests/gallery.py new file mode 100644 index 00000000..ad0dfd7d --- /dev/null +++ b/apps/catalogue/tests/gallery.py @@ -0,0 +1,148 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""Tests for galleries of scans.""" + +from os.path import join, basename, exists +from os import makedirs, listdir +from django.test import TestCase +from django.contrib.auth.models import User +from catalogue.models import Book +from tempfile import mkdtemp +from django.conf import settings + + +class GalleryAppendTests(TestCase): + def setUp(self): + self.user = User.objects.create(username='tester') + self.book1 = Book.create(self.user, 'book 1', slug='book1') + self.book1.chunk_set.create(number=2, title='Second chunk', + slug='book 1 / 2') + c=self.book1[1] + c.gallery_start=3 + + self.scandir = join(settings.MEDIA_ROOT, settings.IMAGE_DIR) + if not exists(self.scandir): + makedirs(self.scandir) + + def make_gallery(self, book, files): + d = mkdtemp('gallery', dir=self.scandir) + for named, cont in files.items(): + f = open(join(d, named), 'w') + f.write(cont) + f.close() + book.gallery = basename(d) + + + def test_both_indexed(self): + self.book2 = Book.create(self.user, 'book 2', slug='book2') + self.book2.chunk_set.create(number=2, title='Second chunk of second book', + slug='book 2 / 2') + + c = self.book2[1] + c.gallery_start = 3 + c.save() + + print "gallery starts:",self.book2[0].gallery_start, self.book2[1].gallery_start + + self.make_gallery(self.book1, { + '1-0001_1l' : 'aa', + '1-0001_2r' : 'bb', + '1-0002_1l' : 'cc', + '1-0002_2r' : 'dd', + }) + + self.make_gallery(self.book2, { + '1-0001_1l' : 'dd', # the same, should not be moved + '1-0001_2r' : 'ff', + '2-0002_1l' : 'gg', + '2-0002_2r' : 'hh', + }) + + self.book1.append(self.book2) + + files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() + print files + self.assertEqual(files, [ + '1-0001_1l', + '1-0001_2r', + '1-0002_1l', + '1-0002_2r', + # '2-0001_1l', + '2-0001_2r', + '3-0002_1l', + '3-0002_2r', + ]) + + self.assertEqual((4, 6), (self.book1[2].gallery_start, self.book1[3].gallery_start)) + + + def test_none_indexed(self): + self.book2 = Book.create(self.user, 'book 2', slug='book2') + self.make_gallery(self.book1, { + '0001_1l' : 'aa', + '0001_2r' : 'bb', + '0002_1l' : 'cc', + '0002_2r' : 'dd', + }) + + self.make_gallery(self.book2, { + '0001_1l' : 'ee', + '0001_2r' : 'ff', + '0002_1l' : 'gg', + '0002_2r' : 'hh', + }) + + self.book1.append(self.book2) + + files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() + print files + self.assertEqual(files, [ + '0-0001_1l', + '0-0001_2r', + '0-0002_1l', + '0-0002_2r', + '1-0001_1l', + '1-0001_2r', + '1-0002_1l', + '1-0002_2r', + ]) + + + def test_none_indexed(self): + import nose.tools + self.book2 = Book.create(self.user, 'book 2', slug='book2') + self.make_gallery(self.book1, { + '1-0001_1l' : 'aa', + '1-0001_2r' : 'bb', + '1002_1l' : 'cc', + '1002_2r' : 'dd', + }) + + self.make_gallery(self.book2, { + '0001_1l' : 'ee', + '0001_2r' : 'ff', + '0002_1l' : 'gg', + '0002_2r' : 'hh', + }) + + self.book1.append(self.book2) + + files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() + print files + self.assertEqual(files, [ + '0-1-0001_1l', + '0-1-0001_2r', + '0-1002_1l', + '0-1002_2r', + '1-0001_1l', + '1-0001_2r', + '1-0002_1l', + '1-0002_2r', + ]) + diff --git a/apps/catalogue/tests/publish.py b/apps/catalogue/tests/publish.py new file mode 100644 index 00000000..9f0b8ca4 --- /dev/null +++ b/apps/catalogue/tests/publish.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""Tests for the publishing process.""" + +from catalogue.test_utils import get_fixture + +from mock import patch +from django.test import TestCase +from django.contrib.auth.models import User +from catalogue.models import Book + + +class PublishTests(TestCase): + def setUp(self): + self.user = User.objects.create(username='tester') + self.text1 = get_fixture('chunk1.xml') + self.book = Book.create(self.user, self.text1, slug='test-book') + + @patch('apiclient.api_call') + def test_unpublishable(self, api_call): + with self.assertRaises(AssertionError): + self.book.publish(self.user) + + @patch('apiclient.api_call') + def test_publish(self, api_call): + self.book[0].head.set_publishable(True) + self.book.publish(self.user) + api_call.assert_called_with(self.user, 'books/', {"book_xml": self.text1}) + + @patch('apiclient.api_call') + def test_publish_multiple(self, api_call): + self.book[0].head.set_publishable(True) + self.book[0].split(slug='part-2') + self.book[1].commit(get_fixture('chunk2.xml')) + self.book[1].head.set_publishable(True) + self.book.publish(self.user) + api_call.assert_called_with(self.user, 'books/', {"book_xml": get_fixture('expected.xml')}) diff --git a/apps/catalogue/tests/xml_updater.py b/apps/catalogue/tests/xml_updater.py new file mode 100644 index 00000000..9fb5a4a0 --- /dev/null +++ b/apps/catalogue/tests/xml_updater.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""XmlUpdater tests.""" + +from catalogue.test_utils import get_fixture +from django.test import TestCase +from django.contrib.auth.models import User +from catalogue.models import Book +from catalogue.management import XmlUpdater +from librarian import DCNS + + +class XmlUpdaterTests(TestCase): + class SimpleUpdater(XmlUpdater): + @XmlUpdater.fixes_elements('.//' + DCNS('title')) + def fix_title(element, **kwargs): + element.text = element.text + " fixed" + return True + + def setUp(self): + self.user = User.objects.create(username='tester') + text = get_fixture('chunk1.xml') + Book.create(self.user, text, slug='test-book') + self.title = "Do M***" + + def test_xml_updater(self): + self.SimpleUpdater().run(self.user) + self.assertEqual( + Book.objects.get(slug='test-book').wldocument( + publishable=False).book_info.title, + self.title + " fixed" + ) diff --git a/apps/catalogue/urls.py b/apps/catalogue/urls.py index 31df1c19..3627bf04 100644 --- a/apps/catalogue/urls.py +++ b/apps/catalogue/urls.py @@ -1,10 +1,13 @@ # -*- coding: utf-8 -from django.conf.urls.defaults import * -from django.views.generic.simple import redirect_to +from django.conf.urls import patterns, url +from django.contrib.auth.decorators import permission_required +from django.views.generic import RedirectView +from catalogue.feeds import PublishTrackFeed +from catalogue.views import GalleryView urlpatterns = patterns('catalogue.views', - url(r'^$', redirect_to, {'url': 'catalogue/'}), + url(r'^$', RedirectView.as_view(url='catalogue/')), url(r'^images/$', 'image_list', name='catalogue_image_list'), url(r'^image/(?P[^/]+)/$', 'image', name="catalogue_image"), @@ -30,16 +33,23 @@ urlpatterns = patterns('catalogue.views', url(r'^book/(?P[^/]+)/publish$', 'publish', name="catalogue_publish"), url(r'^book/(?P[^/]+)/$', 'book', name="catalogue_book"), + url(r'^book/(?P[^/]+)/gallery/$', + permission_required('catalogue.change_book')(GalleryView.as_view()), + name="catalogue_book_gallery"), url(r'^book/(?P[^/]+)/xml$', 'book_xml', name="catalogue_book_xml"), url(r'^book/(?P[^/]+)/txt$', 'book_txt', name="catalogue_book_txt"), url(r'^book/(?P[^/]+)/html$', 'book_html', name="catalogue_book_html"), url(r'^book/(?P[^/]+)/epub$', 'book_epub', name="catalogue_book_epub"), url(r'^book/(?P[^/]+)/pdf$', 'book_pdf', name="catalogue_book_pdf"), + url(r'^chunk_add/(?P[^/]+)/(?P[^/]+)/$', 'chunk_add', name="catalogue_chunk_add"), url(r'^chunk_edit/(?P[^/]+)/(?P[^/]+)/$', 'chunk_edit', name="catalogue_chunk_edit"), url(r'^book_append/(?P[^/]+)/$', 'book_append', name="catalogue_book_append"), + url(r'^chunk_mass_edit', + 'chunk_mass_edit', name='catalogue_chunk_mass_edit'), + url(r'^track/(?P[^/]*)/$', PublishTrackFeed()), ) diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index ed5b15f2..01e4d1fa 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -5,11 +5,13 @@ from StringIO import StringIO from urllib import unquote from urlparse import urlsplit, urlunsplit +from django.conf import settings from django.contrib import auth from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required, permission_required from django.core.urlresolvers import reverse from django.db.models import Count, Q +from django.db import transaction from django import http from django.http import Http404, HttpResponse, HttpResponseForbidden from django.shortcuts import get_object_or_404, render @@ -17,15 +19,14 @@ from django.utils.encoding import iri_to_uri from django.utils.http import urlquote_plus from django.utils.translation import ugettext_lazy as _ from django.views.decorators.http import require_POST -from django.views.generic.simple import direct_to_template from apiclient import NotAuthorizedError from catalogue import forms from catalogue import helpers from catalogue.helpers import active_tab from catalogue.models import (Book, Chunk, Image, BookPublishRecord, - ChunkPublishRecord, ImagePublishRecord) -from catalogue.tasks import publishable_error + ChunkPublishRecord, ImagePublishRecord, Project) +from fileupload.views import UploadView # # Quick hack around caching problems, TODO: use ETags @@ -67,7 +68,7 @@ def my(request): @active_tab('users') def users(request): - return direct_to_template(request, 'catalogue/user_list.html', extra_context={ + return render(request, 'catalogue/user_list.html', { 'users': User.objects.all().annotate(count=Count('chunk')).order_by( '-count', 'last_name', 'first_name'), }) @@ -127,7 +128,7 @@ def create_missing(request, slug=None): "gallery": slug, }) - return direct_to_template(request, "catalogue/document_create_missing.html", extra_context={ + return render(request, "catalogue/document_create_missing.html", { "slug": slug, "form": form, @@ -182,7 +183,7 @@ def upload(request): title=title, ) - return direct_to_template(request, "catalogue/document_upload.html", extra_context={ + return render(request, "catalogue/document_upload.html", { "form": form, "ok_list": ok_list, "skipped_list": skipped_list, @@ -193,7 +194,7 @@ def upload(request): else: form = forms.DocumentsUploadForm() - return direct_to_template(request, "catalogue/document_upload.html", extra_context={ + return render(request, "catalogue/document_upload.html", { "form": form, "logout_to": '/', @@ -217,13 +218,9 @@ def book_txt(request, slug): book = get_object_or_404(Book, slug=slug) if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - xml = book.materialize() - output = StringIO() - # errors? - import librarian.text - librarian.text.transform(StringIO(xml), output) - text = output.getvalue() + doc = book.wldocument() + text = doc.as_text().get_string() response = http.HttpResponse(text, content_type='text/plain', mimetype='text/plain') response['Content-Disposition'] = 'attachment; filename=%s.txt' % slug return response @@ -234,16 +231,21 @@ def book_html(request, slug): book = get_object_or_404(Book, slug=slug) if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - xml = book.materialize() - output = StringIO() - # errors? - - import librarian.html - librarian.html.transform(StringIO(xml), output, parse_dublincore=False, - flags=['full-page']) - html = output.getvalue() - response = http.HttpResponse(html, content_type='text/html', mimetype='text/html') - return response + + doc = book.wldocument(parse_dublincore=False) + html = doc.as_html() + + html = html.get_string() if html is not None else '' + # response = http.HttpResponse(html, content_type='text/html', mimetype='text/html') + # return response + # book_themes = {} + # for fragment in book.fragments.all().iterator(): + # for theme in fragment.tags.filter(category='theme').iterator(): + # book_themes.setdefault(theme, []).append(fragment) + + # book_themes = book_themes.items() + # book_themes.sort(key=lambda s: s[0].sort_key) + return render(request, 'catalogue/book_text.html', locals()) @never_cache @@ -252,25 +254,13 @@ def book_pdf(request, slug): if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - from tempfile import NamedTemporaryFile - from os import unlink - from librarian import pdf - from catalogue.ebook_utils import RedakcjaDocProvider, serve_file - - xml = book.materialize() - xml_file = NamedTemporaryFile() - xml_file.write(xml.encode('utf-8')) - xml_file.flush() - - try: - pdf_file = NamedTemporaryFile(delete=False) - pdf.transform(RedakcjaDocProvider(publishable=True), - file_path=xml_file.name, - output_file=pdf_file, - ) - return serve_file(pdf_file.name, book.slug + '.pdf', 'application/pdf') - finally: - unlink(pdf_file.name) + # TODO: move to celery + doc = book.wldocument() + # TODO: error handling + pdf_file = doc.as_pdf() + from catalogue.ebook_utils import serve_file + return serve_file(pdf_file.get_filename(), + book.slug + '.pdf', 'application/pdf') @never_cache @@ -279,23 +269,13 @@ def book_epub(request, slug): if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - from StringIO import StringIO - from tempfile import NamedTemporaryFile - from librarian import epub - from catalogue.ebook_utils import RedakcjaDocProvider - - xml = book.materialize() - xml_file = NamedTemporaryFile() - xml_file.write(xml.encode('utf-8')) - xml_file.flush() - - epub_file = StringIO() - epub.transform(RedakcjaDocProvider(publishable=True), - file_path=xml_file.name, - output_file=epub_file) + # TODO: move to celery + doc = book.wldocument() + # TODO: error handling + epub = doc.as_epub().get_string() response = HttpResponse(mimetype='application/epub+zip') response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.epub' - response.write(epub_file.getvalue()) + response.write(epub) return response @@ -323,15 +303,15 @@ def book(request, slug): return http.HttpResponseRedirect(book.get_absolute_url()) else: form = forms.BookForm(instance=book) - editable = True + editable = True else: form = forms.ReadonlyBookForm(instance=book) editable = False - publish_error = publishable_error(book) + publish_error = book.publishable_error() publishable = publish_error is None - return direct_to_template(request, "catalogue/book_detail.html", extra_context={ + return render(request, "catalogue/book_detail.html", { "book": book, "publishable": publishable, "publishable_error": publish_error, @@ -358,10 +338,10 @@ def image(request, slug): form = forms.ReadonlyImageForm(instance=image) editable = False - publish_error = publishable_error(image) + publish_error = image.publishable_error() publishable = publish_error is None - return direct_to_template(request, "catalogue/image_detail.html", extra_context={ + return render(request, "catalogue/image_detail.html", { "object": image, "publishable": publishable, "publishable_error": publish_error, @@ -401,12 +381,13 @@ def chunk_add(request, slug, chunk): "title": "cz. %d" % (doc.number + 1, ), }) - return direct_to_template(request, "catalogue/chunk_add.html", extra_context={ + return render(request, "catalogue/chunk_add.html", { "chunk": doc, "form": form, }) +@login_required def chunk_edit(request, slug, chunk): try: doc = Chunk.get(slug, chunk) @@ -436,13 +417,73 @@ def chunk_edit(request, slug, chunk): else: go_next = '' - return direct_to_template(request, "catalogue/chunk_edit.html", extra_context={ + return render(request, "catalogue/chunk_edit.html", { "chunk": doc, "form": form, "go_next": go_next, }) +@transaction.commit_on_success +@login_required +def chunk_mass_edit(request): + if request.method == 'POST': + ids = map(int, filter(lambda i: i.strip()!='', request.POST.get('ids').split(','))) + chunks = map(lambda i: Chunk.objects.get(id=i), ids) + + stage = request.POST.get('stage') + if stage: + try: + stage = Chunk.tag_model.objects.get(slug=stage) + except Chunk.DoesNotExist, e: + stage = None + + for c in chunks: c.stage = stage + + username = request.POST.get('user') + logger.info("username: %s" % username) + logger.info(request.POST) + if username: + try: + user = User.objects.get(username=username) + except User.DoesNotExist, e: + user = None + + for c in chunks: c.user = user + + status = request.POST.get('status') + if status: + books_affected = set() + for c in chunks: + if status == 'publish': + c.head.publishable = True + c.head.save() + elif status == 'unpublish': + c.head.publishable = False + c.head.save() + c.touch() # cache + books_affected.add(c.book) + for b in books_affected: + b.touch() # cache + + project_id = request.POST.get('project') + if project_id: + try: + project = Project.objects.get(pk=int(project_id)) + except (Project.DoesNotExist, ValueError), e: + project = None + for c in chunks: + book = c.book + book.project = project + book.save() + + for c in chunks: c.save() + + return HttpResponse("", content_type="text/plain") + else: + raise Http404 + + @permission_required('catalogue.change_book') def book_append(request, slug): book = get_object_or_404(Book, slug=slug) @@ -457,7 +498,7 @@ def book_append(request, slug): return http.HttpResponseRedirect(append_to.get_absolute_url()) else: form = forms.BookAppendForm(book) - return direct_to_template(request, "catalogue/book_append_to.html", extra_context={ + return render(request, "catalogue/book_append_to.html", { "book": book, "form": form, @@ -497,3 +538,21 @@ def publish_image(request, slug): return http.HttpResponse(e) else: return http.HttpResponseRedirect(image.get_absolute_url()) + + +class GalleryView(UploadView): + def get_object(self, request, slug): + book = get_object_or_404(Book, slug=slug) + if not book.gallery: + raise Http404 + return book + + def breadcrumbs(self): + return [ + (_('books'), reverse('catalogue_document_list')), + (self.object.title, self.object.get_absolute_url()), + (_('scan gallery'),), + ] + + def get_directory(self): + return "%s%s/" % (settings.IMAGE_DIR, self.object.gallery) diff --git a/apps/compress/__init__.py b/apps/compress/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/conf/__init__.py b/apps/compress/conf/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/conf/settings.py b/apps/compress/conf/settings.py deleted file mode 100644 index 4c71561e..00000000 --- a/apps/compress/conf/settings.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.core.exceptions import ImproperlyConfigured -from django.conf import settings - -COMPRESS = getattr(settings, 'COMPRESS', not settings.DEBUG) -COMPRESS_AUTO = getattr(settings, 'COMPRESS_AUTO', True) -COMPRESS_VERSION = getattr(settings, 'COMPRESS_VERSION', False) -COMPRESS_VERSION_PLACEHOLDER = getattr(settings, 'COMPRESS_VERSION_PLACEHOLDER', '?') -COMPRESS_VERSION_DEFAULT = getattr(settings, 'COMPRESS_VERSION_DEFAULT', '0') -COMPRESS_VERSIONING = getattr(settings, 'COMPRESS_VERSIONING', 'compress.versioning.mtime.MTimeVersioning') - -COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', ['compress.filters.csstidy.CSSTidyFilter']) -COMPRESS_JS_FILTERS = getattr(settings, 'COMPRESS_JS_FILTERS', ['compress.filters.jsmin.JSMinFilter']) -COMPRESS_CSS = getattr(settings, 'COMPRESS_CSS', {}) -COMPRESS_JS = getattr(settings, 'COMPRESS_JS', {}) - -if COMPRESS_CSS_FILTERS is None: - COMPRESS_CSS_FILTERS = [] - -if COMPRESS_JS_FILTERS is None: - COMPRESS_JS_FILTERS = [] diff --git a/apps/compress/filter_base.py b/apps/compress/filter_base.py deleted file mode 100644 index 3ce364f1..00000000 --- a/apps/compress/filter_base.py +++ /dev/null @@ -1,16 +0,0 @@ -class FilterBase: - def __init__(self, verbose): - self.verbose = verbose - - def filter_css(self, css): - raise NotImplementedError - - def filter_js(self, js): - raise NotImplementedError - - -class FilterError(Exception): - """ - This exception is raised when a filter fails - """ - pass diff --git a/apps/compress/filters/__init__.py b/apps/compress/filters/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/filters/csstidy/__init__.py b/apps/compress/filters/csstidy/__init__.py deleted file mode 100644 index de5dd09b..00000000 --- a/apps/compress/filters/csstidy/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -import warnings -import tempfile - -from django.conf import settings - -from compress.filter_base import FilterBase - -BINARY = getattr(settings, 'CSSTIDY_BINARY', 'csstidy') -ARGUMENTS = getattr(settings, 'CSSTIDY_ARGUMENTS', '--template=highest') - -warnings.simplefilter('ignore', RuntimeWarning) - - -class CSSTidyFilter(FilterBase): - - def filter_css(self, css): - tmp_file = tempfile.NamedTemporaryFile(mode='w+b') - tmp_file.write(css) - tmp_file.flush() - - output_file = tempfile.NamedTemporaryFile(mode='w+b') - - command = '%s %s %s %s' % (BINARY, tmp_file.name, ARGUMENTS, output_file.name) - - command_output = os.popen(command).read() - - filtered_css = output_file.read() - output_file.close() - tmp_file.close() - - if self.verbose: - print command_output - - return filtered_css diff --git a/apps/compress/filters/jsmin/__init__.py b/apps/compress/filters/jsmin/__init__.py deleted file mode 100644 index 340bef2b..00000000 --- a/apps/compress/filters/jsmin/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -from compress.filters.jsmin.jsmin import jsmin -from compress.filter_base import FilterBase - - -class JSMinFilter(FilterBase): - - def filter_js(self, js): - return jsmin(js) diff --git a/apps/compress/filters/jsmin/jsmin.py b/apps/compress/filters/jsmin/jsmin.py deleted file mode 100644 index 60202e19..00000000 --- a/apps/compress/filters/jsmin/jsmin.py +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/python - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. The original code had the following copyright and -# license. -# -# /* jsmin.c -# 2007-05-22 -# -# Copyright (c) 2002 Douglas Crockford (www.crockford.com) -# -# 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 shall be used for Good, not Evil. -# -# 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. -# */ - -from StringIO import StringIO - - -def jsmin(js): - ins = StringIO(js) - outs = StringIO() - JavascriptMinify().minify(ins, outs) - str = outs.getvalue() - if len(str) > 0 and str[0] == '\n': - str = str[1:] - return str - - -def isAlphanum(c): - """return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. - """ - return (c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') \ - or (c >= '0' and c <= '9') or c == '_' or c == '$' or c == '\\' \ - or (c is not None and ord(c) > 126) - - -class UnterminatedComment(Exception): - pass - - -class UnterminatedStringLiteral(Exception): - pass - - -class UnterminatedRegularExpression(Exception): - pass - - -class JavascriptMinify(object): - - def _outA(self): - self.outstream.write(self.theA) - - def _outB(self): - self.outstream.write(self.theB) - - def _get(self): - """return the next character from stdin. Watch out for lookahead. If - the character is a control character, translate it to a space or - linefeed. - """ - c = self.theLookahead - self.theLookahead = None - if c == None: - c = self.instream.read(1) - if c >= ' ' or c == '\n': - return c - if c == '': # EOF - return '\000' - if c == '\r': - return '\n' - return ' ' - - def _peek(self): - self.theLookahead = self._get() - return self.theLookahead - - def _next(self): - """get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. - """ - c = self._get() - if c == '/': - p = self._peek() - if p == '/': - c = self._get() - while c > '\n': - c = self._get() - return c - if p == '*': - c = self._get() - while 1: - c = self._get() - if c == '*': - if self._peek() == '/': - self._get() - return ' ' - if c == '\000': - raise UnterminatedComment() - - return c - - def _action(self, action): - """do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. - """ - if action <= 1: - self._outA() - - if action <= 2: - self.theA = self.theB - if self.theA == "'" or self.theA == '"': - while 1: - self._outA() - self.theA = self._get() - if self.theA == self.theB: - break - if self.theA <= '\n': - raise UnterminatedStringLiteral() - if self.theA == '\\': - self._outA() - self.theA = self._get() - - if action <= 3: - self.theB = self._next() - if self.theB == '/' and (self.theA == '(' or self.theA == ',' or - self.theA == '=' or self.theA == ':' or - self.theA == '[' or self.theA == '?' or - self.theA == '!' or self.theA == '&' or - self.theA == '|' or self.theA == ';' or - self.theA == '{' or self.theA == '}' or - self.theA == '\n'): - self._outA() - self._outB() - while 1: - self.theA = self._get() - if self.theA == '/': - break - elif self.theA == '\\': - self._outA() - self.theA = self._get() - elif self.theA <= '\n': - raise UnterminatedRegularExpression() - self._outA() - self.theB = self._next() - - def _jsmin(self): - """Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with linefeeds. - Most spaces and linefeeds will be removed. - """ - self.theA = '\n' - self._action(3) - - while self.theA != '\000': - if self.theA == ' ': - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - elif self.theA == '\n': - if self.theB in ['{', '[', '(', '+', '-']: - self._action(1) - elif self.theB == ' ': - self._action(3) - else: - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - else: - if self.theB == ' ': - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - elif self.theB == '\n': - if self.theA in ['}', ']', ')', '+', '-', '"', '\'']: - self._action(1) - else: - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - else: - self._action(1) - - def minify(self, instream, outstream): - self.instream = instream - self.outstream = outstream - self.theA = '\n' - self.theB = None - self.theLookahead = None - - self._jsmin() - self.instream.close() - -if __name__ == '__main__': - import sys - jsm = JavascriptMinify() - jsm.minify(sys.stdin, sys.stdout) diff --git a/apps/compress/filters/yui/__init__.py b/apps/compress/filters/yui/__init__.py deleted file mode 100644 index 47b2cfb0..00000000 --- a/apps/compress/filters/yui/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -import subprocess - -from django.conf import settings - -from compress.filter_base import FilterBase, FilterError - -BINARY = getattr(settings, 'COMPRESS_YUI_BINARY', 'java -jar yuicompressor.jar') -CSS_ARGUMENTS = getattr(settings, 'COMPRESS_YUI_CSS_ARGUMENTS', '') -JS_ARGUMENTS = getattr(settings, 'COMPRESS_YUI_JS_ARGUMENTS', '') - - -class YUICompressorFilter(FilterBase): - - def filter_common(self, content, type_, arguments): - command = '%s --type=%s %s' % (BINARY, type_, arguments) - - if self.verbose: - command += ' --verbose' - - p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) - p.stdin.write(content) - p.stdin.close() - - filtered_css = p.stdout.read() - p.stdout.close() - - err = p.stderr.read() - p.stderr.close() - - if p.wait() != 0: - if not err: - err = 'Unable to apply YUI Compressor filter' - - raise FilterError(err) - - if self.verbose: - print err - - return filtered_css - - def filter_js(self, js): - return self.filter_common(js, 'js', JS_ARGUMENTS) - - def filter_css(self, css): - return self.filter_common(css, 'css', CSS_ARGUMENTS) diff --git a/apps/compress/management/__init__.py b/apps/compress/management/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/management/commands/__init__.py b/apps/compress/management/commands/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/management/commands/synccompress.py b/apps/compress/management/commands/synccompress.py deleted file mode 100644 index b1cdafca..00000000 --- a/apps/compress/management/commands/synccompress.py +++ /dev/null @@ -1,59 +0,0 @@ -from django.core.management.base import NoArgsCommand -from optparse import make_option - -from django.conf import settings - - -class Command(NoArgsCommand): - option_list = NoArgsCommand.option_list + ( - make_option('--force', action='store_true', default=False, help='Force update of all files, even if the source files are older than the current compressed file.'), - ) - help = 'Updates and compresses CSS and JavsScript on-demand, without restarting Django' - args = '' - - def handle_noargs(self, **options): - - force = options.get('force', False) - verbosity = int(options.get('verbosity', 1)) - - from compress.utils import needs_update, filter_css, filter_js - - for name, css in settings.COMPRESS_CSS.items(): - u, version = needs_update(css['output_filename'], - css['source_filenames']) - - if (force or u) or verbosity >= 2: - msg = 'CSS Group \'%s\'' % name - print msg - print len(msg) * '-' - print "Version: %s" % version - - if force or u: - filter_css(css, verbosity) - - if (force or u) or verbosity >= 2: - print - - for name, js in settings.COMPRESS_JS.items(): - u, version = needs_update(js['output_filename'], - js['source_filenames']) - - if (force or u) or verbosity >= 2: - msg = 'JavaScript Group \'%s\'' % name - print msg - print len(msg) * '-' - print "Version: %s" % version - - if force or u: - filter_js(js, verbosity) - - if (force or u) or verbosity >= 2: - print - -# Backwards compatibility for Django r9110 -if not [opt for opt in Command.option_list if opt.dest == 'verbosity']: - Command.option_list += ( - make_option('--verbosity', '-v', action="store", dest="verbosity", - default='1', type='choice', choices=['0', '1', '2'], - help="Verbosity level; 0=minimal output, 1=normal output, 2=all output"), - ) diff --git a/apps/compress/models.py b/apps/compress/models.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/signals.py b/apps/compress/signals.py deleted file mode 100644 index bd76a76e..00000000 --- a/apps/compress/signals.py +++ /dev/null @@ -1,4 +0,0 @@ -from django.dispatch import Signal - -css_filtered = Signal() -js_filtered = Signal() diff --git a/apps/compress/templates/compress/css.html b/apps/compress/templates/compress/css.html deleted file mode 100644 index 3751a4a0..00000000 --- a/apps/compress/templates/compress/css.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/css_ie.html b/apps/compress/templates/compress/css_ie.html deleted file mode 100644 index 2e244ee9..00000000 --- a/apps/compress/templates/compress/css_ie.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/js.html b/apps/compress/templates/compress/js.html deleted file mode 100644 index 8419c20a..00000000 --- a/apps/compress/templates/compress/js.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/js_ie.html b/apps/compress/templates/compress/js_ie.html deleted file mode 100644 index ef1a37c7..00000000 --- a/apps/compress/templates/compress/js_ie.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templatetags/__init__.py b/apps/compress/templatetags/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/templatetags/compressed.py b/apps/compress/templatetags/compressed.py deleted file mode 100644 index eeed319b..00000000 --- a/apps/compress/templatetags/compressed.py +++ /dev/null @@ -1,132 +0,0 @@ -import os - -from django import template - -from compress.conf import settings -from compress.utils import media_root, media_url, needs_update, filter_css, filter_js, get_output_filename, get_version, get_version_from_file - -register = template.Library() - - -def render_common(template_name, obj, filename, version): - if settings.COMPRESS: - filename = get_output_filename(filename, version) - - context = obj.get('extra_context', {}) - prefix = context.get('prefix', None) - if filename.startswith('http://'): - context['url'] = filename - else: - context['url'] = media_url(filename, prefix) - - return template.loader.render_to_string(template_name, context) - - -def render_css(css, filename, version=None): - return render_common(css.get('template_name', 'compress/css.html'), css, filename, version) - - -def render_js(js, filename, version=None): - return render_common(js.get('template_name', 'compress/js.html'), js, filename, version) - - -class CompressedCSSNode(template.Node): - - def __init__(self, name): - self.name = name - - def render(self, context): - css_name = template.Variable(self.name).resolve(context) - - try: - css = settings.COMPRESS_CSS[css_name] - except KeyError: - return '' # fail silently, do not return anything if an invalid group is specified - - if settings.COMPRESS: - - version = None - - if settings.COMPRESS_AUTO: - u, version = needs_update(css['output_filename'], - css['source_filenames']) - if u: - filter_css(css) - else: - filename_base, filename = os.path.split(css['output_filename']) - path_name = media_root(filename_base) - version = get_version_from_file(path_name, filename) - - return render_css(css, css['output_filename'], version) - else: - # output source files - r = '' - for source_file in css['source_filenames']: - r += render_css(css, source_file) - - return r - - -class CompressedJSNode(template.Node): - - def __init__(self, name): - self.name = name - - def render(self, context): - js_name = template.Variable(self.name).resolve(context) - - try: - js = settings.COMPRESS_JS[js_name] - except KeyError: - return '' # fail silently, do not return anything if an invalid group is specified - - if 'external_urls' in js: - r = '' - for url in js['external_urls']: - r += render_js(js, url) - return r - - if settings.COMPRESS: - - version = None - - if settings.COMPRESS_AUTO: - u, version = needs_update(js['output_filename'], - js['source_filenames']) - if u: - filter_js(js) - else: - filename_base, filename = os.path.split(js['output_filename']) - path_name = media_root(filename_base) - version = get_version_from_file(path_name, filename) - - return render_js(js, js['output_filename'], version) - else: - # output source files - r = '' - for source_file in js['source_filenames']: - r += render_js(js, source_file) - return r - - -#@register.tag -def compressed_css(parser, token): - try: - tag_name, name = token.split_contents() - except ValueError: - raise template.TemplateSyntaxError, '%r requires exactly one argument: the name of a group in the COMPRESS_CSS setting' % token.split_contents()[0] - - return CompressedCSSNode(name) -compressed_css = register.tag(compressed_css) - - -#@register.tag -def compressed_js(parser, token): - try: - tag_name, name = token.split_contents() - except ValueError: - raise template.TemplateSyntaxError, '%r requires exactly one argument: the name of a group in the COMPRESS_JS setting' % token.split_contents()[0] - - return CompressedJSNode(name) - -compressed_js = register.tag(compressed_js) diff --git a/apps/compress/utils.py b/apps/compress/utils.py deleted file mode 100644 index 1e5f4cc0..00000000 --- a/apps/compress/utils.py +++ /dev/null @@ -1,154 +0,0 @@ -import os -import re -import tempfile - -from django.conf import settings as django_settings -from django.utils.http import urlquote -from django.dispatch import dispatcher - -from compress.conf import settings -from compress.signals import css_filtered, js_filtered - - -def get_class(class_string): - """ - Convert a string version of a function name to the callable object. - """ - - if not hasattr(class_string, '__bases__'): - - try: - class_string = class_string.encode('ascii') - mod_name, class_name = get_mod_func(class_string) - if class_name != '': - class_string = getattr(__import__(mod_name, {}, {}, ['']), class_name) - except (ImportError, AttributeError): - raise Exception('Failed to import filter %s' % class_string) - - return class_string - - -def get_mod_func(callback): - """ - Converts 'django.views.news.stories.story_detail' to - ('django.views.news.stories', 'story_detail') - """ - - try: - dot = callback.rindex('.') - except ValueError: - return callback, '' - return callback[:dot], callback[dot + 1:] - - -def needs_update(output_file, source_files, verbosity=0): - """ - Scan the source files for changes and returns True if the output_file needs to be updated. - """ - - version = get_version(source_files) - - on = get_output_filename(output_file, version) - compressed_file_full = media_root(on) - - if not os.path.exists(compressed_file_full): - return True, version - - update_needed = getattr(get_class(settings.COMPRESS_VERSIONING)(), 'needs_update')(output_file, source_files, version) - return update_needed - - -def media_root(filename): - """ - Return the full path to ``filename``. ``filename`` is a relative path name in MEDIA_ROOT - """ - return os.path.join(django_settings.STATIC_ROOT, filename) - - -def media_url(url, prefix=None): - if prefix: - return prefix + urlquote(url) - return django_settings.STATIC_URL + urlquote(url) - - -def concat(filenames, separator=''): - """ - Concatenate the files from the list of the ``filenames``, ouput separated with ``separator``. - """ - r = '' - for filename in filenames: - fd = open(media_root(filename), 'rb') - r += fd.read() - r += separator - fd.close() - return r - - -def max_mtime(files): - return int(max([os.stat(media_root(f)).st_mtime for f in files])) - - -def save_file(filename, contents): - dirname = os.path.dirname(media_root(filename)) - if not os.path.exists(dirname): - os.makedirs(dirname) - fd = open(media_root(filename), 'wb+') - fd.write(contents) - fd.close() - - -def get_output_filename(filename, version): - if settings.COMPRESS_VERSION and version is not None: - return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, version) - else: - return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, settings.COMPRESS_VERSION_DEFAULT) - - -def get_version(source_files, verbosity=0): - version = getattr(get_class(settings.COMPRESS_VERSIONING)(), 'get_version')(source_files) - return version - - -def get_version_from_file(path, filename): - regex = re.compile(r'^%s$' % (get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)'))) - for f in os.listdir(path): - result = regex.match(f) - if result and result.groups(): - return result.groups()[0] - - -def remove_files(path, filename, verbosity=0): - regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'[A-Za-z0-9]+')))) - if os.path.exists(path): - for f in os.listdir(path): - if regex.match(f): - if verbosity >= 1: - print "Removing outdated file %s" % f - - os.unlink(os.path.join(path, f)) - - -def filter_common(obj, verbosity, filters, attr, separator, signal): - output = concat(obj['source_filenames'], separator) - - filename = get_output_filename(obj['output_filename'], get_version(obj['source_filenames'])) - - if settings.COMPRESS_VERSION: - remove_files(os.path.dirname(media_root(filename)), obj['output_filename'], verbosity) - - if verbosity >= 1: - print "Saving %s" % filename - - for f in filters: - output = getattr(get_class(f)(verbose=(verbosity >= 2)), attr)(output) - - save_file(filename, output) - signal.send(None) - - -def filter_css(css, verbosity=0): - return filter_common(css, verbosity, filters=settings.COMPRESS_CSS_FILTERS, attr='filter_css', separator='', signal=css_filtered) - - -def filter_js(js, verbosity=0): - return filter_common(js, verbosity, filters=settings.COMPRESS_JS_FILTERS, attr='filter_js', separator='', signal=js_filtered) diff --git a/apps/compress/versioning/__init__.py b/apps/compress/versioning/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/compress/versioning/base.py b/apps/compress/versioning/base.py deleted file mode 100644 index 0be9acab..00000000 --- a/apps/compress/versioning/base.py +++ /dev/null @@ -1,14 +0,0 @@ -class VersioningBase(object): - - def get_version(self, source_files): - raise NotImplementedError - - def needs_update(self, output_file, source_files, version): - raise NotImplementedError - - -class VersioningError(Exception): - """ - This exception is raised when version creation fails - """ - pass diff --git a/apps/compress/versioning/hash/__init__.py b/apps/compress/versioning/hash/__init__.py deleted file mode 100644 index a298961c..00000000 --- a/apps/compress/versioning/hash/__init__.py +++ /dev/null @@ -1,53 +0,0 @@ -import cStringIO -from hashlib import md5, sha1 -import os - -from compress.conf import settings -from compress.utils import concat, get_output_filename -from compress.versioning.base import VersioningBase - - -class HashVersioningBase(VersioningBase): - - def __init__(self, hash_method): - self.hash_method = hash_method - - def needs_update(self, output_file, source_files, version): - output_file_name = get_output_filename(output_file, version) - ph = settings.COMPRESS_VERSION_PLACEHOLDER - of = output_file - try: - phi = of.index(ph) - old_version = output_file_name[phi:phi + len(ph) - len(of)] - return (version != old_version), version - except ValueError: - # no placeholder found, do not update, manual update if needed - return False, version - - def get_version(self, source_files): - buf = concat(source_files) - s = cStringIO.StringIO(buf) - version = self.get_hash(s) - s.close() - return version - - def get_hash(self, f, CHUNK=2 ** 16): - m = self.hash_method() - while 1: - chunk = f.read(CHUNK) - if not chunk: - break - m.update(chunk) - return m.hexdigest() - - -class MD5Versioning(HashVersioningBase): - - def __init__(self): - super(MD5Versioning, self).__init__(md5) - - -class SHA1Versioning(HashVersioningBase): - - def __init__(self): - super(SHA1Versioning, self).__init__(sha1) diff --git a/apps/compress/versioning/mtime/__init__.py b/apps/compress/versioning/mtime/__init__.py deleted file mode 100644 index 010aba9a..00000000 --- a/apps/compress/versioning/mtime/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -import os - -from compress.utils import get_output_filename, media_root -from compress.versioning.base import VersioningBase - - -class MTimeVersioning(VersioningBase): - - def get_version(self, source_files): - - # Return the modification time for the newest source file - return str(max([int(os.stat(media_root(f)).st_mtime) for f in source_files])) - - def needs_update(self, output_file, source_files, version): - - output_file_name = get_output_filename(output_file, version) - compressed_file_full = media_root(output_file_name) - - return (int(os.stat(compressed_file_full).st_mtime) < int(version)), version diff --git a/apps/cover/__init__.py b/apps/cover/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/apps/cover/forms.py b/apps/cover/forms.py new file mode 100755 index 00000000..e6ffdff4 --- /dev/null +++ b/apps/cover/forms.py @@ -0,0 +1,108 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +import re +from urllib2 import urlopen +from django import forms +from django.utils.translation import ugettext_lazy as _, ugettext +from cover.models import Image +from django.utils.text import mark_safe + +class ImageAddForm(forms.ModelForm): + class Meta: + model = Image + + def __init__(self, *args, **kwargs): + super(ImageAddForm, self).__init__(*args, **kwargs) + self.fields['file'].required = False + + def clean_download_url(self): + cl = self.cleaned_data['download_url'] or None + if cl is not None: + try: + img = Image.objects.get(download_url=cl) + except Image.DoesNotExist: + pass + else: + raise forms.ValidationError(mark_safe( + ugettext('Image already in repository.' + ) % {'url': img.get_absolute_url()})) + return cl + + def clean(self): + cleaned_data = super(ImageAddForm, self).clean() + if not cleaned_data.get('download_url', None) and not cleaned_data.get('file', None): + raise forms.ValidationError('No image specified') + return cleaned_data + +class ImageEditForm(forms.ModelForm): + """Form used for editing a Book.""" + class Meta: + model = Image + exclude = ['download_url'] + + +class ReadonlyImageEditForm(ImageEditForm): + """Form used for not editing an Image.""" + + def __init__(self, *args, **kwargs): + ret = super(ReadonlyImageEditForm, self).__init__(*args, **kwargs) + for field in self.fields.values(): + field.widget.attrs.update({"readonly": True}) + return ret + + def save(self, *args, **kwargs): + raise AssertionError, "ReadonlyImageEditForm should not be saved." + + +class FlickrForm(forms.Form): + source_url = forms.URLField(label=_('Flickr URL')) + + def clean_source_url(self): + def normalize_html(html): + return re.sub('[\t\n]', '', html) + + url = self.cleaned_data['source_url'] + m = re.match(r'(https?://)?(www\.|secure\.)?flickr\.com/photos/(?P[^/]+)/(?P\d+)/?', url) + if not m: + raise forms.ValidationError("It doesn't look like Flickr URL.") + author_slug, img_id = m.group('author'), m.group('img') + base_url = "https://www.flickr.com/photos/%s/%s/" % (author_slug, img_id) + + try: + html = normalize_html(urlopen(url).read().decode('utf-8')) + except: + raise forms.ValidationError('Error reading page.') + match = re.search(r'Some rights reserved', html) + try: + assert match + license_url = match.group(1) + self.cleaned_data['license_url'] = license_url + re_license = re.compile(r'https?://creativecommons.org/licenses/([^/]*)/([^/]*)/.*') + m = re_license.match(license_url) + assert m + self.cleaned_data['license_name'] = 'CC %s %s' % (m.group(1).upper(), m.group(2)) + except AssertionError: + raise forms.ValidationError('Error reading license name.') + + m = re.search(r'"ownername":"([^"]*)', html) + if m: + self.cleaned_data['author'] = "%s@Flickr" % m.group(1) + else: + raise forms.ValidationError('Error reading author name.') + + m = re.search(r']*>(.*?)', html) + if not m: + raise forms.ValidationError('Error reading image title.') + self.cleaned_data['title'] = m.group(1) + + url_size = base_url + "sizes/o/" + html = normalize_html(urlopen(url_size).read().decode('utf-8')) + m = re.search(r'
    \s*, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-02-25 13:29+0100\n" +"PO-Revision-Date: 2014-02-25 13:30+0100\n" +"Last-Translator: Radek Czajka \n" +"Language-Team: LANGUAGE \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==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.5.4\n" + +#: forms.py:29 +#, python-format +msgid "Image already in repository." +msgstr "Obraz jest już w repozytorium." + +#: forms.py:60 +msgid "Flickr URL" +msgstr "URL z Flickra" + +#: models.py:19 +msgid "title" +msgstr "tytuł" + +#: models.py:20 +msgid "author" +msgstr "autor" + +#: models.py:21 +msgid "license name" +msgstr "nazwa licencji" + +#: models.py:22 +msgid "license URL" +msgstr "URL licencji" + +#: models.py:23 +msgid "source URL" +msgstr "URL źródła" + +#: models.py:24 +msgid "image download URL" +msgstr "URL pliku do pobrania" + +#: models.py:25 +msgid "file" +msgstr "plik" + +#: models.py:28 +msgid "cover image" +msgstr "obrazek na okładkę" + +#: models.py:29 +msgid "cover images" +msgstr "obrazki na okładki" + +#: templates/cover/add_image.html:33 templates/cover/add_image.html.py:62 +msgid "Add image" +msgstr "Dodaj obrazek" + +#: templates/cover/add_image.html:40 +msgid "Load from Flickr" +msgstr "Pobierz z Flickra" + +#: templates/cover/image_detail.html:7 +msgid "Cover image" +msgstr "Obrazek na okładkę" + +#: templates/cover/image_detail.html:23 +msgid "source" +msgstr "źródło" + +#: templates/cover/image_detail.html:35 +msgid "Change" +msgstr "Zmień" + +#: templates/cover/image_detail.html:41 +msgid "Used in:" +msgstr "Użyte w:" + +#: templates/cover/image_detail.html:49 +msgid "None" +msgstr "Brak" + +#: templates/cover/image_list.html:7 +msgid "Cover images" +msgstr "Obrazki na okładki" + +#: templates/cover/image_list.html:10 +msgid "Add new" +msgstr "Dodaj nowy" diff --git a/apps/cover/migrations/0001_initial.py b/apps/cover/migrations/0001_initial.py new file mode 100644 index 00000000..f31c405f --- /dev/null +++ b/apps/cover/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Image' + db.create_table('cover_image', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), + ('author', self.gf('django.db.models.fields.CharField')(max_length=255)), + ('license_name', self.gf('django.db.models.fields.CharField')(max_length=255)), + ('license_url', self.gf('django.db.models.fields.URLField')(max_length=255, blank=True)), + ('source_url', self.gf('django.db.models.fields.URLField')(max_length=200)), + ('download_url', self.gf('django.db.models.fields.URLField')(unique=True, max_length=200)), + ('file', self.gf('django.db.models.fields.files.ImageField')(max_length=100)), + )) + db.send_create_signal('cover', ['Image']) + + + def backwards(self, orm): + # Deleting model 'Image' + db.delete_table('cover_image') + + + models = { + 'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['cover'] \ No newline at end of file diff --git a/apps/cover/migrations/0002_auto__chg_field_image_download_url.py b/apps/cover/migrations/0002_auto__chg_field_image_download_url.py new file mode 100644 index 00000000..8a64c39d --- /dev/null +++ b/apps/cover/migrations/0002_auto__chg_field_image_download_url.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'Image.download_url' + db.alter_column(u'cover_image', 'download_url', self.gf('django.db.models.fields.URLField')(max_length=200, unique=True, null=True)) + + def backwards(self, orm): + + # User chose to not deal with backwards NULL issues for 'Image.download_url' + raise RuntimeError("Cannot reverse this migration. 'Image.download_url' and its values cannot be restored.") + + models = { + u'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['cover'] \ No newline at end of file diff --git a/apps/cover/migrations/0003_auto__chg_field_image_source_url.py b/apps/cover/migrations/0003_auto__chg_field_image_source_url.py new file mode 100644 index 00000000..98951e35 --- /dev/null +++ b/apps/cover/migrations/0003_auto__chg_field_image_source_url.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'Image.source_url' + db.alter_column(u'cover_image', 'source_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True)) + + def backwards(self, orm): + + # User chose to not deal with backwards NULL issues for 'Image.source_url' + raise RuntimeError("Cannot reverse this migration. 'Image.source_url' and its values cannot be restored.") + + models = { + u'cover.image': { + 'Meta': {'object_name': 'Image'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True'}), + 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), + 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + } + } + + complete_apps = ['cover'] \ No newline at end of file diff --git a/apps/cover/migrations/__init__.py b/apps/cover/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/apps/cover/models.py b/apps/cover/models.py new file mode 100644 index 00000000..e9296889 --- /dev/null +++ b/apps/cover/models.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +import re +from urlparse import urljoin +from django.conf import settings +from django.core.files.base import ContentFile +from django.db import models +from django.db.models.signals import post_save +from django.dispatch import receiver +from django.utils.translation import ugettext_lazy as _ +from django.contrib.sites.models import Site +from cover.utils import URLOpener + + +class Image(models.Model): + title = models.CharField(max_length=255, verbose_name=_('title')) + author = models.CharField(max_length=255, verbose_name=_('author')) + license_name = models.CharField(max_length=255, verbose_name=_('license name')) + license_url = models.URLField(max_length=255, blank=True, verbose_name=_('license URL')) + source_url = models.URLField(verbose_name=_('source URL'), null=True, blank=True) + download_url = models.URLField(unique=True, verbose_name=_('image download URL'), null=True, blank=True) + file = models.ImageField(upload_to='cover/image', editable=True, verbose_name=_('file')) + + class Meta: + verbose_name = _('cover image') + verbose_name_plural = _('cover images') + + def __unicode__(self): + return u"%s - %s" % (self.author, self.title) + + @models.permalink + def get_absolute_url(self): + return ('cover_image', [self.id]) + + def get_full_url(self): + return "http://%s%s" % (Site.objects.get_current().domain, self.get_absolute_url()) + + +@receiver(post_save, sender=Image) +def download_image(sender, instance, **kwargs): + if instance.pk and not instance.file: + t = URLOpener().open(instance.download_url).read() + instance.file.save("%d.jpg" % instance.pk, ContentFile(t)) + + diff --git a/apps/cover/templates/cover/add_image.html b/apps/cover/templates/cover/add_image.html new file mode 100755 index 00000000..9e3c71d7 --- /dev/null +++ b/apps/cover/templates/cover/add_image.html @@ -0,0 +1,67 @@ +{% extends "catalogue/base.html" %} +{% load i18n %} + +{% block add_js %} + {{block.super}} + +{% endblock %} + +{% block content %} +

    {% trans "Add image" %}

    + + +
    {% csrf_token %} + + + {{ ff.as_table }} + +
    +
    + +
    {% csrf_token %} +{{ form.non_field_errors }} + + {% for field in form %} + {% if field.name != 'download_url' and field.name != 'file' %} + + + + + {% endif %} + {% endfor %} + + + + + + + + +
    {{field.errors}} {{field.label}}{{field}}
    {{ form.download_url.errors }} {{form.download_url.label}}{{form.download_url}}{{ form.file.errors }} Lub {{form.file.label}}{{form.file}}
    +
    + + +{% endblock %} diff --git a/apps/cover/templates/cover/image_detail.html b/apps/cover/templates/cover/image_detail.html new file mode 100755 index 00000000..ee6a762f --- /dev/null +++ b/apps/cover/templates/cover/image_detail.html @@ -0,0 +1,58 @@ +{% extends "catalogue/base.html" %} +{% load i18n %} +{% load thumbnail %} +{% load build_absolute_uri from common_tags %} + +{% block content %} +

    {% trans "Cover image" %}

    + +
    + + + +
    {{ object.title }} by {{ object.author }}, + {% if object.license_url %}{% endif %} + {{ object.license_name }} + {% if object.license_url %}{% endif %} + +
    {% trans "source" %}: {{ object.download_url }} +
    + + +{% if editable %} +
    + {% csrf_token %} + {{ form.non_field_errors }} +{% endif %} + + {{ form.as_table }} + {% if editable %} + + {% endif %} +
    +{% if editable %}
    {% endif %} + + +

    {% trans "Used in:" %}

    +{% if object.book_set %} +
      + {% for book in object.book_set.all %} +
    • {{ book }}
    • + {% endfor %} +
    +{% else %} +

    {% trans "None" %}

    +{% endif %} + + + +{% endblock %} diff --git a/apps/cover/templates/cover/image_list.html b/apps/cover/templates/cover/image_list.html new file mode 100755 index 00000000..2b799fe5 --- /dev/null +++ b/apps/cover/templates/cover/image_list.html @@ -0,0 +1,30 @@ +{% extends "catalogue/base.html" %} +{% load i18n %} +{% load thumbnail pagination_tags %} + + +{% block content %} +

    {% trans "Cover images" %}

    + +{% if can_add %} + {% trans "Add new" %} +{% endif %} + +
      +{% autopaginate object_list 100 %} +{% for image in object_list %} + + + +
      + {{ image }}
      +{% endfor %} +{% paginate %} +
    + +{% endblock %} diff --git a/apps/cover/tests.py b/apps/cover/tests.py new file mode 100644 index 00000000..2f5b304e --- /dev/null +++ b/apps/cover/tests.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from nose.tools import * +from django.test import TestCase +from cover.forms import FlickrForm + + +class FlickrTests(TestCase): + def test_flickr(self): + form = FlickrForm({"source_url": "https://www.flickr.com/photos/rczajka/6941928577/in/photostream"}) + self.assertTrue(form.is_valid()) + self.assertEqual(form.cleaned_data['source_url'], "https://www.flickr.com/photos/rczajka/6941928577/") + self.assertEqual(form.cleaned_data['author'], "rczajka@Flickr") + self.assertEqual(form.cleaned_data['title'], u"Pirate Stańczyk") + self.assertEqual(form.cleaned_data['license_name'], "CC BY 2.0") + self.assertEqual(form.cleaned_data['license_url'], "http://creativecommons.org/licenses/by/2.0/deed.en") + self.assertEqual(form.cleaned_data['download_url'], "https://farm8.staticflickr.com/7069/6941928577_415844c58e_o.jpg") diff --git a/apps/cover/urls.py b/apps/cover/urls.py new file mode 100644 index 00000000..f1a48d35 --- /dev/null +++ b/apps/cover/urls.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.conf.urls import patterns, url + + +urlpatterns = patterns('cover.views', + url(r'^preview/$', 'preview_from_xml', name='cover_preview'), + url(r'^preview/(?P[^/]+)/$', 'preview', name='cover_preview'), + url(r'^preview/(?P[^/]+)/(?P[^/]+)/$', + 'preview', name='cover_preview'), + url(r'^preview/(?P[^/]+)/(?P[^/]+)/(?P\d+)/$', + 'preview', name='cover_preview'), + + url(r'^image/$', 'image_list', name='cover_image_list'), + url(r'^image/(?P\d+)/?$', 'image', name='cover_image'), + url(r'^add_image/$', 'add_image', name='cover_add_image'), +) diff --git a/apps/cover/utils.py b/apps/cover/utils.py new file mode 100755 index 00000000..e22fa727 --- /dev/null +++ b/apps/cover/utils.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from urllib import FancyURLopener +from django.contrib.sites.models import Site + + +class URLOpener(FancyURLopener): + @property + def version(self): + return 'FNP Redakcja (http://%s)' % Site.objects.get_current() diff --git a/apps/cover/views.py b/apps/cover/views.py new file mode 100644 index 00000000..6b3344b4 --- /dev/null +++ b/apps/cover/views.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +import os.path +from django.conf import settings +from django.contrib.auth.decorators import permission_required +from django.http import HttpResponse, HttpResponseRedirect, Http404 +from django.shortcuts import get_object_or_404, render +from django.views.decorators.csrf import csrf_exempt +from django.views.decorators.http import require_POST +from catalogue.helpers import active_tab +from catalogue.models import Chunk +from cover.models import Image +from cover import forms + + +PREVIEW_SIZE = (216, 300) + + +def preview(request, book, chunk=None, rev=None): + """Creates a cover image. + + If chunk and rev number are given, use version from given revision. + If rev is not given, use publishable version. + """ + from PIL import Image + from librarian.cover import DefaultEbookCover + from librarian.dcparser import BookInfo + + chunk = Chunk.get(book, chunk) + if rev is not None: + try: + revision = chunk.at_revision(rev) + except Chunk.change_model.DoesNotExist: + raise Http404 + else: + revision = chunk.publishable() + if revision is None: + raise Http404 + xml = revision.materialize().encode('utf-8') + + try: + info = BookInfo.from_string(xml) + except: + return HttpResponseRedirect(os.path.join(settings.STATIC_URL, "img/sample_cover.png")) + cover = DefaultEbookCover(info) + response = HttpResponse(mimetype=cover.mime_type()) + image = cover.image().resize(PREVIEW_SIZE, Image.ANTIALIAS) + image.save(response, cover.format) + return response + + +@csrf_exempt +@require_POST +def preview_from_xml(request): + from hashlib import sha1 + from PIL import Image + from os import makedirs + from lxml import etree + from librarian.cover import DefaultEbookCover + from librarian.dcparser import BookInfo + + xml = request.POST['xml'] + try: + info = BookInfo.from_string(xml.encode('utf-8')) + except: + return HttpResponse(os.path.join(settings.STATIC_URL, "img/sample_cover.png")) + coverid = sha1(etree.tostring(info.to_etree())).hexdigest() + cover = DefaultEbookCover(info) + + cover_dir = 'cover/preview' + try: + makedirs(os.path.join(settings.MEDIA_ROOT, cover_dir)) + except OSError: + pass + fname = os.path.join(cover_dir, "%s.%s" % (coverid, cover.ext())) + image = cover.image().resize(PREVIEW_SIZE, Image.ANTIALIAS) + image.save(os.path.join(settings.MEDIA_ROOT, fname)) + return HttpResponse(os.path.join(settings.MEDIA_URL, fname)) + + +@active_tab('cover') +def image(request, pk): + image = get_object_or_404(Image, pk=pk) + + if request.user.has_perm('cover.change_image'): + if request.method == "POST": + form = forms.ImageEditForm(request.POST, request.FILES, instance=image) + if form.is_valid(): + form.save() + return HttpResponseRedirect(image.get_absolute_url()) + else: + form = forms.ImageEditForm(instance=image) + editable = True + else: + form = forms.ReadonlyImageEditForm(instance=image) + editable = False + + return render(request, "cover/image_detail.html", { + "object": image, + "form": form, + "editable": editable, + }) + + +@active_tab('cover') +def image_list(request): + objects = Image.objects.all() + enable_add = request.user.has_perm('cover.add_image') + return render(request, "cover/image_list.html", { + 'object_list': Image.objects.all(), + 'can_add': request.user.has_perm('cover.add_image'), + }) + + +@permission_required('cover.add_image') +@active_tab('cover') +def add_image(request): + form = ff = None + if request.method == 'POST': + if request.POST.get('form_id') == 'flickr': + ff = forms.FlickrForm(request.POST) + if ff.is_valid(): + form = forms.ImageAddForm(ff.cleaned_data) + else: + form = forms.ImageAddForm(request.POST, request.FILES) + if form.is_valid(): + obj = form.save() + return HttpResponseRedirect(obj.get_absolute_url()) + if form is None: + form = forms.ImageAddForm() + if ff is None: + ff = forms.FlickrForm() + return render(request, 'cover/add_image.html', { + 'form': form, + 'ff': ff, + }) diff --git a/apps/django_cas/__init__.py b/apps/django_cas/__init__.py deleted file mode 100644 index 14f71beb..00000000 --- a/apps/django_cas/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Django CAS 1.0/2.0 authentication backend""" - -from django.conf import settings - -__all__ = [] - -_DEFAULTS = { - 'CAS_ADMIN_PREFIX': None, - 'CAS_EXTRA_LOGIN_PARAMS': None, - 'CAS_IGNORE_REFERER': False, - 'CAS_LOGOUT_COMPLETELY': True, - 'CAS_REDIRECT_URL': '/', - 'CAS_RETRY_LOGIN': False, - 'CAS_SERVER_URL': None, - 'CAS_VERSION': '2', -} - -for key, value in _DEFAULTS.iteritems(): - try: - getattr(settings, key) - except AttributeError: - setattr(settings, key, value) - # Suppress errors from DJANGO_SETTINGS_MODULE not being set - except ImportError: - pass diff --git a/apps/django_cas/backends.py b/apps/django_cas/backends.py deleted file mode 100644 index 4cf9f625..00000000 --- a/apps/django_cas/backends.py +++ /dev/null @@ -1,117 +0,0 @@ -"""CAS authentication backend""" - -from urllib import urlencode, urlopen -from urlparse import urljoin -from django.conf import settings -from django_cas.models import User - -__all__ = ['CASBackend'] - - -def _verify_cas1(ticket, service): - """Verifies CAS 1.0 authentication ticket. - - Returns (username, None) on success and (None, None) on failure. - """ - - params = {'ticket': ticket, 'service': service} - url = (urljoin(settings.CAS_SERVER_URL, 'validate') + '?' + - urlencode(params)) - page = urlopen(url) - try: - verified = page.readline().strip() - if verified == 'yes': - return page.readline().strip(), None - else: - return None, None - finally: - page.close() - - -def _verify_cas2(ticket, service): - """Verifies CAS 2.0+ XML-based authentication ticket. - - Returns (username, attr_dict) on success and (None, None) on failure. - """ - - try: - from lxml import etree as ElementTree - except ImportError: - from elementtree import ElementTree - - params = {'ticket': ticket, 'service': service} - url = (urljoin(settings.CAS_SERVER_URL, 'serviceValidate') + '?' + - urlencode(params)) - page = urlopen(url) - try: - response = page.read() - tree = ElementTree.fromstring(response) - if tree[0].tag.endswith('authenticationSuccess'): - attrs = {} - for tag in tree[0][1:]: - attrs[tag.tag] = tag.text - return tree[0][0].text, attrs - else: - return None, None - except: - import traceback - traceback.print_exc() - print "****", url - print response - print "****" - finally: - page.close() - - -_PROTOCOLS = {'1': _verify_cas1, '2': _verify_cas2} - -if settings.CAS_VERSION not in _PROTOCOLS: - raise ValueError('Unsupported CAS_VERSION %r' % settings.CAS_VERSION) - -_verify = _PROTOCOLS[settings.CAS_VERSION] - - -class CASBackend(object): - """CAS authentication backend""" - - def authenticate(self, ticket, service): - """Verifies CAS ticket and gets or creates User object""" - - username, attrs = _verify(ticket, service) - if not username: - return None - - user_attrs = {} - if hasattr(settings, 'CAS_USER_ATTRS_MAP'): - attr_map = settings.CAS_USER_ATTRS_MAP - for k, v in attrs.items(): - if k in attr_map: - user_attrs[attr_map[k]] = v # unicode(v, 'utf-8') - - try: - user = User.objects.get(username__iexact=username) - # update user info - changed = False - for k, v in user_attrs.items(): - if getattr(user, k) != v: - setattr(user, k, v) - changed = True - if changed: - user.save() - except User.DoesNotExist: - # user will have an "unusable" password - user = User.objects.create_user(username, '') - for k, v in user_attrs.items(): - setattr(user, k, v) - user.first_name = attrs.get('firstname', '') - user.last_name = attrs.get('lastname', '') - user.save() - return user - - def get_user(self, user_id): - """Retrieve the user's entry in the User model if it exists""" - - try: - return User.objects.get(pk=user_id) - except User.DoesNotExist: - return None diff --git a/apps/django_cas/decorators.py b/apps/django_cas/decorators.py deleted file mode 100644 index 0bf989b9..00000000 --- a/apps/django_cas/decorators.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Replacement authentication decorators that work around redirection loops""" - -try: - from functools import wraps -except ImportError: - from django.utils.functional import wraps - -from django.contrib.auth import REDIRECT_FIELD_NAME -from django.contrib.auth.decorators import login_required -from django.http import HttpResponseForbidden, HttpResponseRedirect -from django.utils.http import urlquote - -__all__ = ['login_required', 'permission_required', 'user_passes_test'] - - -def user_passes_test(test_func, login_url=None, - redirect_field_name=REDIRECT_FIELD_NAME): - """Replacement for django.contrib.auth.decorators.user_passes_test that - returns 403 Forbidden if the user is already logged in. - """ - - if not login_url: - from django.conf import settings - login_url = settings.LOGIN_URL - - def decorator(view_func): - @wraps(view_func) - def wrapper(request, *args, **kwargs): - if test_func(request.user): - return view_func(request, *args, **kwargs) - elif request.user.is_authenticated(): - return HttpResponseForbidden('

    Permission denied

    ') - else: - path = '%s?%s=%s' % (login_url, redirect_field_name, - urlquote(request.get_full_path())) - return HttpResponseRedirect(path) - return wrapper - return decorator - - -def permission_required(perm, login_url=None): - """Replacement for django.contrib.auth.decorators.permission_required that - returns 403 Forbidden if the user is already logged in. - """ - - return user_passes_test(lambda u: u.has_perm(perm), login_url=login_url) diff --git a/apps/django_cas/middleware.py b/apps/django_cas/middleware.py deleted file mode 100644 index 35fd0d5d..00000000 --- a/apps/django_cas/middleware.py +++ /dev/null @@ -1,53 +0,0 @@ -"""CAS authentication middleware""" - -from urllib import urlencode - -from django.http import HttpResponseRedirect, HttpResponseForbidden -from django.conf import settings -from django.contrib.auth import REDIRECT_FIELD_NAME -from django.contrib.auth.views import login, logout -from django.core.urlresolvers import reverse - -from django_cas.views import login as cas_login, logout as cas_logout - -__all__ = ['CASMiddleware'] - - -class CASMiddleware(object): - """Middleware that allows CAS authentication on admin pages""" - - def process_request(self, request): - """Checks that the authentication middleware is installed""" - - error = ("The Django CAS middleware requires authentication " - "middleware to be installed. Edit your MIDDLEWARE_CLASSES " - "setting to insert 'django.contrib.auth.middleware." - "AuthenticationMiddleware'.") - # assert hasattr(request, 'user'), error - - def process_view(self, request, view_func, view_args, view_kwargs): - """Forwards unauthenticated requests to the admin page to the CAS - login URL, as well as calls to django.contrib.auth.views.login and - logout. - """ - - if view_func == login: - return cas_login(request, *view_args, **view_kwargs) - elif view_func == logout: - return cas_logout(request, *view_args, **view_kwargs) - - if settings.CAS_ADMIN_PREFIX: - if not request.path.startswith(settings.CAS_ADMIN_PREFIX): - return None - elif not view_func.__module__.startswith('django.contrib.admin.'): - return None - - if request.user.is_authenticated(): - if request.user.is_staff: - return None - else: - error = ('

    Forbidden

    You do not have staff ' - 'privileges.

    ') - return HttpResponseForbidden(error) - params = urlencode({REDIRECT_FIELD_NAME: request.get_full_path()}) - return HttpResponseRedirect(reverse(cas_login) + '?' + params) diff --git a/apps/django_cas/models.py b/apps/django_cas/models.py deleted file mode 100644 index 85206e00..00000000 --- a/apps/django_cas/models.py +++ /dev/null @@ -1,2 +0,0 @@ -from django.db import models -from django.contrib.auth.models import User diff --git a/apps/django_cas/views.py b/apps/django_cas/views.py deleted file mode 100644 index dee32797..00000000 --- a/apps/django_cas/views.py +++ /dev/null @@ -1,112 +0,0 @@ -"""CAS login/logout replacement views""" - -from urllib import urlencode -from urlparse import urljoin - -from django.http import get_host, HttpResponseRedirect, HttpResponseForbidden -from django.conf import settings -from django.contrib.auth import REDIRECT_FIELD_NAME - -__all__ = ['login', 'logout'] - - -def _service_url(request, redirect_to=None): - """Generates application service URL for CAS""" - - protocol = ('http://', 'https://')[request.is_secure()] - host = get_host(request) - service = protocol + host + request.path - if redirect_to: - if '?' in service: - service += '&' - else: - service += '?' - service += urlencode({REDIRECT_FIELD_NAME: redirect_to.encode('utf-8')}) - return service - - -def _redirect_url(request): - """Redirects to referring page, or CAS_REDIRECT_URL if no referrer is - set. - """ - - next = request.GET.get(REDIRECT_FIELD_NAME) - if not next: - if settings.CAS_IGNORE_REFERER: - next = settings.CAS_REDIRECT_URL - else: - next = request.META.get('HTTP_REFERER', settings.CAS_REDIRECT_URL) - prefix = (('http://', 'https://')[request.is_secure()] + - get_host(request)) - if next.startswith(prefix): - next = next[len(prefix):] - return next - - -def _login_url(service): - """Generates CAS login URL""" - - params = {'service': service} - if settings.CAS_EXTRA_LOGIN_PARAMS: - params.update(settings.CAS_EXTRA_LOGIN_PARAMS) - return urljoin(settings.CAS_SERVER_URL, 'login') + '?' + urlencode(params) - - -def _logout_url(request, next_page=None): - """Generates CAS logout URL""" - - url = urljoin(settings.CAS_SERVER_URL, 'logout') - if next_page: - protocol = ('http://', 'https://')[request.is_secure()] - host = get_host(request) - url += '?' + urlencode({'url': protocol + host + next_page}) - return url - - -def login(request, next_page=None, required=False): - """Forwards to CAS login URL or verifies CAS ticket""" - - print "LOGIN original NEXT_PAGE:", next_page - print request.GET - if not next_page: - next_page = _redirect_url(request) - print "LOGIN redirect NEXT_PAGE:", next_page - - if request.user.is_authenticated(): - message = "You are logged in as %s." % request.user.username - request.user.message_set.create(message=message) - return HttpResponseRedirect(next_page) - ticket = request.GET.get('ticket') - service = _service_url(request, next_page) - print "TICKET: ", ticket - print "SERVICE: ", service - if ticket: - from django.contrib import auth - user = auth.authenticate(ticket=ticket, service=service) - if user is not None: - auth.login(request, user) - name = user.first_name or user.username - message = "Login succeeded. Welcome, %s." % name - user.message_set.create(message=message) - return HttpResponseRedirect(next_page) - elif settings.CAS_RETRY_LOGIN or required: - return HttpResponseRedirect(_login_url(service)) - else: - error = "

    Forbidden

    Login failed.

    " - return HttpResponseForbidden(error) - - else: - return HttpResponseRedirect(_login_url(service)) - - -def logout(request, next_page=None): - """Redirects to CAS logout page""" - - from django.contrib.auth import logout - logout(request) - if not next_page: - next_page = _redirect_url(request) - if settings.CAS_LOGOUT_COMPLETELY: - return HttpResponseRedirect(_logout_url(request, next_page)) - else: - return HttpResponseRedirect(next_page) diff --git a/apps/dvcs/models.py b/apps/dvcs/models.py index 2526028f..ec647946 100644 --- a/apps/dvcs/models.py +++ b/apps/dvcs/models.py @@ -7,7 +7,7 @@ from django.core.files.storage import FileSystemStorage from django.db import models, transaction from django.db.models.base import ModelBase from django.utils.translation import string_concat, ugettext_lazy as _ -from mercurial import mdiff, simplemerge +from mercurial import simplemerge from django.conf import settings from dvcs.signals import post_commit, post_publishable @@ -43,7 +43,7 @@ class Tag(models.Model): def listener_changed(sender, instance, **kwargs): sender._object_cache = {} - def next(self): + def get_next(self): """ Returns the next tag - stage to work on. Returns None for the last stage. @@ -166,8 +166,6 @@ class Change(models.Model): post_publishable.send(sender=self, publishable=publishable) - - def create_tag_model(model): name = model.__name__ + 'Tag' @@ -286,7 +284,7 @@ class Document(models.Model): tags = kwargs.get('tags', []) if tags: # set stage to next tag after the commited one - self.stage = max(tags, key=lambda t: t.ordering).next() + self.stage = max(tags, key=lambda t: t.ordering).get_next() change = self.change_set.create(author=author, author_name=author_name, diff --git a/apps/dvcs/tests.py b/apps/dvcs/tests.py deleted file mode 100644 index 0c712957..00000000 --- a/apps/dvcs/tests.py +++ /dev/null @@ -1,164 +0,0 @@ -from django.test import TestCase -from dvcs.models import Change, Document -from django.contrib.auth.models import User - -class DocumentModelTests(TestCase): - - def setUp(self): - self.user = User.objects.create_user("tester", "tester@localhost.local") - - def assertTextEqual(self, given, expected): - return self.assertEqual(given, expected, - "Expected '''%s'''\n differs from text: '''%s'''" % (expected, given) - ) - - def test_empty_file(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - self.assert_(doc.head is not None) - self.assertEqual(doc.materialize(), u"") - - def test_single_commit(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - doc.commit(text=u"Ala ma kota", description="Commit #1", author=self.user) - self.assert_(doc.head is not None) - self.assertEqual(doc.change_set.count(), 2) - self.assertEqual(doc.materialize(), u"Ala ma kota") - - def test_chained_commits(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - c1 = doc.commit(description="Commit #1", text=u""" - Line #1 - Line #2 is cool - """, author=self.user) - c2 = doc.commit(description="Commit #2", text=u""" - Line #1 - Line #2 is hot - """, author=self.user) - c3 = doc.commit(description="Commit #3", text=u""" - Line #1 - ... is hot - Line #3 ate Line #2 - """, author=self.user) - self.assert_(doc.head is not None) - self.assertEqual(doc.change_set.count(), 4) - - self.assertEqual(doc.materialize(), u""" - Line #1 - ... is hot - Line #3 ate Line #2 - """) - self.assertEqual(doc.materialize(version=c3), u""" - Line #1 - ... is hot - Line #3 ate Line #2 - """) - self.assertEqual(doc.materialize(version=c2), u""" - Line #1 - Line #2 is hot - """) - self.assertEqual(doc.materialize(version=c1), """ - Line #1 - Line #2 is cool - """) - - - def test_parallel_commit_noconflict(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - self.assert_(doc.head is not None) - base = doc.head - base = doc.commit(description="Commit #1", text=u""" - Line #1 - Line #2 -""", author=self.user) - - c1 = doc.commit(description="Commit #2", text=u""" - Line #1 is hot - Line #2 -""", parent=base, author=self.user) - self.assertTextEqual(c1.materialize(), u""" - Line #1 is hot - Line #2 -""") - c2 = doc.commit(description="Commit #3", text=u""" - Line #1 - Line #2 - Line #3 -""", parent=base, author=self.user) - self.assertEqual(doc.change_set.count(), 5) - self.assertTextEqual(doc.materialize(), u""" - Line #1 is hot - Line #2 - Line #3 -""") - - def test_parallel_commit_conflict(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - self.assert_(doc.head is not None) - base = doc.head - base = doc.commit(description="Commit #1", text=u""" -Line #1 -Line #2 -Line #3 -""", author=self.user) - - c1 = doc.commit(description="Commit #2", text=u""" -Line #1 -Line #2 is hot -Line #3 -""", parent=base, author=self.user) - c2 = doc.commit(description="Commit #3", text=u""" -Line #1 -Line #2 is cool -Line #3 -""", parent=base, author=self.user) - self.assertEqual(doc.change_set.count(), 5) - self.assertTextEqual(doc.materialize(), u""" -Line #1 -<<<<<<< -Line #2 is hot -======= -Line #2 is cool ->>>>>>> -Line #3 -""") - - def test_multiply_parallel_commits(self): - doc = Document.objects.create(name=u"Sample Document", creator=self.user) - self.assert_(doc.head is not None) - c1 = doc.commit(description="Commit A1", text=u""" -Line #1 - -Line #2 - -Line #3 -""", author=self.user) - c2 = doc.commit(description="Commit A2", text=u""" -Line #1 * - -Line #2 - -Line #3 -""", author=self.user) - c3 = doc.commit(description="Commit B1", text=u""" -Line #1 - -Line #2 ** - -Line #3 -""", parent=c1, author=self.user) - c4 = doc.commit(description="Commit C1", text=u""" -Line #1 * - -Line #2 - -Line #3 *** -""", parent=c2, author=self.user) - self.assertEqual(doc.change_set.count(), 7) - self.assertTextEqual(doc.materialize(), u""" -Line #1 * - -Line #2 ** - -Line #3 *** -""") - diff --git a/apps/dvcs/urls.py b/apps/dvcs/urls.py deleted file mode 100644 index d1e1e296..00000000 --- a/apps/dvcs/urls.py +++ /dev/null @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -from django.conf.urls.defaults import * - -urlpatterns = patterns('dvcs.views', - url(r'^data/(?P[^/]+)/(?P.*)$', 'document_data', name='storage_document_data'), -) diff --git a/apps/filebrowser/LICENSE b/apps/filebrowser/LICENSE deleted file mode 100644 index c42f6c2b..00000000 --- a/apps/filebrowser/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2009, 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/apps/filebrowser/__init__.py b/apps/filebrowser/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/filebrowser/base.py b/apps/filebrowser/base.py deleted file mode 100644 index c1240263..00000000 --- a/apps/filebrowser/base.py +++ /dev/null @@ -1,214 +0,0 @@ -# -*- coding: utf-8 - -from django.conf import settings -from django.utils.encoding import smart_unicode -from filebrowser.fb_settings import * - -from filebrowser.functions import _get_file_type, _url_join, _is_selectable, \ - _get_version_path - -from time import gmtime, strftime - -import locale -import os -import re -import datetime -import urllib - - -# filebrowser imports - -# PIL import -if STRICT_PIL: - from PIL import Image -else: - try: - from PIL import Image - except ImportError: - import Image - - -def filesystem_encoding(ucode): - ucode = ucode.encode('utf-8') - ucode = urllib.quote(ucode) - return ucode - - -class FileObject(object): - """ - The FileObject represents a File on the Server. - - PATH has to be relative to MEDIA_ROOT. - """ - - def __init__(self, path): - self.path = path - self.head = os.path.split(path)[0] - self.filename = os.path.split(path)[1] - self.filename_lower = self.filename.lower() # important for sorting - self.filetype = _get_file_type(self.filename) - - def _filesize(self): - """ - Filesize. - """ - 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.getsize(os.path.join(MEDIA_ROOT, self.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)) - # IMHO this should raise an exception - return None - 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 u"%s" % 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.path - url_relative = property(_url_relative) - - def _url_full(self): - """ - Full URL including MEDIA_URL. - """ - return filesystem_encoding(u"%s" % _url_join(MEDIA_URL, self.path)) - - url_full = property(_url_full) - - def _url_save(self): - """ - URL used for the filebrowsefield. - """ - if SAVE_FULL_URL: - return self.url_full - else: - return filesystem_encoding(self.path) - url_save = property(_url_save) - - def _url_thumbnail(self): - """ - Thumbnail URL. - """ - if self.filetype == "Image": - return filesystem_encoding(u"%s" % _url_join(MEDIA_URL, _get_version_path(self.path, u'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 filesystem_encoding(u"%s" % value) - else: - return filesystem_encoding(u"%s" % _url_join(MEDIA_URL, self.path)) - - 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 u"%s" % self.url_save - - def __str__(self): - return u"%s" % self.url_save - - def __unicode__(self): - return u"%s" % self.url_save diff --git a/apps/filebrowser/decorators.py b/apps/filebrowser/decorators.py deleted file mode 100644 index 52978898..00000000 --- a/apps/filebrowser/decorators.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 - -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/apps/filebrowser/fb_settings.py b/apps/filebrowser/fb_settings.py deleted file mode 100644 index 57bec8eb..00000000 --- a/apps/filebrowser/fb_settings.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 - -import os -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'], - 'Sound': ['.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', ], -}) - -# 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'}, -}) -# 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') - -# 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) - -DEFAULT_ORDER = getattr(settings, "FILEBROWSER_DEFAULT_ORDER", "filename_lower") - -# EXTRA TRANSLATION STRINGS -# The following strings are not availabe within views or templates -_('Folder') -_('Image') -_('Video') -_('Document') -_('Sound') -_('Code') diff --git a/apps/filebrowser/fields.py b/apps/filebrowser/fields.py deleted file mode 100644 index 78419cdc..00000000 --- a/apps/filebrowser/fields.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 - -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.functions import _url_to_path, _dir_from_url, _get_version_path, _url_join -from filebrowser.fb_settings import * -from filebrowser.base import FileObject - - -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) diff --git a/apps/filebrowser/forms.py b/apps/filebrowser/forms.py deleted file mode 100644 index 465c2bd6..00000000 --- a/apps/filebrowser/forms.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -import os -import re - -from django import forms -from django.forms.formsets import BaseFormSet -from django.utils.translation import ugettext as _ - -# filebrowser imports -from filebrowser.fb_settings import MAX_UPLOAD_SIZE -from filebrowser.functions import _get_file_type, _convert_filename - -alnum_name_re = re.compile(r'^[\sa-zA-Z0-9._/-]+$') - - -class MakeDirForm(forms.Form): - """ - Form for creating Directory. - """ - - 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.')) - # directory 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 File/Directory. - """ - - 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.')) - # file/directory must not already exist. - if os.path.isdir(os.path.join(self.path, _convert_filename(self.cleaned_data['name']))) or os.path.isfile(os.path.join(self.path, _convert_filename(self.cleaned_data['name']) + self.file_extension)): - raise forms.ValidationError(_(u'The File/Folder already exists.')) - return _convert_filename(self.cleaned_data['name']) diff --git a/apps/filebrowser/functions.py b/apps/filebrowser/functions.py deleted file mode 100644 index c8cde3f6..00000000 --- a/apps/filebrowser/functions.py +++ /dev/null @@ -1,295 +0,0 @@ -# -*- coding: utf-8 - -import os -import re -import decimal - -from django.utils.translation import ugettext as _ -from django.utils.safestring import mark_safe -from time import gmtime, strftime, localtime, mktime, time -from django.core.files import File -from django.core.files.storage import default_storage - -from urlparse import urlparse - -# filebrowser imports -from filebrowser.fb_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. - """ - print "URL2PATH", repr(value) - mediaurl_re = re.compile(r'^(%s)' % (MEDIA_URL)) - value = mediaurl_re.sub(u'', 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(os.path.join(MEDIA_ROOT, value)): - path, filename = os.path.split(value) - filename, ext = os.path.splitext(filename) - version_filename = filename + u"_" + version_prefix + ext - return os.path.join(VERSIONS_BASEDIR, path, version_filename) - else: - return None - - -def _url_join(*args): - if args[0].startswith(u"http://"): - url = u"http://" - else: - url = u"/" - for arg in args: - arg = unicode(arg).replace(u"\\", u"/") - arg_split = arg.split(u"/") - for elem in arg_split: - if elem != u"" and elem != u"http:": - url = url + elem + u"/" - # remove trailing slash for filenames - if os.path.splitext(args[-1])[1]: - url = url.rstrip(u"/") - return url - - -def _get_path(path): - """ - Get Path. - """ - - if 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. - """ - - if not os.path.isfile(os.path.join(MEDIA_ROOT, DIRECTORY, path, filename)) and not os.path.isdir(os.path.join(MEDIA_ROOT, DIRECTORY, path, filename)): - return None - return filename - - -def _get_breadcrumbs(query, path, title): - """ - 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]) - if title: - breadcrumbs.append([title, '']) - return breadcrumbs - - -def _get_filterdate(filterDate, dateTime): - """ - Get filterdate. - """ - - 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]): - return 'true' - - if filterDate == 'thismonth' and dateTime >= time() - 2592000: - return 'true' - - if filterDate == 'thisyear' and int(dateYear) == int(localtime()[0]): - return 'true' - - if filterDate == 'past7days' and dateTime >= time() - 604800: - return 'true' - - return 'true' if filterDate == '' else '' - - -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 - # 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. - """ - - file_path = os.path.join(path, file.name) - uploadedfile = default_storage.save(file_path, file) - return uploadedfile - - -def _get_file_type(filename): - """ - Get file type as defined in EXTENSIONS. - """ - file_extension = os.path.splitext(filename)[1].lower() - for ftype, ext_list in EXTENSIONS.iteritems(): - if file_extension in map(str.lower, ext_list): - return ftype - return u'' - - -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(os.path.join(MEDIA_ROOT, value)) - version_path = _get_version_path(value, version_prefix) - absolute_version_path = 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']) - try: - version.save(absolute_version_path, quality=90, optimize=1) - except IOError: - version.save(absolute_version_path, quality=90) - return version_path - except: - return None - - -def scale_and_crop(im, width, height, opts): - x, y = [float(v) for v in im.size] - 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 -scale_and_crop.valid_options = ('crop', 'upscale') - - -def _convert_filename(value): - if CONVERT_FILENAME: - return value.replace(" ", "_").lower() - else: - return value diff --git a/apps/filebrowser/locale/ca/LC_MESSAGES/django.mo b/apps/filebrowser/locale/ca/LC_MESSAGES/django.mo deleted file mode 100644 index bd8106d7..00000000 Binary files a/apps/filebrowser/locale/ca/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/ca/LC_MESSAGES/django.po b/apps/filebrowser/locale/ca/LC_MESSAGES/django.po deleted file mode 100644 index 0dca85e1..00000000 --- a/apps/filebrowser/locale/ca/LC_MESSAGES/django.po +++ /dev/null @@ -1,328 +0,0 @@ -# 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/apps/filebrowser/locale/de/LC_MESSAGES/django.mo b/apps/filebrowser/locale/de/LC_MESSAGES/django.mo deleted file mode 100644 index f15bd215..00000000 Binary files a/apps/filebrowser/locale/de/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/de/LC_MESSAGES/django.po b/apps/filebrowser/locale/de/LC_MESSAGES/django.po deleted file mode 100644 index e5686cc8..00000000 --- a/apps/filebrowser/locale/de/LC_MESSAGES/django.po +++ /dev/null @@ -1,361 +0,0 @@ -# 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. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-12 19:39+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: fb_settings.py:102 -msgid "Folder" -msgstr "" - -#: fb_settings.py:103 -msgid "Image" -msgstr "" - -#: fb_settings.py:104 -msgid "Video" -msgstr "" - -#: fb_settings.py:105 -msgid "Document" -msgstr "" - -#: fb_settings.py:106 -msgid "Sound" -msgstr "" - -#: fb_settings.py:107 -msgid "Code" -msgstr "" - -#: fields.py:56 -#, python-format -msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." -msgstr "" - -#: forms.py:24 templates/filebrowser/versions.html:55 -msgid "Name" -msgstr "" - -#: forms.py:24 forms.py:30 forms.py:47 forms.py:53 -msgid "Only letters, numbers, underscores, spaces and hyphens are allowed." -msgstr "" - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "" - -#: forms.py:47 -msgid "New Name" -msgstr "" - -#: forms.py:56 -msgid "The File/Folder already exists." -msgstr "" - -#: views.py:47 views.py:138 views.py:191 views.py:284 views.py:362 -#: views.py:418 -msgid "Directory/File does not exist." -msgstr "" - -#: views.py:51 -msgid "Error finding upload directory. Maybe it does not exist?" -msgstr "" - -#: views.py:116 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 "" - -#: views.py:164 -msgid "Permission denied." -msgstr "" - -#: views.py:166 -msgid "Error creating directory." -msgstr "" - -#: views.py:173 views.py:175 templates/filebrowser/index.html:50 -msgid "New Folder" -msgstr "" - -#: views.py:203 -msgid "Select files to upload" -msgstr "" - -#: views.py:205 templates/filebrowser/index.html:51 -#: templates/filebrowser/upload.html:110 -msgid "Upload" -msgstr "" - -#: views.py:307 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "" - -#: views.py:323 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "" - -#: views.py:388 -msgid "Renaming was successful." -msgstr "" - -#: views.py:393 -msgid "Error." -msgstr "" - -#: views.py:401 -#, python-format -msgid "Rename \"%s\"" -msgstr "" - -#: views.py:403 templates/filebrowser/include/filelisting.html:73 -msgid "Rename" -msgstr "" - -#: views.py:426 views.py:428 -#, python-format -msgid "Versions for \"%s\"" -msgstr "" - -#: templates/filebrowser/append.html:5 templates/filebrowser/append.html:7 -msgid "File-Browser" -msgstr "" - -#: templates/filebrowser/makedir.html:38 templates/filebrowser/rename.html:38 -msgid "Please correct the following errors." -msgstr "" - -#: templates/filebrowser/makedir.html:47 templates/filebrowser/rename.html:48 -#: templates/filebrowser/upload.html:83 -msgid "Help" -msgstr "" - -#: templates/filebrowser/makedir.html:52 templates/filebrowser/rename.html:53 -#: templates/filebrowser/upload.html:100 -msgid "" -"The Name will be converted to lowercase. Spaces will be replaced with " -"underscores." -msgstr "" - -#: templates/filebrowser/makedir.html:57 templates/filebrowser/rename.html:58 -msgid "Submit" -msgstr "" - -#: templates/filebrowser/upload.html:35 -msgid "BROWSE" -msgstr "" - -#: templates/filebrowser/upload.html:36 -msgid "An Error occured" -msgstr "" - -#: templates/filebrowser/upload.html:37 -msgid "Completed" -msgstr "" - -#: templates/filebrowser/upload.html:38 -msgid "Do you want to replace the file" -msgstr "" - -#: templates/filebrowser/upload.html:39 -msgid "KB" -msgstr "" - -#: templates/filebrowser/upload.html:40 -msgid "MB" -msgstr "" - -#: templates/filebrowser/upload.html:87 -msgid "Allowed" -msgstr "" - -#: templates/filebrowser/upload.html:93 -msgid "Max. Filesize" -msgstr "" - -#: templates/filebrowser/upload.html:108 -msgid "Clear Queue" -msgstr "" - -#: templates/filebrowser/versions.html:57 -msgid "Image Version" -msgstr "" - -#: templates/filebrowser/versions.html:58 -msgid "Debug" -msgstr "" - -#: templates/filebrowser/versions.html:70 -#: templates/filebrowser/include/filelisting.html:10 -msgid "Select" -msgstr "" - -#: templates/filebrowser/versions.html:81 -#: templates/filebrowser/versions.html:92 -#: templates/filebrowser/include/filelisting.html:24 -#: templates/filebrowser/include/filelisting.html:38 -msgid "Select File" -msgstr "" - -#: templates/filebrowser/versions.html:102 -msgid "Width" -msgstr "" - -#: templates/filebrowser/versions.html:103 -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 "" - -#: 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: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] "" -msgstr[1] "" - -#: 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] "" -msgstr[1] "" - -#: templates/filebrowser/include/search.html:4 -#, python-format -msgid "%(full_result_count)s total" -msgstr "" - -#: templates/filebrowser/include/search.html:5 -msgid "Clear Restrictions" -msgstr "" - -#: templates/filebrowser/include/search.html:7 -msgid "Search" -msgstr "" - -#: templates/filebrowser/include/search.html:21 -#: templates/filebrowser/include/toolbar.html:15 -msgid "Go" -msgstr "" - -#: templates/filebrowser/include/search.html:26 -#: templates/filebrowser/include/toolbar.html:18 -#, python-format -msgid "%(counter)s Item found" -msgid_plural "%(counter)s Items found" -msgstr[0] "" -msgstr[1] "" - -#: templates/filebrowser/include/search.html:27 -#: templates/filebrowser/include/toolbar.html:19 -#, python-format -msgid "%(counter)s Item total" -msgid_plural "%(counter)s Items total" -msgstr[0] "" -msgstr[1] "" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Filename" -msgstr "" - -#: templates/filebrowser/include/tableheader.html:27 -#: templates/filebrowser/include/tableheader.html:28 -msgid "Size" -msgstr "" - -#: templates/filebrowser/include/tableheader.html:31 -#: templates/filebrowser/include/tableheader.html:32 -msgid "Date" -msgstr "" diff --git a/apps/filebrowser/locale/es/LC_MESSAGES/django.mo b/apps/filebrowser/locale/es/LC_MESSAGES/django.mo deleted file mode 100644 index bb698f80..00000000 Binary files a/apps/filebrowser/locale/es/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/es/LC_MESSAGES/django.po b/apps/filebrowser/locale/es/LC_MESSAGES/django.po deleted file mode 100644 index 621979a7..00000000 --- a/apps/filebrowser/locale/es/LC_MESSAGES/django.po +++ /dev/null @@ -1,328 +0,0 @@ -# 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/apps/filebrowser/locale/fr/LC_MESSAGES/django.mo b/apps/filebrowser/locale/fr/LC_MESSAGES/django.mo deleted file mode 100644 index 26e610df..00000000 Binary files a/apps/filebrowser/locale/fr/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/fr/LC_MESSAGES/django.po b/apps/filebrowser/locale/fr/LC_MESSAGES/django.po deleted file mode 100644 index 52411661..00000000 --- a/apps/filebrowser/locale/fr/LC_MESSAGES/django.po +++ /dev/null @@ -1,336 +0,0 @@ -# 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/apps/filebrowser/locale/it/LC_MESSAGES/django.mo b/apps/filebrowser/locale/it/LC_MESSAGES/django.mo deleted file mode 100644 index 90e8cdcb..00000000 Binary files a/apps/filebrowser/locale/it/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/it/LC_MESSAGES/django.po b/apps/filebrowser/locale/it/LC_MESSAGES/django.po deleted file mode 100644 index 69682865..00000000 --- a/apps/filebrowser/locale/it/LC_MESSAGES/django.po +++ /dev/null @@ -1,356 +0,0 @@ -# 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/apps/filebrowser/locale/nl/LC_MESSAGES/django.mo b/apps/filebrowser/locale/nl/LC_MESSAGES/django.mo deleted file mode 100644 index 8a0bb8f3..00000000 Binary files a/apps/filebrowser/locale/nl/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/nl/LC_MESSAGES/django.po b/apps/filebrowser/locale/nl/LC_MESSAGES/django.po deleted file mode 100644 index 35032548..00000000 --- a/apps/filebrowser/locale/nl/LC_MESSAGES/django.po +++ /dev/null @@ -1,319 +0,0 @@ -# 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/apps/filebrowser/locale/ru/LC_MESSAGES/django.mo b/apps/filebrowser/locale/ru/LC_MESSAGES/django.mo deleted file mode 100644 index 2f0d22db..00000000 Binary files a/apps/filebrowser/locale/ru/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/ru/LC_MESSAGES/django.po b/apps/filebrowser/locale/ru/LC_MESSAGES/django.po deleted file mode 100644 index 6e755066..00000000 --- a/apps/filebrowser/locale/ru/LC_MESSAGES/django.po +++ /dev/null @@ -1,317 +0,0 @@ -# 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: summer.is.gone@gmail.com\n" -"POT-Creation-Date: 2009-05-19 03:17+0600\n" -"PO-Revision-Date: 2009-05-19 03:52\n" -"Last-Translator: IVAN GROMOV \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 "Расширение %(ext)s запрещено. Разрешено только %(allowed)s." - -#: forms.py:23 -msgid "Name" -msgstr "Имя" - -#: forms.py:23 forms.py:49 -msgid "" -"The Name will automatically be converted to lowercase. Only letters, " -"numbers, underscores and hyphens are allowed." -msgstr "" -"Имя будет автоматически переведено в нижний регистр" -"Допускается вводить буквы, цифры, символы подчерка и дефиса." - -#: forms.py:30 forms.py:56 -msgid "Only letters, numbers, underscores and hyphens are allowed." -msgstr "Допускается вводить буквы, цифры, символы подчерка и дефиса." - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "Папка уже существует." - -#: forms.py:36 -msgid "Disallowed Folder Name." -msgstr "Недопустимое имя папки." - -#: forms.py:49 -msgid "New Name" -msgstr "Новое имя" - -#: forms.py:59 -msgid "The File/Folder already exists." -msgstr "Файл/папка уже существуют." - -#: forms.py:95 -msgid "File" -msgstr "Файл" - -#: forms.py:96 -msgid "Use Image Generator" -msgstr "Использовать генератор изображений" - -#: forms.py:105 -msgid "File already exists." -msgstr "Файл уже существует." - -#: forms.py:111 -msgid "Filename is not allowed." -msgstr "Недопустимое имя файла." - -#: forms.py:116 -msgid "File extension is not allowed." -msgstr "Недопустимое расширение файла." - -#: forms.py:121 -msgid "Filesize exceeds allowed Upload Size." -msgstr "Размер файла превышает допустимый размер загрузки." - -#: functions.py:84 -msgid "Home" -msgstr "Начало" - -#: functions.py:279 -msgid "Thumbnail creation failed." -msgstr "Ошибка создания миниатюр." - -#: functions.py:334 functions.py:389 -msgid "Image creation failed." -msgstr "Ошибка создания изображений." - -#: views.py:174 -msgid "FileBrowser" -msgstr "Файловый менеджер" - -#: views.py:198 -#, python-format -msgid "The Folder %s was successfully created." -msgstr "Папка %s успешно создана." - -#: views.py:204 -msgid "Permission denied." -msgstr "Доступ запрещен." - -#: views.py:206 -msgid "Error creating directory." -msgstr "Ошибка создания папки." - -#: views.py:214 views.py:215 templates/filebrowser/index.html:33 -msgid "New Folder" -msgstr "Новая папка" - -#: views.py:260 -msgid "Upload successful." -msgstr "Загрузка завершена успешно." - -#: views.py:273 templates/filebrowser/index.html:36 -#: templates/filebrowser/upload.html:62 -msgid "Upload" -msgstr "Загрузить" - -#: views.py:274 -msgid "Select files to upload" -msgstr "Выберите файлы для загрузки" - -#: views.py:304 -msgid "Thumbnail creation successful." -msgstr "Миниатюры созданы." - -#: views.py:354 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "Файл %s удален." - -#: views.py:366 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "Папка %s удалена." - -#: views.py:417 -msgid "Error renaming Thumbnail." -msgstr "Ошибка переименования миниатюры." - -#: views.py:423 -msgid "Renaming was successful." -msgstr "Переименовано." - -#: views.py:428 -msgid "Error." -msgstr "Ошибка." - -#: views.py:437 templates/filebrowser/include/filelisting.html:52 -msgid "Rename" -msgstr "Переименовать" - -#: views.py:438 -#, python-format -msgid "Rename \"%s\"" -msgstr "Переименовать \"%s\"" - -#: views.py:475 -msgid "Successfully generated Images." -msgstr "Изображения созданы." - -#: templates/filebrowser/append.html:5 templates/filebrowser/append.html:7 -msgid "File-Browser" -msgstr "Файловый менеджер" - -#: templates/filebrowser/index.html:34 -msgid "Make Thumbs" -msgstr "Создать миниатюры" - -#: templates/filebrowser/index.html:35 -msgid "Generate Images" -msgstr "Сгенерировать изображения" - -#: 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 "Отправить" - -#: templates/filebrowser/upload.html:37 -msgid "Will use image generator." -msgstr "Будет использован генератор изображений." - -#: templates/filebrowser/upload.html:47 -msgid "Help" -msgstr "Справка" - -#: templates/filebrowser/upload.html:51 -msgid "Allowed" -msgstr "Разрешено" - -#: templates/filebrowser/upload.html:57 -msgid "Max. Filesize" -msgstr "Макс. размер" - -#: templates/filebrowser/include/filelisting.html:8 -msgid "Select" -msgstr "Выберите" - -#: templates/filebrowser/include/filelisting.html:15 -msgid "Select File" -msgstr "Выберите файл" - -#: templates/filebrowser/include/filelisting.html:26 -msgid "Make Thumbnail" -msgstr "Создать миниатюры" - -#: templates/filebrowser/include/filelisting.html:29 -msgid "View Image" -msgstr "Просмотреть изображение" - -#: templates/filebrowser/include/filelisting.html:46 -msgid "Generate Image Versions" -msgstr "Создать миниатюры" - -#: 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 "Удалить файл" - -#: 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 "Удалить папку" - -#: templates/filebrowser/include/filter.html:15 -msgid "Filter" -msgstr "Фильтр" - -#: templates/filebrowser/include/filter.html:21 -msgid "By Date" -msgstr "По дате" - -#: templates/filebrowser/include/filter.html:23 -msgid "Any Date" -msgstr "За любое число" - -#: templates/filebrowser/include/filter.html:25 -msgid "Today" -msgstr "Сегодня" - -#: templates/filebrowser/include/filter.html:27 -msgid "Past 7 days" -msgstr "Последние 7 дней" - -#: templates/filebrowser/include/filter.html:29 -msgid "Past 30 days" -msgstr "Последние 30 дней" - -#: templates/filebrowser/include/filter.html:31 -msgid "This year" -msgstr "Этот год" - -#: templates/filebrowser/include/filter.html:39 -msgid "By Type" -msgstr "По типу" - -#: templates/filebrowser/include/filter.html:41 -msgid "All" -msgstr "Все" - -#: templates/filebrowser/include/paginator.html:5 -msgid "No Items Found." -msgstr "Не найдено" - -#: templates/filebrowser/include/paginator.html:10 -#, python-format -msgid "%(counter)s Item" -msgid_plural "%(counter)s Items" -msgstr[0] "%(counter)s элемент" -msgstr[1] "Элементов: %(counter)s" - -#: 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 "Имя файла" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Size" -msgstr "Размер" - -#: templates/filebrowser/include/tableheader.html:23 -#: templates/filebrowser/include/tableheader.html:24 -msgid "Date" -msgstr "Дата" - -#: 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] "%(counter)s элемент найден" -msgstr[1] "%(counter)s элементов найдено" - -#: templates/filebrowser/include/toolbar.html:17 -#, python-format -msgid "%(counter)s Item total" -msgid_plural "%(counter)s Items total" -msgstr[0] "%(counter)s элемент всего" -msgstr[1] "%(counter)s элементов всего" diff --git a/apps/filebrowser/locale/sr/LC_MESSAGES/django.mo b/apps/filebrowser/locale/sr/LC_MESSAGES/django.mo deleted file mode 100644 index c5b4dae6..00000000 Binary files a/apps/filebrowser/locale/sr/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/sr/LC_MESSAGES/django.po b/apps/filebrowser/locale/sr/LC_MESSAGES/django.po deleted file mode 100644 index cd275413..00000000 --- a/apps/filebrowser/locale/sr/LC_MESSAGES/django.po +++ /dev/null @@ -1,330 +0,0 @@ -# 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: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-06 21:43+0200\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" - -#: extension translation -msgid "Folder" -msgstr "Фолдер" -msgid "Image" -msgstr "Слика" -msgid "Document" -msgstr "Документ" -msgid "Code" -msgstr "Код" -msgid "Sound" -msgstr "Звук" - -#: fields.py:96 -#, python-format -msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." -msgstr "Фајлови са екстензијом %(ext)s нису дозвољени. Само %(allowed)s екстензије су дозвољене." - -#: forms.py:23 -msgid "Name" -msgstr "Назив" - -#: forms.py:23 forms.py:49 -msgid "" -"The Name will automatically be converted to lowercase. Only letters, " -"numbers, underscores and hyphens are allowed." -msgstr "" -"Слова у називу ће аутоматски бити конвертована у мала. Само слова, цифре, " -"доња црта и црта су дозвољени карактери." - -#: forms.py:30 forms.py:56 -msgid "Only letters, numbers, underscores and hyphens are allowed." -msgstr "Само слова, цифре, доња црта и црта су дозвољени карактери." - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "Фолдер већ постоји." - -#: forms.py:36 -msgid "Disallowed Folder Name." -msgstr "Тај назив фолдера није дозвољен." - -#: forms.py:49 -msgid "New Name" -msgstr "Нови назив" - -#: forms.py:59 -msgid "The File/Folder already exists." -msgstr "Фајл/фолдер већ постоји." - -#: forms.py:95 -msgid "File" -msgstr "Фајл" - -#: forms.py:96 -msgid "Use Image Generator" -msgstr "Користи генератор слика" - -#: forms.py:105 -msgid "File already exists." -msgstr "Фајл већ постоји." - -#: forms.py:111 -msgid "Filename is not allowed." -msgstr "Назив фајла није дозвољен." - -#: forms.py:116 -msgid "File extension is not allowed." -msgstr "Екстензија фајла није дозвиљена." - -#: forms.py:121 -msgid "Filesize exceeds allowed Upload Size." -msgstr "Величина фајла прелази дозвољену вредност." - -#: functions.py:84 -msgid "Home" -msgstr "Почетни фолдер" - -#: functions.py:279 -msgid "Thumbnail creation failed." -msgstr "Генерисање умањеног приказа слике није успело." - -#: functions.py:334 functions.py:389 -msgid "Image creation failed." -msgstr "Генерисање слике није успело." - -#: views.py:174 -msgid "FileBrowser" -msgstr "Фајл брузер" - -#: views.py:198 -#, python-format -msgid "The Folder %s was successfully created." -msgstr "Фолдер %s је успешно направљен." - -#: views.py:204 -msgid "Permission denied." -msgstr "Одбијен приступ." - -#: views.py:206 -msgid "Error creating directory." -msgstr "Грешка при креирању директоријума." - -#: views.py:214 views.py:215 templates/filebrowser/index.html:33 -msgid "New Folder" -msgstr "Нови фолдер" - -#: views.py:260 -msgid "Upload successful." -msgstr "Пренос фајла се успешно завршио." - -#: views.py:273 templates/filebrowser/index.html:36 -#: templates/filebrowser/upload.html:62 -msgid "Upload" -msgstr "Пренос фајла" - -#: views.py:274 -msgid "Select files to upload" -msgstr "Изаберите фајлове за пренос" - -#: views.py:304 -msgid "Thumbnail creation successful." -msgstr "Генерисање умањеног приказа слике је успело." - -#: views.py:354 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "Фајл %s је супешно обрисан." - -#: views.py:366 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "Директоријум %s је супешно обрисан." - -#: views.py:417 -msgid "Error renaming Thumbnail." -msgstr "Грешка при промени назива умањеног приказа слике." - -#: views.py:423 -msgid "Renaming was successful." -msgstr "Успешна промена назива." - -#: views.py:428 -msgid "Error." -msgstr "Грешка." - -#: views.py:437 templates/filebrowser/include/filelisting.html:52 -msgid "Rename" -msgstr "Промени назив" - -#: views.py:438 -#, python-format -msgid "Rename \"%s\"" -msgstr "Промени назив: „%s“" - -#: views.py:475 -msgid "Successfully generated Images." -msgstr "Слике су успешно генерисане." - -#: templates/filebrowser/append.html:5 templates/filebrowser/append.html:7 -msgid "File-Browser" -msgstr "Фајл-браузер" - -#: templates/filebrowser/index.html:34 -msgid "Make Thumbs" -msgstr "Генериши умањене приказе" - -#: templates/filebrowser/index.html:35 -msgid "Generate Images" -msgstr "Генериши слике" - -#: 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 "Изврши" - -#: templates/filebrowser/upload.html:37 -msgid "Will use image generator." -msgstr "Користи генератор слика." - -#: templates/filebrowser/upload.html:47 -msgid "Help" -msgstr "Помоћ" - -#: templates/filebrowser/upload.html:51 -msgid "Allowed" -msgstr "Дозвољено" - -#: templates/filebrowser/upload.html:57 -msgid "Max. Filesize" -msgstr "Највећа величина фајла" - -#: templates/filebrowser/include/filelisting.html:8 -msgid "Select" -msgstr "Изаберите" - -#: templates/filebrowser/include/filelisting.html:15 -msgid "Select File" -msgstr "Изаберите фајл" - -#: templates/filebrowser/include/filelisting.html:26 -msgid "Make Thumbnail" -msgstr "Направи умењени приказ" - -#: templates/filebrowser/include/filelisting.html:29 -msgid "View Image" -msgstr "Преглед слике" - -#: templates/filebrowser/include/filelisting.html:46 -msgid "Generate Image Versions" -msgstr "Генериши верзије слика" - -#: 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 "Избриши фајл" - -#: 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 "Избриши фолдер" - -#: templates/filebrowser/include/filter.html:15 -msgid "Filter" -msgstr "Филтер" - -#: templates/filebrowser/include/filter.html:21 -msgid "By Date" -msgstr "По датуму" - -#: templates/filebrowser/include/filter.html:23 -msgid "Any Date" -msgstr "Сви датуми" - -#: templates/filebrowser/include/filter.html:25 -msgid "Today" -msgstr "Данас" - -#: templates/filebrowser/include/filter.html:27 -msgid "Past 7 days" -msgstr "Последњих 7 дана" - -#: templates/filebrowser/include/filter.html:29 -msgid "Past 30 days" -msgstr "Последњих 30 дана" - -#: templates/filebrowser/include/filter.html:31 -msgid "This year" -msgstr "Ове године" - -#: templates/filebrowser/include/filter.html:39 -msgid "By Type" -msgstr "По типу" - -#: templates/filebrowser/include/filter.html:41 -msgid "All" -msgstr "Сви" - -#: templates/filebrowser/include/paginator.html:5 -msgid "No Items Found." -msgstr "Ниједна слика није пронађена." - -#: templates/filebrowser/include/paginator.html:10 -#, python-format -msgid "%(counter)s Item" -msgid_plural "%(counter)s Items" -msgstr[0] "%(counter)s ставка" -msgstr[1] "%(counter)s ставки" - -#: 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 "Назив фајла" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Size" -msgstr "Величина" - -#: templates/filebrowser/include/tableheader.html:23 -#: templates/filebrowser/include/tableheader.html:24 -msgid "Date" -msgstr "Датум" - -#: 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] "%(counter)s ставка нађена" -msgstr[1] "%(counter)s ставки нађено" - -#: templates/filebrowser/include/toolbar.html:17 -#, python-format -msgid "%(counter)s Item total" -msgid_plural "%(counter)s Items total" -msgstr[0] "%(counter)s ставка укупно" -msgstr[1] "%(counter)s ставки укупно" diff --git a/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo b/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo deleted file mode 100644 index bfcbcf08..00000000 Binary files a/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po b/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po deleted file mode 100644 index 8c81cadc..00000000 --- a/apps/filebrowser/locale/sr_Latn/LC_MESSAGES/django.po +++ /dev/null @@ -1,330 +0,0 @@ -# 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: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-06 21:43+0200\n" -"PO-Revision-Date: 2009-05-06 22:19+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" - -#: extension translation -msgid "Folder" -msgstr "Folder" -msgid "Image" -msgstr "Slika" -msgid "Document" -msgstr "Dokument" -msgid "Code" -msgstr "Kod" -msgid "Sound" -msgstr "Zvuk" - -#: fields.py:96 -#, 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:23 -msgid "Name" -msgstr "Naziv" - -#: forms.py:23 forms.py:49 -msgid "" -"The Name will automatically be converted to lowercase. Only letters, " -"numbers, underscores and hyphens are allowed." -msgstr "" -"Slova u nazivu će automatski biti konvertovana u mala. Samo slova, cifre, " -"donja crta i crta su dozvoljeni karakteri." - -#: forms.py:30 forms.py:56 -msgid "Only letters, numbers, underscores and hyphens are allowed." -msgstr "Samo slova, cifre, donja crta i crta su dozvoljeni karakteri." - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "Folder već postoji." - -#: forms.py:36 -msgid "Disallowed Folder Name." -msgstr "Taj naziv foldera nije dozvoljen." - -#: forms.py:49 -msgid "New Name" -msgstr "Novi naziv" - -#: forms.py:59 -msgid "The File/Folder already exists." -msgstr "Fajl/folder već postoji." - -#: forms.py:95 -msgid "File" -msgstr "Fajl" - -#: forms.py:96 -msgid "Use Image Generator" -msgstr "Koristi generator slika" - -#: forms.py:105 -msgid "File already exists." -msgstr "Fajl već postoji." - -#: forms.py:111 -msgid "Filename is not allowed." -msgstr "Naziv fajla nije dozvoljen." - -#: forms.py:116 -msgid "File extension is not allowed." -msgstr "Ekstenzija fajla nije dozviljena." - -#: forms.py:121 -msgid "Filesize exceeds allowed Upload Size." -msgstr "Veličina fajla prelazi dozvoljenu vrednost." - -#: functions.py:84 -msgid "Home" -msgstr "Početni folder" - -#: functions.py:279 -msgid "Thumbnail creation failed." -msgstr "Generisanje umanjenog prikaza slike nije uspelo." - -#: functions.py:334 functions.py:389 -msgid "Image creation failed." -msgstr "Generisanje slike nije uspelo." - -#: views.py:174 -msgid "FileBrowser" -msgstr "Fajl bruzer" - -#: views.py:198 -#, python-format -msgid "The Folder %s was successfully created." -msgstr "Folder %s je uspešno napravljen." - -#: views.py:204 -msgid "Permission denied." -msgstr "Odbijen pristup." - -#: views.py:206 -msgid "Error creating directory." -msgstr "Greška pri kreiranju direktorijuma." - -#: views.py:214 views.py:215 templates/filebrowser/index.html:33 -msgid "New Folder" -msgstr "Novi folder" - -#: views.py:260 -msgid "Upload successful." -msgstr "Prenos fajla se uspešno završio." - -#: views.py:273 templates/filebrowser/index.html:36 -#: templates/filebrowser/upload.html:62 -msgid "Upload" -msgstr "Prenos fajla" - -#: views.py:274 -msgid "Select files to upload" -msgstr "Izaberite fajlove za prenos" - -#: views.py:304 -msgid "Thumbnail creation successful." -msgstr "Generisanje umanjenog prikaza slike je uspelo." - -#: views.py:354 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "Fajl %s je supešno obrisan." - -#: views.py:366 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "Direktorijum %s je supešno obrisan." - -#: views.py:417 -msgid "Error renaming Thumbnail." -msgstr "Greška pri promeni naziva umanjenog prikaza slike." - -#: views.py:423 -msgid "Renaming was successful." -msgstr "Uspešna promena naziva." - -#: views.py:428 -msgid "Error." -msgstr "Greška." - -#: views.py:437 templates/filebrowser/include/filelisting.html:52 -msgid "Rename" -msgstr "Promeni naziv" - -#: views.py:438 -#, python-format -msgid "Rename \"%s\"" -msgstr "Promeni naziv: „%s“" - -#: views.py:475 -msgid "Successfully generated Images." -msgstr "Slike su uspešno generisane." - -#: templates/filebrowser/append.html:5 templates/filebrowser/append.html:7 -msgid "File-Browser" -msgstr "Fajl-brauzer" - -#: templates/filebrowser/index.html:34 -msgid "Make Thumbs" -msgstr "Generiši umanjene prikaze" - -#: templates/filebrowser/index.html:35 -msgid "Generate Images" -msgstr "Generiši slike" - -#: templates/filebrowser/makedir.html:24 templates/filebrowser/rename.html:22 -msgid "Please correct the following errors." -msgstr "Ispravite sledeće greške." - -#: templates/filebrowser/makedir.html:34 templates/filebrowser/rename.html:33 -msgid "Submit" -msgstr "Izvrši" - -#: templates/filebrowser/upload.html:37 -msgid "Will use image generator." -msgstr "Koristi generator slika." - -#: templates/filebrowser/upload.html:47 -msgid "Help" -msgstr "Pomoć" - -#: templates/filebrowser/upload.html:51 -msgid "Allowed" -msgstr "Dozvoljeno" - -#: templates/filebrowser/upload.html:57 -msgid "Max. Filesize" -msgstr "Najveća veličina fajla" - -#: templates/filebrowser/include/filelisting.html:8 -msgid "Select" -msgstr "Izaberite" - -#: templates/filebrowser/include/filelisting.html:15 -msgid "Select File" -msgstr "Izaberite fajl" - -#: templates/filebrowser/include/filelisting.html:26 -msgid "Make Thumbnail" -msgstr "Napravi umenjeni prikaz" - -#: templates/filebrowser/include/filelisting.html:29 -msgid "View Image" -msgstr "Pregled slike" - -#: templates/filebrowser/include/filelisting.html:46 -msgid "Generate Image Versions" -msgstr "Generiši verzije slika" - -#: templates/filebrowser/include/filelisting.html:61 -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:61 -msgid "Delete File" -msgstr "Izbriši fajl" - -#: templates/filebrowser/include/filelisting.html:64 -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:64 -msgid "Delete Folder" -msgstr "Izbriši folder" - -#: templates/filebrowser/include/filter.html:15 -msgid "Filter" -msgstr "Filter" - -#: templates/filebrowser/include/filter.html:21 -msgid "By Date" -msgstr "Po datumu" - -#: templates/filebrowser/include/filter.html:23 -msgid "Any Date" -msgstr "Svi datumi" - -#: templates/filebrowser/include/filter.html:25 -msgid "Today" -msgstr "Danas" - -#: templates/filebrowser/include/filter.html:27 -msgid "Past 7 days" -msgstr "Poslednjih 7 dana" - -#: templates/filebrowser/include/filter.html:29 -msgid "Past 30 days" -msgstr "Poslednjih 30 dana" - -#: templates/filebrowser/include/filter.html:31 -msgid "This year" -msgstr "Ove godine" - -#: templates/filebrowser/include/filter.html:39 -msgid "By Type" -msgstr "Po tipu" - -#: templates/filebrowser/include/filter.html:41 -msgid "All" -msgstr "Svi" - -#: templates/filebrowser/include/paginator.html:5 -msgid "No Items Found." -msgstr "Nijedna slika nije pronađena." - -#: templates/filebrowser/include/paginator.html:10 -#, 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:16 -msgid "No Items." -msgstr "Nijedna stavka" - -#: templates/filebrowser/include/tableheader.html:13 -#: templates/filebrowser/include/tableheader.html:14 -msgid "Filename" -msgstr "Naziv fajla" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Size" -msgstr "Veličina" - -#: 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 "Idi" - -#: templates/filebrowser/include/toolbar.html:16 -#, 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/toolbar.html:17 -#, 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" diff --git a/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo b/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo deleted file mode 100644 index 18da911e..00000000 Binary files a/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.po b/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.po deleted file mode 100644 index 51821c24..00000000 --- a/apps/filebrowser/locale/zh_CN/LC_MESSAGES/django.po +++ /dev/null @@ -1,345 +0,0 @@ -# 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 2.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-04 00:05+0800\n" -"PO-Revision-Date: 2009-05-04 00:11+0800\n" -"Last-Translator: freeRen \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:96 -#, python-format -msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." -msgstr "扩展名 %(ext)s 是不允许的。只允许 %(allowed)s 。" - -#: forms.py:23 -msgid "Name" -msgstr "名称" - -#: forms.py:23 -#: forms.py:49 -msgid "The Name will automatically be converted to lowercase. Only letters, numbers, underscores and hyphens are allowed." -msgstr "这个名称将自动转换为小写。只允许字母、数字、下划线和连字符。" - -#: forms.py:30 -#: forms.py:56 -msgid "Only letters, numbers, underscores and hyphens are allowed." -msgstr "只允许字母、数字、下划线和连字符。" - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "这个文件夹已经存在。" - -#: forms.py:36 -msgid "Disallowed Folder Name." -msgstr "不允许的文件夹名称。" - -#: forms.py:49 -msgid "New Name" -msgstr "新名称" - -#: forms.py:59 -msgid "The File/Folder already exists." -msgstr "这个文件/文件夹已经存在。" - -#: forms.py:95 -msgid "File" -msgstr "文件" - -#: forms.py:96 -msgid "Use Image Generator" -msgstr "使用图像生成器" - -#: forms.py:105 -msgid "File already exists." -msgstr "文件已经存在。" - -#: forms.py:111 -msgid "Filename is not allowed." -msgstr "文件名不允许。" - -#: forms.py:116 -msgid "File extension is not allowed." -msgstr "文件扩展名不允许。" - -#: forms.py:121 -msgid "Filesize exceeds allowed Upload Size." -msgstr "超出允许的上传大小。" - -#: functions.py:84 -msgid "Home" -msgstr "首页" - -#: functions.py:279 -msgid "Thumbnail creation failed." -msgstr "缩略图创建失败。" - -#: functions.py:334 -#: functions.py:389 -msgid "Image creation failed." -msgstr "图像创建失败。" - -#: views.py:174 -msgid "FileBrowser" -msgstr "文件浏览器" - -#: views.py:198 -#, python-format -msgid "The Folder %s was successfully created." -msgstr "文件夹 \"%s\" 创建成功。" - -#: views.py:204 -msgid "Permission denied." -msgstr "权限被拒绝。" - -#: views.py:206 -msgid "Error creating directory." -msgstr "创建目录错误。" - -#: views.py:214 -#: views.py:215 -#: templates/filebrowser/index.html:33 -msgid "New Folder" -msgstr "创建文件夹" - -#: views.py:260 -msgid "Upload successful." -msgstr "上传成功。" - -#: views.py:273 -#: templates/filebrowser/index.html:36 -#: templates/filebrowser/upload.html:62 -msgid "Upload" -msgstr "上传" - -#: views.py:274 -msgid "Select files to upload" -msgstr "选择上传文件" - -#: views.py:304 -msgid "Thumbnail creation successful." -msgstr "缩略图创建成功。" - -#: views.py:354 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "文件 \"%s\" 删除成功。" - -#: views.py:366 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "目录 \"%s\" 删除成功。" - -#: views.py:417 -msgid "Error renaming Thumbnail." -msgstr "重命名缩略图错误。" - -#: views.py:423 -msgid "Renaming was successful." -msgstr "重命名成功。" - -#: views.py:428 -msgid "Error." -msgstr "错误。" - -#: views.py:437 -#: templates/filebrowser/include/filelisting.html:52 -msgid "Rename" -msgstr "重命名" - -#: views.py:438 -#, python-format -msgid "Rename \"%s\"" -msgstr "重命名 \"%s\"" - -#: views.py:475 -msgid "Successfully generated Images." -msgstr "生成图像成功。" - -#: templates/filebrowser/append.html:4 -#: templates/filebrowser/append.html:6 -msgid "File-Browser" -msgstr "文件浏览器" - -#: templates/filebrowser/index.html:34 -msgid "Make Thumbs" -msgstr "创建缩略图" - -#: templates/filebrowser/index.html:35 -msgid "Generate Images" -msgstr "生成图像" - -#: 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 "保存" - -#: templates/filebrowser/upload.html:37 -msgid "Will use image generator." -msgstr "使用图像生成器。" - -#: templates/filebrowser/upload.html:47 -msgid "Help" -msgstr "帮助" - -#: templates/filebrowser/upload.html:51 -msgid "Allowed" -msgstr "允许" - -#: templates/filebrowser/upload.html:57 -msgid "Max. Filesize" -msgstr "最大文件大小" - -#: templates/filebrowser/include/filelisting.html:8 -msgid "Select" -msgstr "选择" - -#: templates/filebrowser/include/filelisting.html:15 -msgid "Select File" -msgstr "选择文件" - -#: templates/filebrowser/include/filelisting.html:26 -msgid "Make Thumbnail" -msgstr "创建缩略图" - -#: templates/filebrowser/include/filelisting.html:29 -msgid "View Image" -msgstr "查看图像" - -#: templates/filebrowser/include/filelisting.html:46 -msgid "Generate Image Versions" -msgstr "生成图像版本" - -#: 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 "删除文件" - -#: 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 "删除文件夹" - -#: templates/filebrowser/include/filter.html:15 -msgid "Filter" -msgstr "过滤器" - -#: templates/filebrowser/include/filter.html:21 -msgid "By Date" -msgstr "以 日期" - -#: templates/filebrowser/include/filter.html:23 -msgid "Any Date" -msgstr "任意日期" - -#: templates/filebrowser/include/filter.html:25 -msgid "Today" -msgstr "今天" - -#: templates/filebrowser/include/filter.html:27 -msgid "Past 7 days" -msgstr "前7天" - -#: templates/filebrowser/include/filter.html:29 -msgid "Past 30 days" -msgstr "本月" - -#: templates/filebrowser/include/filter.html:31 -msgid "This year" -msgstr "本年" - -#: templates/filebrowser/include/filter.html:39 -msgid "By Type" -msgstr "以 类型" - -#: templates/filebrowser/include/filter.html:41 -msgid "All" -msgstr "全部" - -#: templates/filebrowser/include/paginator.html:5 -msgid "No Items Found." -msgstr "没有找到。" - -#: templates/filebrowser/include/paginator.html:10 -#, python-format -msgid "%(counter)s Item" -msgid_plural "%(counter)s Items" -msgstr[0] "%(counter)s 项" - -#: 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 "文件名" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Size" -msgstr "大小" - -#: templates/filebrowser/include/tableheader.html:23 -#: templates/filebrowser/include/tableheader.html:24 -msgid "Date" -msgstr "日期" - -#: 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] "找到 %(counter)s 项" - -#: templates/filebrowser/include/toolbar.html:17 -#, python-format -msgid "%(counter)s Item total" -msgid_plural "%(counter)s Items total" -msgstr[0] "共 %(counter)s 项" - -msgid "Folder" -msgstr "目录" - -msgid "Image" -msgstr "图片" - -msgid "Document" -msgstr "文档" - -msgid "Code" -msgstr "代码" - -msgid "Video" -msgstr "视频" - -msgid "Sound" -msgstr "音频" - diff --git a/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo b/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo deleted file mode 100644 index 14136c06..00000000 Binary files a/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.mo and /dev/null differ diff --git a/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.po b/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.po deleted file mode 100644 index c60bc65c..00000000 --- a/apps/filebrowser/locale/zh_TW/LC_MESSAGES/django.po +++ /dev/null @@ -1,346 +0,0 @@ -# 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 2.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-04 00:06+0800\n" -"PO-Revision-Date: 2009-05-04 00:11+0800\n" -"Last-Translator: freeRen \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:96 -#, python-format -msgid "Extension %(ext)s is not allowed. Only %(allowed)s is allowed." -msgstr "擴展名%(ext)s是不允許的。只允許%(allowed)s 。" - -#: forms.py:23 -msgid "Name" -msgstr "名稱" - -#: forms.py:23 -#: forms.py:49 -msgid "The Name will automatically be converted to lowercase. Only letters, numbers, underscores and hyphens are allowed." -msgstr "這個名稱將自動轉換為小寫。只允許字母、數字、下劃線和連字符。" - -#: forms.py:30 -#: forms.py:56 -msgid "Only letters, numbers, underscores and hyphens are allowed." -msgstr "只允許字母、數字、下劃線和連字符。" - -#: forms.py:33 -msgid "The Folder already exists." -msgstr "這個文件夾已經存在。" - -#: forms.py:36 -msgid "Disallowed Folder Name." -msgstr "不允許文件夾名稱。" - -#: forms.py:49 -msgid "New Name" -msgstr "新名稱" - -#: forms.py:59 -msgid "The File/Folder already exists." -msgstr "這個文件/文件夾已經存在。" - -#: forms.py:95 -msgid "File" -msgstr "文件" - -#: forms.py:96 -msgid "Use Image Generator" -msgstr "使用圖像生成器" - -#: forms.py:105 -msgid "File already exists." -msgstr "文件已經存在。" - -#: forms.py:111 -msgid "Filename is not allowed." -msgstr "文件名不允許。" - -#: forms.py:116 -msgid "File extension is not allowed." -msgstr "文件擴展名不允許。" - -#: forms.py:121 -msgid "Filesize exceeds allowed Upload Size." -msgstr "超出允許的上傳大小。" - -#: functions.py:84 -msgid "Home" -msgstr "首頁" - -#: functions.py:279 -msgid "Thumbnail creation failed." -msgstr "縮略圖創建失敗。" - -#: functions.py:334 -#: functions.py:389 -msgid "Image creation failed." -msgstr "圖像創建失敗。" - -#: views.py:174 -msgid "FileBrowser" -msgstr "文件瀏覽器" - -#: views.py:198 -#, python-format -msgid "The Folder %s was successfully created." -msgstr "文件夾\"%s\"創建成功。" - -#: views.py:204 -msgid "Permission denied." -msgstr "權限被拒絕。" - -#: views.py:206 -msgid "Error creating directory." -msgstr "創建目錄錯誤。" - -#: views.py:214 -#: views.py:215 -#: templates/filebrowser/index.html:33 -msgid "New Folder" -msgstr "創建文件夾" - -#: views.py:260 -msgid "Upload successful." -msgstr "上傳成功。" - -#: views.py:273 -#: templates/filebrowser/index.html:36 -#: templates/filebrowser/upload.html:62 -msgid "Upload" -msgstr "上传" - -#: views.py:274 -msgid "Select files to upload" -msgstr "選擇上傳文件" - -#: views.py:304 -msgid "Thumbnail creation successful." -msgstr "縮略圖創建成功。" - -#: views.py:354 -#, python-format -msgid "The file %s was successfully deleted." -msgstr "文件\"%s\"刪除成功。" - -#: views.py:366 -#, python-format -msgid "The directory %s was successfully deleted." -msgstr "目錄\"%s\"刪除成功。" - -#: views.py:417 -msgid "Error renaming Thumbnail." -msgstr "重命名縮略圖錯誤。" - -#: views.py:423 -msgid "Renaming was successful." -msgstr "重命名成功。" - -#: views.py:428 -msgid "Error." -msgstr "錯誤。" - -#: views.py:437 -#: templates/filebrowser/include/filelisting.html:52 -msgid "Rename" -msgstr "重命名" - -#: views.py:438 -#, python-format -msgid "Rename \"%s\"" -msgstr "重命名 \"%s\"" - -#: views.py:475 -msgid "Successfully generated Images." -msgstr "生成圖像成功。" - -#: templates/filebrowser/append.html:4 -#: templates/filebrowser/append.html:6 -#, fuzzy -msgid "File-Browser" -msgstr "文件瀏覽器" - -#: templates/filebrowser/index.html:34 -msgid "Make Thumbs" -msgstr "創建縮略圖" - -#: templates/filebrowser/index.html:35 -msgid "Generate Images" -msgstr "生成圖像" - -#: 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 "保存" - -#: templates/filebrowser/upload.html:37 -msgid "Will use image generator." -msgstr "使用圖像生成器。" - -#: templates/filebrowser/upload.html:47 -msgid "Help" -msgstr "幫助" - -#: templates/filebrowser/upload.html:51 -msgid "Allowed" -msgstr "允許" - -#: templates/filebrowser/upload.html:57 -msgid "Max. Filesize" -msgstr "最大文件大小" - -#: templates/filebrowser/include/filelisting.html:8 -msgid "Select" -msgstr "選擇" - -#: templates/filebrowser/include/filelisting.html:15 -msgid "Select File" -msgstr "選擇文件" - -#: templates/filebrowser/include/filelisting.html:26 -msgid "Make Thumbnail" -msgstr "創建縮略圖" - -#: templates/filebrowser/include/filelisting.html:29 -msgid "View Image" -msgstr "查看圖像" - -#: templates/filebrowser/include/filelisting.html:46 -msgid "Generate Image Versions" -msgstr "生成圖像版本" - -#: 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 "删除文件" - -#: 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 "刪除文件夾" - -#: templates/filebrowser/include/filter.html:15 -msgid "Filter" -msgstr "過濾器" - -#: templates/filebrowser/include/filter.html:21 -msgid "By Date" -msgstr "以 日期" - -#: templates/filebrowser/include/filter.html:23 -msgid "Any Date" -msgstr "任意日期" - -#: templates/filebrowser/include/filter.html:25 -msgid "Today" -msgstr "今天" - -#: templates/filebrowser/include/filter.html:27 -msgid "Past 7 days" -msgstr "前7天" - -#: templates/filebrowser/include/filter.html:29 -msgid "Past 30 days" -msgstr "本月" - -#: templates/filebrowser/include/filter.html:31 -msgid "This year" -msgstr "本年" - -#: templates/filebrowser/include/filter.html:39 -msgid "By Type" -msgstr "以 類型" - -#: templates/filebrowser/include/filter.html:41 -msgid "All" -msgstr "全部" - -#: templates/filebrowser/include/paginator.html:5 -msgid "No Items Found." -msgstr "沒有找到。" - -#: templates/filebrowser/include/paginator.html:10 -#, python-format -msgid "%(counter)s Item" -msgid_plural "%(counter)s Items" -msgstr[0] "%(counter)s 項" - -#: 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 "文件名" - -#: templates/filebrowser/include/tableheader.html:20 -#: templates/filebrowser/include/tableheader.html:21 -msgid "Size" -msgstr "大小" - -#: templates/filebrowser/include/tableheader.html:23 -#: templates/filebrowser/include/tableheader.html:24 -msgid "Date" -msgstr "日期" - -#: 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] "找到 %(counter)s 項" - -#: templates/filebrowser/include/toolbar.html:17 -#, python-format -msgid "%(counter)s Item total" -msgid_plural "%(counter)s Items total" -msgstr[0] "共 %(counter)s 項" - -msgid "Folder" -msgstr "目錄" - -msgid "Image" -msgstr "圖片" - -msgid "Document" -msgstr "文檔" - -msgid "Code" -msgstr "代碼" - -msgid "Video" -msgstr "視頻" - -msgid "Sound" -msgstr "音頻" - diff --git a/apps/filebrowser/media/filebrowser/css/filebrowser.css b/apps/filebrowser/media/filebrowser/css/filebrowser.css deleted file mode 100644 index c68126ea..00000000 --- a/apps/filebrowser/media/filebrowser/css/filebrowser.css +++ /dev/null @@ -1,29 +0,0 @@ -.filebrowser table td { font-size: 10px; } -.filebrowser table a { font-size: 11px; } -.filebrowser thead th.sorted a { padding-right: 13px; } -.filebrowser td { padding: 9px 10px 7px 10px !important; } -.filebrowser td.fb_icon { padding: 6px 5px 5px 5px !important; } - -table a.fb_deletelink, table a.fb_renamelink, table a.fb_selectlink, table a.fb_showversionslink { - cursor: pointer; - display: block; padding: 0; margin: 0; - width: 23px; height: 17px; - background-color: transparent; - background-position: 0 center; - background-repeat: no-repeat; -} - -table .fb_deletelink:link, table .fb_deletelink:visited { - width: 15px; - background-image: url('../img/filebrowser_icon_delete.gif'); -} -table .fb_deletelink:hover, table .fb_deletelink:active { background-image: url('../img/filebrowser_icon_delete_hover.gif'); } -table .fb_renamelink:link, table .fb_renamelink:visited { - width: 14px; - background-image: url('../img/filebrowser_icon_rename.gif'); -} -table .fb_renamelink:hover, table .fb_renamelink:active { background-image: url('../img/filebrowser_icon_rename_hover.gif'); } -table .fb_selectlink:link, table .fb_selectlink:visited { background-image: url('../img/filebrowser_icon_select.gif'); } -table .fb_selectlink:hover, table .fb_selectlink:active { background-image: url('../img/filebrowser_icon_select_hover.gif'); } -table .fb_showversionslink:link, table .fb_showversionslink:visited { background-image: url('../img/filebrowser_icon_showversions.gif'); } -table .fb_showversionslink:hover, table .fb_showversionslink:active { background-image: url('../img/filebrowser_icon_showversions_hover.gif'); } diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif deleted file mode 100644 index 221a6e1c..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif deleted file mode 100644 index 2a2142cd..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_delete_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator.gif deleted file mode 100644 index 9b19a420..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif deleted file mode 100644 index aaa256f4..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb.gif deleted file mode 100644 index 837f6cc6..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb_hover.gif deleted file mode 100644 index d1d4d4a1..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_makethumb_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif deleted file mode 100644 index bc45fe4b..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif deleted file mode 100644 index be8ea08b..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_rename_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif deleted file mode 100644 index a8384279..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif deleted file mode 100644 index 60ad2d53..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_disabled.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif deleted file mode 100644 index 319558e9..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_select_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif deleted file mode 100644 index dded9824..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif deleted file mode 100644 index fbd1f33e..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_show_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif deleted file mode 100644 index 71525d74..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif deleted file mode 100644 index 1fbe2e49..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_icon_showversions_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif deleted file mode 100644 index 9b19a420..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif deleted file mode 100644 index aaa256f4..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif deleted file mode 100644 index bcd98d91..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif deleted file mode 100644 index f9938c77..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif deleted file mode 100644 index a6863cb8..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif deleted file mode 100644 index b9aba7cc..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif deleted file mode 100644 index 6de016be..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif deleted file mode 100644 index eaaf2542..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_.gif deleted file mode 100644 index 6a908e27..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_code.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_code.gif deleted file mode 100644 index 96508394..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_code.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_document.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_document.gif deleted file mode 100644 index 65ebd99b..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_document.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif deleted file mode 100644 index 115e3fbd..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_folder.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_image.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_image.gif deleted file mode 100644 index 000b31c1..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_image.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_sound.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_sound.gif deleted file mode 100644 index 8a8970ab..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_sound.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/filebrowser_type_video.gif b/apps/filebrowser/media/filebrowser/img/filebrowser_type_video.gif deleted file mode 100644 index f456d59b..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/filebrowser_type_video.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/tableheader_arrow_down.gif b/apps/filebrowser/media/filebrowser/img/tableheader_arrow_down.gif deleted file mode 100644 index 5ae95a60..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/tableheader_arrow_down.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/tableheader_arrow_up.gif b/apps/filebrowser/media/filebrowser/img/tableheader_arrow_up.gif deleted file mode 100644 index 85f1e126..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/tableheader_arrow_up.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/img/tableheader_arrows.gif b/apps/filebrowser/media/filebrowser/img/tableheader_arrows.gif deleted file mode 100644 index 39b8780c..00000000 Binary files a/apps/filebrowser/media/filebrowser/img/tableheader_arrows.gif and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/js/AddFileBrowser.js b/apps/filebrowser/media/filebrowser/js/AddFileBrowser.js deleted file mode 100644 index 888885f5..00000000 --- a/apps/filebrowser/media/filebrowser/js/AddFileBrowser.js +++ /dev/null @@ -1,30 +0,0 @@ -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/apps/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml deleted file mode 100644 index 13ca0434..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/_notes/dwsync.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/check.php b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/check.php deleted file mode 100644 index d7dc5717..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/check.php +++ /dev/null @@ -1,35 +0,0 @@ - $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/apps/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf deleted file mode 100644 index 0fbf8fca..00000000 Binary files a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/expressInstall.swf and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js deleted file mode 100644 index b1ae21d8..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js deleted file mode 100644 index 43053119..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -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/apps/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf b/apps/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf deleted file mode 100644 index 4d27952f..00000000 Binary files a/apps/filebrowser/media/filebrowser/uploadify/example/scripts/uploadify.swf and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/uploadify/expressInstall.swf b/apps/filebrowser/media/filebrowser/uploadify/expressInstall.swf deleted file mode 100644 index 0fbf8fca..00000000 Binary files a/apps/filebrowser/media/filebrowser/uploadify/expressInstall.swf and /dev/null differ diff --git a/apps/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js b/apps/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js deleted file mode 100644 index b1ae21d8..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/jquery-1.3.2.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js b/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js deleted file mode 100644 index 43c87be6..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.js +++ /dev/null @@ -1,258 +0,0 @@ -/* -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/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js b/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js deleted file mode 100644 index 43053119..00000000 --- a/apps/filebrowser/media/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -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/apps/filebrowser/media/filebrowser/uploadify/uploadify.swf b/apps/filebrowser/media/filebrowser/uploadify/uploadify.swf deleted file mode 100644 index 0385d9e6..00000000 Binary files a/apps/filebrowser/media/filebrowser/uploadify/uploadify.swf and /dev/null differ diff --git a/apps/filebrowser/models.py b/apps/filebrowser/models.py deleted file mode 100644 index 655d082b..00000000 --- a/apps/filebrowser/models.py +++ /dev/null @@ -1 +0,0 @@ -# This file is only necessary for the tests to work diff --git a/apps/filebrowser/templates/filebrowser/append.html b/apps/filebrowser/templates/filebrowser/append.html deleted file mode 100644 index 6d1123f1..00000000 --- a/apps/filebrowser/templates/filebrowser/append.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load i18n %} - -
- - - - - - - -
{% trans "File-Browser" %}
{% trans "File-Browser" %}
-
\ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/custom_field.html b/apps/filebrowser/templates/filebrowser/custom_field.html deleted file mode 100644 index ba851982..00000000 --- a/apps/filebrowser/templates/filebrowser/custom_field.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load fb_versions %} - - - - -{% 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/apps/filebrowser/templates/filebrowser/include/_response.html b/apps/filebrowser/templates/filebrowser/include/_response.html deleted file mode 100644 index e7dff2c6..00000000 --- a/apps/filebrowser/templates/filebrowser/include/_response.html +++ /dev/null @@ -1 +0,0 @@ -{{ response }} \ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/include/breadcrumbs.html b/apps/filebrowser/templates/filebrowser/include/breadcrumbs.html deleted file mode 100644 index 5b9d181e..00000000 --- a/apps/filebrowser/templates/filebrowser/include/breadcrumbs.html +++ /dev/null @@ -1,18 +0,0 @@ -{% load i18n fb_tags %} - \ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/include/filelisting.html b/apps/filebrowser/templates/filebrowser/include/filelisting.html deleted file mode 100644 index 2ac0a28b..00000000 --- a/apps/filebrowser/templates/filebrowser/include/filelisting.html +++ /dev/null @@ -1,120 +0,0 @@ -{% load i18n adminmedia fb_tags fb_versions %} - - - {% ifequal query.pop '1' %} - {% if results_var.select_total %} - - {% selectable file.filetype query.type %} - {% if selectable %} - - {% else %} - - {% endif %} - - {% endif %} - {% endifequal %} - - - {% ifequal query.pop '2' %} - {% if results_var.select_total %} - - {% selectable file.filetype query.type %} - {% if selectable %} - - {% else %} - - {% endif %} - - {% endif %} - {% endifequal %} - - - {% ifequal query.pop '3' %} - {% if results_var.select_total %} - - {% selectable file.filetype query.type %} - {% if selectable %} - - {% else %} - - {% endif %} - - {% endif %} - {% endifequal %} - - - {% if settings_var.ADMIN_VERSIONS and results_var.images_total %} - - {% ifequal file.filetype 'Image' %}{% endifequal %} - - {% endif %} - - - - - - {% if results_var.images_total %} - - {% ifequal file.filetype 'Image' %} - - {% endifequal %} - - {% endif %} - - - {% ifequal file.filetype 'Folder' %} - {{ file.filename }} - {% else %} - {{ file.filename }}{% if file.dimensions %}
{{ file.dimensions.0 }} x {{ file.dimensions.1 }} px{% endif %} - {% endifequal %} - - - - - - {{ file.filesize|filesizeformat }} - - - {{ file.datetime|date:"N j, Y" }} - - - {% if results_var.delete_total %} - - {% ifnotequal file.filetype 'Folder' %} - - {% else %} - {% if file.is_empty %} - - {% endif %} - {% endifnotequal %} - - {% endif %} - - - {% 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 }} - {% ifequal file.filetype 'Image' %}

- Dimensions {{ file.dimensions }}
- Width {{ file.width }}
- Height {{ file.height }}
- Orientation {{ file.orientation }} - {% endifequal %} - {% ifequal file.filetype 'Folder' %}

- Is Empty {{ file.is_empty }} - {% endifequal %} - - {% endif %} - - diff --git a/apps/filebrowser/templates/filebrowser/include/filter.html b/apps/filebrowser/templates/filebrowser/include/filter.html deleted file mode 100644 index 28713d0f..00000000 --- a/apps/filebrowser/templates/filebrowser/include/filter.html +++ /dev/null @@ -1,35 +0,0 @@ -{% load i18n fb_tags %} -
-

{% trans "Filter" %}

-{% if query.filter_date %} -
-{% else %} -
-{% endif %} -

{% trans "By Date" %}

- -
-{% if query.filter_type %} -
-{% else %} -
-{% endif %} -

{% trans "By Type" %}

-
    - {% if query.filter_type %}
  • {% else %}
  • {% endif %}{% trans "All" %}
  • - {% for extension in settings_var.EXTENSIONS %} - {% ifequal query.filter_type extension %}
  • {% else %}
  • {% endifequal %}{% trans extension %}
  • - {% endfor %} -
-
-
\ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/include/paginator.html b/apps/filebrowser/templates/filebrowser/include/paginator.html deleted file mode 100644 index 73e5006d..00000000 --- a/apps/filebrowser/templates/filebrowser/include/paginator.html +++ /dev/null @@ -1,17 +0,0 @@ -{% load i18n %} -{% if not results_var.results_current %} -

-{% trans "No Items Found." %} -

-{% endif %} -

-{% if results_var.results_total %} - {% blocktrans count results_var.results_total as counter %}{{ counter }} Item{% plural %}{{ counter }} Items{% endblocktrans %}  - {% for count in counter.items %} - {% trans count.0 %}: - {{ count.1 }}  - {% endfor %} -{% else %} - {% trans "No Items." %} -{% endif %} -

\ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/include/tableheader.html b/apps/filebrowser/templates/filebrowser/include/tableheader.html deleted file mode 100644 index 0d60e6d6..00000000 --- a/apps/filebrowser/templates/filebrowser/include/tableheader.html +++ /dev/null @@ -1,38 +0,0 @@ -{% load i18n fb_tags %} - - - - {% ifequal query.pop '1' %}{% if results_var.select_total %}{% endif %}{% endifequal %} - {% ifequal query.pop '2' %}{% if results_var.select_total %}{% endif %}{% endifequal %} - {% ifequal query.pop '3' %}{% if results_var.select_total %}{% endif %}{% endifequal %} - - - {% if settings_var.ADMIN_VERSIONS and results_var.images_total %} {% endif %} - - - {% ifequal query.o 'filetype_checked' %}{% endifequal %} - {% ifnotequal query.o 'filetype_checked' %} {% endifnotequal %} - - - {% if results_var.images_total %} {% endif %} - - - {% ifequal query.o 'filename_lower' %}{% trans 'Filename' %}{% endifequal %} - {% ifnotequal query.o 'filename_lower' %}{% trans 'Filename' %}{% endifnotequal %} - - -   - - - {% 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 results_var.delete_total %} {% endif %} - {% if settings_var.DEBUG %}Debug{% endif %} - - \ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/include/toolbar.html b/apps/filebrowser/templates/filebrowser/include/toolbar.html deleted file mode 100644 index a21d36c8..00000000 --- a/apps/filebrowser/templates/filebrowser/include/toolbar.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n adminmedia fb_tags %} -
- -
- \ No newline at end of file diff --git a/apps/filebrowser/templates/filebrowser/index.html b/apps/filebrowser/templates/filebrowser/index.html deleted file mode 100644 index 24100fb0..00000000 --- a/apps/filebrowser/templates/filebrowser/index.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends "admin/base_site.html" %} - - -{% load i18n adminmedia fb_tags %} - - -{% block extrahead %} - {{ 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 coltype %}flex{% endblock %} -{% block bodyclass %}change-list filebrowser{% if query.pop %} popup{% endif %}{% endblock %} - - -{% block extrastyle %} - {{ block.super }} - - - {% if query.pop %} - -{% endif %} -{% endblock %} - - -{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} - - -{% block content %} -
- {% block object-tools %} - - {% endblock %} -
- {% include "filebrowser/include/toolbar.html" %} - {% include "filebrowser/include/filter.html" %} - - {% if results_var.results_current %} - {% include "filebrowser/include/tableheader.html" %} - {% endif %} - - {% for file in files %} - {% include "filebrowser/include/filelisting.html" %} - {% endfor %} - -
- {% include "filebrowser/include/paginator.html" %} -
-
-{% endblock %} diff --git a/apps/filebrowser/templates/filebrowser/makedir.html b/apps/filebrowser/templates/filebrowser/makedir.html deleted file mode 100644 index c0320df0..00000000 --- a/apps/filebrowser/templates/filebrowser/makedir.html +++ /dev/null @@ -1,63 +0,0 @@ -{% extends "admin/base_site.html" %} - - -{% load i18n adminmedia fb_tags %} - - -{% block extrahead %} - {{ block.super }} - - - -{% endblock %} - - -{% block coltype %}colM{% endblock %} -{% block bodyclass %}change-form{% endblock %} - - -{% block extrastyle %} - {{ block.super }} - - - {% if query.pop %} - -{% endif %} -{% endblock %} - - -{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} - - -{% block content %} -
-
- {% csrf_token %} -
- {% if form.errors %}

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

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

{% trans "Help" %}

-
- -

- {{ 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 %} diff --git a/apps/filebrowser/templates/filebrowser/rename.html b/apps/filebrowser/templates/filebrowser/rename.html deleted file mode 100644 index 19e63f99..00000000 --- a/apps/filebrowser/templates/filebrowser/rename.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "admin/base_site.html" %} - - -{% load i18n adminmedia fb_tags %} - - -{% block extrahead %} - {{ block.super }} - - - -{% endblock %} - - -{% block coltype %}colM{% endblock %} -{% block bodyclass %}change-form{% endblock %} - - -{% block extrastyle %} - {{ block.super }} - - - {% if query.pop %} - -{% endif %} -{% endblock %} - - -{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %} - - -{% block content %} -
-
- {% csrf_token %} -
- {% if form.errors %}

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

{% endif %} -
-
- {% if form.name.errors %}
    {{ form.name.errors }}
{% endif %} - - {{ form.name }} - {% if file_extension %}{{ file_extension }}{% endif %} -
-
-
-

{% trans "Help" %}

-
- -

- {{ form.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 %} diff --git a/apps/filebrowser/templates/filebrowser/upload.html b/apps/filebrowser/templates/filebrowser/upload.html deleted file mode 100644 index fed793e7..00000000 --- a/apps/filebrowser/templates/filebrowser/upload.html +++ /dev/null @@ -1,116 +0,0 @@ -{% extends "admin/base_site.html" %} - - -{% load i18n adminmedia fb_tags %} - - -{% block extrahead %} - {{ block.super }} - - - - - - - -{% endblock %} - - -{% block coltype %}colM{% endblock %} -{% block bodyclass %}change-form{% endblock %} - - -{% block extrastyle %} - {{ block.super }} - - - - {% if query.pop %} - - {% endif %} -{% 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/apps/filebrowser/templates/filebrowser/versions.html b/apps/filebrowser/templates/filebrowser/versions.html deleted file mode 100644 index 05093a3d..00000000 --- a/apps/filebrowser/templates/filebrowser/versions.html +++ /dev/null @@ -1,138 +0,0 @@ -{% extends "admin/base_site.html" %} - - -{% load i18n adminmedia fb_tags fb_versions %} - - -{% block extrahead %} - {{ 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 coltype %}colM{% endblock %} -{% block bodyclass %}change-list filebrowser{% endblock %} - - -{% block extrastyle %} - {{ block.super }} - - - {% if query.pop %} - -{% endif %} -{% 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/apps/filebrowser/templatetags/__init__.py b/apps/filebrowser/templatetags/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/filebrowser/templatetags/fb_tags.py b/apps/filebrowser/templatetags/fb_tags.py deleted file mode 100644 index 5bc9b401..00000000 --- a/apps/filebrowser/templatetags/fb_tags.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -from django import template -from django.utils.encoding import smart_unicode -from django.utils.safestring import mark_safe - -from filebrowser.fb_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': smart_unicode(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): - 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) - - args = (arg.strip() for arg in string.split(',') if not arg.isspace()) - kwargs.update(arg.split('=', 1) for arg in args) - - 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/apps/filebrowser/templatetags/fb_versions.py b/apps/filebrowser/templatetags/fb_versions.py deleted file mode 100644 index cb67b2fd..00000000 --- a/apps/filebrowser/templatetags/fb_versions.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding: utf-8 - -import os -import re -from django.template import Library, Node, Variable, VariableDoesNotExist, TemplateSyntaxError -from django.conf import settings -from django.utils.encoding import force_unicode - -# filebrowser imports -from filebrowser.fb_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 - -import logging -logger = logging.getLogger("django.filebrowser") - -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: - version_path = _get_version_path(_url_to_path(str(source)), version_prefix) - if not os.path.isfile(os.path.join(MEDIA_ROOT, version_path)): - # create version - version_path = _version_generator(_url_to_path(str(source)), version_prefix) - elif os.path.getmtime(os.path.join(MEDIA_ROOT, _url_to_path(str(source)))) > os.path.getmtime(os.path.join(MEDIA_ROOT, version_path)): - # recreate version if original image was updated - version_path = _version_generator(_url_to_path(str(source)), version_prefix, force=True) - return _path_to_url(version_path) - except Exception: - logger.exception("Version error") - return u"" - - -def version(parser, token): - """ - Displaying a version of an existing Image according to the predefined VERSIONS settings (see fb_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: - version_path = _get_version_path(_url_to_path(str(source)), version_prefix) - if not os.path.isfile(os.path.join(MEDIA_ROOT, version_path)): - # create version - version_path = _version_generator(_url_to_path(str(source)), version_prefix) - elif os.path.getmtime(os.path.join(MEDIA_ROOT, _url_to_path(str(source)))) > os.path.getmtime(os.path.join(MEDIA_ROOT, version_path)): - # recreate version if original image was updated - version_path = _version_generator(_url_to_path(str(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/apps/filebrowser/urls.py b/apps/filebrowser/urls.py deleted file mode 100644 index 60bfff8c..00000000 --- a/apps/filebrowser/urls.py +++ /dev/null @@ -1,16 +0,0 @@ -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/apps/filebrowser/views.py b/apps/filebrowser/views.py deleted file mode 100644 index 6c1c92d6..00000000 --- a/apps/filebrowser/views.py +++ /dev/null @@ -1,446 +0,0 @@ -# coding: utf-8 - -# general imports -import re - -# 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.views.decorators.csrf import csrf_exempt - -from django.utils.encoding import smart_unicode, smart_str - -# filebrowser imports -from filebrowser.fb_settings import * - -from filebrowser.functions import ( - _url_to_path, _path_to_url, _get_path, _get_file, _get_version_path, - _get_breadcrumbs, _get_filterdate, _get_settings_var, _handle_file_upload, - _get_file_type, _url_join, _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 - path = _get_path(query.get('dir', '')) - directory = _get_path('') - - if path is None: - msg = _('Directory/File 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 directory: %s. Maybe it does not exist?" % os.path.join(MEDIA_ROOT, DIRECTORY))) - redirect_url = reverse("fb_browse") + query_helper(query, "", "dir") - return HttpResponseRedirect(redirect_url) - abs_path = 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 - - dir_list = os.listdir(abs_path) - files = [] - # print "LISTING FILES: ", dir_list - for file in dir_list: - # print repr(file) - # 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(smart_str(DIRECTORY), smart_str(path), smart_str(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): - append = True - if request.GET.get('q') and not re.compile(request.GET.get('q').lower(), re.M).search(file.lower()): - append = False - - # APPEND FILE_LIST - if append: - files.append(fileobject) - results_var['results_current'] += 1 - # 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 - - # COUNTER/RESULTS - if fileobject.filetype: - counter[fileobject.filetype] += 1 - - # SORTING - files.sort(key=lambda e: getattr(e, request.GET.get('o', DEFAULT_ORDER))) - if request.GET.get('ot') == "desc": - files.reverse() - - return render_to_response('filebrowser/index.html', { - 'dir': path, - 'files': files, - 'results_var': results_var, - 'counter': counter, - 'query': query, - 'title': _(u'FileBrowser'), - 'settings_var': _get_settings_var(), - 'breadcrumbs': _get_breadcrumbs(query, path, ''), - }, 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 = _('Directory/File does not exist.') - request.user.message_set.create(message=msg) - return HttpResponseRedirect(reverse("fb_browse")) - abs_path = 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 - redirect_url = reverse("fb_browse") + query_helper(query, "ot=desc,o=date", "ot,o,filter_type,filter_date,q") - 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 directory.')]) - 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, _(u'New Folder')), - }, context_instance=Context(request)) -mkdir = staff_member_required(never_cache(mkdir)) - - -@csrf_exempt -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 = _('Directory/File does not exist.') - request.user.message_set.create(message=msg) - return HttpResponseRedirect(reverse("fb_browse")) - abs_path = 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(), - 'breadcrumbs': _get_breadcrumbs(query, path, _(u'Upload')), - 'session_key': session_key, - }, 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(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"]) - - -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(os.path.join(MEDIA_ROOT, DIRECTORY, folder, filedata.name)): - old_file = os.path.join(abs_path, filedata.name) - new_file = os.path.join(abs_path, uploadedfile) - file_move_safe(new_file, old_file) - # POST UPLOAD SIGNAL - filebrowser_post_upload.send(sender=request, path=request.POST.get('folder'), file=FileObject(os.path.join(DIRECTORY, folder, filedata.name))) - return HttpResponse('True') -_upload_file = csrf_exempt(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: - msg = _('Directory/File does not exist.') - request.user.message_set.create(message=msg) - return HttpResponseRedirect(reverse("fb_browse")) - abs_path = 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(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 directory %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, ''), - }, context_instance=Context(request)) -delete = staff_member_required(never_cache(delete)) - - -# delete signals -filebrowser_pre_rename = Signal(providing_args=["path", "filename"]) -filebrowser_post_rename = Signal(providing_args=["path", "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: - msg = _('Directory/File does not exist.') - request.user.message_set.create(message=msg) - return HttpResponseRedirect(reverse("fb_browse")) - abs_path = 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_relative_server_path = os.path.join(DIRECTORY, path, form.cleaned_data['name'] + file_extension) - try: - # PRE RENAME SIGNAL - filebrowser_pre_delete.send(sender=request, path=path, filename=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_delete.send(sender=request, path=path, filename=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, _(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: - msg = _('Directory/File does not exist.') - request.user.message_set.create(message=msg) - return HttpResponseRedirect(reverse("fb_browse")) - abs_path = 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, _(u'Versions for "%s"') % filename), - }, context_instance=Context(request)) - -versions = staff_member_required(never_cache(versions)) diff --git a/apps/fileupload/__init__.py b/apps/fileupload/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/apps/fileupload/forms.py b/apps/fileupload/forms.py new file mode 100644 index 00000000..f5e10699 --- /dev/null +++ b/apps/fileupload/forms.py @@ -0,0 +1,4 @@ +from django import forms + +class UploadForm(forms.Form): + files = forms.FileField() diff --git a/apps/fileupload/locale/pl/LC_MESSAGES/django.mo b/apps/fileupload/locale/pl/LC_MESSAGES/django.mo new file mode 100644 index 00000000..8fdb9c48 Binary files /dev/null and b/apps/fileupload/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/fileupload/locale/pl/LC_MESSAGES/django.po b/apps/fileupload/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 00000000..a4b60990 --- /dev/null +++ b/apps/fileupload/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,39 @@ +# 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: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-03-07 16:27+0100\n" +"PO-Revision-Date: 2013-03-07 16:27+0100\n" +"Last-Translator: Radek Czajka \n" +"Language-Team: LANGUAGE \n" +"Language: \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==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: templates/fileupload/picture_form.html:18 +msgid "Browse:" +msgstr "Przeglądanie:" + +#: templates/fileupload/picture_form.html:35 +msgid "Add files..." +msgstr "Dodaj pliki..." + +#: templates/fileupload/picture_form.html:40 +msgid "Start upload" +msgstr "Zacznij wysyłać" + +#: templates/fileupload/picture_form.html:44 +msgid "Cancel upload" +msgstr "Anuluj wysyłanie" + +#: templates/fileupload/picture_form.html:48 +msgid "Delete" +msgstr "Usuń" + diff --git a/apps/fileupload/models.py b/apps/fileupload/models.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/apps/fileupload/models.py @@ -0,0 +1 @@ + diff --git a/apps/fileupload/static/fileupload/css/bootstrap-image-gallery.min.css b/apps/fileupload/static/fileupload/css/bootstrap-image-gallery.min.css new file mode 100644 index 00000000..a2bffbfc --- /dev/null +++ b/apps/fileupload/static/fileupload/css/bootstrap-image-gallery.min.css @@ -0,0 +1,21 @@ +@charset 'UTF-8'; +.modal-gallery{width:auto;max-height:none;} +.modal-gallery .modal-body{max-height:none;} +.modal-gallery .modal-title{display:inline-block;max-height:54px;overflow:hidden;} +.modal-gallery .modal-image{position:relative;margin:auto;min-width:128px;min-height:128px;overflow:hidden;cursor:pointer;} +.modal-gallery .modal-image:hover:before,.modal-gallery .modal-image:hover:after{content:'‹';position:absolute;top:50%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);z-index:1;} +.modal-gallery .modal-image:hover:after{content:'›';left:auto;right:15px;} +.modal-single .modal-image:hover:before,.modal-single .modal-image:hover:after{display:none;} +.modal-loading .modal-image{background:url(../img/loading.gif) center no-repeat;} +.modal-gallery.fade .modal-image{-webkit-transition:width 0.15s ease, height 0.15s ease;-moz-transition:width 0.15s ease, height 0.15s ease;-ms-transition:width 0.15s ease, height 0.15s ease;-o-transition:width 0.15s ease, height 0.15s ease;transition:width 0.15s ease, height 0.15s ease;} +.modal-gallery .modal-image *{position:absolute;top:0;opacity:0;filter:alpha(opacity=0);} +.modal-gallery.fade .modal-image *{-webkit-transition:opacity 0.5s linear;-moz-transition:opacity 0.5s linear;-ms-transition:opacity 0.5s linear;-o-transition:opacity 0.5s linear;transition:opacity 0.5s linear;} +.modal-gallery .modal-image *.in{opacity:1;filter:alpha(opacity=100);} +.modal-fullscreen{border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:transparent;overflow:hidden;} +.modal-fullscreen.modal-loading{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.modal-fullscreen .modal-body{padding:0;} +.modal-fullscreen .modal-header,.modal-fullscreen .modal-footer{position:absolute;top:0;right:0;left:0;background:transparent;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:0;z-index:2000;} +.modal-fullscreen .modal-footer{top:auto;bottom:0;} +.modal-fullscreen .close,.modal-fullscreen .modal-title{color:#fff;text-shadow:0 0 2px rgba(33, 33, 33, 0.8);} +.modal-fullscreen .modal-header:hover,.modal-fullscreen .modal-footer:hover{opacity:1;} +@media (max-width:480px){.modal-gallery .btn span{display:none;}} diff --git a/apps/fileupload/static/fileupload/css/bootstrap.min.css b/apps/fileupload/static/fileupload/css/bootstrap.min.css new file mode 100644 index 00000000..99995247 --- /dev/null +++ b/apps/fileupload/static/fileupload/css/bootstrap.min.css @@ -0,0 +1,766 @@ +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +a:hover,a:active{outline:0;} +sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} +button,input{*overflow:visible;line-height:normal;} +button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +.clearfix{*zoom:1;} +.clearfix:before,.clearfix:after{display:table;content:"";} +.clearfix:after{clear:both;} +.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} +.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} +.row{margin-left:-20px;*zoom:1;} +.row:before,.row:after{display:table;content:"";} +.row:after{clear:both;} +[class*="span"]{float:left;margin-left:20px;} +.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} +.span12{width:940px;} +.span11{width:860px;} +.span10{width:780px;} +.span9{width:700px;} +.span8{width:620px;} +.span7{width:540px;} +.span6{width:460px;} +.span5{width:380px;} +.span4{width:300px;} +.span3{width:220px;} +.span2{width:140px;} +.span1{width:60px;} +.offset12{margin-left:980px;} +.offset11{margin-left:900px;} +.offset10{margin-left:820px;} +.offset9{margin-left:740px;} +.offset8{margin-left:660px;} +.offset7{margin-left:580px;} +.offset6{margin-left:500px;} +.offset5{margin-left:420px;} +.offset4{margin-left:340px;} +.offset3{margin-left:260px;} +.offset2{margin-left:180px;} +.offset1{margin-left:100px;} +.row-fluid{width:100%;*zoom:1;} +.row-fluid:before,.row-fluid:after{display:table;content:"";} +.row-fluid:after{clear:both;} +.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.127659574%;*margin-left:2.0744680846382977%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} +.row-fluid [class*="span"]:first-child{margin-left:0;} +.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;} +.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;} +.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;} +.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;} +.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;} +.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;} +.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;} +.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;} +.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;} +.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;} +.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;} +.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;} +.container{margin-right:auto;margin-left:auto;*zoom:1;} +.container:before,.container:after{display:table;content:"";} +.container:after{clear:both;} +.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;} +.container-fluid:before,.container-fluid:after{display:table;content:"";} +.container-fluid:after{clear:both;} +p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;} +p small{font-size:11px;color:#999999;} +.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} +.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} +.page-header h1{line-height:1;} +ul,ol{padding:0;margin:0 0 9px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;} +ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} +dl{margin-bottom:18px;} +dt,dd{line-height:18px;} +dt{font-weight:bold;line-height:17px;} +dd{margin-left:9px;} +.dl-horizontal dt{float:left;width:120px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;} +.dl-horizontal dd{margin-left:130px;} +hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} +strong{font-weight:bold;} +em{font-style:italic;} +.muted{color:#999999;} +abbr[title]{cursor:help;border-bottom:1px dotted #ddd;} +abbr.initialism{font-size:90%;text-transform:uppercase;} +blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;} +blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} +blockquote small{display:block;line-height:18px;color:#999999;} +blockquote small:before{content:'\2014 \00A0';} +blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;} +blockquote.pull-right p,blockquote.pull-right small{text-align:right;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;} +small{font-size:100%;} +cite{font-style:normal;} +code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} +pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +pre.prettyprint{margin-bottom:18px;} +pre code{padding:0;color:inherit;background-color:transparent;border:0;} +.pre-scrollable{max-height:340px;overflow-y:scroll;} +form{margin:0 0 18px;} +fieldset{padding:0;margin:0;border:0;} +legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;} +legend small{font-size:13.5px;color:#999999;} +label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;} +input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} +label{display:block;margin-bottom:5px;color:#333333;} +input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.uneditable-textarea{width:auto;height:auto;} +label input,label textarea,label select{display:block;} +input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;background-color:transparent;border:0 \9;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +input[type="image"]{border:0;} +input[type="file"]{width:auto;padding:initial;line-height:initial;background-color:#ffffff;background-color:initial;border:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;} +select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} +input[type="file"]{line-height:18px \9;} +select{width:220px;background-color:#ffffff;} +select[multiple],select[size]{height:auto;} +input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +textarea{height:auto;} +input[type="hidden"]{display:none;} +.radio,.checkbox{min-height:18px;padding-left:18px;} +.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} +.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} +.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} +.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} +input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;} +input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);} +input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.input-mini{width:60px;} +.input-small{width:90px;} +.input-medium{width:150px;} +.input-large{width:210px;} +.input-xlarge{width:270px;} +.input-xxlarge{width:530px;} +input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;} +input,textarea,.uneditable-input{margin-left:0;} +input.span12,textarea.span12,.uneditable-input.span12{width:930px;} +input.span11,textarea.span11,.uneditable-input.span11{width:850px;} +input.span10,textarea.span10,.uneditable-input.span10{width:770px;} +input.span9,textarea.span9,.uneditable-input.span9{width:690px;} +input.span8,textarea.span8,.uneditable-input.span8{width:610px;} +input.span7,textarea.span7,.uneditable-input.span7{width:530px;} +input.span6,textarea.span6,.uneditable-input.span6{width:450px;} +input.span5,textarea.span5,.uneditable-input.span5{width:370px;} +input.span4,textarea.span4,.uneditable-input.span4{width:290px;} +input.span3,textarea.span3,.uneditable-input.span3{width:210px;} +input.span2,textarea.span2,.uneditable-input.span2{width:130px;} +input.span1,textarea.span1,.uneditable-input.span1{width:50px;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;} +input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;} +.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} +.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;} +.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} +.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} +.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} +.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;} +.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} +.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} +.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} +.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;} +.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} +.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} +input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;} +input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} +.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;*zoom:1;} +.form-actions:before,.form-actions:after{display:table;content:"";} +.form-actions:after{clear:both;} +.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);} +:-moz-placeholder{color:#999999;} +::-webkit-input-placeholder{color:#999999;} +.help-block,.help-inline{color:#555555;} +.help-block{display:block;margin-bottom:9px;} +.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1;} +.input-prepend,.input-append{margin-bottom:5px;} +.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2;} +.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} +.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;} +.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} +.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;} +.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;} +.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} +.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;*zoom:1;} +.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} +.form-search label,.form-inline label{display:inline-block;} +.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;} +.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;} +.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;} +.control-group{margin-bottom:9px;} +legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} +.form-horizontal .control-group{margin-bottom:18px;*zoom:1;} +.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} +.form-horizontal .control-group:after{clear:both;} +.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;} +.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;} +.form-horizontal .controls:first-child{*padding-left:160px;} +.form-horizontal .help-block{margin-top:9px;margin-bottom:0;} +.form-horizontal .form-actions{padding-left:160px;} +table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} +.table{width:100%;margin-bottom:18px;} +.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;} +.table th{font-weight:bold;} +.table thead th{vertical-align:bottom;} +.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} +.table tbody+tbody{border-top:2px solid #dddddd;} +.table-condensed th,.table-condensed td{padding:4px 5px;} +.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;} +.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} +.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} +.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} +.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;} +.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;} +.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;} +table .span1{float:none;width:44px;margin-left:0;} +table .span2{float:none;width:124px;margin-left:0;} +table .span3{float:none;width:204px;margin-left:0;} +table .span4{float:none;width:284px;margin-left:0;} +table .span5{float:none;width:364px;margin-left:0;} +table .span6{float:none;width:444px;margin-left:0;} +table .span7{float:none;width:524px;margin-left:0;} +table .span8{float:none;width:604px;margin-left:0;} +table .span9{float:none;width:684px;margin-left:0;} +table .span10{float:none;width:764px;margin-left:0;} +table .span11{float:none;width:844px;margin-left:0;} +table .span12{float:none;width:924px;margin-left:0;} +table .span13{float:none;width:1004px;margin-left:0;} +table .span14{float:none;width:1084px;margin-left:0;} +table .span15{float:none;width:1164px;margin-left:0;} +table .span16{float:none;width:1244px;margin-left:0;} +table .span17{float:none;width:1324px;margin-left:0;} +table .span18{float:none;width:1404px;margin-left:0;} +table .span19{float:none;width:1484px;margin-left:0;} +table .span20{float:none;width:1564px;margin-left:0;} +table .span21{float:none;width:1644px;margin-left:0;} +table .span22{float:none;width:1724px;margin-left:0;} +table .span23{float:none;width:1804px;margin-left:0;} +table .span24{float:none;width:1884px;margin-left:0;} +[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;} +[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;} +.icon-white{background-image:url("../img/glyphicons-halflings-white.png");} +.icon-glass{background-position:0 0;} +.icon-music{background-position:-24px 0;} +.icon-search{background-position:-48px 0;} +.icon-envelope{background-position:-72px 0;} +.icon-heart{background-position:-96px 0;} +.icon-star{background-position:-120px 0;} +.icon-star-empty{background-position:-144px 0;} +.icon-user{background-position:-168px 0;} +.icon-film{background-position:-192px 0;} +.icon-th-large{background-position:-216px 0;} +.icon-th{background-position:-240px 0;} +.icon-th-list{background-position:-264px 0;} +.icon-ok{background-position:-288px 0;} +.icon-remove{background-position:-312px 0;} +.icon-zoom-in{background-position:-336px 0;} +.icon-zoom-out{background-position:-360px 0;} +.icon-off{background-position:-384px 0;} +.icon-signal{background-position:-408px 0;} +.icon-cog{background-position:-432px 0;} +.icon-trash{background-position:-456px 0;} +.icon-home{background-position:0 -24px;} +.icon-file{background-position:-24px -24px;} +.icon-time{background-position:-48px -24px;} +.icon-road{background-position:-72px -24px;} +.icon-download-alt{background-position:-96px -24px;} +.icon-download{background-position:-120px -24px;} +.icon-upload{background-position:-144px -24px;} +.icon-inbox{background-position:-168px -24px;} +.icon-play-circle{background-position:-192px -24px;} +.icon-repeat{background-position:-216px -24px;} +.icon-refresh{background-position:-240px -24px;} +.icon-list-alt{background-position:-264px -24px;} +.icon-lock{background-position:-287px -24px;} +.icon-flag{background-position:-312px -24px;} +.icon-headphones{background-position:-336px -24px;} +.icon-volume-off{background-position:-360px -24px;} +.icon-volume-down{background-position:-384px -24px;} +.icon-volume-up{background-position:-408px -24px;} +.icon-qrcode{background-position:-432px -24px;} +.icon-barcode{background-position:-456px -24px;} +.icon-tag{background-position:0 -48px;} +.icon-tags{background-position:-25px -48px;} +.icon-book{background-position:-48px -48px;} +.icon-bookmark{background-position:-72px -48px;} +.icon-print{background-position:-96px -48px;} +.icon-camera{background-position:-120px -48px;} +.icon-font{background-position:-144px -48px;} +.icon-bold{background-position:-167px -48px;} +.icon-italic{background-position:-192px -48px;} +.icon-text-height{background-position:-216px -48px;} +.icon-text-width{background-position:-240px -48px;} +.icon-align-left{background-position:-264px -48px;} +.icon-align-center{background-position:-288px -48px;} +.icon-align-right{background-position:-312px -48px;} +.icon-align-justify{background-position:-336px -48px;} +.icon-list{background-position:-360px -48px;} +.icon-indent-left{background-position:-384px -48px;} +.icon-indent-right{background-position:-408px -48px;} +.icon-facetime-video{background-position:-432px -48px;} +.icon-picture{background-position:-456px -48px;} +.icon-pencil{background-position:0 -72px;} +.icon-map-marker{background-position:-24px -72px;} +.icon-adjust{background-position:-48px -72px;} +.icon-tint{background-position:-72px -72px;} +.icon-edit{background-position:-96px -72px;} +.icon-share{background-position:-120px -72px;} +.icon-check{background-position:-144px -72px;} +.icon-move{background-position:-168px -72px;} +.icon-step-backward{background-position:-192px -72px;} +.icon-fast-backward{background-position:-216px -72px;} +.icon-backward{background-position:-240px -72px;} +.icon-play{background-position:-264px -72px;} +.icon-pause{background-position:-288px -72px;} +.icon-stop{background-position:-312px -72px;} +.icon-forward{background-position:-336px -72px;} +.icon-fast-forward{background-position:-360px -72px;} +.icon-step-forward{background-position:-384px -72px;} +.icon-eject{background-position:-408px -72px;} +.icon-chevron-left{background-position:-432px -72px;} +.icon-chevron-right{background-position:-456px -72px;} +.icon-plus-sign{background-position:0 -96px;} +.icon-minus-sign{background-position:-24px -96px;} +.icon-remove-sign{background-position:-48px -96px;} +.icon-ok-sign{background-position:-72px -96px;} +.icon-question-sign{background-position:-96px -96px;} +.icon-info-sign{background-position:-120px -96px;} +.icon-screenshot{background-position:-144px -96px;} +.icon-remove-circle{background-position:-168px -96px;} +.icon-ok-circle{background-position:-192px -96px;} +.icon-ban-circle{background-position:-216px -96px;} +.icon-arrow-left{background-position:-240px -96px;} +.icon-arrow-right{background-position:-264px -96px;} +.icon-arrow-up{background-position:-289px -96px;} +.icon-arrow-down{background-position:-312px -96px;} +.icon-share-alt{background-position:-336px -96px;} +.icon-resize-full{background-position:-360px -96px;} +.icon-resize-small{background-position:-384px -96px;} +.icon-plus{background-position:-408px -96px;} +.icon-minus{background-position:-433px -96px;} +.icon-asterisk{background-position:-456px -96px;} +.icon-exclamation-sign{background-position:0 -120px;} +.icon-gift{background-position:-24px -120px;} +.icon-leaf{background-position:-48px -120px;} +.icon-fire{background-position:-72px -120px;} +.icon-eye-open{background-position:-96px -120px;} +.icon-eye-close{background-position:-120px -120px;} +.icon-warning-sign{background-position:-144px -120px;} +.icon-plane{background-position:-168px -120px;} +.icon-calendar{background-position:-192px -120px;} +.icon-random{background-position:-216px -120px;} +.icon-comment{background-position:-240px -120px;} +.icon-magnet{background-position:-264px -120px;} +.icon-chevron-up{background-position:-288px -120px;} +.icon-chevron-down{background-position:-313px -119px;} +.icon-retweet{background-position:-336px -120px;} +.icon-shopping-cart{background-position:-360px -120px;} +.icon-folder-close{background-position:-384px -120px;} +.icon-folder-open{background-position:-408px -120px;} +.icon-resize-vertical{background-position:-432px -119px;} +.icon-resize-horizontal{background-position:-456px -118px;} +.icon-hdd{background-position:0 -144px;} +.icon-bullhorn{background-position:-24px -144px;} +.icon-bell{background-position:-48px -144px;} +.icon-certificate{background-position:-72px -144px;} +.icon-thumbs-up{background-position:-96px -144px;} +.icon-thumbs-down{background-position:-120px -144px;} +.icon-hand-right{background-position:-144px -144px;} +.icon-hand-left{background-position:-168px -144px;} +.icon-hand-up{background-position:-192px -144px;} +.icon-hand-down{background-position:-216px -144px;} +.icon-circle-arrow-right{background-position:-240px -144px;} +.icon-circle-arrow-left{background-position:-264px -144px;} +.icon-circle-arrow-up{background-position:-288px -144px;} +.icon-circle-arrow-down{background-position:-312px -144px;} +.icon-globe{background-position:-336px -144px;} +.icon-wrench{background-position:-360px -144px;} +.icon-tasks{background-position:-384px -144px;} +.icon-filter{background-position:-408px -144px;} +.icon-briefcase{background-position:-432px -144px;} +.icon-fullscreen{background-position:-456px -144px;} +.dropup,.dropdown{position:relative;} +.dropdown-toggle{*margin-bottom:-3px;} +.dropdown-toggle:active,.open .dropdown-toggle{outline:0;} +.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";opacity:0.3;filter:alpha(opacity=30);} +.dropdown .caret{margin-top:8px;margin-left:2px;} +.dropdown:hover .caret,.open .caret{opacity:1;filter:alpha(opacity=100);} +.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:4px 0;margin:1px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;} +.dropdown-menu.pull-right{right:0;left:auto;} +.dropdown-menu .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} +.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333333;white-space:nowrap;} +.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;} +.open{*z-index:1000;} +.open .dropdown-menu{display:block;} +.pull-right .dropdown-menu{right:0;left:auto;} +.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"\2191";} +.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;} +.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);} +.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} +.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;} +.fade.in{opacity:1;} +.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;} +.collapse.in{height:auto;} +.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);} +.close:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);} +button.close{padding:0;cursor:pointer;background-color:transparent;border:0;-webkit-appearance:none;} +.btn{display:inline-block;*display:inline;padding:4px 10px 4px;margin-bottom:0;*margin-left:.3em;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;border:1px solid #cccccc;*border:0;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9;} +.btn:active,.btn.active{background-color:#cccccc \9;} +.btn:first-child{*margin-left:0;} +.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} +.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.btn-large [class^="icon-"]{margin-top:1px;} +.btn-small{padding:5px 9px;font-size:11px;line-height:16px;} +.btn-small [class^="icon-"]{margin-top:-1px;} +.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;} +.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);} +.btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn-primary{background-color:#0074cc;*background-color:#0055cc;background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;*background-color:#004ab3;} +.btn-primary:active,.btn-primary.active{background-color:#004099 \9;} +.btn-warning{background-color:#faa732;*background-color:#f89406;background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505;} +.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} +.btn-danger{background-color:#da4f49;*background-color:#bd362f;background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a;} +.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} +.btn-success{background-color:#5bb75b;*background-color:#51a351;background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;*background-color:#499249;} +.btn-success:active,.btn-success.active{background-color:#408140 \9;} +.btn-info{background-color:#49afcd;*background-color:#2f96b4;background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;*background-color:#2a85a0;} +.btn-info:active,.btn-info.active{background-color:#24748c \9;} +.btn-inverse{background-color:#414141;*background-color:#222222;background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:-moz-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;*background-color:#151515;} +.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;} +button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;} +button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} +button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;} +button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;} +button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;} +.btn-group{position:relative;*margin-left:.3em;*zoom:1;} +.btn-group:before,.btn-group:after{display:table;content:"";} +.btn-group:after{clear:both;} +.btn-group:first-child{*margin-left:0;} +.btn-group+.btn-group{margin-left:5px;} +.btn-toolbar{margin-top:9px;margin-bottom:9px;} +.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} +.btn-group>.btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px;} +.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px;} +.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px;} +.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px;} +.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;} +.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} +.btn-group>.dropdown-toggle{*padding-top:4px;padding-right:8px;*padding-bottom:4px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn-group>.btn-mini.dropdown-toggle{padding-right:5px;padding-left:5px;} +.btn-group>.btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px;} +.btn-group>.btn-large.dropdown-toggle{padding-right:12px;padding-left:12px;} +.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;} +.btn-group.open .btn-primary.dropdown-toggle{background-color:#0055cc;} +.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;} +.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;} +.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;} +.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;} +.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;} +.btn .caret{margin-top:7px;margin-left:0;} +.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);} +.btn-mini .caret{margin-top:5px;} +.btn-small .caret{margin-top:6px;} +.btn-large .caret{margin-top:6px;border-top-width:5px;border-right-width:5px;border-left-width:5px;} +.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000000;} +.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);} +.alert{padding:8px 35px 8px 14px;margin-bottom:18px;color:#c09853;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.alert-heading{color:inherit;} +.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;} +.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6;} +.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7;} +.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1;} +.alert-block{padding-top:14px;padding-bottom:14px;} +.alert-block>p,.alert-block>ul{margin-bottom:0;} +.alert-block p+p{margin-top:5px;} +.nav{margin-bottom:18px;margin-left:0;list-style:none;} +.nav>li>a{display:block;} +.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} +.nav>.pull-right{float:right;} +.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;} +.nav li+.nav-header{margin-top:9px;} +.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0;} +.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} +.nav-list>li>a{padding:3px 15px;} +.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} +.nav-list [class^="icon-"]{margin-right:2px;} +.nav-list .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} +.nav-tabs,.nav-pills{*zoom:1;} +.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";} +.nav-tabs:after,.nav-pills:after{clear:both;} +.nav-tabs>li,.nav-pills>li{float:left;} +.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} +.nav-tabs{border-bottom:1px solid #ddd;} +.nav-tabs>li{margin-bottom:-1px;} +.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} +.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} +.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;cursor:default;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;} +.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;} +.nav-stacked>li{float:none;} +.nav-stacked>li>a{margin-right:0;} +.nav-tabs.nav-stacked{border-bottom:0;} +.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} +.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} +.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd;} +.nav-pills.nav-stacked>li>a{margin-bottom:3px;} +.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} +.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;} +.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{margin-top:6px;border-top-color:#0088cc;border-bottom-color:#0088cc;} +.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;} +.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333;} +.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;} +.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} +.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);} +.tabs-stacked .open>a:hover{border-color:#999999;} +.tabbable{*zoom:1;} +.tabbable:before,.tabbable:after{display:table;content:"";} +.tabbable:after{clear:both;} +.tab-content{overflow:auto;} +.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;} +.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} +.tab-content>.active,.pill-content>.active{display:block;} +.tabs-below>.nav-tabs{border-top:1px solid #ddd;} +.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;} +.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} +.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent;} +.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd;} +.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;} +.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} +.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} +.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} +.tabs-left>.nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} +.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} +.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} +.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.tabs-right>.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} +.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} +.navbar{*position:relative;*z-index:2;margin-bottom:18px;overflow:visible;} +.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} +.navbar .container{width:auto;} +.nav-collapse.collapse{height:auto;} +.navbar{color:#999999;} +.navbar .brand:hover{text-decoration:none;} +.navbar .brand{display:block;float:left;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#999999;} +.navbar .navbar-text{margin-bottom:0;line-height:40px;} +.navbar .navbar-link{color:#999999;} +.navbar .navbar-link:hover{color:#ffffff;} +.navbar .btn,.navbar .btn-group{margin-top:5px;} +.navbar .btn-group .btn{margin:0;} +.navbar-form{margin-bottom:0;*zoom:1;} +.navbar-form:before,.navbar-form:after{display:table;content:"";} +.navbar-form:after{clear:both;} +.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} +.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0;} +.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} +.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;} +.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;} +.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;} +.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0 rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0 rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0 rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;} +.navbar-search .search-query:-moz-placeholder{color:#cccccc;} +.navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;} +.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);} +.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;} +.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} +.navbar-fixed-top{top:0;} +.navbar-fixed-bottom{bottom:0;} +.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} +.navbar .nav.pull-right{float:right;} +.navbar .nav>li{display:block;float:left;} +.navbar .nav>li>a{float:none;padding:9px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +.navbar .btn{display:inline-block;padding:4px 10px 4px;margin:5px 5px 6px;line-height:18px;} +.navbar .btn-group{padding:5px 5px 6px;margin:0;} +.navbar .nav>li>a:hover{color:#ffffff;text-decoration:none;background-color:transparent;} +.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;} +.navbar .divider-vertical{width:1px;height:40px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;} +.navbar .nav.pull-right{margin-right:0;margin-left:10px;} +.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;background-color:#2c2c2c;*background-color:#222222;background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-image:-moz-linear-gradient(top, #333333, #222222);background-repeat:repeat-x;border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);} +.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{background-color:#222222;*background-color:#151515;} +.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#080808 \9;} +.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} +.btn-navbar .icon-bar+.icon-bar{margin-top:3px;} +.navbar .dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0, 0, 0, 0.2);content:'';} +.navbar .dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #ffffff;border-left:6px solid transparent;content:'';} +.navbar-fixed-bottom .dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0, 0, 0, 0.2);} +.navbar-fixed-bottom .dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #ffffff;border-bottom:0;} +.navbar .nav li.dropdown .dropdown-toggle .caret,.navbar .nav li.dropdown.open .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} +.navbar .nav li.dropdown.active .caret{opacity:1;filter:alpha(opacity=100);} +.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:transparent;} +.navbar .nav li.dropdown.active>.dropdown-toggle:hover{color:#ffffff;} +.navbar .pull-right .dropdown-menu,.navbar .dropdown-menu.pull-right{right:0;left:auto;} +.navbar .pull-right .dropdown-menu:before,.navbar .dropdown-menu.pull-right:before{right:12px;left:auto;} +.navbar .pull-right .dropdown-menu:after,.navbar .dropdown-menu.pull-right:after{right:13px;left:auto;} +.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;} +.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #ffffff;*zoom:1;} +.breadcrumb .divider{padding:0 5px;color:#999999;} +.breadcrumb .active a{color:#333333;} +.pagination{height:36px;margin:18px 0;} +.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} +.pagination li{display:inline;} +.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;} +.pagination a:hover,.pagination .active a{background-color:#f5f5f5;} +.pagination .active a{color:#999999;cursor:default;} +.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999999;cursor:default;background-color:transparent;} +.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.pagination-centered{text-align:center;} +.pagination-right{text-align:right;} +.pager{margin-bottom:18px;margin-left:0;text-align:center;list-style:none;*zoom:1;} +.pager:before,.pager:after{display:table;content:"";} +.pager:after{clear:both;} +.pager li{display:inline;} +.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} +.pager a:hover{text-decoration:none;background-color:#f5f5f5;} +.pager .next a{float:right;} +.pager .previous a{float:left;} +.pager .disabled a,.pager .disabled a:hover{color:#999999;cursor:default;background-color:#fff;} +.modal-open .dropdown-menu{z-index:2050;} +.modal-open .dropdown.open{*z-index:2050;} +.modal-open .popover{z-index:2060;} +.modal-open .tooltip{z-index:2070;} +.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;} +.modal-backdrop.fade{opacity:0;} +.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} +.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;} +.modal.fade{top:-25%;-webkit-transition:opacity 0.3s linear,top 0.3s ease-out;-moz-transition:opacity 0.3s linear,top 0.3s ease-out;-ms-transition:opacity 0.3s linear,top 0.3s ease-out;-o-transition:opacity 0.3s linear,top 0.3s ease-out;transition:opacity 0.3s linear,top 0.3s ease-out;} +.modal.fade.in{top:50%;} +.modal-header{padding:9px 15px;border-bottom:1px solid #eee;} +.modal-header .close{margin-top:2px;} +.modal-body{max-height:400px;padding:15px;overflow-y:auto;} +.modal-form{margin-bottom:0;} +.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;} +.modal-footer:before,.modal-footer:after{display:table;content:"";} +.modal-footer:after{clear:both;} +.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px;} +.modal-footer .btn-group .btn+.btn{margin-left:-1px;} +.tooltip{position:absolute;z-index:1020;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible;} +.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} +.tooltip.top{margin-top:-2px;} +.tooltip.right{margin-left:2px;} +.tooltip.bottom{margin-top:2px;} +.tooltip.left{margin-left:-2px;} +.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000000;border-right:5px solid transparent;border-left:5px solid transparent;} +.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000000;border-left:5px solid transparent;} +.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000000;border-bottom:5px solid transparent;} +.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.tooltip-arrow{position:absolute;width:0;height:0;} +.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;} +.popover.top{margin-top:-5px;} +.popover.right{margin-left:5px;} +.popover.bottom{margin-top:5px;} +.popover.left{margin-left:-5px;} +.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000000;border-right:5px solid transparent;border-left:5px solid transparent;} +.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000000;border-bottom:5px solid transparent;} +.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000000;border-left:5px solid transparent;} +.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.popover .arrow{position:absolute;width:0;height:0;} +.popover-inner{width:280px;padding:3px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} +.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} +.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;} +.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} +.thumbnails{margin-left:-20px;list-style:none;*zoom:1;} +.thumbnails:before,.thumbnails:after{display:table;content:"";} +.thumbnails:after{clear:both;} +.row-fluid .thumbnails{margin-left:0;} +.thumbnails>li{margin-bottom:18px;} +.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);} +a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} +.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto;} +.thumbnail .caption{padding:9px;} +.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);white-space:nowrap;vertical-align:baseline;background-color:#999999;} +.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} +a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} +.label-important,.badge-important{background-color:#b94a48;} +.label-important[href],.badge-important[href]{background-color:#953b39;} +.label-warning,.badge-warning{background-color:#f89406;} +.label-warning[href],.badge-warning[href]{background-color:#c67605;} +.label-success,.badge-success{background-color:#468847;} +.label-success[href],.badge-success[href]{background-color:#356635;} +.label-info,.badge-info{background-color:#3a87ad;} +.label-info[href],.badge-info[href]{background-color:#2d6987;} +.label-inverse,.badge-inverse{background-color:#333333;} +.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} +@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{height:18px;margin-bottom:18px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);} +.progress .bar{width:0;height:18px;font-size:12px;color:#ffffff;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} +.progress-striped .bar{background-color:#149bdf;background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} +.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} +.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);} +.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);} +.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} +.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);} +.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.accordion{margin-bottom:18px;} +.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.accordion-heading{border-bottom:0;} +.accordion-heading .accordion-toggle{display:block;padding:8px 15px;} +.accordion-toggle{cursor:pointer;} +.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} +.carousel{position:relative;margin-bottom:18px;line-height:1;} +.carousel-inner{position:relative;width:100%;overflow:hidden;} +.carousel .item{position:relative;display:none;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} +.carousel .item>img{display:block;line-height:1;} +.carousel .active,.carousel .next,.carousel .prev{display:block;} +.carousel .active{left:0;} +.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} +.carousel .next{left:100%;} +.carousel .prev{left:-100%;} +.carousel .next.left,.carousel .prev.right{left:0;} +.carousel .active.left{left:-100%;} +.carousel .active.right{left:100%;} +.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);} +.carousel-control.right{right:15px;left:auto;} +.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} +.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);} +.carousel-caption h4,.carousel-caption p{color:#ffffff;} +.hero-unit{padding:60px;margin-bottom:30px;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit;} +.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.invisible{visibility:hidden;} diff --git a/apps/fileupload/static/fileupload/css/jquery.fileupload-ui.css b/apps/fileupload/static/fileupload/css/jquery.fileupload-ui.css new file mode 100644 index 00000000..e36a93df --- /dev/null +++ b/apps/fileupload/static/fileupload/css/jquery.fileupload-ui.css @@ -0,0 +1,84 @@ +@charset 'UTF-8'; +/* + * jQuery File Upload UI Plugin CSS 6.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button { + position: relative; + overflow: hidden; + float: left; + margin-right: 4px; +} +.fileinput-button input { + position: absolute; + top: 0; + right: 0; + margin: 0; + border: solid transparent; + border-width: 0 0 100px 200px; + opacity: 0; + filter: alpha(opacity=0); + -moz-transform: translate(-300px, 0) scale(4); + direction: ltr; + cursor: pointer; +} +.fileupload-buttonbar .btn, +.fileupload-buttonbar .toggle { + margin-bottom: 5px; +} +.files .progress { + width: 200px; +} +.progress-animated .bar { + background: url(../img/progressbar.gif) !important; + filter: none; +} +.fileupload-loading { + position: absolute; + left: 50%; + width: 128px; + height: 128px; + background: url(../img/loading.gif) center no-repeat; + display: none; +} +.fileupload-processing .fileupload-loading { + display: block; +} + +/* Fix for IE 6: */ +*html .fileinput-button { + line-height: 22px; + margin: 1px -3px 0 0; +} + +/* Fix for IE 7: */ +*+html .fileinput-button { + margin: 1px 0 0 0; +} + +@media (max-width: 480px) { + .files .btn span { + display: none; + } + .files .preview * { + width: 40px; + } + .files .name * { + width: 80px; + display: inline-block; + word-wrap: break-word; + } + .files .progress { + width: 20px; + } + .files .delete { + width: 60px; + } +} diff --git a/apps/fileupload/static/fileupload/css/style.css b/apps/fileupload/static/fileupload/css/style.css new file mode 100644 index 00000000..e45d81dc --- /dev/null +++ b/apps/fileupload/static/fileupload/css/style.css @@ -0,0 +1,10 @@ +.preview img { + max-height: 50px; +} + +.delete button[data-type=""] { + display: none; +} +.delete button[data-type=""] + input { + display: none; +} diff --git a/apps/fileupload/static/fileupload/img/glyphicons-halflings-white.png b/apps/fileupload/static/fileupload/img/glyphicons-halflings-white.png new file mode 100644 index 00000000..3bf6484a Binary files /dev/null and b/apps/fileupload/static/fileupload/img/glyphicons-halflings-white.png differ diff --git a/apps/fileupload/static/fileupload/img/glyphicons-halflings.png b/apps/fileupload/static/fileupload/img/glyphicons-halflings.png new file mode 100644 index 00000000..79bc568c Binary files /dev/null and b/apps/fileupload/static/fileupload/img/glyphicons-halflings.png differ diff --git a/apps/fileupload/static/fileupload/img/loading.gif b/apps/fileupload/static/fileupload/img/loading.gif new file mode 100644 index 00000000..90f28cbd Binary files /dev/null and b/apps/fileupload/static/fileupload/img/loading.gif differ diff --git a/apps/fileupload/static/fileupload/img/progressbar.gif b/apps/fileupload/static/fileupload/img/progressbar.gif new file mode 100644 index 00000000..fbcce6bc Binary files /dev/null and b/apps/fileupload/static/fileupload/img/progressbar.gif differ diff --git a/apps/fileupload/static/fileupload/js/bootstrap-image-gallery.min.js b/apps/fileupload/static/fileupload/js/bootstrap-image-gallery.min.js new file mode 100644 index 00000000..a749f55c --- /dev/null +++ b/apps/fileupload/static/fileupload/js/bootstrap-image-gallery.min.js @@ -0,0 +1 @@ +(function(a){"use strict",typeof define=="function"&&define.amd?define(["jquery","load-image","bootstrap"],a):a(window.jQuery,window.loadImage)})(function(a,b){"use strict",a.extend(a.fn.modal.defaults,{delegate:document,selector:null,filter:"*",index:0,href:null,preloadRange:2,offsetWidth:100,offsetHeight:200,canvas:!1,slideshow:0,imageClickDivision:.5});var c=a.fn.modal.Constructor.prototype.show,d=a.fn.modal.Constructor.prototype.hide;a.extend(a.fn.modal.Constructor.prototype,{initLinks:function(){var b=this,c=this.options,d=c.selector||"a[data-target="+c.target+"]";this.$links=a(c.delegate).find(d).filter(c.filter).each(function(a){b.getUrl(this)===c.href&&(c.index=a)}),this.$links[c.index]||(c.index=0)},getUrl:function(b){return b.href||a(b).data("href")},startSlideShow:function(){var a=this;this.options.slideshow&&(this._slideShow=window.setTimeout(function(){a.next()},this.options.slideshow))},stopSlideShow:function(){window.clearTimeout(this._slideShow)},toggleSlideShow:function(){var a=this.$element.find(".modal-slideshow");this.options.slideshow?(this.options.slideshow=0,this.stopSlideShow()):(this.options.slideshow=a.data("slideshow")||5e3,this.startSlideShow()),a.find("i").toggleClass("icon-play icon-pause")},preloadImages:function(){var b=this.options,c=b.index+b.preloadRange+1,d,e;for(e=b.index-b.preloadRange;e").prop("src",this.getUrl(d))},loadImage:function(){var a=this,c=this.$element,d=this.options.index,e=this.getUrl(this.$links[d]),f;this.abortLoad(),this.stopSlideShow(),c.trigger("beforeLoad"),this._loadingTimeout=window.setTimeout(function(){c.addClass("modal-loading")},100),f=c.find(".modal-image").children().removeClass("in"),window.setTimeout(function(){f.remove()},3e3),c.find(".modal-title").text(this.$links[d].title),c.find(".modal-download").prop("href",e),this._loadingImage=b(e,function(b){a.img=b,window.clearTimeout(a._loadingTimeout),c.removeClass("modal-loading"),c.trigger("load"),a.showImage(b),a.startSlideShow()},this._loadImageOptions),this.preloadImages()},showImage:function(b){var c=this.$element,d=a.support.transition&&c.hasClass("fade"),e=d?c.animate:c.css,f=c.find(".modal-image"),g,h;f.css({width:b.width,height:b.height}),c.find(".modal-title").css({width:Math.max(b.width,380)}),a(window).width()>480&&(d&&(g=c.clone().hide().appendTo(document.body)),e.call(c.stop(),{"margin-top":-((g||c).outerHeight()/2),"margin-left":-((g||c).outerWidth()/2)}),g&&g.remove()),f.append(b),h=b.offsetWidth,c.trigger("display"),d?c.is(":visible")?a(b).on(a.support.transition.end,function(d){d.target===b&&(a(b).off(a.support.transition.end),c.trigger("displayed"))}).addClass("in"):(a(b).addClass("in"),c.one("shown",function(){c.trigger("displayed")})):(a(b).addClass("in"),c.trigger("displayed"))},abortLoad:function(){this._loadingImage&&(this._loadingImage.onload=this._loadingImage.onerror=null),window.clearTimeout(this._loadingTimeout)},prev:function(){var a=this.options;a.index-=1,a.index<0&&(a.index=this.$links.length-1),this.loadImage()},next:function(){var a=this.options;a.index+=1,a.index>this.$links.length-1&&(a.index=0),this.loadImage()},keyHandler:function(a){switch(a.which){case 37:case 38:a.preventDefault(),this.prev();break;case 39:case 40:a.preventDefault(),this.next()}},wheelHandler:function(a){a.preventDefault(),a=a.originalEvent,this._wheelCounter=this._wheelCounter||0,this._wheelCounter+=a.wheelDelta||a.detail||0;if(a.wheelDelta&&this._wheelCounter>=120||!a.wheelDelta&&this._wheelCounter<0)this.prev(),this._wheelCounter=0;else if(a.wheelDelta&&this._wheelCounter<=-120||!a.wheelDelta&&this._wheelCounter>0)this.next(),this._wheelCounter=0},initGalleryEvents:function(){var b=this,c=this.$element;c.find(".modal-image").on("click.modal-gallery",function(c){var d=a(this);b.$links.length===1?b.hide():(c.pageX-d.offset().left)/d.width()480&&b.css({"margin-top":-(b.outerHeight()/2),"margin-left":-(b.outerWidth()/2)}),this.initGalleryEvents(),this.initLinks(),this.$links.length&&(b.find(".modal-slideshow, .modal-prev, .modal-next").toggle(this.$links.length!==1),b.toggleClass("modal-single",this.$links.length===1),this.loadImage())}c.apply(this,arguments)},hide:function(){this.isShown&&this.$element.hasClass("modal-gallery")&&(this.options.delegate=document,this.options.href=null,this.destroyGalleryEvents()),d.apply(this,arguments)}}),a(function(){a(document.body).on("click.modal-gallery.data-api",'[data-toggle="modal-gallery"]',function(b){var c=a(this),d=c.data(),e=a(d.target),f=e.data("modal"),g;f||(d=a.extend(e.data(),d)),d.selector||(d.selector="a[rel=gallery]"),g=a(b.target).closest(d.selector),g.length&&e.length&&(b.preventDefault(),d.href=g.prop("href")||g.data("href"),d.delegate=g[0]!==this?this:document,f&&a.extend(f.options,d),e.modal(d))})})}); diff --git a/apps/fileupload/static/fileupload/js/bootstrap.min.js b/apps/fileupload/static/fileupload/js/bootstrap.min.js new file mode 100644 index 00000000..fcfb38bc --- /dev/null +++ b/apps/fileupload/static/fileupload/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/** +* Bootstrap.js by @fat & @mdo +* Copyright 2012 Twitter, Inc. +* http://www.apache.org/licenses/LICENSE-2.0.txt +*/ +!function(a){a(function(){"use strict",a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(a){return a||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j=a.Event("slide");this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c);e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e,f,g;if(c.is(".disabled, :disabled"))return;return f=c.attr("data-target"),f||(f=c.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),e=a(f),e.length||(e=c.parent()),g=e.hasClass("open"),d(),g||e.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a(' +
{% endblock %} {% block dialogs %} diff --git a/apps/wiki/templates/wiki/document_details_base.html b/apps/wiki/templates/wiki/document_details_base.html index 5eda0942..891e9e85 100644 --- a/apps/wiki/templates/wiki/document_details_base.html +++ b/apps/wiki/templates/wiki/document_details_base.html @@ -27,7 +27,7 @@