<%@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="../../novoLayout/common/include/css/jqueryautocomplete.css"/>
		<link rel="stylesheet" type="text/css" href="css/midiaSoftware.css">
		
		<script  charset="ISO-8859-1" type="text/javascript" src="${ctx}/js/ValidacaoUtils.js"></script>
	</head>
	<cit:janelaAguarde id="JANELA_AGUARDE_MENU"  title="" style="display:none;top:325px;width:300px;left:500px;height:50px;position:absolute;"></cit:janelaAguarde>
	<body>
		<%@include file="/novoLayout/common/include/customtip.jsp"%>
		<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="row-fluid">
						<div class="innerLR">
							<div class="widget">
								<div class="widget-head">
									<h4 class="heading"><fmt:message key="midiaSoftware.midiaDefinitiva" /></h4>
									<div class="pull-right">
										<h4 class="heading glyphicons resize_full" style="cursor: pointer;" onclick="maximizaMinimizaJanela(this)">
											<i></i>
										</h4>
									</div>
								</div>
								<div class="widget-body">
									<div class="gerenciamento-ans-tabs widget widget-tabs">
										<div class="tabsbar">
											<ul>
												<li class="active"><a id="tab-cadastro" href="#tab-cadastro-midia-software" data-toggle="tab"><fmt:message	key="midiaSoftware.cadastro"/></a></li>
												<li><a href="#tab-midia-software-pesquisa" data-toggle="tab"><fmt:message	key="midiaSoftware.pesquisa"/></a></li>
											</ul>
										</div>
										<div class="widget-body">
											<div class="tab-content">
												<div class="tab-pane active" id="tab-cadastro-midia-software">				
													<form id="form" name="form" action="${ctx}/pages/midiaSoftware/midiaSoftware">
														
														<!--controle-->
														<input type='hidden' name='idMidiaSoftware' id='idMidiaSoftware' />
														<input type='hidden' name='idBaseConhecimento' id='idBaseConhecimento' />
														<input type='hidden' name='titulo' id='titulo' />

														<!--global-->
														<input type="hidden" id="midiaSoftwareChaveSerializada" name="midiaSoftwareChaveSerializada"/>
														<input type="hidden" id="conhecimentosSerializados" name="conhecimentosSerializados"/>

														<!--midiaSoftware-->
														<input type='hidden' name='dataInicio' id='dataInicio' />
														<input type="hidden" id="rowIndex" name="rowIndex"/>

														<!--elementos da tela-->

														<!-- Dados básicos -->
														<div id="divisao-requisicao-incidente" class="widget" data-toggle="collapse-widget" data-collapse-closed="false">
															<div class="widget-head">
																<h4 class="heading glyphicons nameplate"><i></i><fmt:message	key="tempoAtendimento.dados"/></h4>
															</div>
															<div class="widget-body">
																<div class='row-fluid'>
																	<div class='span4'>
																		<label class="strong campoObrigatorio"><fmt:message key="citcorpore.comum.nome" /></label>
																		<input id="nome" name="nome" type='text' maxlength="200" class="span12 Valid[Required] Description[citcorpore.comum.nome]" />
																	</div>
																	<div class='span4'>
																		<label class="strong campoObrigatorio"><fmt:message key="midiaSoftware.endFisico" /></label>
																		<input id="endFisico" type="text" name="endFisico" maxlength="500" class="span12 Valid[Required] Description[midiaSoftware.endFisico]" />
																	</div>
																	<div class='span4'>
																		<label><fmt:message key="midiaSoftware.endLogico" /></label>
																		<input id="endLogico" type="text" name="endLogico" maxlength="200" class="span12 Description[midiaSoftware.endLogico]" />
																	</div>
																</div>

																<div class='row-fluid'>
																	<div class='span4'>
																		<label class="strong campoObrigatorio"><fmt:message key="midiaSoftware.tipoMidia" /></label>
																		<select id="idMidia" name='idMidia' class="span12 Valid[Required] Description[midiaSoftware.tipoMidia]"></select>
																	</div>
																	<div class='span4'>
																		<label><fmt:message key="midiaSoftware.tipoSoftware" /></label>
																		<select id="idTipoSoftware" name='idTipoSoftware' class="span12 Description[midiaSoftware.tipoSoftware]"></select>
																	</div>
																	<div class='span4'>
																		<div class='row-fluid'>
																			<div class='span6'>
																				<label><fmt:message key="midiaSoftware.numeroLicencas" /></label>
																				<input id="licencas" type="text" readonly="readonly" name="licencas"  maxlength="6" class="span12 Format[Numero] Description[midiaSoftware.numeroLicencas]" />
																			</div>
																			<div class='span6'>
																				<label> <fmt:message key="midiaSoftware.versao" /></label>
																				<input id="versao" type="text" name="versao" maxlength="20" class="span12 Description[midiaSoftware.versao] Format[Numero]" />
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="separator"></div>

																<!-- Licenças / Conhecimento -->
																<div class='row-fluid'>
																	<div class='span6'>
																		<div class="widget widget-tabs-icons-only">
																			<div class="widget-ta-prioridades">
																				<div class="widget-head">
																					<h4 class="heading glyphicons stopwatch"><i></i><fmt:message key="midiaSoftware.licencas" /></h4>
																					<div class="clearfix"></div>
																				</div>
																				<div class="widget-body">
																					<div class='row-fluid'>
																						<div class='span8'>
																							<label><fmt:message key="midiaSoftware.chave" /></label>
																							<div><input type='text' id="chave" name="chave" maxlength="255" class="span12" /></div>
																						</div>
																						<div class='span3'>
																							<label><fmt:message key="midiaSoftware.qtdPermissoes" /></label>
																							<div><input type='text' id="qtdPermissoes" name="qtdPermissoes" maxlength="5" class="class="span12 Format[Numero]" /></div>
																						</div>
																						<div class='span1'>
																							<button type="button" id=""	class="btn btn-primary lFloat" onclick="addMidiaSoftwareChave();" style="margin-top:26px;">
																								<i class="material-icons md-16">add</i>
																							</button>
																						</div>
																					</div>
																					
																					<div class="row-fluid">
																						<div class="span12" id="divMidiaSoftwareChave">
																						</div>
																					</div>
																					
																				</div>
																			</div>
																		</div>
																	</div>
																	<div class='span6'>
																		<div class="widget widget-tabs-icons-only">
																			<div class="widget-ta-prioridades">
																				<div class="widget-head">
																					<h4 class="heading glyphicons cogwheels"><i></i><fmt:message key="baseConhecimento.conhecimento" /></h4>
																					<div class="clearfix"></div>
																				</div>
																				<div class="widget-body">
																					<div class='row-fluid'>
																						<div class="span12">
																							<div class='span11'>
																								<label><fmt:message key="baseConhecimento.titulo" /></label>
																								<div><input type='text' id="pesquisa" name="pesquisa" maxlength="255" class="span12" /></div>
																							</div>
																							<div class='span1'>
																								<span class="btn-action glyphicons search btn-primary mt2" style="cursor:pointer; margin-top:25px" onclick="vincularConhecimento()">
																									<i></i>
																								</span>
																							</div>
																						</div>
																					</div>
																					<div class="separator"></div>
																					<div class="row-fluid">
																						<div class="span12" id="divConhecimento">
																						</div>
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
															</div>
														</div>

														<div class="row-fluid">
															<button type='button' id='btSalvar' class="lFloat btn btn-icon btn-primary btnGravar" onclick="salvar();"><i></i> <fmt:message key="citcorpore.comum.gravar" /></button>
															<button type='button' id='btLimpar' class="lFloat btn btn-icon btn-primary" onclick="limpar();"><i></i> <fmt:message key="citcorpore.comum.limpar" /></button>
															<button type='button' id='btExcluir' class="lFloat btn btn-icon btn-primary btnExcluir" onclick="excluir();"><i></i> <fmt:message key="citcorpore.comum.excluir" /></button>
														</div>
													</form>
												</div>
												<!-- TAB Pesquisa -->
												<div class="tab-pane" id="tab-midia-software-pesquisa">
													<div class="separator"></div>
													<div class="row-fluid" id="lookups">
														<div id="lookup-global" style="display: block;">
															<form name='formLookupGlobal'>
																<cit:findField formName='formLookupGlobal' lockupName='LOOKUP_MIDIASOFTWARE' id='LOOKUP_MIDIASOFTWARE' top='0' left='0' len='550' heigth='400' javascriptCode='true' htmlCode='true' />
															</form>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

				<!-- MODALS - INICIO -->
					<div class="modal hide fade wd-600" id="modal-pesquisaConhecimento">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h3 class="title">
								<fmt:message key="baseConhecimento.pesquisabase" />
							</h3>
						</div>
						<div class="modal-body">
							<div id="divResultadoPesquisa" name="divResultadoPesquisa"></div>
						</div>
					</div>
				<!-- MODALS - FIM -->
				
				<!--  Fim conteudo-->
				<%@include file="/novoLayout/common/include/rodape.jsp" %>
			</div>
		</div>
		
		<script src="${ctx}/novoLayout/common/include/js/jquery.autocomplete.js"></script>
		<script type="text/javascript" src="js/midiaSoftware.js"></script>
	</body>
</html>