b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | var g_loginPasswd;
|
| 2 | function LoadQuickSetupPage() {
|
| 3 | document.getElementById("navigation").innerHTML = "<ul id ='menu' ><li ><a id='menuQuickSetup' class='on'>Quick Setup </a> </li> </ul>";
|
| 4 |
|
| 5 | document.getElementById("menuQuickSetup").innerHTML = jQuery.i18n.prop('quickSetupName');
|
| 6 | document.getElementById("mainColumn").innerHTML= CallHtmlFile("//192.168.1.1/html/quick_setup.html");
|
| 7 |
|
| 8 | LocalAllElement();
|
| 9 | showDiv("divQsUserNamePage");
|
| 10 | }
|
| 11 |
|
| 12 |
|
| 13 | function quickSetup() {
|
| 14 | document.getElementById("lableWelcome").innerHTML = jQuery.i18n.prop("lableWelcome");
|
| 15 | document.getElementById("quickSetupSpan").innerHTML = "<a href='#.' id='quickSetupspanlink' onclick=getHelp('QuickSetup')>Help</a>";
|
| 16 | document.getElementById("quickSetupspanlink").innerHTML = jQuery.i18n.prop("helpName");
|
| 17 | clearRefreshTimers();
|
| 18 | LoadQuickSetupPage();
|
| 19 | }
|
| 20 |
|
| 21 | function GotoQuickSetup(){
|
| 22 | SetCookie('skipQs',0,365);
|
| 23 | quickSetup();
|
| 24 | }
|
| 25 |
|
| 26 | function SaveQsAccountSet() {
|
| 27 | if($("#divConfirmPasswd").is(":visible")) {
|
| 28 | if($("#txtQsRePasswd").val() != $("#txtQsPasswd").val()) {
|
| 29 | $("#lPassErrorMes").show().text(jQuery.i18n.prop("lPassErrorMes"));
|
| 30 | return;
|
| 31 | }
|
| 32 |
|
| 33 | var configMap = new Map();
|
| 34 | configMap.put("RGW/account/user_management/action",1);
|
| 35 | configMap.put("RGW/account/user_management/username",$("#txtQsUserName").val());
|
| 36 | configMap.put("RGW/account/user_management/password",$("#txtQsPasswd").val());
|
| 37 | var retXml = PostXml("account","set_account",configMap);
|
| 38 | if("ERROR" == $(retXml).find("setting_response").text()) {
|
| 39 | alert("modify password failed.");
|
| 40 | }
|
| 41 | }
|
| 42 |
|
| 43 | showDiv("divQsInternetConnPage");
|
| 44 |
|
| 45 | }
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 | function SaveQsInternetConnSet() {
|
| 51 | g_objContent.SaveData();
|
| 52 | showDiv("divQsWifiSetPage");
|
| 53 | }
|
| 54 |
|
| 55 |
|
| 56 | function SaveQsWifiSet() {
|
| 57 | g_objContent.SaveData();
|
| 58 | showDiv("divQsDeviceGuidePage");
|
| 59 | }
|
| 60 |
|
| 61 |
|
| 62 | function showDiv(divId) {
|
| 63 | $("#divQsUserNamePage,#divQsInternetConnPage,#divQsWifiSetPage,#divQsDeviceGuidePage").hide();
|
| 64 | $("#lt_qs_h1UserSettings,#lt_qs_h1InternetConnection,#lt_qs_h1WirelessSeetings,#lt_qs_h1DevicePlaceGuid").removeClass();
|
| 65 | document.getElementById(divId).style.display = "block";
|
| 66 | g_objContent = null;
|
| 67 | if("divQsUserNamePage" == divId) {
|
| 68 | $("#lt_qs_h1UserSettings").addClass("on");
|
| 69 | $("#txtQsRePasswd,#txtQsPasswd").val(g_loginPasswd);
|
| 70 | $("#txtQsUserName").val("admin");
|
| 71 | $("#txtQsPasswd").click(function(){
|
| 72 | $("#divConfirmPasswd").show();
|
| 73 | });
|
| 74 | $("#txtQsRePasswd,#txtQsPasswd").click(function(){
|
| 75 | $("#lPassErrorMes").hide();
|
| 76 | });
|
| 77 | } else if("divQsInternetConnPage" == divId) {
|
| 78 | $("#lt_qs_h1InternetConnection").addClass("on");
|
| 79 | $("#divInternetConnectSet").html(CallHtmlFile("//192.168.1.1/html/internet/internet_connection.html"));
|
| 80 | $("#lt_interCon_helper,#divSaveInternetConn,#lt_interCon_title").hide();
|
| 81 | g_objContent = $("#divQsInternetConnPage").objInternetConn();
|
| 82 | g_objContent.onLoad(true);
|
| 83 |
|
| 84 | } else if("divQsWifiSetPage" == divId) {
|
| 85 | $("#lt_qs_h1WirelessSeetings").addClass("on");
|
| 86 | $("#divPrimaryNetworkSet").html(CallHtmlFile("//192.168.1.1/html/wifi/wireless_settings.html"));
|
| 87 | g_objContent = $("#divQsWifiSetPage").objWifiSet();
|
| 88 | $("#lt_wifiSet_helper,#lt_wifiSet_title,#divSaveWifiConfig").hide();
|
| 89 | g_objContent.onLoad(true);
|
| 90 | } else if("divQsDeviceGuidePage" == divId) {
|
| 91 | $("#lt_qs_h1DevicePlaceGuid").addClass("on");
|
| 92 | }
|
| 93 | }
|
| 94 | function ExitQuickSetup() {
|
| 95 | document.getElementById("lableWelcome").innerHTML = jQuery.i18n.prop("lableWelcome");
|
| 96 | //document.getElementById("quickSetupSpan").innerHTML = '<a href="#." onclick="GotoQuickSetup()" id="quickSetup" >Quick Setup</a> | <a href="#." id="HelpName" onclick="getMainHelp()">Help</a> | <a href="#." id="LogOutName" onclick="logOut()">Log Out</a>';
|
| 97 | document.getElementById("quickSetupSpan").innerHTML = '<a href="#." id="HelpName" onclick="getMainHelp()">Help</a> | <a href="#." id="LogOutName" onclick="logOut()">Log Out</a>';
|
| 98 | //document.getElementById("quickSetup").innerHTML = jQuery.i18n.prop("quickSetupName");
|
| 99 | document.getElementById("HelpName").innerHTML = jQuery.i18n.prop("helpName");
|
| 100 | document.getElementById("LogOutName").innerHTML = jQuery.i18n.prop("LogOutName");
|
| 101 |
|
| 102 | document.getElementById("navigation").innerHTML=" <ul id ='menu'></ul>";
|
| 103 | g_objContent = null;
|
| 104 | window.location.href = '/dashboard';
|
| 105 | }
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|