|
Lines 11-21
$(document).ready(function(){
Link Here
|
| 11 |
} |
11 |
} |
| 12 |
|
12 |
|
| 13 |
if( $("#messaging_prefs_loading").length ){ // This element only appears in the template if op=add |
13 |
if( $("#messaging_prefs_loading").length ){ // This element only appears in the template if op=add |
| 14 |
$('#categorycode_entry').change(function() { |
14 |
$('#categorycode_entry').change(() => { update_messaging_prefs() }); |
|
|
15 |
update_messaging_prefs(); |
| 16 |
|
| 17 |
function update_messaging_prefs () { |
| 15 |
var messaging_prefs_loading = $("#messaging_prefs_loading"); |
18 |
var messaging_prefs_loading = $("#messaging_prefs_loading"); |
| 16 |
// Upon selecting a new patron category, show "Loading" message for messaging defaults |
19 |
// Upon selecting a new patron category, show "Loading" message for messaging defaults |
| 17 |
messaging_prefs_loading.show(); |
20 |
messaging_prefs_loading.show(); |
| 18 |
var categorycode = $(this).val(); |
21 |
var categorycode = $('#categorycode_entry').val(); |
| 19 |
if (message_prefs_dirty) { |
22 |
if (message_prefs_dirty) { |
| 20 |
if (!confirm( __("Change messaging preferences to default for this category?") )) { |
23 |
if (!confirm( __("Change messaging preferences to default for this category?") )) { |
| 21 |
// Not loading messaging defaults. Hide loading indicator |
24 |
// Not loading messaging defaults. Hide loading indicator |
|
Lines 51-57
$(document).ready(function(){
Link Here
|
| 51 |
// Loaded messaging defaults. Hide loading indicator |
54 |
// Loaded messaging defaults. Hide loading indicator |
| 52 |
messaging_prefs_loading.hide(); |
55 |
messaging_prefs_loading.hide(); |
| 53 |
}); |
56 |
}); |
| 54 |
}); |
57 |
} |
| 55 |
} |
58 |
} |
| 56 |
|
59 |
|
| 57 |
function toggle_digest(id){ |
60 |
function toggle_digest(id){ |
| 58 |
- |
|
|