306 lines
14 KiB
Plaintext
Executable File
306 lines
14 KiB
Plaintext
Executable File
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:f="http://java.sun.com/jsf/core"
|
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
xmlns:p="http://primefaces.org/ui"
|
|
xmlns:pe="http://primefaces.org/ui/extensions">
|
|
<f:view locale="es">
|
|
<h:head>
|
|
<meta http-equiv="Content-Type"
|
|
content="text/html; charset=ISO-8859-1" />
|
|
<title>Control de Armas</title>
|
|
<link rel="stylesheet" type="text/css"
|
|
href="#{request.contextPath}/javax.faces.resource/css/maia.css.xhtml?v=5" />
|
|
<h:outputScript name="js/maiaworkspace.js?v=1" />
|
|
<h:outputScript name="js/keyevent.js?v=1" />
|
|
<h:outputScript name="js/validator.js?v=1" />
|
|
<h:outputScript name="js/script.js?v=1" />
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
//Construye el menu
|
|
Maiaworkspace.fillMenuTransactionMap();
|
|
showTimer(#{request.session.maxInactiveInterval}*1000);
|
|
//Funcion que verifica si el usuario debe cambiar el password, para lo cual se le mostrara un dialogo
|
|
//setTimeout(function(){Maiaworkspace.verifyChangePassword()},1000);
|
|
window.onbeforeunload = function(e) {
|
|
$.ajax({
|
|
url: "closeSessionMaia",
|
|
async: false
|
|
}).done(function() {});
|
|
};
|
|
});
|
|
//Funcion de logout llamada desde los tabs de transacciones cuando se caduca la session
|
|
function logoutHelper(){
|
|
window.location.reload();
|
|
}
|
|
|
|
|
|
// window.onbeforeunload = function(e) {
|
|
// console.log(window.closed);
|
|
// alert('');
|
|
// if(window.closed==true)
|
|
// logoutCas();
|
|
|
|
|
|
// };
|
|
|
|
</script>
|
|
|
|
</h:head>
|
|
<h:body>
|
|
<p:layout fullPage="true" id="idLayout">
|
|
<p:layoutUnit position="north" size="90" resizable="true"
|
|
closable="false" collapsible="false">
|
|
<h:form id="head">
|
|
<h:panelGrid columns="1" styleClass="m-profile2" />
|
|
<h:panelGrid columns="1" styleClass="m-profile">
|
|
<h:panelGrid columns="8" styleClass="m-profile-controls">
|
|
<h:outputLabel value="#{msg_security.profile}:" />
|
|
<h:selectOneMenu id="profiles"
|
|
value="#{loginController.profilecode}" style="width:200px;">
|
|
<f:selectItems value="#{loginController.lprofile}" var="profile"
|
|
itemLabel="#{profile.modifiedData['nprofile']}"
|
|
itemValue="#{profile.pk.profilecode}" />
|
|
<p:ajax update=":sideForm:tabsSide"
|
|
oncomplete="Maiaworkspace.fillMenuTransactionMap(); PF('tabSide').select(0); Maiaworkspace.initializeTabsUrl();"
|
|
event="change" listener="#{loginController.changeprofile()}"
|
|
process="@this, :head:profiles" />
|
|
</h:selectOneMenu>
|
|
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-f2"
|
|
onclick="showHideTransactionInputs();"
|
|
title="#{msg_general.btn_transaction}" />
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-f4"
|
|
onclick="reloadTab();" title="#{msg_general.btn_reload}" />
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-f5"
|
|
onclick="queryController();"
|
|
title="#{msg_general.btn_queryTran}" />
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-f10"
|
|
onclick="saveController();" title="#{msg_general.btn_saveTran}" />
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-f1"
|
|
action="#{loginController.help()}"
|
|
title="#{msg_general.btn_helpTran}" />
|
|
|
|
<p:commandButton value="" styleClass="m-icon-button m-icon-close"
|
|
action="#{loginController.logout()}" immediate="true" ajax="false"
|
|
title="#{msg_general.btn_exit}" />
|
|
|
|
|
|
</h:panelGrid>
|
|
<h:panelGrid styleClass="m-user-info" columns="1">
|
|
<p:clock pattern="#{msg_general.datetimeformat}" />
|
|
<p:commandButton id="uinfo"
|
|
value="#{loginController.mlocation['nickname']}" type="button"
|
|
icon="ui-icon-person" styleClass="m-user-info-button" />
|
|
|
|
<p:overlayPanel id="pinfo" for="uinfo" hideEffect="fade"
|
|
appendTo="@(body)">
|
|
<h:panelGrid styleClass="m-location" columns="2">
|
|
<h:outputLabel value="#{msg_general.lbl_compania}:" />
|
|
<h:outputText value="#{loginController.mlocation['cia']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_office}:" />
|
|
<h:outputText value="#{loginController.mlocation['office']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_branch}:" />
|
|
<h:outputText value="#{loginController.mlocation['branch']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_area}:" />
|
|
<h:outputText value="#{loginController.mlocation['area']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_channel}:" />
|
|
<h:outputText value="#{loginController.mlocation['channel']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_acco_date}:" />
|
|
<h:outputText value="#{loginController.mlocation['accodate']}" />
|
|
|
|
<h:outputLabel value="#{msg_general.lbl_working_date}:" />
|
|
<h:outputText value="#{loginController.mlocation['workdate']}" />
|
|
</h:panelGrid>
|
|
</p:overlayPanel>
|
|
</h:panelGrid>
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:layoutUnit>
|
|
|
|
<p:layoutUnit position="west" size="260" collapsible="true"
|
|
resizable="false" header="#{msg_general.lbl_options}">
|
|
<h:form id="sideForm" styleClass="m-side-form">
|
|
<h:inputHidden id="idHelpPath" value="" />
|
|
<p:remoteCommand name="inboxTransactionsByGroup"
|
|
actionListener="#{inboxController.queryTransactionsByGroup()}"
|
|
update=":sideForm:tabsSide:agendaBpm"
|
|
process="@this, :sideForm:tabsSide:agendaBpm:bpmGroupsList" />
|
|
<p:remoteCommand name="inboxTransactions"
|
|
actionListener="#{inboxController.queryTransactions()}"
|
|
update=":sideForm:tabsSide:agendaBpm" process="@this" />
|
|
<p:remoteCommand name="enableBpmData"
|
|
actionListener="#{inboxController.enableBpmData()}" update="@this"
|
|
process="@this" />
|
|
<p:remoteCommand name="assignTask"
|
|
actionListener="#{inboxController.assignTask()}" process="@this"
|
|
oncomplete="Maiaworkspace.handleTabDiaryChange(0)" />
|
|
<p:remoteCommand name="filterTasks"
|
|
actionListener="#{inboxController.filterTasks()}"
|
|
update=":sideForm:tabsSide:agendaBpm" process="@this" />
|
|
<p:remoteCommand name="filterTasksGroups"
|
|
actionListener="#{inboxController.filterTasksGroups()}"
|
|
update=":sideForm:tabsSide:agendaBpm" process="@this" />
|
|
<p:remoteCommand name="helpFunc" action="#{loginController.help()}"
|
|
process="@this" />
|
|
<p:tabView id="tabsSide" cache="false" styleClass="m-tabs-side"
|
|
widgetVar="tabSide"
|
|
onTabChange="Maiaworkspace.handleTabSideChange(index)">
|
|
<p:tab id="tabMenu" title="#{msg_general.tab_menu}">
|
|
<p:panelMenu model="#{loginController.maiaMenu.menuModel}" />
|
|
</p:tab>
|
|
<p:tab id="tabBpm" title="#{msg_general.tab_agenda}">
|
|
<p:tabView id="agendaBpm" cache="false"
|
|
styleClass="m-tabs-side m-tab-inner"
|
|
activeIndex="#{inboxController.tabDiaryId}"
|
|
onTabChange="Maiaworkspace.handleTabDiaryChange(index)">
|
|
<p:tab id="tabTasks" title="#{msg_general.tab_my_tasks}">
|
|
<p:accordionPanel id="accordionTasks"
|
|
value="#{inboxController.lTransactions}" var="transaction"
|
|
styleClass="m-accordion-inbox"
|
|
activeIndex="#{inboxController.accordionTaskTabId}">
|
|
<p:ajax event="tabChange"
|
|
listener="#{inboxController.onAccordionTasksTabChange}" />
|
|
<p:tab title="#{transaction['n']}">
|
|
<p:accordionPanel value="#{transaction['tasks']}" var="task"
|
|
styleClass="m-accordion-detail">
|
|
<p:tab title="#{task['logsolicitude']}">
|
|
<h:outputLabel value="#{task['taskDetail']['detail']}"
|
|
style="cursor:pointer;" escape="false"
|
|
onclick="enableBpmData([{name:'kind', value:'#{task['taskDetail']['k']}'},{name:'tid', value:'#{task['tid']}'},{name:'s', value:'#{task['taskDetail']['s']}'}]); Maiaworkspace.loadPage('#{transaction['pjsfurl']}', '#{transaction['name']}', '#{task['taskDetail']['param']}')" />
|
|
</p:tab>
|
|
</p:accordionPanel>
|
|
</p:tab>
|
|
</p:accordionPanel>
|
|
</p:tab>
|
|
<p:tab id="tabGroups" title="#{msg_general.tab_groups}">
|
|
<h:selectOneMenu id="bpmGroupsList"
|
|
value="#{inboxController.codBpmGroupSelected}"
|
|
onchange="Maiaworkspace.handleTabDiaryChange(1)" style="width:240px">
|
|
<f:selectItems value="#{inboxController.lBpmGroups}"
|
|
var="item" itemValue="#{item.pk.groupcode}"
|
|
itemLabel="#{item.get('groupName')}" />
|
|
</h:selectOneMenu>
|
|
<p:accordionPanel id="accordionGroups"
|
|
value="#{inboxController.lTransactionsByGroup}"
|
|
styleClass="m-accordion-inbox"
|
|
var="transaction"
|
|
activeIndex="#{inboxController.accordionGroupTabId}">
|
|
<p:ajax event="tabChange"
|
|
listener="#{inboxController.onAccordionTasksTabChange}" />
|
|
<p:tab title="#{transaction['n']}">
|
|
<p:panelGrid columns="2">
|
|
<h:inputText />
|
|
<p:commandButton value="#{msg_general.btn_query}"
|
|
icon="ui-icon-search" process="@this"
|
|
onclick="filterTasksGroups([{name:'tModule', value:'#{transaction['m']}'}, {name:'tCode', value:'#{transaction['t']}'}, {name:'tVersion', value:'#{transaction['v']}'}, {name:'filterTaskName', value:$(this).parent().prev().children(0).first().val()}])" />
|
|
</p:panelGrid>
|
|
<p:accordionPanel value="#{transaction['tasks']}" var="task"
|
|
styleClass="m-accordion-detail">
|
|
<p:tab title="#{task['logsolicitude']}">
|
|
<h:outputLabel value="#{task['taskDetail']['detail']}"
|
|
style="cursor:pointer;" escape="false"
|
|
onclick="assignTask([{name:'tid',value: '#{task['tid']}'}]);" />
|
|
</p:tab>
|
|
</p:accordionPanel>
|
|
</p:tab>
|
|
</p:accordionPanel>
|
|
</p:tab>
|
|
</p:tabView>
|
|
</p:tab>
|
|
</p:tabView>
|
|
</h:form>
|
|
</p:layoutUnit>
|
|
|
|
<p:layoutUnit position="center" styleClass="centerLayout">
|
|
<p:tabView id="tabs" cache="false"
|
|
onTabChange="Maiaworkspace.handleTabChange(index)">
|
|
<p:tab id="option0" title="#{msg_security.opcion}">
|
|
<iframe id="tab0"
|
|
src="#{request.contextPath}/pages/initialtab.xhtml"
|
|
style="border: 0px; background-color: transparent; width: 100%; height: 100%; overflow: hidden;" />
|
|
</p:tab>
|
|
<p:tab id="option1" title="#{msg_security.opcion}">
|
|
<iframe id="tab1"
|
|
src="#{request.contextPath}/pages/initialtab.xhtml"
|
|
style="border: 0 none; background-color: transparent; width: 100%; height: 100%; overflow: hidden;" />
|
|
</p:tab>
|
|
</p:tabView>
|
|
</p:layoutUnit>
|
|
<h:form id="menuJsonForm">
|
|
<p:remoteCommand name="openChangePassword"
|
|
oncomplete="PF('dialogChangePassword').show();" />
|
|
<p:remoteCommand name="queryChangePassword"
|
|
actionListener="#{changeExpiredPassPersonalController.querydatabase()}"
|
|
process="@this" update=":formTable" />
|
|
<h:inputHidden id="menuJsonFormValue"
|
|
value="#{loginController.maiaMenu.maiaMenuJson}" />
|
|
<h:inputHidden id="changePassword"
|
|
value="#{loginController.changepassword}" />
|
|
|
|
<div id="transactionMenuPanel" class="transaccion-display">
|
|
<h:panelGrid columns="3">
|
|
<h:inputText id="tmodule" value="" style="width:35px"
|
|
onkeydown="Maiaworkspace.transactionTabEvent(event, $('#menuJsonForm\\:ttransaction'));Maiaworkspace.loadPageFromEvent(event); return Validator.validateInputNumber(event);" />
|
|
<h:inputText id="ttransaction" value="" style="width:70px"
|
|
onkeydown="Maiaworkspace.transactionTabEvent(event, $('#menuJsonForm\\:tmodule'));Maiaworkspace.loadPageFromEvent(event); return Validator.validateInputNumber(event);" />
|
|
<p:commandButton id="ir" value="" icon="ui-icon-newwin"
|
|
onclick="Maiaworkspace.transactionTabEvent(event, $('#menuJsonForm\\:tmodule'));Maiaworkspace.loadPageFromEvent(event); return Validator.validateInputNumber(event);" />
|
|
</h:panelGrid>
|
|
</div>
|
|
</h:form>
|
|
<p:ajaxStatus onstart="PF('statusDialogw').show();"
|
|
onsuccess="PF('statusDialogw').hide();" />
|
|
<p:dialog modal="true" widgetVar="statusDialogw"
|
|
header="#{msg_general.lbl_loading}" draggable="false"
|
|
closable="false">
|
|
<p:graphicImage value="/resources/images/ajaxloadingbar.gif" />
|
|
</p:dialog>
|
|
<p:dialog modal="true" widgetVar="tranMsgDialog"
|
|
header="#{msg_general.htbl_message}" draggable="false"
|
|
closable="false">
|
|
<h:form id="formTran">
|
|
<h:outputText value="#{msg_general.lbl_transaccion_no_existe}" />
|
|
<br />
|
|
<br />
|
|
<h:panelGrid columns="2">
|
|
<p:commandButton value="#{msg_general.btn_cancell}"
|
|
onclick="PF('tranMsgDialog').hide()" icon="ui-icon-trash" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
<p:dialog rendered="#{loginController.changepassword=='Y'}"
|
|
onShow="queryChangePassword();"
|
|
onHide="saveFuncChangePassword=undefined"
|
|
widgetVar="dialogChangePassword" resizable="false"
|
|
closeOnEscape="false" modal="true" appendTo="@(body)"
|
|
showEffect="explode" hideEffect="explode" styleClass="m-dialog"
|
|
closable="false">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_security.lbl_change_password}" />
|
|
</f:facet>
|
|
<p:messages id="messages" autoUpdate="true" globalOnly="true" />
|
|
<h:form id="formTable">
|
|
<ui:include src="/pages/security/_changepasswordExpired.xhtml" />
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
<p:dialog autosized="true" widgetVar="popupTimeout" closable="false"
|
|
modal="true" draggable="false" closeOnEscape="false"
|
|
resizable="false" header="Sesión expirada">
|
|
<h:panelGroup layout="block" style="margin:auto;">
|
|
<h:commandButton value="Aceptar"
|
|
onclick="window.location='#{request.scheme}://#{request.serverName}:#{request.serverPort}#{request.contextPath}/index.xhtml'" />
|
|
</h:panelGroup>
|
|
</p:dialog>
|
|
|
|
|
|
</p:layout>
|
|
</h:body>
|
|
</f:view>
|
|
</html> |