diff -r 12978893bbf0 -r 8a8b6097d382 integration/js/main.js --- a/integration/js/main.js Wed Oct 24 15:38:36 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -$(function(){ - //$("div.popin").hide(); - $("a.open-popin").bind("click",function(e){ - e.preventDefault(); - var target = $(this).attr("href"); - if($(target).is(':visible')){ - $(target).hide(); - }else{ - $(target).show(); - } - }); - //video sortable - $("ul.tools li a.disable").bind("click",function(e){e.preventDefault();}); - disableMoveItemVideo(); - function disableMoveItemVideo(){ - $(".list-video#sortable ul.tools li a.top.disable, .list-video#sortable ul.tools li a.bottom.disable").removeClass("disable"); - var listVideo = $(".list-video#sortable"); - var firstItem = listVideo.find("li:first-child"); - var lastItem = listVideo.find("li:last-child"); - firstItem.find("ul.tools li a.top").addClass("disable"); - lastItem.find("ul.tools li a.bottom").addClass("disable"); - } - $(".list-video#sortable ul.tools li a.top,.list-video#sortable ul.tools li a.bottom ").bind("click",function(e){ - e.preventDefault(); - var currentItem = $(this).parents("li.item-video"); - - if($(this).hasClass("top")){ - var itemPrev = currentItem.prev(); - currentItem.insertBefore(currentItem.prev()); - }else if($(this).hasClass("bottom")){ - currentItem.insertAfter(currentItem.next()); - } - - disableMoveItemVideo(); - }); - $( "#sortable" ).sortable({ - stop : function(){ - disableMoveItemVideo(); - } - }); -});//jQuery