| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 /** 2 * @file 3 * Adds some show/hide to the admin form to make the UXP easier. 4 * 5 */ 6 $(document).ready(function() { 7 video_hide_all_options(); 8 $("input[name='vid_convertor']").change(function() { 9 video_hide_all_options(); 10 }); 11 12 // change metadata options 13 video_hide_all__metadata_options(); 14 $("input[name='vid_metadata']").change(function() { 15 video_hide_all__metadata_options(); 16 }); 17 18 // change metadata options 19 video_hide_all__filesystem_options(); 20 $("input[name='vid_filesystem']").change(function() { 21 video_hide_all__filesystem_options(); 22 }); 23 24 $('.video_select').each(function() { 25 var ext = $(this).attr('rel'); 26 var select = $('select', this); 27 28 select.change(function() { 29 $('#flv_player_'+ext).hide(); 30 $('#html5_player_'+ext).hide(); 31 if($(this).val() == 'video_play_flv') { 32 $('#flv_player_'+ext).show(); 33 } else if($(this).val() == 'video_play_html5') { 34 $('#html5_player_'+ext).show(); 35 } 36 }); 37 if(select.val() == 'video_play_flv') { 38 $('#flv_player_'+ext).show(); 39 } else { 40 $('#flv_player_'+ext).hide(); 41 } 42 if(select.val() == 'video_play_html5') { 43 $('#html5_player_'+ext).show(); 44 } else { 45 $('#html5_player_'+ext).hide(); 46 } 47 }); 48 }); 49 50 function video_hide_all_options() { 51 $("input[name='vid_convertor']").each(function() { 52 var id = $(this).val(); 53 $('#'+id).hide(); 54 if ($(this).is(':checked')) { 55 $('#' + id).show(); 56 } 57 }); 58 } 59 60 function videoftp_thumbnail_change() { 61 // Add handlers for the video thumbnail radio buttons to update the large thumbnail onchange. 62 $(".video-thumbnails input").each(function() { 63 var path = $(this).val(); 64 if($(this).is(':checked')) { 65 var holder = $(this).attr('rel'); 66 $('.'+holder+' img').attr('src', Drupal.settings.basePath + path); 67 } 68 }); 69 } 70 71 function video_hide_all__metadata_options() { 72 $("input[name='vid_metadata']").each(function() { 73 var id = $(this).val(); 74 $('#'+id).hide(); 75 if ($(this).is(':checked')) { 76 $('#' + id).show(); 77 } 78 }); 79 } 80 81 function video_hide_all__filesystem_options() { 82 $("input[name='vid_filesystem']").each(function() { 83 var id = $(this).val(); 84 $('#'+id).hide(); 85 if ($(this).is(':checked')) { 86 $('#' + id).show(); 87 } 88 }); 89 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |