Owen Leonard
9ea7fbcb30
This patch adds HTML comments to Template::Toolkit include files which contain <script> tags so that it is clear where the embedded scripts can be found in the code. To test, apply the patch and view source on the following pages to verify the presence of the comments: Acquisitions home page: - acquisitions-toolbar.inc - validtor-strings.inc - js_includes.inc - format-price.inc Acquisitions -> Add order from new record, Acquisitions -> Receive order: - additem.js.inc Cataloging -> Add/Edit item: - columns_settings.inc - strings.inc - select2.inc - calendar.inc - str/cataloging_additem.inc Authorities home page: - authorities_js.inc Bibliographic detail page: - catalog-strings.inc Cataloging -> Advanced editor: - cateditor-ui.inc - cateditor-widgets-marc21.inc Administration -> Item types: - greybox.inc ILL requests: - ill-list-table-strings.inc Web installer - installer-intranet-bottom.inc Web installer -> Onboarding - installer-strings.inc Lists -> List contents -> Merge records - merge-record-strings.inc Patrons -> Patron -> Change password - password_check.inc - str/members-menu.inc Patrons -> Patron -> Print summary - slip-print.inc Circulation -> Check out - timepicker.inc Administration -> System preferences: - str/tinymce_i18n.inc - wysiwyg-systempreferences.inc Cataloging -> Z39.50 Search: - z3950_search.inc Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
93 lines
3.5 KiB
PHP
93 lines
3.5 KiB
PHP
<!-- authorities_js.inc -->
|
|
<script>
|
|
|
|
function mergeAuth(authid, summary) {
|
|
var alreadySelected = Cookies.get('auth_to_merge');
|
|
if (alreadySelected !== undefined) {
|
|
alreadySelected = JSON.parse(alreadySelected);
|
|
Cookies.remove('auth_to_merge');
|
|
var refstring = "";
|
|
if (typeof alreadySelected.mergereference !== 'undefined') {
|
|
refstring = "&mergereference=" + alreadySelected.mergereference;
|
|
}
|
|
window.location.href = "/cgi-bin/koha/authorities/merge.pl?authid=" + authid + "&authid=" + alreadySelected.authid + refstring;
|
|
} else {
|
|
Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/' });
|
|
showMergingInProgress();
|
|
}
|
|
}
|
|
|
|
function showMergingInProgress() {
|
|
var alreadySelected = Cookies.get('auth_to_merge');
|
|
if (alreadySelected !== undefined) {
|
|
alreadySelected = JSON.parse(alreadySelected);
|
|
$('#merge_in_progress').html(_("Merging with authority: ") + "<a href='detail.pl?authid=" + alreadySelected.authid + "'><span class='authorizedheading'>" + alreadySelected.summary + "</span> (" + alreadySelected.authid + ")</a> <a href='#' id='cancel_merge'>" + _("Cancel merge") + "</a>");
|
|
$('#cancel_merge').click(function(event) {
|
|
event.preventDefault();
|
|
Cookies.remove('auth_to_merge');
|
|
$('#merge_in_progress').empty();
|
|
});
|
|
} else {
|
|
$('#merge_in_progress').empty();
|
|
}
|
|
}
|
|
|
|
function confirm_deletion(id) {
|
|
var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
|
|
if( !id ){
|
|
id = "[% authid | html %]";
|
|
}
|
|
if (is_confirmed) {
|
|
window.location="authorities-home.pl?op=delete"
|
|
+ "&authid=" + id
|
|
+ "&type=intranet"
|
|
+ "&authtypecode=[% authtypecode | html %]"
|
|
+ "&marclist=[% marclist | html %]"
|
|
+ "&and_or=[% and_or | html %]"
|
|
+ "&excluding=[% excluding | html %]"
|
|
+ "&operator=[% operator | html %]"
|
|
+ "&orderby=[% orderby | html %]"
|
|
+ "&value=[% value |url %]"
|
|
+ "&startfrom=[% startfrom | html %]"
|
|
+ "&resultsperpage=[% resultsperpage | html %]"
|
|
+ "&csrf_token=[% csrf_token | html %]";
|
|
}
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
showMergingInProgress();
|
|
$('.merge_auth').click(function (event) {
|
|
event.preventDefault();
|
|
mergeAuth($(this).parents('tr').attr('data-authid'), $(this).parents('tr').find('div.authorizedheading').text());
|
|
});
|
|
|
|
$("#delAuth").click(function(){
|
|
confirm_deletion();
|
|
return false;
|
|
});
|
|
|
|
$("#z3950_new").click(function(e){
|
|
e.preventDefault();
|
|
window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
|
|
});
|
|
|
|
$("#z3950_replace").click(function(e){
|
|
e.preventDefault();
|
|
window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid | html %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
|
|
});
|
|
|
|
var searchType = '[% marclist | html %]';
|
|
if (searchType) {
|
|
if ('mainentry' == searchType) {
|
|
$("#header_search").tabs( "option", "selected", 0 );
|
|
} else if ('match' == searchType) {
|
|
$("#header_search").tabs( "option", "selected", 1 );
|
|
} else if ('all' == searchType) {
|
|
$("#header_search").tabs( "option", "selected", 2 );
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
<!-- / authorities_js.inc -->
|