Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / lang / oo / rearrange.js @ 10

History | View | Annotate | Download (885 Bytes)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.lang.oo.rearrange"]){
9
dojo._hasResource["dojox.lang.oo.rearrange"]=true;
10
dojo.provide("dojox.lang.oo.rearrange");
11
(function(){
12
var _1=dojo._extraNames,_2=_1.length,_3=Object.prototype.toString,_4={};
13
dojox.lang.oo.rearrange=function(_5,_6){
14
var _7,_8,_9,i,t;
15
for(_7 in _6){
16
_8=_6[_7];
17
if(!_8||_3.call(_8)=="[object String]"){
18
_9=_5[_7];
19
if(!(_7 in _4)||_4[_7]!==_9){
20
if(!(delete _5[_7])){
21
_5[_7]=undefined;
22
}
23
if(_8){
24
_5[_8]=_9;
25
}
26
}
27
}
28
}
29
if(_2){
30
for(i=0;i<_2;++i){
31
_7=_1[i];
32
_8=_6[_7];
33
if(!_8||_3.call(_8)=="[object String]"){
34
_9=_5[_7];
35
if(!(_7 in _4)||_4[_7]!==_9){
36
if(!(delete _5[_7])){
37
_5[_7]=undefined;
38
}
39
if(_8){
40
_5[_8]=_9;
41
}
42
}
43
}
44
}
45
}
46
return _5;
47
};
48
})();
49
}