forked from splitbrain/dokuwiki-plugin-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
24 lines (22 loc) · 843 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
jQuery(function(){
/**
* Attach diff popup
*/
jQuery('a[class=sync_popup]').click(function(e){
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");
e.preventDefault();
return false;
});
/**
* Attach the select all actions
*/
jQuery('#sync__push').click(function(){ sync_select('push'); }).addClass('sync__action');
jQuery('#sync__skip').click(function(){ sync_select('skip'); }).addClass('sync__action');
jQuery('#sync__pull').click(function(){ sync_select('pull'); }).addClass('sync__action');
});
/**
* Check all radio buttons of the given type
*/
function sync_select(type){
jQuery('input[class=sync'+type+']').prop('checked',true);
}