]> git.parisson.com Git - telemeta.git/commitdiff
add simple player for clean iframe, fix sandbox for django 1.4
authoryomguy <yomguy@parisson.com>
Mon, 2 Apr 2012 09:13:17 +0000 (11:13 +0200)
committeryomguy <yomguy@parisson.com>
Mon, 2 Apr 2012 09:13:17 +0000 (11:13 +0200)
example/sandbox_sqlite/settings.py
telemeta/htdocs/css/telemeta.css
telemeta/templates/telemeta/mediaitem_player_simple.html [new file with mode: 0644]
telemeta/urls.py

index 5ff93f3e308b65fa804557ad7e39a7bd2c66db98..d7e1b862a2d7eb5007f6bfc52a14a97bb7f41e37 100644 (file)
@@ -61,11 +61,30 @@ if not os.path.exists(MEDIA_ROOT):
 # Examples: "http://media.lawrence.com", "http://example.com/media/"
 MEDIA_URL = '/media/'
 
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = 'http://localhost/django/media/'
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/home/media/media.lawrence.com/static/"
+STATIC_ROOT = '/data/telemeta/static/'
+
+# URL prefix for static files.
+# Example: "http://media.lawrence.com/static/"
+STATIC_URL = '/static/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (
+# Put strings here, like "/home/html/static" or "C:/www/django/static".
+# Always use forward slashes, even on Windows.
+# Don't forget to use absolute paths, not relative paths.
+)
 
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+'django.contrib.staticfiles.finders.FileSystemFinder',
+'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
+)
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = 'a8l7%06wr2k+3=%#*#@#rvop2mmzko)44%7k(zx%lls^ihm9^5'
 
@@ -102,6 +121,7 @@ INSTALLED_APPS = (
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.admin',
+    'django.contrib.staticfiles',
     'django_extensions',
     'telemeta',
     'jsonrpc',
index f4bda641e7fc41e9f51dbe0cd05030ee78ff9ea9..d1a4dae986b919fc322a13dbe4190ab6e3fbb6a1 100644 (file)
@@ -87,7 +87,7 @@ a img { border: none; }
     color: #6a0307;
     font-weight: bold;
     display:  inline;
-    font-size: 120%; 
+    font-size: 120%;
 }
 #content h3 {
     color: #6a0307;
@@ -167,12 +167,12 @@ a img { border: none; }
 }
 
 #collection_player {
-    background: transparent; 
+    background: transparent;
     /*     background-image: url(../images/grid_bg.png); */
 }
 
 #collection_player .title {
-    padding: 2px 5px 7px 5px; 
+    padding: 2px 5px 7px 5px;
 }
 
 
@@ -207,7 +207,7 @@ a img { border: none; }
     overflow-y: scroll;
     width: 100%;
 }
-    
+
 
 .analyzer-title {
     background-color: #f2f2f2;
@@ -476,24 +476,24 @@ form.login .submit {
 
 
 /* Drop Down Menus */
-.clear {clear:both} 
+.clear {clear:both}
 
 #nav {
     margin:0;
     padding:0;
     list-style:none;
-}  
+}
 
 /* make the LI display inline */
 /* it's position relative so that position absolute */
 /* can be used in submenu */
 
 #nav li {
-display:inline-block; 
+display:inline-block;
 position:relative;
 z-index:500;
 }
-    
+
 /* this is the parent menu */
 #nav li a {
 display:block;
@@ -519,16 +519,16 @@ color:#FFF;
     background-color: #6a0307;
     color: #FFF;
 }
-    
+
 #nav ul li {
     width:100px;
     float:left;
     border-bottom:0px solid #fff;
 }
-    
+
 /* display block will make the link fill the whole area of LI */
 #nav ul a {
-    display:block; 
+    display:block;
     height:15px;
     padding: 5px 5px;
     font-size: 11px;
@@ -541,7 +541,7 @@ color:#FFF;
     border-top-right-radius: 0px 0px;
     border-bottom-width: 0px;
 }
-    
+
 #nav ul a:hover {
     background-color: #FFF ;
     color: #6a0307 ;
@@ -851,12 +851,12 @@ table.listing tbody tr.odd { background-color: #f7f7f7 }
 table.listing tbody tr:hover { background: #f7f8fa !important }
 
 table td.error {
-    color: red; 
+    color: red;
     font-weight: bold;
 }
 
 .infos li.error{
-    color: red; 
+    color: red;
     font-weight: bold;
     font-size: 110%;
 }
@@ -918,7 +918,7 @@ img.align-left {
 #module-set .module h3 {
     color: #FFF;
     font-size: 1.1em;
-    font-weight: bold; 
+    font-weight: bold;
 }
 
 #module-set .module a:hover {
@@ -1076,7 +1076,7 @@ a.image-link {
     -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex;
     background-image: url('../images/ok.png');
 }
-.markerdiv{ 
+.markerdiv{
     border: 1px solid #aaaaaa;
     margin-bottom: 1ex;
     -moz-border-radius: 1e;
@@ -1137,7 +1137,7 @@ a.image-link {
 }
 
 .icon_edit{
-    background-image: url('../images/edit_page.png'); 
+    background-image: url('../images/edit_page.png');
 }
 .icon_copy{
     background-image: url('../images/copy_page.png');
diff --git a/telemeta/templates/telemeta/mediaitem_player_simple.html b/telemeta/templates/telemeta/mediaitem_player_simple.html
new file mode 100644 (file)
index 0000000..f7a3cee
--- /dev/null
@@ -0,0 +1,49 @@
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+
+{% block stylesheets %}
+{{ block.super }}
+    <style type="text/css">
+        #rightcol {
+            width: {{width}}px;
+            padding: 0px;
+            border: 0px solid #999;
+            background-color: transparent;
+        }
+        .ts-skin-lab .ts-player .ts-wave {
+            height: {{height}}px;
+        }
+        .ts-player {
+            margin-top: 0px;
+            border: 0px solid #999;
+            }
+
+    </style>
+{% endblock %}
+
+{% block title %}{% endblock %}
+{% block title_buttons %}{% endblock %}
+
+{% block layout %}
+{% block content %}
+<div>
+{% if item.file %}
+    {% if public_access or user.is_staff %}
+    <div id="rightcol" style="float: left; padding-bottom:0;">
+        <div id="player_minimized" class="ts-skin-lab">
+            <div class="wazing"></div>
+            <div id="player" class="ts-player">
+            </div>
+        </div>
+
+    </div>
+    {% endif %}
+{% endif %}
+</div>
+
+{% endblock content%}
+{% endblock layout %}
+
+{% block footer %}{% endblock %}
index b2b9ec639277c3b1e329bfc8311c0356926d09c8..96192ba97781362b0dba5249800b7008796179b9 100644 (file)
@@ -112,6 +112,8 @@ urlpatterns = patterns('',
         dict(template='telemeta/mediaitem_add.html'), name="telemeta-item-add"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/player/(?P<width>[0-9]+)x(?P<height>[0-9]+)/$', item_view.item_detail,
         dict(template='telemeta/mediaitem_player.html'), name="telemeta-item-player"),
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/player/(?P<width>[0-9]+)x(?P<height>[0-9]+)/simple/$', item_view.item_detail,
+        dict(template='telemeta/mediaitem_player_simple.html'), name="telemeta-item-player-simple"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/performances/$', item_view.item_performances_edit,
         dict(template='telemeta/mediaitem_performances_edit.html'), name="telemeta-item-performances_edit"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/keywords/$', item_view.item_keywords_edit,