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

(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8574-8579 $DBversion = "3.17.00.XXX"; Link Here
8574
if ( CheckVersion($DBversion) ) {
8574
if ( CheckVersion($DBversion) ) {
8575
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
8575
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
8576
8576
8577
    $dbh->do(q{
8578
        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES
8579
        ( 'OverrideAudioAlertWarning', '', NULL, 'URL to an audio file to replace the default warning sound.',           'free' ),
8580
        ( 'OverrideAudioAlertAction',  '', NULL, 'URL to an audio file to replace the default "action required" sound.', 'free' ),
8581
        ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.',           'free' )
8582
    });
8583
8577
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
8584
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
8578
    SetVersion($DBversion);
8585
    SetVersion($DBversion);
8579
}
8586
}
(-)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 119-136 function confirmDelete(message) { Link Here
119
}
119
}
120
120
121
function playSound( sound ) {
121
function playSound( sound ) {
122
    sound = TMPL_SOUND_PATH + sound;
122
    // This is way faster than substring
123
    if ( ! ( sound.charAt(4) == ':' && sound.charAt(5) == '/' && sound.charAt(6) == '/' ) ) {
124
        sound = AUDIO_ALERT_PATH + sound;
125
    }
123
    document.getElementById("audio-alert").innerHTML = "<embed src='" + sound + "' hidden='true' autostart='true' loop='false' />";
126
    document.getElementById("audio-alert").innerHTML = "<embed src='" + sound + "' hidden='true' autostart='true' loop='false' />";
124
}
127
}
125
128
126
function playSoundWarning() {
129
function playSoundWarning() {
127
    playSound( 'critical.ogg' );
130
    playSound( AUDIO_ALERT_WARNING );
128
}
131
}
129
132
130
function playSoundAction() {
133
function playSoundAction() {
131
    playSound( 'opening.ogg' );
134
    playSound( AUDIO_ALERT_ACTION );
132
}
135
}
133
136
134
function playSoundSuccess() {
137
function playSoundSuccess() {
135
    playSound( 'beep.ogg' );
138
    playSound( AUDIO_ALERT_SUCCESS );
136
}
139
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +15 lines)
Lines 620-622 Circulation: Link Here
620
                 yes: "Enable"
620
                 yes: "Enable"
621
                 no: "Don't enable"
621
                 no: "Don't enable"
622
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
622
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
623
- 
623
        -
624
            - Replace the default audio alert for <i>warning</i> alerts with the sound found at
625
            - pref: OverrideAudioAlertWarning
626
              class: url
627
            - (This should be a complete URL, starting with <code>http://</code>)
628
        -
629
            - Replace the default audio alert for <i>action</i> alerts with the sound found at
630
            - pref: OverrideAudioAlertAction
631
              class: url
632
            - (This should be a complete URL, starting with <code>http://</code>)
633
        -
634
            - Replace the default audio alert for <i>success</i> alerts with the sound found at
635
            - pref: OverrideAudioAlertSuccess
636
              class: url
637
            - (This should be a complete URL, starting with <code>http://</code>)

Return to bug 11431