<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>

<script type="text/javascript">

    /* *************************** 模块初始化 ***************************** */
    var editorProcessor = {
        //form
        $condition: null,
        init: function () {
            this.bindEvents();
            this.initForm();
        },
        initForm: function () {
            var me = this;
            var data;
            var modelString = "${model.id}";
            if(modelString!=undefined && modelString!=null && modelString.length>0) {
                data={
                    id: "${model.id}",
                    name: "${model.name}",
                    className: "${model.className}",
                    packageName: "${model.packageName}"
                };

            }

            $("#div_info_form").ligerAutoForm({
                data:data,
                validate:{
                    name:"required",
                    className:"required",
                    packageName:"required"
                }
            });
        },
        bindEvents: function () {
            var me = this;
            $(".m-form-bottom").on("click","#btnCancel",function () {
                parent.processor.dialog.close();
            });
        }
    };

    $(function () {
        editorProcessor.init();

    });
</script>