Changeset 1088
- Timestamp:
- 10/13/08 21:06:08 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
XinhaCore.js (modified) (1 diff)
-
modules/Dialogs/XinhaDialog.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r1085 r1088 6515 6515 Xinha.collectionToArray = function(collection) 6516 6516 { 6517 try 6518 { 6519 return collection.length ? Array.prototype.slice.call(collection) : []; //Collection to Array 6520 } 6521 catch(e) 6522 { 6523 // In certain implementations (*cough* IE), you can't call slice on a 6524 // collection. We'll fallback to using the simple, non-native iterative 6525 // approach. 6526 } 6527 6517 6528 var array = [ ]; 6518 6529 for ( var i = 0; i < collection.length; i++ ) -
trunk/modules/Dialogs/XinhaDialog.js
r1087 r1088 529 529 { 530 530 var els = this.document.getElementsByName(this.id[name] ? this.id[name] : name); 531 return els.length ? Array.prototype.slice.call(els) : []; //Collection to Array531 return Xinha.collectionToArray(els); 532 532 }; 533 533 /** Return all elements in the dialog that have the given class
