rushfee/WebContent/www/huaweiScripts/demo/common/dialog.html

334 lines
14 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo</title>
<link type="text/css" rel="stylesheet" href="../../css.css"/>
<script type="text/javascript" src="../../language/demo.common.dialog.lang.string.js" charset="utf-8"></script>
<script type="text/javascript" src="../../i18n.js" charset="utf-8"></script>
</head>
<body onLoad="init()">
<table width="400" height="300" border="0" id="ChooseConfMember" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr class="">
<td class="alignRight w250" self="I18N_DIALOG_ConferenceMemberList">ConferenceMemberList:</td>
<td class=" w120" ><div id="ChooseConfMember.MemberUserList"></div> </td>
</tr>
<tr>
<td class="label_css w250" self="I18N_DIALOG_CurrentSelectedUser">CurrentSelectedUser:</td>
<td class="" ><div id="ChooseConfMember.CurrentSelectUserID"></div> </td>
</tr>
<tr>
<td class="label_css w250" ><div id="ChooseConfMember.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForChooseConfMember()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="600" height="300" border="0" id="ChooseLocalVideoDevice" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr class="">
<td class="alignRight w150" self="I18N_DIALOG_LOCAL_VIDEO_DEVICE_LIST">LocalVideoDeviceList:</td>
<td class=" w300" ><div id="ChooseLocalVideoDevice.VideoDeviceList"></div> </td>
</tr>
<tr>
<td class="label_css w150" self="I18N_DIALOG_VIDEO_DEVICE_SELECTED">VideoDeviceSelected:</td>
<td class="" ><div id="ChooseLocalVideoDevice.VideoDeviceSelectedName"> </div></td>
<td class="w100" ><div id="ChooseLocalVideoDevice.VideoDeviceSelected"></div></td>
</tr>
<tr>
<td class="label_css w150" self=""><div id="ChooseLocalVideoDevice.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForChooseLocalVideoDevice()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="600" height="300" border="0" id="ChooseVideoParam" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="alignRight w100" self="">SupportVideoParam:</td>
<td class="w100" ><div id="ChooseVideoParam.VideoParamList"></div></td>
</tr>
<tr>
<td class="label_css w100" self="">VideoParamSelected:</td>
<td class="alignLeft w100" ><div id="ChooseVideoParam.VideoParamSelected" ></div></td>
</tr>
<tr>
<td class="label_css w120" self=""><div id="ChooseVideoParam.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForChooseVideoParam()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="400" height="100" border="0" id="GetCallbackPhoneNumber" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr class="">
<td class="alignLeft w150" self="I18N_DIALOG_CALLBACK_PHONENUMBER">CallbackPhoneNumber:</td>
<td class=" w300" ><input class="w90" type="text" value="60012" ID="GetCallbackPhoneNumber.PhoneNumber" /> </td>
</tr>
<tr>
<td class="label_css w150" self=""><div id="GetCallbackPhoneNumber.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForGetCallbackPhoneNumber()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="400" height="100" border="0" id="FillAccessCode" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr class="">
<td class="alignLeft w150" self="">WebChat AccessCode:</td>
<td class=" w300" ><input class="w90" type="text" value="6001" ID="FillAccessCode.WebchatAccessCode" /> </td>
</tr>
<tr class="">
<td class="alignLeft w150" self="">VoiceCall AccessCode:</td>
<td class=" w300" ><input class="w90" type="text" value="6002" ID="FillAccessCode.VoiceCallAccessCode" /> </td>
</tr>
<tr>
<td class="label_css w150" self=""><div id="FillAccessCode.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForFillAccessCode()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="400" height="100" border="0" id="FillWidthHeight" cellpadding="0" cellspacing="0">
<tr>
<td class="tab_opr_td">
<div class="tab_opr_btn_wrap nomargin">
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr class="">
<td class="alignLeft w150" self="">Width:</td>
<td class=" w300" ><input class="w90" type="text" value="400" ID="FillWidthHeight.width" /> </td>
</tr>
<tr class="">
<td class="alignLeft w150" self="">Height:</td>
<td class=" w300" ><input class="w90" type="text" value="300" ID="FillWidthHeight.height" /> </td>
</tr>
<tr>
<td class="label_css w150" self=""><div id="FillWidthHeight.TipMessage"></div></td>
<td class="w120 bt_padding"> <input class="w80" type="button" value="OK" onclick="return ResponseForFillWidthHeight()" self=""/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
<script language="javascript" type="text/javascript">
var DialogType;
var LanguagePage = new LanguagePageClass();
var I18N = new I18NClass();
var languageObj = null;
function GetLanguagePageString(LanguagePageItem){
if (languageObj === null || languageObj === undefined){
return LanguagePageItem;
}
if (languageObj[LanguagePageItem] === null || languageObj[LanguagePageItem] === undefined){
return LanguagePageItem;
}
return languageObj[LanguagePageItem];
}
function init(){
document.getElementById("ChooseConfMember").style.display="none";
document.getElementById("ChooseLocalVideoDevice").style.display = "none";
document.getElementById("ChooseVideoParam").style.display = "none";
document.getElementById("GetCallbackPhoneNumber").style.display = "none";
document.getElementById("FillAccessCode").style.display = "none";
document.getElementById("FillWidthHeight").style.display = "none";
document.title="Dialog";
DialogType = window.dialogArguments.dialog;
var ParentConfig = null;
if (window.dialogArguments.Config){
ParentConfig = window.dialogArguments.Config;
}
if (ParentConfig){
//internationalize
try{
languageObj = LanguagePage.GetLanguagePage(ParentConfig.Common['Language']);
I18N.SwitchI18N(languageObj);
}catch(e){
}
}
if (DialogType === "ChooseConfMember")
{
document.getElementById("ChooseConfMember").style.display="";
document.title= GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("ChooseConfMember.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
RenderForChooseConfMember();
}
else if (DialogType === "ChooseLocalVideoDevice")
{
document.getElementById("ChooseLocalVideoDevice").style.display="";
document.title= GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("ChooseLocalVideoDevice.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
RenderForChooseLocalVideoDevice();
}
else if (DialogType === "ChooseVideoParam") {
document.getElementById("ChooseVideoParam").style.display = "";
document.title = GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("ChooseVideoParam.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
RenderForChooseVideoParam();
}
else if (DialogType ==="GetCallbackPhoneNumber")
{
document.getElementById("GetCallbackPhoneNumber").style.display="";
document.title= GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("GetCallbackPhoneNumber.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
}
else if (DialogType === "FillAccessCode") {
document.getElementById("FillAccessCode").style.display = "";
document.title = GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("FillAccessCode.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
}
else if (DialogType === "FillWidthHeight") {
document.getElementById("FillWidthHeight").style.display = "";
document.title = GetLanguagePageString(window.dialogArguments.tipmessage);
document.getElementById("FillWidthHeight.TipMessage").innerText = GetLanguagePageString(window.dialogArguments.tipmessage);
if (window.dialogArguments.openType === "share") {
document.getElementById("FillWidthHeight.width").value = "1000";
document.getElementById("FillWidthHeight.height").display = "none";
}
}
}
//begin dialog handler for ChooseConfMember
function SelectConfMember(userid)
{
document.getElementById('ChooseConfMember.CurrentSelectUserID').innerText = userid;
}
function RenderForChooseConfMember()
{
var memberList = window.dialogArguments.memberList;//this is a json array; for the definition ,see the Conference.State.js
for (var i = 0; i < memberList.length; i++)
{
var userLink = "<a href=\"javascript:SelectConfMember(" +memberList[i].userID+")\" title=\"click to select\" id=\"user_" + memberList[i].userID + "\">" + memberList[i].userID + " </a><br />";
document.getElementById('ChooseConfMember.MemberUserList').innerHTML += userLink;
}
}
function ResponseForChooseConfMember()
{
var _return = document.getElementById('ChooseConfMember.CurrentSelectUserID').innerText;
parent.window.returnValue = _return;
window.close();
}
//end dialog handler for ChooseConfMember
//begin dialog handle for ChooseLocalVideoDevice
function SelectVideoDevice(deviceName,deviceID)
{
document.getElementById('ChooseLocalVideoDevice.VideoDeviceSelectedName').innerText = deviceName;
document.getElementById('ChooseLocalVideoDevice.VideoDeviceSelected').innerText = deviceID;
}
function RenderForChooseLocalVideoDevice()
{
var deviceList = window.dialogArguments.deviceList;//this is a json array;
for (var i = 0; i < deviceList.length; i++)
{
var userLink = "<a href=\"javascript:SelectVideoDevice(\'" + deviceList[i].name + "\'," + deviceList[i].deviceId +")\" title=\"click to select\" id=\"device_" + deviceList[i].deviceId + "\">" + deviceList[i].name +"("+ deviceList[i].deviceId +") </a><br />";
document.getElementById('ChooseLocalVideoDevice.VideoDeviceList').innerHTML += userLink;
}
}
function ResponseForChooseLocalVideoDevice()
{
var _return = document.getElementById('ChooseLocalVideoDevice.VideoDeviceSelected').innerText;
parent.window.returnValue = _return;
window.close();
}
//end dialog handle for ChooseLocalVideoDevice
//begin dialog handle for ChooseLocalVideoDevice
function SelectVideoParam(param) {
document.getElementById('ChooseVideoParam.VideoParamSelected').innerText = param;
}
function RenderForChooseVideoParam() {
var paramList = window.dialogArguments.paramList; //this is a json array;
for (var i = 0; i < paramList.length; i++) {
var userLink = "<a href=javascript:SelectVideoParam(\'" + paramList[i] + "\') title=\"click to select\" id=\"device_" + i + "\">" + paramList[i] + "</a><br />";
//var userLink = <a href="javascript:SelectVideoParam('{"X":320,"Y":240,"frameRate":30}')" title="click to select" id="device_0">{"X":320,"Y":240,"frameRate":30}</a><br />
document.getElementById('ChooseVideoParam.VideoParamList').innerHTML += userLink;
}
window.console.log(userLink);
}
function ResponseForChooseVideoParam() {
var _return = document.getElementById('ChooseVideoParam.VideoParamSelected').innerText;
parent.window.returnValue = _return;
window.close();
}
//end dialog handle for ChooseLocalVideoDevice
//begin dialog handle for GetCallbackPhoneNumber
function ResponseForGetCallbackPhoneNumber()
{
var _return = document.getElementById('GetCallbackPhoneNumber.PhoneNumber').value;
parent.window.returnValue = _return;
window.close();
}
//end dialog handle for GetCallbackPhoneNumber
function ResponseForFillAccessCode()
{
var obj = new Object();
var webchatAccessCode = document.getElementById('FillAccessCode.WebchatAccessCode').value;
var voiceCallAccessCode = document.getElementById('FillAccessCode.VoiceCallAccessCode').value;
obj.webchatAccess = webchatAccessCode;
obj.voiceCallAccess = voiceCallAccessCode;
parent.window.returnValue = obj;
window.close();
}
function ResponseForFillWidthHeight() {
var obj = new Object();
var width = document.getElementById('FillWidthHeight.width').value;
var height = document.getElementById('FillWidthHeight.height').value;
obj.width = width;
obj.height = height;
parent.window.returnValue = obj;
window.close();
}
</script>
</html>