File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11( function ( exports ) {
22 $ ( document ) . on ( "loadedrecordform.aspace" , function ( event , $pane ) {
3- const name = $ ( 'label[for=archival_object_component_id_]' ) . parent ( ) . find ( 'div' ) . text ( ) ;
3+ const name = $ ( 'label[for=archival_object_component_id_]' ) . parent ( ) . find ( 'div' ) . text ( ) || document . location . hash . split ( '::' ) [ 1 ] ;
44 const data = $ ( 'label[for=archival_object_ref_id_]' ) . parent ( ) . find ( '.identifier-display' ) . text ( ) ;
55
6- if ( name && data ) {
6+ if ( data ) {
77 const url = AS . app_prefix ( '/plugins/getty_barcode?data=' + data + '&name=barcode_' + name ) ;
88 const bbut = '<a id="getty-barcode-button" class="btn btn-sm btn-default" href="' + url + '">Barcode</a>' ;
99 $ ( '.record-toolbar > .btn-toolbar > .btn-group' ) . prepend ( bbut ) ;
You can’t perform that action at this time.
0 commit comments