Bug 33731: Allow for default sounds on SCO page

To test:
1. APPLY PATCH
2. Enable AudioAlerts system preferencce
3. Set up some audio alerts to trigger on the SCO page. ( I used #sco_main for east testing)
4. Make sure the sounds work properly.

Note: It is not my favorite thing to duplicate these assets for intranet and OPAC, is there a better way?

	modified:   koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/IM_notification.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/beep.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/call.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/critical.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/device_connect.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/device_disconnect.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/ending.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/fail.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/incoming_call.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/loading.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/loading_2.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/maximize.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/minimize.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/new_mail_notification.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/opening.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/panic.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/popup.ogg
	new file:   koha-tmpl/opac-tmpl/bootstrap/sound/warning.ogg

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-08-14 16:35:42 +00:00 committed by Katrin Fischer
parent 8deb7f7795
commit 6c162a8a95
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
19 changed files with 2 additions and 1 deletions

View File

@ -557,7 +557,8 @@
}
});
function playSound( sound ) {
if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
if (!(sound.indexOf("http://") === 0 || sound.indexOf("https://") === 0)) {
sound = '[% interface | html %]' + '/bootstrap/sound/' + sound;
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.