]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/circ_rules/script_libs.js
more circ utility code
[Evergreen.git] / Evergreen / circ_rules / script_libs.js
1 /* pre-define all global circ vars.  This way, any vars not fetched and 
2         defined by the circ code won't throw exceptions when accessed */
3
4 var hold                                = null; /* most recently retrieve hold object */
5 var copy                                = null; /* the current copy object */
6 var title                       = null; /* the current title (biblio record entry) object */
7 var patron                      = null; /* the current patron object */
8 var patron_info = null; /* additional info on the current patron */
9
10
11
12
13 /* Utility function ----------------------------------------------------- */
14
15 function is_true(item) { return !is_false(item); }
16
17 function is_false(item) { 
18         if( ! item ) return true;
19         if( item.match(/0/) ) return true;
20         return false;
21 }
22