Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

383 lines
9.3 KiB

  1. <HTML>
  2. <HEAD>
  3. #include "header.inc"
  4. #include "debug_js.inc"
  5. #include "common.inc"
  6. #include "constants.inc"
  7. <TITLE>Remote Assistance</TITLE>
  8. <meta http-equiv="MSThemeCompatible" content="Yes">
  9. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  10. <LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
  11. <LINK ID=Stylesheet_Ref4 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  12. <script LANGUAGE="Javascript" >
  13. var g_oSAFRemoteAssistanceHelper = null;
  14. /*
  15. * Localizable constants, text and messages
  16. */
  17. var L_SHOWCHAT_Text = "Show Chat";
  18. var L_SHOWCHATTITLE_Text = "Show Chat window";
  19. var L_CONNECTEDTO_Text = "Status: Connected to ";
  20. var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
  21. /*++
  22. Control handling routines
  23. --*/
  24. //
  25. // Security Check
  26. //
  27. function DoLoad()
  28. {
  29. MAC_IF_DIRECTLAUNCH_CLIENT
  30. {
  31. idBody.style.visibility = "hidden";
  32. alert( L_ERRACCESSDENIED_Text );
  33. return;
  34. }
  35. }
  36. //
  37. // Helper_InitializeStatus: Stuff done when the RCControl page is loaded
  38. //
  39. function Helper_InitializeStatus()
  40. {
  41. TraceFunctEnter("Helper_InitializeStatus");
  42. try
  43. {
  44. InitTrace();
  45. if( parent.g_oSAFRemoteAssistanceHelper != null)
  46. {
  47. //
  48. // Docked
  49. //
  50. g_oSAFRemoteAssistanceHelper = parent.g_oSAFRemoteAssistanceHelper;
  51. }
  52. Helper_UpdateStatus( parent.L_SCREENVIEWONLY_Text );
  53. btnActual.focus();
  54. }
  55. catch(error)
  56. {
  57. parent.FatalError( parent.L_ERRFATAL_Text, error );
  58. }
  59. TraceFunctLeave();
  60. return;
  61. }
  62. var g_parentcols = 0;
  63. //
  64. // Helper_HideChat: Toggles the chat box controls
  65. //
  66. function Helper_HideChat()
  67. {
  68. TraceFunctEnter("Helper_HideChat");
  69. try
  70. {
  71. if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
  72. {
  73. //
  74. // Disconnected
  75. //
  76. TraceFunctLeave();
  77. return;
  78. }
  79. if(false == parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden)
  80. {
  81. //
  82. // Chatbox is visible. Hide it
  83. //
  84. g_parentcols = parent.idFrameSet2.cols;
  85. parent.idFrameSet2.cols = "10px,*";
  86. var newCell = parent.frames.idFrameStatus.idStatusPanel.insertCell(0);
  87. newCell.className="Width7";
  88. newCell.innerHTML = '&nbsp;&nbsp;<IMG id="idchatimg1" name="idchatimg1" class="Cursor valign" tabindex=1 onkeydown="if ((event.keyCode==13)&&(idchatimg1.disabled == false)){idchatimg1.onclick();}" onclick="if(idchatimg1.disabled == false) {Helper_HideChat();}" title="' + L_SHOWCHATTITLE_Text + '" src="../Common/show-chat.gif"></img><span id="btnHideChat" class="sys-font-body sys-color-body">&nbsp;&nbsp;' + L_SHOWCHAT_Text +'</span>';
  89. parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden = true;
  90. parent.frames.idFrameStatus.idStatusPanel.cells(1).className="Cursor width6 sys-font-body sys-color-body-ok";
  91. }
  92. else
  93. {
  94. //
  95. // Chatbox is Hidden. Show it
  96. //
  97. parent.frames.idFrameStatus.idStatusPanel.deleteCell(0);
  98. parent.idFrameSet2.cols = g_parentcols;
  99. parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden = false;
  100. parent.frames.idFrameStatus.idStatusPanel.cells(0).className="Cursor width4 sys-font-body sys-color-body-ok";
  101. parent.frames.idFrameChat.SetFocus();
  102. }
  103. }
  104. catch( error )
  105. {
  106. parent.FatalError( parent.L_ERRFATAL_Text, error );
  107. }
  108. TraceFunctLeave();
  109. return;
  110. }
  111. var g_szStatusMsg = null;
  112. //
  113. // Helper_UpdateStatus: Update the status bar
  114. //
  115. function Helper_UpdateStatus( szStatusMsg )
  116. {
  117. TraceFunctEnter("Helper_UpdateStatus");
  118. try
  119. {
  120. var szMsg = null;
  121. var szUser = null;
  122. if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_szUserName == null )
  123. {
  124. szUser = parent.L_DEFAULTUSER_Text;
  125. }
  126. else
  127. {
  128. szUser = parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_szUserName;
  129. szUser = parent.EscapedName( szUser );
  130. }
  131. if( szStatusMsg != parent.L_DISCONNECTED_Text )
  132. {
  133. szMsg = L_CONNECTEDTO_Text + szUser + "/" + szStatusMsg ;
  134. }
  135. else
  136. {
  137. szMsg = parent.L_DISCONNECTED_Text + szUser;
  138. }
  139. idStatus.innerHTML = "&nbsp;&nbsp;" + szMsg;
  140. g_szStatusMsg = szStatusMsg;
  141. }
  142. catch( error )
  143. {
  144. parent.FatalError( parent.L_ERRFATAL_Text, error );
  145. }
  146. TraceFunctLeave();
  147. }
  148. //
  149. // Helper_UpdateMode: Update the status bar
  150. //
  151. function Helper_UpdateMode( fMode )
  152. {
  153. TraceFunctEnter("Helper_UpdateMode");
  154. try
  155. {
  156. if( 1 == fMode )
  157. {
  158. TD1.className = "Cursor sys-font-body sys-color-body btnSelected sys-table-cell-bgcolor4 width5";
  159. TD2.className = "Cursor sys-font-body sys-color-body btnNormal width5";
  160. btnScale.focus();
  161. }
  162. else
  163. {
  164. TD2.className = "Cursor sys-font-body sys-color-body btnSelected sys-table-cell-bgcolor4 width5";
  165. TD1.className = "Cursor sys-font-body sys-color-body btnNormal width5";
  166. btnActual.focus();
  167. }
  168. }
  169. catch( error )
  170. {
  171. parent.FatalError( parent.L_ERRFATAL_Text, error );
  172. }
  173. TraceFunctLeave();
  174. }
  175. function ScaleToWindow()
  176. {
  177. TraceFunctEnter("ScaleToWindow");
  178. try
  179. {
  180. if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
  181. {
  182. //
  183. // Disconnected
  184. //
  185. TraceFunctLeave();
  186. return;
  187. }
  188. parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = true;
  189. Helper_UpdateMode( 1 );
  190. var obj = new ActiveXObject( szProgIDSetting );
  191. obj.SetProfileString("Scaling",1);
  192. }
  193. catch( error )
  194. {
  195. parent.FatalError( parent.L_ERRFATAL_Text, error );
  196. }
  197. TraceFunctLeave();
  198. }
  199. function ActualSize()
  200. {
  201. TraceFunctEnter("ActualSize");
  202. try
  203. {
  204. if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
  205. {
  206. //
  207. // Disconnected
  208. //
  209. TraceFunctLeave();
  210. return;
  211. }
  212. parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = false;
  213. Helper_UpdateMode( 0 );
  214. var obj = new ActiveXObject( szProgIDSetting );
  215. obj.SetProfileString("Scaling", 0);
  216. btnScale.focus();
  217. }
  218. catch( error )
  219. {
  220. parent.FatalError( parent.L_ERRFATAL_Text, error );
  221. }
  222. TraceFunctLeave();
  223. }
  224. function document.onkeydown()
  225. {
  226. try
  227. {
  228. switch( window.event.keyCode ) {
  229. case 0x8:
  230. window.event.returnValue = false;
  231. break;
  232. case 0x9:
  233. if((window.event.srcElement.id == "TD2")&&(window.event.shiftKey == false))
  234. {
  235. if(false == parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden)
  236. {
  237. parent.frames.idFrameChat.SetFocus();
  238. }
  239. else
  240. {
  241. SetFocus();
  242. }
  243. window.event.returnValue = false;
  244. }
  245. if ((window.event.srcElement.id == "idchatimg1")&&(window.event.shiftKey == true))
  246. {
  247. TD2.focus();
  248. window.event.returnValue = false;
  249. }
  250. break;
  251. case 13:
  252. if( window.event.srcElement.id == "TD1")
  253. {
  254. ScaleToWindow();
  255. }
  256. else if (window.event.srcElement.id=="TD2")
  257. {
  258. ActualSize();
  259. }
  260. }
  261. }
  262. catch(error)
  263. {
  264. SetFocus();
  265. window.event.returnValue = false;
  266. }
  267. }
  268. function SetFocus()
  269. {
  270. try
  271. {
  272. try
  273. {
  274. idchatimg1.focus();
  275. }
  276. catch(error)
  277. {
  278. TD1.focus();
  279. }
  280. }
  281. catch(error)
  282. {
  283. //alert("error: " + error.description);
  284. }
  285. }
  286. function SetRevFocus()
  287. {
  288. try
  289. {
  290. TD2.focus();
  291. }
  292. catch(error)
  293. {
  294. //alert("error: " + error.description);
  295. }
  296. }
  297. </script>
  298. <STYLE>
  299. .width4
  300. {
  301. width: 66%;
  302. }
  303. .width5
  304. {
  305. width:17%;
  306. }
  307. .width6
  308. {
  309. width:53%;
  310. }
  311. .width7
  312. {
  313. width:13%;
  314. }
  315. </STYLE>
  316. </head>
  317. <body id="idBody" scroll="auto" class="sys-homepage-bgcolor padding4" tabindex=-1 onLoad='DoLoad()'>
  318. <TABLE id=L_T0_Text name=L_T0_Text border=0 class="sys-bottompane-header-bgcolor MaxLayout" cellpadding=0 cellspacing=2>
  319. <TR class="vAlign" name="idStatusPanel" id="idStatusPanel">
  320. <TD id=TD0 name=TD0 align="left" class="Cursor width4 sys-font-body sys-color-body-ok">
  321. <Span id="idStatus" name="idStatus" Title="Displays status of your remote assistance session">
  322. &nbsp;&nbsp;Status:
  323. </Span>
  324. </TD>
  325. <TD id=TD1 name=TD1 class="Cursor sys-font-body sys-color-body btnSelected sys-table-cell-bgcolor4 width5" align="center" nowrap onclick="ScaleToWindow()" tabindex=2>
  326. <Span id="btnScale" name="btnScale" Title="Scales the screen of your contact to fit your screen">
  327. Scale to Window
  328. </Span>
  329. </TD>
  330. <TD id=TD2 name=TD2 class="Cursor sys-font-body sys-color-body btnNormal width5" align="center" nowrap onclick="ActualSize()" tabindex=3>
  331. <Span id="btnActual" valign="center" name=btnActual Title="Displays the screen of your contact in actual size">
  332. Actual Size
  333. </Span>
  334. </TD>
  335. </Tr>
  336. </TABLE>
  337. </body>
  338. </html>