Automated build for v0.01
This commit is contained in:
8
lib/dojo/_base/Color.js
Normal file
8
lib/dojo/_base/Color.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/Color",["./kernel","./lang","./array","./config"],function(_1,_2,_3,_4){var _5=_1.Color=function(_6){if(_6){this.setColor(_6);}};_5.named={"black":[0,0,0],"silver":[192,192,192],"gray":[128,128,128],"white":[255,255,255],"maroon":[128,0,0],"red":[255,0,0],"purple":[128,0,128],"fuchsia":[255,0,255],"green":[0,128,0],"lime":[0,255,0],"olive":[128,128,0],"yellow":[255,255,0],"navy":[0,0,128],"blue":[0,0,255],"teal":[0,128,128],"aqua":[0,255,255],"transparent":_4.transparentColor||[0,0,0,0]};_2.extend(_5,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_7){if(_2.isString(_7)){_5.fromString(_7,this);}else{if(_2.isArray(_7)){_5.fromArray(_7,this);}else{this._set(_7.r,_7.g,_7.b,_7.a);if(!(_7 instanceof _5)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var _8=_3.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+_8.join("");},toCss:function(_9){var t=this,_a=t.r+", "+t.g+", "+t.b;return (_9?"rgba("+_a+", "+t.a:"rgb("+_a)+")";},toString:function(){return this.toCss(true);}});_5.blendColors=_1.blendColors=function(_b,_c,_d,_e){var t=_e||new _5();t.r=Math.round(_b.r+(_c.r-_b.r)*_d);t.g=Math.round(_b.g+(_c.g-_b.g)*_d);t.b=Math.round(_b.b+(_c.b-_b.b)*_d);t.a=_b.a+(_c.a-_b.a)*_d;return t.sanitize();};_5.fromRgb=_1.colorFromRgb=function(_f,obj){var m=_f.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&_5.fromArray(m[1].split(/\s*,\s*/),obj);};_5.fromHex=_1.colorFromHex=function(_10,obj){var t=obj||new _5(),_11=(_10.length==4)?4:8,_12=(1<<_11)-1;_10=Number("0x"+_10.substr(1));if(isNaN(_10)){return null;}_3.forEach(["b","g","r"],function(x){var c=_10&_12;_10>>=_11;t[x]=_11==4?17*c:c;});t.a=1;return t;};_5.fromArray=_1.colorFromArray=function(a,obj){var t=obj||new _5();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};_5.fromString=_1.colorFromString=function(str,obj){var a=_5.named[str];return a&&_5.fromArray(a,obj)||_5.fromRgb(str,obj)||_5.fromHex(str,obj);};return _5;});
|
8
lib/dojo/_base/Deferred.js
Normal file
8
lib/dojo/_base/Deferred.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/Deferred",["./kernel","../Deferred","../promise/Promise","../errors/CancelError","../has","./lang","../when"],function(_1,_2,_3,_4,_5,_6,_7){var _8=function(){};var _9=Object.freeze||function(){};var _a=_1.Deferred=function(_b){var _c,_d,_e,_f,_10,_11,_12;var _13=(this.promise=new _3());function _14(_15){if(_d){throw new Error("This deferred has already been resolved");}_c=_15;_d=true;_16();};function _16(){var _17;while(!_17&&_12){var _18=_12;_12=_12.next;if((_17=(_18.progress==_8))){_d=false;}var _19=(_10?_18.error:_18.resolved);if(_5("config-useDeferredInstrumentation")){if(_10&&_2.instrumentRejected){_2.instrumentRejected(_c,!!_19);}}if(_19){try{var _1a=_19(_c);if(_1a&&typeof _1a.then==="function"){_1a.then(_6.hitch(_18.deferred,"resolve"),_6.hitch(_18.deferred,"reject"),_6.hitch(_18.deferred,"progress"));continue;}var _1b=_17&&_1a===undefined;if(_17&&!_1b){_10=_1a instanceof Error;}_18.deferred[_1b&&_10?"reject":"resolve"](_1b?_c:_1a);}catch(e){_18.deferred.reject(e);}}else{if(_10){_18.deferred.reject(_c);}else{_18.deferred.resolve(_c);}}}};this.isResolved=_13.isResolved=function(){return _f==0;};this.isRejected=_13.isRejected=function(){return _f==1;};this.isFulfilled=_13.isFulfilled=function(){return _f>=0;};this.isCanceled=_13.isCanceled=function(){return _e;};this.resolve=this.callback=function(_1c){this.fired=_f=0;this.results=[_1c,null];_14(_1c);};this.reject=this.errback=function(_1d){_10=true;this.fired=_f=1;if(_5("config-useDeferredInstrumentation")){if(_2.instrumentRejected){_2.instrumentRejected(_1d,!!_12);}}_14(_1d);this.results=[null,_1d];};this.progress=function(_1e){var _1f=_12;while(_1f){var _20=_1f.progress;_20&&_20(_1e);_1f=_1f.next;}};this.addCallbacks=function(_21,_22){this.then(_21,_22,_8);return this;};_13.then=this.then=function(_23,_24,_25){var _26=_25==_8?this:new _a(_13.cancel);var _27={resolved:_23,error:_24,progress:_25,deferred:_26};if(_12){_11=_11.next=_27;}else{_12=_11=_27;}if(_d){_16();}return _26.promise;};var _28=this;_13.cancel=this.cancel=function(){if(!_d){var _29=_b&&_b(_28);if(!_d){if(!(_29 instanceof Error)){_29=new _4(_29);}_29.log=false;_28.reject(_29);}}_e=true;};_9(_13);};_6.extend(_a,{addCallback:function(_2a){return this.addCallbacks(_6.hitch.apply(_1,arguments));},addErrback:function(_2b){return this.addCallbacks(null,_6.hitch.apply(_1,arguments));},addBoth:function(_2c){var _2d=_6.hitch.apply(_1,arguments);return this.addCallbacks(_2d,_2d);},fired:-1});_a.when=_1.when=_7;return _a;});
|
8
lib/dojo/_base/NodeList.js
Normal file
8
lib/dojo/_base/NodeList.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/NodeList",["./kernel","../query","./array","./html","../NodeList-dom"],function(_1,_2,_3){var _4=_2.NodeList,_5=_4.prototype;_5.connect=_4._adaptAsForEach(function(){return _1.connect.apply(this,arguments);});_5.coords=_4._adaptAsMap(_1.coords);_4.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];_3.forEach(_4.events,function(_6){var _7="on"+_6;_5[_7]=function(a,b){return this.connect(_7,a,b);};});_1.NodeList=_4;return _4;});
|
8
lib/dojo/_base/array.js
Normal file
8
lib/dojo/_base/array.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/array",["./kernel","../has","./lang"],function(_1,_2,_3){var _4={},u;function _5(fn){return _4[fn]=new Function("item","index","array",fn);};function _6(_7){var _8=!_7;return function(a,fn,o){var i=0,l=a&&a.length||0,_9;if(l&&typeof a=="string"){a=a.split("");}if(typeof fn=="string"){fn=_4[fn]||_5(fn);}if(o){for(;i<l;++i){_9=!fn.call(o,a[i],i,a);if(_7^_9){return !_9;}}}else{for(;i<l;++i){_9=!fn(a[i],i,a);if(_7^_9){return !_9;}}}return _8;};};function _a(up){var _b=1,_c=0,_d=0;if(!up){_b=_c=_d=-1;}return function(a,x,_e,_f){if(_f&&_b>0){return _10.lastIndexOf(a,x,_e);}var l=a&&a.length||0,end=up?l+_d:_c,i;if(_e===u){i=up?_c:l+_d;}else{if(_e<0){i=l+_e;if(i<0){i=_c;}}else{i=_e>=l?l+_d:_e;}}if(l&&typeof a=="string"){a=a.split("");}for(;i!=end;i+=_b){if(a[i]==x){return i;}}return -1;};};var _10={every:_6(false),some:_6(true),indexOf:_a(true),lastIndexOf:_a(false),forEach:function(arr,_11,_12){var i=0,l=arr&&arr.length||0;if(l&&typeof arr=="string"){arr=arr.split("");}if(typeof _11=="string"){_11=_4[_11]||_5(_11);}if(_12){for(;i<l;++i){_11.call(_12,arr[i],i,arr);}}else{for(;i<l;++i){_11(arr[i],i,arr);}}},map:function(arr,_13,_14,Ctr){var i=0,l=arr&&arr.length||0,out=new (Ctr||Array)(l);if(l&&typeof arr=="string"){arr=arr.split("");}if(typeof _13=="string"){_13=_4[_13]||_5(_13);}if(_14){for(;i<l;++i){out[i]=_13.call(_14,arr[i],i,arr);}}else{for(;i<l;++i){out[i]=_13(arr[i],i,arr);}}return out;},filter:function(arr,_15,_16){var i=0,l=arr&&arr.length||0,out=[],_17;if(l&&typeof arr=="string"){arr=arr.split("");}if(typeof _15=="string"){_15=_4[_15]||_5(_15);}if(_16){for(;i<l;++i){_17=arr[i];if(_15.call(_16,_17,i,arr)){out.push(_17);}}}else{for(;i<l;++i){_17=arr[i];if(_15(_17,i,arr)){out.push(_17);}}}return out;},clearCache:function(){_4={};}};1&&_3.mixin(_1,_10);return _10;});
|
8
lib/dojo/_base/browser.js
Normal file
8
lib/dojo/_base/browser.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
if(require.has){require.has.add("config-selectorEngine","acme");}define("dojo/_base/browser",["../ready","./kernel","./connect","./unload","./window","./event","./html","./NodeList","../query","./xhr","./fx"],function(_1){return _1;});
|
8
lib/dojo/_base/config.js
Normal file
8
lib/dojo/_base/config.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/config",["../global","../has","require"],function(_1,_2,_3){var _4={};if(1){var _5=_3.rawConfig,p;for(p in _5){_4[p]=_5[p];}}else{var _6=function(_7,_8,_9){for(p in _7){p!="has"&&_2.add(_8+p,_7[p],0,_9);}};_4=1?_3.rawConfig:_1.dojoConfig||_1.djConfig||{};_6(_4,"config",1);_6(_4.has,"",1);}if(!_4.locale&&typeof navigator!="undefined"){var _a=(navigator.languages&&navigator.languages.length)?navigator.languages[0]:(navigator.language||navigator.userLanguage);if(_a){_4.locale=_a.toLowerCase();}}return _4;});
|
336
lib/dojo/_base/configFirefoxExtension.js
Normal file
336
lib/dojo/_base/configFirefoxExtension.js
Normal file
@ -0,0 +1,336 @@
|
||||
// TODO: this file needs to be converted to the v1.7 loader
|
||||
|
||||
// a host environment specifically built for Mozilla extensions, but derived
|
||||
// from the browser host environment
|
||||
if(typeof window != 'undefined'){
|
||||
dojo.isBrowser = true;
|
||||
dojo._name = "browser";
|
||||
|
||||
|
||||
// FIXME: PORTME
|
||||
// http://developer.mozilla.org/en/mozIJSSubScriptLoader
|
||||
|
||||
|
||||
// attempt to figure out the path to dojo if it isn't set in the config
|
||||
(function(){
|
||||
// this is a scope protection closure. We set browser versions and grab
|
||||
// the URL we were loaded from here.
|
||||
|
||||
// FIXME: need to probably use a different reference to "document" to get the hosting XUL environment
|
||||
|
||||
dojo.baseUrl = dojo.config.baseUrl;
|
||||
|
||||
// fill in the rendering support information in dojo.render.*
|
||||
var n = navigator;
|
||||
var dua = n.userAgent;
|
||||
var dav = n.appVersion;
|
||||
var tv = parseFloat(dav);
|
||||
|
||||
dojo.isMozilla = dojo.isMoz = tv;
|
||||
if(dojo.isMoz){
|
||||
dojo.isFF = parseFloat(dua.split("Firefox/")[1]) || undefined;
|
||||
}
|
||||
|
||||
// FIXME
|
||||
dojo.isQuirks = document.compatMode == "BackCompat";
|
||||
|
||||
// FIXME
|
||||
// TODO: is the HTML LANG attribute relevant?
|
||||
dojo.locale = dojo.config.locale || n.language.toLowerCase();
|
||||
|
||||
dojo._xhrObj = function(){
|
||||
return new XMLHttpRequest();
|
||||
};
|
||||
|
||||
// monkey-patch _loadUri to handle file://, chrome://, and resource:// url's
|
||||
var oldLoadUri = dojo._loadUri;
|
||||
dojo._loadUri = function(uri, cb){
|
||||
var handleLocal = ["file:", "chrome:", "resource:"].some(function(prefix){
|
||||
return String(uri).indexOf(prefix) == 0;
|
||||
});
|
||||
if(handleLocal){
|
||||
// see:
|
||||
// http://developer.mozilla.org/en/mozIJSSubScriptLoader
|
||||
var l = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
.getService(Components.interfaces.mozIJSSubScriptLoader);
|
||||
var value = l.loadSubScript(uri, dojo.global);
|
||||
if(cb){ cb(value); }
|
||||
return true;
|
||||
}else{
|
||||
// otherwise, call the pre-existing version
|
||||
return oldLoadUri.apply(dojo, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME: PORTME
|
||||
dojo._isDocumentOk = function(http){
|
||||
var stat = http.status || 0;
|
||||
return (stat >= 200 && stat < 300) || // Boolean
|
||||
stat == 304 || // allow any 2XX response code
|
||||
stat == 1223 || // get it out of the cache
|
||||
(!stat && (location.protocol == "file:" || location.protocol == "chrome:") );
|
||||
};
|
||||
|
||||
// FIXME: PORTME
|
||||
// var owloc = window.location+"";
|
||||
// var base = document.getElementsByTagName("base");
|
||||
// var hasBase = (base && base.length > 0);
|
||||
var hasBase = false;
|
||||
|
||||
dojo._getText = function(/*URI*/ uri, /*Boolean*/ fail_ok){
|
||||
// summary:
|
||||
// Read the contents of the specified uri and return those contents.
|
||||
// uri:
|
||||
// A relative or absolute uri. If absolute, it still must be in
|
||||
// the same "domain" as we are.
|
||||
// fail_ok:
|
||||
// Default false. If fail_ok and loading fails, return null
|
||||
// instead of throwing.
|
||||
// returns:
|
||||
// The response text. null is returned when there is a
|
||||
// failure and failure is okay (an exception otherwise)
|
||||
|
||||
// alert("_getText: " + uri);
|
||||
|
||||
// NOTE: must be declared before scope switches ie. this._xhrObj()
|
||||
var http = dojo._xhrObj();
|
||||
|
||||
if(!hasBase && dojo._Url){
|
||||
uri = (new dojo._Url(uri)).toString();
|
||||
}
|
||||
if(dojo.config.cacheBust){
|
||||
//Make sure we have a string before string methods are used on uri
|
||||
uri += "";
|
||||
uri += (uri.indexOf("?") == -1 ? "?" : "&") + String(dojo.config.cacheBust).replace(/\W+/g, "");
|
||||
}
|
||||
var handleLocal = ["file:", "chrome:", "resource:"].some(function(prefix){
|
||||
return String(uri).indexOf(prefix) == 0;
|
||||
});
|
||||
if(handleLocal){
|
||||
// see:
|
||||
// http://forums.mozillazine.org/viewtopic.php?p=921150#921150
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
var scriptableStream = Components
|
||||
.classes["@mozilla.org/scriptableinputstream;1"]
|
||||
.getService(Components.interfaces.nsIScriptableInputStream);
|
||||
|
||||
var channel = ioService.newChannel(uri, null, null);
|
||||
var input = channel.open();
|
||||
scriptableStream.init(input);
|
||||
var str = scriptableStream.read(input.available());
|
||||
scriptableStream.close();
|
||||
input.close();
|
||||
return str;
|
||||
}else{
|
||||
http.open('GET', uri, false);
|
||||
try{
|
||||
http.send(null);
|
||||
// alert(http);
|
||||
if(!dojo._isDocumentOk(http)){
|
||||
var err = Error("Unable to load " + uri + " status:" + http.status);
|
||||
err.status = http.status;
|
||||
err.responseText = http.responseText;
|
||||
throw err;
|
||||
}
|
||||
}catch(e){
|
||||
if(fail_ok){
|
||||
return null;
|
||||
} // null
|
||||
// rethrow the exception
|
||||
throw e;
|
||||
}
|
||||
return http.responseText; // String
|
||||
}
|
||||
};
|
||||
|
||||
dojo._windowUnloaders = [];
|
||||
|
||||
// FIXME: PORTME
|
||||
dojo.windowUnloaded = function(){
|
||||
// summary:
|
||||
// signal fired by impending window destruction. You may use
|
||||
// dojo.addOnWIndowUnload() or dojo.connect() to this method to perform
|
||||
// page/application cleanup methods. See dojo.addOnWindowUnload for more info.
|
||||
var mll = dojo._windowUnloaders;
|
||||
while(mll.length){
|
||||
(mll.pop())();
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME: PORTME
|
||||
dojo.addOnWindowUnload = function(/*Object?*/obj, /*String|Function?*/functionName){
|
||||
// summary:
|
||||
// registers a function to be triggered when window.onunload fires.
|
||||
// Be careful trying to modify the DOM or access JavaScript properties
|
||||
// during this phase of page unloading: they may not always be available.
|
||||
// Consider dojo.addOnUnload() if you need to modify the DOM or do heavy
|
||||
// JavaScript work.
|
||||
// example:
|
||||
// | dojo.addOnWindowUnload(functionPointer)
|
||||
// | dojo.addOnWindowUnload(object, "functionName")
|
||||
// | dojo.addOnWindowUnload(object, function(){ /* ... */});
|
||||
|
||||
dojo._onto(dojo._windowUnloaders, obj, functionName);
|
||||
};
|
||||
|
||||
// XUL specific APIs
|
||||
var contexts = [];
|
||||
var current = null;
|
||||
dojo._defaultContext = [ window, document ];
|
||||
|
||||
dojo.pushContext = function(/*Object|String?*/g, /*MDocumentElement?*/d){
|
||||
// summary:
|
||||
// causes subsequent calls to Dojo methods to assume the
|
||||
// passed object and, optionally, document as the default
|
||||
// scopes to use. A 2-element array of the previous global and
|
||||
// document are returned.
|
||||
// description:
|
||||
// dojo.pushContext treats contexts as a stack. The
|
||||
// auto-detected contexts which are initially provided using
|
||||
// dojo.setContext() require authors to keep state in order to
|
||||
// "return" to a previous context, whereas the
|
||||
// dojo.pushContext and dojo.popContext methods provide a more
|
||||
// natural way to augment blocks of code to ensure that they
|
||||
// execute in a different window or frame without issue. If
|
||||
// called without any arguments, the default context (the
|
||||
// context when Dojo is first loaded) is instead pushed into
|
||||
// the stack. If only a single string is passed, a node in the
|
||||
// intitial context's document is looked up and its
|
||||
// contextWindow and contextDocument properties are used as
|
||||
// the context to push. This means that iframes can be given
|
||||
// an ID and code can be executed in the scope of the iframe's
|
||||
// document in subsequent calls easily.
|
||||
// g:
|
||||
// The global context. If a string, the id of the frame to
|
||||
// search for a context and document.
|
||||
// d:
|
||||
// The document element to execute subsequent code with.
|
||||
var old = [dojo.global, dojo.doc];
|
||||
contexts.push(old);
|
||||
var n;
|
||||
if(!g && !d){
|
||||
n = dojo._defaultContext;
|
||||
}else{
|
||||
n = [ g, d ];
|
||||
if(!d && dojo.isString(g)){
|
||||
var t = document.getElementById(g);
|
||||
if(t.contentDocument){
|
||||
n = [t.contentWindow, t.contentDocument];
|
||||
}
|
||||
}
|
||||
}
|
||||
current = n;
|
||||
dojo.setContext.apply(dojo, n);
|
||||
return old; // Array
|
||||
};
|
||||
|
||||
dojo.popContext = function(){
|
||||
// summary:
|
||||
// If the context stack contains elements, ensure that
|
||||
// subsequent code executes in the *previous* context to the
|
||||
// current context. The current context set ([global,
|
||||
// document]) is returned.
|
||||
var oc = current;
|
||||
if(!contexts.length){
|
||||
return oc;
|
||||
}
|
||||
dojo.setContext.apply(dojo, contexts.pop());
|
||||
return oc;
|
||||
};
|
||||
|
||||
// FIXME:
|
||||
// don't really like the current arguments and order to
|
||||
// _inContext, so don't make it public until it's right!
|
||||
dojo._inContext = function(g, d, f){
|
||||
var a = dojo._toArray(arguments);
|
||||
f = a.pop();
|
||||
if(a.length == 1){
|
||||
d = null;
|
||||
}
|
||||
dojo.pushContext(g, d);
|
||||
var r = f();
|
||||
dojo.popContext();
|
||||
return r;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
dojo._initFired = false;
|
||||
// BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/)
|
||||
dojo._loadInit = function(e){
|
||||
dojo._initFired = true;
|
||||
// allow multiple calls, only first one will take effect
|
||||
// A bug in khtml calls events callbacks for document for event which isnt supported
|
||||
// for example a created contextmenu event calls DOMContentLoaded, workaround
|
||||
var type = (e && e.type) ? e.type.toLowerCase() : "load";
|
||||
if(arguments.callee.initialized || (type != "domcontentloaded" && type != "load")){ return; }
|
||||
arguments.callee.initialized = true;
|
||||
if(dojo._inFlightCount == 0){
|
||||
dojo._modulesLoaded();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
(function(){
|
||||
var _w = window;
|
||||
var _handleNodeEvent = function(evtName, fp){
|
||||
// summary:
|
||||
// non-destructively adds the specified function to the node's
|
||||
// evtName handler.
|
||||
// evtName: should be in the form "onclick" for "onclick" handlers.
|
||||
// Make sure you pass in the "on" part.
|
||||
var oldHandler = _w[evtName] || function(){};
|
||||
_w[evtName] = function(){
|
||||
fp.apply(_w, arguments);
|
||||
oldHandler.apply(_w, arguments);
|
||||
};
|
||||
};
|
||||
// FIXME: PORT
|
||||
// FIXME: dojo.unloaded requires dojo scope, so using anon function wrapper.
|
||||
_handleNodeEvent("onbeforeunload", function(){ dojo.unloaded(); });
|
||||
_handleNodeEvent("onunload", function(){ dojo.windowUnloaded(); });
|
||||
})();
|
||||
*/
|
||||
|
||||
|
||||
// FIXME: PORTME
|
||||
// this event fires a lot, namely for all plugin XUL overlays and for
|
||||
// all iframes (in addition to window navigations). We only want
|
||||
// Dojo's to fire once..but we might care if pages navigate. We'll
|
||||
// probably need an extension-specific API
|
||||
if(!dojo.config.afterOnLoad){
|
||||
window.addEventListener("DOMContentLoaded", function(e){
|
||||
dojo._loadInit(e);
|
||||
// console.log("DOM content loaded", e);
|
||||
}, false);
|
||||
}
|
||||
|
||||
} //if (typeof window != 'undefined')
|
||||
|
||||
//Register any module paths set up in djConfig. Need to do this
|
||||
//in the hostenvs since hostenv_browser can read djConfig from a
|
||||
//script tag's attribute.
|
||||
(function(){
|
||||
var mp = dojo.config["modulePaths"];
|
||||
if(mp){
|
||||
for(var param in mp){
|
||||
dojo.registerModulePath(param, mp[param]);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
//Load debug code if necessary.
|
||||
if(dojo.config.isDebug){
|
||||
// logging stub for extension logging
|
||||
console.log = function(m){
|
||||
var s = Components.classes["@mozilla.org/consoleservice;1"].getService(
|
||||
Components.interfaces.nsIConsoleService
|
||||
);
|
||||
s.logStringMessage(m);
|
||||
};
|
||||
console.debug = function(){
|
||||
console.log(dojo._toArray(arguments).join(" "));
|
||||
};
|
||||
// FIXME: what about the rest of the console.* methods? And is there any way to reach into firebug and log into it directly?
|
||||
}
|
108
lib/dojo/_base/configNode.js
Normal file
108
lib/dojo/_base/configNode.js
Normal file
@ -0,0 +1,108 @@
|
||||
exports.config = function(config){
|
||||
// summary:
|
||||
// This module provides bootstrap configuration for running dojo in node.js
|
||||
|
||||
// any command line arguments with the load flag are pushed into deps
|
||||
for(var deps = [], args = [], i = 0; i < process.argv.length; i++){
|
||||
var arg = (process.argv[i] + "").split("=");
|
||||
if(arg[0] == "load"){
|
||||
deps.push(arg[1]);
|
||||
}else if(arg[0] == "mapPackage") {
|
||||
var parts = arg[1].split(":"),
|
||||
name = parts[0],
|
||||
location=parts[1],
|
||||
isPrexisting = false;
|
||||
|
||||
for (var j = 0; j < config.packages.length; j++) {
|
||||
var pkg = config.packages[j];
|
||||
if (pkg.name === name) {
|
||||
pkg.location = location;
|
||||
isPrexisting = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isPrexisting) {
|
||||
config.packages.push({
|
||||
name: name,
|
||||
location: location
|
||||
});
|
||||
}
|
||||
}else{
|
||||
args.push(arg);
|
||||
}
|
||||
}
|
||||
|
||||
var fs = require("fs");
|
||||
|
||||
// make sure global require exists
|
||||
//if (typeof global.require=="undefined"){
|
||||
// global.require= {};
|
||||
//}
|
||||
|
||||
// reset the has cache with node-appropriate values;
|
||||
var hasCache = {
|
||||
"host-node":1,
|
||||
"host-browser":0,
|
||||
"dom":0,
|
||||
"dojo-has-api":1,
|
||||
"dojo-xhr-factory":0,
|
||||
"dojo-inject-api":1,
|
||||
"dojo-timeout-api":0,
|
||||
"dojo-trace-api":1,
|
||||
"dojo-dom-ready-api":0,
|
||||
"dojo-publish-privates":1,
|
||||
"dojo-sniff":0,
|
||||
"dojo-loader":1,
|
||||
"dojo-test-xd":0,
|
||||
"dojo-test-sniff":0
|
||||
};
|
||||
for(var p in hasCache){
|
||||
config.hasCache[p] = hasCache[p];
|
||||
}
|
||||
|
||||
var vm = require('vm'),
|
||||
path = require('path');
|
||||
|
||||
// reset some configuration switches with node-appropriate values
|
||||
var nodeConfig = {
|
||||
baseUrl: path.dirname(process.argv[1]),
|
||||
commandLineArgs:args,
|
||||
deps:deps,
|
||||
timeout:0,
|
||||
|
||||
// TODO: really get the locale
|
||||
locale:"en-us",
|
||||
|
||||
loaderPatch: {
|
||||
log:function(item){
|
||||
// define debug for console messages during dev instead of console.log
|
||||
// (node's heavy async makes console.log confusing sometimes)
|
||||
var util = require("util");
|
||||
util.debug(util.inspect(item));
|
||||
},
|
||||
|
||||
eval: function(__text, __urlHint){
|
||||
return vm.runInThisContext(__text, __urlHint);
|
||||
},
|
||||
|
||||
injectUrl: function(url, callback){
|
||||
try{
|
||||
vm.runInThisContext(fs.readFileSync(url, "utf8"), url);
|
||||
callback();
|
||||
}catch(e){
|
||||
this.log("failed to load resource (" + url + ")");
|
||||
this.log(e);
|
||||
}
|
||||
},
|
||||
|
||||
getText: function(url, sync, onLoad){
|
||||
// TODO: implement async and http/https handling
|
||||
onLoad(fs.readFileSync(url, "utf8"));
|
||||
}
|
||||
}
|
||||
};
|
||||
for(p in nodeConfig){
|
||||
config[p] = nodeConfig[p];
|
||||
}
|
||||
};
|
142
lib/dojo/_base/configRhino.js
Normal file
142
lib/dojo/_base/configRhino.js
Normal file
@ -0,0 +1,142 @@
|
||||
function rhinoDojoConfig(config, baseUrl, rhinoArgs){
|
||||
// summary:
|
||||
// This module provides bootstrap configuration for running dojo in rhino.
|
||||
|
||||
// TODO: v1.6 tries to set dojo.doc and dojo.body in rhino; why?
|
||||
|
||||
// get a minimal console up
|
||||
var log = function(hint, args){
|
||||
print((hint ? hint + ":" : "") + args[0]);
|
||||
for(var i = 1; i < args.length; i++){
|
||||
print(", " + args[i]);
|
||||
}
|
||||
};
|
||||
// intentionally define console in the global namespace
|
||||
console= {
|
||||
log: function(){ log(0, arguments); },
|
||||
error: function(){ log("ERROR", arguments); },
|
||||
warn: function(){ log("WARN", arguments); }
|
||||
};
|
||||
|
||||
// any command line arguments with the load flag are pushed into deps
|
||||
for(var deps = [], i = 0; i < rhinoArgs.length; i++){
|
||||
var arg = (rhinoArgs[i] + "").split("=");
|
||||
if(arg[0] == "load"){
|
||||
deps.push(arg[1]);
|
||||
}else if(arg[0] == "mapPackage") {
|
||||
var parts = arg[1].split(":"),
|
||||
name = parts[0],
|
||||
location=parts[1],
|
||||
isPrexisting = false;
|
||||
|
||||
for (var j = 0; j < config.packages.length; j++) {
|
||||
var pkg = config.packages[j];
|
||||
if (pkg.name === name) {
|
||||
pkg.location = location;
|
||||
isPrexisting = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isPrexisting) {
|
||||
config.packages.push({
|
||||
name: name,
|
||||
location: location
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// provides timed callbacks using Java threads
|
||||
if(typeof setTimeout == "undefined" || typeof clearTimeout == "undefined"){
|
||||
var timeouts = [];
|
||||
clearTimeout = function(idx){
|
||||
if(!timeouts[idx]){ return; }
|
||||
timeouts[idx].stop();
|
||||
};
|
||||
|
||||
setTimeout = function(func, delay){
|
||||
var def = {
|
||||
sleepTime:delay,
|
||||
hasSlept:false,
|
||||
|
||||
run:function(){
|
||||
if(!this.hasSlept){
|
||||
this.hasSlept = true;
|
||||
java.lang.Thread.currentThread().sleep(this.sleepTime);
|
||||
}
|
||||
try{
|
||||
func();
|
||||
}catch(e){
|
||||
console.debug("Error running setTimeout thread:" + e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var runnable = new java.lang.Runnable(def);
|
||||
var thread = new java.lang.Thread(runnable);
|
||||
thread.start();
|
||||
return timeouts.push(thread) - 1;
|
||||
};
|
||||
}
|
||||
|
||||
var isLocal = function(url){
|
||||
return (new java.io.File(url)).exists();
|
||||
};
|
||||
|
||||
// reset the has cache with node-appropriate values;
|
||||
var hasCache = {
|
||||
"host-rhino":1,
|
||||
"host-browser":0,
|
||||
"dom":0,
|
||||
"dojo-has-api":1,
|
||||
"dojo-xhr-factory":0,
|
||||
"dojo-inject-api":1,
|
||||
"dojo-timeout-api":0,
|
||||
"dojo-trace-api":1,
|
||||
"dojo-loader-catches":1,
|
||||
"dojo-dom-ready-api":0,
|
||||
"dojo-publish-privates":1,
|
||||
"dojo-sniff":0,
|
||||
"dojo-loader":1,
|
||||
"dojo-test-xd":0,
|
||||
"dojo-test-sniff":0
|
||||
};
|
||||
for(var p in hasCache){
|
||||
config.hasCache[p] = hasCache[p];
|
||||
}
|
||||
|
||||
// reset some configuration switches with rhino-appropriate values
|
||||
var rhinoConfig = {
|
||||
baseUrl:baseUrl,
|
||||
commandLineArgs:rhinoArgs,
|
||||
deps:deps,
|
||||
timeout:0,
|
||||
locale:String(java.util.Locale.getDefault().toString().replace('_', '-').toLowerCase()),
|
||||
|
||||
loaderPatch:{
|
||||
injectUrl: function(url, callback){
|
||||
try{
|
||||
if(isLocal(url)){
|
||||
load(url);
|
||||
}else{
|
||||
require.eval(readUrl(url, "UTF-8"));
|
||||
}
|
||||
callback();
|
||||
}catch(e){
|
||||
console.log("failed to load resource (" + url + ")");
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
|
||||
getText: function(url, sync, onLoad){
|
||||
// TODO: test https://bugzilla.mozilla.org/show_bug.cgi?id=471005; see v1.6 hostenv_rhino
|
||||
// note: async mode not supported in rhino
|
||||
onLoad(isLocal(url) ? readFile(url, "UTF-8") : readUrl(url, "UTF-8"));
|
||||
}
|
||||
}
|
||||
};
|
||||
for(p in rhinoConfig){
|
||||
config[p] = rhinoConfig[p];
|
||||
}
|
||||
}
|
80
lib/dojo/_base/configSpidermonkey.js
Normal file
80
lib/dojo/_base/configSpidermonkey.js
Normal file
@ -0,0 +1,80 @@
|
||||
// TODO: this file needs to be converted to the v1.7 loader
|
||||
|
||||
// module:
|
||||
// configSpidermonkey
|
||||
// summary:
|
||||
// SpiderMonkey host environment
|
||||
|
||||
if(dojo.config["baseUrl"]){
|
||||
dojo.baseUrl = dojo.config["baseUrl"];
|
||||
}else{
|
||||
dojo.baseUrl = "./";
|
||||
}
|
||||
|
||||
dojo._name = 'spidermonkey';
|
||||
|
||||
|
||||
|
||||
dojo.isSpidermonkey = true;
|
||||
dojo.exit = function(exitcode){
|
||||
quit(exitcode);
|
||||
};
|
||||
|
||||
if(typeof print == "function"){
|
||||
console.debug = print;
|
||||
}
|
||||
|
||||
if(typeof line2pc == 'undefined'){
|
||||
throw new Error("attempt to use SpiderMonkey host environment when no 'line2pc' global");
|
||||
}
|
||||
|
||||
dojo._spidermonkeyCurrentFile = function(depth){
|
||||
//
|
||||
// This is a hack that determines the current script file by parsing a
|
||||
// generated stack trace (relying on the non-standard "stack" member variable
|
||||
// of the SpiderMonkey Error object).
|
||||
//
|
||||
// If param depth is passed in, it'll return the script file which is that far down
|
||||
// the stack, but that does require that you know how deep your stack is when you are
|
||||
// calling.
|
||||
//
|
||||
var s = '';
|
||||
try{
|
||||
throw Error("whatever");
|
||||
}catch(e){
|
||||
s = e.stack;
|
||||
}
|
||||
// lines are like: bu_getCurrentScriptURI_spidermonkey("ScriptLoader.js")@burst/Runtime.js:101
|
||||
var matches = s.match(/[^@]*\.js/gi);
|
||||
if(!matches){
|
||||
throw Error("could not parse stack string: '" + s + "'");
|
||||
}
|
||||
var fname = (typeof depth != 'undefined' && depth) ? matches[depth + 1] : matches[matches.length - 1];
|
||||
if(!fname){
|
||||
throw Error("could not find file name in stack string '" + s + "'");
|
||||
}
|
||||
//print("SpiderMonkeyRuntime got fname '" + fname + "' from stack string '" + s + "'");
|
||||
return fname;
|
||||
};
|
||||
|
||||
// print(dojo._spidermonkeyCurrentFile(0));
|
||||
|
||||
dojo._loadUri = function(uri){
|
||||
// spidermonkey load() evaluates the contents into the global scope (which
|
||||
// is what we want).
|
||||
// TODO: sigh, load() does not return a useful value.
|
||||
// Perhaps it is returning the value of the last thing evaluated?
|
||||
// var ok =
|
||||
load(uri);
|
||||
// console.log("spidermonkey load(", uri, ") returned ", ok);
|
||||
return 1;
|
||||
};
|
||||
|
||||
//Register any module paths set up in djConfig. Need to do this
|
||||
//in the hostenvs since hostenv_browser can read djConfig from a
|
||||
//script tag's attribute.
|
||||
if(dojo.config["modulePaths"]){
|
||||
for(var param in dojo.config["modulePaths"]){
|
||||
dojo.registerModulePath(param, dojo.config["modulePaths"][param]);
|
||||
}
|
||||
}
|
8
lib/dojo/_base/connect.js
Normal file
8
lib/dojo/_base/connect.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/connect",["./kernel","../on","../topic","../aspect","./event","../mouse","./sniff","./lang","../keys"],function(_1,on,_2,_3,_4,_5,_6,_7){_6.add("events-keypress-typed",function(){var _8={charCode:0};try{_8=document.createEvent("KeyboardEvent");(_8.initKeyboardEvent||_8.initKeyEvent).call(_8,"keypress",true,true,null,false,false,false,false,9,3);}catch(e){}return _8.charCode==0&&!_6("opera");});function _9(_a,_b,_c,_d,_e){_d=_7.hitch(_c,_d);if(!_a||!(_a.addEventListener||_a.attachEvent)){return _3.after(_a||_1.global,_b,_d,true);}if(typeof _b=="string"&&_b.substring(0,2)=="on"){_b=_b.substring(2);}if(!_a){_a=_1.global;}if(!_e){switch(_b){case "keypress":_b=_f;break;case "mouseenter":_b=_5.enter;break;case "mouseleave":_b=_5.leave;break;}}return on(_a,_b,_d,_e);};var _10={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113};var _11=_6("mac")?"metaKey":"ctrlKey";var _12=function(evt,_13){var _14=_7.mixin({},evt,_13);_15(_14);_14.preventDefault=function(){evt.preventDefault();};_14.stopPropagation=function(){evt.stopPropagation();};return _14;};function _15(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;};var _f;if(_6("events-keypress-typed")){var _16=function(e,_17){try{return (e.keyCode=_17);}catch(e){return 0;}};_f=function(_18,_19){var _1a=on(_18,"keydown",function(evt){var k=evt.keyCode;var _1b=(k!=13)&&k!=32&&(k!=27||!_6("ie"))&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222)&&k!=229;if(_1b||evt.ctrlKey){var c=_1b?0:k;if(evt.ctrlKey){if(k==3||k==13){return _19.call(evt.currentTarget,evt);}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=_10[c]||c;}}}}var _1c=_12(evt,{type:"keypress",faux:true,charCode:c});_19.call(evt.currentTarget,_1c);if(_6("ie")){_16(evt,_1c.keyCode);}}});var _1d=on(_18,"keypress",function(evt){var c=evt.charCode;c=c>=32?c:0;evt=_12(evt,{charCode:c,faux:true});return _19.call(this,evt);});return {remove:function(){_1a.remove();_1d.remove();}};};}else{if(_6("opera")){_f=function(_1e,_1f){return on(_1e,"keypress",function(evt){var c=evt.which;if(c==3){c=99;}c=c<32&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return _1f.call(this,_12(evt,{charCode:c}));});};}else{_f=function(_20,_21){return on(_20,"keypress",function(evt){_15(evt);return _21.call(this,evt);});};}}var _22={_keypress:_f,connect:function(obj,_23,_24,_25,_26){var a=arguments,_27=[],i=0;_27.push(typeof a[0]=="string"?null:a[i++],a[i++]);var a1=a[i+1];_27.push(typeof a1=="string"||typeof a1=="function"?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_27.push(a[i]);}return _9.apply(this,_27);},disconnect:function(_28){if(_28){_28.remove();}},subscribe:function(_29,_2a,_2b){return _2.subscribe(_29,_7.hitch(_2a,_2b));},publish:function(_2c,_2d){return _2.publish.apply(_2,[_2c].concat(_2d));},connectPublisher:function(_2e,obj,_2f){var pf=function(){_22.publish(_2e,arguments);};return _2f?_22.connect(obj,_2f,pf):_22.connect(obj,pf);},isCopyKey:function(e){return e[_11];}};_22.unsubscribe=_22.disconnect;1&&_7.mixin(_1,_22);return _22;});
|
8
lib/dojo/_base/declare.js
Normal file
8
lib/dojo/_base/declare.js
Normal file
File diff suppressed because one or more lines are too long
8
lib/dojo/_base/event.js
Normal file
8
lib/dojo/_base/event.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/event",["./kernel","../on","../has","../dom-geometry"],function(_1,on,_2,_3){if(on._fixEvent){var _4=on._fixEvent;on._fixEvent=function(_5,se){_5=_4(_5,se);if(_5){_3.normalizeEvent(_5);}return _5;};}var _6={fix:function(_7,_8){if(on._fixEvent){return on._fixEvent(_7,_8);}return _7;},stop:function(_9){if(_2("dom-addeventlistener")||(_9&&_9.preventDefault)){_9.preventDefault();_9.stopPropagation();}else{_9=_9||window.event;_9.cancelBubble=true;on._preventDefault.call(_9);}}};if(1){_1.fixEvent=_6.fix;_1.stopEvent=_6.stop;}return _6;});
|
8
lib/dojo/_base/fx.js
Normal file
8
lib/dojo/_base/fx.js
Normal file
File diff suppressed because one or more lines are too long
8
lib/dojo/_base/html.js
Normal file
8
lib/dojo/_base/html.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/html",["./kernel","../dom","../dom-style","../dom-attr","../dom-prop","../dom-class","../dom-construct","../dom-geometry"],function(_1,_2,_3,_4,_5,_6,_7,_8){_1.byId=_2.byId;_1.isDescendant=_2.isDescendant;_1.setSelectable=_2.setSelectable;_1.getAttr=_4.get;_1.setAttr=_4.set;_1.hasAttr=_4.has;_1.removeAttr=_4.remove;_1.getNodeProp=_4.getNodeProp;_1.attr=function(_9,_a,_b){if(arguments.length==2){return _4[typeof _a=="string"?"get":"set"](_9,_a);}return _4.set(_9,_a,_b);};_1.hasClass=_6.contains;_1.addClass=_6.add;_1.removeClass=_6.remove;_1.toggleClass=_6.toggle;_1.replaceClass=_6.replace;_1._toDom=_1.toDom=_7.toDom;_1.place=_7.place;_1.create=_7.create;_1.empty=function(_c){_7.empty(_c);};_1._destroyElement=_1.destroy=function(_d){_7.destroy(_d);};_1._getPadExtents=_1.getPadExtents=_8.getPadExtents;_1._getBorderExtents=_1.getBorderExtents=_8.getBorderExtents;_1._getPadBorderExtents=_1.getPadBorderExtents=_8.getPadBorderExtents;_1._getMarginExtents=_1.getMarginExtents=_8.getMarginExtents;_1._getMarginSize=_1.getMarginSize=_8.getMarginSize;_1._getMarginBox=_1.getMarginBox=_8.getMarginBox;_1.setMarginBox=_8.setMarginBox;_1._getContentBox=_1.getContentBox=_8.getContentBox;_1.setContentSize=_8.setContentSize;_1._isBodyLtr=_1.isBodyLtr=_8.isBodyLtr;_1._docScroll=_1.docScroll=_8.docScroll;_1._getIeDocumentElementOffset=_1.getIeDocumentElementOffset=_8.getIeDocumentElementOffset;_1._fixIeBiDiScrollLeft=_1.fixIeBiDiScrollLeft=_8.fixIeBiDiScrollLeft;_1.position=_8.position;_1.marginBox=function marginBox(_e,_f){return _f?_8.setMarginBox(_e,_f):_8.getMarginBox(_e);};_1.contentBox=function contentBox(_10,box){return box?_8.setContentSize(_10,box):_8.getContentBox(_10);};_1.coords=function(_11,_12){_1.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");_11=_2.byId(_11);var s=_3.getComputedStyle(_11),mb=_8.getMarginBox(_11,s);var abs=_8.position(_11,_12);mb.x=abs.x;mb.y=abs.y;return mb;};_1.getProp=_5.get;_1.setProp=_5.set;_1.prop=function(_13,_14,_15){if(arguments.length==2){return _5[typeof _14=="string"?"get":"set"](_13,_14);}return _5.set(_13,_14,_15);};_1.getStyle=_3.get;_1.setStyle=_3.set;_1.getComputedStyle=_3.getComputedStyle;_1.__toPixelValue=_1.toPixelValue=_3.toPixelValue;_1.style=function(_16,_17,_18){switch(arguments.length){case 1:return _3.get(_16);case 2:return _3[typeof _17=="string"?"get":"set"](_16,_17);}return _3.set(_16,_17,_18);};return _1;});
|
8
lib/dojo/_base/json.js
Normal file
8
lib/dojo/_base/json.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/json",["./kernel","../json"],function(_1,_2){_1.fromJson=function(js){return eval("("+js+")");};_1._escapeString=_2.stringify;_1.toJsonIndentStr="\t";_1.toJson=function(it,_3){return _2.stringify(it,function(_4,_5){if(_5){var tf=_5.__json__||_5.json;if(typeof tf=="function"){return tf.call(_5);}}return _5;},_3&&_1.toJsonIndentStr);};return _1;});
|
8
lib/dojo/_base/kernel.js
Normal file
8
lib/dojo/_base/kernel.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/kernel",["../global","../has","./config","require","module"],function(_1,_2,_3,_4,_5){var i,p,_6={},_7={},_8={config:_3,global:_1,dijit:_6,dojox:_7};var _9={dojo:["dojo",_8],dijit:["dijit",_6],dojox:["dojox",_7]},_a=(_4.map&&_4.map[_5.id.match(/[^\/]+/)[0]]),_b;for(p in _a){if(_9[p]){_9[p][0]=_a[p];}else{_9[p]=[_a[p],{}];}}for(p in _9){_b=_9[p];_b[1]._scopeName=_b[0];if(!_3.noGlobals){_1[_b[0]]=_b[1];}}_8.scopeMap=_9;_8.baseUrl=_8.config.baseUrl=_4.baseUrl;_8.isAsync=!1||_4.async;_8.locale=_3.locale;var _c="$Rev: d6e8ff38 $".match(/[0-9a-f]{7,}/);_8.version={major:1,minor:14,patch:2,flag:"",revision:_c?_c[0]:NaN,toString:function(){var v=_8.version;return v.major+"."+v.minor+"."+v.patch+v.flag+" ("+v.revision+")";}};1||_2.add("extend-dojo",1);if(!_2("csp-restrictions")){(Function("d","d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}"))(_8);}if(0){_8.exit=function(_d){quit(_d);};}else{_8.exit=function(){};}if(!_2("host-webworker")){1||_2.add("dojo-guarantee-console",1);}if(1){_2.add("console-as-object",function(){return Function.prototype.bind&&console&&typeof console.log==="object";});typeof console!="undefined"||(console={});var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var tn;i=0;while((tn=cn[i++])){if(!console[tn]){(function(){var _e=tn+"";console[_e]=("log" in console)?function(){var a=Array.prototype.slice.call(arguments);a.unshift(_e+":");console["log"](a.join(" "));}:function(){};console[_e]._fake=true;})();}else{if(_2("console-as-object")){console[tn]=Function.prototype.bind.call(console[tn],console);}}}}_2.add("dojo-debug-messages",!!_3.isDebug);_8.deprecated=_8.experimental=function(){};if(_2("dojo-debug-messages")){_8.deprecated=function(_f,_10,_11){var _12="DEPRECATED: "+_f;if(_10){_12+=" "+_10;}if(_11){_12+=" -- will be removed in version: "+_11;}console.warn(_12);};_8.experimental=function(_13,_14){var _15="EXPERIMENTAL: "+_13+" -- APIs subject to change without notice.";if(_14){_15+=" "+_14;}console.warn(_15);};}1||_2.add("dojo-modulePaths",1);if(1){if(_3.modulePaths){_8.deprecated("dojo.modulePaths","use paths configuration");var _16={};for(p in _3.modulePaths){_16[p.replace(/\./g,"/")]=_3.modulePaths[p];}_4({paths:_16});}}1||_2.add("dojo-moduleUrl",1);if(1){_8.moduleUrl=function(_17,url){_8.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var _18=null;if(_17){_18=_4.toUrl(_17.replace(/\./g,"/")+(url?("/"+url):"")+"/*.*").replace(/\/\*\.\*/,"")+(url?"":"/");}return _18;};}_8._hasResource={};return _8;});
|
8
lib/dojo/_base/lang.js
Normal file
8
lib/dojo/_base/lang.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/lang",["./kernel","../has","../sniff"],function(_1,_2){_2.add("bug-for-in-skips-shadowed",function(){for(var i in {toString:1}){return 0;}return 1;});var _3=_2("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],_4=_3.length,_5=function(_6,_7,_8){if(!_8){if(_6[0]&&_1.scopeMap[_6[0]]){_8=_1.scopeMap[_6.shift()][1];}else{_8=_1.global;}}try{for(var i=0;i<_6.length;i++){var p=_6[i];if(!(p in _8)){if(_7){_8[p]={};}else{return;}}_8=_8[p];}return _8;}catch(e){}},_9=Object.prototype.toString,_a=function(_b,_c,_d){return (_d||[]).concat(Array.prototype.slice.call(_b,_c||0));},_e=/\{([^\}]+)\}/g;var _f={_extraNames:_3,_mixin:function(_10,_11,_12){var _13,s,i,_14={};for(_13 in _11){s=_11[_13];if(!(_13 in _10)||(_10[_13]!==s&&(!(_13 in _14)||_14[_13]!==s))){_10[_13]=_12?_12(s):s;}}if(_2("bug-for-in-skips-shadowed")){if(_11){for(i=0;i<_4;++i){_13=_3[i];s=_11[_13];if(!(_13 in _10)||(_10[_13]!==s&&(!(_13 in _14)||_14[_13]!==s))){_10[_13]=_12?_12(s):s;}}}}return _10;},mixin:function(_15,_16){if(!_15){_15={};}for(var i=1,l=arguments.length;i<l;i++){_f._mixin(_15,arguments[i]);}return _15;},setObject:function(_17,_18,_19){var _1a=_17.split("."),p=_1a.pop(),obj=_5(_1a,true,_19);return obj&&p?(obj[p]=_18):undefined;},getObject:function(_1b,_1c,_1d){return !_1b?_1d:_5(_1b.split("."),_1c,_1d);},exists:function(_1e,obj){return _f.getObject(_1e,false,obj)!==undefined;},isString:function(it){return (typeof it=="string"||it instanceof String);},isArray:Array.isArray||function(it){return _9.call(it)=="[object Array]";},isFunction:function(it){return _9.call(it)==="[object Function]";},isObject:function(it){return it!==undefined&&(it===null||typeof it=="object"||_f.isArray(it)||_f.isFunction(it));},isArrayLike:function(it){return !!it&&!_f.isString(it)&&!_f.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(_f.isArray(it)||isFinite(it.length));},isAlien:function(it){return it&&!_f.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));},extend:function(_1f,_20){for(var i=1,l=arguments.length;i<l;i++){_f._mixin(_1f.prototype,arguments[i]);}return _1f;},_hitchArgs:function(_21,_22){var pre=_f._toArray(arguments,2);var _23=_f.isString(_22);return function(){var _24=_f._toArray(arguments);var f=_23?(_21||_1.global)[_22]:_22;return f&&f.apply(_21||this,pre.concat(_24));};},hitch:function(_25,_26){if(arguments.length>2){return _f._hitchArgs.apply(_1,arguments);}if(!_26){_26=_25;_25=null;}if(_f.isString(_26)){_25=_25||_1.global;if(!_25[_26]){throw (["lang.hitch: scope[\"",_26,"\"] is null (scope=\"",_25,"\")"].join(""));}return function(){return _25[_26].apply(_25,arguments||[]);};}return !_25?_26:function(){return _26.apply(_25,arguments||[]);};},delegate:(function(){function TMP(){};return function(obj,_27){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_27){_f._mixin(tmp,_27);}return tmp;};})(),_toArray:_2("ie")?(function(){function _28(obj,_29,_2a){var arr=_2a||[];for(var x=_29||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};return function(obj){return ((obj.item)?_28:_a).apply(this,arguments);};})():_a,partial:function(_2b){var arr=[null];return _f.hitch.apply(_1,arr.concat(_f._toArray(arguments)));},clone:function(src){if(!src||typeof src!="object"||_f.isFunction(src)){return src;}if(src.nodeType&&"cloneNode" in src){return src.cloneNode(true);}if(src instanceof Date){return new Date(src.getTime());}if(src instanceof RegExp){return new RegExp(src);}var r,i,l;if(_f.isArray(src)){r=[];for(i=0,l=src.length;i<l;++i){if(i in src){r[i]=_f.clone(src[i]);}}}else{r=src.constructor?new src.constructor():{};}return _f._mixin(r,src,_f.clone);},trim:String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");},replace:function(_2c,map,_2d){return _2c.replace(_2d||_e,_f.isFunction(map)?map:function(_2e,k){return _f.getObject(k,false,map);});}};1&&_f.mixin(_1,_f);return _f;});
|
8
lib/dojo/_base/loader.js
Normal file
8
lib/dojo/_base/loader.js
Normal file
File diff suppressed because one or more lines are too long
8
lib/dojo/_base/query.js
Normal file
8
lib/dojo/_base/query.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/query",["../query","./NodeList"],function(_1){return _1;});
|
8
lib/dojo/_base/sniff.js
Normal file
8
lib/dojo/_base/sniff.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/sniff",["./kernel","./lang","../sniff"],function(_1,_2,_3){if(!1){return _3;}_1._name="browser";_2.mixin(_1,{isBrowser:true,isFF:_3("ff"),isIE:_3("ie"),isKhtml:_3("khtml"),isWebKit:_3("webkit"),isMozilla:_3("mozilla"),isMoz:_3("mozilla"),isOpera:_3("opera"),isSafari:_3("safari"),isChrome:_3("chrome"),isMac:_3("mac"),isIos:_3("ios"),isAndroid:_3("android"),isWii:_3("wii"),isQuirks:_3("quirks"),isAir:_3("air")});return _3;});
|
8
lib/dojo/_base/unload.js
Normal file
8
lib/dojo/_base/unload.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/unload",["./kernel","./lang","../on"],function(_1,_2,on){var _3=window;var _4={addOnWindowUnload:function(_5,_6){if(!_1.windowUnloaded){on(_3,"unload",(_1.windowUnloaded=function(){}));}on(_3,"unload",_2.hitch(_5,_6));},addOnUnload:function(_7,_8){on(_3,"beforeunload",_2.hitch(_7,_8));}};_1.addOnWindowUnload=_4.addOnWindowUnload;_1.addOnUnload=_4.addOnUnload;return _4;});
|
8
lib/dojo/_base/url.js
Normal file
8
lib/dojo/_base/url.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/url",["./kernel"],function(_1){var _2=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),_3=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),_4=function(){var n=null,_5=arguments,_6=[_5[0]];for(var i=1;i<_5.length;i++){if(!_5[i]){continue;}var _7=new _4(_5[i]+""),_8=new _4(_6[0]+"");if(_7.path==""&&!_7.scheme&&!_7.authority&&!_7.query){if(_7.fragment!=n){_8.fragment=_7.fragment;}_7=_8;}else{if(!_7.scheme){_7.scheme=_8.scheme;if(!_7.authority){_7.authority=_8.authority;if(_7.path.charAt(0)!="/"){var _9=_8.path.substring(0,_8.path.lastIndexOf("/")+1)+_7.path;var _a=_9.split("/");for(var j=0;j<_a.length;j++){if(_a[j]=="."){if(j==_a.length-1){_a[j]="";}else{_a.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_a[0]=="")&&_a[j]==".."&&_a[j-1]!=".."){if(j==(_a.length-1)){_a.splice(j,1);_a[j-1]="";}else{_a.splice(j-1,2);j-=2;}}}}_7.path=_a.join("/");}}}}_6=[];if(_7.scheme){_6.push(_7.scheme,":");}if(_7.authority){_6.push("//",_7.authority);}_6.push(_7.path);if(_7.query){_6.push("?",_7.query);}if(_7.fragment){_6.push("#",_7.fragment);}}this.uri=_6.join("");var r=this.uri.match(_2);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(_3);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};_4.prototype.toString=function(){return this.uri;};return _1._Url=_4;});
|
8
lib/dojo/_base/window.js
Normal file
8
lib/dojo/_base/window.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/_base/window",["./kernel","./lang","../sniff"],function(_1,_2,_3){var _4={global:_1.global,doc:_1.global["document"]||null,body:function(_5){_5=_5||_1.doc;return _5.body||_5.getElementsByTagName("body")[0];},setContext:function(_6,_7){_1.global=_4.global=_6;_1.doc=_4.doc=_7;},withGlobal:function(_8,_9,_a,_b){var _c=_1.global;try{_1.global=_4.global=_8;return _4.withDoc.call(null,_8.document,_9,_a,_b);}finally{_1.global=_4.global=_c;}},withDoc:function(_d,_e,_f,_10){var _11=_4.doc,_12=_3("quirks"),_13=_3("ie"),_14,_15,_16;try{_1.doc=_4.doc=_d;_1.isQuirks=_3.add("quirks",_1.doc.compatMode=="BackCompat",true,true);if(_3("ie")){if((_16=_d.parentWindow)&&_16.navigator){_14=parseFloat(_16.navigator.appVersion.split("MSIE ")[1])||undefined;_15=_d.documentMode;if(_15&&_15!=5&&Math.floor(_14)!=_15){_14=_15;}_1.isIE=_3.add("ie",_14,true,true);}}if(_f&&typeof _e=="string"){_e=_f[_e];}return _e.apply(_f,_10||[]);}finally{_1.doc=_4.doc=_11;_1.isQuirks=_3.add("quirks",_12,true,true);_1.isIE=_3.add("ie",_13,true,true);}}};1&&_2.mixin(_1,_4);return _4;});
|
8
lib/dojo/_base/xhr.js
Normal file
8
lib/dojo/_base/xhr.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user