├── .gitignore └── lbplayer_prj ├── __init__.py ├── dashboard.py ├── lbplayer ├── __init__.py ├── forms.py ├── helper.py ├── models.py ├── settings.py ├── tests.py ├── urls.py └── views.py ├── manage.py ├── media └── music │ ├── demo │ ├── Higirl.mp3 │ └── hi-fi killer.mp3 │ └── gaobai.mp3 ├── requirments.txt ├── settings.py ├── static └── lbplayer │ ├── dynatree │ ├── skin-vista │ │ ├── icons.gif │ │ ├── loading.gif │ │ └── ui.dynatree.css │ └── skin │ │ ├── icons.gif │ │ ├── loading.gif │ │ ├── ui.dynatree.css │ │ └── vline.gif │ ├── js │ ├── Jplayer.swf │ ├── jquery-ui.custom.js │ ├── jquery-ui.custom.min.js │ ├── jquery.cookie.js │ ├── jquery.dynatree.min.js │ ├── jquery.jplayer.min.js │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.preload-min.js │ └── skin │ ├── jplayer.blue.monday.css │ ├── jplayer.blue.monday.jpg │ ├── jplayer.blue.monday.video.play.hover.png │ ├── jplayer.blue.monday.video.play.png │ └── pbar-ani.gif ├── templates └── lbplayer │ ├── player.html │ └── sel_media.html └── urls.py /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.pyc -------------------------------------------------------------------------------- /lbplayer_prj/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/__init__.py -------------------------------------------------------------------------------- /lbplayer_prj/dashboard.py: -------------------------------------------------------------------------------- 1 | from django.utils.translation import ugettext_lazy as _ 2 | from django.core.urlresolvers import reverse 3 | 4 | from grappelli.dashboard import modules, Dashboard 5 | from grappelli.dashboard.utils import get_admin_site_name 6 | 7 | 8 | class CustomIndexDashboard(Dashboard): 9 | """ 10 | Custom index dashboard for www. 11 | """ 12 | 13 | def init_with_context(self, context): 14 | site_name = get_admin_site_name(context) 15 | 16 | # append an app list module for "Applications" 17 | self.children.append(modules.AppList( 18 | _('AppList: Applications'), 19 | collapsible=True, 20 | column=1, 21 | css_classes=('collapse closed',), 22 | exclude=('django.contrib.*',), 23 | )) 24 | 25 | # append an app list module for "Administration" 26 | self.children.append(modules.ModelList( 27 | _('ModelList: Administration'), 28 | column=1, 29 | collapsible=False, 30 | models=('django.contrib.*',), 31 | )) 32 | 33 | # append another link list module for "support". 34 | self.children.append(modules.LinkList( 35 | _('Media Management'), 36 | column=2, 37 | children=[ 38 | { 39 | 'title': _('FileBrowser'), 40 | 'url': '/admin/filebrowser/browse/', 41 | 'external': False, 42 | }, 43 | ] 44 | )) 45 | 46 | # append another link list module for "support". 47 | self.children.append(modules.LinkList( 48 | _('Support'), 49 | column=2, 50 | children=[ 51 | { 52 | 'title': _('Django Documentation'), 53 | 'url': 'http://docs.djangoproject.com/', 54 | 'external': True, 55 | }, 56 | { 57 | 'title': _('Grappelli Documentation'), 58 | 'url': 'http://packages.python.org/django-grappelli/', 59 | 'external': True, 60 | }, 61 | { 62 | 'title': _('Grappelli Google-Code'), 63 | 'url': 'http://code.google.com/p/django-grappelli/', 64 | 'external': True, 65 | }, 66 | ] 67 | )) 68 | 69 | # append a feed module 70 | self.children.append(modules.Feed( 71 | _('Latest Django News'), 72 | column=2, 73 | feed_url='http://www.djangoproject.com/rss/weblog/', 74 | limit=5 75 | )) 76 | 77 | # append a recent actions module 78 | self.children.append(modules.RecentActions( 79 | _('Recent Actions'), 80 | limit=5, 81 | collapsible=False, 82 | column=3, 83 | )) 84 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/lbplayer/__init__.py -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import forms 3 | 4 | 5 | class UploadFileForm(forms.Form): 6 | file = forms.FileField(label='mp3') 7 | dest = forms.CharField(label='dest', max_length=50, required=False, help_text='目标文件夹,如:陈奕迅') 8 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/helper.py: -------------------------------------------------------------------------------- 1 | #encoding=utf-8 2 | from __future__ import unicode_literals 3 | 4 | import sys 5 | if sys.version > '3': 6 | PY3 = True 7 | else: 8 | PY3 = False 9 | import os 10 | import os.path 11 | import json 12 | try: 13 | from urllib import quote 14 | except: 15 | from urllib.parse import quote 16 | 17 | 18 | from django.http import HttpResponse 19 | 20 | from . import settings as lbp_settings 21 | 22 | 23 | def render_json_response(data): 24 | return HttpResponse(json.dumps(data), mimetype='application/json') 25 | 26 | 27 | def decode_fn(fn): 28 | if PY3: 29 | return fn 30 | encode = lbp_settings.LBP_FILENAME_ENCODE 31 | encode = encode.upper() 32 | if encode == 'UTF-8': 33 | return fn 34 | return fn.decode(encode, 'ignore').encode('UTF-8') 35 | 36 | 37 | def fmt_fn(media_root, fn): 38 | fn = fn[len(media_root):].replace('\\', '/') 39 | fn = decode_fn(fn) 40 | url = lbp_settings.LBP_MEDIA_PREFIX + quote(fn) 41 | return url 42 | 43 | 44 | def key_from_string(s): 45 | """ 46 | Calculate a unique key for an arbitrary string. 47 | """ 48 | return "_" + hex(hash(s))[3:] 49 | 50 | 51 | def find_folder_by_key(root_path, key): 52 | """Search rootPath and all sub folders for a directory that matches the key.""" 53 | for root, dirs, files in os.walk(root_path): 54 | for name in dirs: 55 | full_path = os.path.join(root, name) 56 | file_key = key_from_string(full_path) 57 | if key == file_key: 58 | return full_path 59 | return None 60 | 61 | 62 | def gen_childs(root_path, key=None): 63 | if key: 64 | folder_path = find_folder_by_key(root_path, key) 65 | else: 66 | folder_path = root_path 67 | if not folder_path: 68 | return [] 69 | nodes = [] 70 | file_nodes = [] 71 | for fn in os.listdir(folder_path): 72 | full_fn = os.path.join(folder_path, fn) 73 | isdir = os.path.isdir(full_fn) 74 | if not isdir and not lbp_settings.LBP_IS_MEDIA_FUNC(fn): 75 | continue 76 | node = {"title": decode_fn(fn), 77 | "key": key_from_string(full_fn), 78 | "isFolder": isdir, 79 | "isLazy": isdir, 80 | } 81 | if isdir: 82 | nodes.append(node) 83 | else: 84 | file_nodes.append(node) 85 | nodes.extend(file_nodes) 86 | return nodes 87 | 88 | 89 | def get_all_medias(media_root, root_path): 90 | medias = [] 91 | for root, dirs, files in os.walk(root_path): 92 | for fn in files: 93 | full_fn = os.path.join(root, fn) 94 | if not lbp_settings.LBP_IS_MEDIA_FUNC(full_fn): 95 | continue 96 | medias.append({'name': decode_fn(fn), 97 | 'mp3': fmt_fn(media_root, full_fn), }) 98 | return medias 99 | 100 | 101 | def keys2medias(keys, root_path): 102 | if "__root__" in keys: 103 | return get_all_medias(root_path, root_path) 104 | medias = [] 105 | for root, dirs, files in os.walk(root_path): 106 | for name in dirs: 107 | full_path = os.path.join(root, name) 108 | file_key = key_from_string(full_path) 109 | if file_key not in keys: 110 | continue 111 | medias.extend(get_all_medias(root_path, full_path)) 112 | for name in files: 113 | full_fn = os.path.join(root, name) 114 | file_key = key_from_string(full_fn) 115 | if file_key in keys: 116 | node = {'name': decode_fn(name), 117 | 'mp3': fmt_fn(root_path, full_fn), 118 | } 119 | medias.append(node) 120 | return medias 121 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/settings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | 4 | def is_media(fn): 5 | return fn.upper().endswith('.MP3') 6 | 7 | LBP_MEDIA_PREFIX = getattr(settings, 'LBP_MEDIA_PREFIX', '/music/') 8 | LBP_MEDIA_ROOT = getattr(settings, 'LBP_MEDIA_ROOT', './') 9 | LBP_FILENAME_ENCODE = getattr(settings, 'LBP_FILENAME_ENCODE', 'UTF-8') 10 | LBP_IS_MEDIA_FUNC = getattr(settings, 'LBP_IS_MEDIA_FUNC', is_media) 11 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.failUnlessEqual(1 + 1, 2) 17 | 18 | __test__ = {"doctest": """ 19 | Another way to test that 1 + 1 is equal to 2. 20 | 21 | >>> 1 + 1 == 2 22 | True 23 | """} 24 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/urls.py: -------------------------------------------------------------------------------- 1 | #encoding=utf-8 2 | from django.conf.urls import patterns, url 3 | from . import views 4 | 5 | urlpatterns = patterns('', 6 | url(r'^$', views.player, name="lbplayer_player"), 7 | url(r'^upload/$', views.upload, name="lbplayer_upload"), 8 | url(r'^sel_media/$', views.sel_media, name="lbplayer_sel_media"), 9 | url(r'^ajax/childs/$', views.ajax_childs, name="lbplayer_ajax_childs"), 10 | url(r'^ajax/medias/$', views.ajax_medias, name="lbplayer_ajax_medias"), 11 | ) 12 | -------------------------------------------------------------------------------- /lbplayer_prj/lbplayer/views.py: -------------------------------------------------------------------------------- 1 | #encoding=utf-8 2 | from __future__ import unicode_literals 3 | 4 | import os 5 | from django.shortcuts import render, redirect 6 | from django.views.decorators.csrf import csrf_exempt 7 | 8 | from .helper import render_json_response, gen_childs, keys2medias 9 | import settings as lbp_settings 10 | from .forms import UploadFileForm 11 | 12 | 13 | def player(request): 14 | template_name = 'lbplayer/player.html' 15 | ctx = {'form': UploadFileForm()} 16 | return render(request, template_name, ctx) 17 | 18 | 19 | def handle_uploaded_file(dest, file): 20 | try: 21 | dest_dir = os.path.join(lbp_settings.LBP_MEDIA_ROOT, dest) 22 | if not os.path.exists(dest_dir): 23 | os.makedirs(dest_dir) 24 | except: # use media root if makedir failed 25 | dest_dir = lbp_settings.LBP_MEDIA_ROOT 26 | path = os.path.join(dest_dir, file.name) 27 | f = open(path, 'wb+') 28 | for chunk in file.chunks(): 29 | f.write(chunk) 30 | f.close() 31 | 32 | 33 | def upload(request): 34 | if request.method == 'POST': 35 | form = UploadFileForm(request.POST, request.FILES) 36 | if form.is_valid(): 37 | dest = form.cleaned_data['dest'] 38 | handle_uploaded_file(dest, request.FILES['file']) 39 | return redirect('/') 40 | 41 | 42 | def sel_media(request): 43 | pass 44 | template_name = 'lbplayer/sel_media.html' 45 | ctx = {} 46 | return render(request, template_name, ctx) 47 | 48 | 49 | @csrf_exempt 50 | def ajax_childs(request): 51 | key = request.GET.get('key', '') 52 | nodes = gen_childs(lbp_settings.LBP_MEDIA_ROOT, key) 53 | if not key: 54 | root_node = {"title": "目录", 55 | "key": "__root__", 56 | "isFolder": True, 57 | "isLazy": True, 58 | "url": "", 59 | "children": nodes} 60 | nodes = [root_node] 61 | return render_json_response(nodes) 62 | 63 | 64 | @csrf_exempt 65 | def ajax_medias(request): 66 | keys = request.POST.get("keys", "") 67 | keys = keys.split(',') 68 | medias = keys2medias(keys, lbp_settings.LBP_MEDIA_ROOT) 69 | return render_json_response(medias) 70 | -------------------------------------------------------------------------------- /lbplayer_prj/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from django.core.management import execute_manager 3 | try: 4 | import settings # Assumed to be in the same directory. 5 | except ImportError: 6 | import sys 7 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) 8 | sys.exit(1) 9 | 10 | if __name__ == "__main__": 11 | execute_manager(settings) 12 | -------------------------------------------------------------------------------- /lbplayer_prj/media/music/demo/Higirl.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/media/music/demo/Higirl.mp3 -------------------------------------------------------------------------------- /lbplayer_prj/media/music/demo/hi-fi killer.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/media/music/demo/hi-fi killer.mp3 -------------------------------------------------------------------------------- /lbplayer_prj/media/music/gaobai.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/media/music/gaobai.mp3 -------------------------------------------------------------------------------- /lbplayer_prj/requirments.txt: -------------------------------------------------------------------------------- 1 | Django<1.6 2 | # django-filebrowser 3 | # PIL 4 | -------------------------------------------------------------------------------- /lbplayer_prj/settings.py: -------------------------------------------------------------------------------- 1 | # Django settings for lbplayer_prj project. 2 | import os 3 | HERE = os.path.dirname(os.path.abspath(__file__)) 4 | 5 | DEBUG = True 6 | TEMPLATE_DEBUG = DEBUG 7 | 8 | ADMINS = ( 9 | # ('Your Name', 'your_email@domain.com'), 10 | ) 11 | 12 | MANAGERS = ADMINS 13 | 14 | DATABASES = { 15 | 'default': { 16 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 17 | 'NAME': 'db.sqlite', # Or path to database file if using sqlite3. 18 | 'USER': '', # Not used with sqlite3. 19 | 'PASSWORD': '', # Not used with sqlite3. 20 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 21 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. 22 | } 23 | } 24 | 25 | # Local time zone for this installation. Choices can be found here: 26 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 27 | # although not all choices may be available on all operating systems. 28 | # On Unix systems, a value of None will cause Django to use the same 29 | # timezone as the operating system. 30 | # If running in a Windows environment this must be set to the same as your 31 | # system time zone. 32 | TIME_ZONE = 'America/Chicago' 33 | 34 | # Language code for this installation. All choices can be found here: 35 | # http://www.i18nguy.com/unicode/language-identifiers.html 36 | LANGUAGE_CODE = 'en-us' 37 | 38 | SITE_ID = 1 39 | 40 | # If you set this to False, Django will make some optimizations so as not 41 | # to load the internationalization machinery. 42 | USE_I18N = True 43 | 44 | # If you set this to False, Django will not format dates, numbers and 45 | # calendars according to the current locale 46 | USE_L10N = True 47 | 48 | # Absolute path to the directory that holds media. 49 | # Example: "/home/media/media.lawrence.com/" 50 | MEDIA_ROOT = os.path.join(HERE, 'media/') 51 | 52 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a 53 | # trailing slash if there is a path component (optional in other cases). 54 | # Examples: "http://media.lawrence.com", "http://example.com/media/" 55 | MEDIA_URL = '/media/' 56 | 57 | # Absolute path to the directory static files should be collected to. 58 | # Don't put anything in this directory yourself; store your static files 59 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. 60 | # Example: "/home/media/media.lawrence.com/static/" 61 | STATIC_ROOT = os.path.join(HERE, 'collectedstatic') 62 | 63 | # URL prefix for static files. 64 | # Example: "http://media.lawrence.com/static/" 65 | STATIC_URL = '/static/' 66 | 67 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 68 | # trailing slash. 69 | # Examples: "http://foo.com/media/", "/media/". 70 | #ADMIN_MEDIA_PREFIX = '/static/admin/' 71 | ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/" 72 | 73 | # Additional locations of static files 74 | STATICFILES_DIRS = ( 75 | os.path.join(HERE, 'static/'), 76 | # Put strings here, like "/home/html/static" or "C:/www/django/static". 77 | # Always use forward slashes, even on Windows. 78 | # Don't forget to use absolute paths, not relative paths. 79 | ) 80 | 81 | LBP_MEDIA_PREFIX = '%smusic/' % MEDIA_URL 82 | LBP_MEDIA_ROOT = '%smusic/' % MEDIA_ROOT 83 | LBP_FILENAME_ENCODE = 'GBK' 84 | FILEBROWSER_DIRECTORY = LBP_MEDIA_ROOT 85 | 86 | 87 | # Make this unique, and don't share it with anybody. 88 | SECRET_KEY = 'py+#mklhmbh)5y==ul40w!y-%6&zgi5^u%x1^t19=!badf$zl)' 89 | 90 | # List of callables that know how to import templates from various sources. 91 | TEMPLATE_LOADERS = ( 92 | 'django.template.loaders.filesystem.Loader', 93 | 'django.template.loaders.app_directories.Loader', 94 | ) 95 | 96 | MIDDLEWARE_CLASSES = ( 97 | 'django.middleware.common.CommonMiddleware', 98 | 'django.contrib.sessions.middleware.SessionMiddleware', 99 | 'django.middleware.csrf.CsrfViewMiddleware', 100 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 101 | 'django.contrib.messages.middleware.MessageMiddleware', 102 | ) 103 | 104 | TEMPLATE_CONTEXT_PROCESSORS = ( 105 | "django.contrib.auth.context_processors.auth", 106 | "django.core.context_processors.request", 107 | "django.core.context_processors.debug", 108 | "django.core.context_processors.i18n", 109 | "django.core.context_processors.media", 110 | "django.core.context_processors.static", 111 | "django.core.context_processors.tz", 112 | "django.contrib.messages.context_processors.messages" 113 | ) 114 | 115 | ROOT_URLCONF = 'lbplayer_prj.urls' 116 | 117 | TEMPLATE_DIRS = ( 118 | os.path.join(HERE, 'templates_plus'), 119 | os.path.join(HERE, 'templates'), 120 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 121 | # Always use forward slashes, even on Windows. 122 | # Don't forget to use absolute paths, not relative paths. 123 | ) 124 | 125 | INSTALLED_APPS = ( 126 | # 'grappelli.dashboard', 127 | # 'grappelli', 128 | # 'filebrowser', 129 | 130 | 'django.contrib.auth', 131 | 'django.contrib.contenttypes', 132 | 'django.contrib.sessions', 133 | 'django.contrib.sites', 134 | 'django.contrib.messages', 135 | 'django.contrib.staticfiles', 136 | 137 | 'django.contrib.admin', 138 | ) 139 | 140 | FILE_UPLOAD_HANDLERS = ( 141 | 'django.core.files.uploadhandler.MemoryFileUploadHandler', 142 | 'django.core.files.uploadhandler.TemporaryFileUploadHandler', 143 | ) 144 | 145 | GRAPPELLI_INDEX_DASHBOARD = 'lbplayer_prj.dashboard.CustomIndexDashboard' 146 | 147 | try: 148 | from local_settings import * 149 | except: 150 | pass 151 | -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin-vista/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/dynatree/skin-vista/icons.gif -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin-vista/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/dynatree/skin-vista/loading.gif -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin-vista/ui.dynatree.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Tree container 3 | */ 4 | ul.dynatree-container 5 | { 6 | font-family: tahoma, arial, helvetica; 7 | font-size: 10pt; /* font size should not be too big */ 8 | white-space: nowrap; 9 | padding: 3px; 10 | 11 | background-color: white; 12 | border: 1px dotted gray; 13 | 14 | overflow: auto; 15 | } 16 | 17 | ul.dynatree-container ul 18 | { 19 | padding: 0 0 0 16px; 20 | margin: 0; 21 | } 22 | 23 | ul.dynatree-container li 24 | { 25 | list-style-image: none; 26 | list-style-position: outside; 27 | list-style-type: none; 28 | -moz-background-clip:border; 29 | -moz-background-inline-policy: continuous; 30 | -moz-background-origin: padding; 31 | background-attachment: scroll; 32 | background-color: transparent; 33 | background-position: 0 0; 34 | background-repeat: repeat-y; 35 | background-image: none; /* no v-lines */ 36 | 37 | margin:0; 38 | padding:1px 0 0 0; 39 | } 40 | /* Suppress lines for last child node */ 41 | ul.dynatree-container li.dynatree-lastsib 42 | { 43 | background-image: none; 44 | } 45 | /* Suppress lines if level is fixed expanded (option minExpandLevel) */ 46 | ul.dynatree-no-connector > li 47 | { 48 | background-image: none; 49 | } 50 | 51 | /* Style, when control is disabled */ 52 | .ui-dynatree-disabled ul.dynatree-container 53 | { 54 | opacity: 0.5; 55 | /* filter: alpha(opacity=50); /* Yields a css warning */ 56 | background-color: silver; 57 | } 58 | 59 | 60 | /******************************************************************************* 61 | * Common icon definitions 62 | */ 63 | span.dynatree-empty, 64 | span.dynatree-vline, 65 | span.dynatree-connector, 66 | span.dynatree-expander, 67 | span.dynatree-icon, 68 | span.dynatree-checkbox, 69 | span.dynatree-radio, 70 | span.dynatree-drag-helper-img, 71 | #dynatree-drop-marker 72 | { 73 | width: 16px; 74 | height: 16px; 75 | display: -moz-inline-box; /* @ FF 1+2 */ 76 | display: inline-block; /* Required to make a span sizeable */ 77 | vertical-align: top; 78 | background-repeat: no-repeat; 79 | background-position: left; 80 | background-image: url("icons.gif"); 81 | background-position: 0 0; 82 | } 83 | 84 | /** Used by 'icon' node option: */ 85 | ul.dynatree-container img 86 | { 87 | width: 16px; 88 | height: 16px; 89 | margin-left: 3px; 90 | vertical-align: top; 91 | border-style: none; 92 | } 93 | 94 | 95 | /******************************************************************************* 96 | * Lines and connectors 97 | */ 98 | 99 | /* 100 | span.dynatree-empty 101 | { 102 | } 103 | span.dynatree-vline 104 | { 105 | } 106 | */ 107 | span.dynatree-connector 108 | { 109 | background-image: none; 110 | } 111 | /* 112 | .dynatree-lastsib span.dynatree-connector 113 | { 114 | } 115 | */ 116 | /******************************************************************************* 117 | * Expander icon 118 | * Note: IE6 doesn't correctly evaluate multiples class names, 119 | * so we create combined class names that can be used in the CSS. 120 | * 121 | * Prefix: dynatree-exp- 122 | * 1st character: 'e': expanded, 'c': collapsed 123 | * 2nd character (optional): 'd': lazy (Delayed) 124 | * 3rd character (optional): 'l': Last sibling 125 | */ 126 | 127 | span.dynatree-expander 128 | { 129 | background-position: 0px -80px; 130 | cursor: pointer; 131 | } 132 | span.dynatree-expander:hover 133 | { 134 | background-position: -16px -80px; 135 | } 136 | .dynatree-exp-cl span.dynatree-expander /* Collapsed, not delayed, last sibling */ 137 | { 138 | } 139 | .dynatree-exp-cd span.dynatree-expander /* Collapsed, delayed, not last sibling */ 140 | { 141 | } 142 | .dynatree-exp-cdl span.dynatree-expander /* Collapsed, delayed, last sibling */ 143 | { 144 | } 145 | .dynatree-exp-e span.dynatree-expander, /* Expanded, not delayed, not last sibling */ 146 | .dynatree-exp-ed span.dynatree-expander, /* Expanded, delayed, not last sibling */ 147 | .dynatree-exp-el span.dynatree-expander, /* Expanded, not delayed, last sibling */ 148 | .dynatree-exp-edl span.dynatree-expander /* Expanded, delayed, last sibling */ 149 | { 150 | background-position: -32px -80px; 151 | } 152 | .dynatree-exp-e span.dynatree-expander:hover, /* Expanded, not delayed, not last sibling */ 153 | .dynatree-exp-ed span.dynatree-expander:hover, /* Expanded, delayed, not last sibling */ 154 | .dynatree-exp-el span.dynatree-expander:hover, /* Expanded, not delayed, last sibling */ 155 | .dynatree-exp-edl span.dynatree-expander:hover /* Expanded, delayed, last sibling */ 156 | { 157 | background-position: -48px -80px; 158 | } 159 | .dynatree-loading span.dynatree-expander /* 'Loading' status overrides all others */ 160 | { 161 | background-position: 0 0; 162 | background-image: url("loading.gif"); 163 | } 164 | 165 | 166 | /******************************************************************************* 167 | * Checkbox icon 168 | */ 169 | span.dynatree-checkbox 170 | { 171 | margin-left: 3px; 172 | background-position: 0px -32px; 173 | } 174 | span.dynatree-checkbox:hover 175 | { 176 | background-position: -16px -32px; 177 | } 178 | 179 | .dynatree-partsel span.dynatree-checkbox 180 | { 181 | background-position: -64px -32px; 182 | } 183 | .dynatree-partsel span.dynatree-checkbox:hover 184 | { 185 | background-position: -80px -32px; 186 | } 187 | 188 | .dynatree-selected span.dynatree-checkbox 189 | { 190 | background-position: -32px -32px; 191 | } 192 | .dynatree-selected span.dynatree-checkbox:hover 193 | { 194 | background-position: -48px -32px; 195 | } 196 | 197 | /******************************************************************************* 198 | * Radiobutton icon 199 | * This is a customization, that may be activated by overriding the 'checkbox' 200 | * class name as 'dynatree-radio' in the tree options. 201 | */ 202 | span.dynatree-radio 203 | { 204 | margin-left: 3px; 205 | background-position: 0px -48px; 206 | } 207 | span.dynatree-radio:hover 208 | { 209 | background-position: -16px -48px; 210 | } 211 | 212 | .dynatree-partsel span.dynatree-radio 213 | { 214 | background-position: -64px -48px; 215 | } 216 | .dynatree-partsel span.dynatree-radio:hover 217 | { 218 | background-position: -80px -48px; 219 | } 220 | 221 | .dynatree-selected span.dynatree-radio 222 | { 223 | background-position: -32px -48px; 224 | } 225 | .dynatree-selected span.dynatree-radio:hover 226 | { 227 | background-position: -48px -48px; 228 | } 229 | 230 | /******************************************************************************* 231 | * Node type icon 232 | * Note: IE6 doesn't correctly evaluate multiples class names, 233 | * so we create combined class names that can be used in the CSS. 234 | * 235 | * Prefix: dynatree-ico- 236 | * 1st character: 'e': expanded, 'c': collapsed 237 | * 2nd character (optional): 'f': folder 238 | */ 239 | 240 | span.dynatree-icon /* Default icon */ 241 | { 242 | margin-left: 3px; 243 | background-position: 0px 0px; 244 | } 245 | 246 | .dynatree-has-children span.dynatree-icon /* Default icon */ 247 | { 248 | /* background-position: 0px -16px; */ 249 | } 250 | 251 | .dynatree-ico-cf span.dynatree-icon /* Collapsed Folder */ 252 | { 253 | background-position: 0px -16px; 254 | } 255 | 256 | .dynatree-ico-ef span.dynatree-icon /* Expanded Folder */ 257 | { 258 | background-position: -64px -16px; 259 | } 260 | 261 | /* Status node icons */ 262 | 263 | .dynatree-statusnode-wait span.dynatree-icon 264 | { 265 | background-image: url("loading.gif"); 266 | } 267 | 268 | .dynatree-statusnode-error span.dynatree-icon 269 | { 270 | background-position: 0px -112px; 271 | /* background-image: url("ltError.gif");*/ 272 | } 273 | 274 | /******************************************************************************* 275 | * Node titles 276 | */ 277 | 278 | /* @Chrome: otherwise hit area of node titles is broken (issue 133) 279 | Removed again for issue 165; (133 couldn't be reproduced) */ 280 | span.dynatree-node 281 | { 282 | /* display: -moz-inline-box; /* @ FF 1+2 */ 283 | /* display: inline-block; /* Required to make a span sizeable */ 284 | } 285 | 286 | 287 | /* Remove blue color and underline from title links */ 288 | ul.dynatree-container a 289 | /*, ul.dynatree-container a:visited*/ 290 | { 291 | color: black; /* inherit doesn't work on IE */ 292 | text-decoration: none; 293 | vertical-align: top; 294 | margin: 0px; 295 | margin-left: 3px; 296 | /* outline: 0; /* @ Firefox, prevent dotted border after click */ 297 | /* Set transparent border to prevent jumping when active node gets a border 298 | (we can do this, because this theme doesn't use vertical lines) 299 | */ 300 | border: 1px solid white; /* Note: 'transparent' would not work in IE6 */ 301 | 302 | } 303 | 304 | ul.dynatree-container a:hover 305 | { 306 | /* text-decoration: underline; */ 307 | background: #F2F7FD; /* light blue */ 308 | border-color: #B8D6FB; /* darker light blue */ 309 | } 310 | 311 | span.dynatree-node a 312 | { 313 | display: inline-block; /* Better alignment, when title contains
*/ 314 | /* vertical-align: top;*/ 315 | padding-left: 3px; 316 | padding-right: 3px; /* Otherwise italic font will be outside bounds */ 317 | /* line-height: 16px; /* should be the same as img height, in case 16 px */ 318 | } 319 | span.dynatree-folder a 320 | { 321 | /* font-weight: bold; */ /* custom */ 322 | } 323 | 324 | ul.dynatree-container a:focus, 325 | span.dynatree-focused a:link /* @IE */ 326 | { 327 | background-color: #EFEBDE; /* gray */ 328 | } 329 | 330 | span.dynatree-has-children a 331 | { 332 | /* font-style: oblique; /* custom: */ 333 | } 334 | 335 | span.dynatree-expanded a 336 | { 337 | } 338 | 339 | span.dynatree-selected a 340 | { 341 | /* color: green; */ 342 | font-style: italic; 343 | } 344 | 345 | span.dynatree-active a 346 | { 347 | border: 1px solid #99DEFD; 348 | background-color: #D8F0FA; 349 | } 350 | 351 | /******************************************************************************* 352 | * Drag'n'drop support 353 | */ 354 | 355 | /*** Helper object ************************************************************/ 356 | div.dynatree-drag-helper 357 | { 358 | } 359 | div.dynatree-drag-helper a 360 | { 361 | border: 1px solid gray; 362 | background-color: white; 363 | padding-left: 5px; 364 | padding-right: 5px; 365 | opacity: 0.8; 366 | } 367 | span.dynatree-drag-helper-img 368 | { 369 | /* 370 | position: relative; 371 | left: -16px; 372 | */ 373 | } 374 | div.dynatree-drag-helper /*.dynatree-drop-accept*/ 375 | { 376 | /* border-color: green; 377 | background-color: red;*/ 378 | } 379 | div.dynatree-drop-accept span.dynatree-drag-helper-img 380 | { 381 | background-position: -32px -112px; 382 | } 383 | div.dynatree-drag-helper.dynatree-drop-reject 384 | { 385 | border-color: red; 386 | } 387 | div.dynatree-drop-reject span.dynatree-drag-helper-img 388 | { 389 | background-position: -16px -112px; 390 | } 391 | 392 | /*** Drop marker icon *********************************************************/ 393 | 394 | #dynatree-drop-marker 395 | { 396 | width: 24px; 397 | position: absolute; 398 | background-position: 0 -128px; 399 | } 400 | #dynatree-drop-marker.dynatree-drop-after, 401 | #dynatree-drop-marker.dynatree-drop-before 402 | { 403 | width:64px; 404 | background-position: 0 -144px; 405 | } 406 | #dynatree-drop-marker.dynatree-drop-copy 407 | { 408 | background-position: -64px -128px; 409 | } 410 | #dynatree-drop-marker.dynatree-drop-move 411 | { 412 | background-position: -64px -128px; 413 | } 414 | 415 | /*** Source node while dragging ***********************************************/ 416 | 417 | span.dynatree-drag-source 418 | { 419 | /* border: 1px dotted gray; */ 420 | background-color: #e0e0e0; 421 | } 422 | span.dynatree-drag-source a 423 | { 424 | color: gray; 425 | } 426 | 427 | /*** Target node while dragging cursor is over it *****************************/ 428 | 429 | span.dynatree-drop-target 430 | { 431 | /*border: 1px solid gray;*/ 432 | } 433 | span.dynatree-drop-target a 434 | { 435 | /*background-repeat: no-repeat; 436 | background-position: right; 437 | background-image: url("drop_child.gif");*/ 438 | } 439 | span.dynatree-drop-target.dynatree-drop-accept a 440 | { 441 | /*border: 1px solid green;*/ 442 | background-color: #3169C6 !important; 443 | color: white !important; /* @ IE6 */ 444 | text-decoration: none; 445 | } 446 | span.dynatree-drop-target.dynatree-drop-reject 447 | { 448 | /*border: 1px solid red;*/ 449 | } 450 | span.dynatree-drop-target.dynatree-drop-after a 451 | { 452 | /*background-repeat: repeat-x; 453 | background-position: bottom; 454 | background-image: url("drop_append.gif");*/ 455 | } 456 | -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/dynatree/skin/icons.gif -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/dynatree/skin/loading.gif -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin/ui.dynatree.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Tree container 3 | */ 4 | ul.dynatree-container 5 | { 6 | font-family: tahoma, arial, helvetica; 7 | font-size: 10pt; /* font size should not be too big */ 8 | white-space: nowrap; 9 | padding: 3px; 10 | 11 | background-color: white; 12 | border: 1px dotted gray; 13 | 14 | overflow: auto; 15 | } 16 | 17 | ul.dynatree-container ul 18 | { 19 | padding: 0 0 0 16px; 20 | margin: 0; 21 | } 22 | 23 | ul.dynatree-container li 24 | { 25 | list-style-image: none; 26 | list-style-position: outside; 27 | list-style-type: none; 28 | -moz-background-clip:border; 29 | -moz-background-inline-policy: continuous; 30 | -moz-background-origin: padding; 31 | background-attachment: scroll; 32 | background-color: transparent; 33 | background-repeat: repeat-y; 34 | background-image: url("vline.gif"); 35 | background-position: 0 0; 36 | /* 37 | background-image: url("icons_96x256.gif"); 38 | background-position: -80px -64px; 39 | */ 40 | margin: 0; 41 | padding: 1px 0 0 0; 42 | } 43 | /* Suppress lines for last child node */ 44 | ul.dynatree-container li.dynatree-lastsib 45 | { 46 | background-image: none; 47 | } 48 | /* Suppress lines if level is fixed expanded (option minExpandLevel) */ 49 | ul.dynatree-no-connector > li 50 | { 51 | background-image: none; 52 | } 53 | 54 | /* Style, when control is disabled */ 55 | .ui-dynatree-disabled ul.dynatree-container 56 | { 57 | opacity: 0.5; 58 | /* filter: alpha(opacity=50); /* Yields a css warning */ 59 | background-color: silver; 60 | } 61 | 62 | /******************************************************************************* 63 | * Common icon definitions 64 | */ 65 | span.dynatree-empty, 66 | span.dynatree-vline, 67 | span.dynatree-connector, 68 | span.dynatree-expander, 69 | span.dynatree-icon, 70 | span.dynatree-checkbox, 71 | span.dynatree-radio, 72 | span.dynatree-drag-helper-img, 73 | #dynatree-drop-marker 74 | { 75 | width: 16px; 76 | height: 16px; 77 | display: -moz-inline-box; /* @ FF 1+2 */ 78 | display: inline-block; /* Required to make a span sizeable */ 79 | vertical-align: top; 80 | background-repeat: no-repeat; 81 | background-position: left; 82 | background-image: url("icons.gif"); 83 | background-position: 0 0; 84 | } 85 | 86 | /** Used by 'icon' node option: */ 87 | ul.dynatree-container img 88 | { 89 | width: 16px; 90 | height: 16px; 91 | margin-left: 3px; 92 | vertical-align: top; 93 | border-style: none; 94 | } 95 | 96 | 97 | /******************************************************************************* 98 | * Lines and connectors 99 | */ 100 | 101 | span.dynatree-connector 102 | { 103 | background-position: -16px -64px; 104 | } 105 | 106 | /******************************************************************************* 107 | * Expander icon 108 | * Note: IE6 doesn't correctly evaluate multiples class names, 109 | * so we create combined class names that can be used in the CSS. 110 | * 111 | * Prefix: dynatree-exp- 112 | * 1st character: 'e': expanded, 'c': collapsed 113 | * 2nd character (optional): 'd': lazy (Delayed) 114 | * 3rd character (optional): 'l': Last sibling 115 | */ 116 | 117 | span.dynatree-expander 118 | { 119 | background-position: 0px -80px; 120 | cursor: pointer; 121 | } 122 | .dynatree-exp-cl span.dynatree-expander /* Collapsed, not delayed, last sibling */ 123 | { 124 | background-position: 0px -96px; 125 | } 126 | .dynatree-exp-cd span.dynatree-expander /* Collapsed, delayed, not last sibling */ 127 | { 128 | background-position: -64px -80px; 129 | } 130 | .dynatree-exp-cdl span.dynatree-expander /* Collapsed, delayed, last sibling */ 131 | { 132 | background-position: -64px -96px; 133 | } 134 | .dynatree-exp-e span.dynatree-expander, /* Expanded, not delayed, not last sibling */ 135 | .dynatree-exp-ed span.dynatree-expander /* Expanded, delayed, not last sibling */ 136 | { 137 | background-position: -32px -80px; 138 | } 139 | .dynatree-exp-el span.dynatree-expander, /* Expanded, not delayed, last sibling */ 140 | .dynatree-exp-edl span.dynatree-expander /* Expanded, delayed, last sibling */ 141 | { 142 | background-position: -32px -96px; 143 | } 144 | .dynatree-loading span.dynatree-expander /* 'Loading' status overrides all others */ 145 | { 146 | background-position: 0 0; 147 | background-image: url("loading.gif"); 148 | } 149 | 150 | 151 | /******************************************************************************* 152 | * Checkbox icon 153 | */ 154 | span.dynatree-checkbox 155 | { 156 | margin-left: 3px; 157 | background-position: 0px -32px; 158 | } 159 | span.dynatree-checkbox:hover 160 | { 161 | background-position: -16px -32px; 162 | } 163 | 164 | .dynatree-partsel span.dynatree-checkbox 165 | { 166 | background-position: -64px -32px; 167 | } 168 | .dynatree-partsel span.dynatree-checkbox:hover 169 | { 170 | background-position: -80px -32px; 171 | } 172 | 173 | .dynatree-selected span.dynatree-checkbox 174 | { 175 | background-position: -32px -32px; 176 | } 177 | .dynatree-selected span.dynatree-checkbox:hover 178 | { 179 | background-position: -48px -32px; 180 | } 181 | 182 | /******************************************************************************* 183 | * Radiobutton icon 184 | * This is a customization, that may be activated by overriding the 'checkbox' 185 | * class name as 'dynatree-radio' in the tree options. 186 | */ 187 | span.dynatree-radio 188 | { 189 | margin-left: 3px; 190 | background-position: 0px -48px; 191 | } 192 | span.dynatree-radio:hover 193 | { 194 | background-position: -16px -48px; 195 | } 196 | 197 | .dynatree-partsel span.dynatree-radio 198 | { 199 | background-position: -64px -48px; 200 | } 201 | .dynatree-partsel span.dynatree-radio:hover 202 | { 203 | background-position: -80px -48px; 204 | } 205 | 206 | .dynatree-selected span.dynatree-radio 207 | { 208 | background-position: -32px -48px; 209 | } 210 | .dynatree-selected span.dynatree-radio:hover 211 | { 212 | background-position: -48px -48px; 213 | } 214 | 215 | /******************************************************************************* 216 | * Node type icon 217 | * Note: IE6 doesn't correctly evaluate multiples class names, 218 | * so we create combined class names that can be used in the CSS. 219 | * 220 | * Prefix: dynatree-ico- 221 | * 1st character: 'e': expanded, 'c': collapsed 222 | * 2nd character (optional): 'f': folder 223 | */ 224 | 225 | span.dynatree-icon /* Default icon */ 226 | { 227 | margin-left: 3px; 228 | background-position: 0px 0px; 229 | } 230 | 231 | .dynatree-ico-cf span.dynatree-icon /* Collapsed Folder */ 232 | { 233 | background-position: 0px -16px; 234 | } 235 | 236 | .dynatree-ico-ef span.dynatree-icon /* Expanded Folder */ 237 | { 238 | background-position: -64px -16px; 239 | } 240 | 241 | /* Status node icons */ 242 | 243 | .dynatree-statusnode-wait span.dynatree-icon 244 | { 245 | background-image: url("loading.gif"); 246 | } 247 | 248 | .dynatree-statusnode-error span.dynatree-icon 249 | { 250 | background-position: 0px -112px; 251 | /* background-image: url("ltError.gif");*/ 252 | } 253 | 254 | /******************************************************************************* 255 | * Node titles 256 | */ 257 | 258 | /* @Chrome: otherwise hit area of node titles is broken (issue 133) 259 | Removed again for issue 165; (133 couldn't be reproduced) */ 260 | span.dynatree-node 261 | { 262 | /* display: -moz-inline-box; /* @ FF 1+2 */ 263 | /* display: inline-block; /* Required to make a span sizeable */ 264 | } 265 | 266 | 267 | /* Remove blue color and underline from title links */ 268 | ul.dynatree-container a 269 | /*, ul.dynatree-container a:visited*/ 270 | { 271 | color: black; /* inherit doesn't work on IE */ 272 | text-decoration: none; 273 | vertical-align: top; 274 | margin: 0px; 275 | margin-left: 3px; 276 | /* outline: 0; /* @ Firefox, prevent dotted border after click */ 277 | } 278 | 279 | ul.dynatree-container a:hover 280 | { 281 | /* text-decoration: underline; */ 282 | background: #F2F7FD; /* light blue */ 283 | border-color: #B8D6FB; /* darker light blue */ 284 | } 285 | 286 | span.dynatree-node a 287 | { 288 | display: inline-block; /* Better alignment, when title contains
*/ 289 | /* vertical-align: top;*/ 290 | padding-left: 3px; 291 | padding-right: 3px; /* Otherwise italic font will be outside bounds */ 292 | /* line-height: 16px; /* should be the same as img height, in case 16 px */ 293 | } 294 | span.dynatree-folder a 295 | { 296 | font-weight: bold; 297 | } 298 | 299 | ul.dynatree-container a:focus, 300 | span.dynatree-focused a:link /* @IE */ 301 | { 302 | background-color: #EFEBDE; /* gray */ 303 | } 304 | 305 | span.dynatree-has-children a 306 | { 307 | } 308 | 309 | span.dynatree-expanded a 310 | { 311 | } 312 | 313 | span.dynatree-selected a 314 | { 315 | color: green; 316 | font-style: italic; 317 | } 318 | 319 | span.dynatree-active a 320 | { 321 | background-color: #3169C6 !important; 322 | color: white !important; /* @ IE6 */ 323 | } 324 | 325 | /******************************************************************************* 326 | * Drag'n'drop support 327 | */ 328 | 329 | /*** Helper object ************************************************************/ 330 | div.dynatree-drag-helper 331 | { 332 | } 333 | div.dynatree-drag-helper a 334 | { 335 | border: 1px solid gray; 336 | background-color: white; 337 | padding-left: 5px; 338 | padding-right: 5px; 339 | opacity: 0.8; 340 | } 341 | span.dynatree-drag-helper-img 342 | { 343 | /* 344 | position: relative; 345 | left: -16px; 346 | */ 347 | } 348 | div.dynatree-drag-helper /*.dynatree-drop-accept*/ 349 | { 350 | 351 | /* border-color: green; 352 | background-color: red;*/ 353 | } 354 | div.dynatree-drop-accept span.dynatree-drag-helper-img 355 | { 356 | background-position: -32px -112px; 357 | } 358 | div.dynatree-drag-helper.dynatree-drop-reject 359 | { 360 | border-color: red; 361 | } 362 | div.dynatree-drop-reject span.dynatree-drag-helper-img 363 | { 364 | background-position: -16px -112px; 365 | } 366 | 367 | /*** Drop marker icon *********************************************************/ 368 | 369 | #dynatree-drop-marker 370 | { 371 | width: 24px; 372 | position: absolute; 373 | background-position: 0 -128px; 374 | } 375 | #dynatree-drop-marker.dynatree-drop-after, 376 | #dynatree-drop-marker.dynatree-drop-before 377 | { 378 | width:64px; 379 | background-position: 0 -144px; 380 | } 381 | #dynatree-drop-marker.dynatree-drop-copy 382 | { 383 | background-position: -64px -128px; 384 | } 385 | #dynatree-drop-marker.dynatree-drop-move 386 | { 387 | background-position: -64px -128px; 388 | } 389 | 390 | /*** Source node while dragging ***********************************************/ 391 | 392 | span.dynatree-drag-source 393 | { 394 | /* border: 1px dotted gray; */ 395 | background-color: #e0e0e0; 396 | } 397 | span.dynatree-drag-source a 398 | { 399 | color: gray; 400 | } 401 | 402 | /*** Target node while dragging cursor is over it *****************************/ 403 | 404 | span.dynatree-drop-target 405 | { 406 | /*border: 1px solid gray;*/ 407 | } 408 | span.dynatree-drop-target a 409 | { 410 | /*background-repeat: no-repeat; 411 | background-position: right; 412 | background-image: url("drop_child.gif");*/ 413 | } 414 | span.dynatree-drop-target.dynatree-drop-accept a 415 | { 416 | /*border: 1px solid green;*/ 417 | background-color: #3169C6 !important; 418 | color: white !important; /* @ IE6 */ 419 | text-decoration: none; 420 | } 421 | span.dynatree-drop-target.dynatree-drop-reject 422 | { 423 | /*border: 1px solid red;*/ 424 | } 425 | span.dynatree-drop-target.dynatree-drop-after a 426 | { 427 | /*background-repeat: repeat-x; 428 | background-position: bottom; 429 | background-image: url("drop_append.gif");*/ 430 | } 431 | 432 | 433 | /******************************************************************************* 434 | * Custom node classes (sample) 435 | */ 436 | 437 | span.custom1 a 438 | { 439 | background-color: maroon; 440 | color: yellow; 441 | } 442 | -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/dynatree/skin/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/dynatree/skin/vline.gif -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/js/Jplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicalloy/lbplayer/fb1bd106b4bbe9f8696c322ebe9d9f83ce6e19ca/lbplayer_prj/static/lbplayer/js/Jplayer.swf -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Cookie plugin 3 | * 4 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | * 9 | */ 10 | 11 | /** 12 | * Create a cookie with the given name and value and other optional parameters. 13 | * 14 | * @example $.cookie('the_cookie', 'the_value'); 15 | * @desc Set the value of a cookie. 16 | * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 17 | * @desc Create a cookie with all available options. 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Create a session cookie. 20 | * @example $.cookie('the_cookie', null); 21 | * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 22 | * used when the cookie was set. 23 | * 24 | * @param String name The name of the cookie. 25 | * @param String value The value of the cookie. 26 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 27 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 28 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 29 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 30 | * when the the browser exits. 31 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 32 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 33 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 34 | * require a secure protocol (like HTTPS). 35 | * @type undefined 36 | * 37 | * @name $.cookie 38 | * @cat Plugins/Cookie 39 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 40 | */ 41 | 42 | /** 43 | * Get the value of a cookie with the given name. 44 | * 45 | * @example $.cookie('the_cookie'); 46 | * @desc Get the value of a cookie. 47 | * 48 | * @param String name The name of the cookie. 49 | * @return The value of the cookie. 50 | * @type String 51 | * 52 | * @name $.cookie 53 | * @cat Plugins/Cookie 54 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 55 | */ 56 | jQuery.cookie = function(name, value, options) { 57 | if (typeof value != 'undefined') { // name and value given, set cookie 58 | options = options || {}; 59 | if (value === null) { 60 | value = ''; 61 | options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed 62 | options.expires = -1; 63 | } 64 | var expires = ''; 65 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 66 | var date; 67 | if (typeof options.expires == 'number') { 68 | date = new Date(); 69 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 70 | } else { 71 | date = options.expires; 72 | } 73 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 74 | } 75 | // NOTE Needed to parenthesize options.path and options.domain 76 | // in the following expressions, otherwise they evaluate to undefined 77 | // in the packed version for some reason... 78 | var path = options.path ? '; path=' + (options.path) : ''; 79 | var domain = options.domain ? '; domain=' + (options.domain) : ''; 80 | var secure = options.secure ? '; secure' : ''; 81 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 82 | } else { // only name given, get cookie 83 | var cookieValue = null; 84 | if (document.cookie && document.cookie != '') { 85 | var cookies = document.cookie.split(';'); 86 | for (var i = 0; i < cookies.length; i++) { 87 | var cookie = jQuery.trim(cookies[i]); 88 | // Does this cookie string begin with the name we want? 89 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 90 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 91 | break; 92 | } 93 | } 94 | } 95 | return cookieValue; 96 | } 97 | }; -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/js/jquery.dynatree.min.js: -------------------------------------------------------------------------------- 1 | // jquery.dynatree.js build 1.1.1 2 | // Revision: 481, date: 2011-03-02 07:25:35 3 | // Copyright (c) 2008-10 Martin Wendt (http://dynatree.googlecode.com/) 4 | // Dual licensed under the MIT or GPL Version 2 licenses. 5 | 6 | var _canLog=true;function _log(mode,msg){if(!_canLog){return;} 7 | var args=Array.prototype.slice.apply(arguments,[1]);var dt=new Date();var tag=dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();args[0]=tag+" - "+args[0];try{switch(mode){case"info":window.console.info.apply(window.console,args);break;case"warn":window.console.warn.apply(window.console,args);break;default:window.console.log.apply(window.console,args);break;}}catch(e){if(!window.console){_canLog=false;}}} 8 | function logMsg(msg){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);} 9 | var getDynaTreePersistData=null;var DTNodeStatus_Error=-1;var DTNodeStatus_Loading=1;var DTNodeStatus_Ok=0;(function($){var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};function getDtNodeFromElement(el){var iMax=5;while(el&&iMax--){if(el.dtnode){return el.dtnode;} 10 | el=el.parentNode;} 11 | return null;} 12 | function noop(){} 13 | var DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(parent,tree,data){this.parent=parent;this.tree=tree;if(typeof data==="string"){data={title:data};} 14 | if(data.key===undefined){data.key="_"+tree._nodeCount++;} 15 | this.data=$.extend({},$.ui.dynatree.nodedatadefaults,data);this.li=null;this.span=null;this.ul=null;this.childList=null;this.isLoading=false;this.hasSubSel=false;this.bExpanded=false;this.bSelected=false;},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'";},toDict:function(recursive,callback){var dict=$.extend({},this.data);dict.activate=(this.tree.activeNode===this);dict.focus=(this.tree.focusNode===this);dict.expand=this.bExpanded;dict.select=this.bSelected;if(callback){callback(dict);} 16 | if(recursive&&this.childList){dict.children=[];for(var i=0,l=this.childList.length;i1){res+=cache.tagConnector;}}else if(this.hasChildren()!==false){res+=cache.tagExpander;}else{res+=cache.tagConnector;} 19 | if(opts.checkbox&&data.hideCheckbox!==true&&!data.isStatusNode){res+=cache.tagCheckbox;} 20 | if(data.icon){res+="";}else if(data.icon===false){noop();}else{res+=cache.tagNodeIcon;} 21 | var nodeTitle="";if(opts.onCustomRender){nodeTitle=opts.onCustomRender.call(tree,this)||"";} 22 | if(!nodeTitle){var tooltip=data.tooltip?" title='"+data.tooltip+"'":"";if(opts.noLink||data.noLink){nodeTitle=""+data.title+"";}else{nodeTitle=""+data.title+"";}} 23 | res+=nodeTitle;return res;},_fixOrder:function(){var cl=this.childList;if(!cl||!this.ul){return;} 24 | var childLI=this.ul.firstChild;for(var i=0,l=cl.length-1;i1){this.ul.className=cn.container+" "+cn.noConnector;}else{this.ul.className=cn.container;}}else if(parent){if(!this.li){this.li=document.createElement("li");this.li.dtnode=this;if(data.key&&opts.generateIds){this.li.id=opts.idPrefix+data.key;} 25 | this.span=document.createElement("span");this.span.className=cn.title;this.li.appendChild(this.span);if(!parent.ul){parent.ul=document.createElement("ul");parent.ul.style.display="none";parent.li.appendChild(parent.ul);} 26 | parent.ul.appendChild(this.li);} 27 | this.span.innerHTML=this._getInnerHtml();var cnList=[];cnList.push(cn.node);if(data.isFolder){cnList.push(cn.folder);} 28 | if(this.bExpanded){cnList.push(cn.expanded);} 29 | if(this.hasChildren()!==false){cnList.push(cn.hasChildren);} 30 | if(data.isLazy&&this.childList===null){cnList.push(cn.lazy);} 31 | if(isLastSib){cnList.push(cn.lastsib);} 32 | if(this.bSelected){cnList.push(cn.selected);} 33 | if(this.hasSubSel){cnList.push(cn.partsel);} 34 | if(tree.activeNode===this){cnList.push(cn.active);} 35 | if(data.addClass){cnList.push(data.addClass);} 36 | cnList.push(cn.combinedExpanderPrefix 37 | +(this.bExpanded?"e":"c") 38 | +(data.isLazy&&this.childList===null?"d":"") 39 | +(isLastSib?"l":""));cnList.push(cn.combinedIconPrefix 40 | +(this.bExpanded?"e":"c") 41 | +(data.isFolder?"f":""));this.span.className=cnList.join(" ");this.li.className=isLastSib?cn.lastsib:"";if(opts.onRender){opts.onRender.call(tree,this,this.span);}} 42 | if((this.bExpanded||includeInvisible===true)&&this.childList){for(var i=0,l=this.childList.length;ib.data.title?1:-1;};cl.sort(cmp);if(deep){for(var i=0,l=cl.length;i0){this.childList[0].focus();}else{this.focus();}} 59 | break;case DTNodeStatus_Loading:this.isLoading=true;$(this.span).addClass(this.tree.options.classNames.nodeLoading);if(!this.parent){this._setStatusNode({title:this.tree.options.strings.loading+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeWait});} 60 | break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+lts+"'.";}},_parentList:function(includeRoot,includeSelf){var l=[];var dtn=includeSelf?this:this.parent;while(dtn){if(includeRoot||dtn.parent){l.unshift(dtn);} 61 | dtn=dtn.parent;} 62 | return l;},getLevel:function(){var level=0;var dtn=this.parent;while(dtn){level++;dtn=dtn.parent;} 63 | return level;},_getTypeForOuterNodeEvent:function(event){var cns=this.tree.options.classNames;var target=event.target;if(target.className.indexOf(cns.node)<0){return null;} 64 | var eventX=event.pageX-target.offsetLeft;var eventY=event.pageY-target.offsetTop;for(var i=0,l=target.childNodes.length;i=x&&eventX<=(x+nx)&&eventY>=y&&eventY<=(y+ny)){if(cn.className==cns.title){return"title";}else if(cn.className==cns.expander){return"expander";}else if(cn.className==cns.checkbox){return"checkbox";}else if(cn.className==cns.nodeIcon){return"icon";}}} 65 | return"prefix";},getEventTargetType:function(event){var tcn=event&&event.target?event.target.className:"";var cns=this.tree.options.classNames;if(tcn===cns.title){return"title";}else if(tcn===cns.expander){return"expander";}else if(tcn===cns.checkbox){return"checkbox";}else if(tcn===cns.nodeIcon){return"icon";}else if(tcn===cns.empty||tcn===cns.vline||tcn===cns.connector){return"prefix";}else if(tcn.indexOf(cns.node)>=0){return this._getTypeForOuterNodeEvent(event);} 66 | return null;},isVisible:function(){var parents=this._parentList(true,false);for(var i=0,l=parents.length;ia").focus();}catch(e){}},isFocused:function(){return(this.tree.tnFocused===this);},_activate:function(flag,fireEvents){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",flag,fireEvents,this);var opts=this.tree.options;if(this.data.isStatusNode){return;} 68 | if(fireEvents&&opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,flag,this)===false){return;} 69 | if(flag){if(this.tree.activeNode){if(this.tree.activeNode===this){return;} 70 | this.tree.activeNode.deactivate();} 71 | if(opts.activeVisible){this.makeVisible();} 72 | this.tree.activeNode=this;if(opts.persist){$.cookie(opts.cookieId+"-active",this.data.key,opts.cookie);} 73 | this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(opts.classNames.active);if(fireEvents&&opts.onActivate){opts.onActivate.call(this.tree,this);}}else{if(this.tree.activeNode===this){if(opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,false,this)===false){return;} 74 | $(this.span).removeClass(opts.classNames.active);if(opts.persist){$.cookie(opts.cookieId+"-active","",opts.cookie);} 75 | this.tree.persistence.activeKey=null;this.tree.activeNode=null;if(fireEvents&&opts.onDeactivate){opts.onDeactivate.call(this.tree,this);}}}},activate:function(){this._activate(true,true);},activateSilently:function(){this._activate(true,false);},deactivate:function(){this._activate(false,true);},isActive:function(){return(this.tree.activeNode===this);},_userActivate:function(){var activate=true;var expand=false;if(this.data.isFolder){switch(this.tree.options.clickFolderMode){case 2:activate=false;expand=true;break;case 3:activate=expand=true;break;}} 76 | if(this.parent===null){expand=false;} 77 | if(expand){this.toggleExpand();this.focus();} 78 | if(activate){this.activate();}},_setSubSel:function(hasSubSel){if(hasSubSel){this.hasSubSel=true;$(this.span).addClass(this.tree.options.classNames.partsel);}else{this.hasSubSel=false;$(this.span).removeClass(this.tree.options.classNames.partsel);}},_fixSelectionState:function(){var p,i,l;if(this.bSelected){this.visit(function(node){node.parent._setSubSel(true);node._select(true,false,false);});p=this.parent;while(p){p._setSubSel(true);var allChildsSelected=true;for(i=0,l=p.childList.length;i=0;i--){sib=parents[i].getNextSibling();if(sib){break;}}} 111 | if(sib){sib.focus();} 112 | break;default:handled=false;} 113 | if(handled){event.preventDefault();}},_onKeypress:function(event){},_onFocus:function(event){var opts=this.tree.options;if(event.type=="blur"||event.type=="focusout"){if(opts.onBlur){opts.onBlur.call(this.tree,this);} 114 | if(this.tree.tnFocused){$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);} 115 | this.tree.tnFocused=null;if(opts.persist){$.cookie(opts.cookieId+"-focus","",opts.cookie);}}else if(event.type=="focus"||event.type=="focusin"){if(this.tree.tnFocused&&this.tree.tnFocused!==this){this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused);$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);} 116 | this.tree.tnFocused=this;if(opts.onFocus){opts.onFocus.call(this.tree,this);} 117 | $(this.tree.tnFocused.span).addClass(opts.classNames.focused);if(opts.persist){$.cookie(opts.cookieId+"-focus",this.data.key,opts.cookie);}}},visit:function(fn,includeSelf){var res=true;if(includeSelf===true){res=fn(this);if(res===false||res=="skip"){return res;}} 118 | if(this.childList){for(var i=0,l=this.childList.length;i reloading %s...",this,keyPath,child);var self=this;child.reloadChildren(function(node,isOk){if(isOk){tree.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",node,keyPath,node);callback.call(tree,child,"loaded");node._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback);}else{tree.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",self,keyPath);callback.call(tree,child,"error");}});}else{callback.call(tree,child,"loaded");child._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback);} 140 | return;}} 141 | tree.logWarning("Node not found: "+seg);return;},resetLazy:function(){if(this.parent===null){throw"Use tree.reload() instead";}else if(!this.data.isLazy){throw"node.resetLazy() requires lazy nodes.";} 142 | this.expand(false);this.removeChildren();},_addChildNode:function(dtnode,beforeNode){var tree=this.tree;var opts=tree.options;var pers=tree.persistence;dtnode.parent=this;if(this.childList===null){this.childList=[];}else if(!beforeNode){if(this.childList.length>0){$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);}} 143 | if(beforeNode){var iBefore=$.inArray(beforeNode,this.childList);if(iBefore<0){throw" must be a child of ";} 144 | this.childList.splice(iBefore,0,dtnode);}else{this.childList.push(dtnode);} 145 | var isInitializing=tree.isInitializing();if(opts.persist&&pers.cookiesFound&&isInitializing){if(pers.activeKey==dtnode.data.key){tree.activeNode=dtnode;} 146 | if(pers.focusedKey==dtnode.data.key){tree.focusNode=dtnode;} 147 | dtnode.bExpanded=($.inArray(dtnode.data.key,pers.expandedKeyList)>=0);dtnode.bSelected=($.inArray(dtnode.data.key,pers.selectedKeyList)>=0);}else{if(dtnode.data.activate){tree.activeNode=dtnode;if(opts.persist){pers.activeKey=dtnode.data.key;}} 148 | if(dtnode.data.focus){tree.focusNode=dtnode;if(opts.persist){pers.focusedKey=dtnode.data.key;}} 149 | dtnode.bExpanded=(dtnode.data.expand===true);if(dtnode.bExpanded&&opts.persist){pers.addExpand(dtnode.data.key);} 150 | dtnode.bSelected=(dtnode.data.select===true);if(dtnode.bSelected&&opts.persist){pers.addSelect(dtnode.data.key);}} 151 | if(opts.minExpandLevel>=dtnode.getLevel()){this.bExpanded=true;} 152 | if(dtnode.bSelected&&opts.selectMode==3){var p=this;while(p){if(!p.hasSubSel){p._setSubSel(true);} 153 | p=p.parent;}} 154 | if(tree.bEnableUpdate){this.render();} 155 | return dtnode;},addChild:function(obj,beforeNode){if(typeof(obj)=="string"){throw"Invalid data type for "+obj;}else if(!obj||obj.length===0){return;}else if(obj instanceof DynaTreeNode){return this._addChildNode(obj,beforeNode);} 156 | if(!obj.length){obj=[obj];} 157 | var prevFlag=this.tree.enableUpdate(false);var tnFirst=null;for(var i=0,l=obj.length;i=0){this.expandedKeyList.splice(idx,1);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts);}},addSelect:function(key){this._log("addSelect(%o)",key);if($.inArray(key,this.selectedKeyList)<0){this.selectedKeyList.push(key);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},clearSelect:function(key){this._log("clearSelect(%o)",key);var idx=$.inArray(key,this.selectedKeyList);if(idx>=0){this.selectedKeyList.splice(idx,1);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},isReloading:function(){return this.cookiesFound===true;},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList};},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version: 1.1.1$";DynaTree.prototype={initialize:function($widget){this.phase="init";this.$widget=$widget;this.options=$widget.options;this.$tree=$widget.element;this.timer=null;this.divTree=this.$tree.get(0);_initDragAndDrop(this);},_load:function(callback){var $widget=this.$widget;var opts=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.activeNode=null;this.focusNode=null;if(opts.rootVisible!==undefined){_log("warn","Option 'rootVisible' is no longer supported.");} 181 | if(opts.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");opts.minExpandLevel=1;} 182 | if(opts.classNames!==$.ui.dynatree.prototype.options.classNames){opts.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,opts.classNames);} 183 | if(opts.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults){opts.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,opts.ajaxDefaults);} 184 | if(opts.dnd!==$.ui.dynatree.prototype.options.dnd){opts.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,opts.dnd);} 185 | if(!opts.imagePath){$("script").each(function(){var _rexDtLibName=/.*dynatree[^\/]*\.js$/i;if(this.src.search(_rexDtLibName)>=0){if(this.src.indexOf("/")>=0){opts.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/";}else{opts.imagePath="skin/";} 186 | logMsg("Guessing imagePath from '%s': '%s'",this.src,opts.imagePath);return false;}});} 187 | this.persistence=new DynaTreeStatus(opts.cookieId,opts.cookie);if(opts.persist){if(!$.cookie){_log("warn","Please include jquery.cookie.js to use persistence.");} 188 | this.persistence.read();} 189 | this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"",tagVline:"",tagExpander:"",tagConnector:"",tagNodeIcon:"",tagCheckbox:"",lastentry:undefined};if(opts.children||(opts.initAjax&&opts.initAjax.url)||opts.initId){$(this.divTree).empty();} 190 | var $ulInitialize=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{});this.tnRoot.bExpanded=true;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var root=this.tnRoot;var isReloading=(opts.persist&&this.persistence.isReloading());var isLazy=false;var prevFlag=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(opts.children){root.addChild(opts.children);}else if(opts.initAjax&&opts.initAjax.url){isLazy=true;root.data.isLazy=true;this._reloadAjax(callback);}else if(opts.initId){this._createFromTag(root,$("#"+opts.initId));}else{this._createFromTag(root,$ulInitialize);$ulInitialize.remove();} 191 | this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(prevFlag);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";if(opts.persist){this.persistence.write();} 192 | if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus();} 193 | if(!isLazy&&opts.onPostInit){opts.onPostInit.call(this,isReloading,false);} 194 | this.phase="idle";},_reloadAjax:function(callback){var opts=this.options;if(!opts.initAjax||!opts.initAjax.url){throw"tree.reload() requires 'initAjax' mode.";} 195 | var pers=this.persistence;var ajaxOpts=$.extend({},opts.initAjax);if(ajaxOpts.addActiveKey){ajaxOpts.data.activeKey=pers.activeKey;} 196 | if(ajaxOpts.addFocusedKey){ajaxOpts.data.focusedKey=pers.focusedKey;} 197 | if(ajaxOpts.addExpandedKeyList){ajaxOpts.data.expandedKeyList=pers.expandedKeyList.join(",");} 198 | if(ajaxOpts.addSelectedKeyList){ajaxOpts.data.selectedKeyList=pers.selectedKeyList.join(",");} 199 | if(opts.onPostInit){if(ajaxOpts.success){this.logWarning("initAjax: success callback is ignored when onPostInit was specified.");} 200 | if(ajaxOpts.error){this.logWarning("initAjax: error callback is ignored when onPostInit was specified.");} 201 | var isReloading=pers.isReloading();ajaxOpts.success=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,false);if(callback){callback.call(dtnode.tree,"ok");}};ajaxOpts.error=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,true);if(callback){callback.call(dtnode.tree,"error");}};} 202 | this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(ajaxOpts);},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'";},toDict:function(){return this.tnRoot.toDict(true);},serializeArray:function(stopOnParents){var nodeList=this.getSelectedNodes(stopOnParents),name=this.$tree.attr("name")||this.$tree.attr("id"),arr=[];for(var i=0,l=nodeList.length;i=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);}},logInfo:function(msg){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments);}},logWarning:function(msg){Array.prototype.unshift.apply(arguments,["warn"]);_log.apply(this,arguments);},isInitializing:function(){return(this.phase=="init"||this.phase=="postInit");},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound;},isUserEvent:function(){return(this.phase=="userEvent");},redraw:function(){this.tnRoot.render(false,false);},renderInvisibleNodes:function(){this.tnRoot.render(false,true);},reload:function(callback){this._load(callback);},getRoot:function(){return this.tnRoot;},enable:function(){this.$widget.enable();},disable:function(){this.$widget.disable();},getNodeByKey:function(key){var el=document.getElementById(this.options.idPrefix+key);if(el){return el.dtnode?el.dtnode:null;} 204 | var match=null;this.visit(function(node){if(node.data.key==key){match=node;return false;}},true);return match;},getActiveNode:function(){return this.activeNode;},reactivate:function(setFocus){var node=this.activeNode;if(node){this.activeNode=null;node.activate();if(setFocus){node.focus();}}},getSelectedNodes:function(stopOnParents){var nodeList=[];this.tnRoot.visit(function(node){if(node.bSelected){nodeList.push(node);if(stopOnParents===true){return"skip";}}});return nodeList;},activateKey:function(key){var dtnode=(key===null)?null:this.getNodeByKey(key);if(!dtnode){if(this.activeNode){this.activeNode.deactivate();} 205 | this.activeNode=null;return null;} 206 | dtnode.focus();dtnode.activate();return dtnode;},loadKeyPath:function(keyPath,callback){var segList=keyPath.split(this.options.keyPathSeparator);if(segList[0]===""){segList.shift();} 207 | if(segList[0]==this.tnRoot.data.key){this.logDebug("Removed leading root key.");segList.shift();} 208 | keyPath=segList.join(this.options.keyPathSeparator);return this.tnRoot._loadKeyPath(keyPath,callback);},selectKey:function(key,select){var dtnode=this.getNodeByKey(key);if(!dtnode){return null;} 209 | dtnode.select(select);return dtnode;},enableUpdate:function(bEnable){if(this.bEnableUpdate==bEnable){return bEnable;} 210 | this.bEnableUpdate=bEnable;if(bEnable){this.redraw();} 211 | return!bEnable;},count:function(){return this.tnRoot.countChildren();},visit:function(fn,includeRoot){return this.tnRoot.visit(fn,includeRoot);},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this);var $liSpan=$li.find(">span:first");var title;if($liSpan.length){title=$liSpan.html();}else{title=$li.html();var iPos=title.search(/
    =0){title=$.trim(title.substring(0,iPos));}else{title=$.trim(title);}} 212 | var data={title:title,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")};if($li.attr("title")){data.tooltip=$li.attr("title");} 213 | if($li.attr("id")){data.key=$li.attr("id");} 214 | if($li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){if(dataAttr.charAt(0)!="{"){dataAttr="{"+dataAttr+"}";} 215 | try{$.extend(data,eval("("+dataAttr+")"));}catch(e){throw("Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'");}}} 216 | var childNode=parentTreeNode.addChild(data);var $ul=$li.find(">ul:first");if($ul.length){self._createFromTag(childNode,$ul);}});},_checkConsistency:function(){},_setDndStatus:function(sourceNode,targetNode,helper,hitMode,accept){var $source=sourceNode?$(sourceNode.span):null;var $target=$(targetNode.span);if(!this.$dndMarker){this.$dndMarker=$("
    ").hide().prependTo($(this.divTree).parent());} 217 | if(hitMode==="after"||hitMode==="before"||hitMode==="over"){var pos=$target.position();switch(hitMode){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-before");pos.top-=8;break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-after");pos.top+=8;break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before");this.$dndMarker.addClass("dynatree-drop-over");$target.addClass("dynatree-drop-target");pos.left+=8;} 218 | this.$dndMarker.css({"left":(pos.left)+"px","top":(pos.top)+"px"}).show();}else{$target.removeClass("dynatree-drop-target");this.$dndMarker.hide();} 219 | if(hitMode==="after"){$target.addClass("dynatree-drop-after");}else{$target.removeClass("dynatree-drop-after");} 220 | if(hitMode==="before"){$target.addClass("dynatree-drop-before");}else{$target.removeClass("dynatree-drop-before");} 221 | if(accept===true){if($source){$source.addClass("dynatree-drop-accept");} 222 | $target.addClass("dynatree-drop-accept");helper.addClass("dynatree-drop-accept");}else{if($source){$source.removeClass("dynatree-drop-accept");} 223 | $target.removeClass("dynatree-drop-accept");helper.removeClass("dynatree-drop-accept");} 224 | if(accept===false){if($source){$source.addClass("dynatree-drop-reject");} 225 | $target.addClass("dynatree-drop-reject");helper.addClass("dynatree-drop-reject");}else{if($source){$source.removeClass("dynatree-drop-reject");} 226 | $target.removeClass("dynatree-drop-reject");helper.removeClass("dynatree-drop-reject");}},_onDragEvent:function(eventName,node,otherNode,event,ui,draggable){var opts=this.options;var dnd=this.options.dnd;var res=null;var nodeTag=$(node.span);var hitMode;switch(eventName){case"helper":var helper=$("
    ").append($(event.target).closest('a').clone());helper.data("dtSourceNode",node);res=helper;break;case"start":if(node.isStatusNode()){res=false;}else if(dnd.onDragStart){res=dnd.onDragStart(node);} 227 | if(res===false){this.logDebug("tree.onDragStart() cancelled");ui.helper.trigger("mouseup");ui.helper.hide();}else{nodeTag.addClass("dynatree-drag-source");} 228 | break;case"enter":res=dnd.onDragEnter?dnd.onDragEnter(node,otherNode):null;res={over:(res!==false)&&((res===true)||(res==="over")||$.inArray("over",res)>=0),before:(res!==false)&&((res===true)||(res==="before")||$.inArray("before",res)>=0),after:(res!==false)&&((res===true)||(res==="after")||$.inArray("after",res)>=0)};ui.helper.data("enterResponse",res);break;case"over":var enterResponse=ui.helper.data("enterResponse");hitMode=null;if(enterResponse===false){break;}else if(typeof enterResponse==="string"){hitMode=enterResponse;}else{var nodeOfs=nodeTag.offset();var relPos={x:event.pageX-nodeOfs.left,y:event.pageY-nodeOfs.top};var relPos2={x:relPos.x/nodeTag.width(),y:relPos.y/nodeTag.height()};if(enterResponse.after&&relPos2.y>0.75){hitMode="after";}else if(!enterResponse.over&&enterResponse.after&&relPos2.y>0.5){hitMode="after";}else if(enterResponse.before&&relPos2.y<=0.25){hitMode="before";}else if(!enterResponse.over&&enterResponse.before&&relPos2.y<=0.5){hitMode="before";}else if(enterResponse.over){hitMode="over";} 229 | if(dnd.preventVoidMoves){if(node===otherNode){hitMode=null;}else if(hitMode==="before"&&otherNode&&node===otherNode.getNextSibling()){hitMode=null;}else if(hitMode==="after"&&otherNode&&node===otherNode.getPrevSibling()){hitMode=null;}else if(hitMode==="over"&&otherNode&&otherNode.parent===node&&otherNode.isLastSibling()){hitMode=null;}} 230 | ui.helper.data("hitMode",hitMode);} 231 | if(hitMode==="over"&&dnd.autoExpandMS&&node.hasChildren()!==false&&!node.bExpanded){node.scheduleAction("expand",dnd.autoExpandMS);} 232 | if(hitMode&&dnd.onDragOver){res=dnd.onDragOver(node,otherNode,hitMode);} 233 | this._setDndStatus(otherNode,node,ui.helper,hitMode,res!==false);break;case"drop":hitMode=ui.helper.data("hitMode");if(hitMode&&dnd.onDrop){dnd.onDrop(node,otherNode,hitMode,ui,draggable);} 234 | break;case"leave":node.scheduleAction("cancel");ui.helper.data("enterResponse",null);ui.helper.data("hitMode",null);this._setDndStatus(otherNode,node,ui.helper,"out",undefined);if(dnd.onDragLeave){dnd.onDragLeave(node,otherNode);} 235 | break;case"stop":nodeTag.removeClass("dynatree-drag-source");if(dnd.onDragStop){dnd.onDragStop(node);} 236 | break;default:throw"Unsupported drag event: "+eventName;} 237 | return res;},cancelDrag:function(){var dd=$.ui.ddmanager.current;if(dd){dd.cancel();}},lastentry:undefined};$.widget("ui.dynatree",{_init:function(){if(parseFloat($.ui.version)<1.8){_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");return this._create();} 238 | _log("debug","ui.dynatree._init() was called; no current default functionality.");},_create:function(){logMsg("Dynatree._create(): version='%s', debugLevel=%o.",DynaTree.version,this.options.debugLevel);var opts=this.options;this.options.event+=".dynatree";var divTree=this.element.get(0);this.tree=new DynaTree(this);this.tree._load();this.tree.logDebug("Dynatree._init(): done.");},bind:function(){this.unbind();var eventNames="click.dynatree dblclick.dynatree";if(this.options.keyboard){eventNames+=" keypress.dynatree keydown.dynatree";} 239 | this.element.bind(eventNames,function(event){var dtnode=getDtNodeFromElement(event.target);if(!dtnode){return true;} 240 | var tree=dtnode.tree;var o=tree.options;tree.logDebug("event(%s): dtnode: %s",event.type,dtnode);var prevPhase=tree.phase;tree.phase="userEvent";try{switch(event.type){case"click":return(o.onClick&&o.onClick.call(tree,dtnode,event)===false)?false:dtnode._onClick(event);case"dblclick":return(o.onDblClick&&o.onDblClick.call(tree,dtnode,event)===false)?false:dtnode._onDblClick(event);case"keydown":return(o.onKeydown&&o.onKeydown.call(tree,dtnode,event)===false)?false:dtnode._onKeydown(event);case"keypress":return(o.onKeypress&&o.onKeypress.call(tree,dtnode,event)===false)?false:dtnode._onKeypress(event);}}catch(e){var _=null;tree.logWarning("bind(%o): dtnode: %o, error: %o",event,dtnode,e);}finally{tree.phase=prevPhase;}});function __focusHandler(event){event=$.event.fix(event||window.event);var dtnode=getDtNodeFromElement(event.target);return dtnode?dtnode._onFocus(event):false;} 241 | var div=this.tree.divTree;if(div.addEventListener){div.addEventListener("focus",__focusHandler,true);div.addEventListener("blur",__focusHandler,true);}else{div.onfocusin=div.onfocusout=__focusHandler;}},unbind:function(){this.element.unbind(".dynatree");},enable:function(){this.bind();$.Widget.prototype.enable.apply(this,arguments);},disable:function(){this.unbind();$.Widget.prototype.disable.apply(this,arguments);},getTree:function(){return this.tree;},getRoot:function(){return this.tree.getRoot();},getActiveNode:function(){return this.tree.getActiveNode();},getSelectedNodes:function(){return this.tree.getSelectedNodes();},lastentry:undefined});if(parseFloat($.ui.version)<1.8){$.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes";} 242 | $.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:true,keyboard:true,persist:false,autoCollapse:false,clickFolderMode:3,activeVisible:true,checkbox:false,selectMode:2,fx:null,noLink:false,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onRender:null,dnd:{onDragStart:null,onDragStop:null,autoExpandMS:1000,preventVoidMoves:true,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:false,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:1,lastentry:undefined};if(parseFloat($.ui.version)<1.8){$.ui.dynatree.defaults=$.ui.dynatree.prototype.options;} 243 | $.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:false,isLazy:false,tooltip:null,icon:null,addClass:null,noLink:false,activate:false,focus:false,expand:false,select:false,hideCheckbox:false,unselectable:false,children:null,lastentry:undefined};function _initDragAndDrop(tree){var dnd=tree.options.dnd||null;if(dnd&&(dnd.onDragStart||dnd.onDrop)){_registerDnd();} 244 | if(dnd&&dnd.onDragStart){tree.$tree.draggable({addClasses:false,appendTo:"body",containment:false,delay:0,distance:4,revert:false,connectToDynatree:true,helper:function(event){var sourceNode=getDtNodeFromElement(event.target);return sourceNode.tree._onDragEvent("helper",sourceNode,null,event,null,null);},_last:null});} 245 | if(dnd&&dnd.onDrop){tree.$tree.droppable({addClasses:false,tolerance:"intersect",greedy:false,_last:null});}} 246 | var didRegisterDnd=false;var _registerDnd=function(){if(didRegisterDnd){return;} 247 | $.ui.plugin.add("draggable","connectToDynatree",{start:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;if(sourceNode){draggable.offset.click.top=-2;draggable.offset.click.left=+16;return sourceNode.tree._onDragEvent("start",sourceNode,null,event,ui,draggable);}},drag:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;var prevTargetNode=ui.helper.data("dtTargetNode")||null;var targetNode=getDtNodeFromElement(event.target);if(event.target&&!targetNode){var isHelper=$(event.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0;if(isHelper){return;}} 248 | ui.helper.data("dtTargetNode",targetNode);if(prevTargetNode&&prevTargetNode!==targetNode){prevTargetNode.tree._onDragEvent("leave",prevTargetNode,sourceNode,event,ui,draggable);} 249 | if(targetNode){if(!targetNode.tree.options.dnd.onDrop){noop();}else if(targetNode===prevTargetNode){targetNode.tree._onDragEvent("over",targetNode,sourceNode,event,ui,draggable);}else{targetNode.tree._onDragEvent("enter",targetNode,sourceNode,event,ui,draggable);}}},stop:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;var targetNode=ui.helper.data("dtTargetNode")||null;var mouseDownEvent=draggable._mouseDownEvent;var eventType=event.type;var dropped=(eventType=="mouseup"&&event.which==1);if(!dropped){logMsg("Drag was cancelled");} 250 | if(targetNode){if(dropped){targetNode.tree._onDragEvent("drop",targetNode,sourceNode,event,ui,draggable);} 251 | targetNode.tree._onDragEvent("leave",targetNode,sourceNode,event,ui,draggable);} 252 | if(sourceNode){sourceNode.tree._onDragEvent("stop",sourceNode,null,event,ui,draggable);}}});didRegisterDnd=true;};})(jQuery); -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/js/jquery.jplayer.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jPlayer Plugin for jQuery JavaScript Library 3 | * http://www.happyworm.com/jquery/jplayer 4 | * 5 | * Copyright (c) 2009 - 2010 Happyworm Ltd 6 | * Dual licensed under the MIT and GPL licenses. 7 | * - http://www.opensource.org/licenses/mit-license.php 8 | * - http://www.gnu.org/copyleft/gpl.html 9 | * 10 | * Author: Mark J Panaghiston 11 | * Version: 2.0.0 12 | * Date: 20th December 2010 13 | */ 14 | 15 | (function(c,h){c.fn.jPlayer=function(a){var b=typeof a==="string",d=Array.prototype.slice.call(arguments,1),f=this;a=!b&&d.length?c.extend.apply(null,[true,a].concat(d)):a;if(b&&a.charAt(0)==="_")return f;b?this.each(function(){var e=c.data(this,"jPlayer"),g=e&&c.isFunction(e[a])?e[a].apply(e,d):e;if(g!==e&&g!==h){f=g;return false}}):this.each(function(){var e=c.data(this,"jPlayer");if(e){e.option(a||{})._init();e.option(a||{})}else c.data(this,"jPlayer",new c.jPlayer(a,this))});return f};c.jPlayer= 16 | function(a,b){if(arguments.length){this.element=c(b);this.options=c.extend(true,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};c.jPlayer.event={ready:"jPlayer_ready",resize:"jPlayer_resize",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata", 17 | loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};c.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplaythrough","ratechange"];c.jPlayer.pause= 18 | function(){c.each(c.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})};c.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};c.jPlayer.convertTime=function(a){a=new Date(a*1E3);var b=a.getUTCHours(),d=a.getUTCMinutes();a=a.getUTCSeconds();b=c.jPlayer.timeFormat.padHour&&b<10?"0"+b:b;d=c.jPlayer.timeFormat.padMin&&d<10?"0"+d:d;a=c.jPlayer.timeFormat.padSec&&a<10?"0"+a:a;return(c.jPlayer.timeFormat.showHour? 19 | b+c.jPlayer.timeFormat.sepHour:"")+(c.jPlayer.timeFormat.showMin?d+c.jPlayer.timeFormat.sepMin:"")+(c.jPlayer.timeFormat.showSec?a+c.jPlayer.timeFormat.sepSec:"")};c.jPlayer.uaMatch=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,d=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||d.exec(a)||a.indexOf("compatible")<0&&f.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};c.jPlayer.browser={};var m=c.jPlayer.uaMatch(navigator.userAgent); 20 | if(m.browser){c.jPlayer.browser[m.browser]=true;c.jPlayer.browser.version=m.version}c.jPlayer.prototype={count:0,version:{script:"2.0.0",needFlash:"2.0.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:0.8,muted:false,backgroundColor:"#000000",cssSelectorAncestor:"#jp_interface_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute", 21 | volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",currentTime:".jp-current-time",duration:".jp-duration"},idPrefix:"jp",errorAlerts:false,warningAlerts:false},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0},_status:{volume:h,muted:false,width:0,height:0},internal:{ready:false,instance:h,htmlDlyCmdId:h},solution:{html:true, 22 | flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"', 23 | flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=c.extend({},this.status,this._status);this.internal=c.extend({},this.internal);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.status.volume=this._limitValue(this.options.volume,0,1);this.status.muted= 24 | this.options.muted;this.status.width=this.element.css("width");this.status.height=this.element.css("height");this.element.css({"background-color":this.options.backgroundColor});c.each(this.options.supplied.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.format[i]){var j=false;c.each(a.formats,function(n,k){if(i===k){j=true;return false}});j||a.formats.push(i)}});c.each(this.options.solution.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.solution[i]){var j= 25 | false;c.each(a.solutions,function(n,k){if(i===k){j=true;return false}});j||a.solutions.push(i)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")===""&&this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=c.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=c.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:h});this.internal.video=c.extend({},{id:this.options.idPrefix+ 26 | "_video_"+this.count,jq:h});this.internal.flash=c.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:h,swf:this.options.swfPath+(this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf"});this.internal.poster=c.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:h});c.each(c.jPlayer.event,function(e,g){if(a.options[e]!==h){a.element.bind(g+".jPlayer",a.options[e]);a.options[e]=h}});this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id= 27 | this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!a.status.video||a.status.waitForPlay)a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=c("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.require.audio=false;this.require.video=false;c.each(this.formats,function(e,g){a.require[a.format[g].media]=true});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio= 28 | document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType}this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};c.each(this.formats,function(e,g){a.html.canPlay[g]= 29 | a.html[a.format[g].media].available&&""!==a.htmlElement[a.format[g].media].canPlayType(a.format[g].codec);a.flash.canPlay[g]=a.format[g].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;c.each(this.solutions,function(e,g){if(e===0)a[g].desired=true;else{var i=false,j=false;c.each(a.formats,function(n,k){if(a[a.solutions[0]].canPlay[k])if(a.format[k].media==="video")j=true;else i=true});a[g].desired=a.require.audio&&!i||a.require.video&&!j}});this.html.support={}; 30 | this.flash.support={};c.each(this.formats,function(e,g){a.html.support[g]=a.html.canPlay[g]&&a.html.desired;a.flash.support[g]=a.flash.canPlay[g]&&a.flash.desired});this.html.used=false;this.flash.used=false;c.each(this.solutions,function(e,g){c.each(a.formats,function(i,j){if(a[g].support[j]){a[g].used=true;return false}})});this.html.used||this.flash.used||this._error({type:c.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SOLUTION, 31 | hint:c.jPlayer.errorHint.NO_SOLUTION});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;if(this.flash.used){var b="id="+escape(this.internal.self.id)+"&vol="+this.status.volume+"&muted="+this.status.muted;if(c.browser.msie&&Number(c.browser.version)<=8){var d='';f[1]='';f[2]='';f[3]='';f[4]='';b=document.createElement(d);for(d=0;d0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;g=100*a.currentTime/a.seekable.end(a.seekable.length-1)}else{e=100;g=f}if(b)f=g=d=0;this.status.seekPercent=e;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=f;this.status.currentTime=d},_resetStatus:function(){this.status=c.extend({},this.status,c.jPlayer.prototype.status)}, 43 | _trigger:function(a,b,d){a=c.Event(a);a.jPlayer={};a.jPlayer.version=c.extend({},this.version);a.jPlayer.status=c.extend(true,{},this.status);a.jPlayer.html=c.extend(true,{},this.html);a.jPlayer.flash=c.extend(true,{},this.flash);if(b)a.jPlayer.error=c.extend({},b);if(d)a.jPlayer.warning=c.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,b){if(a===c.jPlayer.event.ready&&!this.internal.ready){this.internal.ready=true;this.version.flash=b.version;this.version.needFlash!==this.version.flash&& 44 | this._error({type:c.jPlayer.error.VERSION,context:this.version.flash,message:c.jPlayer.errorMsg.VERSION+this.version.flash,hint:c.jPlayer.errorHint.VERSION});this._trigger(a)}if(this.flash.gate)switch(a){case c.jPlayer.event.progress:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.timeupdate:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case c.jPlayer.event.pause:this._updateButtons(false); 45 | this._trigger(a);break;case c.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case c.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._error({type:c.jPlayer.error.URL, 46 | context:b.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL});break;case c.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case c.jPlayer.event.seeked:this._seeked();this._trigger(a);break;default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration}, 47 | _updateButtons:function(a){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(c.jPlayer.convertTime(this.status.currentTime)); 48 | this.css.jq.duration.length&&this.css.jq.duration.text(c.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},setMedia:function(a){var b=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var d=this.html.audio.gate,f=this.html.video.gate,e=false;c.each(this.formats,function(g,i){var j=b.format[i].media==="video"; 49 | c.each(b.solutions,function(n,k){if(b[k].support[i]&&b._validString(a[i])){var l=k==="html";if(j)if(l){b.html.audio.gate=false;b.html.video.gate=true;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}else if(l){b.html.audio.gate=true;b.html.video.gate=false;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}if(b.flash.active||b.html.active&&b.flash.gate||d===b.html.audio.gate&&f===b.html.video.gate)b.clearMedia();else if(d!== 50 | b.html.audio.gate&&f!==b.html.video.gate){b._html_pause();b.status.video&&b.internal.video.jq.css({width:"0px",height:"0px"});b._resetStatus()}if(j){if(l){b._html_setVideo(a);b.html.active=true;b.flash.active=false}else{b._flash_setVideo(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&&b.css.jq.videoPlay.show();b.status.video=true}else{if(l){b._html_setAudio(a);b.html.active=true;b.flash.active=false}else{b._flash_setAudio(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&& 51 | b.css.jq.videoPlay.hide();b.status.video=false}e=true;return false}});if(e)return false});if(e){if(this._validString(a.poster))if(this.htmlElement.poster.src!==a.poster)this.htmlElement.poster.src=a.poster;else this.internal.poster.jq.show();else this.internal.poster.jq.hide();this.status.srcSet=true;this.status.media=c.extend({},a);this._updateButtons(false);this._updateInterface()}else{this.status.srcSet&&!this.status.waitForPlay&&this.pause();this.html.audio.gate=false;this.html.video.gate=false; 52 | this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();this.html.used&&this.require.video&&this.internal.video.jq.css({width:"0px",height:"0px"});this.flash.used&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._error({type:c.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SUPPORT,hint:c.jPlayer.errorHint.NO_SUPPORT})}}, 53 | clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active)this._html_clearMedia();else this.flash.active&&this._flash_clearMedia()},load:function(){if(this.status.srcSet)if(this.html.active)this._html_load();else this.flash.active&&this._flash_load();else this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_play(a);else this.flash.active&& 54 | this._flash_play(a);else this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_pause(a);else this.flash.active&&this._flash_pause(a);else this._urlNotSetError("pause")},pauseOthers:function(){var a=this;c.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){if(this.status.srcSet)if(this.html.active)this._html_pause(0);else this.flash.active&& 55 | this._flash_pause(0);else this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet)if(this.html.active)this._html_playHead(a);else this.flash.active&&this._flash_playHead(a);else this._urlNotSetError("playHead")},mute:function(){this.status.muted=true;this.html.used&&this._html_mute(true);this.flash.used&&this._flash_mute(true);this._updateMute(true);this._updateVolume(0);this._trigger(c.jPlayer.event.volumechange)},unmute:function(){this.status.muted=false; 56 | this.html.used&&this._html_mute(false);this.flash.used&&this._flash_mute(false);this._updateMute(false);this._updateVolume(this.status.volume);this._trigger(c.jPlayer.event.volumechange)},_updateMute:function(a){if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.status.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a); 57 | this.status.muted||this._updateVolume(a);this._trigger(c.jPlayer.event.volumechange)},volumeBar:function(a){if(!this.status.muted&&this.css.jq.volumeBar){var b=this.css.jq.volumeBar.offset();a=a.pageX-b.left;b=this.css.jq.volumeBar.width();this.volume(a/b)}},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.width(a*100+"%")},_volumeFix:function(a){var b=0.0010*Math.random();return a+(a<0.5?b:-b)},_cssSelectorAncestor:function(a, 58 | b){this.options.cssSelectorAncestor=a;b&&c.each(this.options.cssSelector,function(d,f){self._cssSelector(d,f)})},_cssSelector:function(a,b){var d=this;if(typeof b==="string")if(c.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=b;this.css.cs[a]=this.options.cssSelectorAncestor+" "+b;this.css.jq[a]=b?c(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(f){d[a](f);c(this).blur(); 59 | return false});b&&this.css.jq[a].length!==1&&this._warning({type:c.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:c.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:c.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:c.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:c.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_STRING, 60 | context:b,message:c.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:c.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset();a=a.pageX-b.left;b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},currentTime:function(){},duration:function(){},option:function(a,b){var d=a;if(arguments.length===0)return c.extend(true,{},this.options);if(typeof a==="string"){var f=a.split(".");if(b===h){for(var e=c.extend(true, 61 | {},this.options),g=0;g=9||this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src; 65 | try{this.htmlElement.media.load()}catch(a){}}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime= 66 | a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime= 67 | a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume= 68 | a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4a":b._getMovie().fl_setAudio_m4a(a[e]);break;case "mp3":b._getMovie().fl_setAudio_mp3(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}}); 69 | if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4v":b._getMovie().fl_setVideo_m4v(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_clearMedia:function(){this.internal.flash.jq.css({width:"0px", 70 | height:"0px"});try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}}, 71 | _flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}}, 72 | _flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(f){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(d=navigator.plugins["Shockwave Flash"])if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a)b=true;return c.browser.msie&& 73 | Number(c.browser.version)>=9?false:b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:c.jPlayer.error.URL_NOT_SET,context:a,message:c.jPlayer.errorMsg.URL_NOT_SET,hint:c.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){this._error({type:c.jPlayer.error.FLASH,context:this.internal.flash.swf,message:c.jPlayer.errorMsg.FLASH+a.message,hint:c.jPlayer.errorHint.FLASH})},_error:function(a){this._trigger(c.jPlayer.event.error, 74 | a);if(this.options.errorAlerts)this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(c.jPlayer.event.warning,h,a);if(this.options.errorAlerts)this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)}};c.jPlayer.error={FLASH:"e_flash",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support", 75 | URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};c.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.", 76 | VERSION:"jPlayer "+c.jPlayer.prototype.version.script+" needs Jplayer.swf version "+c.jPlayer.prototype.version.needFlash+" but found "};c.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};c.jPlayer.warning= 77 | {CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};c.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of methodCssSelectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."}; 78 | c.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery); -------------------------------------------------------------------------------- /lbplayer_prj/static/lbplayer/js/jquery.preload-min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery.Preload - Multifunctional preloader 3 | * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com 4 | * Dual licensed under MIT and GPL. 5 | * Date: 3/25/2009 6 | * @author Ariel Flesler 7 | * @version 1.0.8 8 | */ 9 | ;(function($){var h=$.preload=function(c,d){if(c.split)c=$(c);d=$.extend({},h.defaults,d);var f=$.map(c,function(a){if(!a)return;if(a.split)return d.base+a+d.ext;var b=a.src||a.href;if(typeof d.placeholder=='string'&&a.src)a.src=d.placeholder;if(b&&d.find)b=b.replace(d.find,d.replace);return b||null}),data={loaded:0,failed:0,next:0,done:0,total:f.length};if(!data.total)return finish();var g=$(Array(d.threshold+1).join('')).load(handler).error(handler).bind('abort',handler).each(fetch);function handler(e){data.element=this;data.found=e.type=='load';data.image=this.src;data.index=this.index;var a=data.original=c[this.index];data[data.found?'loaded':'failed']++;data.done++;if(d.enforceCache)h.cache.push($('').attr('src',data.image)[0]);if(d.placeholder&&a.src)a.src=data.found?data.image:d.notFound||a.src;if(d.onComplete)d.onComplete(data);if(data.done 2 | {% load url from future %} 3 | 4 | 5 | lbplayer 6 | 7 | 8 | 9 | 10 | 29 | 30 | 31 | 32 | 33 | 240 | 241 | 242 |
    243 | 244 | 296 |
    297 | 298 | 299 | -------------------------------------------------------------------------------- /lbplayer_prj/templates/lbplayer/sel_media.html: -------------------------------------------------------------------------------- 1 | 2 | {% load url from future %} 3 | 4 | 5 | 6 | select music 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 68 | 69 | 70 | 71 |

    72 | 73 | 74 |

    75 | 76 |
    77 | 78 | Loading... 79 |
    80 | 81 |

    82 | 83 | 84 |

    85 | 86 | 87 | -------------------------------------------------------------------------------- /lbplayer_prj/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import patterns, url, include 2 | from django.conf import settings 3 | 4 | from django.contrib import admin 5 | admin.autodiscover() 6 | 7 | #from filebrowser.sites import site 8 | 9 | urlpatterns = patterns('', 10 | (r'^admin/doc/', include('django.contrib.admindocs.urls')), 11 | 12 | # Uncomment the next line to enable the admin: 13 | (r'^admin/', include(admin.site.urls)), 14 | #url(r'^admin/filebrowser/', include(site.urls)), 15 | #(r'^grappelli/',include('grappelli.urls')), 16 | 17 | url(r'^', include('lbplayer.urls')), 18 | ) 19 | 20 | from django.conf.urls.static import static 21 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 22 | 23 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns 24 | urlpatterns += staticfiles_urlpatterns() 25 | --------------------------------------------------------------------------------