home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.tcs3.com
/
ftp.tcs3.com.tar
/
ftp.tcs3.com
/
DRIVERS
/
Audio
/
Office2010
/
ProPlus.WW
/
ProPsWW2.cab
/
FORMSVIEWFRAME.HTML3
< prev
next >
Wrap
Text File
|
2007-02-04
|
5KB
|
138 lines
<!-- *********************************************************************
Notice
You may not modify, use, copy or distribute this file or its contents.
Internal interfaces referenced in this file are nonpublic, unsupported
and subject to change without notice. These interfaces may not be
utilized in other software applications or components.
********************************************************************* -->
<!-- saved from url=(0025)http://www.microsoft.com/ -->
<html>
<head>
<title>Main Page (preview)</title>
<script language="javascript" src="utilityfunctions.js"></script>
</head>
<script language="javascript">
<!--
var g_ResizeTimeoutID;
// =====================================================
// === Document Event Handlers ===
// =====================================================
document.oncontextmenu = contextMenuEvent;
function contextMenuEvent()
{
// Right-click context menu will only appear if 'Ctrl' key is held down.
if (!event.ctrlKey)
event.returnValue = false;
}
// =====================================================
// === View Frame Initialization ===
// =====================================================
var Transaction = getScriptHostQI("IGrooveFormsToolUIDelegate").OpenTransaction();
try
{
var ViewID = -1;
if (window.location.search != "")
{
var QueryString = String(window.location.search).substring(1);
ViewID = getValueFromQueryString("ViewID", QueryString);
}
// If the view id in the querystring is invalid, look for a recent one.
if (ViewID == -1 || ViewID == "")
{
var CurrentViewID = getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").CurrentWebViewID;
if (CurrentViewID != -1 && CurrentViewID != "" && getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").DoesDesignObjectExist(CurrentViewID))
{
ViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ConvertDesignObjectIDToString(CurrentViewID);
}
else
{
// Check the default view from configuration options.
var DefaultViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").DefaultViewID;
if (DefaultViewID != -1 && DefaultViewID != "" && getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").DoesDesignObjectExist(DefaultViewID))
ViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ConvertDesignObjectIDToString(DefaultViewID);
else
window.location.replace("FormsHomePage.html");
}
}
// Save the current view ID. We must convert it to a number
// here in case the user has selected a different locale.
getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").CurrentWebViewID = Number(ViewID);
if (getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ShowPreviewPane)
{
// Write out the frame set to display the view and the preview pane.
document.write("<frameset rows=\"" + getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").ViewFrameSize + "\" id=\"FormsViewFrameset\" onload=\"verifyFrameSize();\" onunload=\"setFrameSize()\">");
document.write(" <frame src=\"FormsViewTemplate.html?ViewID=" + ViewID + "\" id=\"FormsViewPage\" scrolling=\"no\" frameborder=\"no\" onresize=\"verifyFrameSize()\">");
document.write(" <frame src=\"FormsBlankPage.html\" id=\"FormsPreviewPage\">");
document.write("</frameset>");
}
else
{
window.location.replace("FormsViewTemplate.html?ViewID=" + ViewID);
}
Transaction.Commit();
}
catch (error)
{
getScriptHostQI("IGrooveFormsToolUIDelegate").DisplayError(error.description);
Transaction.Abort();
}
// =====================================================
// === View Frame Utility ===
// =====================================================
function setFrameSize()
{
var objViewFrame = document.getElementById("FormsViewPage");
var objPreviewFrame = document.getElementById("FormsPreviewPage");
if (objViewFrame != null && objPreviewFrame != null)
{
var intTopHeight = objViewFrame.height;
var intBotHeight = objPreviewFrame.height;
var intTotal = intTopHeight + intBotHeight;
var intTopPercent = Math.round((intTopHeight / intTotal) * 100);
getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").ViewFrameSize = intTopPercent + "%,*";
}
}
function verifyFrameSize()
{
window.clearTimeout(g_ResizeTimeoutID);
g_ResizeTimeoutID = window.setTimeout("verifyFrameSizeDelayed()", 250);
}
function verifyFrameSizeDelayed()
{
var arrFrames = document.getElementsByTagName("FRAME");
if (arrFrames.length >= 2)
{
var intTopHeight = arrFrames[0].height;
if (intTopHeight <= 36)
{
var objFrameset = document.getElementById("FormsViewFrameset");
if (objFrameset != null)
objFrameset.rows = "37,*";
}
}
}
// -->
</script>
</html>