<div class="uk-layui-form">
	<div class="row" style="height:100%;">
		<div class="col-lg-3" style="height:100%;border-right:8px solid #F2F2F2;">
			<div class="layui-form-item">
			    <div class="layui-input-inline" style="width:100%;margin-left:0px;margin-top:0px;">
				<table class="layui-table" lay-skin="line">
					  <colgroup>
						    <col width="1%">
							<col width="30%">
						<col>
					  </colgroup>
					  <tbody>
						<#if organList??>
						<#list organList as organ>
						<tr>
							<td class="ukefu-checkbox">
								<input class="id" type="checkbox" data-name="${organ.name!''}" name="id" <#if ids?? && ids?index_of(organ.id) gte 0>checked="checked"</#if> value="${organ.id!''}" style="margin-top:0px;">
							</td>
							<td style="margin-left:0px;">
								${organ.name!''}	
							</td>
						</tr>
						</#list>
						</#if>
					  </tbody>
					</table>
			    </div>
			</div>
		</div>
		<div class="col-lg-9">
			<table class="layui-table" lay-skin="line">
			  <colgroup>
					<col width="1%">
					<col width="15%">
					<col width="15%">
			  </colgroup>
			  <thead>
				<tr>
				  <th></th>
				  <th style="padding:9px 5px 5px 5px;">用户</th>
				  <th>姓名</th>
				</tr> 
			  </thead>
			  <tbody>
				<#if usersList??>
				<#list usersList as user>
				<tr>
				  <td class="ukefu-checkbox" style="padding:9px 5px 5px 15px;">
					  <input type="checkbox" class="id" id="user_${user.id!''}" <#if ids?? && ids?index_of(user.id) gte 0>checked="checked"</#if> data-name="${user.username!''}"  value="${user.id!''}" lay-filter="ids" lay-skin="primary" name="id" value="${organ.id!''}" style="margin-top:0px;">
				  </td>
				  <td style="padding:9px 5px 5px 5px;">${user.username!''}</td>
				  <td>${user.uname!''}</td>
				</tr>
				</#list>
				</#if>
			  </tbody>
			</table>
		</div>
	</div>
  <div class="layui-form-button">
    <div class="layui-button-block">
      <button class="layui-btn" lay-submit lay-filter="selUserOrgan">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</div>
<script>
//Demo
layui.use('form', function(){
  var form = layui.form();
  form.on('submit(selUserOrgan)', function(data){
	  var targetIFrame = eval(iframe);
	  var keys = "" , names = "" ;
	  $(".id").each(function(){
		  if($(this).prop("checked")){
			  if(keys != ""){
				  keys = keys+"," ;
			  }
			  keys = keys+$(this).val();
			  
			  if(names != ""){
				  names = names+"," ;
			  }
			  names = names+$(this).data("name");
		  }
	  });
	  targetIFrame.Proxy.updateFormData("#dialogEditor" , names) ;
	  targetIFrame.Proxy.updateFormData("#dialogEditorValue" , keys) ;
	  top.layer.closeAll();
	  return false ;
  });
});
</script>