/******************************************************************************* * OpenAjax.js / OpenAjaxBootstrap.js: * * Component of the OpenAjax Hub, as specified by OpenAjax Alliance. * Specification is under development at: * * http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification * * In the current implementation, the OpenAjax.js file is created by simply * concatenating the individual component JavaScript files in a particular order, with * where this file must be the first one in the list. * * Copyright 2006-2007 OpenAjax Alliance * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless * required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ******************************************************************************/ /* * OpenAjax Hub configuration parameters. * These configuration parameters are meant for use by the application developer, * not the Ajax runtime library developer. * * The following is a quick summary of available parameters. * Refer to the OpenAjax Hub Specification for the official and detailed definition of these features. * * bootstrapFile = string * Holds name of JavaScript file that initializes OpenAjax object and includes definition of * OpenAjax.require() function for dynamic module loading. * idsToScan = array of strings (Default is []) * Provides to the OpenAjax Hub a list of element IDs upon which to invoke the * markup scanner. * scanPage = boolean (Default is true) * Tells the OpenAjax Hub whether to auto-invoke its markup scanner * on the BODY element in the document. */ if (typeof OpenAjaxConfig == "undefined") { OpenAjaxConfig = {}; } /* * Only create an OpenAjax object if it doesn't exist already. * (If it already exists, then assume the prior instance provides the services that are needed. * Also, attempts to initialize a second time probably will clobber key data from existing OpenAjax object.) */ if (typeof OpenAjax == "undefined") { OpenAjax = { implementer: "http://openajax.org", implVersion: "0.3", specVersion: "0.3", implExtraData: {}, _allModules: {"Libraries":1,"LoadUnload":1,"Globals":1,"PublishSubscribe":1,"MarkupScanner":1}, loadDone: false, unloadDone: false, // Public function. If module has not been loaded already, load it now. require: function(modules) { var head = document.head; if (!head) { // Overcome bug in Mozilla when XSLT generates the HTML document. head = document.getElementsByTagName("head").item(0); } if (!head) { return; } var reqmods = modules.split(","); var allmods = OpenAjax._allModules; for (var i=0; i= 2) { nsuri = OpenAjax.libraries[t[0]].namespaceURI; nodeName = t[1]; } else { nsuri = null; // No namespace prefix, so nodeName already has correct value. } } arrayToAdjust.push({ "prefix": prefix, "nsuri": nsuri, "nodeName": nodeName, "checkType": checkType, "checkString": checkString, "func": refOrName }); } /* Remove callback functions from the appropriate private array. */ OpenAjax._unregScanCB = function ( functionName, // Public function name for error messages arrayToAdjust, // The array from which registrations will be removed. prefix){ // The prefix that corresponds to this library. for (var i=arrayToAdjust.length-1; i >=0 ; i--) { if (arrayToAdjust[i].prefix == prefix) { // Use 'slice' instead of 'splice' due to bug in IE7. var tail = arrayToAdjust.slice(i+1); var len = arrayToAdjust.length; for (var p=i; p