<%@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/auth.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" id="tree-data">
				<table>
					<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="authId" data-bind="value:authId">
                    		</td>
                    		<th class="k-header">권한명</th>
                    		<td class="k-content">
                    			<input type="text" class="k-textbox" data-bind="value:authName">
                    		</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="authDesc" data-bind="value:authDesc" style="width: 100%; height: 150px;"></textarea>
							</td>
						</tr>
                        <tr>
							<th class="k-header">속성 추가</th>
							<td class="k-content" colspan="3">
								<div id="addAttrList"></div>
							</td>
						</tr>
						<tr>
							<th class="k-header">속성 제거</th>
							<td class="k-content" colspan="3">
								<div id="minusAttrList"></div>
							</td>
						</tr>
                    </tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function() { 
    var auth = new mcare_admin_auth( "${defaultLanguage}" );
    auth.init();
});
</script>
