Bugzilla – Attachment 43763 Details for
Bug 11431
Custom notification sounds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11431 [QA Followup] - Move AudioAlerts to a separate plugin
Bug-11431-QA-Followup---Move-AudioAlerts-to-a-sepa.patch (text/plain), 3.45 KB, created by
Kyle M Hall (khall)
on 2015-10-22 12:45:12 UTC
(
hide
)
Description:
Bug 11431 [QA Followup] - Move AudioAlerts to a separate plugin
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-10-22 12:45:12 UTC
Size:
3.45 KB
patch
obsolete
>From 61e0a508b5ef286d4869f0ffaee44f847c54a6fc Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 17 Sep 2015 10:48:24 -0400 >Subject: [PATCH] Bug 11431 [QA Followup] - Move AudioAlerts to a separate plugin > >--- > Koha/Template/Plugin/AudioAlerts.pm | 36 ++++++++++++++++++++ > Koha/Template/Plugin/Koha.pm | 8 ---- > .../prog/en/includes/doc-head-close.inc | 3 +- > 3 files changed, 38 insertions(+), 9 deletions(-) > create mode 100644 Koha/Template/Plugin/AudioAlerts.pm > >diff --git a/Koha/Template/Plugin/AudioAlerts.pm b/Koha/Template/Plugin/AudioAlerts.pm >new file mode 100644 >index 0000000..a8877b6 >--- /dev/null >+++ b/Koha/Template/Plugin/AudioAlerts.pm >@@ -0,0 +1,36 @@ >+package Koha::Template::Plugin::AudioAlerts; >+ >+# Copyright ByWater Solutions 2013 >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Encode qw( encode ); >+use JSON; >+ >+use base qw( Template::Plugin ); >+ >+use C4::Context; >+use Koha; >+ >+sub AudioAlerts { >+ my $dbh = C4::Context->dbh; >+ my $audio_alerts = $dbh->selectall_arrayref( 'SELECT * FROM audio_alerts ORDER BY precedence', { Slice => {} } ); >+ return encode_json($audio_alerts); >+} >+ >+1; >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index be69c44..fc26316 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -18,8 +18,6 @@ package Koha::Template::Plugin::Koha; > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Encode qw( encode ); >-use JSON; > > use base qw( Template::Plugin ); > >@@ -59,10 +57,4 @@ sub Version { > }; > } > >-sub AudioAlerts { >- my $dbh = C4::Context->dbh; >- my $audio_alerts = $dbh->selectall_arrayref( 'SELECT * FROM audio_alerts ORDER BY precedence', { Slice => {} } ); >- return encode_json($audio_alerts); >-} >- > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index db708af..159035e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -1,4 +1,5 @@ > [% USE Koha %] >+[% USE AudioAlerts %] > [% USE String %] > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" /> >@@ -67,7 +68,7 @@ > <script type="text/javascript"> > //<![CDATA[ > var AUDIO_ALERT_PATH = '[% interface %]/[% theme %]/sound/'; >- var AUDIO_ALERTS = JSON.parse( '[% Koha.AudioAlerts | replace( "'", "\\'" ) %]' ); >+ var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) %]' ); > //]]> > > $( document ).ready(function() { >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11431
:
29030
|
29031
|
29032
|
29033
|
29034
|
29035
|
29036
|
29037
|
29038
|
29039
|
29119
|
29120
|
29404
|
29764
|
29765
|
29766
|
29767
|
29768
|
29769
|
31145
|
31146
|
31147
|
31148
|
31149
|
31150
|
34637
|
34638
|
34639
|
34640
|
34641
|
34642
|
34643
|
34644
|
34645
|
34646
|
34647
|
34648
|
34649
|
34650
|
34651
|
34652
|
34653
|
34717
|
34718
|
34719
|
34720
|
34864
|
34865
|
34866
|
34867
|
35843
|
35844
|
35845
|
35846
|
38547
|
38548
|
40726
|
40727
|
40728
|
40729
|
40730
|
40731
|
40732
|
41634
|
41661
|
41662
|
42678
|
42679
|
42680
|
42681
|
42682
|
42683
|
42684
|
42685
|
42686
|
42687
|
42688
|
42689
|
42696
|
43753
|
43754
|
43755
|
43756
|
43757
|
43758
|
43759
|
43760
|
43761
|
43762
|
43763
|
43764
|
43765
|
43817
|
43820
|
43821
|
43822
|
43823
|
43824
|
43825
|
43887
|
43888
|
43889
|
43890
|
43891
|
43892
|
43893
|
43894
|
43895
|
43896
|
43897
|
43898
|
43899
|
43900
|
43901
|
43902
|
43903
|
44391
|
44392
|
44393
|
44394
|
44395
|
44396
|
44397
|
44398
|
44399
|
44400
|
44401
|
44402
|
44404
|
44405
|
44407
|
44408
|
44409
|
44411
|
44412
|
44599
|
45135