|
Lines 1283-1300
Link Here
|
| 1283 |
[% PROCESS build_items_table_js biblio => biblio %] |
1283 |
[% PROCESS build_items_table_js biblio => biblio %] |
| 1284 |
|
1284 |
|
| 1285 |
[% IF ( Koha.Preference('CatalogConcerns') ) %] |
1285 |
[% IF ( Koha.Preference('CatalogConcerns') ) %] |
| 1286 |
<script> |
1286 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1287 |
/* Set a variable needed by add_catalog_concern.js */ |
1287 |
/* Set a variable needed by add_catalog_concern.js */ |
| 1288 |
var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; |
1288 |
var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; |
| 1289 |
</script> |
1289 |
</script> |
| 1290 |
[% Asset.js("js/modals/add_catalog_concern.js") | $raw %] |
1290 |
[% Asset.js("js/modals/add_catalog_concern.js") | $raw %] |
| 1291 |
[% END %] |
1291 |
[% END %] |
| 1292 |
[% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] |
1292 |
[% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] |
| 1293 |
<script> |
1293 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1294 |
var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'concerns', 'table_concerns', 'json' ) | $raw %]; |
1294 |
var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'concerns', 'table_concerns', 'json' ) | $raw %]; |
| 1295 |
const biblio_id = "[% biblionumber | html %]"; |
1295 |
const biblio_id = "[% biblionumber | html %]"; |
| 1296 |
</script> |
1296 |
</script> |
| 1297 |
<script> |
1297 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1298 |
$(document).ready(function () { |
1298 |
$(document).ready(function () { |
| 1299 |
$("#bibliodetails a:first").tab("show"); |
1299 |
$("#bibliodetails a:first").tab("show"); |
| 1300 |
|
1300 |
|
|
Lines 1475-1481
Link Here
|
| 1475 |
</script> |
1475 |
</script> |
| 1476 |
[% Asset.js("js/modals/display_ticket.js") | $raw %] |
1476 |
[% Asset.js("js/modals/display_ticket.js") | $raw %] |
| 1477 |
[% END # /IF CatalogConcerns %] |
1477 |
[% END # /IF CatalogConcerns %] |
| 1478 |
<script> |
1478 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1479 |
var interface = "[% interface | html %]"; |
1479 |
var interface = "[% interface | html %]"; |
| 1480 |
var theme = "[% theme | html %]"; |
1480 |
var theme = "[% theme | html %]"; |
| 1481 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
1481 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
|
Lines 1749-1758
Link Here
|
| 1749 |
[% INCLUDE 'js-date-format.inc' %] |
1749 |
[% INCLUDE 'js-date-format.inc' %] |
| 1750 |
[% Asset.js("lib/dayjs/plugin/isSameOrAfter.js") | $raw %] |
1750 |
[% Asset.js("lib/dayjs/plugin/isSameOrAfter.js") | $raw %] |
| 1751 |
[% Asset.js("lib/dayjs/plugin/isSameOrBefore.js") | $raw %] |
1751 |
[% Asset.js("lib/dayjs/plugin/isSameOrBefore.js") | $raw %] |
| 1752 |
<script> |
1752 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1753 |
dayjs.extend(window.dayjs_plugin_isSameOrAfter); |
1753 |
dayjs.extend(window.dayjs_plugin_isSameOrAfter); |
| 1754 |
</script> |
1754 |
</script> |
| 1755 |
<script> |
1755 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1756 |
dayjs.extend(window.dayjs_plugin_isSameOrBefore); |
1756 |
dayjs.extend(window.dayjs_plugin_isSameOrBefore); |
| 1757 |
</script> |
1757 |
</script> |
| 1758 |
[% INCLUDE 'js-biblio-format.inc' %] |
1758 |
[% INCLUDE 'js-biblio-format.inc' %] |
|
Lines 1761-1767
Link Here
|
| 1761 |
[% IF Koha.Preference('EnableBooking') %] |
1761 |
[% IF Koha.Preference('EnableBooking') %] |
| 1762 |
[% Asset.js("js/modals/place_booking.js") | $raw %] |
1762 |
[% Asset.js("js/modals/place_booking.js") | $raw %] |
| 1763 |
[% END %] |
1763 |
[% END %] |
| 1764 |
<script> |
1764 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1765 |
var browser; |
1765 |
var browser; |
| 1766 |
browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10)); |
1766 |
browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10)); |
| 1767 |
browser.show(); |
1767 |
browser.show(); |
|
Lines 1780-1786
Link Here
|
| 1780 |
CAN_user_editcatalogue_manage_item_groups: [% CAN_user_editcatalogue_manage_item_groups ? 1 : 0 | html %], |
1780 |
CAN_user_editcatalogue_manage_item_groups: [% CAN_user_editcatalogue_manage_item_groups ? 1 : 0 | html %], |
| 1781 |
}); |
1781 |
}); |
| 1782 |
</script> |
1782 |
</script> |
| 1783 |
<script> |
1783 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 1784 |
let items_tab_ids = ["holdings", "otherholdings"]; |
1784 |
let items_tab_ids = ["holdings", "otherholdings"]; |
| 1785 |
items_tab_ids.forEach(function (tab_id, index) { |
1785 |
items_tab_ids.forEach(function (tab_id, index) { |
| 1786 |
// Early return if the tab is not shown (ie. no table) |
1786 |
// Early return if the tab is not shown (ie. no table) |
|
Lines 2133-2142
Link Here
|
| 2133 |
} |
2133 |
} |
| 2134 |
</script> |
2134 |
</script> |
| 2135 |
[% IF Koha.Preference('AcquisitionDetails') %] |
2135 |
[% IF Koha.Preference('AcquisitionDetails') %] |
| 2136 |
<script> |
2136 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2137 |
var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; |
2137 |
var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; |
| 2138 |
</script> |
2138 |
</script> |
| 2139 |
<script> |
2139 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2140 |
$(document).ready(function () { |
2140 |
$(document).ready(function () { |
| 2141 |
var acquisitiondetails_table = $("#orders").kohaTable( |
2141 |
var acquisitiondetails_table = $("#orders").kohaTable( |
| 2142 |
{ |
2142 |
{ |
|
Lines 2152-2158
Link Here
|
| 2152 |
[% END %] |
2152 |
[% END %] |
| 2153 |
|
2153 |
|
| 2154 |
[% IF suggestions.count %] |
2154 |
[% IF suggestions.count %] |
| 2155 |
<script> |
2155 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2156 |
$(document).ready(function () { |
2156 |
$(document).ready(function () { |
| 2157 |
$("#suggestions").kohaTable({ |
2157 |
$("#suggestions").kohaTable({ |
| 2158 |
pagingType: "full", |
2158 |
pagingType: "full", |
|
Lines 2162-2171
Link Here
|
| 2162 |
[% END %] |
2162 |
[% END %] |
| 2163 |
|
2163 |
|
| 2164 |
[% IF ( reviews ) %] |
2164 |
[% IF ( reviews ) %] |
| 2165 |
<script> |
2165 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2166 |
var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %]; |
2166 |
var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %]; |
| 2167 |
</script> |
2167 |
</script> |
| 2168 |
<script> |
2168 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2169 |
$(document).ready(function () { |
2169 |
$(document).ready(function () { |
| 2170 |
var comments_table = $("#comments_table").kohaTable( |
2170 |
var comments_table = $("#comments_table").kohaTable( |
| 2171 |
{ |
2171 |
{ |
|
Lines 2180-2186
Link Here
|
| 2180 |
[% END %] |
2180 |
[% END %] |
| 2181 |
|
2181 |
|
| 2182 |
[% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %] |
2182 |
[% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %] |
| 2183 |
<script> |
2183 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2184 |
$(document).ready(function () { |
2184 |
$(document).ready(function () { |
| 2185 |
var search_index = localStorage.getItem("cat_search_pulldown_selection"); |
2185 |
var search_index = localStorage.getItem("cat_search_pulldown_selection"); |
| 2186 |
var search_value = localStorage.getItem("searchbox_value"); |
2186 |
var search_value = localStorage.getItem("searchbox_value"); |
|
Lines 2195-2201
Link Here
|
| 2195 |
[% END %] |
2195 |
[% END %] |
| 2196 |
|
2196 |
|
| 2197 |
[% IF Koha.Preference('EnableItemGroups') %] |
2197 |
[% IF Koha.Preference('EnableItemGroups') %] |
| 2198 |
<script> |
2198 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2199 |
$(document).ready(function () { |
2199 |
$(document).ready(function () { |
| 2200 |
// Load item groups table |
2200 |
// Load item groups table |
| 2201 |
var itemGroupsTable = $("#items-group-table").kohaTable({ |
2201 |
var itemGroupsTable = $("#items-group-table").kohaTable({ |
|
Lines 2437-2443
Link Here
|
| 2437 |
}); |
2437 |
}); |
| 2438 |
</script> |
2438 |
</script> |
| 2439 |
[% END # /IF EnableItemGroups %] |
2439 |
[% END # /IF EnableItemGroups %] |
| 2440 |
<script> |
2440 |
<script nonce="[% Koha.CSPNonce | $raw %]"> |
| 2441 |
$(".delete-comment").on("click", function () { |
2441 |
$(".delete-comment").on("click", function () { |
| 2442 |
return confirm(_("Are you sure you want to delete this comment?")); |
2442 |
return confirm(_("Are you sure you want to delete this comment?")); |
| 2443 |
}); |
2443 |
}); |