-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodes
116 lines (116 loc) · 5.37 KB
/
modes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<html>
<head>
<title><% asp_get("pageTitle"); %></title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style/webgui.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/lang.js"></script>
<script type="text/javascript">
var language = '<% asp_get("Language"); %>';
Butterlate.lang = language;
Butterlate.setTextDomain("mode_switch");
var current_mode = '<% asp_get("current_mode"); %>';
var is_persist = '<% asp_get("debug_mode_is_persist"); %>';
function handleForm()
if(document.mode_switch.mode[1].checked == true)
if (document.getElementById("save_flag").checked)
document.getElementById("is_persist").value = "1";
else
document.getElementById("is_persist").value = "0";
if (document.mode_switch.mode[0].checked == true)
document.getElementById("switchCmd").value = "FACTORY";
else if (document.mode_switch.mode[1].checked == true)
document.getElementById("switchCmd").value = "DEBUG";
else if (document.mode_switch.mode[2].checked == true)
document.getElementById("switchCmd").value = "WORK";
//alert(document.getElementById("switchCmd").value);
//alert(document.getElementById("is_persist").value);
function initTranslation()
function initPage()
//initTranslation();
if ("DEBUG" == current_mode)
document.getElementById("save_flag").disabled = false;
else
document.getElementById("save_flag").disabled = true;
if (("DEBUG" == current_mode) && ("1" == is_persist))
document.getElementById("save_flag").checked = true;
function enable_save_chbox()
document.getElementById("save_flag").disabled = false;
function disable_save_chbox()
document.getElementById("save_flag").disabled = true;
function handleRefresh()
document.getElementById("switchCmd").value = "CURRENT_MODE";
</script>
</head>
<body class="subpage_body_web" style="overflow-x:hidden;" onLoad="initPage();">
<form name="mode_switch" action="/goform/goform_process" method="post" >
<INPUT type="hidden" value="MODE_SWITCH_WEB" name="goformId" id="goformId">
<INPUT type="hidden" value="" name="lucknum_MODE_SWITCH_WEB" id="lucknum_MODE_SWITCH_WEB">
<INPUT type="hidden" value="" name="switchCmd" id="switchCmd">
<INPUT type="hidden" value="0" name="is_persist" id="is_persist">
<table cellspacing="0" cellpadding="10" width="100%" border="0" >
<tr>
<td valign="top">
<br>
<table id="mode_setting_table" cellspacing=0 cellpadding=0 width=100% border=0 >
<tr>
<td class="listtopic" id="mode_switch_title" >Mode Switch:</td>
</tr>
<tr>
<td colspan=3> </td>
</tr>
<tr>
<td class="top_head" id="factory_mode_td">
<input type="radio" value="FACTORY" name="mode" id="mode" class="radioStyle" <% asp_match("current_mode","FACTORY","checked"); %> onClick="disable_save_chbox();">
<span id="factory_mode">Download Mode(DIAG+AT+MODEM)</span>
</td>
</tr>
<tr>
<td class="head" id="debug_mode_td" >
<input type="radio" value="DEBUG" name="mode" id="mode" class="radioStyle" <% asp_match("current_mode","DEBUG","checked"); %> onClick="enable_save_chbox();">
<span id="debug_mode">Debug Mode(RNDIS+DIAG+AT+MODEM)</span>
<input type="checkbox" value="save" name="save_flag" id="save_flag" class="radioStyle">
<span id="save_chbox">Save</span>
</td>
</tr>
<tr>
<td class="head" id="work_mode_td" >
<input type="radio" value="WORK" name="mode" id="mode" class="radioStyle" <% asp_match("current_mode","WORK","checked"); %> onClick="disable_save_chbox();">
<span id="work_mode">Work Mode(RNDIS)</span>
</td>
</tr>
<tr>
<td class="head" >
Note:
</td>
</tr>
<tr>
<td class="head" >
1. After you have switched the mode, you must refresh the page!
</td>
</tr>
<tr>
<td class="head" >
2. When you restart the modem, you should click "Refresh" to get current latest mode!
</td>
</tr>
<!--
<tr>
<td colspan="2" style="text-align:right">
<input type="submit" value="Apply" id="mode_apply" name="mode_apply" class="btn" onClick="handleForm();" onMouseOver="this.className='menu_over'" onMouseOut="this.className='menu_out'"/>
<input type="submit" value="Refresh" id="refresh" name="refresh" class="btn" onClick="handleRefresh();"onMouseOver="this.className='menu_over'" onMouseOut="this.className='menu_out'"/>
</td>
</tr>
-->
</table>
<div class="div_btn">
<input type="submit" value="Apply" id="mode_apply" name="mode_apply" class="btn" onClick="handleForm();"onMouseOver="this.className='menu_over'" onMouseOut="this.className='menu_out'"/>
<input type="submit" value="Refresh" id="refresh" name="refresh" class="btn" onClick="handleRefresh();"onMouseOver="this.className='menu_over'" onMouseOut="this.className='menu_out'"/>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>