Bugzilla – Attachment 34643 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 [7] - Add new table for audio alerts
Bug-11431-7---Add-new-table-for-audio-alerts.patch (text/plain), 15.38 KB, created by
Kyle M Hall (khall)
on 2014-12-22 18:51:03 UTC
(
hide
)
Description:
Bug 11431 [7] - Add new table for audio alerts
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-12-22 18:51:03 UTC
Size:
15.38 KB
patch
obsolete
>From 287476e8560d5c3d41968d2f49cc5f3972ee14b7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 22 Dec 2014 01:02:35 -0500 >Subject: [PATCH] Bug 11431 [7] - Add new table for audio alerts > >--- > Koha/Schema/Result/AudioAlert.pm | 81 ++++++++++++++++++++ > .../data/mysql/de-DE/optional/audio_alerts.sql | 4 + > .../data/mysql/de-DE/optional/audio_alerts.txt | 1 + > installer/data/mysql/en/optional/audio_alerts.sql | 4 + > installer/data/mysql/en/optional/audio_alerts.txt | 1 + > .../data/mysql/es-ES/optional/audio_alerts.sql | 4 + > .../data/mysql/es-ES/optional/audio_alerts.txt | 1 + > .../data/mysql/fr-FR/2-Optionel/audio_alerts.sql | 4 + > .../data/mysql/fr-FR/2-Optionel/audio_alerts.txt | 1 + > installer/data/mysql/kohastructure.sql | 14 ++++ > .../data/mysql/nb-NO/2-Valgfritt/audio_alerts.sql | 4 + > .../data/mysql/nb-NO/2-Valgfritt/audio_alerts.txt | 1 + > .../data/mysql/pl-PL/optional/audio_alerts.sql | 4 + > .../data/mysql/pl-PL/optional/audio_alerts.txt | 1 + > .../data/mysql/ru-RU/optional/audio_alerts.sql | 4 + > .../data/mysql/ru-RU/optional/audio_alerts.txt | 1 + > installer/data/mysql/sysprefs.sql | 7 -- > .../data/mysql/uk-UA/optional/audio_alerts.sql | 4 + > .../data/mysql/uk-UA/optional/audio_alerts.txt | 1 + > installer/data/mysql/updatedatabase.pl | 23 ++++-- > 20 files changed, 150 insertions(+), 15 deletions(-) > create mode 100644 Koha/Schema/Result/AudioAlert.pm > create mode 100644 installer/data/mysql/de-DE/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/de-DE/optional/audio_alerts.txt > create mode 100644 installer/data/mysql/en/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/en/optional/audio_alerts.txt > create mode 100644 installer/data/mysql/es-ES/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/es-ES/optional/audio_alerts.txt > create mode 100644 installer/data/mysql/fr-FR/2-Optionel/audio_alerts.sql > create mode 100644 installer/data/mysql/fr-FR/2-Optionel/audio_alerts.txt > create mode 100644 installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.sql > create mode 100644 installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.txt > create mode 100644 installer/data/mysql/pl-PL/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/pl-PL/optional/audio_alerts.txt > create mode 100644 installer/data/mysql/ru-RU/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/ru-RU/optional/audio_alerts.txt > create mode 100644 installer/data/mysql/uk-UA/optional/audio_alerts.sql > create mode 100644 installer/data/mysql/uk-UA/optional/audio_alerts.txt > >diff --git a/Koha/Schema/Result/AudioAlert.pm b/Koha/Schema/Result/AudioAlert.pm >new file mode 100644 >index 0000000..696040b >--- /dev/null >+++ b/Koha/Schema/Result/AudioAlert.pm >@@ -0,0 +1,81 @@ >+use utf8; >+package Koha::Schema::Result::AudioAlert; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AudioAlert >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<audio_alerts> >+ >+=cut >+ >+__PACKAGE__->table("audio_alerts"); >+ >+=head1 ACCESSORS >+ >+=head2 audio_alert_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 precedence >+ >+ data_type: 'smallint' >+ extra: {unsigned => 1} >+ is_nullable: 0 >+ >+=head2 selector >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 sound >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "audio_alert_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "precedence", >+ { data_type => "smallint", extra => { unsigned => 1 }, is_nullable => 0 }, >+ "selector", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "sound", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</audio_alert_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("audio_alert_id"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-22 01:04:21 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yIXpJMcpovBDl3bBVrwLqg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/installer/data/mysql/de-DE/optional/audio_alerts.sql b/installer/data/mysql/de-DE/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/de-DE/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/de-DE/optional/audio_alerts.txt b/installer/data/mysql/de-DE/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/de-DE/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/en/optional/audio_alerts.sql b/installer/data/mysql/en/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/en/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/en/optional/audio_alerts.txt b/installer/data/mysql/en/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/en/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/es-ES/optional/audio_alerts.sql b/installer/data/mysql/es-ES/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/es-ES/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/es-ES/optional/audio_alerts.txt b/installer/data/mysql/es-ES/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/es-ES/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.sql b/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.txt b/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/fr-FR/2-Optionel/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 4ffbbf2..c9dafe6 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3502,6 +3502,20 @@ CREATE TABLE items_search_fields ( > ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > >+-- >+-- Table structure for table 'audio_alerts' >+-- >+ >+DROP TABLE IF EXISTS audio_alerts; >+CREATE TABLE audio_alerts ( >+ audio_alert_id int(11) NOT NULL AUTO_INCREMENT, >+ precedence smallint(5) unsigned NOT NULL, >+ selector varchar(255) NOT NULL, >+ sound varchar(255) NOT NULL, >+ PRIMARY KEY (audio_alert_id), >+ KEY precedence (precedence) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.sql b/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.txt b/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/nb-NO/2-Valgfritt/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/pl-PL/optional/audio_alerts.sql b/installer/data/mysql/pl-PL/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/pl-PL/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/pl-PL/optional/audio_alerts.txt b/installer/data/mysql/pl-PL/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/pl-PL/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/ru-RU/optional/audio_alerts.sql b/installer/data/mysql/ru-RU/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/ru-RU/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/ru-RU/optional/audio_alerts.txt b/installer/data/mysql/ru-RU/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/ru-RU/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 5249728..2bb831a 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -42,10 +42,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'), > ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), > ('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), >-( 'AudioAlertsCustom', '', NULL, 'Custom audio alert triggers in json associative array format', 'free' ), >-( 'AudioAlertSelectorWarning', '.audio-alert-warning', NULL, 'List of jQuery selectors that should trigger warning alert', 'free' ), >-( 'AudioAlertSelectorAction', '.audio-alert-action', NULL, 'List of jQuery selectors that should trigger action alert', 'free' ), >-( 'AudioAlertSelectorSuccess', '.audio-alert-success', NULL, 'List of jQuery selectors that should trigger successs alert', 'free' ), > ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), > ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), > ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), >@@ -331,9 +327,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OverdueNoticeBcc','','','Email address to bcc outgoing overdue notices sent by email','free'), > ('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'), > ('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'), >-( 'OverrideAudioAlertWarning', '', NULL, 'URL to an audio file to replace the default warning sound.', 'free' ), >-( 'OverrideAudioAlertAction', '', NULL, 'URL to an audio file to replace the default "action required" sound.', 'free' ), >-( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.', 'free' ), > ('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'), > ('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'), > ('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'), >diff --git a/installer/data/mysql/uk-UA/optional/audio_alerts.sql b/installer/data/mysql/uk-UA/optional/audio_alerts.sql >new file mode 100644 >index 0000000..0c413a5 >--- /dev/null >+++ b/installer/data/mysql/uk-UA/optional/audio_alerts.sql >@@ -0,0 +1,4 @@ >+INSERT INTO audio_alerts VALUES >+(1, 1, '.audio-alert-action', 'opening.ogg'), >+(2, 2, '.audio-alert-warning', 'critical.ogg'), >+(3, 3, '.audio-alert-success', 'beep.ogg'); >diff --git a/installer/data/mysql/uk-UA/optional/audio_alerts.txt b/installer/data/mysql/uk-UA/optional/audio_alerts.txt >new file mode 100644 >index 0000000..da9fdfd >--- /dev/null >+++ b/installer/data/mysql/uk-UA/optional/audio_alerts.txt >@@ -0,0 +1 @@ >+Audio alerts >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6b6a3c1..690c796 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9613,14 +9613,21 @@ if ( CheckVersion($DBversion) ) { > $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'}); > > $dbh->do(q{ >- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES >- ( 'AudioAlertsCustom', '', NULL, 'Custom audio alert triggers in json associative array format', 'free' ), >- ( 'OverrideAudioAlertWarning', '', NULL, 'URL to an audio file to replace the default warning sound.', 'free' ), >- ( 'OverrideAudioAlertAction', '', NULL, 'URL to an audio file to replace the default "action required" sound.', 'free' ), >- ( 'OverrideAudioAlertSuccess', '', NULL, 'URL to an audio file to replace the default success sound.', 'free' ), >- ( 'AudioAlertSelectorWarning', '.audio-alert-warning', NULL, 'List of jQuery selectors that should trigger warning alert', 'free' ), >- ( 'AudioAlertSelectorAction', '.audio-alert-action', NULL, 'List of jQuery selectors that should trigger action alert', 'free' ), >- ( 'AudioAlertSelectorSuccess', '.audio-alert-success', NULL, 'List of jQuery selectors that should trigger successs alert', 'free' ) >+ CREATE TABLE audio_alerts ( >+ audio_alert_id int(11) NOT NULL AUTO_INCREMENT, >+ precedence smallint(5) unsigned NOT NULL, >+ selector varchar(255) NOT NULL, >+ sound varchar(255) NOT NULL, >+ PRIMARY KEY (audio_alert_id), >+ KEY precedence (precedence) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ }); >+ >+ $dbh->do(q{ >+ INSERT INTO audio_alerts VALUES >+ (1, 1, '.audio-alert-action', 'opening.ogg'), >+ (2, 2, '.audio-alert-warning', 'critical.ogg'), >+ (3, 3, '.audio-alert-success', 'beep.ogg'); > }); > > print "Upgrade to $DBversion done (Bug 11431 - Add additional sound options for warnings)\n"; >-- >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