root / trunk / web / dojo / dojox / lang / oo / general.js @ 11
History | View | Annotate | Download (1.17 KB)
| 1 | 9 | andrej.cim | /*
|
|---|---|---|---|
| 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.general"]){ |
||
| 9 | dojo._hasResource["dojox.lang.oo.general"]=true; |
||
| 10 | dojo.provide("dojox.lang.oo.general");
|
||
| 11 | dojo.require("dojox.lang.oo.Decorator");
|
||
| 12 | (function(){
|
||
| 13 | var oo=dojox.lang.oo,md=oo.makeDecorator,_1=oo.general,_2=dojo.isFunction;
|
||
| 14 | _1.augment=md(function(_3,_4,_5){
|
||
| 15 | return typeof _5=="undefined"?_4:_5; |
||
| 16 | }); |
||
| 17 | _1.override=md(function(_6,_7,_8){
|
||
| 18 | return typeof _8!="undefined"?_7:_8; |
||
| 19 | }); |
||
| 20 | _1.shuffle=md(function(_9,_a,_b){
|
||
| 21 | return _2(_b)?function(){ |
||
| 22 | return _b.apply(this,_a.apply(this,arguments)); |
||
| 23 | }:_b; |
||
| 24 | }); |
||
| 25 | _1.wrap=md(function(_c,_d,_e){
|
||
| 26 | return function(){ |
||
| 27 | return _d.call(this,_e,arguments); |
||
| 28 | }; |
||
| 29 | }); |
||
| 30 | _1.tap=md(function(_f,_10,_11){
|
||
| 31 | return function(){ |
||
| 32 | _10.apply(this,arguments); |
||
| 33 | return this; |
||
| 34 | }; |
||
| 35 | }); |
||
| 36 | _1.before=md(function(_12,_13,_14){
|
||
| 37 | return _2(_14)?function(){ |
||
| 38 | _13.apply(this,arguments); |
||
| 39 | return _14.apply(this,arguments); |
||
| 40 | }:_13; |
||
| 41 | }); |
||
| 42 | _1.after=md(function(_15,_16,_17){
|
||
| 43 | return _2(_17)?function(){ |
||
| 44 | _17.apply(this,arguments); |
||
| 45 | return _16.apply(this,arguments); |
||
| 46 | }:_16; |
||
| 47 | }); |
||
| 48 | })(); |
||
| 49 | } |