integration/js/home.js
author veltr
Thu, 16 May 2013 15:01:43 +0200
changeset 10 34df8e58b6fc
parent 8 7a5de13173b1
child 9 e3d551eda5a6
permissions -rw-r--r--
Added some code to bootstrap Metadataplayer

(function(){

    $(document).on('click', 'a.open-modal', function(e){
        e.preventDefault();
        var modalRemote = $(this).attr('href'),
            typeMedia = $(this).attr('data-type-media'),
            modalTitleInfo = $(this).attr('data-title'),
            titleFront;

        switch(typeMedia){
            case 'video' : titleFront = '<i class="icon-film"></i> Vidéo - '+modalTitleInfo; break;
            case 'image' : titleFront = '<i class="icon-picture"></i> Image - '+modalTitleInfo; break;
        }
        $('#modal-template .modal-header h3').html(titleFront);

        $("#modal-template .modal-body").load(modalRemote, function() { 
            $("#modal-template").modal("show"); 
            $("#modal-template").find(".bibliotheque-link").hide();
        });

    });

})(jQuery);