[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha circ/circulation.pl koha-tmpl/intranet-tmp... [rel_2_2]
From: |
Ryan Higgins |
Subject: |
[Koha-cvs] koha circ/circulation.pl koha-tmpl/intranet-tmp... [rel_2_2] |
Date: |
Sat, 28 Apr 2007 20:25:02 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Ryan Higgins <rych> 07/04/28 20:25:01
Modified files:
circ : circulation.pl
koha-tmpl/intranet-tmpl/npl/en/circ: circulation.tmpl
koha-tmpl/intranet-tmpl/npl/en/includes: doc-head-circ-close.inc
Log message:
adding js calendar widget to npl tmpl for setting duedate; also making
stickyduedate work
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.81.2.21&r2=1.81.2.22
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/npl/en/circ/circulation.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.6.2.18&r2=1.6.2.19
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/npl/en/includes/doc-head-circ-close.inc?cvsroot=koha&only_with_tag=rel_2_2&r1=1.2.2.7&r2=1.2.2.8
Patches:
Index: circ/circulation.pl
===================================================================
RCS file: /sources/koha/koha/circ/circulation.pl,v
retrieving revision 1.81.2.21
retrieving revision 1.81.2.22
diff -u -b -r1.81.2.21 -r1.81.2.22
--- circ/circulation.pl 26 Apr 2007 14:10:42 -0000 1.81.2.21
+++ circ/circulation.pl 28 Apr 2007 20:25:01 -0000 1.81.2.22
@@ -66,9 +66,17 @@
my $month=$query->param('month');
my $day=$query->param('day');
my $stickyduedate=$query->param('stickyduedate');
+my $duedatespec =$query->param('duedatespec');
my $issueconfirmed = $query->param('issueconfirmed');
my $cancelreserve = $query->param('cancelreserve');
+# TODO - use dateformat.
+# year,month,date kept so we don't break templates not using calendar widget.
+if (defined($year)) {
+ $duedatespec = "$year-$month-$day";
+} else {
+ ($year, $month, $day) = ($duedatespec) ? split /-/, $duedatespec :
(0,0,0);
+}
#set up cookie.....
my $branchcookie;
@@ -316,6 +324,7 @@
todayissues => address@hidden,
previssues => address@hidden,
);
+
# set return date if stickyduedate
if ($stickyduedate) {
my $t_year = "year".$year;
@@ -325,6 +334,7 @@
$t_year => 1,
$t_month => 1,
$t_day => 1,
+ duedatespec => $duedatespec,
);
}
Index: koha-tmpl/intranet-tmpl/npl/en/circ/circulation.tmpl
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/intranet-tmpl/npl/en/circ/Attic/circulation.tmpl,v
retrieving revision 1.6.2.18
retrieving revision 1.6.2.19
diff -u -b -r1.6.2.18 -r1.6.2.19
--- koha-tmpl/intranet-tmpl/npl/en/circ/circulation.tmpl 22 May 2006
12:12:29 -0000 1.6.2.18
+++ koha-tmpl/intranet-tmpl/npl/en/circ/circulation.tmpl 28 Apr 2007
20:25:01 -0000 1.6.2.19
@@ -1,4 +1,5 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation<!-- TMPL_IF
Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR name="surname" -->, <!--
TMPL_VAR name="firstname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!--
/TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation<!-- TMPL_IF
Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR name="surname" -->, <!--
TMPL_VAR name="firstname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!--
/TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="circ-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
@@ -89,6 +90,7 @@
<input type="hidden" name="day" value="<!--
TMPL_VAR name="day" -->" />
<input type="hidden" name="month" value="<!--
TMPL_VAR name="month" -->" />
<input type="hidden" name="year" value="<!--
TMPL_VAR name="year" -->" />
+ <input type="hidden" name="stickyduedate"
value="<!-- TMPL_VAR name="stickyduedate" -->" />
<input type="submit" value="Confirm Issue (Y)"
class="submit" accesskey="y" /></form><form class="inline" method="get"
action="/cgi-bin/koha/circ/circulation.pl"><input type="hidden"
name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input
type="submit" class="cancel" value="Don't Issue (N)" accesskey="n"
/></form></div>
</div>
<!-- /TMPL_UNLESS -->
@@ -193,67 +195,40 @@
<!-- TMPL_IF NAME="borrowernumber" -->
<div class="details">
<form method="post" action="/cgi-bin/koha/circ/circulation.pl"
name="mainform">
-<label for="barcode">Enter Item Barcode: </label><input name="barcode"
size="14" maxlength="14" class="unfocus" onfocus="this.className='focus'"
onblur="this.className='unfocus'" /> <input type="submit" value="Issue"
class="submit" /><!-- Display for NPL <input type="hidden" name="day" value="0"
/><input type="hidden" name="month" value="0" /><input type="hidden"
name="year" value="0" /> /Display for NPL -->
- <!-- Hide from NPL --><p class="date-select">
- <label for="month">Specify Due Date: </label>
- <select name="month" id="month">
- <option value="0">Month</option>
- <option value="1"<!-- TMPL_IF NAME="month1" -->
selected="selected"<!-- /TMPL_IF -->>Jan</option>
- <option value="2"<!-- TMPL_IF NAME="month2" -->
selected="selected"<!-- /TMPL_IF -->>Feb</option>
- <option value="3"<!-- TMPL_IF NAME="month3" -->
selected="selected"<!-- /TMPL_IF -->>Mar</option>
- <option value="4"<!-- TMPL_IF NAME="month4" -->
selected="selected"<!-- /TMPL_IF -->>Apr</option>
- <option value="5"<!-- TMPL_IF NAME="month5" -->
selected="selected"<!-- /TMPL_IF -->>May</option>
- <option value="6"<!-- TMPL_IF NAME="month6" -->
selected="selected"<!-- /TMPL_IF -->>Jun</option>
- <option value="7"<!-- TMPL_IF NAME="month7" -->
selected="selected"<!-- /TMPL_IF -->>Jul</option>
- <option value="8"<!-- TMPL_IF NAME="month8" -->
selected="selected"<!-- /TMPL_IF -->>Aug</option>
- <option value="9"<!-- TMPL_IF NAME="month9" -->
selected="selected"<!-- /TMPL_IF -->>Sep</option>
- <option value="10"<!-- TMPL_IF NAME="month10"
--> selected="selected"<!-- /TMPL_IF -->>Oct</option>
- <option value="11"<!-- TMPL_IF NAME="month11"
--> selected="selected"<!-- /TMPL_IF -->>Nov</option>
- <option value="12"<!-- TMPL_IF NAME="month12"
--> selected="selected"<!-- /TMPL_IF -->>Dec</option>
- </select>
- <select name="day" id="day">
- <option value="0">Day</option>
- <option value="1"<!-- TMPL_IF NAME="day1" -->
selected="selected"<!-- /TMPL_IF -->>1</option>
- <option value="2"<!-- TMPL_IF NAME="day2" -->
selected="selected"<!-- /TMPL_IF -->>2</option>
- <option value="3"<!-- TMPL_IF NAME="day3" -->
selected="selected"<!-- /TMPL_IF -->>3</option>
- <option value="4"<!-- TMPL_IF NAME="day4" -->
selected="selected"<!-- /TMPL_IF -->>4</option>
- <option value="5"<!-- TMPL_IF NAME="day5" -->
selected="selected"<!-- /TMPL_IF -->>5</option>
- <option value="6"<!-- TMPL_IF NAME="day6" -->
selected="selected"<!-- /TMPL_IF -->>6</option>
- <option value="7"<!-- TMPL_IF NAME="day7" -->
selected="selected"<!-- /TMPL_IF -->>7</option>
- <option value="8"<!-- TMPL_IF NAME="day8" -->
selected="selected"<!-- /TMPL_IF -->>8</option>
- <option value="9"<!-- TMPL_IF NAME="day9" -->
selected="selected"<!-- /TMPL_IF -->>9</option>
- <option value="10"<!-- TMPL_IF NAME="day10" -->
selected="selected"<!-- /TMPL_IF -->>10</option>
- <option value="11"<!-- TMPL_IF NAME="day11" -->
selected="selected"<!-- /TMPL_IF -->>11</option>
- <option value="12"<!-- TMPL_IF NAME="day12" -->
selected="selected"<!-- /TMPL_IF -->>12</option>
- <option value="13"<!-- TMPL_IF NAME="day13" -->
selected="selected"<!-- /TMPL_IF -->>13</option>
- <option value="14"<!-- TMPL_IF NAME="day14" -->
selected="selected"<!-- /TMPL_IF -->>14</option>
- <option value="15"<!-- TMPL_IF NAME="day15" -->
selected="selected"<!-- /TMPL_IF -->>15</option>
- <option value="16"<!-- TMPL_IF NAME="day16" -->
selected="selected"<!-- /TMPL_IF -->>16</option>
- <option value="17"<!-- TMPL_IF NAME="day17" -->
selected="selected"<!-- /TMPL_IF -->>17</option>
- <option value="18"<!-- TMPL_IF NAME="day18" -->
selected="selected"<!-- /TMPL_IF -->>18</option>
- <option value="19"<!-- TMPL_IF NAME="day19" -->
selected="selected"<!-- /TMPL_IF -->>19</option>
- <option value="20"<!-- TMPL_IF NAME="day20" -->
selected="selected"<!-- /TMPL_IF -->>20</option>
- <option value="21"<!-- TMPL_IF NAME="day21" -->
selected="selected"<!-- /TMPL_IF -->>21</option>
- <option value="22"<!-- TMPL_IF NAME="day22" -->
selected="selected"<!-- /TMPL_IF -->>22</option>
- <option value="23"<!-- TMPL_IF NAME="day23" -->
selected="selected"<!-- /TMPL_IF -->>23</option>
- <option value="24"<!-- TMPL_IF NAME="day24" -->
selected="selected"<!-- /TMPL_IF -->>24</option>
- <option value="25"<!-- TMPL_IF NAME="day25" -->
selected="selected"<!-- /TMPL_IF -->>25</option>
- <option value="26"<!-- TMPL_IF NAME="day26" -->
selected="selected"<!-- /TMPL_IF -->>26</option>
- <option value="27"<!-- TMPL_IF NAME="day27" -->
selected="selected"<!-- /TMPL_IF -->>27</option>
- <option value="28"<!-- TMPL_IF NAME="day28" -->
selected="selected"<!-- /TMPL_IF -->>28</option>
- <option value="29"<!-- TMPL_IF NAME="day29" -->
selected="selected"<!-- /TMPL_IF -->>29</option>
- <option value="30"<!-- TMPL_IF NAME="day30" -->
selected="selected"<!-- /TMPL_IF -->>30</option>
- <option value="31"<!-- TMPL_IF NAME="day31" -->
selected="selected"<!-- /TMPL_IF -->>31</option>
- </select>
- <select name="year">
- <option value="0">Year</option>
- <option value="2004"<!-- TMPL_IF
NAME="year2004" --> selected="selected"<!-- /TMPL_IF -->>2004</option>
- <option value="2005"<!-- TMPL_IF
NAME="year2005" --> selected="selected"<!-- /TMPL_IF -->>2005</option>
- <option value="2006"<!-- TMPL_IF
NAME="year2006" --> selected="selected"<!-- /TMPL_IF -->>2006</option>
- <option value="2007"<!-- TMPL_IF
NAME="year2007" --> selected="selected"<!-- /TMPL_IF -->>2007</option>
- <option value="2008"<!-- TMPL_IF
NAME="year2008" --> selected="selected"<!-- /TMPL_IF -->>2008</option>
- </select>
-<label for="stickyduedate">Remember for Session:</label><input type="checkbox"
id="stickyduedate" name="stickyduedate" <!-- TMPL_VAR NAME="selected" --> />
<!-- /Hide from NPL -->
+<label for="barcode">Enter Item Barcode: </label><input name="barcode"
size="14" maxlength="14" id="barcode" class="unfocus"
onfocus="this.className='focus'" onblur="this.className='unfocus'" /> <input
type="submit" value="Issue" class="submit" />
+<br />
+<br />
+ <div class="date-select">
+ <label for "duedatespec">Specify Due Date:</label>
<input type="text" size="10" id="duedatespec" name="duedatespec" value="<!--
TMPL_VAR NAME="duedatespec" -->" />
<img src="<!-- TMPL_VAR Name="themelang"
-->/includes/calendar/cal.gif" border="0" id="CalendarDueDate" style="cursor:
pointer;" valign="top" />
+ <script
language="JavaScript" type="text/javascript">
+
function validate1(date) {
+
var today = new Date();
+
if ( date < today ) {
+
return true;
+
} else {
+
return false;
+
}
+ };
+
function refocus(calendar) {
+
document.getElementById('barcode').focus();
+
calendar.hide();
+ };
+
+
Calendar.setup(
+
{
+
inputField : "duedatespec",
+
ifFormat : "%Y-%m-%d",
+
button : "CalendarDueDate",
+
disableFunc : validate1,
+
dateStatusFunc : validate1,
+
onClose : refocus
+
}
+ );
+ </script>
+
+ <label for="stickyduedate">Remember for Session:</label>
+ <input type="checkbox" id="stickyduedate"
onclick="this.form.barcode.focus();" name="stickyduedate" <!-- TMPL_IF
NAME="stickyduedate" --> checked="1" <!-- /TMPL_IF --> />
+ <input type="button" class="action" id="cleardate"
value="Clear" name="cleardate" onclick="this.checked = false;
this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false;
this.form.barcode.focus(); return false;" />
<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR
NAME="borrowernumber" -->" />
<input type="hidden" name="branch" value="<!-- TMPL_VAR
NAME="branch" -->" />
<input type="hidden" name="printer" value="<!-- TMPL_VAR
NAME="printer" -->" />
@@ -262,7 +237,7 @@
<input type="hidden" name="charges" value="yes" />
<input type="hidden" name="oldamount" value="<!--
TMPL_VAR NAME="amountold" -->" />
<!-- /TMPL_IF -->
- </p>
+ </div>
</form>
</div>
Index: koha-tmpl/intranet-tmpl/npl/en/includes/doc-head-circ-close.inc
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/intranet-tmpl/npl/en/includes/Attic/doc-head-circ-close.inc,v
retrieving revision 1.2.2.7
retrieving revision 1.2.2.8
diff -u -b -r1.2.2.7 -r1.2.2.8
--- koha-tmpl/intranet-tmpl/npl/en/includes/doc-head-circ-close.inc 5 Apr
2006 14:52:52 -0000 1.2.2.7
+++ koha-tmpl/intranet-tmpl/npl/en/includes/doc-head-circ-close.inc 28 Apr
2007 20:25:01 -0000 1.2.2.8
@@ -5,11 +5,20 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /TMPL_IF -->
<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang'
-->/includes/favicon.ico" type="image/x-icon" />
+<!-- Additions to enable Calendar system -->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME='themelang'
-->/includes/calendar/calendar-system.css">
+<!-- End of additions -->
<style type="text/css">
<!-- TMPL_IF NAME="intranetstylesheet" -->@import url(<!-- TMPL_VAR
NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetstylesheet" -->);<!--
TMPL_ELSE -->@import url(<!-- TMPL_VAR NAME='themelang'
-->/includes/intranet.css);<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="intranetcolorstylesheet" -->@import url(<!--
TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR
NAME="intranetcolorstylesheet" -->);<!-- /TMPL_IF -->
</style>
<!-- TMPL_INCLUDE NAME="common.js.inc" -->
+<!-- Additions to enable Calendar system -->
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar-en.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar-setup.js"></script>
+<!-- End of additions -->
+
</head>
<body onload="verify_images(); mainfocus(); ">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha circ/circulation.pl koha-tmpl/intranet-tmp... [rel_2_2],
Ryan Higgins <=