[open-ils-commits] r10239 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
public/oils/media/css/skin public/oils/media/ui_js/oils/default/acq
public/oils/media/ui_js/oils/default/acq/receiving
templates/oils/default/acq/receiving
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Aug 3 10:21:00 EDT 2008
Author: erickson
Date: 2008-08-03 10:20:53 -0400 (Sun, 03 Aug 2008)
New Revision: 10239
Added:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html
Log:
started plugging in ident search
jubgrid, which I'm not sure is the best route here, is not displaying right, but
it's probably just a missing bit of css
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css 2008-08-02 14:53:20 UTC (rev 10238)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css 2008-08-03 14:20:53 UTC (rev 10239)
@@ -24,6 +24,10 @@
padding:0;
}
+.invisible { visibility: none; }
+.hidden { display: none; visibility: hidden; }
+.display { display: block; visibility: visible; }
+
/* main layout blocks */
#oils-base-main-block { width: 100%; margin-top: 0px; padding-top: 0px;}
#oils-base-navigate-block { width: 12%; vertical-align: top; float:left;}
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js 2008-08-03 14:20:53 UTC (rev 10239)
@@ -0,0 +1,59 @@
+dojo.require('fieldmapper.Fieldmapper');
+dojo.require('dijit.ProgressBar');
+dojo.require('dijit.form.Form');
+dojo.require('dijit.form.TextBox');
+dojo.require('dijit.form.CheckBox');
+dojo.require('dijit.form.FilteringSelect');
+dojo.require('dijit.form.Button');
+dojo.require("dijit.Dialog");
+dojo.require('openils.Event');
+dojo.require('openils.acq.Lineitem');
+dojo.require('openils.widget.OrgUnitFilteringSelect');
+
+var lineitems = [];
+
+function drawForm() {
+}
+
+var liReceived;
+function doSearch(values) {
+ var search = {
+ attr_values : [values.identifier],
+ po_agencies : (values.ordering_agency) ? [values.ordering_agency] : null,
+ };
+
+ options = {clear_marc:1, flesh_attrs:1};
+ liReceived = 0;
+ dojo.style('searchProgress', 'visibility', 'visible');
+
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.lineitem.search.ident'],
+ { async: true,
+ params: [openils.User.authtoken, search, options],
+ onresponse: handleResult,
+ oncomplete: viewList
+ }
+ );
+}
+
+var searchLimit = 10; // ?
+function handleResult(r) {
+ var result = r.recv().content();
+ searchProgress.update({maximum: searchLimit, progress: ++liReceived});
+ lineitems.push(result);
+}
+
+function viewList() {
+ dojo.style('searchProgress', 'visibility', 'hidden');
+ dojo.style('oils-acq-li-recv-grid', 'visibility', 'visible');
+ dojo.style('oils-acq-li-recv-grid', 'display', 'block');
+ var store = new dojo.data.ItemFileWriteStore(
+ {data:jub.toStoreData(lineitems, null,
+ {virtualFields:['estimated_price', 'actual_price']})});
+ var model = new dojox.grid.data.DojoData(
+ null, store, {rowsPerPage: 20, clientSort: true, query:{id:'*'}});
+ JUBGrid.populate(liGrid, model, lineitems);
+}
+
+
+
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html 2008-08-02 14:53:20 UTC (rev 10238)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html 2008-08-03 14:20:53 UTC (rev 10239)
@@ -7,15 +7,53 @@
<%def name="block_js()">
${parent.block_js()}
+ <script src='${c.oils.core.media_prefix.value}/ui_js/oils/default/acq/receiving/process.js'> </script>
</%def>
<%def name="page_title()">${_('Receiving')}</%def>
<%def name="block_content()">
-
<div dojoType="dijit.layout.LayoutContainer" style="height:100%">
<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <h1>Receiving Processing</h1>
+ <h1>Receiving Processing</h1>
+ <div>
+ <form dojoType='dijit.form.Form' action='' method=''>
+ <script type="dojo/method" event="onSubmit">
+ doSearch(this.getValues());
+ return false; /* don't redirect */
+ </script>
+ <table class='oils-acq-basic-form-table'>
+ <tr>
+ <td><label for='identifier'>${_('Identifier')}</label></td>
+ <td>
+ <input dojoType='dijit.form.TextBox' name='identifier'/>
+ </td>
+ </tr>
+ <tr>
+ <td><label for='ordering_agency'>${_('Ordering Agency')}</label></td>
+ <td>
+ <!-- make it a multi-select ? -->
+ <select dojoType='dijit.form.FilteringSelect' name='ordering_agency'
+ labalAttr='code' searchAttr='code' jsId='orderingAgencySelector'>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'><div dojoType='dijit.form.Button' type='submit'>${_("Search")}</div></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+
+ <div id='oils-acq-li-recv-progress'>
+ <div dojoType="dijit.ProgressBar" style="width:300px" class='invisible'
+ jsId="searchProgress" id="searchProgress"/>
+ </div>
</div>
+ <div dojoType="dijit.layout.ContentPane">
+ <div id='oils-acq-li-recv-grid'>
+ ${jubgrid.jubgrid('oils-acq-recv', 'liGrid')}
+ </div>
+ </div>
</div>
</%def>
<!-- Local Variables: -->
More information about the open-ils-commits
mailing list