equal
deleted
inserted
replaced
|
1 (function(){ |
|
2 |
|
3 $(document).on('click', 'a.open-modal', function(e){ |
|
4 e.preventDefault(); |
|
5 var modalRemote = $(this).attr('href'), |
|
6 typeMedia = $(this).attr('data-type-media'), |
|
7 modalTitleInfo = $(this).attr('data-title'), |
|
8 titleFront; |
|
9 |
|
10 switch(typeMedia){ |
|
11 case 'video' : titleFront = '<i class="icon-film"></i> Vidéo - '+modalTitleInfo; break; |
|
12 case 'image' : titleFront = '<i class="icon-picture"></i> Image - '+modalTitleInfo; break; |
|
13 } |
|
14 $('#modal-template .modal-header h3').html(titleFront); |
|
15 |
|
16 $("#modal-template .modal-body").load(modalRemote, function() { |
|
17 $("#modal-template").modal("show"); |
|
18 }); |
|
19 |
|
20 }); |
|
21 |
|
22 })(jQuery); |