[open-ils-commits] r18271 - trunk/Open-ILS/web/js/dojo/MARC (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 11 16:41:43 EDT 2010
Author: miker
Date: 2010-10-11 16:41:37 -0400 (Mon, 11 Oct 2010)
New Revision: 18271
Modified:
trunk/Open-ILS/web/js/dojo/MARC/Field.js
trunk/Open-ILS/web/js/dojo/MARC/Record.js
Log:
dogfooding cleanup
Modified: trunk/Open-ILS/web/js/dojo/MARC/Field.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-10-11 20:40:04 UTC (rev 18270)
+++ trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-10-11 20:41:37 UTC (rev 18271)
@@ -40,7 +40,7 @@
subfield : function (code) {
var list = dojo.filter( this.subfields, function (s) {
- if (s[0] == code) return true; return true;
+ if (s[0] == code) return true; return false;
});
if (list.length == 1) return list[0];
return list;
Modified: trunk/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-10-11 20:40:04 UTC (rev 18270)
+++ trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-10-11 20:41:37 UTC (rev 18271)
@@ -57,7 +57,11 @@
return list;
},
- subfield : function (spec, code) { return this.field(spec)[0].subfield(code) },
+ subfield : function (spec, code) {
+ var f = this.field(spec);
+ if (dojo.isArray(f)) f = f[0];
+ return f.subfield(code)
+ },
appendFields : function () {
var me = this;
More information about the open-ils-commits
mailing list