<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jsp"%>

<c:set var="queue" value="${frd.queue}"/>
<c:set var="formUiid" value="${u:uiid()}"/>

<c:set var="sendCommand">
	$$.ajax.load($('#${formUiid}'), $('#storeQueueData'), {control: this});
	return false;
</c:set>

<form action="${form.requestURI}" id="${formUiid}" class="in-inline-block in-mr1 in-mb05-all">
	<input type="hidden" name="method" value="queueShow"/>
	<input type="hidden" name="queueId" value="${queue.id}"/>
	<input type="hidden" name="pageableId" value="storeQueue"/>

	<c:forEach var="filter" items="${queue.properties.filters}">
		<c:choose>
			<c:when test="${filter.type eq 'title'}">
				<input type="text" name="filterTitle" placeholder="${filter.title}" size="20"
					onkeypress="if (event.keyCode == 13) { ${sendCommand} }"/>
			</c:when>
			<c:when test="${filter.type eq 'status'}">
				<ui:combo-check name="filterStatus"
					list="${frd.statusList}" map="${frd.statusMap}"
					prefixText="${filter.title}:" widthTextValue="8em"/>
			</c:when>
			<c:when test="${filter.type eq 'deleted'}">
				<ui:toggle name="filterDeleted" prefixText="${filter.title}"/>
			</c:when>
			<c:when test="${filter.type.startsWith('param:')}">
				<input type="text" name="filterParam${filter.paramId}_text"
					placeholder="${filter.title}" size="15"
					onkeypress="if (event.keyCode == 13) { ${sendCommand} }"/>
			</c:when>
		</c:choose>
	</c:forEach>

	<ui:button type="out" onclick="${sendCommand}"/>
</form>
