

<div class="detailCon detailConMorePad">
	<ul class="line reboot">
		<li class="line lineA">
			<label class="des desRes">{%label.restartDevice%}</label>
			<input type="button" value="{%label.reboot%}" id="reboot" class="subBtnB btnA" />
		</li>
	</ul>
	<ul class="line timingReboot">
		<li class="line lineE">
			<label class="des subTitle">{%label.timingReboot%}</label>
			<ul class="line lineCon"></ul>
		</li>
		<li class="line lineE">
			<label class="des desRes">{%label.devTimingReboot%}</label>
			<div id="timingSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label class="des desH" id="statusDes"></label>
		</li>
		<li class="line lineE hidebgLi">
			<label class="des desRes">{%label.rebootSchedule%}</label>
			<span class="selCon">
				<span id="daySelect" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
			<input id="time" type="text" value="" class="text textA1 textClock" readonly="true" />
			<div id="hidebg"></div>
		</li>
	</ul>
	<div class="funcBtnCon pd32 timingReboot">
		<input id="save" type="button" class="subBtn btnA" value="{%btn.save%}" />
	</div>
</div>
<script type="text/javascript">function init(){function e(b){var a="";closeNoteAll();switch(b){case ENONE:return!0;case IPCSYSRPARAERR:a=errStr.ipcSysRparaErr;break;case IPCSYSRCONFERR:a=errStr.ipcSysRconfErr;break;case IPCUMGUESTNAUTH:a=errStr.invPermissionDenied;break;case IPCUBUSCONNFAIL:a=errStr.ipcUbusConnFail;break;case IPCUBUSCALLERR:a=errStr.ipcUbusCallErr;break;case IPCFILEOPENERR:a=errStr.ipcFileOpenErr;break;case IPCDIRMKERR:a=errStr.ipcDirMkErr;break;case IPCDATESETERR:a=errStr.ipcDateSetErr;break;case IPCFUNCPARAEXPT:a=
errStr.ipcFuncParaExpt;break;case IPCUCCONVERR:a=errStr.ipcUcConvErr;break;case IPC_TR_EN_ERR:a=errStr.timingRebootEnErr;break;case IPC_TR_DAY_ERR:a=errStr.timingRebootDayErr;break;case IPC_TR_TIME_ERR:a=errStr.timingRebootTimeErr;break;default:a=errStr.unknown+b}showAlert(a);return!1}function h(b){e(b[ERR_CODE])&&showProgBar(REBOOT_SECONDS,void 0,function(){lanDetecting(function(){window.location.reload()})},!0,statusStr.rebootingTip)}function k(b){l.innerHTML=1==b?label.enabled:label.close;1==b?
id("hidebg").style.display="none":id("hidebg").style.display="block"}function m(b){if(b[ERR_CODE]==ENONE){$(".timingReboot").show();var a=b[uciTimingReboot.fileName][uciTimingReboot.secName.reboot];b=a[uciTimingReboot.optName.enabled]==c.enableVal.on?1:0;var n=a[uciTimingReboot.optName.time],a=a[uciTimingReboot.optName.day];!0==f&&(f=!1,g=new Switch("timingSwitch",b,k),selectInit("daySelect",p,a),timePickerInit("time"),d.value=n.replace(/\:/g," : "),d.onkeydown=function(a){a=a||window.event;eventPreventDefault(a)})}showDetailCon()}
var f=!0,g=null,l=id("statusDes"),d=id("time"),q=id("daySelect"),c=uciTimingReboot.optValue,p=[{str:label.every+label.dayT,value:c.day.eve},{str:label.every+label.Mon,value:c.day.mon},{str:label.every+label.Tue,value:c.day.tue},{str:label.every+label.Wen,value:c.day.wen},{str:label.every+label.Thu,value:c.day.thu},{str:label.every+label.Fri,value:c.day.fri},{str:label.every+label.Sta,value:c.day.sta},{str:label.every+label.Sun,value:c.day.sun}];$("#reboot").click(function(){var b={system:{reboot:null}};
showConfirm(label.rebootConfirmIpc,function(a){!0==a&&$.action(b,h)})});$("#save").click(function(){var b={},a={};b[uciTimingReboot.fileName]={};b[uciTimingReboot.fileName][uciTimingReboot.secName.reboot]=a;a[uciTimingReboot.optName.enabled]=1==g.state?c.enableVal.on:c.enableVal.off;a[uciTimingReboot.optName.time]=d.value.replace(/\s/g,"");a[uciTimingReboot.optName.day]=q.value;showToast();$.modify(b,function(a){e(a[ERR_CODE])?showToast("success"):closeToast()})});(function(){var b={};b[uciTimingReboot.fileName]=
{};b[uciTimingReboot.fileName][KEY_NAME]=uciTimingReboot.secName.reboot;$.query(b,m)})()}init();
</script><style type="text/css">ul.line label.desRes{width:94px;font-size:13px;color:#666;line-height:32px}ul.line li.lineA{margin-bottom:0}ul.reboot{margin-bottom:40px}ul.lineCon{background:url(../../web-static/images/line.png) repeat-x 0 0;clear:both;padding-top:7px;font-size:0}div.pd32{padding-top:32px}input.textClock{background:url(../web-static/images/clock.png) no-repeat 160px 5px #fff;cursor:pointer;text-align:left;text-indent:10px;margin-left:12px}.timingReboot{display:none}li.hidebgLi{position:relative}#hidebg{position:absolute;top:5px;left:0;width:100%;height:32px;background-color:#f5f6fa;opacity:.5;filter:alpha(opacity=50)}</style>