[open-ils-commits] r13830 - in trunk/Open-ILS/web: js/ui/default/acq/financial templates/default/acq/financial (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 13 17:06:39 EDT 2009
Author: erickson
Date: 2009-08-13 17:06:33 -0400 (Thu, 13 Aug 2009)
New Revision: 13830
Removed:
trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js
trunk/Open-ILS/web/templates/default/acq/financial/list_providers.tt2
Log:
removing old provider list code
Deleted: trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js 2009-08-13 18:30:59 UTC (rev 13829)
+++ trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js 2009-08-13 21:06:33 UTC (rev 13830)
@@ -1,44 +0,0 @@
-dojo.require("dijit.Dialog");
-dojo.require("dijit.form.FilteringSelect");
-dojo.require('dijit.form.Button');
-dojo.require('dojox.grid.DataGrid');
-dojo.require('dojo.data.ItemFileWriteStore');
-dojo.require('openils.acq.CurrencyType');
-dojo.require('openils.Event');
-dojo.require('openils.Util');
-dojo.require('openils.acq.Provider');
-dojo.require("fieldmapper.OrgUtils");
-dojo.require('openils.widget.OrgUnitFilteringSelect');
-
-function getOrgInfo(rowIndex, item) {
- if(!item) return '';
- var owner = this.grid.store.getValue(item, 'owner');
- return fieldmapper.aou.findOrgUnit(owner).shortname();
-}
-
-function loadProviderGrid() {
- var store = new dojo.data.ItemFileWriteStore({data:acqpro.initStoreData()});
- providerListGrid.setStore(store);
- providerListGrid.render();
-
- fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.provider.org.retrieve'],
- { async: true,
- params: [openils.User.authtoken],
- onresponse : function(r) {
- if( lp = openils.Util.readResponse(r)) {
- openils.acq.Provider.cache[lp.id()] = lp;
- store.newItem(acqpro.toStoreItem(lp));
- }
- }
- }
-
- );
-}
-
-function createProvider(fields) {
- openils.acq.Provider.create(fields, function(){loadProviderGrid()});
-}
-
-
-openils.Util.addOnLoad(loadProviderGrid);
Deleted: trunk/Open-ILS/web/templates/default/acq/financial/list_providers.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/financial/list_providers.tt2 2009-08-13 18:30:59 UTC (rev 13829)
+++ trunk/Open-ILS/web/templates/default/acq/financial/list_providers.tt2 2009-08-13 21:06:33 UTC (rev 13830)
@@ -1,81 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-<script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_providers.js'> </script>
-
-<div id='oils-acq-list-header' class='container'>
- <div id='oils-acq-list-header-label'>Providers</div>
-</div>
-
-<div class='oils-acq-actions-div'>
- <div dojoType="dijit.form.DropDownButton">
- <span>New Provider</span>
-
- <div dojoType="dijit.TooltipDialog" execute="createProvider(arguments[0]);">
- <script type='dojo/connect' event='onOpen'>
- openils.acq.CurrencyType.loadSelectWidget(providerCurrencySelector);
- new openils.User().buildPermOrgSelector('ADMIN_PROVIDER', providerOwnerSelect);
- </script>
-
- <table class='dijitTooltipTable'>
- <tr>
- <td><label for="name">Name: </label></td>
- <td><input dojoType="dijit.form.TextBox" name="name"/></td>
- </tr>
- <tr>
- <td><label for="code">Code: </label></td>
- <td><input dojoType="dijit.form.TextBox" name="code"/></td>
- </tr>
- <tr>
- <td><label for="currency_type">Currency Type:</label></td>
- <td>
- <input jsId='providerCurrencySelector' name="currency_type"
- dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
- </input>
- </td>
- </tr>
- <tr>
- <td valign='top'><label for="owner">Owning Location:</label></td>
- <td>
- <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='providerOwnerSelect'
- searchAttr="shortname" name="owner" autocomplete="true" labelAttr='shortname'> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType=dijit.form.Button type="submit">Create</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
-</div>
-
-
-
-
-<!-- The main grid lives here -->
-<script>
- function getName(rowIndex, item) {
- if(!item) return;
- var name = this.grid.store.getValue(item, 'name');
- var id = this.grid.store.getValue(item, 'id');
- return '<a href="[% ctx.base_path %]/acq/provider/view/'+id+'">'+name+'</a>';
- }
-</script>
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="providerListGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
- <thead>
- <tr>
- <th field="id">ID</th>
- <th field="name" width='auto' get='getName'>Name</th>
- <th field="code">Code</th>
- <th field="owner" get='getOrgInfo'>Owner</th>
- <th field="currency_type">Currency Type</th>
- </tr>
- </thead>
- </table>
- </div>
-</div>
-
-[% END %]
-
More information about the open-ils-commits
mailing list