<%--
  Created by IntelliJ IDEA.
  User: llh
  Date: 2016/1/7
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>

<style type="text/css">
  .pane-attribute-toolbar{
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    padding: 6px 0 4px;
    background-color: #fff;
    /*border-top: 1px solid #ccc;*/
    text-align: right;
  }
  .close-toolbar{
    margin-right: 20px;
  }

  input{
    height: 28px;
    width: 240px;
  }

  .table label{
    font-weight: normal;
  }

  .modal-body .table tr td {
    font-size: 12px;
    border: solid 0;
    padding: 5px 3px 5px 3px;
  }
  .modal-body td label{float: right;font-family: SimSun;font-size: 12px;padding-top: 4px;}

  .modal-body .table input{
    font-family: SimSun;
    font-size: 12px;
    /*height: 30px;*/
    /*width: 240px;*/
  }
  .modal-body .table input[type="checkbox"] {
    height: 20px;
    width: 20px;
    margin-top: 0;
    margin-left: 10px;
  }
  .modal-body .table select {
    font-family: SimSun;
    font-size: 12px;
    height: 30px;
    width: 240px;
  }
  .modal-body .table textarea {
    color: inherit;
  }

  .dataExplain{
    height: 180px;
    width: 240px;
  }
  .metaDataExplain{
    width: 576px;
    height: 120px;
  }
  .metaData-width{
    width: 660px;
  }

  .modal-body .table tr .split-line{
    border-top: 0;
  }
  .modal-body .table td .criterionDict{
    width: 250px;
  }
  .checkbox-title{
    line-height: 20px;
  }

  .chexkbox-null{
    margin-left: 150px;
    margin-top: -30px;
  }

  .btn-isnull:after{
    display: inline-block;
    content: '*';
    color: #FF0000;
  }
  .td-left{
    text-align: left;
  }
</style>

<div id="div_metadata_info_form" data-role-form class="m-form-inline f-mt20"  style="display:none;margin-top: 20px;">
  <div class="modal-body f-tac">
    <table class="table">
      <tr>
        <td>
          <label>数据元名称:</label>
        </td>
        <td class="btn-isnull td-left">
          <input id="inp_name" class="required useTitle ajax max-length-128 validate-special-char f-pl5" style="width: 240px;" required-title=
          <spring:message code="lbl.must.input"/>
                  data-attr-scan="name"/>
        </td>
        <td>
          <label>数据类型:</label>
        </td>
        <td class="td-left">
          <input id="inp_type" class="max-length-255 validate-special-char f-pl5" style="width: 240px;" data-attr-scan="type"/>
        </td>
      </tr>
      <tr>
        <td>
          <label>数据元编码:</label>
        </td>
        <td class="btn-isnull td-left">
          <input id="inp_code" class="required useTitle max-length-128 validate-special-char f-pl5" style="width: 240px;" required-title=
          <spring:message code="lbl.must.input"/> data-attr-scan="code"/>
        </td>

        <td>
          <label>数据格式:</label>
        </td>
        <td class="td-left">
          <input id="inp_format" class="max-length-10 validate-special-char f-pl5" style="width: 240px;" data-attr-scan="format"/>
        </td>
      </tr>
      <tr>
        <td>
          <label>数据元标识符:</label>
        </td>
        <td class="btn-isnull td-left">
          <input type="text" id="inp_deCode" class="required validate-special-char f-pl5" style="width: 240px;" data-attr-scan="deCode"/>
        </td>
        <td>
          <label>对应字典:</label>
        </td>
        <td class="td-left">
          <select id="sel_dict" type="hidden" class="js-example-basic-multiple"  data-attr-scan="dictId">
          </select>
        </td>
      </tr>
      <tr>
        <td>
          <label>定义:</label>
        </td>
        <td colspan="3" class="td-left">
                        <textarea id="tea_definition" class="metaDataExplain max-length-255 validate-special-char f-pl5" style=" width: 595px;  max-width: 595px; max-height: 120px; height: 120px;"
                                  data-attr-scan="definition"></textarea>
        </td>
      </tr>
      <tr style="border-top: 1px solid #ccc;">
        <td>
          <label>字段名:</label>
        </td>
        <td class="btn-isnull td-left">
          <input id="inp_columnName" class="required max-length-64 validate-special-char f-pl5" data-attr-scan="columnName" style="width: 240px;"/>
        </td>
        <td>
          <label>字段长度:</label>
        </td>
        <td class="td-left">
          <input id="inp_columnLength" class="max-length-15 validate-positive-integer useTitle f-pl5" data-attr-scan="columnLength" style="width: 240px;"  validate-positive-integer-title="请输入正整数" />
        </td>
      </tr>
      <tr>
        <td>
          <label>字段类别:</label>
        </td>
        <td class="td-left">
          <select id="sel_columnType"  data-attr-scan="columnType" style="width: 240px;">
            <option value="VARCHAR">VARCHAR</option>
            <option value="INT">INT</option>
            <option value="FLOAT">FLOAT</option>
            <option value="DOUBLE">DOUBLE</option>
            <option value="CHAR">CHAR</option>
            <option value="TEXT">TEXT</option>
            <option value="DATE">DATE</option>
          </select>
        </td>
        <th colspan="2" class="split-line">
          <div class="f-fs12 f-ml5">
            <div>
              <label class="checkbox checkbox-title f-fs12">是否主键:
              </label>
              <input type="checkbox" id="ck_primaryKey" name="ck_primaryKey"
                     style="position: absolute;margin-top: -30px; margin-left: 70px;"/>
            </div>
          </div>
          <div class="f-fs12 chexkbox-null">
            <div>
              <label class="checkbox checkbox-title f-fs12">是否为空:
              </label>
              <input type="checkbox" id="ck_nullable" name="ck_nullable"
                     style="position: absolute;margin-top: -30px;margin-left: 70px;"/>
            </div>
          </div>
        </th>
      </tr>
    </table>
  </div>
  <div class="m-form-bottom">
    <div id="btn_close" class="l-button l-button-no">
      <span>取消</span>
    </div>
    <div id="btn_save" class="l-button">
      <span>确认</span>
    </div>
  </div>
  <input type="hidden" id="deCode" data-attr-scan="deCode"/>
  <input type="hidden" id="standard_id" value="${standardId}"/>
  <input type="hidden" id="dataset_id" value="${datasetId}"/>
  <input type="hidden" id="std_version" value="${stdVersion}"/>
  <input type="hidden" id="type" value="${type}"/>
  <input type="hidden" id="metadata_id" value="${metadataId}"/>
  <input type="hidden" id="hd_url" value="${contextRoot}"/>
