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

(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-11 / +23 lines)
Lines 373-388 $(document).ready(function () { Link Here
373
                                        "</a>"
373
                                        "</a>"
374
                                    );
374
                                    );
375
                                } else {
375
                                } else {
376
                                    return (
376
                                    const link = document.createElement("a");
377
                                        "<a class='hold-suspend btn btn-default btn-xs' data-hold-id='" +
377
                                    link.classList.add(
378
                                        oObj.reserve_id +
378
                                        "hold-suspend",
379
                                        "' data-hold-title='" +
379
                                        "btn",
380
                                        oObj.title +
380
                                        "btn-default",
381
                                        "'>" +
381
                                        "btn-xs"
382
                                        "<i class='fa fa-pause'></i> " +
382
                                    );
383
                                        __("Suspend") +
383
                                    link.setAttribute(
384
                                        "</a>"
384
                                        "data-hold-id",
385
                                        oObj.reserve_id
386
                                    );
387
                                    link.setAttribute(
388
                                        "data-hold-title",
389
                                        oObj.title
390
                                    );
391
                                    link.textContent = " " + __("Suspend");
392
                                    const icon = document.createElement("i");
393
                                    icon.classList.add("fa", "fa-pause");
394
                                    link.insertAdjacentElement(
395
                                        "afterbegin",
396
                                        icon
385
                                    );
397
                                    );
398
                                    return link.outerHTML;
386
                                }
399
                                }
387
                            },
400
                            },
388
                        },
401
                        },
Lines 491-497 $(document).ready(function () { Link Here
491
                $(".hold-suspend").on("click", function () {
504
                $(".hold-suspend").on("click", function () {
492
                    var hold_id = $(this).data("hold-id");
505
                    var hold_id = $(this).data("hold-id");
493
                    var hold_title = $(this).data("hold-title");
506
                    var hold_title = $(this).data("hold-title");
494
                    $("#suspend-modal-title").html(hold_title);
507
                    $("#suspend-modal-title").text(hold_title);
495
                    $("#suspend-modal-submit").data("hold-id", hold_id);
508
                    $("#suspend-modal-submit").data("hold-id", hold_id);
496
                    $("#suspend-modal").modal("show");
509
                    $("#suspend-modal").modal("show");
497
                });
510
                });
498
- 

Return to bug 40538