|
Lines 1-21
Link Here
|
| 1 |
$(document).ready(function(){ |
1 |
$(document).ready(function(){ |
| 2 |
$(".none").click(function(){ |
|
|
| 3 |
if($(this).prop("checked")){ |
| 4 |
var rowid = $(this).attr("id"); |
| 5 |
var newid = Number(rowid.replace("none","")); |
| 6 |
$("#sms"+newid).prop("checked", false); |
| 7 |
$("#email"+newid).prop("checked", false); |
| 8 |
$("#phone"+newid).prop("checked", false); |
| 9 |
$("#digest"+newid).prop("checked", false); |
| 10 |
$("#rss"+newid).prop("checked", false); |
| 11 |
} |
| 12 |
}); |
| 13 |
$(".active_notify").on("change",function(){ |
| 14 |
var attr_id = $(this).data("attr-id"); |
| 15 |
if( $(this).prop("checked") ){ |
| 16 |
$("#none" + attr_id ).prop("checked", false); |
| 17 |
} |
| 18 |
}); |
| 19 |
$("#info_digests").tooltip(); |
2 |
$("#info_digests").tooltip(); |
| 20 |
|
3 |
|
| 21 |
var message_prefs_dirty = false; |
4 |
var message_prefs_dirty = false; |
|
Lines 36-42
$(document).ready(function(){
Link Here
|
| 36 |
return; |
19 |
return; |
| 37 |
} |
20 |
} |
| 38 |
} |
21 |
} |
| 39 |
$(".none").prop("checked", false); // When loading default prefs the "Do not notify" boxes should be cleared |
|
|
| 40 |
var jqxhr = $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, function(data) { |
22 |
var jqxhr = $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, function(data) { |
| 41 |
$.each(data.messaging_preferences, function(i, item) { |
23 |
$.each(data.messaging_preferences, function(i, item) { |
| 42 |
var attrid = item.message_attribute_id; |
24 |
var attrid = item.message_attribute_id; |