<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
</style>
<body>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/jxy/jxyliblist.html}" method="post">
	<ul class="seachform">
	<li>
			<label>图书编号</label>
			<input name="isbn13" type="text" class="scinput" th:value="${search.get('isbn13')}"/>
		</li>
		<li>
			<label>标题</label>
			<input name="title" type="text" class="scinput" th:value="${search.get('title')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
		<li>
		<li>
				<ul class="toolbar">
					<li class="click"><span><img style="width: 24px;height: 24px" th:src="@{/static/sys/images/select.png}" /></span>选择</li>
				</ul>
		</li>
		
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th></th>
		        <th style="width: 50px;">序号</th>
		        <th>图书名称</th>
		        <th>is编号</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
				    <td><input name="selectlist" type="radio" th:data-id="${item.get('id')}" /></td>
				    <td th:text="${itemStat.count}" ></td>
					<td class="getname" th:text="${item.get('title')}"></td>
					<td class="getisbn13" th:text="${item.get('isbn13')}"></td>
			</tr>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pagin">
    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
   	</div>
</div>
</body>
<script type="text/javascript">
$(function(){
	$('ul.toolbar li.click').click(function () {
		 $.each($('[name=selectlist]'), function () {
			 if ($(this).prop('checked')) {
			 var isbn13= $(this).parent().siblings(".getisbn13").html();
			 var name= $(this).parent().siblings(".getname").html();
			 window.opener.document.getElementById("isbn13").value=isbn13;
			 window.opener.document.getElementById("isbn").value=isbn13;
			 window.opener.document.getElementById("name").value=name;
			 window.opener.document.getElementById("namea").value=name;
			 }
         });
	        window.close();
	 });
	
	
	 $.each($('[name=selectlist]'), function () {
		 var isbn131= $(this).parent().siblings(".getisbn13").html();
		var isbn13=window.opener.document.getElementById("isbn13").value;
		if(isbn13==isbn131){
			  $(this).prop('checked', true);
		}
     });
})


</script>
</html>