{% extends "data_opform.html" %} {% load i18n %} {% block form %} {% autoescape off %}
{% if form.non_field_errors %} {{ form.non_field_errors }} {% endif %} {% endautoescape %} {% endblock %} {% block loading %} {% endblock %} {% block addjs %} {% if request.user|HasPerm:"iclock.opgetmoreoptions_device" %} var after_init = function() { if($("#id_funOn_table").html() != null) { $("#OK").parent().hide(); $("#Cancel").text(gettext("退出")); } } var dev_id = 0; $(".select_row").each(function(){ if($(this).attr("checked")) { dev_id = $(this).parents("tr").attr("data"); } }); $.ajax({ type: "POST", url: "/{{ request.surl }}iaccess/GetData/?func=get_devFunOn&dev_id="+ dev_id, dataType: "json", async: false, success: function(datas) { funOn_list = datas.funOn_list; var html = ""; for(var i in funOn_list) { html += '' + funOn_list[i][0] + '' +'' + funOn_list[i][1] + ''; } $("#id_funOn_table").append(html); funOn_list = null; datas = null; html = null; }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(gettext("服务器处理数据失败,请重试!错误码:")+"-623"); } }); {% else %} alert(gettext("对不起,您没有访问该页面的权限,不能浏览更多信息!")); window.location.href = "/{{ request.surl }}accounts/login/"; {% endif %} {% endblock%}