[open-ils-commits] r15738 - in trunk/Open-ILS/web: js/ui/default/conify/global/acq templates/default/conify/global/acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 8 14:50:50 EST 2010
Author: erickson
Date: 2010-03-08 14:50:45 -0500 (Mon, 08 Mar 2010)
New Revision: 15738
Added:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/cancel_reason.js
trunk/Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2
Log:
acq cancel reason administration interface. TODO: add staff client menu entries
Added: trunk/Open-ILS/web/js/ui/default/conify/global/acq/cancel_reason.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/cancel_reason.js (rev 0)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/cancel_reason.js 2010-03-08 19:50:45 UTC (rev 15738)
@@ -0,0 +1,39 @@
+dojo.require('openils.Util');
+dojo.require('openils.User');
+dojo.require('openils.widget.AutoGrid');
+dojo.require('fieldmapper.OrgUtils');
+dojo.require('openils.widget.OrgUnitFilteringSelect');
+
+var contextOrg;
+
+function setup() {
+ buildGrid();
+
+ var connect = function() {
+ dojo.connect(contextOrgSelector, 'onChange',
+ function() {
+ contextOrg = this.attr('value');
+ crGrid.resetStore();
+ buildGrid();
+ }
+ );
+ };
+
+ new openils.User().buildPermOrgSelector(
+ 'ADMIN_ACQ_CANCEL_CAUSE', contextOrgSelector, null, connect);
+}
+
+function buildGrid() {
+
+ if(contextOrg == null)
+ contextOrg = openils.User.user.ws_ou();
+
+ crGrid.loadAll(
+ {order_by : {acqcr : 'label'}},
+ {org_unit : fieldmapper.aou.fullPath(contextOrg, true)}
+ );
+}
+
+openils.Util.addOnLoad(setup);
+
+
Added: trunk/Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2 2010-03-08 19:50:45 UTC (rev 15738)
@@ -0,0 +1,33 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_titel = 'Cancel Reasons' %]
+<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/cancel_reason.js'> </script>
+
+<!-- grid -->
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>PO / Item / Request Cancellation Reasons</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='crGrid.showCreateDialog()'>New Cancel Reason</button>
+ <button dojoType='dijit.form.Button' onClick='crGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+ </div>
+ <div>
+ <span>Context Org Unit</span>
+ <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='contextOrgSelector'
+ searchAttr='shortname' labelAttr='shortname'> </select>
+ </div>
+ <table jsId="crGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'org_unit', 'label', 'description']"
+ query="{id: '*'}"
+ defaultCellWidth='"auto"'
+ fmClass='acqcr'
+ showPaginator='true'
+ editOnEnter='true'>
+ </table>
+ </div>
+</div>
+[% END %]
+
+
More information about the open-ils-commits
mailing list