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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-2 / +6 lines)
Lines 711-716 function _dt_buttons(params){ Link Here
711
    );
711
    );
712
712
713
    if ( table_settings ) {
713
    if ( table_settings ) {
714
        const writeToClipboard= async (text, node) => {
715
            await navigator.clipboard.writeText(text);
716
            $(node).tooltip({trigger: 'manual', title: __("Copied!")}).tooltip('show');
717
        };
714
        buttons.push(
718
        buttons.push(
715
            {
719
            {
716
                autoClose: true,
720
                autoClose: true,
Lines 728-737 function _dt_buttons(params){ Link Here
728
                    delete state.time;
732
                    delete state.time;
729
                    let searchParams = new URLSearchParams(window.location.search);
733
                    let searchParams = new URLSearchParams(window.location.search);
730
                    searchParams.set(table_key + '_state', btoa(state));
734
                    searchParams.set(table_key + '_state', btoa(state));
735
731
                    let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
736
                    let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
732
                    if( navigator.clipboard && navigator.clipboard.writeText){
737
                    if( navigator.clipboard && navigator.clipboard.writeText){
733
                        navigator.clipboard.writeText( url );
738
                        writeToClipboard(url, node);
734
                        $(node).tooltip({trigger: 'manual', title: __("Copied!")}).tooltip('show');
735
                    }
739
                    }
736
                },
740
                },
737
            }
741
            }
(-)a/t/cypress/integration/KohaTable_spec.ts (-1 / +2 lines)
Lines 268-275 describe("kohaTable (using REST API)", () => { Link Here
268
                    // Close the 'Columns' list
268
                    // Close the 'Columns' list
269
                    cy.get(".dt-button-background").click();
269
                    cy.get(".dt-button-background").click();
270
                    cy.get(".dt-button-background").should("not.exist");
270
                    cy.get(".dt-button-background").should("not.exist");
271
                    cy.wait(500); // ensure the animation completes, random failures?
271
272
272
                    // Copy the shareable link (Name and Code shown)
273
                    // Copy the shareable link (Name and Code shown)
274
                    cy.window().focus();
273
                    cy.get(
275
                    cy.get(
274
                        `#${table_id}_wrapper .copyConditions_controls`
276
                        `#${table_id}_wrapper .copyConditions_controls`
275
                    ).click({ force: true });
277
                    ).click({ force: true });
276
- 

Return to bug 38461