integration/js/edition.js
changeset 23 2a3159ee4ed0
parent 22 0e02c3a28491
child 28 a0a048ff33a1
equal deleted inserted replaced
22:0e02c3a28491 23:2a3159ee4ed0
   167         var idChapter = $(this).attr('data-chapter-id');
   167         var idChapter = $(this).attr('data-chapter-id');
   168         loadFormChapter(idChapter);
   168         loadFormChapter(idChapter);
   169         currentChapter = _.find(chapters, function(c){ return c.id == idChapter; });
   169         currentChapter = _.find(chapters, function(c){ return c.id == idChapter; });
   170     });
   170     });
   171 
   171 
       
   172     $('.chapter-segments').on('click', 'li', function(){
       
   173         var idChapter = $(this).attr('id');
       
   174         loadFormChapter(idChapter);
       
   175     });
   172 
   176 
   173     $('.chapter-widget-info').on('keyup', 'input[name=title], textarea', function(e){
   177     $('.chapter-widget-info').on('keyup', 'input[name=title], textarea', function(e){
   174         var name = $(this).attr('name'),
   178         var name = $(this).attr('name'),
   175             value = $(this).val();
   179             value = $(this).val();
   176         currentChapter[name] = value;
   180         currentChapter[name] = value;