cmd.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /****************************************************************
  2. ** Licensed Materials - Property of IBM
  3. **
  4. ** IBM Cognos Products: drill
  5. **
  6. ** (C) Copyright IBM Corp. 2001, 2010
  7. **
  8. ** US Government Users Restricted Rights - Use, duplication or
  9. ** disclosure restricted by GSA ADP Schedule Contract with
  10. ** IBM Corp.
  11. *****************************************************************/
  12. // Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  13. // Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  14. function metaLogonWindow(parentWin)
  15. {
  16. var theURL = cfgGet("SCRIPT_ENGINE") + "?b_action=xts.run&m=portal/close.xts";
  17. var expWnd = window.open(theURL,"LoginWnd","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=310");
  18. cfgSet("expWnd", expWnd);
  19. cfgSet("winHdl", parentWin);
  20. setTimeout(mLPWindow, 1000);
  21. }
  22. function mLPWindow(){
  23. var expWnd = cfgGet("expWnd");
  24. if (expWnd && !expWnd.closed)
  25. setTimeout(mLPWindow, 1000);
  26. else
  27. {
  28. var winHdl = cfgGet("winHdl");
  29. if (winHdl && winHdl.location)
  30. {
  31. // Use the current stored request that happened just before the login.
  32. doMetadataRequest(cfgGet("CURRENT_REQUEST"));
  33. }
  34. cfgRemove("winHdl");
  35. cfgRemove("expWnd");
  36. }
  37. }
  38. function metaErrorPage(error)
  39. {
  40. var errmessage = error[1]
  41. var errdetail = "";
  42. for( i=2; i < error.length; i++)
  43. {
  44. errdetail += error[i].substring((error[i].indexOf(",")) + 1) + '\n';
  45. }
  46. document.pform.m.value = prod_dir + "/tree_error.xts";
  47. document.pform.errorText.value= errmessage.substring((errmessage.indexOf(",")) + 1);
  48. document.pform.errorDetail.value = errdetail;
  49. document.pform.ps_nav_op.value = "maintain";
  50. document.pform.submit();
  51. }