1jQuery(function(){ 2 /** 3 * Attach diff popup 4 */ 5 jQuery('a[class=sync_popup]').click(function(e){ 6 window.open(jQuery(this).attr("href"),'diff',"width=700,height=500,left=100,top=100,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no"); 7 e.preventDefault(); 8 return false; 9 }); 10 11 /** 12 * Attach the select all actions 13 */ 14 jQuery('#sync__push').click(function(){ sync_select('push'); }).addClass('sync__action'); 15 jQuery('#sync__skip').click(function(){ sync_select('skip'); }).addClass('sync__action'); 16 jQuery('#sync__pull').click(function(){ sync_select('pull'); }).addClass('sync__action'); 17}); 18 19/** 20 * Check all radio buttons of the given type 21 */ 22function sync_select(type){ 23 jQuery('input[class=sync'+type+']').prop('checked',true); 24} 25