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
383 lines
9.3 KiB
<HTML>
|
|
<HEAD>
|
|
#include "header.inc"
|
|
#include "debug_js.inc"
|
|
#include "common.inc"
|
|
#include "constants.inc"
|
|
|
|
<TITLE>Remote Assistance</TITLE>
|
|
<meta http-equiv="MSThemeCompatible" content="Yes">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
|
|
<LINK ID=Stylesheet_Ref4 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
|
|
<script LANGUAGE="Javascript" >
|
|
var g_oSAFRemoteAssistanceHelper = null;
|
|
|
|
/*
|
|
* Localizable constants, text and messages
|
|
*/
|
|
var L_SHOWCHAT_Text = "Show Chat";
|
|
var L_SHOWCHATTITLE_Text = "Show Chat window";
|
|
var L_CONNECTEDTO_Text = "Status: Connected to ";
|
|
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
|
|
|
|
|
|
/*++
|
|
Control handling routines
|
|
--*/
|
|
//
|
|
// Security Check
|
|
//
|
|
function DoLoad()
|
|
{
|
|
MAC_IF_DIRECTLAUNCH_CLIENT
|
|
{
|
|
idBody.style.visibility = "hidden";
|
|
alert( L_ERRACCESSDENIED_Text );
|
|
return;
|
|
}
|
|
}
|
|
|
|
//
|
|
// Helper_InitializeStatus: Stuff done when the RCControl page is loaded
|
|
//
|
|
function Helper_InitializeStatus()
|
|
{
|
|
TraceFunctEnter("Helper_InitializeStatus");
|
|
|
|
try
|
|
{
|
|
InitTrace();
|
|
|
|
if( parent.g_oSAFRemoteAssistanceHelper != null)
|
|
{
|
|
//
|
|
// Docked
|
|
//
|
|
g_oSAFRemoteAssistanceHelper = parent.g_oSAFRemoteAssistanceHelper;
|
|
}
|
|
|
|
Helper_UpdateStatus( parent.L_SCREENVIEWONLY_Text );
|
|
btnActual.focus();
|
|
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
var g_parentcols = 0;
|
|
|
|
//
|
|
// Helper_HideChat: Toggles the chat box controls
|
|
//
|
|
function Helper_HideChat()
|
|
{
|
|
TraceFunctEnter("Helper_HideChat");
|
|
|
|
try
|
|
{
|
|
if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
|
|
{
|
|
//
|
|
// Disconnected
|
|
//
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
if(false == parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden)
|
|
{
|
|
//
|
|
// Chatbox is visible. Hide it
|
|
//
|
|
g_parentcols = parent.idFrameSet2.cols;
|
|
parent.idFrameSet2.cols = "10px,*";
|
|
var newCell = parent.frames.idFrameStatus.idStatusPanel.insertCell(0);
|
|
newCell.className="Width7";
|
|
newCell.innerHTML = ' <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"> ' + L_SHOWCHAT_Text +'</span>';
|
|
parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden = true;
|
|
parent.frames.idFrameStatus.idStatusPanel.cells(1).className="Cursor width6 sys-font-body sys-color-body-ok";
|
|
}
|
|
else
|
|
{
|
|
//
|
|
// Chatbox is Hidden. Show it
|
|
//
|
|
parent.frames.idFrameStatus.idStatusPanel.deleteCell(0);
|
|
parent.idFrameSet2.cols = g_parentcols;
|
|
parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden = false;
|
|
parent.frames.idFrameStatus.idStatusPanel.cells(0).className="Cursor width4 sys-font-body sys-color-body-ok";
|
|
parent.frames.idFrameChat.SetFocus();
|
|
}
|
|
}
|
|
catch( error )
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
var g_szStatusMsg = null;
|
|
|
|
//
|
|
// Helper_UpdateStatus: Update the status bar
|
|
//
|
|
function Helper_UpdateStatus( szStatusMsg )
|
|
{
|
|
TraceFunctEnter("Helper_UpdateStatus");
|
|
try
|
|
{
|
|
var szMsg = null;
|
|
var szUser = null;
|
|
|
|
if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_szUserName == null )
|
|
{
|
|
szUser = parent.L_DEFAULTUSER_Text;
|
|
}
|
|
else
|
|
{
|
|
szUser = parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_szUserName;
|
|
szUser = parent.EscapedName( szUser );
|
|
}
|
|
|
|
if( szStatusMsg != parent.L_DISCONNECTED_Text )
|
|
{
|
|
szMsg = L_CONNECTEDTO_Text + szUser + "/" + szStatusMsg ;
|
|
}
|
|
else
|
|
{
|
|
szMsg = parent.L_DISCONNECTED_Text + szUser;
|
|
}
|
|
|
|
|
|
idStatus.innerHTML = " " + szMsg;
|
|
g_szStatusMsg = szStatusMsg;
|
|
}
|
|
catch( error )
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
|
|
//
|
|
// Helper_UpdateMode: Update the status bar
|
|
//
|
|
|
|
function Helper_UpdateMode( fMode )
|
|
{
|
|
TraceFunctEnter("Helper_UpdateMode");
|
|
try
|
|
{
|
|
if( 1 == fMode )
|
|
{
|
|
TD1.className = "Cursor sys-font-body sys-color-body btnSelected sys-table-cell-bgcolor4 width5";
|
|
TD2.className = "Cursor sys-font-body sys-color-body btnNormal width5";
|
|
btnScale.focus();
|
|
}
|
|
else
|
|
{
|
|
TD2.className = "Cursor sys-font-body sys-color-body btnSelected sys-table-cell-bgcolor4 width5";
|
|
TD1.className = "Cursor sys-font-body sys-color-body btnNormal width5";
|
|
btnActual.focus();
|
|
}
|
|
}
|
|
catch( error )
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
|
|
function ScaleToWindow()
|
|
{
|
|
TraceFunctEnter("ScaleToWindow");
|
|
try
|
|
{
|
|
if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
|
|
{
|
|
//
|
|
// Disconnected
|
|
//
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = true;
|
|
Helper_UpdateMode( 1 );
|
|
var obj = new ActiveXObject( szProgIDSetting );
|
|
obj.SetProfileString("Scaling",1);
|
|
}
|
|
catch( error )
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function ActualSize()
|
|
{
|
|
TraceFunctEnter("ActualSize");
|
|
try
|
|
{
|
|
if( parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected == false )
|
|
{
|
|
//
|
|
// Disconnected
|
|
//
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = false;
|
|
Helper_UpdateMode( 0 );
|
|
var obj = new ActiveXObject( szProgIDSetting );
|
|
obj.SetProfileString("Scaling", 0);
|
|
btnScale.focus();
|
|
}
|
|
catch( error )
|
|
{
|
|
parent.FatalError( parent.L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function document.onkeydown()
|
|
{
|
|
try
|
|
{
|
|
switch( window.event.keyCode ) {
|
|
case 0x8:
|
|
window.event.returnValue = false;
|
|
break;
|
|
|
|
case 0x9:
|
|
if((window.event.srcElement.id == "TD2")&&(window.event.shiftKey == false))
|
|
{
|
|
if(false == parent.frames.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bChatBoxHidden)
|
|
{
|
|
parent.frames.idFrameChat.SetFocus();
|
|
}
|
|
else
|
|
{
|
|
SetFocus();
|
|
}
|
|
window.event.returnValue = false;
|
|
}
|
|
if ((window.event.srcElement.id == "idchatimg1")&&(window.event.shiftKey == true))
|
|
{
|
|
TD2.focus();
|
|
window.event.returnValue = false;
|
|
}
|
|
break;
|
|
case 13:
|
|
if( window.event.srcElement.id == "TD1")
|
|
{
|
|
ScaleToWindow();
|
|
}
|
|
else if (window.event.srcElement.id=="TD2")
|
|
{
|
|
ActualSize();
|
|
}
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
SetFocus();
|
|
window.event.returnValue = false;
|
|
}
|
|
}
|
|
|
|
function SetFocus()
|
|
{
|
|
try
|
|
{
|
|
try
|
|
{
|
|
idchatimg1.focus();
|
|
}
|
|
catch(error)
|
|
{
|
|
TD1.focus();
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
//alert("error: " + error.description);
|
|
}
|
|
}
|
|
|
|
function SetRevFocus()
|
|
{
|
|
try
|
|
{
|
|
TD2.focus();
|
|
|
|
}
|
|
catch(error)
|
|
{
|
|
//alert("error: " + error.description);
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
<STYLE>
|
|
.width4
|
|
{
|
|
width: 66%;
|
|
}
|
|
.width5
|
|
{
|
|
width:17%;
|
|
}
|
|
.width6
|
|
{
|
|
width:53%;
|
|
}
|
|
.width7
|
|
{
|
|
width:13%;
|
|
}
|
|
</STYLE>
|
|
|
|
</head>
|
|
|
|
<body id="idBody" scroll="auto" class="sys-homepage-bgcolor padding4" tabindex=-1 onLoad='DoLoad()'>
|
|
<TABLE id=L_T0_Text name=L_T0_Text border=0 class="sys-bottompane-header-bgcolor MaxLayout" cellpadding=0 cellspacing=2>
|
|
<TR class="vAlign" name="idStatusPanel" id="idStatusPanel">
|
|
<TD id=TD0 name=TD0 align="left" class="Cursor width4 sys-font-body sys-color-body-ok">
|
|
<Span id="idStatus" name="idStatus" Title="Displays status of your remote assistance session">
|
|
Status:
|
|
</Span>
|
|
</TD>
|
|
<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>
|
|
<Span id="btnScale" name="btnScale" Title="Scales the screen of your contact to fit your screen">
|
|
Scale to Window
|
|
</Span>
|
|
</TD>
|
|
|
|
<TD id=TD2 name=TD2 class="Cursor sys-font-body sys-color-body btnNormal width5" align="center" nowrap onclick="ActualSize()" tabindex=3>
|
|
<Span id="btnActual" valign="center" name=btnActual Title="Displays the screen of your contact in actual size">
|
|
Actual Size
|
|
</Span>
|
|
</TD>
|
|
</Tr>
|
|
</TABLE>
|
|
</body>
|
|
</html>
|
|
|
|
|