We require Buttons on this form. Continuing the good work senator started.
[working/Evergreen.git] / Open-ILS / web / js / ui / default / acq / lineitem / worksheet.js
1 dojo.require('dijit.form.Button');
2 dojo.require('openils.widget.ProgressDialog');
3 dojo.requireLocalization("openils.acq", "acq");
4 var localeStrings = dojo.i18n.getLocalization("openils.acq", "acq");
5
6 function load() {
7     progressDialog.show(true);
8     fieldmapper.standardRequest(
9         ["open-ils.acq", "open-ils.acq.lineitem.format"], {
10             "params": [openils.User.authtoken, liId, "html"],
11             "async": true,
12             "oncomplete": function(r) {
13                 r = openils.Util.readResponse(r);
14                 progressDialog.hide();
15                 var d = dojo.byId("acq-worksheet-contents");
16                 if (r.template_output())
17                     d.innerHTML = r.template_output().data();
18                 else if (r.error_output())
19                     d.innerHTML = r.error_output().data();
20                 else
21                     d.innerHTML = localeStrings.LI_FORMAT_ERROR;
22             }
23         }
24     );
25 }
26
27 openils.Util.addOnLoad(load);