- // | ... - // | - // | - // |
- // example: - // set an "odd" class on all odd table rows inside of the table - // `#tabular_data`, using the `>` (direct child) selector to avoid - // affecting any nested tables: - // | dojo.query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd"); - // example: - // remove all elements with the class "error" from the document - // and store them in a list: - // | var errors = dojo.query(".error").orphan(); - // example: - // add an onclick handler to every submit button in the document - // which causes the form to be sent via Ajax instead: - // | dojo.query("input[type='submit']").onclick(function(e){ - // | dojo.stopEvent(e); // prevent sending the form - // | var btn = e.target; - // | dojo.xhrPost({ - // | form: btn.form, - // | load: function(data){ - // | // replace the form with the response - // | var div = dojo.doc.createElement("div"); - // | dojo.place(div, btn.form, "after"); - // | div.innerHTML = data; - // | dojo.style(btn.form, "display", "none"); - // | } - // | }); - // | }); - - - // NOTE: elementsById is not currently supported - // NOTE: ignores xpath-ish queries for now - - if(query.constructor == d.NodeList){ - return query; - } - if(!d.isString(query)){ - return new d.NodeList(query); // dojo.NodeList - } - if(d.isString(root)){ - root = d.byId(root); - } - - return _zip(getQueryFunc(query)(root||d.doc)); // dojo.NodeList - } - - /* - // exposing this was a mistake - d.query.attrs = attrs; - */ - // exposing this because new pseudo matches are only executed through the - // DOM query path (never through the xpath optimizing branch) - d.query.pseudos = pseudos; - - // one-off function for filtering a NodeList based on a simple selector - d._filterQueryResult = function(nodeList, simpleFilter){ - var tnl = new d.NodeList(); - var ff = (simpleFilter) ? getFilterFunc(getQueryParts(simpleFilter)[0]) : function(){ return true; }; - for(var x=0, te; te = nodeList[x]; x++){ - if(ff(te)){ tnl.push(te); } - } - return tnl; - } -})(); diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_base/window.js b/javascript/bower/bower-bower-components/bower_components/dojo/_base/window.js deleted file mode 100644 index b7647a515bb4c68b1a7714608e5d4bf8037bb494..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/_base/window.js +++ /dev/null @@ -1,141 +0,0 @@ -dojo.provide("dojo._base.window"); - -dojo._gearsObject = function(){ - // summary: - // factory method to get a Google Gears plugin instance to - // expose in the browser runtime environment, if present - var factory; - var results; - - var gearsObj = dojo.getObject("google.gears"); - if(gearsObj){ return gearsObj; } // already defined elsewhere - - if(typeof GearsFactory != "undefined"){ // Firefox - factory = new GearsFactory(); - }else{ - if(dojo.isIE){ - // IE - try{ - factory = new ActiveXObject("Gears.Factory"); - }catch(e){ - // ok to squelch; there's no gears factory. move on. - } - }else if(navigator.mimeTypes["application/x-googlegears"]){ - // Safari? - factory = document.createElement("object"); - factory.setAttribute("type", "application/x-googlegears"); - factory.setAttribute("width", 0); - factory.setAttribute("height", 0); - factory.style.display = "none"; - document.documentElement.appendChild(factory); - } - } - - // still nothing? - if(!factory){ return null; } - - // define the global objects now; don't overwrite them though if they - // were somehow set internally by the Gears plugin, which is on their - // dev roadmap for the future - dojo.setObject("google.gears.factory", factory); - return dojo.getObject("google.gears"); -}; - -/*===== -dojo.isGears = { - // summary: True if client is using Google Gears -}; -=====*/ -// see if we have Google Gears installed, and if -// so, make it available in the runtime environment -// and in the Google standard 'google.gears' global object -dojo.isGears = (!!dojo._gearsObject())||0; - -/*===== -dojo.doc = { - // summary: - // Alias for the current document. 'dojo.doc' can be modified - // for temporary context shifting. Also see dojo.withDoc(). - // description: - // Refer to dojo.doc rather - // than referring to 'window.document' to ensure your code runs - // correctly in managed contexts. - // example: - // | n.appendChild(dojo.doc.createElement('div')); -} -=====*/ -dojo.doc = window["document"] || null; - -dojo.body = function(){ - // summary: - // Return the body element of the document - // return the body object associated with dojo.doc - // example: - // | dojo.body().appendChild(dojo.doc.createElement('div')); - - // Note: document.body is not defined for a strict xhtml document - // Would like to memoize this, but dojo.doc can change vi dojo.withDoc(). - return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0]; // Node -} - -dojo.setContext = function(/*Object*/globalObject, /*DocumentElement*/globalDocument){ - // summary: - // changes the behavior of many core Dojo functions that deal with - // namespace and DOM lookup, changing them to work in a new global - // context (e.g., an iframe). The varibles dojo.global and dojo.doc - // are modified as a result of calling this function and the result of - // `dojo.body()` likewise differs. - dojo.global = globalObject; - dojo.doc = globalDocument; -}; - -dojo._fireCallback = function(callback, context, cbArguments){ - if(context && dojo.isString(callback)){ - callback = context[callback]; - } - return callback.apply(context, cbArguments || [ ]); -} - -dojo.withGlobal = function( /*Object*/globalObject, - /*Function*/callback, - /*Object?*/thisObject, - /*Array?*/cbArguments){ - // summary: - // Call callback with globalObject as dojo.global and - // globalObject.document as dojo.doc. If provided, globalObject - // will be executed in the context of object thisObject - // description: - // When callback() returns or throws an error, the dojo.global - // and dojo.doc will be restored to its previous state. - var rval; - var oldGlob = dojo.global; - var oldDoc = dojo.doc; - try{ - dojo.setContext(globalObject, globalObject.document); - rval = dojo._fireCallback(callback, thisObject, cbArguments); - }finally{ - dojo.setContext(oldGlob, oldDoc); - } - return rval; -} - -dojo.withDoc = function( /*Object*/documentObject, - /*Function*/callback, - /*Object?*/thisObject, - /*Array?*/cbArguments){ - // summary: - // Call callback with documentObject as dojo.doc. If provided, - // callback will be executed in the context of object thisObject - // description: - // When callback() returns or throws an error, the dojo.doc will - // be restored to its previous state. - var rval; - var oldDoc = dojo.doc; - try{ - dojo.doc = documentObject; - rval = dojo._fireCallback(callback, thisObject, cbArguments); - }finally{ - dojo.doc = oldDoc; - } - return rval; -}; diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_base/xhr.js b/javascript/bower/bower-bower-components/bower_components/dojo/_base/xhr.js deleted file mode 100644 index a109bece15cd574a2d6b9eaeded988c3d9d187e8..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/_base/xhr.js +++ /dev/null @@ -1,726 +0,0 @@ -dojo.provide("dojo._base.xhr"); -dojo.require("dojo._base.Deferred"); -dojo.require("dojo._base.json"); -dojo.require("dojo._base.lang"); -dojo.require("dojo._base.query"); - -(function(){ - var _d = dojo; - function setValue(/*Object*/obj, /*String*/name, /*String*/value){ - //summary: - // For the nameed property in object, set the value. If a value - // already exists and it is a string, convert the value to be an - // array of values. - var val = obj[name]; - if(_d.isString(val)){ - obj[name] = [val, value]; - }else if(_d.isArray(val)){ - val.push(value); - }else{ - obj[name] = value; - } - } - - dojo.formToObject = function(/*DOMNode||String*/ formNode){ - // summary: - // dojo.formToObject returns the values encoded in an HTML form as - // string properties in an object which it then returns. Disabled form - // elements, buttons, and other non-value form elements are skipped. - // Multi-select elements are returned as an array of string values. - // description: - // This form: - // - // | - // - // yields this object structure as the result of a call to - // formToObject(): - // - // | { - // | blah: "blah", - // | multi: [ - // | "thud", - // | "thonk" - // | ] - // | }; - - var ret = {}; - var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea"; - _d.query(iq, formNode).filter(function(node){ - return !node.disabled && node.name; - }).forEach(function(item){ - var _in = item.name; - var type = (item.type||"").toLowerCase(); - if(type == "radio" || type == "checkbox"){ - if(item.checked){ setValue(ret, _in, item.value); } - }else if(item.multiple){ - ret[_in] = []; - _d.query("option", item).forEach(function(opt){ - if(opt.selected){ - setValue(ret, _in, opt.value); - } - }); - }else{ - setValue(ret, _in, item.value); - if(type == "image"){ - ret[_in+".x"] = ret[_in+".y"] = ret[_in].x = ret[_in].y = 0; - } - } - }); - return ret; // Object - } - - dojo.objectToQuery = function(/*Object*/ map){ - // summary: - // takes a name/value mapping object and returns a string representing - // a URL-encoded version of that object. - // example: - // this object: - // - // | { - // | blah: "blah", - // | multi: [ - // | "thud", - // | "thonk" - // | ] - // | }; - // - // yields the following query string: - // - // | "blah=blah&multi=thud&multi=thonk" - - // FIXME: need to implement encodeAscii!! - var enc = encodeURIComponent; - var pairs = []; - var backstop = {}; - for(var name in map){ - var value = map[name]; - if(value != backstop[name]){ - var assign = enc(name) + "="; - if(_d.isArray(value)){ - for(var i=0; i < value.length; i++){ - pairs.push(assign + enc(value[i])); - } - }else{ - pairs.push(assign + enc(value)); - } - } - } - return pairs.join("&"); // String - } - - dojo.formToQuery = function(/*DOMNode||String*/ formNode){ - // summary: - // Returns a URL-encoded string representing the form passed as either a - // node or string ID identifying the form to serialize - return _d.objectToQuery(_d.formToObject(formNode)); // String - } - - dojo.formToJson = function(/*DOMNode||String*/ formNode, /*Boolean?*/prettyPrint){ - // summary: - // return a serialized JSON string from a form node or string - // ID identifying the form to serialize - return _d.toJson(_d.formToObject(formNode), prettyPrint); // String - } - - dojo.queryToObject = function(/*String*/ str){ - // summary: - // returns an object representing a de-serialized query section of a - // URL. Query keys with multiple values are returned in an array. - // description: - // This string: - // - // | "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&" - // - // results in this object structure: - // - // | { - // | foo: [ "bar", "baz" ], - // | thinger: " spaces =blah", - // | zonk: "blarg" - // | } - // - // Note that spaces and other urlencoded entities are correctly - // handled. - - // FIXME: should we grab the URL string if we're not passed one? - var ret = {}; - var qp = str.split("&"); - var dec = decodeURIComponent; - _d.forEach(qp, function(item){ - if(item.length){ - var parts = item.split("="); - var name = dec(parts.shift()); - var val = dec(parts.join("=")); - if(_d.isString(ret[name])){ - ret[name] = [ret[name]]; - } - if(_d.isArray(ret[name])){ - ret[name].push(val); - }else{ - ret[name] = val; - } - } - }); - return ret; // Object - } - - /* - from refactor.txt: - - all bind() replacement APIs take the following argument structure: - - { - url: "blah.html", - - // all below are optional, but must be supported in some form by - // every IO API - timeout: 1000, // milliseconds - handleAs: "text", // replaces the always-wrong "mimetype" - content: { - key: "value" - }, - - // browser-specific, MAY be unsupported - sync: true, // defaults to false - form: dojo.byId("someForm") - } - */ - - // need to block async callbacks from snatching this thread as the result - // of an async callback might call another sync XHR, this hangs khtml forever - // must checked by watchInFlight() - - dojo._blockAsync = false; - - dojo._contentHandlers = { - "text": function(xhr){ return xhr.responseText; }, - "json": function(xhr){ - if(!dojo.config.usePlainJson){ - console.warn("Consider using mimetype:text/json-comment-filtered" - + " to avoid potential security issues with JSON endpoints" - + " (use djConfig.usePlainJson=true to turn off this message)"); - } - return (xhr.status == 204) ? undefined : _d.fromJson(xhr.responseText); - }, - "json-comment-filtered": function(xhr){ - // NOTE: we provide the json-comment-filtered option as one solution to - // the "JavaScript Hijacking" issue noted by Fortify and others. It is - // not appropriate for all circumstances. - - var value = xhr.responseText; - var cStartIdx = value.indexOf("\/*"); - var cEndIdx = value.lastIndexOf("*\/"); - if(cStartIdx == -1 || cEndIdx == -1){ - throw new Error("JSON was not comment filtered"); - } - return (xhr.status == 204) ? undefined : - _d.fromJson(value.substring(cStartIdx+2, cEndIdx)); - }, - "javascript": function(xhr){ - // FIXME: try Moz and IE specific eval variants? - return _d.eval(xhr.responseText); - }, - "xml": function(xhr){ - var result = xhr.responseXML; - if(_d.isIE && (!result || window.location.protocol == "file:")){ - _d.forEach(["MSXML2", "Microsoft", "MSXML", "MSXML3"], function(prefix){ - try{ - var dom = new ActiveXObject(prefix + ".XMLDOM"); - dom.async = false; - dom.loadXML(xhr.responseText); - result = dom; - }catch(e){ /* Not available. Squelch and try next one. */ } - }); - } - return result; // DOMDocument - } - }; - - dojo._contentHandlers["json-comment-optional"] = function(xhr){ - var handlers = _d._contentHandlers; - try{ - return handlers["json-comment-filtered"](xhr); - }catch(e){ - return handlers["json"](xhr); - } - }; - - /*===== - dojo.__IoArgs = function(){ - // url: String - // URL to server endpoint. - // content: Object? - // Contains properties with string values. These - // properties will be serialized as name1=value2 and - // passed in the request. - // timeout: Integer? - // Milliseconds to wait for the response. If this time - // passes, the then error callbacks are called. - // form: DOMNode? - // DOM node for a form. Used to extract the form values - // and send to the server. - // preventCache: Boolean? - // Default is false. If true, then a - // "dojo.preventCache" parameter is sent in the request - // with a value that changes with each request - // (timestamp). Useful only with GET-type requests. - // handleAs: String? - // Acceptable values depend on the type of IO - // transport (see specific IO calls for more information). - // load: Function? - // function(response, ioArgs){}. response is an Object, ioArgs - // is of type dojo.__IoCallbackArgs. The load function will be - // called on a successful response. - // error: Function? - // function(response, ioArgs){}. response is an Object, ioArgs - // is of type dojo.__IoCallbackArgs. The error function will - // be called in an error case. - // handle: Function? - // function(response, ioArgs){}. response is an Object, ioArgs - // is of type dojo.__IoCallbackArgs. The handle function will - // be called in either the successful or error case. For - // the load, error and handle functions, the ioArgs object - // will contain the following properties: - this.url = url; - this.content = content; - this.timeout = timeout; - this.form = form; - this.preventCache = preventCache; - this.handleAs = handleAs; - this.load = load; - this.error = error; - this.handle = handle; - } - =====*/ - - /*===== - dojo.__IoCallbackArgs = function(args, xhr, url, query, handleAs, id, canDelete, json){ - // args: Object - // the original object argument to the IO call. - // xhr: XMLHttpRequest - // For XMLHttpRequest calls only, the - // XMLHttpRequest object that was used for the - // request. - // url: String - // The final URL used for the call. Many times it - // will be different than the original args.url - // value. - // query: String - // For non-GET requests, the - // name1=value1&name2=value2 parameters sent up in - // the request. - // handleAs: String - // The final indicator on how the response will be - // handled. - // id: String - // For dojo.io.script calls only, the internal - // script ID used for the request. - // canDelete: Boolean - // For dojo.io.script calls only, indicates - // whether the script tag that represents the - // request can be deleted after callbacks have - // been called. Used internally to know when - // cleanup can happen on JSONP-type requests. - // json: Object - // For dojo.io.script calls only: holds the JSON - // response for JSONP-type requests. Used - // internally to hold on to the JSON responses. - // You should not need to access it directly -- - // the same object should be passed to the success - // callbacks directly. - this.args = args; - this.xhr = xhr; - this.url = url; - this.query = query; - this.handleAs = handleAs; - this.id = id; - this.canDelete = canDelete; - this.json = json; - } - =====*/ - - - - dojo._ioSetArgs = function(/*dojo.__IoArgs*/args, - /*Function*/canceller, - /*Function*/okHandler, - /*Function*/errHandler){ - // summary: - // sets up the Deferred and ioArgs property on the Deferred so it - // can be used in an io call. - // args: - // The args object passed into the public io call. Recognized properties on - // the args object are: - // canceller: - // The canceller function used for the Deferred object. The function - // will receive one argument, the Deferred object that is related to the - // canceller. - // okHandler: - // The first OK callback to be registered with Deferred. It has the opportunity - // to transform the OK response. It will receive one argument -- the Deferred - // object returned from this function. - // errHandler: - // The first error callback to be registered with Deferred. It has the opportunity - // to do cleanup on an error. It will receive two arguments: error (the - // Error object) and dfd, the Deferred object returned from this function. - - var ioArgs = {args: args, url: args.url}; - - //Get values from form if requestd. - var formObject = null; - if(args.form){ - var form = _d.byId(args.form); - //IE requires going through getAttributeNode instead of just getAttribute in some form cases, - //so use it for all. See #2844 - var actnNode = form.getAttributeNode("action"); - ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null); - formObject = _d.formToObject(form); - } - - // set up the query params - var miArgs = [{}]; - - if(formObject){ - // potentially over-ride url-provided params w/ form values - miArgs.push(formObject); - } - if(args.content){ - // stuff in content over-rides what's set by form - miArgs.push(args.content); - } - if(args.preventCache){ - miArgs.push({"dojo.preventCache": new Date().valueOf()}); - } - ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs)); - - // .. and the real work of getting the deferred in order, etc. - ioArgs.handleAs = args.handleAs || "text"; - var d = new _d.Deferred(canceller); - d.addCallbacks(okHandler, function(error){ - return errHandler(error, d); - }); - - //Support specifying load, error and handle callback functions from the args. - //For those callbacks, the "this" object will be the args object. - //The callbacks will get the deferred result value as the - //first argument and the ioArgs object as the second argument. - var ld = args.load; - if(ld && _d.isFunction(ld)){ - d.addCallback(function(value){ - return ld.call(args, value, ioArgs); - }); - } - var err = args.error; - if(err && _d.isFunction(err)){ - d.addErrback(function(value){ - return err.call(args, value, ioArgs); - }); - } - var handle = args.handle; - if(handle && _d.isFunction(handle)){ - d.addBoth(function(value){ - return handle.call(args, value, ioArgs); - }); - } - - d.ioArgs = ioArgs; - - // FIXME: need to wire up the xhr object's abort method to something - // analagous in the Deferred - return d; - } - - var _deferredCancel = function(/*Deferred*/dfd){ - //summary: canceller function for dojo._ioSetArgs call. - - dfd.canceled = true; - var xhr = dfd.ioArgs.xhr; - var _at = typeof xhr.abort; - if(_at == "function" || _at == "unknown"){ - xhr.abort(); - } - var err = new Error("xhr cancelled"); - err.dojoType = "cancel"; - return err; - } - var _deferredOk = function(/*Deferred*/dfd){ - //summary: okHandler function for dojo._ioSetArgs call. - - return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr); - } - var _deferError = function(/*Error*/error, /*Deferred*/dfd){ - //summary: errHandler function for dojo._ioSetArgs call. - - // console.debug("xhr error in:", dfd.ioArgs.xhr); - console.debug(error); - return error; - } - - var _makeXhrDeferred = function(/*dojo.__XhrArgs*/args){ - //summary: makes the Deferred object for this xhr request. - var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError); - //Pass the args to _xhrObj, to allow xhr iframe proxy interceptions. - dfd.ioArgs.xhr = _d._xhrObj(dfd.ioArgs.args); - return dfd; - } - - // avoid setting a timer per request. It degrades performance on IE - // something fierece if we don't use unified loops. - var _inFlightIntvl = null; - var _inFlight = []; - var _watchInFlight = function(){ - //summary: - // internal method that checks each inflight XMLHttpRequest to see - // if it has completed or if the timeout situation applies. - - var now = (new Date()).getTime(); - // make sure sync calls stay thread safe, if this callback is called - // during a sync call and this results in another sync call before the - // first sync call ends the browser hangs - if(!_d._blockAsync){ - // we need manual loop because we often modify _inFlight (and therefore 'i') while iterating - // note: the second clause is an assigment on purpose, lint may complain - for(var i = 0, tif; i < _inFlight.length && (tif = _inFlight[i]); i++){ - var dfd = tif.dfd; - try{ - if(!dfd || dfd.canceled || !tif.validCheck(dfd)){ - _inFlight.splice(i--, 1); - }else if(tif.ioCheck(dfd)){ - _inFlight.splice(i--, 1); - tif.resHandle(dfd); - }else if(dfd.startTime){ - //did we timeout? - if(dfd.startTime + (dfd.ioArgs.args.timeout || 0) < now){ - _inFlight.splice(i--, 1); - var err = new Error("timeout exceeded"); - err.dojoType = "timeout"; - dfd.errback(err); - //Cancel the request so the io module can do appropriate cleanup. - dfd.cancel(); - } - } - }catch(e){ - // FIXME: make sure we errback! (fixed? remove console.debug?) - console.debug(e); - dfd.errback(new Error("_watchInFlightError!")); - } - } - } - - if(!_inFlight.length){ - clearInterval(_inFlightIntvl); - _inFlightIntvl = null; - return; - } - - } - - dojo._ioCancelAll = function(){ - //summary: Cancels all pending IO requests, regardless of IO type - //(xhr, script, iframe). - try{ - _d.forEach(_inFlight, function(i){ - i.dfd.cancel(); - }); - }catch(e){/*squelch*/} - } - - //Automatically call cancel all io calls on unload - //in IE for trac issue #2357. - if(_d.isIE){ - _d.addOnUnload(_d._ioCancelAll); - } - - _d._ioWatch = function(/*Deferred*/dfd, - /*Function*/validCheck, - /*Function*/ioCheck, - /*Function*/resHandle){ - //summary: watches the io request represented by dfd to see if it completes. - //dfd: - // The Deferred object to watch. - //validCheck: - // Function used to check if the IO request is still valid. Gets the dfd - // object as its only argument. - //ioCheck: - // Function used to check if basic IO call worked. Gets the dfd - // object as its only argument. - //resHandle: - // Function used to process response. Gets the dfd - // object as its only argument. - if(dfd.ioArgs.args.timeout){ - dfd.startTime = (new Date()).getTime(); - } - _inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle}); - if(!_inFlightIntvl){ - _inFlightIntvl = setInterval(_watchInFlight, 50); - } - _watchInFlight(); // handle sync requests - } - - var _defaultContentType = "application/x-www-form-urlencoded"; - - var _validCheck = function(/*Deferred*/dfd){ - return dfd.ioArgs.xhr.readyState; //boolean - } - var _ioCheck = function(/*Deferred*/dfd){ - return 4 == dfd.ioArgs.xhr.readyState; //boolean - } - var _resHandle = function(/*Deferred*/dfd){ - var xhr = dfd.ioArgs.xhr; - if(_d._isDocumentOk(xhr)){ - dfd.callback(dfd); - }else{ - var err = new Error("Unable to load " + dfd.ioArgs.url + " status:" + xhr.status); - err.status = xhr.status; - err.responseText = xhr.responseText; - dfd.errback(err); - } - } - - var _doIt = function(/*String*/type, /*Deferred*/dfd){ - // IE 6 is a steaming pile. It won't let you call apply() on the native function (xhr.open). - // workaround for IE6's apply() "issues" - var ioArgs = dfd.ioArgs; - var args = ioArgs.args; - var xhr = ioArgs.xhr; - xhr.open(type, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined); - if(args.headers){ - for(var hdr in args.headers){ - if(hdr.toLowerCase() === "content-type" && !args.contentType){ - args.contentType = args.headers[hdr]; - }else{ - xhr.setRequestHeader(hdr, args.headers[hdr]); - } - } - } - // FIXME: is this appropriate for all content types? - xhr.setRequestHeader("Content-Type", args.contentType || _defaultContentType); - if(!args.headers || !args.headers["X-Requested-With"]){ - xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - } - // FIXME: set other headers here! - try{ - xhr.send(ioArgs.query); - }catch(e){ - dfd.cancel(); - } - _d._ioWatch(dfd, _validCheck, _ioCheck, _resHandle); - xhr = null; - return dfd; //Deferred - } - - dojo._ioAddQueryToUrl = function(/*dojo.__IoCallbackArgs*/ioArgs){ - //summary: Adds query params discovered by the io deferred construction to the URL. - //Only use this for operations which are fundamentally GET-type operations. - if(ioArgs.query.length){ - ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query; - ioArgs.query = null; - } - } - - /*===== - dojo.declare("dojo.__XhrArgs", dojo.__IoArgs, { - constructor: function(){ - // summary: - // In addition to the properties listed for the dojo._IoArgs type, - // the following properties are allowed for dojo.xhr* methods. - // handleAs: String? - // Acceptable values are: text (default), json, json-comment-optional, - // json-comment-filtered, javascript, xml - // sync: Boolean? - // false is default. Indicates whether the request should - // be a synchronous (blocking) request. - // headers: Object? - // Additional HTTP headers to send in the request. - this.handleAs = handleAs; - this.sync = sync; - this.headers = headers; - } - }); - =====*/ - - dojo.xhr = function(/*String*/ method, /*dojo.__XhrArgs*/ args, /*Boolean?*/ hasBody){ - // summary: - // Sends an HTTP request with the given method. If the request has an - // HTTP body, then pass true for hasBody. The method argument should be uppercase. - // Also look at dojo.xhrGet(), xhrPost(), xhrPut() and dojo.xhrDelete() for shortcuts - // for those HTTP methods. There are also methods for "raw" PUT and POST methods - // via dojo.rawXhrPut() and dojo.rawXhrPost() respectively. - var dfd = _makeXhrDeferred(args); - if(!hasBody){ - _d._ioAddQueryToUrl(dfd.ioArgs); - } - return _doIt(method, dfd); // dojo.Deferred - } - - dojo.xhrGet = function(/*dojo.__XhrArgs*/ args){ - // summary: - // Sends an HTTP GET request to the server. - return _d.xhr("GET", args); //dojo.Deferred - } - - dojo.xhrPost = function(/*dojo.__XhrArgs*/ args){ - //summary: - // Sends an HTTP POST request to the server. - return _d.xhr("POST", args, true); // dojo.Deferred - } - - dojo.rawXhrPost = function(/*dojo.__XhrArgs*/ args){ - // summary: - // Sends an HTTP POST request to the server. In addtion to the properties - // listed for the dojo.__XhrArgs type, the following property is allowed: - // postData: - // String. The raw data to send in the body of the POST request. - var dfd = _makeXhrDeferred(args); - dfd.ioArgs.query = args.postData; - return _doIt("POST", dfd); // dojo.Deferred - } - - dojo.xhrPut = function(/*dojo.__XhrArgs*/ args){ - // summary: - // Sends an HTTP PUT request to the server. - return _d.xhr("PUT", args, true); // dojo.Deferred - } - - dojo.rawXhrPut = function(/*dojo.__XhrArgs*/ args){ - // summary: - // Sends an HTTP PUT request to the server. In addtion to the properties - // listed for the dojo.__XhrArgs type, the following property is allowed: - // putData: - // String. The raw data to send in the body of the PUT request. - var dfd = _makeXhrDeferred(args); - var ioArgs = dfd.ioArgs; - if(args.putData){ - ioArgs.query = args.putData; - args.putData = null; - } - return _doIt("PUT", dfd); // dojo.Deferred - } - - dojo.xhrDelete = function(/*dojo.__XhrArgs*/ args){ - // summary: - // Sends an HTTP DELETE request to the server. - return _d.xhr("DELETE", args); //dojo.Deferred - } - - /* - dojo.wrapForm = function(formNode){ - //summary: - // A replacement for FormBind, but not implemented yet. - - // FIXME: need to think harder about what extensions to this we might - // want. What should we allow folks to do w/ this? What events to - // set/send? - throw new Error("dojo.wrapForm not yet implemented"); - } - */ -})(); diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/LICENSE b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/LICENSE deleted file mode 100644 index 8c777a23eacd8922548d2e2262318f390e55e3e0..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -License Disclaimer: - -All contents of this directory are Copyright (c) the Dojo Foundation, with the -following exceptions: -------------------------------------------------------------------------------- - -firebug.html, firebug.js, errIcon.png, infoIcon.png, warningIcon.png: - * Copyright (c) 2006-2007, Joe Hewitt, All rights reserved. - Distributed under the terms of the BSD License (see below) - -------------------------------------------------------------------------------- - -Copyright (c) 2006-2007, Joe Hewitt -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/errorIcon.png b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/errorIcon.png deleted file mode 100644 index 2d75261bb675f5f878a9ca549340d11694287ea9..0000000000000000000000000000000000000000 Binary files a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/errorIcon.png and /dev/null differ diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.css b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.css deleted file mode 100644 index 19ec8920663dc65b727fbb3494d47610c1c48385..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.css +++ /dev/null @@ -1,222 +0,0 @@ -.firebug { - margin: 0; - background:#fff; - font-family: Lucida Grande, Tahoma, sans-serif; - font-size: 11px; - overflow: hidden; - border: 1px solid black; - position: relative; -} - -.firebug a { - text-decoration: none; -} - -.firebug a:hover { - text-decoration: underline; -} -.firebug a:visited{ - color:#0000FF; -} -.firebug #firebugToolbar { - height: 14px; - border-top: 1px solid ThreeDHighlight; - border-bottom: 1px solid ThreeDShadow; - padding: 2px 6px; - background: ThreeDFace; -} - -.firebug .firebugToolbarRight { - position: absolute; - top: 4px; - right: 6px; -} - -.firebug #firebugLog, .firebug #objectLog { - overflow: auto; - position: absolute; - left: 0; - width: 100%; -} -#objectLog{ - overflow:scroll; - height:258px; -} -.firebug #firebugCommandLine { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - height: 18px; - border: none; - border-top: 1px solid ThreeDShadow; -} - -/************************************************************************************************/ - -.firebug .logRow { - position: relative; - border-bottom: 1px solid #D7D7D7; - padding: 2px 4px 1px 6px; - background-color: #FFFFFF; -} - -.firebug .logRow-command { - font-family: Monaco, monospace; - color: blue; -} - -.firebug .objectBox-null { - padding: 0 2px; - border: 1px solid #666666; - background-color: #888888; - color: #FFFFFF; -} - -.firebug .objectBox-string { - font-family: Monaco, monospace; - color: red; - white-space: pre; -} - -.firebug .objectBox-number { - color: #000088; -} - -.firebug .objectBox-function { - font-family: Monaco, monospace; - color: DarkGreen; -} - -.firebug .objectBox-object { - color: DarkGreen; - font-weight: bold; -} - -/************************************************************************************************/ - -.firebug .logRow-info, -.firebug .logRow-error, -.firebug .logRow-warning - { - background: #00FFFF no-repeat 2px 2px; - padding-left: 20px; - padding-bottom: 3px; -} - -.firebug .logRow-info { - background: #FFF url(infoIcon.png) no-repeat 2px 2px; - padding-left: 20px; - padding-bottom: 3px; -} - -.firebug .logRow-warning { - - background: #00FFFF url(warningIcon.png) no-repeat 2px 2px; - padding-left: 20px; - padding-bottom: 3px; -} - -.firebug .logRow-error { - - background: LightYellow url(errorIcon.png) no-repeat 2px 2px; - padding-left: 20px; - padding-bottom: 3px; -} - -.firebug .errorMessage { - vertical-align: top; - color: #FF0000; -} - -.firebug .objectBox-sourceLink { - position: absolute; - right: 4px; - top: 2px; - padding-left: 8px; - font-family: Lucida Grande, sans-serif; - font-weight: bold; - color: #0000FF; -} - -/************************************************************************************************/ - -.firebug .logRow-group { - background: #EEEEEE; - border-bottom: none; -} - -.firebug .logGroup { - background: #EEEEEE; -} - -.firebug .logGroupBox { - margin-left: 24px; - border-top: 1px solid #D7D7D7; - border-left: 1px solid #D7D7D7; -} - -/************************************************************************************************/ - -.firebug .selectorTag, -.firebug .selectorId, -.firebug .selectorClass { - font-family: Monaco, monospace; - font-weight: normal; -} - -.firebug .selectorTag { - color: #0000FF; -} - -.firebug .selectorId { - color: DarkBlue; -} - -.firebug .selectorClass { - color: red; -} - -/************************************************************************************************/ - -.firebug .objectBox-element { - font-family: Monaco, monospace; - color: #000088; -} - -.firebug .nodeChildren { - margin-left: 16px; -} - -.firebug .nodeTag { - color: blue; -} - -.firebug .nodeValue { - color: #FF0000; - font-weight: normal; -} - -.firebug .nodeText, -.firebug .nodeComment { - margin: 0 2px; - vertical-align: top; -} - -.firebug .nodeText { - color: #333333; -} - -.firebug .nodeComment { - color: DarkGreen; -} - -/************************************************************************************************/ - -.firebug .propertyNameCell { - vertical-align: top; -} - -.firebug .propertyName { - font-weight: bold; -} \ No newline at end of file diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.js b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.js deleted file mode 100644 index 5813adb584469604a0a8e52d11d7a295d3510fa0..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/firebug.js +++ /dev/null @@ -1,1099 +0,0 @@ -dojo.provide("dojo._firebug.firebug"); - -dojo.deprecated = function(/*String*/ behaviour, /*String?*/ extra, /*String?*/ removal){ - // summary: - // Log a debug message to indicate that a behavior has been - // deprecated. - // extra: Text to append to the message. - // removal: - // Text to indicate when in the future the behavior will be removed. - var message = "DEPRECATED: " + behaviour; - if(extra){ message += " " + extra; } - if(removal){ message += " -- will be removed in version: " + removal; } - console.warn(message); -} - -dojo.experimental = function(/* String */ moduleName, /* String? */ extra){ - // summary: Marks code as experimental. - // description: - // This can be used to mark a function, file, or module as - // experimental. Experimental code is not ready to be used, and the - // APIs are subject to change without notice. Experimental code may be - // completed deleted without going through the normal deprecation - // process. - // moduleName: - // The name of a module, or the name of a module file or a specific - // function - // extra: - // some additional message for the user - // example: - // | dojo.experimental("dojo.data.Result"); - // example: - // | dojo.experimental("dojo.weather.toKelvin()", "PENDING approval from NOAA"); - var message = "EXPERIMENTAL: " + moduleName + " -- APIs subject to change without notice."; - if(extra){ message += " " + extra; } - console.warn(message); -} - -// FIREBUG LITE - // summary: Firebug Lite, the baby brother to Joe Hewitt's Firebug for Mozilla Firefox - // description: - // Opens a console for logging, debugging, and error messages. - // Contains partial functionality to Firebug. See function list below. - // NOTE: - // Firebug is a Firefox extension created by Joe Hewitt (see license). You do not need Dojo to run Firebug. - // Firebug Lite is included in Dojo by permission from Joe Hewitt - // If you are new to Firebug, or used to the Dojo 0.4 dojo.debug, you can learn Firebug - // functionality by reading the function comments below or visiting http://www.getfirebug.com/docs.html - // NOTE: - // To test Firebug Lite in Firefox, set console = null; - // - // example: - // Supports inline objects in object inspector window (only simple trace of dom nodes, however) - // | console.log("my object", {foo:"bar"}) - // example: - // Option for console to open in popup window - // | var djConfig = {isDebug: true, popup:true }; - // example: - // Option for console height (ignored for popup) - // | var djConfig = {isDebug: true, debugHeight:100 }; - -if((!("console" in window) || !("firebug" in console)) && - dojo.config.noFirebugLite !== true){ - -(function(){ - // don't build a firebug frame in iframes - try{ - if(window != window.parent){ - // but if we've got a parent logger, connect to it - if(window.parent["console"]){ - window.console = window.parent.console; - } - return; - } - }catch(e){/*squelch*/} - - window.console = { - _connects: [], - log: function(){ - // summary: - // Sends arguments to console. - logFormatted(arguments, ""); - }, - - debug: function(){ - // summary: - // Sends arguments to console. Missing finctionality to show script line of trace. - logFormatted(arguments, "debug"); - }, - - info: function(){ - // summary: - // Sends arguments to console, highlighted with (I) icon. - logFormatted(arguments, "info"); - }, - - warn: function(){ - // summary: - // Sends warning arguments to console, highlighted with (!) icon and blue style. - logFormatted(arguments, "warning"); - }, - - error: function(){ - // summary: - // Sends error arguments (object) to console, highlighted with (X) icon and yellow style - // NEW: error object now displays in object inspector - logFormatted(arguments, "error"); - }, - - assert: function(truth, message){ - // summary: - // Tests for true. Throws exception if false. - if(!truth){ - var args = []; - for(var i = 1; i < arguments.length; ++i){ - args.push(arguments[i]); - } - - logFormatted(args.length ? args : ["Assertion Failure"], "error"); - throw message ? message : "Assertion Failure"; - } - }, - - dir: function(object){ - // summary: - // Traces object. Only partially implemented. - - var pairs = []; - for(var prop in object){ - try{ - pairs.push([prop, object[prop]]); - }catch(e){ - /* squelch */ - } - } - - pairs.sort(function(a, b){ - return a[0] < b[0] ? -1 : 1; - }); - - var html = ['| ', - escapeHTML(name), ' | ', ''); - appendObject(value, html); - html.push(' |
... otherwise we'd need a
- var ind = " "; - txt = txt || ""; - i = i || ind; - used = used || []; - looking: - for(var nm in o){ - if(o[nm] === window || o[nm] === document){ - continue; - }else if(o[nm] && o[nm].nodeType){ - if(o[nm].nodeType == 1){ - txt += i+nm + " : < "+o[nm].tagName+" id=\""+ o[nm].id+"\" />" + br; - }else if(o[nm].nodeType == 3){ - txt += i+nm + " : [ TextNode "+o[nm].data + " ]" + br; - } - }else if(typeof o[nm] == "object" && (o[nm] instanceof String || o[nm] instanceof Number || o[nm] instanceof Boolean)){ - txt += i+nm + " : " + o[nm] + br; - }else if(typeof(o[nm]) == "object" && o[nm]){ - for(var j = 0, seen; seen = used[j]; j++){ - if(o[nm] === seen){ - txt += i+nm + " : RECURSION" + br; - continue looking; - } - } - used.push(o[nm]); - txt += i+nm +" -> " + getAtts(o[nm]) + br; - txt += printObject(o[nm], i+ind, "", used); - }else if(typeof o[nm] == "undefined"){ - txt += i+nm + " : undefined" + br; - }else if(nm == "toString" && typeof o[nm] == "function"){ - var toString = o[nm](); - if(typeof toString == "string" && toString.match(/function ?(.*?)\(/)){ - toString = escapeHTML(getObjectAbbr(o[nm])); - } - txt += i+nm +" : " + toString + br; - }else{ - txt += i+nm +" : "+ escapeHTML(getObjectAbbr(o[nm])) + br; - } - } - txt += br; // keeps data from running to the edge of page - return txt; - } - - function getObjectAbbr(obj){ - // Gets an abbreviation of an object for display in log - // X items in object, including id - // X items in an array - // TODO: Firebug Sr. actually goes by char count - var isError = (obj instanceof Error); - var nm = (obj && (obj.id || obj.name || obj.ObjectID || obj.widgetId)); - if(!isError && nm){ return "{"+nm+"}"; } - - var obCnt = 2; - var arCnt = 4; - var cnt = 0; - - if(isError){ - nm = "[ Error: "+(obj.message || obj.description || obj)+" ]"; - }else if(isArray(obj)){ - nm = "[" + obj.slice(0,arCnt).join(","); - if(obj.length > arCnt){ - nm += " ... ("+obj.length+" items)"; - } - nm += "]"; - }else if(typeof obj == "function"){ - nm = obj + ""; - var reg = /function\s*([^\(]*)(\([^\)]*\))[^\{]*\{/; - var m = reg.exec(nm); - if(m){ - if(!m[1]){ - m[1] = "function"; - } - nm = m[1] + m[2]; - }else{ - nm = "function()"; - } - }else if(typeof obj != "object" || typeof obj == "string"){ - nm = obj + ""; - }else{ - nm = "{"; - for(var i in obj){ - cnt++; - if(cnt > obCnt){ break; } - nm += i+"="+obj[i]+" "; - } - nm+="}"; - } - - return nm; - } - - //************************************************************************************* - - window.onerror = onError; - addEvent(document, dojo.isIE || dojo.isSafari ? "keydown" : "keypress", onKeyDown); - - if( (document.documentElement.getAttribute("debug") == "true")|| - (dojo.config.isDebug) - ){ - toggleConsole(true); - } -})(); -} diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/infoIcon.png b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/infoIcon.png deleted file mode 100644 index da1e5334c19375c7855e04792661bf2cc15b7e14..0000000000000000000000000000000000000000 Binary files a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/infoIcon.png and /dev/null differ diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/warningIcon.png b/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/warningIcon.png deleted file mode 100644 index de51084e8489f498b89dd9a59d82eb9564b7d050..0000000000000000000000000000000000000000 Binary files a/javascript/bower/bower-bower-components/bower_components/dojo/_firebug/warningIcon.png and /dev/null differ diff --git a/javascript/bower/bower-bower-components/bower_components/dojo/back.js b/javascript/bower/bower-bower-components/bower_components/dojo/back.js deleted file mode 100644 index b5b5a93fb2f5a32591d0bb1db569ddb685f0fdce..0000000000000000000000000000000000000000 --- a/javascript/bower/bower-bower-components/bower_components/dojo/back.js +++ /dev/null @@ -1,390 +0,0 @@ -dojo.provide("dojo.back"); - -/*===== -dojo.back = { - // summary: Browser history management resources -} -=====*/ - - -(function(){ - var back = dojo.back; - - // everyone deals with encoding the hash slightly differently - - function getHash(){ - var h = window.location.hash; - if(h.charAt(0) == "#"){ h = h.substring(1); } - return dojo.isMozilla ? h : decodeURIComponent(h); - } - - function setHash(h){ - if(!h){ h = ""; } - window.location.hash = encodeURIComponent(h); - historyCounter = history.length; - } - - // if we're in the test for these methods, expose them on dojo.back. ok'd with alex. - if(dojo.exists("tests.back-hash")){ - back.getHash = getHash; - back.setHash = setHash; - } - - var initialHref = (typeof(window) !== "undefined") ? window.location.href : ""; - var initialHash = (typeof(window) !== "undefined") ? getHash() : ""; - var initialState = null; - - var locationTimer = null; - var bookmarkAnchor = null; - var historyIframe = null; - var forwardStack = []; - var historyStack = []; - var moveForward = false; - var changingUrl = false; - var historyCounter; - - function handleBackButton(){ - //summary: private method. Do not call this directly. - - //The "current" page is always at the top of the history stack. - //console.debug("handlingBackButton"); - var current = historyStack.pop(); - if(!current){ return; } - var last = historyStack[historyStack.length-1]; - if(!last && historyStack.length == 0){ - last = initialState; - } - if(last){ - if(last.kwArgs["back"]){ - last.kwArgs["back"](); - }else if(last.kwArgs["backButton"]){ - last.kwArgs["backButton"](); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("back"); - } - } - forwardStack.push(current); - //console.debug("done handling back"); - } - - back.goBack = handleBackButton; - - function handleForwardButton(){ - //summary: private method. Do not call this directly. - //console.debug("handling forward"); - var last = forwardStack.pop(); - if(!last){ return; } - if(last.kwArgs["forward"]){ - last.kwArgs.forward(); - }else if(last.kwArgs["forwardButton"]){ - last.kwArgs.forwardButton(); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("forward"); - } - historyStack.push(last); - //console.debug("done handling forward"); - } - - back.goForward = handleForwardButton; - - function createState(url, args, hash){ - //summary: private method. Do not call this directly. - return {"url": url, "kwArgs": args, "urlHash": hash}; //Object - } - - function getUrlQuery(url){ - //summary: private method. Do not call this directly. - var segments = url.split("?"); - if(segments.length < 2){ - return null; //null - } - else{ - return segments[1]; //String - } - } - - function loadIframeHistory(){ - //summary: private method. Do not call this directly. - var url = (dojo.config["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html")) + "?" + (new Date()).getTime(); - moveForward = true; - if(historyIframe){ - dojo.isSafari ? historyIframe.location = url : window.frames[historyIframe.name].location = url; - }else{ - //console.warn("dojo.back: Not initialised. You need to call dojo.back.init() from a