<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="<c:url value='/resources/js/admin/extraAttr.js' />"></script>
<!-- 메뉴 관리 -->
<div class="main-wrapper">
	<div class="k-header title-bar">
    	<span class="k-icon k-i-group"></span><span class="title">추가 속성 관리</span>
    	<span class="category"></span>
    </div>
	<div id="wrapper" >
		<div class="left-pane">
			<div>
				<button type="button" class="k-button" id="add-item">속성 추가</button>
                <button type="button" class="k-button" id="remove-item">속성 삭제</button>          	
                <button type="button" class="k-button" id="deselect-item">선택해제</button>
			</div>
			<div id="tree-view" class="k-content"></div>
		</div>
		<div class="right-pane">
			<div>
				<button type="button" class="k-button" id="save-item">저장</button>
				<button type="button" class="k-button" id="reload-item">캐시 초기화</button>
			</div>
			<div data-id="tree-data" class="k-content" style="padding: 10px;" id="tree-data">
				<table style="width: 720px; margin: 0 auto;">
					<colgroup>
                        <col width="200">
                        <col width="*">
                        <col width="200">
                        <col width="*">
                    </colgroup>
                    <tbody>
                    	<tr>
                    		<th class="k-header">아이디</th>
                    		<td class="k-content">
                    			<input class="k-textbox" id="extraAttrId" data-bind="value:extraAttrId">
                    		</td>
                    		<th class="k-header">메뉴명</th>
                    		<td class="k-content">
                    			<input type="text" class="k-textbox" data-bind="value:extraAttrName">
                    			<!-- <input type="hidden" data-bind="value:parentMenuId"> -->
                    		</td>
                    	</tr>
                    	<tr>
                        	<th class="k-header">설명<br/>(<span id="descLength">0</span>/<span>500bytes</span>)</th>
							<td class="k-content" colspan="3">
								<textarea id="extraAttrDesc" data-bind="value:extraAttrDesc" style="width: 100%; height: 150px;"></textarea>
							</td>
						</tr>
                        <tr>
							<th class="k-header">추가 속성 사용자</th>
							<td class="k-content" colspan="3">
								<div id="extraAttrUsers"></div>
							</td>
						</tr>
                    </tbody>
				</table>
			</div>
		</div>
	</div>
</div>

<script id="popTemplate" type="text/x-kendo-template">
		<div class="pop-select-bar" class="k-widget k-header">
			<select id="pop-select-hospital">
        	</select>
        	<select id="pop-select-duty">
        	</select>
        	<select id="pop-select-work">
        	</select>
        	<select id="pop-select-user">
        	</select>
        	<input type="text" class="k-textbox" value="" id="pop-search-text" style="width: 115px"/>
			<a class="k-button">
					<span class="k-icon k-i-search" id="pop-search"></span>
			</a>
		</div>
		<div class="gridContainer">
    		<div id="grid3"></div>
    	</div>
		<div>
			<div class="k-edit-form-container" id="createDataBox">
				<div class="k-edit-label">
					<label for="userId">아이디</label>
				</div>
				<div data-container-for="userId" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="userId" required="required" data-bind="value:userId">
				</div>
				<div class="k-edit-label">
					<label for="userName">이름</label>
				</div>
				<div data-container-for="userName" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="userName" data-bind="value:userName">
				</div>
				<div class="k-edit-label">
					<label for="userAttrOrder">순서</label>
				</div>
				<div data-container-for="userAttrOrder" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="userAttrOrder" data-bind="value:userAttrOrder">
				</div>
				<div class="k-edit-label">
					<label for="hospitalName">소속</label>
				</div>
				<div data-container-for="hospitalName" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="hospitalName" data-bind="value:hospitalName">
				</div>
				<div class="k-edit-label">
					<label for="dutyName">직무</label>
				</div>
				<div data-container-for="dutyName" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="dutyName" data-bind="value:dutyName">
				</div>
				<div class="k-edit-label">
					<label for="workName">업무</label>
				</div>
				<div data-container-for="workName" class="k-edit-field">
					<input type="text" class="k-input k-textbox" name="workName" data-bind="value:workName">
				</div>
			</div>
		</div>
	</script>

<script type="text/javascript">
$(document).ready(function() { 
    var extraAttr = new mcare_admin_extraAttr( "${defaultLanguage}" );
    extraAttr.init();
});
</script>
