]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js
circ_tree is now circ_utils. patron_items is what circ_tree was. don't need the...
[working/Evergreen.git] / Evergreen / staff_client / chrome / content / evergreen / circ / circ_utils.js
1 sdump('D_TRACE','Loading circ_tree.js\n');
2
3 function checkin_by_copy_barcode(barcode) {
4         sdump('D_CIRC_UTILS',arg_dump(arguments,{0:true}));
5         try {
6                 var check = user_request(
7                         'open-ils.circ',
8                         'open-ils.circ.checkin.barcode',
9                         [ mw.G.auth_ses[0], barcode ]
10                 )[0];
11                 sdump('D_CIRC_UTILS','check = ' + check + '\n');
12                 return check;
13         } catch(E) {
14                 sdump('D_ERROR',E);
15                 return null;
16         }
17 }
18
19
20 function circ_cols() {
21         return  [
22                 {
23                         'id' : 'barcode', 'label' : getString('acp_label_barcode'), 'flex' : 1,
24                         'primary' : true, 'hidden' : false, 'fm_class' : 'acp', 'fm_field_render' : '.barcode()'
25                 },
26                 {
27                         'id' : 'call_number', 'label' : getString('acp_label_call_number'), 'flex' : 1,
28                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.call_number()'
29                 },
30                 {
31                         'id' : 'copy_number', 'label' : getString('acp_label_copy_number'), 'flex' : 1,
32                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.copy_number()'
33                 },
34                 {
35                         'id' : 'status', 'label' : getString('acp_label_status'), 'flex' : 1,
36                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.status()'
37                 },
38                 {
39                         'id' : 'location', 'label' : getString('acp_label_location'), 'flex' : 1,
40                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.location()'
41                 },
42                 {
43                         'id' : 'loan_duration', 'label' : getString('acp_label_loan_duration'), 'flex' : 1,
44                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.loan_duration()'
45                 },
46                 {
47                         'id' : 'circ_lib', 'label' : getString('acp_label_circ_lib'), 'flex' : 1,
48                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.circ_lib()'
49                 },
50                 {
51                         'id' : 'fine_level', 'label' : getString('acp_label_fine_level'), 'flex' : 1,
52                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.fine_level()'
53                 },
54                 {
55                         'id' : 'deposit', 'label' : getString('acp_label_deposit'), 'flex' : 1,
56                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.deposit()'
57                 },
58                 {
59                         'id' : 'deposit_amount', 'label' : getString('acp_label_deposit_amount'), 'flex' : 1,
60                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.deposit_amount()'
61                 },
62                 {
63                         'id' : 'price', 'label' : getString('acp_label_price'), 'flex' : 1,
64                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.price()'
65                 },
66                 {
67                         'id' : 'circ_as_type', 'label' : getString('acp_label_circ_as_type'), 'flex' : 1,
68                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.circ_as_type()'
69                 },
70                 {
71                         'id' : 'circ_modifier', 'label' : getString('acp_label_circ_modifier'), 'flex' : 1,
72                         'primary' : false, 'hidden' : true, 'fm_class' : 'acp', 'fm_field_render' : '.circ_modifier()'
73                 },
74                 {
75                         'id' : 'xact_start', 'label' : getString('circ_label_xact_start'), 'flex' : 1,
76                         'primary' : false, 'hidden' : true, 'fm_class' : 'circ', 'fm_field_render' : '.xact_start()'
77                 },
78                 {
79                         'id' : 'xact_finish', 'label' : getString('circ_label_xact_finish'), 'flex' : 1,
80                         'primary' : false, 'hidden' : true, 'fm_class' : 'circ', 'fm_field_render' : '.xact_finish()'
81                 },
82                 {
83                         'id' : 'renewal_remaining', 'label' : getString('circ_label_renewal_remaining'), 'flex' : 1,
84                         'primary' : false, 'hidden' : false, 'fm_class' : 'circ', 'fm_field_render' : '.renewal_remaining()'
85                 },
86                 {
87                         'id' : 'due_date', 'label' : getString('circ_label_due_date'), 'flex' : 1,
88                         'primary' : false, 'hidden' : false, 'fm_class' : 'circ', 'fm_field_render' : '.due_date()'
89                 },
90                 {
91                         'id' : 'title', 'label' : getString('mvr_label_title'), 'flex' : 1,
92                         'primary' : false, 'hidden' : false, 'fm_class' : 'mvr', 'fm_field_render' : '.title()'
93                 },
94                 {
95                         'id' : 'author', 'label' : getString('mvr_label_author'), 'flex' : 1,
96                         'primary' : false, 'hidden' : false, 'fm_class' : 'mvr', 'fm_field_render' : '.author()'
97                 }
98                 
99         ]
100 };
101
102