integration/js/edition.js
changeset 18 16b482c153fd
parent 16 c66274d0d850
child 21 abd04f346dbe
equal deleted inserted replaced
17:c72a9f9cb519 18:16b482c153fd
     2 
     2 
     3 var global = {
     3 var global = {
     4     diaporama : null,
     4     diaporama : null,
     5     idAnnotation : null
     5     idAnnotation : null
     6 },
     6 },
     7 chapitres = {},
     7 chapitres = [],
     8 annotations = {};
     8 annotations = [];
     9 
     9 
    10 //onLoad
       
    11 myProject.onLoad(function() {
    10 myProject.onLoad(function() {
    12 
    11 
    13     $(".project-title").text(myProject.title);
    12     $(".project-title").text(myProject.title);
    14     
    13     
    15     myMedia = myProject.getCurrentMedia();
    14     myMedia = myProject.getCurrentMedia();
    38             btnCutChapter.css("left",(pos - wBtnCutChapter));
    37             btnCutChapter.css("left",(pos - wBtnCutChapter));
    39         }else{
    38         }else{
    40             btnCutChapter.css("left",pos);
    39             btnCutChapter.css("left",pos);
    41         }
    40         }
    42             
    41             
    43     });
    42     });//timeupdate
    44     
    43     
    45 });//myProject.onLoad
    44 });//myProject.onLoad
    46 
    45 
    47 
    46 
    48 //modal
    47 //modal
   129 
   128 
   130     $(document).on('keyup', '.project-title-editor-input', function() {
   129     $(document).on('keyup', '.project-title-editor-input', function() {
   131         $('.project-title').html($(this).val());
   130         $('.project-title').html($(this).val());
   132     });
   131     });
   133 
   132 
   134 //chapter
   133 //--chapter
   135     $('.list-chapter-wrap').on('click', '.edit-chapter', function(e){
   134     $('.list-chapter-wrap').on('click', '.edit-chapter', function(e){
   136         e.preventDefault();
   135         e.preventDefault();
   137         var viewChapter = {
   136         var viewChapter = {
   138             titre : 'titre du chapitre',
   137             titre : 'titre du chapitre',
   139             tags : 'tag 1, tag 2, tag 3',
   138             tags : 'tag 1, tag 2, tag 3',
   159             var tpl = Mustache.render(tpl, viewChapterRow);
   158             var tpl = Mustache.render(tpl, viewChapterRow);
   160             $('.list-chapter-rows-wrap').append(tpl);
   159             $('.list-chapter-rows-wrap').append(tpl);
   161         });
   160         });
   162     });
   161     });
   163 
   162 
       
   163     function addChapter(data){
       
   164 
       
   165     }
   164     
   166     
   165     //edit annotation
   167     //edit annotation
   166     $('#list-annotations').on('click', 'a.btn-edit-annotation', function(e){
   168     $('#list-annotations').on('click', 'a.btn-edit-annotation', function(e){
   167         e.preventDefault();
   169         e.preventDefault();
   168 
   170