<?php
/**
 * 词集编集
 * $Id: word_theme_edit.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
 * @author wanggb
 * @access public
 * @package manager.templates
 **/
global $upload_thumbnail;
global $thumbnail_error_msg;
?>

<style>
	#theme_word_list {
		overflow-y:scroll;
		float:left;
		width:200px;
		height:420px;
		border:1px solid #000;
		display:flex;
		flex-direction:column;
		justify-content:flex-start;
		align-items:center;
	}
	
	.theme_word_item {
		margin-top:2px;
		width:180px;
		height:20px;
		line-height:20px;
		background:#EBEBEB;
		text-align:left;
		border:1px solid #EBEBEB;
	}
	
	.theme_word_item:hover {
		background:#FFF;
		border:1px solid #EBEBEB;
		cursor:pointer;
	}

	#search_word_area {
		margin-left:50px;
		float:left;
		width:200px;
		height:420px;
		border:1px solid #000;
		display:flex;
		flex-direction:column;
		justify-content:flex-start;
		align-items:center;
	}
	
	#search_word_list {
		overflow-y:scroll;
		float:left;
		margin-top:10px;
		width:100%;
		display:flex;
		flex-direction:column;
		justify-content:flex-start;
		align-items:center;
	}
	
	.search_word_item {
		margin-top:2px;
		width:180px;
		height:20px;
		line-height:20px;
		text-align:left;
		border:1px solid #D4D4D4;
	}
	.search_word_item:hover {
		background:#EBEBEB;
		border:1px solid #EBEBEB;
		cursor:pointer;
	}
	
	.search_row {
		margin-top:5px;
	}
	
	.input_key {
		
		width:180px;
	}
</style>

<b>词集单词设定</b><br />
<br />


<div id="result_list">
	<div id="theme_word_list">
		<?
			$index = 0;
			foreach($theme_word_list as $theme_word) {
				$index++;
				$word_dat = WordDat::getById($theme_word->word_id);
		?>
		<div class="theme_word_item" onClick="removeWord('<?=$theme_word->theme_id?>','<?=$theme_word->word_id?>');"><?=$index?>.<?=$word_dat->word?></div>
		<?
			}
		?>
	</div>
	<div id="search_word_area">
		<div class="search_row">
			<input type="text" id="key_word" name="key_word" value="" class="input_key" onchange="searchWords('<?=$id?>');">
		</div>
		<div id="search_word_list">
			<?
				$index = 0;
				foreach($search_word_list as $word_dat) {
					$index++;
			?>
			<div class="theme_word_item" onClick="addWord('<?=$id?>','<?=$word_dat->id?>');"><?=$index?>.<?=$word_dat->word?></div>
			<?
				}
			?>
		</div>
	<div>
</div>
<br />