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

(-)a/installer/data/mysql/updatedatabase.pl (-1 / +4 lines)
Lines 8568-8574 if ( CheckVersion($DBversion) ) { Link Here
8568
        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES
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' ),
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' ),
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' )
8571
        ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.',           'free' ),
8572
        ( 'AudioAlertSelectorWarning', '.audio-alert-warning', NULL, 'List of jQuery selectors that should trigger warning alert',  'free' ),
8573
        ( 'AudioAlertSelectorAction',  '.audio-alert-action',  NULL, 'List of jQuery selectors that should trigger action alert',   'free' ),
8574
        ( 'AudioAlertSelectorSuccess', '.audio-alert-success', NULL, 'List of jQuery selectors that should trigger successs alert', 'free' )
8572
    });
8575
    });
8573
8576
8574
    print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n";
8577
    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 641-643 Circulation: Link Here
641
            - pref: OverrideAudioAlertSuccess
641
            - pref: OverrideAudioAlertSuccess
642
              class: url
642
              class: url
643
            - (This should be a complete URL, starting with <code>http://</code>)
643
            - (This should be a complete URL, starting with <code>http://</code>)
644
- 
644
        -
645
            - Use the following selectors for <i>warning</i> alerts
646
            - pref: AudioAlertSelectorWarning
647
              class: url
648
            - (This should be a list of jQuery selectors, separated by commas)
649
        -
650
            - Use the following selectors for <i>action</i> alerts
651
            - pref: AudioAlertSelectorAction
652
              class: url
653
            - (This should be a list of jQuery selectors, separated by commas)
654
        -
655
            - Use the following selectors for <i>success</i> alerts
656
            - pref: AudioAlertSelectorSuccess
657
              class: url
658
            - (This should be a list of jQuery selectors, separated by commas)

Return to bug 11431