
<div class="detailCon">
	<ul class="line">
		<li class="line lineA">
			<label class="des desA">{%menuStr.smartData%}</label>
			<div id="smartDataSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label id="smartDataSwitchDis" class="des desH">{%btn.close%}</label>
		</li>
	</ul>
	<div class="funcBtnCon">
		<input id="save" type="button" class="subBtn btnA" value="{%btn.save%}" />
	</div>
</div>
<script type="text/javascript">function init(){function f(a,b){var c="";switch(parseInt(a)){case ENONE:return!0;default:c=errStr.invRequestFail}closeToast();showAlert(c,b);return!1}function k(a){smartDataSwitchDis.innerHTML=1==a?btn.enableN:btn.close;c=1==a?g:l}function m(){var a={};a[b]={};a[b][d]={};a[b][d][h]=c;showToast();$.modify(a,function(a){!0==f(a[ERR_CODE])&&showToast("success")})}var b=uciSmartData.fileName,d=uciSmartData.secName.status,h=uciSmartData.optName.enabled,g=uciSmartData.optValue.enableVal.on,l=uciSmartData.optValue.enableVal.off,
e,c;id("smartDataSwitch");(function(){var a={};e=0;a[b]={};a[b][NAME]=[d];$.query(a,function(a){!0==f(a[ERR_CODE])&&(c=a[b][d][h],e=c==g?1:0,new Switch("smartDataSwitch",e,k),showDetailCon())});id("save").onclick=m})()}init();
</script>