Bugzilla 1080 to add enhancement for sound. Only changed circulation.tmpl/pl and...
authorroot <root@newkoha32.local>
Wed, 17 Feb 2010 18:24:46 +0000 (13:24 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 18 Feb 2010 13:12:25 +0000 (08:12 -0500)
Works for HTML5 because it loads smoothly and no plugins required but *at
  this time* this update will only work with staff clients which are Firefox
  version >=3.5 (std for Koha) but other browsers will soon be adding support.

  Additional sounds are included for people to modify and play with, but this
  is such a simple upgrade I doubt at this time Koha needs another complex
  selector so users can add their own sounds. It could be a nice enhancement
  later, of course.

  Suggest we stick with HTML5 <audio tag because it is a standard and no
  plug-ins.

  This simple update has been running live for SMFPL.org for almost 2 weeks

  -Darrell Ulm

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
23 files changed:
circ/circulation.pl
circ/returns.pl
installer/data/mysql/en/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
koha-tmpl/intranet-tmpl/prog/sound/IM_notification.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/beep.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/call.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/critical.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/device_connect.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/device_disconnect.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/ending.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/fail.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/incoming_call.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/loading.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/loading_2.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/maximize.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/minimize.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/new_mail_notification.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/opening.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/panic.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/popup.ogg [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/sound/warning.ogg [new file with mode: 0644]

index 4cd0ff7..2b3235e 100755 (executable)
@@ -686,6 +686,7 @@ $template->param(
     CGIorganisations  => $CGIorganisations,
     is_child          => ($borrower->{'category_type'} eq 'C'),
     circview => 1,
+    soundon           => C4::Context->preference("SoundOn"),
 );
 
 # save stickyduedate to session
index da2b574..adec8f6 100755 (executable)
@@ -547,6 +547,7 @@ $template->param(
     dropboxmode    => $dropboxmode,
     dropboxdate    => $dropboxdate->output(),
     overduecharges => $overduecharges,
+    soundon        => C4::Context->preference("SoundOn"),
 );
 
 my $itemnumber = GetItemnumberFromBarcode( $query->param('barcode') );
index 3647715..4494027 100644 (file)
@@ -282,3 +282,5 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES
 INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('AutoSelfCheckAllowed', '0', 'For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.', '', 'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','','free');
+
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('soundon','0','Enable to turn on HTML5 circulation sounds Firefox >=3.5 only','','YesNo');
index 7bbdffa..fe0fa08 100644 (file)
@@ -281,6 +281,11 @@ function refocus(calendar) {
 <!-- /TMPL_IF --> <!-- NEEDSCONFIRMATION -->
 
         <!-- TMPL_IF NAME="IMPOSSIBLE" -->
+
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->        
+
 <div class="yui-g">
 <div id="circ_impossible" class="dialog alert">
 <!-- RESULT OF ISSUING REQUEST -->
@@ -339,6 +344,10 @@ function refocus(calendar) {
     <!-- /TMPL_IF -->
 
 </div></div>
+<!-- TMPL_ELSE -->
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/beep.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->
     <!--/TMPL_IF --> <!-- /impossible -->
 
 <!-- TMPL_IF NAME="issued" -->
index 631052e..1fe161c 100644 (file)
@@ -92,6 +92,11 @@ function Dopop(link) {
 <!-- case of a reservation found, and display info -->
     <!-- TMPL_IF Name="waiting" -->
        <!-- waiting -->
+
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/ending.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->      
+       
 <div class="dialog message">
         <h3>Hold Found (item is already waiting):  <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="title" escape="html" --></a></h3>
         <!-- TMPL_IF NAME="reservenotes" --><h4>Notes: <!-- TMPL_VAR Name="reservenotes" --></h4><!-- /TMPL_IF -->
@@ -217,6 +222,11 @@ function Dopop(link) {
     <!-- case of simple return no issue or transfer but with a reservation  -->
     <!-- TMPL_IF Name="reserved" -->
        <!--  reserved  -->
+       
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->
+       
        <div class="dialog message">
          <h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="title" escape="html" --></a></h3>
         <!-- TMPL_IF NAME="reservenotes" --><h4>Notes: <!-- TMPL_VAR Name="reservenotes" --></h4><!-- /TMPL_IF -->
@@ -281,6 +291,13 @@ function Dopop(link) {
                         <p class="problem">Item is withdrawn.</p>
                     <!-- /TMPL_IF -->
             <!-- /TMPL_LOOP -->
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->
+        <!-- TMPL_ELSE -->
+<!-- TMPL_IF NAME="soundon" -->
+<audio src="/intranet-tmpl/prog/sound/beep.ogg" autoplay autobuffer></audio>
+<!-- /TMPL_IF -->
         <!-- /TMPL_IF -->
     </div>
 <!-- /TMPL_IF -->
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/IM_notification.ogg b/koha-tmpl/intranet-tmpl/prog/sound/IM_notification.ogg
new file mode 100644 (file)
index 0000000..66c1901
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/IM_notification.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/beep.ogg b/koha-tmpl/intranet-tmpl/prog/sound/beep.ogg
new file mode 100644 (file)
index 0000000..67deda8
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/beep.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/call.ogg b/koha-tmpl/intranet-tmpl/prog/sound/call.ogg
new file mode 100644 (file)
index 0000000..8e02cd6
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/call.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/critical.ogg b/koha-tmpl/intranet-tmpl/prog/sound/critical.ogg
new file mode 100644 (file)
index 0000000..1af3f56
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/critical.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/device_connect.ogg b/koha-tmpl/intranet-tmpl/prog/sound/device_connect.ogg
new file mode 100644 (file)
index 0000000..0fe7498
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/device_connect.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/device_disconnect.ogg b/koha-tmpl/intranet-tmpl/prog/sound/device_disconnect.ogg
new file mode 100644 (file)
index 0000000..09a4b8f
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/device_disconnect.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/ending.ogg b/koha-tmpl/intranet-tmpl/prog/sound/ending.ogg
new file mode 100644 (file)
index 0000000..7ee5691
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/ending.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/fail.ogg b/koha-tmpl/intranet-tmpl/prog/sound/fail.ogg
new file mode 100644 (file)
index 0000000..0e361f3
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/fail.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/incoming_call.ogg b/koha-tmpl/intranet-tmpl/prog/sound/incoming_call.ogg
new file mode 100644 (file)
index 0000000..01aa56b
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/incoming_call.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/loading.ogg b/koha-tmpl/intranet-tmpl/prog/sound/loading.ogg
new file mode 100644 (file)
index 0000000..b8230bb
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/loading.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/loading_2.ogg b/koha-tmpl/intranet-tmpl/prog/sound/loading_2.ogg
new file mode 100644 (file)
index 0000000..7cc8c5e
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/loading_2.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/maximize.ogg b/koha-tmpl/intranet-tmpl/prog/sound/maximize.ogg
new file mode 100644 (file)
index 0000000..39fad25
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/maximize.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/minimize.ogg b/koha-tmpl/intranet-tmpl/prog/sound/minimize.ogg
new file mode 100644 (file)
index 0000000..1ebc2d4
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/minimize.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/new_mail_notification.ogg b/koha-tmpl/intranet-tmpl/prog/sound/new_mail_notification.ogg
new file mode 100644 (file)
index 0000000..ad11bcf
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/new_mail_notification.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/opening.ogg b/koha-tmpl/intranet-tmpl/prog/sound/opening.ogg
new file mode 100644 (file)
index 0000000..783e2da
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/opening.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/panic.ogg b/koha-tmpl/intranet-tmpl/prog/sound/panic.ogg
new file mode 100644 (file)
index 0000000..1801b72
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/panic.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/popup.ogg b/koha-tmpl/intranet-tmpl/prog/sound/popup.ogg
new file mode 100644 (file)
index 0000000..b481501
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/popup.ogg differ
diff --git a/koha-tmpl/intranet-tmpl/prog/sound/warning.ogg b/koha-tmpl/intranet-tmpl/prog/sound/warning.ogg
new file mode 100644 (file)
index 0000000..1ea74d4
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/sound/warning.ogg differ