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.HTML4 < prev    next >
Text File  |  2007-02-04  |  6KB  |  158 lines

  1. <!-- /*********************************************************************
  2.                                  Notice
  3.  
  4. You may not modify, use, copy or distribute this file or its contents. 
  5. Internal interfaces referenced in this file are nonpublic, unsupported 
  6. and subject to change without notice. These interfaces may not be 
  7. utilized in other software applications or components.
  8.  
  9.  
  10. *********************************************************************/ -->
  11.  
  12. <!-- saved from url=(0025)http://www.microsoft.com/ -->
  13.  
  14. <html>
  15. <head>
  16.     <title>Main Page (preview)</title>
  17.     <script language="javascript" src="utilityfunctions.js"></script>
  18. </head>
  19.  
  20. <script language="javascript">
  21. <!--
  22.  
  23. var g_ResizeTimeoutID;
  24.  
  25. // =====================================================
  26. // ===            Document Event Handlers            ===
  27. // =====================================================
  28.  
  29. document.oncontextmenu = contextMenuEvent;
  30.  
  31. function contextMenuEvent()
  32. {
  33.     // Right-click context menu will only appear if 'Ctrl' key is held down.
  34.     if (!event.ctrlKey)
  35.         event.returnValue = false;
  36. }
  37.  
  38. // =====================================================
  39. // ===           View Frame Initialization           ===
  40. // =====================================================
  41.  
  42. var Transaction = getScriptHostQI("IGrooveFormsToolUIDelegate").OpenTransaction();
  43. try
  44. {
  45.  
  46.     var ViewID = -1;
  47.     if (window.location.search != "")
  48.     {
  49.         var QueryString = String(window.location.search).substring(1);
  50.         ViewID = getValueFromQueryString("ViewID", QueryString);
  51.     }
  52.  
  53.     // If the view id in the querystring is invalid, look for a recent one.
  54.     if (ViewID == -1 || ViewID == "")
  55.     {
  56.         var CurrentViewID = getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").CurrentWebViewID;
  57.         if (CurrentViewID != -1 && CurrentViewID != "")
  58.         {
  59.             ViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ConvertDesignObjectIDToString(CurrentViewID);
  60.         }
  61.         else
  62.         {
  63.             // Check the default view from configuration options.
  64.             var DefaultViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").DefaultViewID;
  65.             if (DefaultViewID != -1 && DefaultViewID != "")
  66.             {
  67.                 ViewID = getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ConvertDesignObjectIDToString(DefaultViewID);
  68.             }
  69.             else
  70.                 window.location.replace("FormsHomePage.html");
  71.         }
  72.     }
  73.  
  74.     // Save the current view ID. We must convert it to a number
  75.     // here in case the user has selected a different locale.
  76.     getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").CurrentWebViewID = Number(ViewID);
  77.  
  78.     if (!getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").IsUsableDesignObject(Number(ViewID)))
  79.     {
  80.         document.write("<body bgcolor=\"#ffffff\">");
  81.         document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" height=\"90%\">");
  82.         document.write("<tr>");
  83.         document.write("    <td valign=\"middle\" align=\"center\">");
  84.         document.write("        <font style=\"font-family:tahoma,verdana,sans-serif; font-size:14pt; color:#bfbfbf;\">");
  85.         document.write("            A member of this workspace has updated the design of this view with features that require a later version of Groove Virtual Office. You must update Groove in order to resume using this view.");
  86.         document.write("        </font>");
  87.         document.write("    </td>");
  88.         document.write("</tr>");
  89.         document.write("</table>");
  90.         document.write("</body>");
  91.  
  92.         // Tell the UIDelegate we are in the ViewData state.
  93.         getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").SwitchWebState(FormsUIState_ViewData, -1);
  94.     }
  95.     else if (getScriptHostQI("IGrooveFormsToolUIDelegatePrivate").ShowPreviewPane)
  96.     {
  97.         // Write out the frame set to display the view and the preview pane.
  98.         document.write("<frameset rows=\"" + getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").ViewFrameSize + "\" id=\"FormsViewFrameset\" onload=\"verifyFrameSize();\" onunload=\"setFrameSize()\">");
  99.         document.write("    <frame src=\"FormsViewTemplate.html?ViewID=" + ViewID + "\" id=\"FormsViewPage\" scrolling=\"no\" frameborder=\"no\" onresize=\"verifyFrameSize()\">");
  100.         document.write("    <frame src=\"FormsBlankPage.html\" id=\"FormsPreviewPage\">");
  101.         document.write("</frameset>");
  102.     }
  103.     else
  104.     {
  105.         window.location.replace("FormsViewTemplate.html?ViewID=" + ViewID);
  106.     }
  107.  
  108.     Transaction.Commit();
  109. }
  110. catch (error)
  111. {
  112.     getScriptHostQI("IGrooveFormsToolUIDelegate").DisplayError(error.description);
  113.     Transaction.Abort();
  114. }
  115.  
  116. // =====================================================
  117. // ===              View Frame Utility               ===
  118. // =====================================================
  119.  
  120. function setFrameSize()
  121. {
  122.     var objViewFrame = document.getElementById("FormsViewPage");
  123.     var objPreviewFrame = document.getElementById("FormsPreviewPage");
  124.     if (objViewFrame != null && objPreviewFrame != null)
  125.     {
  126.         var intTopHeight = objViewFrame.height;
  127.         var intBotHeight = objPreviewFrame.height;
  128.         var intTotal = intTopHeight + intBotHeight;
  129.         var intTopPercent = Math.round((intTopHeight / intTotal) * 100);
  130.         getScriptHostQI("IGrooveFormsToolUIDelegateViewFramePrivate").ViewFrameSize = intTopPercent + "%,*";
  131.     }
  132. }
  133.  
  134. function verifyFrameSize()
  135. {
  136.     window.clearTimeout(g_ResizeTimeoutID);
  137.     g_ResizeTimeoutID = window.setTimeout("verifyFrameSizeDelayed()", 250);
  138. }
  139.  
  140. function verifyFrameSizeDelayed()
  141. {
  142.     var arrFrames = document.getElementsByTagName("FRAME");
  143.     if (arrFrames.length >= 2)
  144.     {
  145.         var intTopHeight = arrFrames[0].height;
  146.         if (intTopHeight <= 36)
  147.         {
  148.             var objFrameset = document.getElementById("FormsViewFrameset");
  149.             if (objFrameset != null)
  150.                 objFrameset.rows = "37,*";
  151.         }
  152.     }
  153. }
  154.  
  155. // -->
  156. </script>
  157.  
  158. </html>