[open-ils-commits] r9326 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
public/oils/media/js/openils/acq templates/oils
templates/oils/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 13 12:29:56 EDT 2008
Author: erickson
Date: 2008-04-13 11:52:06 -0400 (Sun, 13 Apr 2008)
New Revision: 9326
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html
Log:
using new openils.User class to manage authtokens
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js 2008-04-13 15:52:06 UTC (rev 9326)
@@ -28,7 +28,7 @@
*/
openils.acq.CurrencyType.fetchAll = function(onComplete) {
var req = new OpenSRF.ClientSession('open-ils.acq').request(
- 'open-ils.acq.currency_type.all.retrieve', oilsAuthtoken);
+ 'open-ils.acq.currency_type.all.retrieve', openils.User.authtoken);
req.oncomplete = function(r) {
var msg = r.recv();
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js 2008-04-13 15:52:06 UTC (rev 9326)
@@ -31,7 +31,7 @@
var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
var ses = new OpenSRF.ClientSession('open-ils.acq');
var req = ses.request('open-ils.acq.fund.org.retrieve',
- oilsAuthtoken, null, {flesh_summary:1});
+ openils.User.authtoken, null, {flesh_summary:1});
req.oncomplete = function(r) {
var msg
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js 2008-04-13 15:52:06 UTC (rev 9326)
@@ -31,7 +31,7 @@
/** Fetches the list of funding_sources and builds a grid from them */
var ses = new OpenSRF.ClientSession('open-ils.acq');
var req = ses.request('open-ils.acq.funding_source.org.retrieve',
- oilsAuthtoken, null, {flesh_summary:1});
+ openils.User.authtoken, null, {flesh_summary:1});
req.oncomplete = function(r) {
var msg
@@ -61,7 +61,7 @@
fs[field](fields[field]);
var ses = new OpenSRF.ClientSession('open-ils.acq');
- var req = ses.request('open-ils.acq.funding_source.create', oilsAuthtoken, fs);
+ var req = ses.request('open-ils.acq.funding_source.create', openils.User.authtoken, fs);
req.oncomplete = function(r) {
var msg = r.recv();
@@ -81,7 +81,7 @@
var ses = new OpenSRF.ClientSession('open-ils.acq');
var req = ses.request(
- 'open-ils.acq.funding_source_credit.create', oilsAuthtoken, fsc);
+ 'open-ils.acq.funding_source_credit.create', openils.User.authtoken, fsc);
req.oncomplete = function(r) {
var msg = r.recv();
@@ -110,7 +110,7 @@
return onComplete();
var ses = new OpenSRF.ClientSession('open-ils.acq');
- var req = ses.request('open-ils.acq.funding_source.delete', oilsAuthtoken, list[idx]);
+ var req = ses.request('open-ils.acq.funding_source.delete', openils.User.authtoken, list[idx]);
delete openils.acq.FundingSource.cache[list[idx]];
req.oncomplete = function(r) {
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js 2008-04-13 15:52:06 UTC (rev 9326)
@@ -25,7 +25,7 @@
var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
var ses = new OpenSRF.ClientSession('open-ils.acq');
var req = ses.request('open-ils.acq.lineitem.picklist.retrieve',
- oilsAuthtoken, pl_id, {flesh_attrs:1});
+ openils.User.authtoken, pl_id, {flesh_attrs:1});
req.oncomplete = function(r) {
var msg
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js 2008-04-13 15:52:06 UTC (rev 9326)
@@ -31,7 +31,7 @@
var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
var ses = new OpenSRF.ClientSession('open-ils.acq');
- var req = ses.request('open-ils.acq.provider.org.retrieve', oilsAuthtoken);
+ var req = ses.request('open-ils.acq.provider.org.retrieve', openils.User.authtoken);
req.oncomplete = function(r) {
var msg
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html 2008-04-13 15:52:06 UTC (rev 9326)
@@ -33,12 +33,6 @@
</%def>
<%def name='block_js()'>
-
- <!-- set up some global JS variables -->
- <script type='text/javascript'>
- var oilsAuthtoken = '${c.oils.core.authtoken.value}';
- </script>
-
<!-- some of these will dojo-ized ... -->
<script src='${c.oils.core.media_prefix.value}/js/opensrf/JSON_v1.js'> </script>
<script src='${c.oils.core.media_prefix.value}/js/opensrf/opensrf.js'> </script>
@@ -65,6 +59,12 @@
dojo.require("dojox.grid._data.model");
dojo.require("fieldmapper.dojoData");
dojo.require("fieldmapper.OrgUtils");
+ dojo.require("openils.User");
</script>
+
+ <!-- set up some global JS variables -->
+ <script type='text/javascript'>
+ openils.User.authtoken = '${c.oils.core.authtoken.value}';
+ </script>
</%def>
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html 2008-04-13 15:51:04 UTC (rev 9325)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html 2008-04-13 15:52:06 UTC (rev 9326)
@@ -32,7 +32,7 @@
/** fetch the fleshed funding source ----- */
function loadFS() {
var req = ses.request(
- 'open-ils.acq.funding_source.retrieve', oilsAuthtoken, fundingSourceID,
+ 'open-ils.acq.funding_source.retrieve', openils.User.authtoken, fundingSourceID,
{flesh_summary:1, flesh_credits:1,flesh_allocations:1}
);
@@ -65,7 +65,7 @@
if(!data) return;
var fundId = data.fund;
if(!fundCache[fundId]) {
- req = ses.request('open-ils.acq.fund.retrieve', oilsAuthtoken, fundId);
+ req = ses.request('open-ils.acq.fund.retrieve', openils.User.authtoken, fundId);
req.timeout = 10;
req.send();
fundCache[fundId] = req.recv().content();
More information about the open-ils-commits
mailing list