<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.opensymphony.xwork2.ActionContext"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ include file="../language.jsp" %>

<script>

var language='';
if (navigator.language){
	//对于mozilla, Firefor
    language = navigator.language;
}
else if (navigator.browserLanguage){
	
	//对于IE
	 language = navigator.browserLanguage;
} 


</script>



<script src="../scripts/itsm/tools/affiche.js?random=<%=new java.util.Date().getTime()%>"></script>

<script>
	var afficheUpdate="0";
	var afficheDelete="0";
</script>

<sec:authorize url="/pages/affiche!update.action">
	<script>afficheUpdate="1";</script>
</sec:authorize>
<sec:authorize url="/pages/affiche!delete.action">
	<script>afficheDelete="1";</script>
</sec:authorize>


<script>
$(document).ready(function(){
	 $("#affiche_loading").hide();
	 $("#affiche_content").show();
});
</script>
<div style="padding:10px" id="affiche_loading"><img src="../images/icons/loading.gif" /></div>


<div id="affiche_content" style="display:none">
<!-- show view -->
<div style="overflow: hidden; padding: 4px; padding-right: 6px">
<div id="afficheGridToolbar" style="display: none">
<sec:authorize url="/pages/affiche!save.action">
	<a class="easyui-linkbutton" plain="true" icon="icon-add" onClick="itsm.tools.affiche.add_openwindow()"><fmt:message key="common.add"/></a>
</sec:authorize> 

<sec:authorize url="/pages/affiche!update.action">
	<a class="easyui-linkbutton" plain="true" icon="icon-edit" onClick="itsm.tools.affiche.toolbar_edit_aff()"><fmt:message key="common.edit"/></a>
</sec:authorize> 

<sec:authorize url="/pages/affiche!delete.action">
	<a class="easyui-linkbutton" plain="true" icon="icon-cancel" onClick="itsm.tools.affiche.toolbar_delete_aff()"><fmt:message key="common.delete"/></a>
</sec:authorize> 

<a class="easyui-linkbutton" plain="true" icon="icon-search" onClick="itsm.tools.affiche.search_openwindow()"><fmt:message key="common.search"/></a></div>

<table id="afficheGrid"></table>
<div id="affichePager"></div>

<div id="afficheActFormatterDiv" style="display: none"><a href="javascript:itsm.tools.affiche.toolbar_edit_aff()" title="<fmt:message key="common.edit"/>"><img src="../images/icons/edit.gif" /></a>&nbsp;&nbsp;<a href="javascript:itsm.tools.affiche.toolbar_delete_aff()" title="<fmt:message key="common.delete"/>"><img src="../images/icons/delete.gif" /></a></div>

</div>


<div id="addAffiche" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="common.add"/><fmt:message key="tool.affiche"/></a>" style="width:520px;height:auto">
<form id="addAfficheForm">
<div class="lineTableBgDiv">
<table style="width: 100%" class="lineTable" cellspacing="1">
	<tr>
		<td width="100"><fmt:message key="tool.affiche"/><fmt:message key="label.title"/></td>
		<td><input id="affTitle" name="afficheDto.affTitle" class="easyui-validatebox input" required="true"/></td>
	</tr>
	<tr>
		<td><fmt:message key="tool.affiche.effectiveDate"/></td>
		<td>
			<input id="add_affStart" name="afficheDto.affStart" class="easyui-datebox easyui-validatebox" required="true" style="width:120px" readonly />&nbsp;<fmt:message key="tool.affiche.to"/>&nbsp;
			<input id="add_affEnd" name="afficheDto.affEnd" class="easyui-datebox easyui-validatebox" required="true" validType="DateComparison['add_affStart']" style="width:120px" readonly/>
		</td>
	</tr>
	
	<tr>
		<td><fmt:message key="tool.affiche"/><fmt:message key="tool.affiche.content"/></td>
		<td>
			<textarea id="affContents" name="afficheDto.affContents" class="easyui-validatebox input" required="true" style="height:150px"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" style="padding-top:8px;">
			<input type="hidden" id="affCreator" name="afficheDto.affCreator" value="${loginUserName}" />
			<a id="link_affiche_add_ok" class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save"/></a>
		</td>
	</tr>
</table>
</div>
</form>
</div>


<!-- Edit Affiche -->
<div id="editAffiche" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="common.edit"/><fmt:message key="tool.affiche"/>" style="width:520px;height:auto">
<form id="editAfficheForm">
<div class="lineTableBgDiv">
<table style="width: 100%" class="lineTable" cellspacing="1">
	<tr>
		<td width="100px">
			<fmt:message key="tool.affiche"/><fmt:message key="label.title"/>
		</td>
		<td>
			<input id="editTitle" name="afficheDto.affTitle" class="easyui-validatebox input" required="true"/>
		</td>
	</tr>
	<tr>
		<td><fmt:message key="tool.affiche.effectiveDate"/></td>
		<td>
			<input id="edit_editStart" name="afficheDto.affStart" class="easyui-datebox easyui-validatebox" style="width:120px" required="true" readonly />&nbsp;<fmt:message key="tool.affiche.to"/>&nbsp; 
			<input id="edit_editEnd" name="afficheDto.affEnd" class="easyui-datebox easyui-validatebox" validType="DateComparison['edit_editStart']" style="width:120px" required="true" readonly />
		</td>
	</tr>

	<tr>
		<td><fmt:message key="tool.affiche"/><fmt:message key="tool.affiche.content"/></td>
		<td>
			<textarea id="editContents" name="afficheDto.affContents" class="easyui-validatebox input" required="true" style="height:150px"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" style="padding-top: 8px;">
			<input id="editId" name="afficheDto.affId" type="hidden" /> 
			<input type="hidden" id="edit_affCreator" name="afficheDto.affCreator" />
			<a id="link_affiche_edit_ok" class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save"/></a>
		</td>
	</tr>
</table>
</div>

</form>
</div>

<!-- search Affiche -->
<div id="searchAffiche" class="easyui-window" icon="icon-search" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="false" title="<fmt:message key="common.search"/>" style="width:400px;;height:auto">
<form>
<div class="lineTableBgDiv">
<table style="width: 100%" class="lineTable" cellspacing="1">
	<tr>
		<td width="100px"><fmt:message key="tool.affiche"/><fmt:message key="label.title"/></td>
		<td><input id="searchTitle" name="afficheQueryDto.affTitle" style="width:96%" /></td>
	</tr>
	<tr>
		<td><fmt:message key="tool.affiche.effectiveDate"/></td>
		<td>
			<input id="searchStart1" class="easyui-validatebox easyui-datebox"  validType="date" name="afficheQueryDto.affStart" style="width:110px" />&nbsp;<fmt:message key="tool.affiche.to"/>&nbsp;
			<input id="searchEnd1" class="easyui-validatebox easyui-datebox"  validType="DateComparison['searchStart1']" name="afficheQueryDto.affEnd" style="width:110px" /></td>
	</tr>

	<tr>
		<td colspan="2" style="padding-top: 8px;">
		<a id="link_affiche_search_ok" class="easyui-linkbutton" icon="icon-search"><fmt:message key="common.search"/></a>
		</td>
	</tr>
</table>
</div>
</form>
</div>



</div>






