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

(-)a/installer/data/mysql/updatedatabase.pl (-1 / +4 lines)
Lines 9616-9622 if ( CheckVersion($DBversion) ) { Link Here
9616
        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES
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' ),
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' ),
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' )
9619
        ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.',           'free' ),
9620
        ( 'AudioAlertSelectorWarning', '.audio-alert-warning', NULL, 'List of jQuery selectors that should trigger warning alert',  'free' ),
9621
        ( 'AudioAlertSelectorAction',  '.audio-alert-action',  NULL, 'List of jQuery selectors that should trigger action alert',   'free' ),
9622
        ( 'AudioAlertSelectorSuccess', '.audio-alert-success', NULL, 'List of jQuery selectors that should trigger successs alert', 'free' )
9620
    });
9623
    });
9621
9624
9622
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
9625
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (-7 / +10 lines)
Lines 66-85 Link Here
66
[% IF AudioAlerts %]
66
[% IF AudioAlerts %]
67
    <script type="text/javascript">
67
    <script type="text/javascript">
68
        //<![CDATA[
68
        //<![CDATA[
69
            var AUDIO_ALERT_PATH = "[% interface %]/[% theme %]/sound/";
69
            var AUDIO_ALERT_PATH = '[% interface %]/[% theme %]/sound/';
70
            var AUDIO_ALERT_ACTION  = "[% Koha.Preference('OverrideAudioAlertAction')  || 'opening.ogg'  %]";
70
            var AUDIO_ALERT_ACTION  = '[% Koha.Preference("OverrideAudioAlertAction")  || "opening.ogg"  %]';
71
            var AUDIO_ALERT_WARNING = "[% Koha.Preference('OverrideAudioAlertWarning') || 'critical.ogg' %]";
71
            var AUDIO_ALERT_WARNING = '[% Koha.Preference("OverrideAudioAlertWarning") || "critical.ogg" %]';
72
            var AUDIO_ALERT_SUCCESS = "[% Koha.Preference('OverrideAudioAlertSuccess') || 'beep.ogg'     %]";
72
            var AUDIO_ALERT_SUCCESS = '[% Koha.Preference("OverrideAudioAlertSuccess") || "beep.ogg"     %]';
73
            var AUDIO_ALERT_SELECTOR_ACTION  = '[% Koha.Preference("AudioAlertSelectorAction")  | replace( "'", "\\'" ) %]';
74
            var AUDIO_ALERT_SELECTOR_WARNING = '[% Koha.Preference("AudioAlertSelectorWarning") | replace( "'", "\\'" ) %]';
75
            var AUDIO_ALERT_SELECTOR_SUCCESS = '[% Koha.Preference("AudioAlertSelectorSuccess") | replace( "'", "\\'" ) %]';
73
        //]]>
76
        //]]>
74
77
75
        $( document ).ready(function() {
78
        $( document ).ready(function() {
76
            if ( $(".audio-alert-action").length ) {
79
            if ( $( AUDIO_ALERT_SELECTOR_ACTION ).length ) {
77
                playSoundAction();
80
                playSoundAction();
78
            }
81
            }
79
            else if ( $(".audio-alert-warning").length ) {
82
            else if ( $( AUDIO_ALERT_SELECTOR_WARNING ).length ) {
80
                playSoundWarning();
83
                playSoundWarning();
81
            }
84
            }
82
            else if ( $(".audio-alert-success").length ) {
85
            else if ( $( AUDIO_ALERT_SELECTOR_SUCCESS ).length ) {
83
                playSoundSuccess();
86
                playSoundSuccess();
84
            }
87
            }
85
        });
88
        });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +15 lines)
Lines 717-719 Circulation: Link Here
717
            - pref: OverrideAudioAlertSuccess
717
            - pref: OverrideAudioAlertSuccess
718
              class: url
718
              class: url
719
            - (This should be a complete URL, starting with <code>http://</code>)
719
            - (This should be a complete URL, starting with <code>http://</code>)
720
- 
720
        -
721
            - Use the following selectors for <i>warning</i> alerts
722
            - pref: AudioAlertSelectorWarning
723
              class: url
724
            - (This should be a list of jQuery selectors, separated by commas)
725
        -
726
            - Use the following selectors for <i>action</i> alerts
727
            - pref: AudioAlertSelectorAction
728
              class: url
729
            - (This should be a list of jQuery selectors, separated by commas)
730
        -
731
            - Use the following selectors for <i>success</i> alerts
732
            - pref: AudioAlertSelectorSuccess
733
              class: url
734
            - (This should be a list of jQuery selectors, separated by commas)

Return to bug 11431