[open-ils-commits] r17721 - in branches/rel_2_0/Open-ILS/web: js/dojo/openils/widget templates (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 15 22:39:59 EDT 2010
Author: senator
Date: 2010-09-15 22:39:56 -0400 (Wed, 15 Sep 2010)
New Revision: 17721
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js
branches/rel_2_0/Open-ILS/web/templates/base.tt2
Log:
Backport IDL-chunking work for interfaces under web/templates, as well as
AutoWidget/AutoFieldWidget improvements to deal with some cases of not having
an IDL class preloaded.
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2010-09-16 02:30:57 UTC (rev 17720)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2010-09-16 02:39:56 UTC (rev 17721)
@@ -56,10 +56,17 @@
}
this.dijitArgs['scrollOnFocus'] = false;
+
// find the field description in the IDL if not provided
if(this.fmObject)
this.fmClass = this.fmObject.classname;
this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+
+ if(this.fmClass && !this.fmIDL) {
+ fieldmapper.IDL.load([this.fmClass]);
+ this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+ }
+
this.suppressLinkedFields = args.suppressLinkedFields || [];
if(this.selfReference) {
@@ -358,6 +365,8 @@
_getLinkSelector : function() {
var linkClass = this.idlField['class'];
if(this.idlField.reltype != 'has_a') return false;
+ if(!fieldmapper.IDL.fmclasses[linkClass]) // class neglected by AutoIDL
+ fieldmapper.IDL.load([this.fmClass]);
if(!fieldmapper.IDL.fmclasses[linkClass].permacrud) return false;
if(!fieldmapper.IDL.fmclasses[linkClass].permacrud.retrieve) return false;
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js 2010-09-16 02:30:57 UTC (rev 17720)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js 2010-09-16 02:39:56 UTC (rev 17721)
@@ -20,6 +20,10 @@
if(this.fmObject)
this.fmClass = this.fmObject.classname;
this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+ if(!this.fmIDL) {
+ fieldmapper.IDL.load([this.fmClass]);
+ this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+ }
this.buildSortedFieldList();
},
Modified: branches/rel_2_0/Open-ILS/web/templates/base.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/base.tt2 2010-09-16 02:30:57 UTC (rev 17720)
+++ branches/rel_2_0/Open-ILS/web/templates/base.tt2 2010-09-16 02:39:56 UTC (rev 17721)
@@ -10,8 +10,18 @@
href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %].css' />
<link rel='stylesheet' type='text/css'
href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %].css' />
- <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/dojo.js"
- djConfig="parseOnLoad: true, isDebug:false"></script>
+ <script type="text/javascript">
+var djConfig = {parseOnLoad:true,isDebug:false,AutoIDL:[
+'aou','aout','pgt','lasso','mvr','acp','circ','ccmcmt','asvq','asva','asv','acplo','acqf','acqdfe',
+'vmp','cbs','viiad','vqarad','vqbrad','aoa','ac','aua','asvr','actscecm','acqim','acqct','acqexr',
+'acqpro','acqpron','acqipm','acqinv','acqie','acqii','acqpa','acqpc','acqpca','acqftr','acqfc','acqfy','acqfs',
+'acqfscred','acqofscred','acqfdeb','acqf','acqfat','acqfdt','acqfet','acqfst','acqfcb','acqafat','acqafet',
+'acqafst','acqafsb','acqafcb','acqfsrcct','acqfsrcat','acqfsrcb','acqfsb','acqfa','acqfap','acqpl','acqcr',
+'acqpo','acqpoh','acqpon','acqpoi','acqlih','acqliat','acqlin','acqlia','acqlid','acqliad','acqlimad',
+'acqligad','acqliuad','acqlipad','acqphsm','acqlilad','acqedi','acqedim','acqdf','acqdfe','acqdfa','acqda',
+'acqclt','acqclet','acqcl','acqcle','acqscl','acqscle','acqclp','acqclpa','acqlisum','acqft','acqftm','jub','sdist','ssub','sstr','scap','bre','siss','act', 'acpl', 'ccm', 'aiit', 'atevdef', 'ath', 'atreact', 'atval','crahp','crmf','crrf','crcd','cust','coust','cgf','czs','cbt','csp','brt','brsrc','bra','bram','brav']};
+ </script>
+ <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/dojo.js"></script>
<script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/openils_dojo.js"></script>
<script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/opensrf/md5.js"></script>
<script type="text/javascript">
More information about the open-ils-commits
mailing list