[Koha-patches] [PATCH] Implement changes to audio feedback proposed on patches at koha.org list.

Michael Hafen mdhafen at washk12.org
Sat May 31 01:19:16 CEST 2008


Changed >embed< to >object<
Moved object tag to an included file
using wav files for media instead of swf
---
 circ/circulation.pl                                |   50 ++++++++++---------
 .../prog/en/modules/circ/circulation.tmpl          |    3 +-
 .../prog/en/modules/circ/returns.tmpl              |   11 +----
 .../prog/en/modules/members/moremember.tmpl        |    2 +-
 koha-tmpl/intranet-tmpl/prog/img/error.swf         |  Bin 3191 -> 0 bytes
 koha-tmpl/intranet-tmpl/prog/img/ok.swf            |  Bin 1101 -> 0 bytes
 6 files changed, 30 insertions(+), 36 deletions(-)
 delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/error.swf
 delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/ok.swf

diff --git a/circ/circulation.pl b/circ/circulation.pl
index 8e5f9fc..a15bf52 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -39,6 +39,7 @@ use CGI::Session;
 
 use Date::Calc qw(
   Today
+  Today_and_Now
   Add_Delta_YM
   Add_Delta_Days
   Date_to_Days
@@ -102,7 +103,7 @@ for (@failedrenews) { $renew_failed[$_] = 1; }
 
 my $sessionID = $query->cookie("CGISESSID") ;
 my $session = get_session($sessionID);
-my $sounderror;
+my ( $sounderror, $soundok );
 my @soundederrors = @{ $session->param( 'soundederrors' ) } if ( $session->param( 'soundederrors' ) );
 my %soundederrors;
 for ( @soundederrors ) { $soundederrors{ $_ } = 1; }
@@ -136,7 +137,7 @@ my $issueconfirmed = $query->param('issueconfirmed');
 my $cancelreserve  = $query->param('cancelreserve');
 my $organisation   = $query->param('organisations');
 my $print          = $query->param('print');
-my $newexpiry      = $query->param('dateexpiry');
+my $newexpiry = $query->param('dateexpiry');
 
 #set up cookie.....
 # my $branchcookie;
@@ -149,15 +150,17 @@ my $newexpiry      = $query->param('dateexpiry');
 
 my ($datedue,$invalidduedate);
 if ($duedatespec) {
-	if ($duedatespec =~ C4::Dates->regexp('syspref')) {
-		$datedue = C4::Dates->new($duedatespec);
-	} else {
-		$invalidduedate = 1;
-		$template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
-	}
+  $datedue =  C4::Dates->new($duedatespec);
+  $invalidduedate=1 unless $datedue;
 }
 
-my $todaysdate = C4::Dates->new->output('iso');
+#if (defined($year)) {
+#        $duedatespec = "$year-$month-$day";
+#} else {
+#        ($year, $month, $day) = ($duedatespec) ? split /-/, $duedatespec : (0,0,0);
+#}
+
+my $todaysdate     = sprintf("%-04.4d%-02.2d%-02.2d", Today());
 
 # check and see if we should print
 if ( $barcode eq '' && $print eq 'maybe' ) {
@@ -277,7 +280,7 @@ if ($barcode) {
   # always check for blockers on issuing
   my ( $error, $question ) =
     CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
-  my $noerror = $invalidduedate ? 0 : 1;
+  my $noerror    = 1;
   foreach my $impossible ( keys %$error ) {
             $template->param(
                 $impossible => $$error{$impossible},
@@ -291,10 +294,11 @@ if ($barcode) {
     # we have no blockers for issuing and any issues needing confirmation have been resolved
         AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
         $inprocess = 1;
+	$soundok = 1;
     }
-  elsif ($issueconfirmed){	# FIXME: Do something? Or is this to *intentionally* do nothing?
+  elsif ($issueconfirmed){
   }
-  else {
+    else {
         my $noquestion = 1;
 #         Get the item title for more information
     	my $getmessageiteminfo  = GetBiblioFromItemNumber(undef,$barcode);
@@ -309,20 +313,17 @@ if ($barcode) {
         	    $noquestion = 0;
 		    $sounderror = 1;
         	}
-			# Because of the weird conditional structure (empty elsif block),
-			# if we reached here, $issueconfirmed must be false.
-			# Also, since we moved inside the if ($noerror) conditional,
-			# this old chunky conditional can be simplified:
-   		    # if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
-			if ($noquestion) {
-				AddIssue( $borrower, $barcode, $datedue );
-				$inprocess = 1;
-			}
-   	    }
+        }
+		# only pass needsconfirmation to template if issuing is possible 
 		$template->param(
 			 itemhomebranch => $getmessageiteminfo->{'homebranch'} ,	             
 			 duedatespec => $duedatespec,
         );
+        if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
+            AddIssue( $borrower, $barcode, $datedue );
+            $inprocess = 1;
+	    $soundok = 1;
+        }
     }
     
 # FIXME If the issue is confirmed, we launch another time borrdata2, now display the issue count after issue 
@@ -518,7 +519,7 @@ FROM issuingrules
   WHERE categorycode=?
 " );
 #my @issued_itemtypes_count;  # huh?
-$issueqty_sth->execute("*");	# FIXME: Why have a WHERE clause at all with a hardcoded "*"?
+$issueqty_sth->execute("*");
 
 while ( my $data = $issueqty_sth->fetchrow_hashref() ) {
 
@@ -576,7 +577,7 @@ my $flag;
 
 foreach $flag ( sort keys %$flags ) {
     $template->param( flagged=> 1);
-    $flags->{$flag}->{'message'} =~ s#\n#<br />#g;
+    $flags->{$flag}->{'message'} =~ s/\n/<br>/g;
     if ( $flags->{$flag}->{'noissues'} ) {
         $template->param(
             flagged  => 1,
@@ -753,6 +754,7 @@ $template->param( picture => 1 ) if $picture;
 $session->param('soundederrors', [ keys %soundederrors ] );
 $template->param(
     sounderror => $sounderror,
+    soundok => $soundok,
     );
 
 $template->param(
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index 92f1e2e..8090b0b 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -60,8 +60,7 @@ $.tablesorter.addParser({
 <!-- /TMPL_IF -->
 
 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
-<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="inprocess" --><!-- Sound on successful issueing --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="sound.inc" -->
 
 <!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
 <!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
index e692e7f..34f7b1d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
@@ -248,7 +248,7 @@ function Dopop(link) {
                         <p class="problem">Item was lost, now found.</p>
                     <!-- /TMPL_IF -->
                     <!-- TMPL_IF Name="withdrawn" -->
-                        <p class="problem">Item is withdrawn.</p>
+                        <p class="problem">Item Cancelled</p>
                     <!-- /TMPL_IF -->
             <!-- /TMPL_LOOP -->
         <!-- /TMPL_IF -->
@@ -268,13 +268,7 @@ function Dopop(link) {
             <fieldset>
 	<legend>Check In</legend>
             <label for="barcode">Enter item barcode: </label>
-			<!-- TMPL_IF NAME="exemptfine" -->
-			<input name="barcode" id="barcode" size="14" class="focus alert"/>
-			<!-- TMPL_ELSIF NAME="dropboxmode"-->
-			<input name="barcode" id="barcode" size="14" class="focus alert"/>
-			<!-- TMPL_ELSE -->
 			<input name="barcode" id="barcode" size="14" class="focus"/>
-			<!-- /TMPL_IF -->
             <input type="submit" class="submit" value="Submit" />
             <!-- TMPL_LOOP Name="inputloop" -->
                 <input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
@@ -311,8 +305,7 @@ function Dopop(link) {
         </form>
 </div>
 
-<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="soundok" --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="sound.inc" -->
 <!-- TMPL_IF Name="returned" -->
 <div class="yui-g">    <table>
         <tr><th>Item Information</th><th>Patron Information</th></tr>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
index de65b80..a4a3d31 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -81,7 +81,7 @@ if (nodename =="barcodes[]"){
 	<div id="yui-main">
 	<div class="yui-b">
 <!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
-<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- <!-- TMPL_VAR NAME="sounderror" --> --><!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="sound.inc" -->
 <!-- TMPL_IF NAME="error" -->
 <div class="dialog alert">
 <!-- TMPL_IF NAME="AUTH_UPDATE_FAILED" -->
diff --git a/koha-tmpl/intranet-tmpl/prog/img/error.swf b/koha-tmpl/intranet-tmpl/prog/img/error.swf
deleted file mode 100644
index 2126177338fdf7d47cdf4c4478b41c159789df4c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 3191
zcmdVddpOkD9|!R7%&<x>p%A7<m<lOlU1OLut=oihALTM;5JH9-)gp at IlDi$Z<kp7e
z7s(||VJPDgAsU<9SId^hrE&ZI?Ci78 at 5$4%zxMaEfBeor=lP!V&v|{`=bZ2Nd(!p{
zFGT<V{D2)b0PrYGUJL>lHeDo94WS?i(qTrMbCLk^u`ICJ!13cPn;pyuVgLYU7#vnj
zMOzbb(3MDbIb{9+*tnp5_2T~Ya1SVec${m1*vZcegM^K&eV5BO7P6a69~{jKT~9U#
zXCJi59vlH_N%LXYrezSkZJ<3K8=MvowQ$)i)Kk*6+AG6mZM7=idV<@9H%Ho@*Cr8!
z&X^@Dw7XJ|!h{S}L^nr4Z~_x16nsB7hxbkHQMab6cOu{#GGQ!9|E?|dEdHMw7o at a?
zeh#B0K#W6s8Ix974T2>fn~I6bs63>zl4X at kA@Cp(76<V<fZ?aEilh7}kqNf`E1iiL
zro^_I_BT;6qv?^(`5c4+lenMke=F~xo at gtfnj>L099@*Cs}tQ^pp{Jyole0!#3iUm
zOPIsm)iF45HXkN7>3XNO`E+f|E4N=y2PlD{ZaxX;sa)qx?Hh`-ba;D4v7`7l2zHnD
zaq<rki!zF4XHeEkARZ5P-zT8mC%069yP>!s<sHoJlo&f`0)XJh&)&54s!UZKdHn+D
z<>3u?o43zjlz!hndo8Md<!4fP5rJ9MKeo;wlyNl27P8eJ)w??C>{8Nou}OJYzxYyy
zR4 at -72zMUbe*N`aF`jaaXs-UjVcQsxU<Z5r-tJCsuqyN3mD(O3a(BziMJHr#yo?GQ
zFwhFI(P>TK+esi~O;<5XC?-1SUw at 4GShrj`8w|_~L~5ZS^L((1Yk)#Hb?IEIFmc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K5ss|$}P!?M-Zw_%g6?b0cBMz7J!aC1msBl8?{A>lNC
z#u|01{vt|y02S>^FN`v)pX9I<DpGTP*^nReSqU-7%@whNIQk()&t6nXj&G_@{R;7H
zin$<}6XI2k9t;}+H`r!Gtc at b`UPR)cxjDE$l4IQ9VBc%aTT&B|>@qNO+;KFd*Kn=l
zT?Ls?OIe#asQD27nmC1ZkDK`rbR at 9eOTm5{=v8eycp<(OUs;JMpxG2>OFf*poYzjr
zRjH+X6s>{DP+Zy%SxQAJ9xeDfhEIayg7%;?qWAuQh4TP%tk7j}qY`NNPQQ<Y$mMy{
zSUy#`4t52LNV{VKQKG6F6UQTmL<Azu+D<;h#jfqYuxwaiA?H$_El%OnjU7i*>3lI$
zxXv8@`tC%|eQh~bzty{Pyc&{p)x%qWH4 at eQ6)&_;Ab&n^L6W^iP3J854gh?HJAeOZ
z0T;JB2eLR}!?O7GU at AqgtN?dc5KcO&rz^S=(=K^yUYj(1Wd6xa4z^=Mqi$(_u+-UR
z;ptMNNxs&4CYzmheD5;l*m8p at E6ws7+ltk=tNPu-)#y3m at R4Bae;|}UE!_SOP?Abv
zqXkX^_!lgkRrL_u;I-7FkG)5O%WL$t!YOC%f<R at DWJn!#$(dfvj`2DSZ6uM#yBZE_
zDmg8n-(=k>CG(};kKm|^O;`WchFbjrzU-E@<0fWe@~7dTayG@*Yk8zB=6PAh%I<&K
z^T!$5LqKkVuo8fCOdji}O^^Z{w5Z{6`q0!t6A7K$Q>mEc)FYjl7vI^c<m~P;m^Ty&
z<+C`c2x-WOeHwp at ICI&t>jlnw=~CitB56Q<L`jfjgZ+L{w5n`*2yrTVdU|d+>jw7l
d$ckRTipSr0>wi-EFMMFYBmo`>u=(!*{2LlRk<0)9

diff --git a/koha-tmpl/intranet-tmpl/prog/img/ok.swf b/koha-tmpl/intranet-tmpl/prog/img/ok.swf
deleted file mode 100644
index 68624749c0d38db905eb8d190b761fffb2583126..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1101
zcmZ<@4`%gcVPGg=;NHQ&u)9G;n32KxP*GZiGt>Y7|MxS?0p%nZ)Eu}OfZ+dQrz1d$
z*@Mx6fx*Yo*VS0h(p*6!DYYa~Gju2du!nS5$|_i!Rxoe~*c^~MRKx#sqs9E6oiRHC
z{-0|3$**$q{C{Omrkc|J6yg6LPe`-K)b`9QNZtSc!&jaoi+CSvu&FUDaFk<ckpKVv
zADcCIV*>+2(&7!0oO<ls-i=o;E2Jtvuvo=#(!tPTikU)0Jup;%NJwy)I394wo$*CV
zB7t#%_y)rr^A8<AJVCf2`Z!Sj|BubbE9M+CDB$>ze$2=H at q#k0fPSUqo(+Bi&O$%~
zl%5 at VC}L`kEdn4Ol8)QJ-?)N-DNKTaNq)gk{!3BvGiFN8uAebOYNq7>r;mjmmMro8
z|FdGI8t0^mb`Jah%O^KDE&Aa1u%r2(bOH;*tLrIK|1+^T7-_QbyjsPql<9Ei?Ewqx
z4j!pkW=$4`V=V?UN(_oWBtmTbxn9&A(6MH=lyDH>lMg(n)}3;)@5#xPlmF=7NNC7k
zWFWXB_2Fr0C8559g<Kw)-7QXG;Xn`0l9rU$n=xy8Pj8Qpzlu_Z_y7L~Tn>4m`Dhgo
zfIY;Y%(O?o!Gei_amRh2ZWy@#X14a8|Nqxd*SgT+s`EYU->>&x_4m{NJiGrtu1#d&
znm(0(@3u!|ZJlNFRQ0yVDlDdhY at jm$dq_NZ+Kl=G0?Z7#+ivG>f3c`h=*0H&D$UBZ
zGqbhhx;D-1Nq97CZEED^S8Eif+U}gt)i)*ft4s9n#l9x8lAE3-y!xaRc0bJS)asJG
wVb2%a#a=tI@{6a}ru|Bj*+0fPXFDz0TeIa>suq1be3V&&frXI)SRyb0054nnZU6uP

-- 
1.5.4.3




More information about the Koha-patches mailing list