--- a/.project Mon Jan 16 15:33:27 2012 +0100
+++ b/.project Mon Jan 16 15:39:17 2012 +0100
@@ -1,17 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>platform_group</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.aptana.ide.core.unifiedBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.aptana.projects.webnature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>platform_group</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.aptana.ide.core.unifiedBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.aptana.projects.webnature</nature>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
--- a/src/ldt/ldt/api/ldt/handlers.py Mon Jan 16 15:33:27 2012 +0100
+++ b/src/ldt/ldt/api/ldt/handlers.py Mon Jan 16 15:39:17 2012 +0100
@@ -165,7 +165,7 @@
for a in new_annotations:
dur = str(a['end'] - a['begin'])
begin = str(a['begin'])
- new_id = adder.add(a['media'], a['type'], a['type_title'], a['content']['data'], '', a['tags'], begin, dur, author, date)
+ type_id, new_id = adder.add(a['media'], a['type'], a['type_title'], a['content']['data'], '', a['tags'], begin, dur, author, date)
if not new_id:
protect_instance(project)
return rc.BAD_REQUEST
@@ -175,7 +175,9 @@
unprotect_instance(content)
add_annotation_to_stat(content, project, a['begin'], a['end'])
protect_instance(content)
-
+
+ # We update the ids
+ a['type'] = type_id
a['id'] = new_id
# We save if there were added annotation
--- a/src/ldt/ldt/ldt_utils/utils.py Mon Jan 16 15:33:27 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/utils.py Mon Jan 16 15:39:17 2012 +0100
@@ -171,7 +171,7 @@
self.to_add = True
# add( a['media'], a['type'], a['type_title, a[data], '', a['tags'], begin, dur, author, date)
- def add(self, media, cutting_id, cutting_title, title, text, tags_list, begin, dur, author, date, view_id=None, color="16776960"):
+ def add(self, media, cutting_id, cutting_title, title, text, tags_list, begin, dur, author, date, view_id="0", color="2194379"):
"""
Add an annotation to a project. begin and dur must be strings. Default color is yellow.
"""
@@ -202,7 +202,8 @@
path_ensemble = lxml.etree.SubElement(path_content[0], 'ensemble')
path_ensemble.set('id', 'g_' + generate_uuid())
path_ensemble.set('title', _('Personal cutting'))
- path_ensemble.set('author', 'undefined')
+ path_ensemble.set('author', 'IRI')
+ path_ensemble.set('abstract', 'IRI')
path_ensemble = [path_ensemble]
#else:
# path_ensemble = path_content[0].xpath('ensemble')
@@ -264,7 +265,7 @@
tag_node = lxml.etree.SubElement(tags, 'tag')
tag_node.text = tag
- return id_annotation
+ return cutting_id, id_annotation
def save(self):
if self.to_add:
--- a/src/ldt/ldt/static/ldt/css/front_home.css Mon Jan 16 15:33:27 2012 +0100
+++ b/src/ldt/ldt/static/ldt/css/front_home.css Mon Jan 16 15:39:17 2012 +0100
@@ -13,6 +13,7 @@
}
#derniers_medias .li_media {
+ position: relative;
height: 225px;
width: 300px;
}
@@ -22,7 +23,8 @@
list-style: none;
}
.graph_annotation {
- background: url(./imgs/whitealpha.png); margin:148px -296px; position:absolute;
+ background: url(./imgs/whitealpha.png); position:absolute;
+ z-index: 2; width: 294px; height: 20px; left: 3px; top: 148px;
}
/* Plus annotés */
@@ -68,4 +70,4 @@
.lock_group {
background: url(./imgs/lock.png); width: 11px; height: 13px; position: absolute; left: 45px; top: 34px;
-}
\ No newline at end of file
+}