home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / ProPlus.WW / ProPsWW.cab / PUBLICFUNCTIONS.JS3 < prev    next >
Text File  |  2007-02-04  |  4KB  |  108 lines

  1. // ****************************************************************************
  2. // Name: PublicFunctions.js
  3. //
  4. // Description: functions available to Form and Macro scripts in the Forms Tool.
  5. //
  6. // Comments:
  7. // All functions contained can be called by custom form or macro scripts.
  8. // Contents may be changed in future versions.  
  9. // Please don't modify this file, as modifications may be overwritten.
  10. //
  11. // Copyright ⌐2006 Microsoft Corporation,  All Rights Reserved.
  12. // ****************************************************************************
  13.  
  14.  
  15. // Boolean global variables available to form scripts.
  16. var g_IsNew;         // True if record is new, false otherwise.
  17. var g_IsSearch;      // True if form opened in search dialog; false otherwise.
  18. var g_IsFormPreview; // True if form open in preview layout; false otherwise.
  19. var g_IsPreviewPane; // True if form opened in preview pane; false otherwise.
  20. var g_IsReadOnly;    // True if record is read-only; false otherwise.
  21. var g_IsResponse;    // True is record is a response; false otherwise.
  22. var g_IsVersioned;   // True if record is versioned; false otherwise.
  23.  
  24. var g_RecordID;      // The ID of the current record.
  25. var g_FormID;        // The ID of the current form.
  26. var g_SelectedID;    // The ID of the parent record.
  27. var g_FormRecord;    // IGrooveFormsToolFormRecord; the current record.
  28.  
  29. // Globals used by various methods
  30. var GrooveMessageBoxIcon_None = 0x0000;
  31. var GrooveMessageBoxIcon_Exclamation = 0x0080;
  32. var GrooveMessageBoxIcon_Warning = 0x0081;
  33. var GrooveMessageBoxIcon_Information = 0x0100;
  34. var GrooveMessageBoxIcon_Asterisk = 0x0101;
  35. var GrooveMessageBoxIcon_Question = 0x0081;
  36. var GrooveMessageBoxIcon_Stop = 0x0400;
  37. var GrooveMessageBoxIcon_Error = 0x0401;
  38. var GrooveMessageBoxIcon_Hand = 0x0402;
  39.  
  40. var GrooveDialogBoxResultCode_OK = 1;
  41. var GrooveDialogBoxResultCode_Cancel = 2;
  42.  
  43. var GrooveFormsToolRole_Guest = 0x01;
  44. var GrooveFormsToolRole_Participant = 0x02;
  45. var GrooveFormsToolRole_Manager = 0x04;
  46.  
  47. var GrooveIntlDateFormatStyle_Full = 0;
  48. var GrooveIntlDateFormatStyle_Long = 1;
  49. var GrooveIntlDateFormatStyle_Medium = 2;
  50. var GrooveIntlDateFormatStyle_Short = 3;
  51. var GrooveIntlDateFormatStyle_Default = GrooveIntlDateFormatStyle_Medium;
  52.  
  53. var GrooveFormsToolLinkType_None = 0;
  54. var GrooveFormsToolLinkType_Record = 1;
  55. var GrooveFormsToolLinkType_View = 2;
  56. var GrooveFormsToolLinkType_Tool = 3;
  57.  
  58.  
  59. // This function returns the App object. The App object implements various
  60. // functions as defined by the IGrooveFormsToolUIDelegate interface. This
  61. // object provides functions and properties which are useful when building
  62. // applications which need to interact with the Groove platform.
  63. function GetApp()
  64. {
  65.     return int_GetApp();
  66. }
  67.  
  68. // This function returns an IGrooveBSTREnum which can be used as a parameter
  69. // in several calls on the application.
  70. function CreateBSTREnumFromArray(i_StringArray)
  71. {
  72.     var BSTREnum = int_CreateBSTREnumFromArray(i_StringArray);
  73.     return BSTREnum;
  74. }
  75.  
  76. // This function will dynamically set the text of a field label on a form.
  77. function SetFieldLabel(i_FieldName, i_Label)
  78. {
  79.     int_SetFieldLabel(i_FieldName, i_Label);
  80. }
  81.  
  82. // This function will dynamically hide or show a field and its label on a form.
  83. function HideField(i_FieldName, i_bHide)
  84. {
  85.     int_HideField(i_FieldName, i_bHide);
  86. }
  87.  
  88. // This function will dynamically disable or enable a field on a form.
  89. function DisableField(i_FieldName, i_bDisable)
  90. {
  91.     int_DisableField(i_FieldName, i_bDisable);
  92. }
  93.  
  94. // This function will refresh all visible error icons on the page. This should
  95. // be used if there is any code that dynamically changes the layout of the page
  96. // and there are fields on the form that have any validation (i.e. "Required",
  97. // "Min/Max", or text validation). Calling this will make sure that all of the
  98. // error icons display in the proper location.
  99. function RefreshErrorIcons()
  100. {
  101.     int_RefreshErrorIcons();
  102. }
  103.  
  104. // This function will refresh the contents of the preview pane from the record.
  105. function RefreshPreviewPane()
  106. {
  107.     int_RefreshPreviewPane();
  108. }