rabin 7 年之前
父节点
当前提交
fe5e7e1dc5
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      front/templates/mobile/device/inc/data.html

+ 4 - 4
front/templates/mobile/device/inc/data.html

@@ -39,11 +39,11 @@
         {% end %}
         <label><span>{{value['name']}}</span>
         <p>
-        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 1, '#button_down_{{value['id']}}')" id="button_up_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] in (1,4) %}hint--top hint--info hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] in (1,4) %}loading{% end %} {% if value['value'] in ('2','3') %}disabled{% end %} {% if value['value'] in ('1','4') %}open{% end %}"></button>
+        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 1, '#button_down_{{value['id']}}')" id="button_up_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] in (1,4) %}hint--top hint--error hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] in (1,4) %}loading{% end %} {% if value['value'] in ('2','3') %}disabled{% end %} {% if value['value'] in ('1','4') %}open{% end %}"></button>
 
-        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 5)" id="button_stop_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] == 5 %}hint--top hint--info hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] == 5 %}loading{% end %} {% if value['value'] == '5' %}open{% end %}"></button>
+        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 5)" id="button_stop_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] == 5 %}hint--top hint--error hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] == 5 %}loading{% end %} {% if value['value'] == '5' %}open{% end %}"></button>
 
-        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 2, '#button_up_{{value['id']}}')" id="button_down_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] in (2,3) %}hint--top hint--info hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] in (2,3) %}loading{% end %} {% if value['value'] in ('1','4') %}disabled{% end %} {% if value['value'] in ('2','3') %}open{% end %}"></button>
+        <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/update', '{{value['id']}}', 2, '#button_up_{{value['id']}}')" id="button_down_{{value['id']}}" class="btn btn-switch {% if layer and value['cxnum'] in (2,3) %}hint--top hint--error hint--always {% end %} {% if value['exp'] == '-1' and value['cxnum'] in (2,3) %}loading{% end %} {% if value['value'] in ('1','4') %}disabled{% end %} {% if value['value'] in ('2','3') %}open{% end %}"></button>
         </p>
         </label>
             
@@ -55,7 +55,7 @@
         {% if value['exp'] != '-1' and  value['exp'] != '1' and value['exp'] != 'None' and value['exp'] %}
         {%set layer = value['exp'] %}
         {% end %}
-        <label><span>{{value['name']}}</span><p><a href="javascript:;" {% if layer %}data-hint="{{layer}}"{% end %} data-status="{% if value['value'] == '1' %}0{% else %}1{% end %}"  onclick="Farm.Switch(this, '/device/update', '{{value['id']}}')" class="{% if layer %}hint--left hint--info hint--always {% end %} {% if value['exp'] != '-1' and  value['exp'] != '1' %}data-layer{% end %} btn btn-switch {% if value['exp'] == '-1' %}loading{% end %} {% if value['value'] == '1' %}open{% end %}"><i></i></a></p></label>
+        <label><span>{{value['name']}}</span><p><a href="javascript:;" {% if layer %}data-hint="{{layer}}"{% end %} data-status="{% if value['value'] == '1' %}0{% else %}1{% end %}"  onclick="Farm.Switch(this, '/device/update', '{{value['id']}}')" class="{% if layer %}hint--left hint--error hint--always {% end %} {% if value['exp'] != '-1' and  value['exp'] != '1' %}data-layer{% end %} btn btn-switch {% if value['exp'] == '-1' %}loading{% end %} {% if value['value'] == '1' %}open{% end %}"><i></i></a></p></label>
     </li>
 
     {% end %}