G.ui = {} /* cache of UI components */
+/* regexes */
+var REGEX_BARCODE = /^\d+/; /* starts with a number */
+
+
/* call me after page init and I will load references
to all of the ui object id's defined below
They will be stored in G.ui.<page>.<thingy>
/* define it again here for pages that don't load RemoteRequest */
function isXUL() { try { if(IAMXUL) return true;}catch(e){return false;}; }
+
var cookieManager = new HTTP.Cookies();
var __ilsEvent; /* the last event the occurred */
return null;
}
- var auth_request = new Request( LOGIN_COMPLETE,
- uname, hex_md5(seed + hex_md5(passwd)), "opac", getOrigLocation());
+ var args = {
+ password : hex_md5(seed + hex_md5(passwd)),
+ type : "opac",
+ org : getOrigLocation()
+ };
+
+ if( uname.match(REGEX_BARCODE) ) args.barcode = uname; /* make this better */
+ else args.username = uname;
+ var auth_request = new Request( LOGIN_COMPLETE, args );
auth_request.send(true);
var auth_result = auth_request.result();
<!ENTITY opac.title.advanced "Evergreen Advanced Search">
<!ENTITY opac.title.reqitems "Evergreen Request Items">
<!ENTITY opac.title.cnbrowse "Evergreen Call Number Browse">
-<!ENTITY opac.login.login "Login with your username and password">
+<!ENTITY opac.login.login "Login">
if(circsCache[i].id() == circid)
circ = circsCache[i];
+ if(!confirm($('myopac_renew_confirm').innerHTML)) return;
+
var req = new Request(RENEW_CIRC, G.user.session,
{ patron : G.user.id(), copyid : circ.target_copy() } );
req.send(true);
var user = r.getResultObject();
fleshedUser = user;
+ if(!user) return;
appendClear($('myopac_summary_first'),text(user.first_given_name()));
appendClear($('myopac_summary_middle'),text(user.second_given_name()));
}
function myOPACRemoveBBItem( id, containerid, container_name ) {
+ if(!confirm($('myopac_remove_bb_item_confirm').innerHTML)) return;
containerRemoveItem( id );
myOPACFetchBBItems( containerid, $('myopac_bookbag_row_' + containerid), true);
myOPACExpandBookbag( containerid, container_name );
var d = new Date();
- var div = elem('div', { class : 'hide_me' });
+ var div = elem('div', { "class" : 'hide_me' });
var span = div.appendChild( elem('span') );
buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
<table class='data_grid' width='80%'>
<thead>
- <tr><td colspan='3'>&opac.advanced.refined.title;</td></tr>
+ <tr><td colspan='4'>&opac.advanced.refined.title;</td></tr>
</thead>
<tbody style='text-align: left'>
<tr>
config.ids.altcanvas.login = config.ids.login.box;
</script>
- <div class='login_text color_1'>
+ <br/>
+
+ <div class='login_text color_1' style='padding: 4px; text-align: center;'>
<span>&opac.login.login;</span>
</div>
<br/>
- <table>
+ <table class='data_grid' style='margin-left: 20px;' width='95%'>
<tbody>
<tr>
- <td><span class='login_text'>&common.username;</span></td>
+ <td><span class='login_text'>Enter your username or library barcode</span></td>
<td>
<span class='login_text'>
<input id='login_username' type='text' size='16'> </input>
</span>
</td>
</tr>
- <tr><td><br/></td></tr>
- <tr>
- <td>
- <span class='login_text'>
- <a href="javascript:void(0);" id='login_button'> &common.login; </a>
+ <tr><td><br/></td><td/></tr>
+ <tr class='color_1'>
+ <td colspan='2' align='center'>
+ <span class='login_text' style='margin-right: 20px;'>
+ <input type='submit' value='Login' id='login_button'/>
</span>
- </td>
- <td>
- <span class='login_text'>
- <a href='javascript:void(0);' id='login_cancel_button'> &common.cancel; </a>
+ <span class='login_text' style='margin-left: 20px;'>
+ <input type='submit' id='login_cancel_button' value='&common.cancel;'/>
</span>
</td>
</tr>
</tbody>
</table>
-
</div>
<!--
<div style='overflow: auto; max-height: 200px;' class='hide_me'>
-->
+ <div style='width: 99%; text-align: center'> <b id='myopac_bookbag_items_name'> </b></div>
+ <br/>
+
+ <div class='hide_me' style='width: 100%; text-align: center; font-weight: 700; margin-top: 10px;'
+ id='myopac_bookbag_no_items'>The selected bookbag contains no items...</div>
- <div style='width: 99%; text-align: center'> <b id='myopac_bookbag_items_name'> </b></div>
- <br/>
-
- <div class='hide_me' style='width: 100%; text-align: center; font-weight: 700; margin-top: 10px;'
- id='myopac_bookbag_no_items'>The selected bookbag contains no items...</div>
-
- <table width='100%' class='hide_me data_grid data_grid_center' id='myopac_bookbag_items_table'>
- <thead>
- <tr> <td>Title</td> <td>Authors</td> <td>Remove this item?</td> </tr>
- </thead>
- <tbody id='myopac_bookbag_items_tbody'>
- <tr id='myopac_bookbag_items_row'>
- <td> <a name='myopac_bookbag_items_title' class='classic_link'> </a> </td>
- <td> <a name='myopac_bookbag_items_author' class='classic_link'> </a> </td>
- <td><a name='myopac_bookbag_items_remove' class='classic_link'>remove</a></td>
- </tr>
- </tbody>
- </table>
+ <table width='100%' class='hide_me data_grid data_grid_center' id='myopac_bookbag_items_table'>
+ <thead>
+ <tr> <td>Title</td> <td>Authors</td> <td>Remove this item?</td> </tr>
+ </thead>
+ <tbody id='myopac_bookbag_items_tbody'>
+ <tr id='myopac_bookbag_items_row'>
+ <td> <a name='myopac_bookbag_items_title' class='classic_link'> </a> </td>
+ <td> <a name='myopac_bookbag_items_author' class='classic_link'> </a> </td>
+ <td><a name='myopac_bookbag_items_remove' class='classic_link'>remove</a></td>
+ </tr>
+ </tbody>
+ </table>
<!--</div>-->
<span id='bb_publish_text' class='hide_me'>
To see the public view of a published Bookbag, click the "View" link in the
"Published" column of the Bookbag list at the top of this page.
</span>
+
+ <span id='myopac_remove_bb_item_confirm' class='hide_me'>
+ Are you sure you wish to remove this bookbag item?
+ </span>
+
</div>
+
<div id='myopac_renew_success' class='hide_me'>Item successfully renewed</div>
+ <span class='hide_me' id='myopac_renew_confirm'>Are you sure you wish to renew this item?</span>
+
</div>
<div id='myopac_prefs_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
- <table width='100%' class='data_grid'>
+ <table width='100%' class='data_grid' style='margin-top: 20px;'>
<br/>
<thead>
</td>
</tr>
+ <tr><td colspan='2'><br/></td></tr>
+
<tr>
- <td align='middle' colspan='2'>
+ <td align='center' class='color_3' colspan='2'>
<button onclick='myOPACSavePrefs();'
- id='myopac_prefs_submit'>Save Changes</button>
+ id='myopac_prefs_submit'>Save Preference Changes</button>
</td>
</tr>
+ <!--
<tr>
<td colspan='2' align='center'><br/><b> * More To Come...</b></td>
</tr>
+ -->
</tbody>
</table>