--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integration/js/home.js Thu May 16 12:58:48 2013 +0200
@@ -0,0 +1,22 @@
+(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");
+ });
+
+ });
+
+})(jQuery);
\ No newline at end of file