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

(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 9612-9617 $DBversion = "3.19.00.XXX"; Link Here
9612
if ( CheckVersion($DBversion) ) {
9612
if ( CheckVersion($DBversion) ) {
9613
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
9613
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
9614
9614
9615
    $dbh->do(q{
9616
        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES
9617
        ( 'OverrideAudioAlertWarning', '', NULL, 'URL to an audio file to replace the default warning sound.',           'free' ),
9618
        ( 'OverrideAudioAlertAction',  '', NULL, 'URL to an audio file to replace the default "action required" sound.', 'free' ),
9619
        ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.',           'free' )
9620
    });
9621
9615
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
9622
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
9616
    SetVersion($DBversion);
9623
    SetVersion($DBversion);
9617
}
9624
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (-1 / +5 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
3
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
3
4
Lines 65-71 Link Here
65
[% IF AudioAlerts %]
66
[% IF AudioAlerts %]
66
    <script type="text/javascript">
67
    <script type="text/javascript">
67
        //<![CDATA[
68
        //<![CDATA[
68
            var TMPL_SOUND_PATH = "[% interface %]/[% theme %]/sound/";
69
            var AUDIO_ALERT_PATH = "[% interface %]/[% theme %]/sound/";
70
            var AUDIO_ALERT_ACTION  = "[% Koha.Preference('OverrideAudioAlertAction')  || 'opening.ogg'  %]";
71
            var AUDIO_ALERT_WARNING = "[% Koha.Preference('OverrideAudioAlertWarning') || 'critical.ogg' %]";
72
            var AUDIO_ALERT_SUCCESS = "[% Koha.Preference('OverrideAudioAlertSuccess') || 'beep.ogg'     %]";
69
        //]]>
73
        //]]>
70
74
71
        $( document ).ready(function() {
75
        $( document ).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js (-4 / +7 lines)
Lines 122-139 function confirmDelete(message) { Link Here
122
}
122
}
123
123
124
function playSound( sound ) {
124
function playSound( sound ) {
125
    sound = TMPL_SOUND_PATH + sound;
125
    // This is way faster than substring
126
    if ( ! ( sound.charAt(4) == ':' && sound.charAt(5) == '/' && sound.charAt(6) == '/' ) ) {
127
        sound = AUDIO_ALERT_PATH + sound;
128
    }
126
    document.getElementById("audio-alert").innerHTML = "<embed src='" + sound + "' hidden='true' autostart='true' loop='false' />";
129
    document.getElementById("audio-alert").innerHTML = "<embed src='" + sound + "' hidden='true' autostart='true' loop='false' />";
127
}
130
}
128
131
129
function playSoundWarning() {
132
function playSoundWarning() {
130
    playSound( 'critical.ogg' );
133
    playSound( AUDIO_ALERT_WARNING );
131
}
134
}
132
135
133
function playSoundAction() {
136
function playSoundAction() {
134
    playSound( 'opening.ogg' );
137
    playSound( AUDIO_ALERT_ACTION );
135
}
138
}
136
139
137
function playSoundSuccess() {
140
function playSoundSuccess() {
138
    playSound( 'beep.ogg' );
141
    playSound( AUDIO_ALERT_SUCCESS );
139
}
142
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +15 lines)
Lines 702-704 Circulation: Link Here
702
                 yes: "Enable"
702
                 yes: "Enable"
703
                 no: "Don't enable"
703
                 no: "Don't enable"
704
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
704
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
705
- 
705
        -
706
            - Replace the default audio alert for <i>warning</i> alerts with the sound found at
707
            - pref: OverrideAudioAlertWarning
708
              class: url
709
            - (This should be a complete URL, starting with <code>http://</code>)
710
        -
711
            - Replace the default audio alert for <i>action</i> alerts with the sound found at
712
            - pref: OverrideAudioAlertAction
713
              class: url
714
            - (This should be a complete URL, starting with <code>http://</code>)
715
        -
716
            - Replace the default audio alert for <i>success</i> alerts with the sound found at
717
            - pref: OverrideAudioAlertSuccess
718
              class: url
719
            - (This should be a complete URL, starting with <code>http://</code>)

Return to bug 11431