home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.tcs3.com
/
ftp.tcs3.com.tar
/
ftp.tcs3.com
/
DRIVERS
/
Audio
/
Office2010
/
ProPlus.WW
/
ProPsWW2.cab
/
FORMSPREVIEWTEMPLATE.HTML5
< prev
next >
Wrap
Text File
|
2007-02-04
|
18KB
|
742 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>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
<STYLE TYPE="text/css">
.activeTab, .inactiveTab
{
cursor: hand;
height: 18px;
border-right: 1px solid black;
}
.activeTab
{
background-color: #DEDEDE;
}
.inactiveTab
{
background-color: #797979;
color: #FFFFFF;
}
.tabContents
{
background-color: #DEDEDE;
}
.highlightField, .hoverField
{
background-color: highlight;
color: highlighttext;
}
.commandbar
{
background-color: menu;
border: 1px solid buttonshadow;
border-bottom-width:0px;
}
.command, .commandHover, .commandDown
{
width: 16px;
height: 16px;
padding: 3px;
border: 1px solid buttonface;
}
.commandSep
{
width: 0px;
margin: 0px 2px 0px 2px;
border-left: 1px solid buttonshadow;
border-right: 1px solid buttonhighlight;
}
.commandHover
{
border-top-color: buttonhighlight;
border-right-color: buttonshadow;
border-bottom-color:buttonshadow;
border-left-color: buttonhighlight;
}
.commandDown
{
border-top-color: buttonshadow;
border-right-color: buttonhighlight;
border-bottom-color:buttonhighlight;
border-left-color: buttonshadow;
}
.noFieldsText
{
font-family: tahoma,verdana,sans-serif;
color: #BFBFBF;
}
#divHeadingFieldsContainer, #divFieldsContainer
{
display: none;
}
</STYLE>
<SCRIPT LANGUAGE="JavaScript" SRC="PublicFunctions.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="utilityfunctions.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="submit.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="validation.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="form.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
// Put the variables from the querystring into globals.
getQueryStringVariables();
// Only include form_edit.js if you are actually previewing the form.
if (!g_IsViewSource)
document.write("<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"form_edit.js\"></" + "SCRIPT>");
var g_FormHTML = "";
var g_ShowBorder = false;
var g_ScriptDispatch = window.external.GetScriptDispatch();
if (g_FormID)
{
try
{
var Transaction = g_ScriptDispatch.OpenTransaction();
if (!g_IsViewSource)
document.write(g_ScriptDispatch.GetFormStyle(g_FormID));
g_FormHTML = g_ScriptDispatch.GetFormHTML(g_FormID)
g_ShowBorder = g_ScriptDispatch.GetShowBorder();
Transaction.Commit();
}
catch (error)
{
Transaction.Abort();
}
}
// ============================================== //
// === Begin document methods === //
// ============================================== //
function setPreviewDocument()
{
if (g_IsViewSource)
return;
g_ScriptDispatch.SetPreviewDocument(document, getFieldInstances(), getFieldGroupInstances(), getTabGroupInstances());
}
function clearPreviewDocument()
{
if (g_IsViewSource)
return;
g_ScriptDispatch.ClearPreviewDocument();
}
function setCurrentField(i_bCallback)
{
if (g_IsViewSource)
return;
g_ScriptDispatch.SetCurrentField(g_CurrentFormObject, i_bCallback);
}
function clearCurrentField()
{
if (g_IsViewSource)
return;
g_ScriptDispatch.ClearCurrentField();
}
// ============================================== //
// === Begin layout methods === //
// ============================================== //
var g_CurrentFormObject;
var g_HoverFormObject;
function hoverField(i_Field)
{
if (g_IsViewSource)
return;
if (window.event != null)
window.event.cancelBubble = true;
if (g_HoverFormObject != null)
disableHover();
g_HoverFormObject = i_Field;
if (i_Field != null)
{
var objLabel = document.getElementById(i_Field.Name + "_label");
var objField = document.getElementById(i_Field.Name + "_field");
if (objLabel != null)
objLabel.className = "hoverField " + objLabel.className;
if (objField != null)
objField.className = "hoverField " + objField.className;
}
}
function hoverTab(i_Tab, i_TabGroup)
{
if (window.event != null)
window.event.cancelBubble = true;
if (g_HoverFormObject != null)
disableHover();
g_HoverFormObject = i_Tab;
if (i_Tab != null)
{
var objTab = window.event.srcElement;
var objTabContents = document.getElementById(objTab.id + "Contents");
if (objTab != null)
objTab.className = "hoverField " + objTab.className;
if (objTabContents != null)
objTabContents.className = "hoverField " + objTabContents.className;
}
}
function selectFieldByName(i_FieldName)
{
if (g_IsViewSource)
return;
if (eval("typeof obj" + i_FieldName) != "undefined")
selectFieldNoHover(eval("obj" + i_FieldName));
else if (g_CurrentFormObject != null)
disableCurrent();
}
function selectField(i_Field)
{
if (g_IsViewSource)
return;
if (window.event != null)
window.event.cancelBubble = true;
if (g_CurrentFormObject != null)
disableCurrent();
g_CurrentFormObject = i_Field;
if (i_Field != null)
setCurrentField(true);
}
function selectFieldNoHover(i_Field)
{
if (window.event != null)
window.event.cancelBubble = true;
if (g_CurrentFormObject != null)
disableCurrent();
g_CurrentFormObject = i_Field;
if (i_Field != null)
{
var objLabel = document.getElementById(i_Field.Name + "_label");
var objField = document.getElementById(i_Field.Name + "_field");
if (objLabel != null)
objLabel.className = "highlightField " + objLabel.className;
if (objField != null)
objField.className = "highlightField " + objField.className;
setCurrentField(false);
scrollToField();
}
}
function selectTab(i_Tab, i_TabGroup)
{
if (window.event != null)
window.event.cancelBubble = true;
if (g_CurrentFormObject != null)
disableCurrent();
g_CurrentFormObject = i_Tab;
if (i_Tab != null)
{
var objTab = document.getElementById(i_Tab.Name);
if (objTab != null)
tabClick(objTab, i_TabGroup);
var objTab = window.event.srcElement;
if (objTab != null)
objTab.className = "hoverField " + objTab.className;
setCurrentField(true);
}
}
function disableCurrent()
{
if (g_CurrentFormObject.Type == FormObjectType_Tab)
disableCurrentHelper(g_CurrentFormObject.Name, "", "Contents")
else
disableCurrentHelper(g_CurrentFormObject.Name, "_label", "_field")
}
function disableCurrentHelper(i_Name, i_LabelPostfix, i_FieldPostfix)
{
var objCurrentLabel = document.getElementById(i_Name + i_LabelPostfix);
var objCurrentField = document.getElementById(i_Name + i_FieldPostfix);
if (objCurrentLabel != null)
objCurrentLabel.className = objCurrentLabel.className.replace(/(hoverField|highlightField) /g, "");
if (objCurrentField != null)
objCurrentField.className = objCurrentField.className.replace(/(hoverField|highlightField) /g, "");
}
function disableHover()
{
if (g_HoverFormObject.Type == FormObjectType_Tab)
disableHoverHelper(g_HoverFormObject.Name, "", "Contents");
else
disableHoverHelper(g_HoverFormObject.Name, "_label", "_field");
}
function disableHoverHelper(i_Name, i_LabelPostfix, i_FieldPostfix)
{
var objHoverLabel = document.getElementById(i_Name + i_LabelPostfix);
var objHoverField = document.getElementById(i_Name + i_FieldPostfix);
if (objHoverLabel != null)
objHoverLabel.className = objHoverLabel.className.replace(/(hoverField|highlightField) /g, "");
if (objHoverField != null)
objHoverField.className = objHoverField.className.replace(/(hoverField|highlightField) /g, "");
if (g_CurrentFormObject != null && g_CurrentFormObject.Name == i_Name)
{
var objCurrentLabel = document.getElementById(i_Name + i_LabelPostfix);
var objCurrentField = document.getElementById(i_Name + i_FieldPostfix);
if (objCurrentLabel != null)
objCurrentLabel.className = "highlightField " + objCurrentLabel.className;
if (objCurrentField != null)
objCurrentField.className = "highlightField " + objCurrentField.className;
}
}
function moveLeft()
{
int_moveLeft(g_CurrentFormObject);
selectFieldNoHover(g_CurrentFormObject);
scrollToField();
}
function int_moveLeft(i_FormObject)
{
if (i_FormObject != null)
{
var arrFields = getProperFields(i_FormObject);
for (var i = 0; i < arrFields.length; i++)
{
if (arrFields[i].Name == i_FormObject.Name)
{
// Can't move up if it is the first field.
if (i == 0)
break;
var PreArray = new Array();
if (i >= 2)
PreArray = arrFields.slice(0, i - 1);
var PostArray = new Array();
if (arrFields.length > i)
PostArray = arrFields.slice(i + 1, arrFields.length);
var FieldsArray = PreArray.concat(arrFields[i], arrFields[i-1], PostArray);;
if (i_FormObject.Tab != null)
i_FormObject.Tab.Fields = FieldsArray;
else if (i_FormObject.FieldGroup != null)
i_FormObject.FieldGroup.Fields = FieldsArray;
else
Fields.FormObjects = FieldsArray;
refreshLayout();
break;
}
}
setPreviewDocument();
}
}
function moveRight()
{
if (g_CurrentFormObject != null)
{
var arrFields = getProperFields(g_CurrentFormObject);
for (var i = 0; i < arrFields.length; i++)
{
if (arrFields[i].Name == g_CurrentFormObject.Name)
{
int_moveLeft(arrFields[i+1]);
break;
}
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
scrollToField();
}
function scrollToField()
{
var objLabel = document.getElementById(g_CurrentFormObject.Name + "_label");
var objField = document.getElementById(g_CurrentFormObject.Name + "_field");
if (objLabel != null || objField != null)
{
var objInput = objLabel;
if (objInput == null)
objInput = objField;
var intTop = getOffset(objInput, "top");
var intHeight = objInput.offsetHeight;
if (intTop < document.body.scrollTop)
{
document.body.scrollTop = intTop - 10;
}
else if ((intTop + intHeight) > (document.body.scrollTop + document.body.offsetHeight))
{
document.body.scrollTop = (intTop - document.body.offsetHeight) + intHeight + 10;
}
}
}
function changeColumns(i_Columns)
{
var Columns = parseInt(i_Columns);
if (!isNaN(Columns))
{
Fields.NumberOfColumns = Columns;
refreshLayout();
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeColumnSpan(i_ColumnSpan)
{
if (g_CurrentFormObject != null)
{
var ColumnSpan = parseInt(i_ColumnSpan);
if (!isNaN(ColumnSpan))
{
g_CurrentFormObject.ColumnSpan = ColumnSpan;
refreshLayout();
}
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeRowSpan(i_RowSpan)
{
if (g_CurrentFormObject != null)
{
var RowSpan = parseInt(i_RowSpan);
if (!isNaN(RowSpan))
{
g_CurrentFormObject.RowSpan = RowSpan;
refreshLayout();
}
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeClassName(i_ClassName)
{
if (g_CurrentFormObject != null)
{
g_CurrentFormObject.ClassName = i_ClassName;
refreshLayout();
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeInheritFrom(i_InheritFrom)
{
if (g_CurrentFormObject != null)
g_CurrentFormObject.InheritFrom = i_InheritFrom;
}
function changeIsHidden()
{
if (g_CurrentFormObject != null)
{
if (g_CurrentFormObject.IsHidden)
g_CurrentFormObject.IsHidden = false;
else
g_CurrentFormObject.IsHidden = true;
refreshLayout();
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeIsReadOnly()
{
if (g_CurrentFormObject != null)
{
if (g_CurrentFormObject.IsReadOnly)
g_CurrentFormObject.IsReadOnly = false;
else
g_CurrentFormObject.IsReadOnly = true;
}
}
function changeIsRequired()
{
if (g_CurrentFormObject != null)
{
if (g_CurrentFormObject.IsRequired)
g_CurrentFormObject.IsRequired = false;
else
g_CurrentFormObject.IsRequired = true;
refreshLayout();
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changePropagateUpdates()
{
if (g_CurrentFormObject != null)
{
if (g_CurrentFormObject.PropagateUpdates)
g_CurrentFormObject.PropagateUpdates = false;
else
g_CurrentFormObject.PropagateUpdates = true;
}
}
function changeTabColumns(i_Columns)
{
if (g_CurrentFormObject != null)
{
var TabColumns = parseInt(i_Columns);
if (!isNaN(TabColumns))
{
g_CurrentFormObject.NumberOfColumns = TabColumns;
refreshLayout();
}
}
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function changeShowBorder(i_ShowBorder)
{
g_ShowBorder = i_ShowBorder;
refreshLayout();
selectFieldNoHover(g_CurrentFormObject);
setPreviewDocument();
}
function refreshLayout()
{
HeadingFields.displayFields();
Fields.displayFields();
initFormPage();
}
// ============================================== //
// === Begin callback methods === //
// ============================================== //
function canMoveLeft()
{
if (g_CurrentFormObject != null)
{
var arrFields = getProperFields(g_CurrentFormObject);
for (var i = 0; i < arrFields.length; i++)
{
if (arrFields[i].Name == g_CurrentFormObject.Name && i >= 1)
return true;
}
}
return false;
}
function canMoveRight()
{
if (g_CurrentFormObject != null)
{
var arrFields = getProperFields(g_CurrentFormObject);
for (var i = 0; i < arrFields.length; i++)
{
if (arrFields[i].Name == g_CurrentFormObject.Name && i < arrFields.length-1)
return true;
}
}
return false;
}
function getProperFields(i_Field)
{
var arrFields;
if (g_CurrentFormObject.Tab != null)
arrFields = g_CurrentFormObject.Tab.Fields;
else if (g_CurrentFormObject.FieldGroup != null)
arrFields = g_CurrentFormObject.FieldGroup.Fields;
else
arrFields = Fields.FormObjects;
return arrFields;
}
function getFieldInstances()
{
var arrFields = new Array();
var arrFormObjects = HeadingFields.FormObjects.concat(Fields.FormObjects)
for (var i = 0; i < arrFormObjects.length; i++)
{
var FormObject = arrFormObjects[i];
if (FormObject.Type == FormObjectType_TabGroup)
{
for (var j = 0; j < FormObject.Tabs.length; j++)
{
for (var k = 0; k < FormObject.Tabs[j].Fields.length; k++)
{
if (FormObject.Tabs[j].Fields[k].Type != FormObjectType_FieldGroup)
arrFields.push(FormObject.Tabs[j].Fields[k]);
else
{
// If it is a field group within a tab group, add the fields.
var FieldGroup = FormObject.Tabs[j].Fields[k];
for (var l = 0; l < FieldGroup.Fields.length; l++)
{
arrFields.push(FieldGroup.Fields[l]);
}
}
}
}
}
else if (FormObject.Type == FormObjectType_FieldGroup)
{
for (var j = 0; j < FormObject.Fields.length; j++)
{
arrFields.push(FormObject.Fields[j]);
}
}
else
{
arrFields.push(FormObject);
}
}
return arrFields;
}
function getFieldGroupInstances()
{
return Fields.FieldGroups;
}
function getTabGroupInstances()
{
return Fields.TabGroups;
}
function getScriptHostQI(i_Interface)
{
try
{
return window.external.GetScriptDispatch();
}
catch (error)
{
if (!g_AlertShown)
{
alert("This web page should only be opened from within Groove. Please close the window.");
g_AlertShown = true;
}
return null;
}
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="setPreviewDocument(); initFormPage();" ONBEFOREUNLOAD="clearPreviewDocument(); clearCurrentField(); terminateFormPage();" ONCLICK="selectField(null); clearCurrentField();" ONMOUSEOVER="hoverField(null);">
<TABLE ID="tableNoFieldsInfo" CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" HEIGHT="90%">
<TR>
<TD VALIGN="middle" ALIGN="center" CLASS="noFieldsText">
<FONT STYLE="font-size:14pt;">
<SCRIPT LANGUAGE="JavaScript">
// IDS_FORMS_TOOL_JS_SELECT_FIELDS
document.write(getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").GetResourcedString(IDS_FORMS_TOOL_JS_SELECT_FIELDS));
</SCRIPT>
</FONT>
</TD>
</TR>
</TABLE>
<FORM NAME="GrooveFormBase" ONSUBMIT="return false;">
<DIV ID="divHeadingFieldsContainer"></DIV>
<DIV ID="divFieldsContainer"></DIV>
<SCRIPT LANGUAGE="javascript">
if (g_IsViewSource)
{
document.write("<DIV STYLE=\"font-family:courier; font-size:10pt;\" NOWRAP>");
document.write("<HTML><br>");
document.write("<BODY><br><br>");
document.write("<FORM NAME=\"GrooveFormBase\"><br><br>");
}
document.write(g_FormHTML);
//document.write("<textarea rows=25 cols=100>" + g_FormHTML + "</textarea>");
if (g_IsViewSource)
{
document.write("<br></FORM><br><br>");
document.write("</BODY><br>");
document.write("</HTML><br>");
document.write("</DIV>");
}
</SCRIPT>
</FORM>
</BODY>
</HTML>