]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/javascript/backend/circ/circ_lib.js
removed patron penalty info from circ scripts and from the circ code proper
[Evergreen.git] / Open-ILS / src / javascript / backend / circ / circ_lib.js
1
2 var __scratchKey = 0;
3 var __SCRATCH = {};
4 function scratchKey()           { return '_' + __scratchKey++; };
5 function scratchPad(key)        { return '__SCRATCH.'+ key; }
6 function getScratch(key)        { return __SCRATCH[ key ]; }
7 function scratchClear()         { for( var o in __SCRATCH ) __SCRATCH[o] = null; }
8
9
10
11 /* -- Copy functions ----------------------------------------------------- */
12 try {
13         if( environment.copy ) {
14                 environment.copy.fetchHolds = function() {
15                         var key = scratchKey();
16                         environment.copy.__OILS_FUNC_fetch_hold(scratchPad(key));
17                         var val = getScratch(key);
18                         return (val) ? val : null;
19                 }
20         } 
21 } catch(e) {}
22