Lines 666-672
Link Here
|
666 |
'embed': [ 'smtp_server', 'library_hours' ], |
666 |
'embed': [ 'smtp_server', 'library_hours' ], |
667 |
'emptyTable': '<div class="alert alert-info">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>', |
667 |
'emptyTable': '<div class="alert alert-info">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>', |
668 |
"columnDefs": [ { |
668 |
"columnDefs": [ { |
669 |
"targets": [0,1,3,4,7,10,11,12,13,14,15,16,17], |
669 |
"targets": [1,3,4,5,6], |
670 |
"render": function (data, type, row, meta) { |
670 |
"render": function (data, type, row, meta) { |
671 |
if ( type == 'display' ) { |
671 |
if ( type == 'display' ) { |
672 |
if ( data != null ) { |
672 |
if ( data != null ) { |
Lines 694-700
Link Here
|
694 |
"orderable": true |
694 |
"orderable": true |
695 |
}, |
695 |
}, |
696 |
{ |
696 |
{ |
697 |
"data": function( row, type, val, meta ) { |
697 |
"render": function( data, type, row, meta ) { |
698 |
const library_info = []; |
698 |
const library_info = []; |
699 |
if ( row.address1 != null ) library_info.push(row.address1.escapeHtml()); |
699 |
if ( row.address1 != null ) library_info.push(row.address1.escapeHtml()); |
700 |
if ( row.address2 != null ) library_info.push(row.address2.escapeHtml()); |
700 |
if ( row.address2 != null ) library_info.push(row.address2.escapeHtml()); |
Lines 754-760
Link Here
|
754 |
return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>'; |
754 |
return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>'; |
755 |
} |
755 |
} |
756 |
else { |
756 |
else { |
757 |
return _("Default"); |
757 |
return _("Default").escapeHtml(); |
758 |
} |
758 |
} |
759 |
}, |
759 |
}, |
760 |
"searchable": false, |
760 |
"searchable": false, |
Lines 780-786
Link Here
|
780 |
for (let i = calendarFirstDayOfWeek; counter < 7; i++) { |
780 |
for (let i = calendarFirstDayOfWeek; counter < 7; i++) { |
781 |
const day = i % 7; // Wrap around the day using modulo operator |
781 |
const day = i % 7; // Wrap around the day using modulo operator |
782 |
result += '<tr id="hours_'+day+'">'; |
782 |
result += '<tr id="hours_'+day+'">'; |
783 |
result += '<td>'+daysOfWeek[day]+'</td>'; |
783 |
result += '<td>'+daysOfWeek[day].escapeHtml()+'</td>'; |
784 |
result += '<td><span>'; |
784 |
result += '<td><span>'; |
785 |
result += row.library_hours[day].open_time != null ? $kohatime(row.library_hours[day].open_time): ''; |
785 |
result += row.library_hours[day].open_time != null ? $kohatime(row.library_hours[day].open_time): ''; |
786 |
result += '</span></td>'; |
786 |
result += '</span></td>'; |
Lines 792-798
Link Here
|
792 |
} |
792 |
} |
793 |
result += '</tbody></table>'; |
793 |
result += '</tbody></table>'; |
794 |
} else { |
794 |
} else { |
795 |
result = _("Library hours not set"); |
795 |
result = _("Library hours not set").escapeHtml(); |
796 |
} |
796 |
} |
797 |
return result; |
797 |
return result; |
798 |
}, |
798 |
}, |
Lines 814-875
Link Here
|
814 |
"searchable": false, |
814 |
"searchable": false, |
815 |
"orderable": false |
815 |
"orderable": false |
816 |
}, |
816 |
}, |
817 |
{ |
|
|
818 |
"data": "address1", |
819 |
"searchable": true, |
820 |
"visible": false, |
821 |
"orderable": false |
822 |
}, |
823 |
{ |
824 |
"data": "address2", |
825 |
"searchable": true, |
826 |
"visible": false, |
827 |
"orderable": false |
828 |
}, |
829 |
{ |
830 |
"data": "address3", |
831 |
"searchable": true, |
832 |
"visible": false, |
833 |
"orderable": false |
834 |
}, |
835 |
{ |
836 |
"data": "city", |
837 |
"searchable": true, |
838 |
"visible": false, |
839 |
"orderable": false |
840 |
}, |
841 |
{ |
842 |
"data": "state", |
843 |
"searchable": true, |
844 |
"visible": false, |
845 |
"orderable": false |
846 |
}, |
847 |
{ |
848 |
"data": "postal_code", |
849 |
"searchable": true, |
850 |
"visible": false, |
851 |
"orderable": false |
852 |
}, |
853 |
{ |
854 |
"data": "country", |
855 |
"searchable": true, |
856 |
"visible": false, |
857 |
"orderable": false |
858 |
}, |
859 |
{ |
860 |
"data": function( row, type, val, meta ) { |
861 |
return ''; // provisional placeholder for opac_info |
862 |
}, |
863 |
"searchable": false, |
864 |
"visible": false, |
865 |
"orderable": false |
866 |
}, |
867 |
{ |
868 |
"data": "notes", |
869 |
"searchable": true, |
870 |
"visible": false, |
871 |
"orderable": false |
872 |
} |
873 |
] |
817 |
] |
874 |
}, table_settings); |
818 |
}, table_settings); |
875 |
|
819 |
|
876 |
- |
|
|