equal
deleted
inserted
replaced
3 var directory = new IriSP.Model.Directory(), |
3 var directory = new IriSP.Model.Directory(), |
4 project = directory.remoteSource({ |
4 project = directory.remoteSource({ |
5 url: "data/bpidata.json", |
5 url: "data/bpidata.json", |
6 serializer: IriSP.serializers.medialist |
6 serializer: IriSP.serializers.medialist |
7 }), |
7 }), |
8 mediatemplate = '<li class="item-video"><img src="{{thumbnail}}" alt="aperçu" />' |
8 mediatemplate = '<li class="item-video"><img src="{{thumbnail}}" alt="{{title}}" />' |
9 + '<span class="video-info"><span class="title-video">{{title}}</span><span class="author">{{description}}</span>' |
9 + '<span class="video-info"><span class="title-video">{{title}}</span><span class="author">{{description}}</span>' |
10 + '<span class="time-length">Durée : <span>{{duration}}</span></span></span></li>'; |
10 + '<span class="time-length">Durée : <span>{{duration}}</span></span></span></li>'; |
11 project.onLoad(function() { |
11 project.onLoad(function() { |
12 var html = ''; |
12 var html = ''; |
13 project.getMedias().forEach(function(_m) { |
13 project.getMedias().forEach(function(_m) { |
47 $(".tab-pvw").click(function() { |
47 $(".tab-pvw").click(function() { |
48 $(".col-middle").removeClass("empty-mode segment-mode").addClass("pvw-mode"); |
48 $(".col-middle").removeClass("empty-mode segment-mode").addClass("pvw-mode"); |
49 return false; |
49 return false; |
50 }); |
50 }); |
51 |
51 |
|
52 function disableMoveItemVideo() { |
|
53 $(".organize-segments .top, .organize-segments .bottom").removeClass("disable"); |
|
54 $(".organize-segments .item-video:last-child .bottom, .organize-segments .item-video:first-child .top").addClass("disable"); |
|
55 } |
|
56 |
|
57 $(".organize-segments").sortable({ |
|
58 stop : function(){ |
|
59 disableMoveItemVideo(); |
|
60 } |
|
61 }); |
|
62 |
|
63 $(".organize-segments .top").click(function(e){ |
|
64 var currentItem = $(this).parents(".item-video"); |
|
65 currentItem.insertBefore(currentItem.prev()); |
|
66 disableMoveItemVideo(); |
|
67 }); |
|
68 |
|
69 $(".organize-segments .bottom").click(function(e){ |
|
70 var currentItem = $(this).parents(".item-video"); |
|
71 currentItem.insertAfter(currentItem.next()); |
|
72 disableMoveItemVideo(); |
|
73 }); |
|
74 |
|
75 |
52 } |
76 } |
53 |
77 |
54 IriSP.Hashcut = Hashcut; |
78 IriSP.Hashcut = Hashcut; |
55 } |
79 } |
56 )(); |
80 )(); |