]> git.koha-community.org Git - koha.git/commit
Bug 28940: In spinelabel-print.tt call IntranetUserJS only once
authorLucas Gass <lucas@bywatersolutions.com>
Wed, 1 Sep 2021 19:16:15 +0000 (19:16 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Oct 2021 12:30:26 +0000 (08:30 -0400)
commit41b8d6c1ffb4ea36dd6ccf5736bb6635dfa40bb9
treef5a800a613375bdb2fcdbdb00db8fe925d97fb27
parent971cbd5b8e0c84239763022ddf0bbceaba54beb5
Bug 28940: In spinelabel-print.tt call IntranetUserJS only once

1. In IntranetUser add some JS that will target spinelabel-print.tt, I used this:
    if ( $('#labels_spinelabel-print').length ) {
      $('#labels_spinelabel-print').append('<div>TEST</div>');
      console.log('TEST');
    }
2. Generate a quick spine label
3. Once you have entered a barcode the JS will go off 2x. With the jQuery added you will see 2 div's with the word 'TEST'. Look at the console and you will also see TEST console logged 2x.
4. Apply patch
5. Try seto 2 and 3 again, the JS should only be called once.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt