[open-ils-commits] r15981 - in trunk/Open-ILS: web/css/skin/default web/js/ui/default/conify/global/acq web/opac/locale/en-US web/templates/default/conify/global/acq xul/staff_client/chrome/content/main (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 25 14:47:18 EDT 2010
Author: senator
Date: 2010-03-25 14:47:14 -0400 (Thu, 25 Mar 2010)
New Revision: 15981
Added:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/fund_tag.js
trunk/Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2
Modified:
trunk/Open-ILS/web/css/skin/default/acq.css
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Log:
Acq: Fund tag admin UI - this is just the CRUD part, not application to funds
Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css 2010-03-25 18:07:56 UTC (rev 15980)
+++ trunk/Open-ILS/web/css/skin/default/acq.css 2010-03-25 18:47:14 UTC (rev 15981)
@@ -6,6 +6,7 @@
.oils-sub-navigate-block span { padding: 3px; }
*/
+.oils-acq-basic-roomy { margin: 10px 0; }
/*.oils-acq-detail-content-pane {height:600px;width:100%}*/
.oils-acq-basic-form-div {padding:4px; width:95%;}
Added: trunk/Open-ILS/web/js/ui/default/conify/global/acq/fund_tag.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/fund_tag.js (rev 0)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/fund_tag.js 2010-03-25 18:47:14 UTC (rev 15981)
@@ -0,0 +1,57 @@
+dojo.require("dojo.data.ItemFileWriteStore");
+dojo.require("dojox.grid.DataGrid");
+dojo.require("dojox.grid.cells.dijit");
+dojo.require("dojox.widget.PlaceholderMenuItem");
+dojo.require("dijit.form.CurrencyTextBox");
+dojo.require("dijit.form.FilteringSelect");
+dojo.require("openils.widget.AutoGrid");
+dojo.require("openils.PermaCrud");
+dojo.require("openils.widget.OrgUnitFilteringSelect");
+
+var pcrud;
+var ftOwner;
+var ftList;
+
+function ftInit() {
+ new openils.User().buildPermOrgSelector(
+ "ADMIN_ACQ_FUND_TAG",
+ ftOwnerSelect,
+ null,
+ function() {
+ dojo.connect(
+ ftOwnerSelect,
+ "onChange",
+ function() {
+ ftOwner = this.getValue();
+ ftGrid.resetStore();
+ buildFtGrid();
+ }
+ );
+ }
+ );
+}
+
+function buildFtGrid() {
+ if (!pcrud) pcrud = new openils.PermaCrud();
+ if (!ftOwner) ftOwner = openils.User.user.ws_ou();
+
+ pcrud.search(
+ "acqft",
+ {"owner": fieldmapper.aou.fullPath(ftOwner, true /* asId */)},
+ {
+ "async": true,
+ "oncomplete": function(r) {
+ if ((ftList = openils.Util.readResponse(r))) {
+ ftList = openils.Util.objectSort(ftList);
+ ftList.forEach(
+ function(o) {
+ ftGrid.store.newItem(acqft.toStoreItem(o));
+ }
+ );
+ }
+ }
+ }
+ );
+}
+
+openils.Util.addOnLoad(ftInit);
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-03-25 18:07:56 UTC (rev 15980)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-03-25 18:47:14 UTC (rev 15981)
@@ -688,6 +688,8 @@
<!ENTITY staff.main.menu.admin.server_admin.acq.accesskey "A">
<!ENTITY staff.main.menu.admin.server_admin.acq.lineitem_alert.label "Line Item Alerts">
<!ENTITY staff.main.menu.admin.server_admin.acq.lineitem_alert.accesskey "L">
+<!ENTITY staff.main.menu.admin.server_admin.acq.fund_tag.label "Fund Tags">
+<!ENTITY staff.main.menu.admin.server_admin.acq.fund_tag.accesskey "F">
<!ENTITY staff.main.menu.admin.server_admin.acq.cancel_reason.label "Cancel Reasons">
<!ENTITY staff.main.menu.admin.server_admin.acq.cancel_reason.accesskey "C">
Added: trunk/Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2 2010-03-25 18:47:14 UTC (rev 15981)
@@ -0,0 +1,32 @@
+[% WRAPPER default/base.tt2 %]
+<script src="[% ctx.media_prefix %]/js/ui/default/conify/global/acq/fund_tag.js"> </script>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div dojoType="dijit.layout.ContentPane"
+ layoutAlign="top" class="oils-header-panel">
+ <div>Fund Tags</div>
+ <div>
+ <button dojoType="dijit.form.Button"
+ onClick="ftGrid.showCreateDialog()">New Fund Tag</button>
+ <button dojoType="dijit.form.Button"
+ onClick="ftGrid.deleteSelected()">Delete Selected</button>
+ </div>
+ </div>
+ <div class="oils-acq-basic-roomy">
+ <span>Owned by</span>
+ <select
+ dojoType="openils.widget.OrgUnitFilteringSelect"
+ jsId="ftOwnerSelect"
+ searchAttr="shortname" labelAttr="shortname">
+ </select>
+ <span>or a descendant of the same:</span>
+ </div>
+ <table jsId="ftGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'owner', 'name']"
+ query="{id: '*'}"
+ defaultCellWidth="20"
+ fmClass="acqft"
+ editOnEnter="true">
+ </table>
+</div>
+[% END %]
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-03-25 18:07:56 UTC (rev 15980)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-03-25 18:47:14 UTC (rev 15981)
@@ -623,6 +623,10 @@
['oncommand'],
function() { open_eg_web_page('conify/global/acq/lineitem_alert'); }
],
+ 'cmd_server_admin_acq_fund_tag' : [
+ ['oncommand'],
+ function() { open_eg_web_page('conify/global/acq/fund_tag'); }
+ ],
'cmd_server_admin_acq_cancel_reason' : [
['oncommand'],
function() { open_eg_web_page('conify/global/acq/cancel_reason'); }
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-03-25 18:07:56 UTC (rev 15980)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-03-25 18:47:14 UTC (rev 15981)
@@ -130,6 +130,7 @@
<command id="cmd_server_admin_billing_type"/>
<command id="cmd_server_admin_acq_cancel_reason"/>
<command id="cmd_server_admin_acq_lineitem_alert"/>
+ <command id="cmd_server_admin_acq_fund_tag"/>
<command id="cmd_server_admin_z39_source"/>
<command id="cmd_server_admin_circ_mod"/>
<command id="cmd_server_admin_org_unit_setting_type"/>
@@ -351,6 +352,7 @@
<menu id="main.menu.admin.server.acq" label="&staff.main.menu.admin.server_admin.acq.label;" accesskey="&staff.main.menu.admin.server_admin.acq.accesskey;">
<menupopup id="main.menu.admin.server.acq.popup">
<menuitem label="&staff.main.menu.admin.server_admin.acq.lineitem_alert.label;" accesskey="&staff.main.menu.admin.server_admin.acq.lineitem_alert.accesskey;" command="cmd_server_admin_acq_lineitem_alert"/>
+ <menuitem label="&staff.main.menu.admin.server_admin.acq.fund_tag.label;" accesskey="&staff.main.menu.admin.server_admin.acq.fund_tag.accesskey;" command="cmd_server_admin_acq_fund_tag"/>
<menuitem label="&staff.main.menu.admin.server_admin.acq.cancel_reason.label;" accesskey="&staff.main.menu.admin.server_admin.acq.cancel_reason.accesskey;" command="cmd_server_admin_acq_cancel_reason"/>
</menupopup>
</menu>
More information about the open-ils-commits
mailing list