1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- // Licensed Materials - Property of IBM
- //
- // IBM Cognos Products: cogadmin
- //
- // (C) Copyright IBM Corp. 2005, 2010
- //
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- //
- //
- // Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- // Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- //----------------------------------------------------------
- /* This class worked as a root js file for cogamdmin.
- *
- * It will include all the management related to the JS behaviour framework,
- * it shouldn't include any system related functions
- *
- * Also it will contain the zzcogadmin scope public variables and static variables.
- *
- * The included functionalities are: Namespace Mgt.
- * TODO: will include functionalities are: Modules Mgt, Dependency Import Mgt,
- *
- */
- if (typeof com == "undefined")
- var com = {};
-
- if (typeof com.cognos == "undefined")
- com.cognos = {};
-
- if (typeof com.cognos.admin == "undefined")
- com.cognos.admin = {};
- com.cognos.admin.ObjectFactory = function(objName) {
- var namespace = objName.split(".");
- var obj=window;
- for (var i=0; i < namespace.length;i++) {
- if (!obj[namespace[i]]) {
- obj = obj[namespace[i]] = {};
- } else {
- obj = obj[namespace[i]];
- if (typeof(obj) != "object")
- throw new Error(objName + " already exists and is not an object");
- }
- }
- return obj;
- };
- com.cognos.admin.VERSION = "0.1.0";
- //static variables for cogAdmin
- com.cognos.admin.GATEWAY = _F_Config.gateway ;
- com.cognos.admin.WEBCONTENT = _F_Config.webContent ;
- //public variables for cogAdmin
- com.cognos.admin.publicParam = {
- states:{}, // fragment based, store the client state in global scale.
- callbackEnv : {}, //for the situation from the outside of framework(e.g. legacy mophlet) want to go back.
- evtLoaded:{} //fragment based, protect the event handler from dup loaded.
- };
- //config variables for cogAdmin JS controller framework
- com.cognos.admin.config = {
- debug : true,
- dependencyControllerType : "fragment"
- };
|