<%@page import="br.com.centralit.citcorpore.util.CitCorporeConstantes"%>
<%@page import="br.com.centralit.citcorpore.util.WebUtil"%>
<%@page import="br.com.centralit.citcorpore.bean.UsuarioDTO"%>
<%@page import="br.com.citframework.dto.Usuario"%>

<%@include file="/novoLayout/common/include/iframe.jsp" %>

<!doctype html public "">
<html <%=(iframe != null) ? "data-iframe=\"" + iframe + "\"" : "" %>>
	<head>	
		<%@include file="/novoLayout/common/include/libCabecalho.jsp" %>
		<%@include file="/novoLayout/common/include/titulo.jsp" %>
		<link type="text/css" rel="stylesheet" href="../../novoLayout/common/include/css/template.css"/>
		<link type="text/css" rel="stylesheet" href="css/catalogoServico.css"/>
	</head>
	<cit:janelaAguarde id="JANELA_AGUARDE_MENU"  title="" style="display:none;top:325px;width:300px;left:500px;height:50px;position:absolute;"></cit:janelaAguarde>
	<body>
		<div class="container-fluid fixed">
			<div class="navbar main hidden-print">
				<%@include file="/novoLayout/common/include/cabecalho.jsp" %>
				<%@include file="/novoLayout/common/include/menuPadrao.jsp" %>
			</div>
	
			<div id="wrapper">
				<!-- Inicio conteudo -->
				<div id="content">
					<div class="separator top"></div>
					<div class="row-fluid">
						<div class="innerLR">
							<div class="widget">
								<div class="widget-head">
									<h4 class="heading"><fmt:message key="catalogoServico.catalogoPortal" /></h4>
								</div>
								<div class="widget-body collapse in">
									<div class="tabsbar">
										<ul>
											<li class="active"><a href="#tab1-2" data-toggle="tab"><fmt:message key="catalogoServico.cadastroCatalogoPortal"/></a></li>
											<li><a href="#tab2-2" data-toggle="tab"><fmt:message key="catalogoServico.pesquisaCatalogoPortal"/></a></li>
										</ul>
									</div>
									<div class="tab-content">
										<div class="tab-pane active" id="tab1-2">
											<form name='form' action='${ctx}/pages/catalogoServico/catalogoServico'>
												<input type="hidden" id="idCatalogoServico" name="idCatalogoServico"/>
												<input type="hidden" id="idServicoContrato" name="idServicoContrato"/>
												<input type="hidden" id="idContrato" name="idContrato"/>
												<input type="hidden" id="servicoSerialize" name="servicoSerialize"/>
												<input type="hidden" id="infoCatalogoServicoSerialize" name="infoCatalogoServicoSerialize"/>
												<input type="hidden" id="rowIndex" name="rowIndex"/>
												
												<div class="row-fluid">
													<div class="span12">
														<label class="campoObrigatorio"><fmt:message key="citcorpore.comum.nome" /></label>
														<input type='text' name="tituloCatalogoServico" class="span12" maxlength="100" class="Valid[Required] Description[citcorpore.comum.nome]" />
													</div>
												</div>
												<div class="row-fluid">
													<div class="span12">
														<label class="campoObrigatorio"><fmt:message key="contrato.contrato" /></label>
														<input readonly="readonly" type='text' name="nomeContrato" id="nomeContrato" onclick="abrePopupContrato()" maxlength="50" size="50" class="Valid[Required] Description[contrato.contrato] span12" />
													</div>
												</div>
												
												<div class="separator bottom"></div>
												
												<div class="row-fluid">
													<div class="span12">
														<h4><fmt:message key="catalogoServico.informacoes_requisicao" /></h4>
													</div>
												</div>
												
												<div class="row-fluid">
													<div class="span12">
														<label><fmt:message key="solicitacaoServico.requisicaoIncidente"/></label>
														<input readonly="readonly" type='text' name="nomeServicoContrato" id="nomeServicoContrato" onclick="abrePopupServico()" maxlength="50" size="50" class="span12" />
													</div>
												</div>
												<div class="row-fluid">
													<div class="span12">
														<label><fmt:message key="citcorpore.comum.nome" /></label>
														<input type='text' id="nomeCatalogoServico" name="nomeCatalogoServico" maxlength="100" class="span12" />
													</div>
												</div>
												<div class="row-fluid">
													<div class="span12">
														<label id="infoComplementar"><fmt:message key="citcorpore.comum.descricao" /></label>
														<textarea id="descCatalogoServico" name="descCatalogoServico" class="span12" onkeyup="contCaracteres(this.value)" onkeydown="contCaracteres(this.value)" onFocus="contCaracteres(this.value)" rows="10"></textarea>
													</div>
												</div>
												<div class="row-fluid">
													<div class="span12">
														<button type='button' name='buttonAddInfoServico' class="btn btn-primary" onclick='addItemInfo();'>
															<fmt:message key="citcorpore.comum.adicionar" />
														</button>
														<button type="button" name='buttonAddLimpar' class="btn btn-primary" onclick='limpaDadosTableInfo();'>
															<fmt:message key="citcorpore.comum.limpar" />
														</button>
													</div>
												</div>
												
												<div class="separator bottom"></div>
												
												<div class="row-fluid">
													<div class="span12">
														<table class="table tabelaFixa" id="tblInfoCatalogoServico" >
															<tr>
																<th style="width: 8%;"><fmt:message key="citcorpore.comum.numeroOrdinal" /></th>
																<th style="width: 30%;"><fmt:message key="solicitacaoServico.requisicaoIncidente" /></th>
																<th style="width: 20%;"><fmt:message key="citcorpore.comum.nome" /></th>
																<th style="width: 40%;"><fmt:message key="citcorpore.comum.descricao" /></th>
																<th style="width: 3%;"><fmt:message key="citcorpore.comum.acoes" /></th>
															</tr>
														</table>
													</div>
												</div>
												
												<div class="separator"></div>
												
												<div class="row-fluid">
													<div class="span12">
														<button type='button' name='btnGravar' class="btn btn-primary" onclick='gravar();'>
															<fmt:message key="citcorpore.comum.gravar" />
														</button>
														<button type="button" name='btnLimpar' class="btn btn-primary" onclick='limpar();document.form.fireEvent("load")'>
															<fmt:message key="citcorpore.comum.limpar" />
														</button>
														<button type="button" name='btnExcluir' class="btn btn-primary" onclick='excluir();'>
															<fmt:message key="citcorpore.comum.excluir" />
														</button>
													</div>
												</div>
											</form>
										</div>
										<div class="tab-pane" id="tab2-2">
											<div class="section"><fmt:message key="citcorpore.comum.pesquisa" />
												<form name='formPesquisa'>
													<cit:findField formName='formPesquisa' lockupName='LOOKUP_CATALOGOSERVICO' id='LOOKUP_CATALOGOSERVICO' top='0' left='0' len='550' heigth='400' javascriptCode='true' htmlCode='true' />
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				<div class="modal hide fade wd-560" id="POPUP_CONTRATO">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h3 class="title"><fmt:message key="citcorpore.comum.pesquisa" /></h3>
					</div>
					<div class="modal-body">
						<form name='formContrato'style="width: 100% !important;">
							<cit:findField formName='formContrato' lockupName='LOOKUP_CONTRATOS' id='LOOKUP_CONTRATOS' top='0' left='0' len='550' heigth='400' javascriptCode='true' htmlCode='true' />
						</form>
					</div>
				</div>
				
				<div class="modal hide fade wd-560" id="POPUP_DETALHES">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h3 class="title"><fmt:message key="citcorpore.comum.pesquisa" /></h3>
					</div>
					<div class="modal-body">
						<form name='formDetalhe'>
							<cit:findField formName='formDetalhe' lockupName='LOOKUP_CATALOGOSERVICOCONTRATO' id='LOOKUP_CATALOGOSERVICOCONTRATO' top='0' left='0' len='550' heigth='400' javascriptCode='true' htmlCode='true' />
						</form>
					</div>
				</div>
				
				<!--  Fim conteudo-->
				<%@include file="/novoLayout/common/include/rodape.jsp" %>
			</div>
		</div>
		<script type="text/javascript" src="../../cit/objects/InfoCatalogoServicoDTO.js"></script>
		<script type="text/javascript" src="js/catalogoServico.js"></script>
	</body>
</html>