# HG changeset patch # User verrierj # Date 1326724757 -3600 # Node ID 47735d0bedb58f9773eecefd700afa2d27d059f7 # Parent fa07a599883c178f0163d3be20b437f478f85a21# Parent b5c0d6a45f28f34586bc1187c360c332fde2a4a5 Merge with b5c0d6a45f28f34586bc1187c360c332fde2a4a5 diff -r fa07a599883c -r 47735d0bedb5 .project --- a/.project Mon Jan 16 15:33:27 2012 +0100 +++ b/.project Mon Jan 16 15:39:17 2012 +0100 @@ -1,17 +1,23 @@ - - - platform_group - - - - - - com.aptana.ide.core.unifiedBuilder - - - - - - com.aptana.projects.webnature - - + + + platform_group + + + + + + org.python.pydev.PyDevBuilder + + + + + com.aptana.ide.core.unifiedBuilder + + + + + + com.aptana.projects.webnature + org.python.pydev.pythonNature + + diff -r fa07a599883c -r 47735d0bedb5 src/ldt/ldt/api/ldt/handlers.py --- 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 diff -r fa07a599883c -r 47735d0bedb5 src/ldt/ldt/ldt_utils/utils.py --- 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: diff -r fa07a599883c -r 47735d0bedb5 src/ldt/ldt/static/ldt/css/front_home.css --- 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 +}