[open-ils-commits] r17477 - trunk/Open-ILS/web/js/dojo/MARC (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 3 13:35:04 EDT 2010
Author: miker
Date: 2010-09-03 13:35:00 -0400 (Fri, 03 Sep 2010)
New Revision: 17477
Modified:
trunk/Open-ILS/web/js/dojo/MARC/Record.js
Log:
use slice to clone arguments as an array, because arguments does not support splice
Modified: trunk/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-09-03 17:30:36 UTC (rev 17476)
+++ trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-09-03 17:35:00 UTC (rev 17477)
@@ -83,12 +83,13 @@
},
insertFieldsBefore : function (target) {
- arguments.splice(0,1);
+ var args = Array.prototype.slice.call(arguments);
+ args.splice(0,1);
var me = this;
for (var j = 0; j < this.fields.length; j++) {
if (target === this.fields[j]) {
j--;
- dojo.forEach( arguments, function (f) {
+ dojo.forEach( args, function (f) {
me.fields.splice(j++,0,f);
});
break;
@@ -97,11 +98,12 @@
},
insertFieldsAfter : function (target) {
- arguments.splice(0,1);
+ var args = Array.prototype.slice.call(arguments);
+ args.splice(0,1);
var me = this;
for (var j = 0; j < this.fields.length; j++) {
if (target === this.fields[j]) {
- dojo.forEach( arguments, function (f) {
+ dojo.forEach( args, function (f) {
me.fields.splice(j++,0,f);
});
break;
More information about the open-ils-commits
mailing list