blob: f24b3c7d6686345d151186cbb914f513c6376ff9 [file] [log] [blame]
(function ($) {
$.fn.objRouterManage = function (InIt) {
var afterRebootID;
this.onLoad = function () {
LoadWebPage("//192.168.1.1/html/router/router_management.html");
$("#lt_rm_btnPowerOff").click(function() {
PowerOffRouter();
});
$("#lt_rm_btnResetFactory").click(function() {
ResetRouter();
});
$("#lt_rm_btnReboot").click(function() {
RebootRouter();
});
}
function PowerOffRouter(){
ShowDlg('MBRouterManageDlg',400,100);
$("#lQueryRouterInfo").text(jQuery.i18n.prop("lt_rm_QeuryPoweroff"));
$("#lt_btnSave").click(function() {
CloseDlg();
PostXml("router","router_poweroff");
//ShowDlg("PleaseWait", 120, 100);
});
}
function RebootRouter() {
ShowDlg('MBRouterManageDlg',400,100);
$("#lQueryRouterInfo").text(jQuery.i18n.prop("lt_rm_QueryRebootedRouter"));
$("#lt_btnSave").click(function() {
PostXml("router","router_call_reboot");
//ShowDlg("divWaitRouterResponse",200,50);
ShowDlg("PleaseWait", 120, 100);
afterRebootID = setInterval(function(){CloseDlg();clearInterval(afterRebootID);clearAuthheader();}, 45000);
});
}
function ResetRouter() {
ShowDlg('MBRouterManageDlg',400,100);
$("#lQueryRouterInfo").text(jQuery.i18n.prop("lt_rm_QueryResetRouter"));
$("#lt_btnSave").click(function() {
PostXml("router","router_call_rst_factory");
//ShowDlg("divWaitRouterResponse",200,50);
ShowDlg("PleaseWait", 120, 100);
afterRebootID = setInterval(function(){CloseDlg();clearInterval(afterRebootID);clearAuthheader();}, 45000);
});
}
return this;
}
})(jQuery);