<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:og="hybs-taglib.tld"
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<og:head headType="init" >
	<script type="text/javascript" src="{@SYS.JSP}/common/multiChoose.js?v={@SYS.BUILD_ID}" ><!-- --></script>
	<style type="text/css">
		.label { text-align: center; }
		table,tr,td { vertical-align:top; }
		input[type='button'] { width:40px;height:30px;margin:5px 2px; }
		.OK { width:100%; }
	</style>
</og:head>

<body>

<og:equals val1="{@SYSTEM_ID}" nullCheck="true" notEquals="true">
	<og:localResource systemId="{@SYSTEM_ID}" />
</og:equals>

<og:equals val1="{@editor}" nullCheck="true" >
	<og:value command="SET" key="editor" value="MENU" />
</og:equals>

<og:equals val1="{@separator}" nullCheck="true" >
	<og:value command="SET" key="separator" value="|" />
</og:equals>

<form>
	<table summary="layout" >
		<tr>
			<td class="label"><og:requestValue lbl="{@name}" /></td>
			<td></td>
			<td class="label">Select</td>
		</tr>
		<tr>
			<td>
				<og:column name="{@name}" addNoValue="false" td="false" editor="{@editor}" param="{@param}"
					optionAttributes="multiple='multiple' size='{@NVL.size 8}'" id="listFrom" style="width:200px;" />
			</td>
			<td>
			<br />
			<!-- ⇒ --><input type="button" value="&#x21d2;"  onClick="switchListOpts(listFrom, listTo, false)" />
			<!-- ▲ --><input type="button" value="&#x25b2;"  onClick="moveListOpts(listTo, 3)" /><br />
			<!-- → --><input type="button" value="&#x2192;"  onClick="switchListOpts(listFrom, listTo, true)"  />
			<!-- △ --><input type="button" value="&#x25b3;"  onClick="moveListOpts(listTo, 1)" /><br />
			<!-- ← --><input type="button" value="&#x2190;"  onClick="switchListOpts(listTo, listFrom, true)"  />
			<!-- ▽ --><input type="button" value="&#x25bd;"  onClick="moveListOpts(listTo, 2)" /><br />
			<!-- × --><input type="button" value="&#x00d7;"  onClick="switchListOpts(listTo, listFrom, false)" />
			<!-- ▼ --><input type="button" value="&#x25bc;"  onClick="moveListOpts(listTo, 4)" /><br />
			<br />
				<!-- 7.3.1.2 (2021/03/02)  og:popup 使う場合の戻し処理 -->
				<og:text>
					<button class="OK" name="ok" onClick="rtnPopup(makeRtnCSV(listTo,'{@separator}'));" >OK</button>
				</og:text>
			</td>
			<td>
				<og:text>
					<select size="{@NVL.size 8}" multiple="multiple" id="listTo" style="width:200px;"></select>
				</og:text>
			</td>
		</tr>
	</table>
</form>

<script type="text/javascript" >
	var listFrom = document.getElementById('listFrom');
	var listTo   = document.getElementById('listTo');

	/* 7.3.1.2 (2021/03/02) og:popup 対応 */
	// 互換性の関係で、toVals、separator、cnstVals、color とする。
  <og:text>
	initOpts( listFrom,listTo,'{@toVals}','{@separator}','{@cnstVals}','red' );
  </og:text>
</script>

</body>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
