Paste number 59820: openils.acq.Picklist.createStore

Paste number 59820: openils.acq.Picklist.createStore
Pasted by: djfiander
7 months, 4 days ago
#openils-evergreen | Context in IRC logs
Paste contents:
Raw Source | XML | Display As
openils.acq.Picklist.createStore = function(pl_id, onComplete) {
    // Fetches the list of titles in a picklist and builds a grid

    function mkStore(r) {
        var msg;
        var items = [];
        while (msg = r.recv()) {
            var data = msg.content();
            items.push(data);
        }
        onComplete(jub.toStoreData(items));
    }

    fieldmapper.standardRequest(
        ['open-ils.acq', 'open-ils.acq.lineitem.picklist.retrieve'],
        { async: true,
          params: [openils.User.authtoken, pl_id, {flesh_attrs:1}],
          oncomplete: mkStore
        });
};

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.