dojoInit.js 901 B

1234567891011121314151617181920212223242526272829
  1. // Licensed Materials - Property of IBM
  2. //
  3. // IBM Cognos Products: cogadmin
  4. //
  5. // (C) Copyright IBM Corp. 2005, 2011
  6. //
  7. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. //
  9. //
  10. /*
  11. * This class will initial the fragment env to meet the dojo load
  12. *
  13. */
  14. if (typeof dojo == "undefined") throw new Error ("Dojo is not loaded.");
  15. //register cogadmin dojo style JavaScript library to dojo
  16. dojo.registerModulePath('com.ibm.cognos.admin', '../../ps/cogadmin/js/com/ibm/cognos/admin');
  17. dojo.addOnLoad (
  18. function () {
  19. //inject the tundra css into body class, before we have a elegent solution
  20. var body = document.getElementsByTagName("body")[0];
  21. var currClass = dojo.attr( body, "class" ) || "";
  22. if (currClass.indexOf ("tundra") == -1){
  23. dojo.attr( body, "class", currClass + " tundra" );
  24. }
  25. }
  26. );