[open-ils-commits] r15802 - in trunk/Open-ILS/web: js/ui/default/acq/picklist templates/default/acq/picklist (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 13:59:14 EST 2010
Author: erickson
Date: 2010-03-11 13:59:10 -0500 (Thu, 11 Mar 2010)
New Revision: 15802
Modified:
trunk/Open-ILS/web/js/ui/default/acq/picklist/user_request.js
trunk/Open-ILS/web/templates/default/acq/picklist/user_request.tt2
Log:
trim the default display fields in the user req ui. format the title as a link to load the request detail page, added some todo comments
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/user_request.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/user_request.js 2010-03-11 18:16:11 UTC (rev 15801)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/user_request.js 2010-03-11 18:59:10 UTC (rev 15802)
@@ -7,6 +7,41 @@
var contextOrg;
function setup() {
+
+ if(reqId) {
+ drawRequest();
+ } else {
+ drawList();
+ }
+}
+
+function drawRequest() {
+ // hide the grid and the context selector
+ // draw a detail page for a particular request
+ // including ability to add request to a picklist
+ // and to "reject" it (aka apply a cancel reason)
+}
+
+
+// format the title data as id:title
+function getTitle(idx, item) {
+ if(item) {
+ return this.grid.store.getValue(item, 'id') + ':' +
+ this.grid.store.getValue(item, 'title');
+ }
+ return ''
+}
+
+// turn id:title into a url
+function formatTitle(value) {
+ if(value) {
+ var parts = value.split(/:/);
+ return '<a href="' + oilsBasePath +
+ '/acq/picklist/user_request/' + parts[0] + '">' + parts[1] + '</a>';
+ }
+}
+
+function drawList() {
buildGrid();
var connect = function() {
Modified: trunk/Open-ILS/web/templates/default/acq/picklist/user_request.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 2010-03-11 18:16:11 UTC (rev 15801)
+++ trunk/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 2010-03-11 18:59:10 UTC (rev 15802)
@@ -1,11 +1,13 @@
[% WRAPPER 'default/base.tt2' %]
[% ctx.page_title = 'Patron Requests' %]
<script src='[% ctx.media_prefix %]/js/ui/default/acq/picklist/user_request.js'> </script>
+<script>var reqId = '[% ctx.page_args.0 %]';</script>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>[% ctx.page_title %]</div>
<div>
+ <!-- TODO: add reject-selection operation -->
</div>
</div>
<div>
@@ -20,7 +22,8 @@
<table jsId="rGrid"
dojoType="openils.widget.AutoGrid"
query="{id: '*'}"
- defaultCellWidth='"auto"'
+ suppressFields='["id", "usr", "pickup_lib", "holdable_formats", "phone_notify", "email_notify", "lineitem", "eg_bib", "max_fee", "cancel_reason"]'
+ fieldOrder='["title", "author", "isxn", "article_title", "article_pages", "request_type", "volume", "pubdate", "publisher", "location", "other_info", "mentioned"]'
fmClass='aur'
editStyle='pane'
autoHeight='true'
@@ -29,6 +32,11 @@
showColumnPicker='true'
columnPickerPrefix='"acq.picklist.user_request"'
editOnEnter='true'>
+ <thead>
+ <tr>
+ <th field='title' get='getTitle' formatter='formatTitle'/>
+ </tr>
+ </thead>
</table>
</div>
[% END %]
More information about the open-ils-commits
mailing list