# HG changeset patch # User cavaliet # Date 1368720660 -7200 # Node ID 6a3d8d05e3fb153189d0648cf79d717bf5716617 # Parent 16b482c153fd14cb9e3218d739de5a74fcacb701 update js and modal views diff -r 16b482c153fd -r 6a3d8d05e3fb src/metadatacomposer/static/metadatacomposer/js/edition.js --- a/src/metadatacomposer/static/metadatacomposer/js/edition.js Thu May 16 18:03:54 2013 +0200 +++ b/src/metadatacomposer/static/metadatacomposer/js/edition.js Thu May 16 18:11:00 2013 +0200 @@ -3,7 +3,46 @@ var global = { diaporama : null, idAnnotation : null -}; +}, +chapitres = [], +annotations = []; + +myProject.onLoad(function() { + + $(".project-title").text(myProject.title); + + myMedia = myProject.getCurrentMedia(); + + IriSP.htmlPlayer( + myMedia, + $(".main-video"), + { + width: 460, + height: 345, + controls: true, + autostart: true + } + ); + + myMedia.on("timeupdate", function(t) { + + //curseur chapitre + var pos = $(".chapitre-cut-wrap").width() * t / myMedia.duration, + wContainer = $('.chapitre-cut-wrap').width(), + btnCutChapter = $('.btn-cut-chapter'), + wBtnCutChapter = btnCutChapter.outerWidth(); + + $(".indicateur-chapter").css("left",pos); + if(pos+wBtnCutChapter>wContainer){ + btnCutChapter.css("left",(pos - wBtnCutChapter)); + }else{ + btnCutChapter.css("left",pos); + } + + });//timeupdate + +});//myProject.onLoad + //modal $(document).on('click', 'a.open-modal', function(e){ @@ -91,7 +130,7 @@ $('.project-title').html($(this).val()); }); -//chapter +//--chapter $('.list-chapter-wrap').on('click', '.edit-chapter', function(e){ e.preventDefault(); var viewChapter = { @@ -109,6 +148,7 @@ //nouveau chapitre $('.chapter-widget').on('click', '.btn-cut-chapter', function(e){ e.preventDefault(); + var uniqId = 'id' + (new Date()).getTime(); $.get('template.html', function(templates){ var viewChapterRow = { @@ -120,6 +160,9 @@ }); }); + function addChapter(data){ + + } //edit annotation $('#list-annotations').on('click', 'a.btn-edit-annotation', function(e){ @@ -261,11 +304,7 @@ }); //annotation > diaporama (spin) -var spinParam = { - imageBasePath :'lib/spin/img/', - max:60, - min:0 -}; + //config //CLEditor annotation > text (wysiwyg) @@ -371,4 +410,4 @@ $('#annotation-tab a:last-child').tab('show'); -}); \ No newline at end of file +});//ready \ No newline at end of file diff -r 16b482c153fd -r 6a3d8d05e3fb src/metadatacomposer/static/metadatacomposer/js/projet.js --- a/src/metadatacomposer/static/metadatacomposer/js/projet.js Thu May 16 18:03:54 2013 +0200 +++ b/src/metadatacomposer/static/metadatacomposer/js/projet.js Thu May 16 18:11:00 2013 +0200 @@ -6,7 +6,7 @@ //ZeroClipboard (fonctionne sous localhost) var clip = new ZeroClipboard( $('.clipboard'), { - moviePath: "lib/ZeroClipboard/ZeroClipboard.swf" + moviePath: ZeroClipboardMoviePath }); clip.on( 'complete', function(client, args) { alert("Copied text to clipboard: " + args.text ); diff -r 16b482c153fd -r 6a3d8d05e3fb src/metadatacomposer/templates/metadatacomposer_modal_image.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/metadatacomposer/templates/metadatacomposer_modal_image.html Thu May 16 18:11:00 2013 +0200 @@ -0,0 +1,59 @@ +{% load static %} +