View | Details | Raw Unified | Return to bug 40552
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-7 / +1 lines)
Lines 107-119 function display_pickup_location(state) { Link Here
107
107
108
/* global __ borrowernumber SuspendHoldsIntranet */
108
/* global __ borrowernumber SuspendHoldsIntranet */
109
$(document).ready(function () {
109
$(document).ready(function () {
110
    var url = window.location.href;
110
    let patron_page = holds_table_patron_page();
111
    let patron_page;
112
    if (url.indexOf("/circ/circulation.pl?borrowernumber=") !== -1)
113
        patron_page = "circ";
114
    else if (url.indexOf("/members/moremember.pl?borrowernumber=") !== -1)
115
        patron_page = "borrower";
116
117
    function suspend_hold(hold_ids, end_date) {
111
    function suspend_hold(hold_ids, end_date) {
118
        var params = { hold_ids: hold_ids };
112
        var params = { hold_ids: hold_ids };
119
        if (end_date !== null && end_date !== "") params.end_date = end_date;
113
        if (end_date !== null && end_date !== "") params.end_date = end_date;
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +15 lines)
Lines 1005-1010 function toggleBtnIcon(element, start, replacement) { Link Here
1005
    });
1005
    });
1006
}
1006
}
1007
1007
1008
/**
1009
 * Determines which patron page we are on based on the URL
1010
 * @return {string} The patron page we are on, "circ" or "borrower", or null
1011
 *                  if neither page is matched
1012
 */
1013
function holds_table_patron_page() {
1014
    var url = window.location.href;
1015
    if (url.indexOf("/circ/circulation.pl?borrowernumber=") !== -1)
1016
        return "circ";
1017
    else if (url.indexOf("/members/moremember.pl?borrowernumber=") !== -1)
1018
        return "borrower";
1019
1020
    return null;
1021
}
1022
1008
/**
1023
/**
1009
 * Returns a roughly ideal position to scroll an element into view
1024
 * Returns a roughly ideal position to scroll an element into view
1010
 * @param {string} target - The HTML id of the element to scroll into view
1025
 * @param {string} target - The HTML id of the element to scroll into view
1011
- 

Return to bug 40552