1 /* ---------------------------------------------------------------------------
2 * Copyright (C) 2008 Georgia Public Library Service
3 * Bill Erickson <erickson@esilibrary.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * ---------------------------------------------------------------------------
16 if(!dojo._hasResource['openils.acq.LineitemAttr']) {
17 dojo._hasResource['openils.acq.LineitemAttr'] = true;
18 dojo.provide('openils.acq.LineitemAttr');
19 dojo.require('fieldmapper.dojoData');
20 dojo.require('openils.User');
21 dojo.require('openils.Event');
23 /** Declare the LineitemAttr class with dojo */
24 dojo.declare('openils.acq.LineitemAttr', null, {});
26 /** Pile of static methods for handling the different types of
27 * lineitem attributes and definitions
32 * Creates a set of attr definition stores, one per definition type.
34 openils.acq.LineitemAttr.createAttrDefStores = function(onload) {
36 var res = r.recv().content();
37 openils.Event.parse_and_raise(res);
39 stores.marc = acqlimad.toStoreData(res.marc);
40 stores.usr = acqliuad.toStoreData(res.usr);
41 stores.local = acqlilad.toStoreData(res.local);
42 stores.generated = acqligad.toStoreData(res.generated);
43 stores.provider = acqlipad.toStoreData(res.provider);
47 fieldmapper.standardRequest(
48 ['open-ils.acq', 'open-ils.acq.lineitem_attr_definition.retrieve.all'],
50 params: [openils.User.authtoken],