From 2f01fe57a8d37767827d6db42850aef86a767c53 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Nov 2010 10:39:52 +0300 Subject: add dijit/dojo stuff; initial ui mockup --- lib/dojo/_base/lang.js | 148 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 lib/dojo/_base/lang.js (limited to 'lib/dojo/_base/lang.js') diff --git a/lib/dojo/_base/lang.js b/lib/dojo/_base/lang.js new file mode 100644 index 000000000..e7721a352 --- /dev/null +++ b/lib/dojo/_base/lang.js @@ -0,0 +1,148 @@ +/* + Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojo._base.lang"]){ +dojo._hasResource["dojo._base.lang"]=true; +dojo.provide("dojo._base.lang"); +(function(){ +var d=dojo,_1=Object.prototype.toString; +dojo.isString=function(it){ +return (typeof it=="string"||it instanceof String); +}; +dojo.isArray=function(it){ +return it&&(it instanceof Array||typeof it=="array"); +}; +dojo.isFunction=function(it){ +return _1.call(it)==="[object Function]"; +}; +dojo.isObject=function(it){ +return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it)); +}; +dojo.isArrayLike=function(it){ +return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length)); +}; +dojo.isAlien=function(it){ +return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it)); +}; +dojo.extend=function(_2,_3){ +for(var i=1,l=arguments.length;i2){ +return d._hitchArgs.apply(d,arguments); +} +if(!_a){ +_a=_9; +_9=null; +} +if(d.isString(_a)){ +_9=_9||d.global; +if(!_9[_a]){ +throw (["dojo.hitch: scope[\"",_a,"\"] is null (scope=\"",_9,"\")"].join("")); +} +return function(){ +return _9[_a].apply(_9,arguments||[]); +}; +} +return !_9?_a:function(){ +return _a.apply(_9,arguments||[]); +}; +}; +dojo.delegate=dojo._delegate=(function(){ +function _b(){ +}; +return function(_c,_d){ +_b.prototype=_c; +var _e=new _b(); +_b.prototype=null; +if(_d){ +d._mixin(_e,_d); +} +return _e; +}; +})(); +var _f=function(obj,_10,_11){ +return (_11||[]).concat(Array.prototype.slice.call(obj,_10||0)); +}; +var _12=function(obj,_13,_14){ +var arr=_14||[]; +for(var x=_13||0;x