123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- /****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** BI and PM: qs
- **
- ** (C) Copyright IBM Corp. 2001, 2015
- **
- ** 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 and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
- var gsMODALDLG_ID = "modalDlg";
- var giMIN_DIALOG_SIZE = 50;
- function getConfigFrame()
- {
- if (this.id == 'CR1_TopFrame')
- return this;
- else if (parent != null && parent.id == 'CR1_TopFrame')
- return parent;
- else if (opener != null && opener.id == 'CR1_TopFrame')
- return opener;
- else if (top.id == 'CR1_TopFrame')
- return top;
- else
- return null;
- };
- function getReportFrame()
- {
- return getFrame('reportIFrame');
- };
- function getDialogFrame()
- {
- return getFrame('dialogIFrame');
- };
- function getFrame(sId)
- {
- var oConfigFrame = getConfigFrame();
- var oFrameWindow = null;
- if (oConfigFrame && oConfigFrame.document)
- {
- var oFrame = oConfigFrame.document.getElementById(sId);
- if (oFrame && oFrame.contentWindow)
- {
- oFrameWindow = oFrame.contentWindow;
- }
- }
- return oFrameWindow;
- };
- function showDialogFrame(size)
- {
- var dlgSize = (size == null) ? 325 : size;
- cfgSet("DialogSize", dlgSize);
- if (typeof dlgSize == "undefined" || dlgSize == 0)
- {
- document.getElementById("dialogFrame").style.height = "0px";
- document.getElementById("dialogIFrame").style.borderTop = "0px";
- document.getElementById("dialogResizeBar").style.display = "none";
- }
- else
- {
- document.getElementById("dialogFrame").style.height = dlgSize + "px";
- document.getElementById("dialogIFrame").style.borderTop = "1px solid #999999";
- document.getElementById("dialogResizeBar").style.display = "block";
- }
- if (typeof hideModal == "function")
- hideModal();
- };
- function hideDialogFrame()
- {
- cfgRemove("LAST_DIALOG");
- var df = getDialogFrame();
- var sWebRoot = cfgGet("gsWebRoot");
- if (df && df.document &&
- (typeof df.dialogIsClosed == "undefined" || !df.dialogIsClosed) &&
- typeof sWebRoot != "undefined")
- df.document.location.replace(sWebRoot + "/" + qs_dir + "/closedialog.html");
- document.getElementById("dialogResizeBar").style.display = "none";
- if (typeof hideModal == "function")
- hideModal();
- var rf = getReportFrame();
- if (rf)
- {
- rf.window.focus();
- }
- };
- function enableResizeDialogFrame(bEnable)
- {
- getConfigFrame().cfgSet('RESIZING_DIALOG_PANE', bEnable);
- };
- function resizeDialogFrame(evt, y)
- {
- if (cfgGet('RESIZING_DIALOG_PANE') == true)
- {
- if (typeof y == "undefined")
- y = evt.clientY;
- var pageHeight;
- var fMax;
- if(document.all)
- {
- pageHeight = getConfigFrame().document.body.scrollHeight;
- fMax = 1;
- }
- else
- {
- pageHeight = getConfigFrame().document.body.offsetHeight;
- fMax = 0.65;
- }
-
- var fPercentage = (pageHeight - y)/pageHeight;
- if (fPercentage >= fMax)
- {
- showDialogFrame(pageHeight*fMax);
- }
- else if ((pageHeight - y) >= giMIN_DIALOG_SIZE)
- {
- showDialogFrame(pageHeight - y);
- }
- else
- {
- showDialogFrame(giMIN_DIALOG_SIZE);
- }
- }
- };
- function attachMouseEvents()
- {
- if (document.all)
- {
- document.body.attachEvent("onmouseup", getConfigFrame().mainMouseUp);
- document.body.attachEvent("onmousemove", getConfigFrame().mainMouseMove);
- }
- else
- {
- document.body.addEventListener("mouseup", getConfigFrame().mainMouseUp, true);
- document.body.addEventListener("mousemove", getConfigFrame().mainMouseMove, true);
- }
- };
- function showModal(t, c, w, h) {
- var cdlg = new CModal(t, c, null, null, null, h, w, false, false, false, false, goApplicationManager.getReportFrame().oCVQS.getWebContentRoot());
- cdlg.show();
- dlgSubmit(CMODAL_CONTENT_ID, true);
- };
|