123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- function COpenReport()
- {
- };
- COpenReport.prototype = new AFeatureObject();
- COpenReport.prototype.setup = function (aFeatureParams)
- {
- if (aFeatureParams != null && aFeatureParams.length >= 1)
- {
- if (aFeatureParams[0] == 'continueOpen')
- {
- var sOpenSearchPath = cfgGet("openSearchPath");
- if (sOpenSearchPath != "")
- {
- reopenQueryStudio(cfgGet("openSearchPath"), false);
- }
- cfgRemove("openSearchPath");
- }
- else if (aFeatureParams[0] == 'ccModalCallback' && aFeatureParams.length >= 3)
- {
- this.ccModalCallBack(aFeatureParams[1], aFeatureParams[2]);
- }
- }
- else
- {
- this.openQuery()
- }
- };
- COpenReport.prototype.openQuery = function()
- {
- cfgSet("LAST_DIALOG", "queryOpen");
- dlgReset();
- dlgGlobalReset();
- dlgSetParm("m", "portal/select/select.xts");
- dlgSetParm("so.select", "queries.qs");
- dlgSetParm("so.defaultLocation", decodeURIComponent(cf.cfgGet("ReportFolder")));
- dlgSetParm("md.callBack", "");
- dlgSubmit(null, null, true);
- showDialogFrame(425);
- };
- COpenReport.prototype.ccModalCallBack = function(command, data)
- {
- if (command == "ok" && data != null)
- {
- data = sXmlDecode(data);
- var oDoc = XMLBuilderLoadXMLFromString(data);
- if (oDoc != null)
- {
- var oValueElement = XMLHelper_FindChildByTagName(oDoc, "value", true);
- if (oValueElement != null)
- {
- var sSearchPath = XMLHelper_GetText(oValueElement);
- reopenQueryStudio(sSearchPath, true);
- }
- }
- }
- else
- {
- dlgGlobalReset();
- dlgReset();
- setTimeout("hideDialogFrame()",100);
- }
- };
- function reopenQueryStudio(sSearchPath, bCheckForSave)
- {
- goApplicationManager.getReportManager().createNewUndoManager();
- if ( bCheckForSave && ((typeof bCloseWindow == "undefined" || bCloseWindow == null || !bCloseWindow || bCloseWindow == "noCancel") && goApplicationManager.get("reportHasChanged") === true))
- {
- window.onbeforeunload = null;
-
- dlgReset();
- cfgSet("openSearchPath", sSearchPath);
- dlgSetParm("openAfterSave", "true");
- dlgSetParm("m", "/" + qs_dir + "/leavingQS.xts");
- dlgSubmit(null, false, true);
-
- return;
- }
- var hideParam = "";
- var hideValue = "";
- if (goApplicationManager.getReportManager().get("CAFEnabled") == true)
- {
- hideParam = "ui.hideXLS";
- hideValue = "true";
- }
- var cafParam = "";
- var cafValue = "";
- if (cafContextId != "")
- {
- cafParam = "ui.cafcontextid";
- cafValue = cafContextId;
- }
- var backURL = "";
- if (gsUiBackURL != null)
- {
- backURL = gsUiBackURL;
- }
- cognosLaunchInWindow("_self", "",
- "ui.gateway", goApplicationManager.get("scriptEngine"),
- "ui.tool", "QueryStudio",
- "ui.action", "edit",
- "ui.object", sSearchPath,
- "ui.hideXLS", "true",
- "ui.backURL", backURL,
- hideParam, hideValue,
- cafParam, cafValue
- );
- };
|