--- a/integration/js/edition.js Thu Jun 06 16:13:09 2013 +0200
+++ b/integration/js/edition.js Thu Jun 06 17:35:51 2013 +0200
@@ -24,8 +24,9 @@
}
});
-$('.timeline-annotations').bind('click', function(e){
- var x = e.pageX - $(this).offset().left;
+$('.timeline-annotations').on('click', '.annotation', function(e){
+ e.preventDefault();
+
myMedia.setCurrentTime(myMedia.duration * x / $(this).width());
});
@@ -443,7 +444,9 @@
left : left,
width : width,
backgroundColor : v.color
- }).addClass('annotation').attr('id', 'annotation-timeline-'+v.id);
+ }).addClass('annotation')
+ .attr('data-id', v.id)
+ .attr('id', 'annotation-timeline-'+v.id);
var isInTimeline = false;
$.each(timeline.find('li'), function(a, b){
@@ -508,6 +511,7 @@
if(name == 'title'){
var idAnnotation = $(this).parents('form').attr('data-id');
$('#onglet-title-'+idAnnotation).text(value);
+ $(this).parents('form').find('.btn-delete-annotation').attr('data-title', value);
}
});
@@ -710,7 +714,7 @@
getVideoPlayer(dataVideo.url, videoWrap);
}
- $('.popup').on('click', '.bibliotheque-video a', function(e){
+ $('.popup').on('click', '.bibliotheque-video a:not(.pagination a)', function(e){
e.preventDefault();
var url = $(this).attr('data-url'),
@@ -725,14 +729,13 @@
var videoWrap = $('#tab-annotation-'+currentAnnotation.id).find('.annotation-video-content');
renderVideoInfo(videoWrap, currentAnnotation.content);
-
});
//diaporama
//bibliotheque
- $('.popup').on('click', '.bibliotheque-image a', function(e){
+ $('.popup').on('click', '.bibliotheque-image a:not(.pagination a)', function(e){
e.preventDefault();
var url = $(this).attr('data-url'),
@@ -954,7 +957,7 @@
fonts: "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
"Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
sizes: "1,2,3,4,5,6,7",
- styles: [["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
+ styles: [["Paragraph", "<p>"], ["Header 2", "<h2>"],
["Header 3", "<h3>"], ["Header 4","<h4>"], ["Header 5","<h5>"],
["Header 6","<h6>"]],
docType: '<!DOCTYPE HTML>',