First commit for front pages. View, templates, and css img added.
--- a/src/ldt/ldt/ldt_utils/models.py Fri Jan 06 15:39:01 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/models.py Mon Jan 09 15:12:15 2012 +0100
@@ -156,6 +156,22 @@
self.duration = 0
self.save()
return self.duration
+
+ def duration_str(self):
+ if self.duration is None:
+ return "?"
+ # We take off the milliseconds
+ sec = self.duration//1000
+ if sec < 60 :
+ return str(dur) + "s"
+ hours = sec//3600
+ min = (sec - (hours * 3600))//60
+ if min<10:
+ min_str = "0" + str(min)
+ else:
+ min_str = str(min)
+ return str(hours) + "h" + min_str
+
def mimetype(): #@NoSelf
def fget(self):
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_base.html Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,59 @@
+{% load i18n %}
+{% load logintag %}
+{% load navigation %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{LANGUAGE_CODE}}" lang="{{LANGUAGE_CODE}}">
+<head>
+{% block head %}
+ <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
+ <meta http-equiv="content-language" content="{{LANGUAGE_CODE}}" />
+ <link rel="SHORTCUT ICON" href="{{LDT_MEDIA_PREFIX}}/img/favicon.ico" />
+ <title>{% block title %}{% trans "page_title" %}{% endblock %}</title>
+ {% block js_import %}{% endblock %}
+ {% block css_declaration %}{% endblock %}
+ {% block css_import %}
+ <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_common.css" type="text/css"/>
+ {% endblock %}
+ {% block js_declaration %}{% endblock %}
+{% endblock %}
+</head>
+<body>
+<div id="general_container">
+ <ul class="floatlist" id="title_bar">
+ <li id="li_h1">
+ <h1><a href="{% url ldt.ldt_utils.views.front.front_home %}"><b>Lignes</b> de temps</a></h1>
+ </li>
+ <li id="li_search">
+ <form id="form_search">
+ <input id="search_text" name="q" value="" />
+ <input id="search_submit" type="submit" value="{% trans 'Search' %}" />
+ </form>
+ <li id="li_annotation">
+ <div class="fl">
+ <a href="#"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon.png" id="annot_icon" /></a>
+ </div>
+ <div class="fl">
+ <a href="{% url root-view %}">{% trans 'Annotate' %}</a>
+ </div>
+ </li>
+ <li id="li_connexion">
+ <a href="#">Connexion</a>
+ </li>
+ </ul>
+{% block body %}
+{% endblock %}
+
+<!-- FOOTER COMMUN -->
+ <ul id="footer">
+ <li>V.00.00</li>
+ <li>©2011 IRI</li>
+ <li>
+ <a target="_blank" href="http://www.iri.centrepompidou.fr">À propos</a>
+ </li>
+ </ul>
+ <div class="clear"></div>
+</div>
+</body>
+</html>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_group.html Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,54 @@
+{% extends "front/front_base.html" %}
+{% load i18n %}
+{% load thumbnail %}
+
+{% block title %}Home{% endblock %}
+{% block css_import %}
+{{block.super}}
+<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_group.css" type="text/css"/>
+{% endblock %}
+
+{% block body %}
+{{block.super}}
+<!-- Medias annotated by the group -->
+<ul class="floatlist" id="medias_groupe">
+ <li class="li_h2">
+ <h2>{% trans 'Medias annotated by the group' %} {{group.name}}</h2>
+ </li>
+ {% for content in content_list %}
+ <li class="li_media">
+ <a href="#">{% thumbnail content.image "134x75" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}</a>
+ <div class="bulle_annot">120</div>
+ <p><a href="#"><b>{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}</b></a></p>
+ <p class="font_11">{% trans 'by' %} IRI | {{content.duration_str}}</p>
+ </li>
+ {% endfor %}
+</ul>
+
+<!-- Right column -->
+<div id="groupe_droite">
+ <!-- About the group -->
+ <div class="li_h2">
+ <h2>{% trans 'About the group' %}</h2>
+ </div>
+ <p class="bigmargin">
+ {{group.profile.description|safe}}
+ </p>
+ {% thumbnail group.profile.image "54x40" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}" alt="{{content.title}}">{% endthumbnail %}
+ <p class="clear"> </p>
+ <!-- MEMBERS -->
+ <div class="li_h2">
+ <h2>{% trans 'Members' %} <span class="pink">({{users|length}})</span></h2>
+ </div>
+ <ul class="floatlist" id="membres_groupes">
+ {% for user in users %}
+ <li class="li_membre_groupe">
+ {% thumbnail user.get_profile.image "36x36" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}
+ <p><b>{{user.username}}</b></p>
+ <p class="font_11">{% trans 'active since' %} {{user.date_joined|date:"Y/m/d"}}</p>
+ </li>
+ {% endfor %}
+ </ul>
+</div>
+{% endblock %}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_home.html Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,61 @@
+{% extends "front/front_base.html" %}
+{% load i18n %}
+{% load thumbnail %}
+
+{% block title %}Home{% endblock %}
+{% block css_import %}
+{{block.super}}
+<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_home.css" type="text/css"/>
+{% endblock %}
+
+{% block body %}
+{{block.super}}
+<!-- Last annotated contents -->
+<ul class="floatlist full_width" id="derniers_medias">
+ <li class="li_h2">
+ <h2>{% trans 'Last annotated medias' %}</h2>
+ </li>
+ {% for content in last_contents %}
+ <li class="li_media">
+ <a href="#">{% thumbnail content.image "294x165" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}</a>
+ <div class="bulle_annot">250</div>
+ <p><a href="#"><b>{{content.title}}</b></a></p>
+ <p>{% trans 'by' %} IRI | {{content.duration_str}}</p>
+ </li>
+ {% endfor %}
+</ul>
+<!-- Most annotated contents -->
+<ul class="floatlist" id="plus_annotes">
+ <li class="li_h2">
+ <h2>{% trans 'Most annotated medias' %}</h2>
+ </li>
+ {% for content in most_contents %}
+ <li class="li_media">
+ <a href="#">{% thumbnail content.image "134x75" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}</a>
+ <div class="bulle_annot">120</div>
+ <p><a href="#"><b>{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}</b></a></p>
+ <p class="font_11">{% trans 'by' %} IRI | {{content.duration_str}}</p>
+ </li>
+ {% endfor %}
+</ul>
+<!-- Active groups -->
+<ul class="floatlist" id="groupes_actifs">
+ <li class="li_h2">
+ <h2>{% trans 'Active groups' %}</h2>
+ </li>
+ {% for group in active_groups %}
+ <li class="li_media">
+ <div class="img_groupes_actifs">
+ <a href="{% url ldt.ldt_utils.views.front.group_info group.id %}">{% thumbnail group.profile.image "54x40" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}</a>
+ </div>
+ <div class="txt_groupes_actifs">
+ <div class="bulle_people">57</div>
+ <div class="bulle_annot">32</div>
+ <p><a href="{% url ldt.ldt_utils.views.front.group_info group.id %}" class="under"><b>{{group.name}}</b></a></p>
+ <p>{% if group.profile.description|length > 69 %}{{group.profile.description|safe|slice:":69"}}...{% else %}{{group.profile.description|safe}}{% endif %}</p>
+ </div>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock %}
+
--- a/src/ldt/ldt/ldt_utils/urls.py Fri Jan 06 15:39:01 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/urls.py Mon Jan 09 15:12:15 2012 +0100
@@ -40,6 +40,8 @@
url(r'^segmentHighlight/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.lignesdetemps.highlight_segment'),
url(r'^createGroup/$', 'views.group.create_group'),
url(r'^updateGroup/(?P<group_id>.*)$', 'views.group.update_group'),
+ url(r'^front/$', 'views.front.front_home'),
+ url(r'^front/group/(?P<group_id>.*)$', 'views.front.group_info'),
)
urlpatterns += patterns('',
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/views/front.py Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,51 @@
+from django.conf import settings
+from django.contrib.auth.decorators import login_required
+from django.contrib.auth.models import Group, User
+from django.http import HttpResponseServerError
+from django.shortcuts import render_to_response, get_object_or_404
+from django.template import RequestContext
+from guardian.shortcuts import get_objects_for_group
+from ldt.ldt_utils.models import Content, Project
+from ldt.security.utils import add_change_attr
+
+
+
+
+
+@login_required
+def front_home(request):
+ # Get the 3 last annotated contents
+ last_contents = Content.objects.all()[:3]
+ # Get the most annotated contents
+ most_contents = Content.objects.all()[4:12]
+ # Get the active groups
+ active_groups = Group.objects.exclude(name=settings.PUBLIC_GROUP_NAME)[:5]
+
+
+ is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
+
+ return render_to_response("front/front_home.html",
+ {'last_contents': last_contents, 'most_contents':most_contents, 'active_groups':active_groups,
+ 'is_gecko': is_gecko},
+ context_instance=RequestContext(request))
+
+
+@login_required
+def group_info(request, group_id):
+ # Get the active group
+ group = Group.objects.get(id=group_id)
+ # list of contents annotated by the group (or everyone)
+ everyone = Group.objects.get(name=settings.PUBLIC_GROUP_NAME)
+ content_list = get_objects_for_group(group, 'ldt_utils.view_content') | get_objects_for_group(everyone, 'ldt_utils.view_content')
+ # Group's users
+ users = User.objects.filter(groups__in=[group])
+
+ is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
+
+ return render_to_response("front/front_group.html",
+ {'group': group, 'content_list':content_list, 'users':users,
+ 'is_gecko': is_gecko},
+ context_instance=RequestContext(request))
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/css/front_common.css Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,225 @@
+/* Browser-reset CSS */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+table {
+ border-collapse: separate; border-spacing: 0;
+}
+
+th, td {
+ vertical-align: top;
+}
+
+body {
+ font-family: Helvetica, Arial, sans-serif; color: #484848; background: url(./imgs/main_bg.png) repeat-x #f8f6f7;
+}
+
+/* usual selectors */
+
+a {
+ color: #484848; text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+b {
+ font-weight: 800;
+}
+
+h1 {
+ font-family: "DIN-Light", Helvetica, Arial, sans-serif; font-size: 22px;
+}
+
+h1 bold {
+ font-family: "DIN-Bold", Helvetica, Arial, sans-serif;
+}
+
+h2 {
+ font-family: "DIN-Light", Helvetica, Arial, sans-serif; font-size: 21px; color: #0068c4; margin: 4px 2px;
+}
+
+h3 {
+ font-size: 18px; color: #0068c4;
+}
+
+h4 {
+ margin: 2px 0; font-size: 15px;
+}
+
+h5 {
+ float: left; clear: left; font-weight: bold; margin: 2px 0; min-width: 70px; font-size: 13px; padding: 0;
+}
+
+p {
+ margin: 2px 0; font-size: 13px;
+}
+
+p, h2, h3, h4, h5 {
+ text-shadow: 1px 1px 1px #ffffff;
+}
+
+/* Frequently-used classes */
+
+.highlight {
+ background: #fff080;
+}
+
+div.pad {
+ padding: 10px;
+}
+
+ul.floatlist {
+ float: left; list-style: none;
+}
+
+.floatlist li {
+ float: left;
+}
+
+div.fl, li.fl, p.fl, img.fl {
+ float: left;
+}
+
+div.fr, li.fr, p.fr, img.fr {
+ float: right;
+}
+
+.clear {
+ clear: both;
+}
+
+.li_h2 {
+ border-bottom: 1px solid #484848; margin: 5px 0;
+}
+
+.li_media {
+ margin: 10px;
+}
+
+.img_media {
+ background: #000000; border: 2px solid #ffffff; padding: 1px;
+}
+
+.under, a.under {
+ text-decoration: underline;
+}
+
+a.under:hover {
+ text-decoration: none;
+}
+
+.blue, a.blue {
+ color: #0068c4;
+}
+
+.pink, a.pink {
+ color: #ff3b77;
+}
+
+.b, a.b {
+ font-weight: bold;
+}
+
+.bigmargin {
+ margin: 10px 0;
+}
+
+.bulle_annot, .bulle_people {
+ float: right; width: 18px; height: 10px; font-size: 9px; margin: 3px 0 0; padding: 1px 0 2px 10px; color: #ffffff; text-align: center; overflow: hidden;
+}
+
+.bulle_annot {
+ background: url(./imgs/bulle_annot.png);
+}
+
+.bulle_people {
+ background: url(./imgs/bulle_people.png);
+}
+
+.font_16 {
+ font-size: 16px;
+}
+
+.font_11 {
+ font-size: 11px;
+}
+
+.btn {
+ border: 1px solid #c0c0c0; padding: 5px; font-size: 14px; font-weight: bold;
+}
+
+.btn a {
+ color: #606060;
+}
+
+/* General container */
+
+#general_container {
+ width: 960px; margin: 0 auto;
+}
+
+/* Barre de titre */
+
+#title_bar {
+ font-family: "DIN-Light", Helvetica, Arial, sans-serif; height: 50px; font-size: 22px; margin: 0 0 1px 0;
+}
+
+#title_bar a {
+ color: #ffffff;
+}
+
+#title_bar li {
+ height: 38px; margin: 0; padding: 10px 20px 0; background: url(./imgs/sep_title.png) right no-repeat;
+}
+
+li#li_h1 {
+ padding-left: 0; width: 210px;
+}
+
+#form_search {
+ position: relative; width: 378px; margin: 2px 0; height: 20px; border: 1px solid #000000; background: url(./imgs/search_icon.png) left no-repeat #ffffff;
+}
+
+#search_text {
+ position: absolute; top: 0; left: 25px; width: 250px; height: 20px; border: 0; padding: 0;
+}
+
+#search_submit {
+ position: absolute; top: 0; right: 0; height: 16px; width: 100px; font-size: 12px; color: #ffffff; background: #0068c4; border: 0; margin: 2px; padding: 0; text-align: center;
+}
+
+#annot_icon {
+ margin: 3px 10px 0 0;
+}
+
+
+/* Footer */
+
+#footer {
+ float: right; list-style: none; border-top: 1px solid #484848; padding: 10px; width: 940px; margin-top: 15px; /* 960 - padding */
+}
+
+#footer li {
+ font-size: 12px; float: right; padding: 5px 20px; border-right: 1px solid #484848;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/css/front_group.css Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,40 @@
+/* Médias du groupe */
+
+#medias_groupe {
+ width: 640px; margin: 5px 0;
+}
+
+#medias_groupe .li_h2 {
+ width: 630px; margin-right: 10px;
+}
+
+#medias_groupe .li_media {
+ width: 140px;
+ height: 140px;
+}
+
+/* Colonne droite */
+
+#groupe_droite {
+ float: left; width: 310px; margin: 5px 0 5px 10px;
+}
+
+#groupe_droite .li_h2 {
+ float: left; width: 310px;
+}
+
+#embed_search {
+ background: url(./imgs/embed_search.png) 5px center no-repeat; padding-left: 40px;
+}
+
+li.li_membre_groupe {
+ width: 150px; margin: 0 5px 3px 0;
+}
+
+.li_membre_groupe .img_media {
+ float: left; margin-top: 2px;
+}
+
+.li_membre_groupe p {
+ margin-left: 45px;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/css/front_home.css Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,54 @@
+/* Derniers médias */
+
+#derniers_medias {
+ width: 960px; margin: 5px 0;
+}
+
+#derniers_medias .li_h2 {
+ width: 960px;
+}
+
+#derniers_medias .li_media {
+ width: 300px;
+}
+
+/* Plus annotés */
+
+#plus_annotes {
+ width: 640px; margin: 5px 0;
+}
+
+#plus_annotes .li_h2 {
+ width: 630px; margin-right: 10px;
+}
+
+#plus_annotes .li_media {
+ width: 140px;
+ height: 140px;
+}
+
+/* Groupes actifs */
+
+#groupes_actifs {
+ width: 320px; margin: 5px 0;
+}
+
+#groupes_actifs .li_h2 {
+ width: 310px; margin-left: 10px;
+}
+
+#groupes_actifs .li_media {
+ width: 300px; margin: 5px 10px;
+}
+
+div.img_groupes_actifs {
+ float: left; position: relative; padding: 5px 10px 0 0;
+}
+
+div.txt_groupes_actifs {
+ float: left; width: 230px;
+}
+
+.lock_group {
+ background: url(./imgs/lock.png); width: 11px; height: 13px; position: absolute; left: 45px; top: 34px;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/css/front_player.css Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,65 @@
+#player_col_g {
+ float: left; width: 550px;
+}
+
+#top_media {
+ width: 550px; border-bottom: 1px solid #484848;
+}
+
+#media_share {
+ float: right; margin-top: 5px;
+}
+
+li.share_li {
+ padding: 5px 0 0 5px; height: 20px;
+}
+
+#ann_fleche_cont {
+ width: 550px; height: 21px; overflow: hidden; position: relative;
+}
+
+#ann_fleche {
+ width: 1100px; height: 21px; position: absolute; margin-left: -550px;
+}
+
+#ann_fleche div {
+ float: left; width: 550px; height: 21px;
+}
+
+#ann_fl_left {
+ background:url(./imgs/anarl.png);
+}
+
+#ann_fl_right {
+ background:url(./imgs/anarr.png);
+}
+
+#annotation_bas {
+ float: left; width: 550px; background: url(./imgs/annot_bg.png); margin: 0 0 25px;
+}
+
+/* COLONNE DE DROITE */
+
+#player_col_d {
+ float: left; width: 410px;
+}
+
+#player_col_d .li_h2 {
+ width: 400px; margin-left: 10px;
+}
+
+#annot_media {
+ width: 400px; margin: 5px 0 10px 10px; max-height: 400px; overflow: auto;
+}
+
+#annot_media li {
+ padding: 5px 0;
+}
+
+#annot_media li.selected {
+ background: url(./imgs/annot_bg.png);
+}
+
+div.une_annot {
+ width: 280px;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/css/front_search.css Mon Jan 09 15:12:15 2012 +0100
@@ -0,0 +1,126 @@
+#tbl_rech {
+ float: left; clear: both;
+}
+
+
+/* LISTE DES RÉSULTATS DE RECHERCHE */
+
+#liste_resultats {
+ width: 640px;
+}
+
+#li_haut_resultats {
+ width: 630px; padding: 5px 9px 5px 0; border-right: 1px solid #484848;
+}
+
+#ul_haut_resultats {
+ width: 630px; border-bottom: 1px solid #484848;
+}
+
+#title_resultats {
+ width: 250px;
+}
+
+#title_resultats h2 {
+ font-size: 19px;
+}
+
+#p_nb_resultats {
+ margin : 10px 0 0;
+}
+
+#resultats_options {
+ font-family: "DIN-Light", Helvetica, Arial, sans-serif; float: right; padding: 0 20px; margin: 4px 0; font-size: 19px; background:url(./imgs/fl_bas.png) right 80% no-repeat; color: #0068c4;
+}
+
+/* TITRE DU MÉDIA */
+
+div.titre_result_media {
+ float: left; width: 630px; padding: 10px 9px 0 0; border-right: 1px solid #484848;
+}
+
+.titre_result_media div {
+ float: left; border-color: #d0d0d0; border-width: 1px; border-style: solid none; height: 25px;
+}
+
+.h3_result_media {
+ width: 240px;
+}
+
+.h3_result_media h3 {
+ font-family: "DIN-Bold", Helvetica, Arial, sans-serif; font-weight: 800; margin: 2px 0 0 2px;
+}
+
+div.duree_result_media {
+ width: 49px; border-right: 1px solid #d0d0d0;
+}
+
+.duree_result_media p {
+ font-size: 11px; text-align: right; margin: 10px 2px 0 0;
+}
+
+.graph_result_media {
+ width: 350px; height: 25px;
+}
+
+/* LISTE DES SEGMENTS */
+
+ul.list_segments {
+ width: 640px;
+}
+
+li.li_segment {
+ width: 630px; padding: 3px 9px 3px 0; border-right: 1px solid #484848;
+}
+
+li.li_segment.selected {
+ background: url(./imgs/preview_arrows.png) right center no-repeat #fbfafa; padding: 2px 10px 1px 0; border-width: 1px; border-color: #484848; border-style: solid none;
+}
+
+div.left_segment {
+ float: left; width: 87px; height: 47px; padding: 5px; position: relative;
+}
+
+.left_segment img {
+ border: 1px solid #f0f0f0;
+}
+
+p.duree_segment {
+ position: absolute; margin: 0; right: 10px; bottom: 10px; color: #ffffff; font-size: 11px;
+}
+
+div.color_zone {
+ float: left; width: 5px; height: 45px; margin: 1px 0;
+}
+
+p.text_segment, h4.title_segment {
+ margin-left: 100px;
+}
+
+li.plus_result {
+ width: 630px; padding: 0 9px 0 0; border-right: 1px solid #484848;
+}
+
+.plus_result p {
+ width: 630px; margin: 0 0 10px; padding: 0 0 5px; text-align: right; border-bottom: 1px solid #d0d0d0;
+}
+
+/* PAGINATION DES RESULTATS */
+
+#result_pagination {
+ width: 630px; padding: 0 0 10px 10px;
+}
+
+/* APERÇU À DROITE */
+
+#result_preview {
+ width: 300px; height: 100%; border-right: 1px solid #484848; background: #fbfafa; vertical-align: top; padding: 38px 9px 0 10px;
+}
+
+#preview_metadataplayer {
+ width: 300px; height: 200px;
+}
+
+#tl_position {
+ width: 300px; margin: 10px 0; height: 16px; border-bottom: 1px solid #909090;
+}
\ No newline at end of file
Binary file src/ldt/ldt/static/ldt/css/imgs/anarl.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/anarr.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/annot_bg.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/bulle_annot.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/bulle_people.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/embed_search.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/fl_bas.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/lock.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/main_bg.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/preview_arrows.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/search_icon.png has changed
Binary file src/ldt/ldt/static/ldt/css/imgs/sep_title.png has changed
Binary file src/ldt/ldt/static/ldt/img/annot_icon.png has changed
--- a/web/ldtplatform/templates/registration/login.html Fri Jan 06 15:39:01 2012 +0100
+++ b/web/ldtplatform/templates/registration/login.html Mon Jan 09 15:12:15 2012 +0100
@@ -4,6 +4,66 @@
<script type="text/javascript">
$(document).ready(function() {
$("#login-form").validate();
+
+
+ $('#mon_ajax').click(function(e) {
+ var url = "{% url project_api project_id='c8448f21-272d-11e1-876b-c8bcc896c290' emitter_format='.json' %}";
+
+ var monjson = '{\
+ "annotations": [\
+ {\
+ "type": "c_07BA1284-5F24-71A8-1EE2-423EED999B8A",\
+ "type_title": "New cutting name if necessary",\
+ "media": "briandepalma_scarfacedepalma",\
+ "begin": 1600000,\
+ "end": 2100000,\
+ "content": {\
+ "data": "new scar annot"\
+ },\
+ "tags": [ "json","dude" ]\
+ }\
+ ],\
+ "meta": {\
+ "creator": "John Doe",\
+ "created": "2011-09-10T09:12:58"\
+ }\
+ }';
+ var monjson2 = '{\
+ "annotations": [\
+ {\
+ "type": "c_07BA1284-5F24-71A8-1EE2-423EED999B8A",\
+ "type_title": "New cutting name if necessary",\
+ "media": "briandepalma_scarfacedepalma",\
+ "begin": 2400000,\
+ "end": 3000000,\
+ "content": {\
+ "data": "ntm iam 2"\
+ },\
+ "tags": [ "jak" ]\
+ }\
+ ],\
+ "meta": {\
+ "creator": "John Doe",\
+ "created": "2011-09-10T09:12:58"\
+ }\
+ }';
+
+ $.ajax({
+ url: url,
+ type: 'PUT',
+ contentType: 'application/json',
+ data: monjson,
+ // bug with jquery >= 1.5, "json" adds a callback so we don't specify dataType
+ //dataType: 'json',
+ success: function(json, textStatus, XMLHttpRequest) {
+ alert("success = " + json);
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ alert("ERROR = " + jqXHR.responseText + ", " + errorThrown);
+ }
+ });
+ });
+
});
</script>
{% endblock %}
@@ -52,6 +112,7 @@
{% endif %}
</div>
</div>
+ <p id="mon_ajax">clic ici</p>
</div>
{% endblock %}