diff -r 5dfa74fcec4b -r 8f954a0d6031 integration/js/edition.js
--- a/integration/js/edition.js Wed Jun 05 12:05:53 2013 +0200
+++ b/integration/js/edition.js Thu Jun 06 12:35:59 2013 +0200
@@ -102,6 +102,7 @@
}else{
btnCutChapter.css("left",pos);
}
+ $('.info-time').text(t)
//annotations view
refreshAnnotationDisplay(t);
@@ -151,7 +152,7 @@
function showCurrentAnnotationInTimeline(idAnnotation){
$('.timeline-annotations .annotation').empty();
- $('#annotation-timeline-'+idAnnotation).text('en cours');
+ $('#annotation-timeline-'+idAnnotation).html(' '+textCurrentAnnotationEditT);
}
//display annotation view
$('.list-current-annotations').on('click', 'a', function(e){
@@ -166,7 +167,7 @@
annotationDisplayView
.attr('data-id', idAnnotation)
.css('backgroundColor', annotation.color)
- .text(annotation.type)
+ .text(annotation.type+' : '+annotation.title)
.show();
}
});
@@ -177,13 +178,6 @@
});
-//edition image
- $('.popup').on('change', '#media-type-select', function(e){
- var typeImage = $(this).val();
- $('.input-image-url, .input-image-upload').hide();
- $('.input-image-'+typeImage).show();
- });
-
//select on bibliotheque
//confirmation suppression
@@ -206,6 +200,7 @@
//--title-editor
$(document).on('click', '.project-title-editor i, .project-title', function () {
+ disabledPreview();
var html = $('.project-title').html();
var input = $('');
input.val(html);
@@ -238,6 +233,8 @@
});
$('.chapter-widget-info').on('keyup', 'input[name=title], textarea', function(e){
+ disabledPreview();
+
var name = $(this).attr('name'),
value = $(this).val();
currentChapter[name] = value;
@@ -252,6 +249,7 @@
function loadFormChapter(idChapter){
+ disabledPreview();
currentChapter = _.find(chapters, function(c){ return c.id == idChapter; });
@@ -283,32 +281,12 @@
btnDeleteModal = $("#modal-confirm #btn-delete-modal");
btnDeleteModal.attr('data-type-delete', 'chapter');
btnDeleteModal.attr('data-id', idChapter);
- // $("#modal-confirm #btn-delete-modal").attr('onclick', 'deleteChapter("'+idChapter+'")')
-/*
- var idChapter = $(this).attr('data-chapter-id'),
- chapter = _.find(chapters, function(c){ return c.id == idChapter; }),
- indexChapter = _.indexOf(chapters, chapter),
- chapterModify;
- if(indexChapter == 0){
- chapterModify = chapters[1];
- chapterModify.setBegin(0);
- }else{
- chapterModify = chapters[indexChapter-1];
- //var newEnd = new IriSP.Model.Time(chapter.end)
- chapterModify.setEnd(chapter.end);
- }
- chapters = _(chapters).reject(function(c) { return c.id == idChapter; });
- renderChapter();
- //si le formulaire est visible
- if($('#form-chapter-edit-'+idChapter).length){
- $('#form-chapter-edit-'+idChapter).remove();
- }
-*/
});
function deleteChapter(idChapter){
- $("#modal-confirm").modal('hide')
+ disabledPreview();
+ $("#modal-confirm").modal('hide');
var chapter = _.find(chapters, function(c){ return c.id == idChapter; }),
indexChapter = _.indexOf(chapters, chapter),
chapterModify;
@@ -378,6 +356,8 @@
}
function renderChapter(){
+ disabledPreview();
+
var chapterSegmentWrap = $('.chapter-segments'),
wChapterSegmentWrap = chapterSegmentWrap.width(),
chapterList = $('.list-chapter-rows-wrap');
@@ -433,6 +413,8 @@
}
function renderAnnotation(){
+ disabledPreview();
+
var timeline = $('.timeline-annotations'),
wTimeline = timeline.width(),
annotationList = $('#list-annotations-rows');
@@ -499,7 +481,7 @@
//edit annotation
$('#list-annotations').on('click', 'a.btn-edit-annotation', function(e){
e.preventDefault();
-
+ disabledPreview();
var idAnnotation = $(this).attr('data-id');
//si il est déjà ouvert
if($('#tab-annotation-'+idAnnotation).length){
@@ -511,6 +493,7 @@
});
$('.tab-content').on('keyup', '.form-info-general-annotation input[name=title], .form-info-general-annotation textarea', function(e){
+ disabledPreview();
var name = $(this).attr('name'),
value = $(this).val();
currentAnnotation[name] = value;
@@ -523,13 +506,7 @@
//delete annotation
$(document).on('click','.btn-delete-annotation', function(e){
e.preventDefault();
- /*
- var idAnnotation = $(this).attr('data-id');
- annotations = _(annotations).reject(function(c) { return c.id == idAnnotation; });
- closeTab(idAnnotation);
- if(!$(this).hasAttr('data-no-render'))//si on ferme à partir de la tab renderAnnotation sera appelé 2 fois
- renderAnnotation();
- */
+
var idAnnotation = $(this).attr('data-id'),
btnDeleteModal = $("#modal-confirm #btn-delete-modal");
btnDeleteModal.attr('data-type-delete', 'annotation');
@@ -537,6 +514,7 @@
});
function deleteAnnotation(idAnnotation){
+ disabledPreview();
$("#modal-confirm").modal('hide');
annotations = _(annotations).reject(function(c) { return c.id == idAnnotation; });
closeTab(idAnnotation);
@@ -557,7 +535,7 @@
});
function openTab(type, data){
-
+
var dataView;
if(_.isUndefined(data)){//nouveau
var currentTimePlusUnMin = 60 * 1000 + myMedia.currentTime,
@@ -605,16 +583,10 @@
case 'audio':
break;
case 'video':
-
if(viewType.content.url != ""){
-
var videoWrap = $(tabContent).find('.annotation-video-content');
renderVideoInfo(videoWrap, viewType.content);
-
}
-
-
-
break;
case 'text':
var cledit = $(tabContent).find('.wysiwyg').cleditor(wysiwygConfig)[0];
@@ -632,7 +604,7 @@
break;
case 'slideshow':
-
+ $(tabContent).find('.number-spin').val(dataView.content.slideduration/1000);
$(tabContent).find('.number-spin').spin(spinParam);
$(tabContent).find('.ui-sortable').sortable({
start: function (event, ui) {
@@ -780,22 +752,12 @@
};
//edit title / description
- $('.tab-content').on('click', '.title-slideshow-row', function(){
+ $('.tab-content').on('click', '.title-slideshow-row, .description-slideshow-row, .video-title-edit, .video-description-edit', function(){
if($(this).find('input').length) return;
- var html = $(this).find('span').html();
- var input = $('').addClass('input-mini').attr('name', 'title');
- input.val(html);
- $(this).find('span').replaceWith(input);
- input.focus().keypress(function(e){
- code = (e.keyCode ? e.keyCode : e.which);
- if (code == 13) $(this).blur();
- });
- });
-
- $('.tab-content').on('click', '.description-slideshow-row', function(){
- if($(this).find('textarea').length) return;
- var html = $(this).find('span').html();
- var input = $('