//function _trimTime(time) { if(!time) return ""; return time.replace(/\ .*/,""); }
function _trimTime(time) {
if(!time) return "";
- return time.replace(/T.*/,"");
+ var d = Date.parseIso8601(time);
+ if(!d) return ""; /* date parse failed */
+ return d.iso8601Format('YMD');
}
-function _trimSeconds(time) { if(!time) return ""; return time.replace(/:\d\d\..*$/,""); }
+function _trimSeconds(time) {
+ if(!time) return "";
+ var d = Date.parseIso8601(time);
+ if(!d) return ""; /* date parse failed */
+ return d.iso8601Format('YMDHM',null,true,true);
+}
function myOPACShowTransactions(r) {
fleshedUser = user;
if(!user) return;
+ var expireDate = Date.parseIso8601(user.expire_date());
+ if( expireDate < new Date() ) {
+ appendClear($('myopac.expired.date'), expireDate.iso8601Format('YMD'));
+ unHideMe($('myopac.expired.alert'));
+ }
+
var iv1 = user.ident_value()+'';
if (iv1.length > 4) iv1 = iv1.replace(new RegExp(iv1.substring(0,iv1.length - 4)), '***********');
duration = parseInt(duration + '000');
var dtf = circ.circ_time();
-
- /*Date.W3CDTF is not happy with the milliseonds, nor is it
- happy without minute component of the timezone */
- dtf = dtf.replace(/\.\d+/,'');
- dtf += ":00";
-
- var start = new Date.W3CDTF();
- start.setW3CDTF(dtf);
+ var start = Date.parseIso8601(circ.circ_time());
var due = new Date( start.getTime() + duration );
- due = (due+'').replace(/(.*?:\d\d):.*/, '$1');
-
- appendClear($n(row, 'circ_time'), text(due));
+ appendClear($n(row, 'circ_time'), text(due.iso8601Format('YMDHM', null, true, true)));
}
<div id='myopac_summary_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <div id='myopac.expired.alert' class='hide_me' style='margin-bottom: 20px;'>
+ <table class='data_grid' width='100%'>
+ <tbody>
+ <tr>
+ <td width='100%' style='color:red;'>
+ Your account expired on <span id='myopac.expired.date'/>!
+ Please see a librarian to renew your account.
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
<div id='myopac.notes.div' class='hide_me'>
<table class='data_grid' width='100%'>
<thead>
<br/>
</div>
- <!--
- <table class='light_border data_grid'>
- -->
<table width='70%' class='light_border myopac_summary_table'>
<tbody id='myopac_summary_tbody'>
- <!--
- <tr>
- <td class='color_4 light_border' width='20%'>First Name</td>
- <td class='light_border' id='myopac_summary_first'> </td>
- </tr>
- <tr>
- <td class='color_4 light_border'>Middle Name</td>
- <td class='light_border' id='myopac_summary_middle'> </td>
- </tr>
- <tr>
- <td class='color_4 light_border'>Last Name</td>
- <td class='light_border' id='myopac_summary_last'> </td>
- </tr>
- -->
-
<tr>
<td width='30%' class='color_4 light_border'>Name</td>
<td class='light_border'>