<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ include file="/jsp/common/include/localemessage.jsp" %>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Expires", "0");

%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="/jsp/common/include/css.jsp"/>
<jsp:include page="/jsp/common/include/script.jsp"/>
<script language="javascript" >
var url      ='<c:url value="/onl/admin/common/tranCodeMapMan.json" />';
var url_view ='<c:url value="/onl/admin/common/tranCodeMapMan.view" />';

$(document).ready(function() {	
	

	var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid¿¡¼­´Â object ·Î 
	$('#grid').jqGrid({
		datatype:"json",
		mtype: 'POST',
 		url: url,
 		postData : gridPostData,
		colNames:['<%= localeMessage.getString("tranCodeMapMan.tranCode") %>',
                  '<%= localeMessage.getString("tranCodeMapMan.eaiSvcCode") %>',
                  '<%= localeMessage.getString("tranCodeMapMan.eaiSvcCodeDesc") %>'
                  ],
		colModel:[
				{ name : 'TRANCODE' , align:'left'  },
				{ name : 'EAISVCCODE' , align:'left'  },
				{ name : 'EAISVCDESC'      , align:'left'  }
 				],
        jsonReader: {
             repeatitems:false
        },	          
		pager : $('#pager'),
		page : '${param.page}',
		rowNum : '${rmsDefaultRowNum}',
	    autoheight: true,
	    height: $("#container").height(),
		autowidth: true,
		viewrecords: true,
		rowList : eval('[${rmsDefaultRowList}]'),
		loadComplete:function (d){
			//$(this).setGridParam({datatype:'local'});
		},
        loadError: function (jqXHR, textStatus, errorThrown) {
        	
        	comloadError(jqXHR, textStatus, errorThrown);
        	
    	},
		ondblClickRow: function(rowId) {

		}
 
            		
	});
	
	
	resizeJqGridWidth('grid','content_middle','1000');


	$("input[name^=search]").keydown(function(key){
		if (key.keyCode == 13){
			$("#btn_search").click();
		}
	});
	$("#btn_search").click(function(){
		$("#grid").setGridParam({ postData: { searchDomainNM: $('input[name=searchDomainNM]').val()} }).trigger("reloadGrid");
	});
	
	buttonControl();
	
	
});
 
</script>
</head>
	<body>		
		<div class="right_box">
			<div class="content_top">
				<ul class="path">
					<li><a href="#">${rmsMenuPath}</a></li>					
				</ul>					
			</div><!-- end content_top -->
			<div class="content_middle" id="content_middle">
				<div class="search_wrap">
					<img src="<c:url value="/img/btn_search.png"/>" alt="" id="btn_search" level="R" />		
				</div>
				<div class="title"><%= localeMessage.getString("tranCodeMapMan.title") %></div>
				<table class="search_condition" cellspacing=0;>
					<tbody>
						<tr>
							<th style="width:180px;"><%= localeMessage.getString("tranCodeMapMan.tranCode") %></th>
							<td colspan="3">
								<input type="text" name="searchTranCode" value="${param.searchTranCode}">
							</td>
						</tr>
						<tr>
							<th style="width:180px;"><%= localeMessage.getString("tranCodeMapMan.eaiSvcCode") %></th>
							<td>
								<input type="text" name="searchEaiSvcCode" value="${param.searchEaiSvcCode}">
							</td>
							<th style="width:180px;"><%= localeMessage.getString("tranCodeMapMan.eaiSvcCodeDesc") %></th>
							<td>
								<input type="text" name="searchEaiSvcCodeDesc" value="${param.searchEaiSvcCodeDesc}">
							</td>
						</tr>
					</tbody>
				</table>
				<table id="grid" ></table>
				<div id="pager"></div>				
			</div><!-- end content_middle -->
		</div><!-- end right_box -->				
	</body>	
</html>
