{% extends 'data_grid.html' %}
{% block tool_bar %}
  if (data === undefined) {
    data = obj.data;
  }
  var layEvent = obj.event;
  if (layEvent === 'approve'){
    $.ajax({
       url: "{% url 'biotime:node_approve' %}?node="+data.id+"&edit=1",
       type: "GET",
       dataType: "html",
       success: function(panel){
            layer.open({
            	type: 1,
            	area: ['900px', '500px'],
            	content: panel
        	})
       }
    })
    //alert(11111111)
  }
{% endblock %}
{% block row_event %}
    <script type="text/html" id="model_{{ model_name|safe }}_toolbar">
        <a class="layui-btn layui-btn-xs" lay-event="approve">Approve</a>
    </script>
{% endblock %}
{% block grid_opt_update %}
  {{ block.super }}
  data_grid_opts.disabled_action_panel_east = ['exports'];
{% endblock grid_opt_update %}
