255 lines
7.3 KiB
Plaintext
255 lines
7.3 KiB
Plaintext
<HTML>
|
|
<HEAD>
|
|
#include "header.inc"
|
|
#include "debug_js.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_StyleSheet1" REL="stylesheet" TYPE="text/css" HREF="../../Css/rcbuddy.css">
|
|
<LINK id="UI_StyleSheet2" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
|
|
|
|
<Script language="javascript">
|
|
/*
|
|
* Localizable constants, text and messages
|
|
*/
|
|
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
|
|
var L_RCCTL_Text = "Remote Assistance failed. Please try again. ";
|
|
var g_oSession = null;
|
|
var g_bNoCancel = false;
|
|
|
|
#define RA_IM_COMPLETE 0x1
|
|
#define RA_IM_WAITFORCONNECT 0x2
|
|
#define RA_IM_CONNECTTOSERVER 0x3
|
|
#define RA_IM_APPSHUTDOWN 0x4
|
|
#define RA_IM_SENDINVITE 0x5
|
|
#define RA_IM_ACCEPTED 0x6
|
|
#define RA_IM_DECLINED 0x7
|
|
#define RA_IM_NOAPP 0x8
|
|
#define RA_IM_TERMINATED 0x9
|
|
#define RA_IM_CANCELLED 0xA
|
|
#define RA_IM_UNLOCK_WAIT 0xB
|
|
#define RA_IM_UNLOCK_FAILED 0xC
|
|
#define RA_IM_UNLOCK_SUCCEED 0xD
|
|
#define RA_IM_UNLOCK_TIMEOUT 0xE
|
|
#define RA_IM_CONNECTTOEXPERT 0xF
|
|
#define RA_IM_EXPERT_TICKET_OUT 0x10
|
|
#define RA_IM_FAILED 0x11
|
|
#define RA_IM_CLOSE_INVITE_UI 0x12
|
|
|
|
function OnSessionStatus(Status)
|
|
{
|
|
TraceFunctEnter("OnSessionStatus");
|
|
|
|
try
|
|
{
|
|
var L_SessionStatusInvite_Text = "Invitation has been sent out...";
|
|
var L_SessionStatusComplete_Text = "Connection established";
|
|
var L_SessionStatusWait_Text = "Waiting for connection ...";
|
|
var L_SessionStatusAppShutDown_Text = "The Windows Messenger server has stopped responding. Please try to connect again.";
|
|
var L_SessionStatusInit_Text = "Click an online contact...";
|
|
var L_SessionStatusUnknown_Text = "Unknown status...";
|
|
var L_SessionStatusAccepted_Text = "Invitation is accepted...";
|
|
var L_SessionStatusDeclined_Text = "The Remote Assistance invitation was declined. You may want to resend the invitation at a later time.";
|
|
var L_SessionStatusNoApp_Text = "No application installed ...";
|
|
var L_SessionStatusTerminated_Text = "Session is terminated";
|
|
var L_SessionStatusCancelled_Text = "Session is cancelled";
|
|
var L_SessionStatusConnectToExpert_Text = "Connecting...";
|
|
|
|
var sz = L_SessionStatusInit_Text;
|
|
switch (Status)
|
|
{
|
|
case RA_IM_SENDINVITE:
|
|
sz = L_SessionStatusInvite_Text;
|
|
break;
|
|
case RA_IM_COMPLETE:
|
|
sz = L_SessionStatusComplete_Text;
|
|
break;
|
|
case RA_IM_WAITFORCONNECT:
|
|
sz = L_SessionStatusWait_Text;
|
|
// Need to disable 'Cancel' button, and close this button in 1 second.
|
|
setTimeout('DoClose()', 2000);
|
|
break;
|
|
case RA_IM_APPSHUTDOWN:
|
|
sz = L_SessionStatusAppShutDown_Text;
|
|
break;
|
|
case RA_IM_ACCEPTED:
|
|
sz = L_SessionStatusAccepted_Text;
|
|
idCancelText.innerText = "";
|
|
btnCancel.disabled = true;
|
|
break;
|
|
case RA_IM_DECLINED:
|
|
sz = L_SessionStatusDeclined_Text;
|
|
break;
|
|
case RA_IM_NOAPP:
|
|
sz = L_SessionStatusNoApp_Text;
|
|
break;
|
|
case RA_IM_TERMINATED:
|
|
sz = L_SessionStatusTerminated_Text;
|
|
break;
|
|
case RA_IM_CANCELLED:
|
|
sz = L_SessionStatusCancelled_Text;
|
|
break;
|
|
case RA_IM_UNLOCK_WAIT:
|
|
case RA_IM_UNLOCK_SUCCEED:
|
|
return;
|
|
case RA_IM_UNLOCK_FAILED:
|
|
case RA_IM_UNLOCK_TIMEOUT:
|
|
return;
|
|
case RA_IM_CONNECTTOEXPERT:
|
|
sz = L_SessionStatusConnectToExpert_Text;
|
|
break;
|
|
default:
|
|
sz = "(" + Status + ") " +L_SessionStatusUnknown_Text;
|
|
break;
|
|
}
|
|
|
|
idText1.innerHTML = sz;
|
|
}
|
|
catch(error)
|
|
{
|
|
alert(parent.L_RCCTL_Text);
|
|
return;
|
|
}
|
|
|
|
switch (Status)
|
|
{
|
|
case RA_IM_COMPLETE:
|
|
DoClose();
|
|
break;
|
|
case RA_IM_APPSHUTDOWN:
|
|
case RA_IM_DECLINED:
|
|
case RA_IM_NOAPP:
|
|
case RA_IM_TERMINATED:
|
|
g_bNoCancel = true;
|
|
case RA_IM_CANCELLED:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function DoClose()
|
|
{
|
|
TraceFunctEnter("DoClose");
|
|
try
|
|
{
|
|
window.returnValue=0;
|
|
window.close();
|
|
}
|
|
catch(error)
|
|
{
|
|
alert(L_RCCTL_Text);
|
|
return;
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function OnCancelInvite()
|
|
{
|
|
TraceFunctEnter("DoCancelInvite");
|
|
try
|
|
{
|
|
if (g_oSession && g_bNoCancel == false)
|
|
{
|
|
g_oSession.Notify(RA_IM_CANCELLED);
|
|
OnSessionStatus(RA_IM_CANCELLED);
|
|
g_oSession = null;
|
|
}
|
|
}
|
|
catch(e)
|
|
{
|
|
var L_CancelInviteFailed_Text = "Cancel invitation failed. ";
|
|
alert(L_CancelInviteFailed_Text + e.description);
|
|
}
|
|
|
|
DoClose();
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function OnUnLoad()
|
|
{
|
|
if (g_oSession) // Need to notify IMSession to close the invite thread
|
|
{
|
|
g_oSession.Notify(RA_IM_CLOSE_INVITE_UI);
|
|
g_oSession = null;
|
|
}
|
|
}
|
|
|
|
function OnLoad()
|
|
{
|
|
TraceFunctEnter("OnLoad");
|
|
|
|
try
|
|
{
|
|
g_oSession = window.dialogArguments[0];
|
|
g_oSession.OnSessionStatus = OnSessionStatus;
|
|
g_oSession.HSC_Invite(window.dialogArguments[1]);
|
|
idBuddyName.innerText = (window.dialogArguments[1]).FriendlyName;
|
|
btnCancel.focus();
|
|
}
|
|
catch (e)
|
|
{
|
|
var L_IMSessionFailed_Text = "The invitation could not be sent. Please try again.";
|
|
//alert(L_IMSessionFailed_Text + e.description);
|
|
alert(L_IMSessionFailed_Text);
|
|
return;
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function NoOp() {}
|
|
|
|
</Script>
|
|
<BODY id="idBody" class="sys-inlineform-bgcolor1" tabindex="-1" onload="OnLoad();" onunload="OnUnLoad();">
|
|
<Table id="idTableframe" name="idTableFrame" cellspacing="0" cellpadding="0" class="MaxLayout" border="0">
|
|
<TR>
|
|
<TD class="padding1 padding2 padding3">
|
|
<Table border="0" id="DeleteTable" name="DeleteTable" cellspacing="0" cellpadding="0" class="MaxLayout">
|
|
<TR>
|
|
<TD class="Width7 valigntop padding4 padding5 padding6">
|
|
<img id="idImg" name="idImg" src="hcp://system/Remote%20Assistance/interaction/client/animation.gif "></img>
|
|
</TD>
|
|
<TD id="idTD1" name="idTD1" class="padding4 padding6">
|
|
<Span id="idTextBuddy" name="idTextBuddy" class="sys-font-body sys-color-body">
|
|
Inviting <span id="idBuddyName">you buddy</span> to connect to your computer. Please wait for a response...
|
|
</Span>
|
|
</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>
|
|
</TD>
|
|
<TD class="padding4" id="TD1" name="TD1">
|
|
<Span id="idText1" name="idText1" class="sys-font-body sys-color-body">
|
|
Sending invitation ...
|
|
</Span>
|
|
</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>
|
|
</TD>
|
|
<TD class="padding4" id="TD2" name="TD2">
|
|
<Span id="idCancelText" name="idCancelText" class="sys-font-body sys-color-body">
|
|
To retract the invitation, click <B>Cancel.</B>
|
|
</Span>
|
|
</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD class="Height10" colspan=2>
|
|
</TR>
|
|
<TR>
|
|
<TD align="center" id="idBtnContainer" name="idBtnContainer" colspan="2">
|
|
<Button name="btnCancel" id="btnCancel" onClick="OnCancelInvite();" tabindex="2" class="styBtnWidth sys-font-body sys-color-body">Cancel</button>
|
|
</TD>
|
|
</TR>
|
|
</Table>
|
|
</TD>
|
|
</TR>
|
|
</Table>
|
|
</Body>
|
|
</HTML>
|
|
|