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

(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8564-8569 $DBversion = "3.17.00.XXX"; Link Here
8564
if ( CheckVersion($DBversion) ) {
8564
if ( CheckVersion($DBversion) ) {
8565
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
8565
    $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'});
8566
8566
8567
    $dbh->do(q{
8568
        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES
8569
        ( 'OverrideAudioAlertWarning', '', NULL, 'URL to an audio file to replace the default warning sound.',           'free' ),
8570
        ( 'OverrideAudioAlertAction',  '', NULL, 'URL to an audio file to replace the default "action required" sound.', 'free' ),
8571
        ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.',           'free' )
8572
    });
8573
8567
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
8574
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
8568
    SetVersion($DBversion);
8575
    SetVersion($DBversion);
8569
}
8576
}
(-)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 626-628 Circulation: Link Here
626
                 yes: "Enable"
626
                 yes: "Enable"
627
                 no: "Don't enable"
627
                 no: "Don't enable"
628
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
628
            - circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.
629
- 
629
        -
630
            - Replace the default audio alert for <i>warning</i> alerts with the sound found at
631
            - pref: OverrideAudioAlertWarning
632
              class: url
633
            - (This should be a complete URL, starting with <code>http://</code>)
634
        -
635
            - Replace the default audio alert for <i>action</i> alerts with the sound found at
636
            - pref: OverrideAudioAlertAction
637
              class: url
638
            - (This should be a complete URL, starting with <code>http://</code>)
639
        -
640
            - Replace the default audio alert for <i>success</i> alerts with the sound found at
641
            - pref: OverrideAudioAlertSuccess
642
              class: url
643
            - (This should be a complete URL, starting with <code>http://</code>)

Return to bug 11431