⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 voice.js

📁 Acorp firmware port for D-Link DSL-300T - root fs
💻 JS
字号:

<script language="JavaScript">

<? include ../html/setup/wst.js ?>
<? include ../html/js/jsl.js ?>
<? include ../html/js/error.js ?>

var ConnectionDatabase = new Array();
var MaxConnections;
var CurrentConnectionSelection = -1;
function uiDoOnLoad()
{ 
  var i = 0;
  var currConn;
  <? multiquery manager:command/connection/list "ConnectionDatabase[i++]='$01';" ?>
  MaxConnections = i;
    
  uiSetVoiceStatus (document.getElementById("uiPostVoiceState").value);
  
  currConn = document.getElementById("uiPostVoiceConnection").value;
  for(i=0;i< MaxConnections;i++)
  {
    if(ConnectionDatabase[i]==currConn)
    {
      uiChangeConnection(i);
	  break;
	}
  }
}
function uiDoSave()
{
   if (document.getElementById("uiPostVoiceState").value == "1")
   {
     if (CurrentConnectionSelection == -1)
     {
       alert ("You must select a connection");
	   return;
     }
  }
  document.getElementById("uiPostVoiceConnection").value = ConnectionDatabase[CurrentConnectionSelection];
  document.getElementById("uiPostForm").submit();
  return;
}

function uiDoCancel()
{
  jslGoTo(null,"home");
}

function uiSetVoiceStatus(arg)
{
  if(arg=="1") 
    uiInitializeVoiceStatus("on");
  else
    uiInitializeVoiceStatus("off");
}

function uiChangeVoiceStatus(arg)
{ 
  if (arg == "on") {
    document.getElementById("uiPostVoiceState").value = "1";
  <? multiquery manager:command/connection/list `jslEnable("uiViewConnection$00");`
  ?>	
  }
  else {
  <? multiquery manager:command/connection/list `jslDisable("uiViewConnection$00");`
  ?>	
    document.getElementById("uiPostVoiceState").value = "0";
}
}

function uiInitializeVoiceStatus(arg)
{ 
  var checkbox = document.getElementById("uiViewVoice");
  if (checkbox.value != arg)
    jslDoToggleCheckBox ("uiViewVoice");

  if (arg == "on")
    document.getElementById("uiPostVoiceState").value = "1";
  else
    document.getElementById("uiPostVoiceState").value = "0";  
}

function uiChangeConnection (arg)
{
  jslDoToggleRadio("uiViewConnection",arg, MaxConnections);

  if (document.getElementById("uiViewConnection" + arg).value == "off")
	CurrentConnectionSelection = -1;
  else
    CurrentConnectionSelection = arg;
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -