Changeset 1513
- Timestamp:
- 03/25/08 06:03:47 (2 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
Compatibility/Element/Element.js (modified) (1 diff)
-
Compatibility/Native/Hash.js (modified) (1 diff)
-
Source/Core/Core.js (modified) (4 diffs)
-
Source/Element/Element.js (modified) (3 diffs)
-
Source/Native/Hash.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compatibility/Element/Element.js
r1484 r1513 21 21 }); 22 22 23 Element.alias( 'dispose', 'remove').alias('getLast', 'getLastChild');23 Element.alias({'dispose': 'remove', 'getLast': 'getLastChild'}); 24 24 25 25 Element.implement({ -
trunk/Compatibility/Native/Hash.js
r1116 r1513 1 Hash.alias( 'getKeys', 'keys').alias('getValues', 'values').alias('has', 'hasKey');1 Hash.alias({'getKeys': 'keys', 'getValues': 'values', 'has': 'hasKey'}); 2 2 var Abstract = Hash; -
trunk/Source/Core/Core.js
r1488 r1513 52 52 return obj; 53 53 }; 54 54 55 55 object.implement = function(a1, a2, a3){ 56 56 if (typeof a1 == 'string') return add(this, a1, a2, a3); … … 58 58 return this; 59 59 }; 60 61 object.alias = function(existing, property, force){ 62 existing = this.prototype[existing]; 63 if (existing) add(this, property, existing, force); 60 61 object.alias = function(a1, a2, a3){ 62 if (typeof a1 == 'string'){ 63 a1 = this.prototype[a1]; 64 if (a1) add(this, a2, a1, a3); 65 } else { 66 for (var a in a1) this.alias(a, a1[a], a2); 67 } 64 68 return this; 65 69 }; … … 83 87 return ($type(item) === family); 84 88 }; 89 }; 90 91 Native.alias = function(objects, a1, a2, a3){ 92 for (var i = 0, j = objects.length; i < j; i++) objects[i].alias(a1, a2, a3); 85 93 }; 86 94 … … 140 148 unlinked = {}; 141 149 for (var p in object) unlinked[p] = $unlink(object[p]); 150 break; 151 case 'hash': 152 unlinked = {}; 153 object.each(function(p, v){ 154 unlinked[p] = $unlink(v); 155 }); 142 156 break; 143 157 case 'array': -
trunk/Source/Element/Element.js
r1508 r1513 84 84 }); 85 85 if (host && host == window.location.host){ 86 iframe.window = iframe.contentWindow; 87 var win = new Window(iframe.window); 88 var doc = new Document(iframe.window.document); 86 var win = new Window(iframe.contentWindow); 87 var doc = new Document(iframe.contentWindow.document); 89 88 $extend(win.Element.prototype, Element.Prototype); 90 89 } … … 596 595 }); 597 596 597 Native.alias([Element, Document], {getElement: 'find', getElements: 'search'}); 598 598 599 Element.Attributes = new Hash({ 599 600 Props: {'html': 'innerHTML', 'class': 'className', 'for': 'htmlFor', 'text': (Browser.Engine.trident) ? 'innerText' : 'textContent'}, … … 621 622 Element.dispose(item); 622 623 } 623 if (item. removeEvents) item.removeEvents();624 if (item.uid && item.removeEvents) item.removeEvents(); 624 625 }; 625 626 -
trunk/Source/Native/Hash.js
r1483 r1513 133 133 }); 134 134 135 Hash.alias( 'keyOf', 'indexOf').alias('hasValue', 'contains');135 Hash.alias({keyOf: 'indexOf', hasValue: 'contains'});