Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-06-14 16:13:26 +01:00 committed by Katrin Fischer
parent 5f8c575345
commit 876aff189a
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 29 additions and 25 deletions

View file

@ -1137,7 +1137,7 @@
</script>
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
[% Asset.js("js/bookings-table.js") | $raw %]
[% Asset.js("js/tables/bookings.js") | $raw %]
[% Asset.js("js/recalls.js") | $raw %]
[% END %]

View file

@ -804,8 +804,33 @@
}
}
}
$(document).ready(function () {
$("#info_digests").tooltip();
$("#finesholdsissues a[data-toggle='tab']").on(
"shown.bs.tab",
function (e) {
var oTable = $(
"div.dataTables_wrapper > table",
$(e.target.hash)
).dataTable();
if (oTable.length > 0) {
oTable.fnAdjustColumnSizing();
}
}
);
$("#view_restrictions").on("click", function () {
$("#reldebarments-tab").click();
});
$("#view_guarantees_finesandcharges").on("click", function () {
$("#guarantees_finesandcharges-tab").click();
});
});
</script>
[% Asset.js("js/bookings-table.js") | $raw %]
[% Asset.js("js/tables/bookings.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -1,30 +1,9 @@
/* keep tidy */
// Bookings
$(document).ready(function () {
var bookings_table;
$(document).ready(function () {
$("#info_digests").tooltip();
$("#finesholdsissues a[data-toggle='tab']").on(
"shown.bs.tab",
function (e) {
var oTable = $(
"div.dataTables_wrapper > table",
$(e.target.hash)
).dataTable();
if (oTable.length > 0) {
oTable.fnAdjustColumnSizing();
}
}
);
$("#view_restrictions").on("click", function () {
$("#reldebarments-tab").click();
});
$("#view_guarantees_finesandcharges").on("click", function () {
$("#guarantees_finesandcharges-tab").click();
});
// Bookings
// Load bookings table on tab selection
$("#bookings-tab").on("click", function () {
if (!bookings_table) {