


<div class="detailCon">
	<ul class="line lineL">
		<!--li class="line lineA">
			<label class="des desC">{%menuStr.clearConf%}</label>
		</li-->
		<li class="line lineA1">
			<i name="EnabledAll" id="chooseAllEnabled" value="0"></i>
			<label class="des desECEE">{%label.chooseAll%}</label>
		</li>
		<li class="line lineA1">
			<i name="Enabled" id="clearAllPresetEnabled" value="1"></i>
			<label class="des desECEE">{%label.clearAllPreset%}</label>
		</li>
		<li class="line lineA1">
			<i name="Enabled" id="clearAllCruiseEnabled" value="2"></i>
			<label class="des desECEE">{%label.clearAllCruise%}</label>
		</li> <!-- 清除巡航 -->
		<li class="line lineA1">
			<i name="Enabled" id="clearAllPatternEnabled" value="3"></i>
			<label class="des desECEE">{%label.clearAllPattern%}</label>
		</li> <!-- 清除花样扫描 -->
		<li class="line lineA1">
			<i name="Enabled" id="clearAllPrivacyEnabled" value="4"></i>
			<label class="des desECEE">{%label.clearAllPrivacy%}</label>
		</li> <!-- 清除隐私遮蔽 -->
		<li class="line lineA1">
			<i name="Enabled" id="clearAllLimitEnabled" value="5"></i>
			<label class="des desECEE">{%label.clearAllLimit%}</label>
		</li> <!-- 清除限位 -->
		<li class="line lineA1">
			<i name="Enabled" id="clearAllTimingEnabled" value="6"></i>
			<label class="des desECEE">{%label.clearAllTiming%}</label>
		</li> <!-- 清除定时任务 -->
		<li class="line lineA1">
			<i name="Enabled" id="clearAllWatchEnabled" value="7"></i>
			<label class="des desECEE">{%label.clearAllWatch%}</label>
		</li> <!-- 清除守望 -->
	</ul>
	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA" />
	</div>
</div><script type="text/javascript">function init(){function n(){var a={};1==parseInt($.ptzCapability.preset_supported)&&e("clearAllPresetEnabled")&&(a[k]={},a[k][p]=null);1==parseInt($.ptzCapability.tour_supported)&&e("clearAllCruiseEnabled")&&(a.tour={},a.tour.clear_tour=null);1==parseInt($.ptzCapability.pattern_supported)&&e("clearAllPatternEnabled")&&(a.pattern={},a.pattern.clear_pattern=null);2==parseFloat($.moduleSpec.privacy_mask_api_version)&&e("clearAllPrivacyEnabled")&&(a.system={},a.system.config_recovery={},a.system.config_recovery.config_name=
["privacy_mask"]);1==parseInt($.ptzCapability.limit_supported)&&e("clearAllLimitEnabled")&&(a[f]={},a[f].reset_limit_config=null);1==parseInt($.ptzCapability.plan_supported)&&e("clearAllTimingEnabled")&&(a.ptz_plan={},a.ptz_plan.reset_ptz_plan_config=null);1==parseInt($.ptzCapability.park_supported)&&e("clearAllWatchEnabled")&&(f in a||(a[f]={}),a[f].reset_park_config=null);showToast();$.action(a,function(a){a:{a=a[ERR_CODE];var b="";closeNoteAll();switch(a){case ENONE:a=!0;break a;case PTZ_ERR_UNKNOWN:b=
errStr.ptzUnknown;break;case PTZ_ERR_ARGUMENT_INVALID:b=errStr.ptzArgumentInvalid;break;case PTZ_ERR_REQUEST_CONFLICT:b=errStr.ptzRequestConflict;break;case PTZ_ERR_CONFIGURATION_CONFILICT:b=errStr.ptzConfigConflict;break;case PTZ_ERR_CONFIGURATION_FIXED:b=errStr.ptzConfigFixed;break;default:b=errStr.unknown+a}closeToast();showAlert(b);a=!1}!0==a&&showToast("success")})}function q(){initCheckInput("Enabled",function(a,c){for(var b=0,d=l("Enabled"),f=e("chooseAllEnabled"),h=0;h<d.length;h++)e(d[h].id)&&
(b+=1);f&&b<g.length&&changeCheckInput(m,!1);f||b!=g.length||changeCheckInput(m,!0)});initCheckInput("EnabledAll",function(a,c){var b=l("Enabled");if(e("chooseAllEnabled"))for(var d=0;d<b.length;d++)changeCheckInput(b[d],!0);else for(d=0;d<b.length;d++)changeCheckInput(b[d],!1)})}function l(a){var c=document.getElementsByName(a);if(0<c)return c;for(var b=document.getElementsByTagName("*"),d=[],c=0;c<b.length;c++)b[c].getAttribute("name")==a&&d.push(b[c]);return d}function e(a){return null!=id(a).getAttribute("checked")&&
"true"==id(a).getAttribute("checked").toString()?!0:!1}var m=id("chooseAllEnabled");id("clearAllPresetEnabled");id("clearAllCruiseEnabled");id("clearAllPatternEnabled");id("clearAllLimitEnabled");id("clearAllTimingEnabled");id("clearAllWatchEnabled");id("clearAllPrivacyEnabled");var g=[{id:"clearAllPresetEnabled",capabilityItem:"preset_supported"},{id:"clearAllCruiseEnabled",capabilityItem:"tour_supported"},{id:"clearAllPatternEnabled",capabilityItem:"pattern_supported"},{id:"clearAllLimitEnabled",
capabilityItem:"limit_supported"},{id:"clearAllTimingEnabled",capabilityItem:"plan_supported"},{id:"clearAllWatchEnabled",capabilityItem:"park_supported"}],r=id("save"),f=uciPTZ.fileName,k=uciPreset.fileName,p=uciPreset.actionName.clearPreset;(function(){var a;r.onclick=n;for(var c=0;c<g.length;c++)if(a=g[c].capabilityItem,0==parseInt($.ptzCapability[a])){a=$("[id="+g[c].id+"]")[0].parentNode;for(var b=a.children.length-1;0<=b;b--)a.removeChild(a.children[b]);a.style.display="none"}2!=parseInt($.moduleSpec.privacy_mask_api_version)&&
(id("clearAllPrivacyEnabled").parentNode.style.display="none");q();showDetailCon()})()}init();
</script><style type="text/css">label.desECEE{font-size:14px;color:#333;line-height:40px;margin-left:8px;vertical-align:middle}ul.line li.lineA1{height:40px;margin-bottom:8px;width:328px}}</style>