</div>

  <div id="div_see_metadata_info_form" data-role-form class="m-form-inline f-mt20" style="display:none;margin-top: 20px;">
    <div class="modal-body f-tac">
      <table class="table">
        <tr>
          <td>
            <label>数据元名称:</label>
          </td>
          <td class="td-left">
            <label id="see_name"  style="width: 240px;"/>
          </td>
          <td>
            <label>数据类型:</label>
          </td>
          <td class="td-left">
            <label id="see_type" style="width: 240px;"/>
          </td>
        </tr>
        <tr>
          <td>
            <label>数据元编码:</label>
          </td>
          <td class="td-left">
            <label id="see_code" style="width: 240px;"/>
          </td>

          <td>
            <label>数据格式:</label>
          </td>
          <td class="td-left">
            <label id="see_format" style="width: 240px;"/>
          </td>
        </tr>
        <tr>
          <td>
            <label>内部编码:</label>
          </td>
          <td class="td-left">
            <label type="text" id="see_deCode" style="width: 240px;"/>
          </td>
          <td>
            <label>对应字典:</label>
          </td>
          <td class="td-left">
            <label id="see_dict" style="width: 240px;"/>
          </td>
        </tr>
        <tr>
          <td>
            <label>定义:</label>
          </td>
          <td colspan="3" class="td-left">
            <textarea id="see_definition"  class="metaDataExplain" readonly="readonly" style="width: 595px; border: 0px;outline: none;resize: none; padding-left: 30px; max-width: 595px; max-height: 120px; margin: 0px; height: 120px;"></textarea>
          </td>
        </tr>
        <tr style="border-top: 1px solid #ccc;">
          <td>
            <label>字段名:</label>
          </td>
          <td class="td-left">
            <label id="see_columnName" style="width: 240px;"/>
          </td>
          <td>
            <label>字段长度:</label>
          </td>
          <td class="td-left">
            <label id="see_columnLength" style="width: 240px;"/>
          </td>
        </tr>
        <tr>
          <td>
            <label>字段类别:</label>
          </td>
          <td class="td-left">
            <label id="see_columnType" style="width: 240px;"/>
          </td>
          <th colspan="2" class="split-line">
            <div class="f-fs12 f-ml5">
              <div>
                <label class="checkbox checkbox-title f-fs12">是否主键:
                </label>
                <input type="checkbox" id="see_ck_primaryKey" name="see_ck_primaryKey" disabled="disabled"
                       style="position: absolute;margin-top: -30px; margin-left: 70px;"/>
              </div>
            </div>
            <div class="f-fs12 chexkbox-null">
              <div>
                <label class="checkbox checkbox-title f-fs12">是否为空:
                </label>
                <input type="checkbox" id="see_ck_nullable" name="see_ck_nullable" disabled="disabled"
                       style="position: absolute;margin-top: -30px;margin-left: 70px;"/>
              </div>
            </div>
          </th>
        </tr>
      </table>
    </div>
      <div class="m-form-bottom">
        <div id="btn_confirm" class="l-button">
          <span>确定</span>
        </div>
      </div>
  </div>