# HG changeset patch # User cavaliet # Date 1370612472 -7200 # Node ID f0d132d6beedcf7567057e7f8897df37a9878a69 # Parent 7cbaa8d0a7a6a0232d524462fdc0c29db3e437cb debug and update from integration diff -r 7cbaa8d0a7a6 -r f0d132d6beed src/metadatacomposer/static/metadatacomposer/css/style.css --- a/src/metadatacomposer/static/metadatacomposer/css/style.css Fri Jun 07 13:02:19 2013 +0200 +++ b/src/metadatacomposer/static/metadatacomposer/css/style.css Fri Jun 07 15:41:12 2013 +0200 @@ -10,6 +10,7 @@ h1 img{margin-right: 8px;} h1 a span{font-size: 16px; line-height: 20px; color: #FFF;} h1 span{font-size: 24px;} +.btn-ok-chapter{margin-right: 10px;} .nav-bar{margin-top: 10px; } .nav-bar a:hover{text-decoration: none; color: #34495e;} section{padding-top: 20px;} @@ -43,9 +44,9 @@ .project-title-editor-form{margin: 0;} .project-action a:last-child{margin-right: 20px;} .chapter-widget-info{margin-bottom: 20px;} -.chapter-widget form{ margin: 0;} +.chapter-widget form{ margin: 0; padding-bottom: 10px;} #list-annotations{ background-color: #fff;} -.form-info-general-annotation{ border-bottom: 1px solid #bdc3c7;} +.form-info-general-annotation{ } .chapter-widget input, .form-info-general-annotation input, .form-info-general-annotation textarea{width: 196px; max-width: 196px; } .chapter-widget textarea{width: 426px; max-width: 426px; min-width: 426px; height: 20px;-webkit-transition: height .3s ease;-moz-transition: height .3s ease;transition: height .3s ease;} .form-chapter-edit{} @@ -92,7 +93,11 @@ .timeline-annotations-wrap{position: relative;background-color: #202020;} .timeline-annotations{width: 460px;height: auto; position: relative; margin: 0; padding-top: 4px;} .timeline-annotations li{display: block; width: 460px;height: 12px; position: relative; padding-bottom: 4px;} -.timeline-annotations .annotation{ color:#000; text-align:center; font-size : 10px; overflow: hidden; line-height: 12px; width: 10px; height: 12px; background-color: #c0392b; position: absolute; top:0px;} +.timeline-annotations .annotation{cursor: pointer; display:block; text-decoration:none; color:#000; text-align:center; font-size : 10px; overflow: hidden; line-height: 12px; width: 10px; height: 12px; background-color: #c0392b; position: absolute; top:0px;} +.timeline-annotations .annotation span, .timeline-annotations .annotation i{display: none;} +.timeline-annotations .annotation:hover span, +.annotation.editing span, +.annotation.editing i{display: inline;} ul.tagit{margin-left: 10px;-webkit-border-radius: 0px; -moz-border-radius: 0px; border-radius: 0px;} @@ -120,6 +125,7 @@ .description-slideshow-row{word-wrap: break-word; width: 180px; } .description-slideshow-row span{max-height: 100px; display: inline-block; overflow: auto;} .description-slideshow-row textarea{width: 164px; max-width: 164px; height: 100px;} +.label-modify-video, .label-add-video{display: none;} /* Tangle */ .time-tangle { color: #2c3e50; cursor: w-resize; position: relative; diff -r 7cbaa8d0a7a6 -r f0d132d6beed src/metadatacomposer/static/metadatacomposer/js/edition.js --- a/src/metadatacomposer/static/metadatacomposer/js/edition.js Fri Jun 07 13:02:19 2013 +0200 +++ b/src/metadatacomposer/static/metadatacomposer/js/edition.js Fri Jun 07 15:41:12 2013 +0200 @@ -24,12 +24,20 @@ } }); -$('.timeline-annotations').bind('click', function(e){ - var x = e.pageX - $(this).offset().left; - myMedia.setCurrentTime(myMedia.duration * x / $(this).width()); +$('.timeline-annotations').on('click', '.annotation', function(e){ + e.preventDefault(); + var idAnnotation = $(this).attr('data-id'), + annotation = _.find(annotations, function(c){ return c.id == idAnnotation; }); + myMedia.setCurrentTime(annotation.begin); + if($('#tab-annotation-'+idAnnotation).length){ + $('a[href=#tab-annotation-'+idAnnotation+']').tab('show'); + }else{ + openTab(annotation.type, annotation); + } }); myProject.onLoad(function() { + myProject.regenerateTags = true; $(".project-title").text(myProject.title); $('.project-title-nav').text(myProject.title); @@ -121,19 +129,8 @@ if(v.begin <= t && v.end >= t){ currentAnnotationsDisplay.push(v.id); if(!$('#item-current-annotation-'+v.id).length){ - var itemAnnotation = - $('
"], ["Header 2", "