Index: openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/src/bootstrap1.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/src/Attic/bootstrap1.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/src/bootstrap1.js 6 Nov 2006 14:37:20 -0000 1.1 +++ openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/src/bootstrap1.js 25 Dec 2006 16:39:51 -0000 1.2 @@ -13,9 +13,9 @@ // TODOC: HOW TO DOC THE BELOW? // @global: djConfig -// summary: +// summary: // Application code can set the global 'djConfig' prior to loading -// the library to override certain global settings for how dojo works. +// the library to override certain global settings for how dojo works. // description: The variables that can be set are as follows: // - isDebug: false // - allowQueryConfig: false @@ -32,31 +32,31 @@ // TODOC: HOW TO DOC THESE VARIABLES? // TODOC: IS THIS A COMPLETE LIST? // note: -// 'djConfig' does not exist under 'dojo.*' so that it can be set before the -// 'dojo' variable exists. +// 'djConfig' does not exist under 'dojo.*' so that it can be set before the +// 'dojo' variable exists. // note: -// Setting any of these variables *after* the library has loaded does nothing at all. +// Setting any of these variables *after* the library has loaded does nothing at all. // TODOC: is this still true? Release notes for 0.3 indicated they could be set after load. // //TODOC: HOW TO DOC THIS? // @global: dj_global -// summary: +// summary: // an alias for the top-level global object in the host environment // (e.g., the window object in a browser). -// description: +// description: // Refer to 'dj_global' rather than referring to window to ensure your // code runs correctly in contexts other than web browsers (eg: Rhino on a server). var dj_global = this; //TODOC: HOW TO DOC THIS? // @global: dj_currentContext -// summary: +// summary: // Private global context object. Where 'dj_global' always refers to the boot-time // global context, 'dj_currentContext' can be modified for temporary context shifting. // dojo.global() returns dj_currentContext. -// description: +// description: // Refer to dojo.global() rather than referring to dj_global to ensure your // code runs correctly in managed contexts. var dj_currentContext = this; @@ -74,21 +74,21 @@ } // make sure djConfig is defined -if(dj_undef("djConfig", this)){ - var djConfig = {}; +if(dj_undef("djConfig", this)){ + var djConfig = {}; } //TODOC: HOW TO DOC THIS? // dojo is the root variable of (almost all) our public symbols -- make sure it is defined. -if(dj_undef("dojo", this)){ - var dojo = {}; +if(dj_undef("dojo", this)){ + var dojo = {}; } dojo.global = function(){ // summary: // return the current global context object // (e.g., the window object in a browser). - // description: + // description: // Refer to 'dojo.global()' rather than referring to window to ensure your // code runs correctly in contexts other than web browsers (eg: Rhino on a server). return dj_currentContext; @@ -100,8 +100,8 @@ //TODOC: HOW TO DOC THIS? dojo.version = { // summary: version number of this instance of dojo. - major: 0, minor: 3, patch: 1, flag: "+", - revision: Number("$Rev: 6258 $".match(/[0-9]+/)[0]), + major: 0, minor: 4, patch: 1, flag: "", + revision: Number("$Rev: 6824 $".match(/[0-9]+/)[0]), toString: function(){ with(dojo.version){ return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String @@ -111,18 +111,18 @@ dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){ // summary: Returns 'object[name]'. If not defined and 'create' is true, will return a new Object. - // description: + // description: // Returns null if 'object[name]' is not defined and 'create' is not true. - // Note: 'defined' and 'exists' are not the same concept. + // Note: 'defined' and 'exists' are not the same concept. if((!object)||(!name)) return undefined; // undefined if(!dj_undef(name, object)) return object[name]; // mixed return (create ? (object[name]={}) : undefined); // mixed } dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){ // summary: Parse string path to an object, and return corresponding object reference and property name. - // description: - // Returns an object with two properties, 'obj' and 'prop'. + // description: + // Returns an object with two properties, 'obj' and 'prop'. // 'obj[prop]' is the reference indicated by 'path'. // path: Path to an object, in the form "A.B.C". // context: Object to use as root of path. Defaults to 'dojo.global()'. @@ -140,8 +140,8 @@ // summary: Return the value of object at 'path' in the global scope, without using 'eval()'. // path: Path to an object, in the form "A.B.C". // create: If true, Objects will be created at any point along the 'path' that is undefined. - if(typeof path != "string"){ - return dojo.global(); + if(typeof path != "string"){ + return dojo.global(); } // fast path for no periods if(path.indexOf('.') == -1){ @@ -177,6 +177,8 @@ if(exception){ message = message + ": "+dojo.errorToString(exception); + }else{ + message = dojo.errorToString(message); } // print the message to the user if hostenv.println is defined @@ -191,7 +193,7 @@ dojo.debugShallow = function(obj){}; dojo.profile = { start: function(){}, end: function(){}, stop: function(){}, dump: function(){} }; -function dj_eval(/*String*/ scriptFragment){ +function dj_eval(/*String*/ scriptFragment){ // summary: Perform an evaluation in the global scope. Use this rather than calling 'eval()' directly. // description: Placed in a separate function to minimize size of trapped evaluation context. // note: @@ -264,11 +266,11 @@ */ dojo.hostenv = (function(){ // TODOC: HOW TO DOC THIS? - // summary: Provides encapsulation of behavior that changes across different 'host environments' + // summary: Provides encapsulation of behavior that changes across different 'host environments' // (different browsers, server via Rhino, etc). // description: None of these methods should ever be called directly by library users. // Use public methods such as 'loadModule' instead. - + // default configuration options var config = { isDebug: false, @@ -298,21 +300,21 @@ version_: '(unset)', - getName: function(){ + getName: function(){ // sumary: Return the name of the host environment. return this.name_; // String }, - getVersion: function(){ + getVersion: function(){ // summary: Return the version of the hostenv. return this.version_; // String }, getText: function(/*String*/ uri){ // summary: Read the plain/text contents at the specified 'uri'. - // description: - // If 'getText()' is not implemented, then it is necessary to override + // description: + // If 'getText()' is not implemented, then it is necessary to override // 'loadUri()' with an implementation that doesn't rely on it. dojo.unimplemented('getText', "uri=" + uri); @@ -326,7 +328,7 @@ // TODOC: HUH? This comment means nothing to me. What other scripts? Is this the path to other dojo libraries? // MAYBE: Return the base uri to scripts in the dojo library. ??? // return: Empty string or a path ending in '/'. - if(djConfig.baseScriptUri.length){ + if(djConfig.baseScriptUri.length){ return djConfig.baseScriptUri; }