diff -r d22ded2dfaf1 -r c85b323f5174 integration/js/editor.js
--- a/integration/js/editor.js Thu Oct 25 14:53:29 2012 +0200
+++ b/integration/js/editor.js Thu Oct 25 16:40:20 2012 +0200
@@ -5,7 +5,7 @@
url: "data/bpidata.json",
serializer: IriSP.serializers.medialist
}),
- mediatemplate = '
'
+ mediatemplate = '
'
+ '{{title}}{{description}}'
+ 'Durée : {{duration}}';
project.onLoad(function() {
@@ -49,6 +49,30 @@
return false;
});
+ function disableMoveItemVideo() {
+ $(".organize-segments .top, .organize-segments .bottom").removeClass("disable");
+ $(".organize-segments .item-video:last-child .bottom, .organize-segments .item-video:first-child .top").addClass("disable");
+ }
+
+ $(".organize-segments").sortable({
+ stop : function(){
+ disableMoveItemVideo();
+ }
+ });
+
+ $(".organize-segments .top").click(function(e){
+ var currentItem = $(this).parents(".item-video");
+ currentItem.insertBefore(currentItem.prev());
+ disableMoveItemVideo();
+ });
+
+ $(".organize-segments .bottom").click(function(e){
+ var currentItem = $(this).parents(".item-video");
+ currentItem.insertAfter(currentItem.next());
+ disableMoveItemVideo();
+ });
+
+
}
IriSP.Hashcut = Hashcut;