Commit 2a671a13 by Tuukka Kivilahti

moar incomifng

1 parent eff37fe6
......@@ -11,8 +11,10 @@
<f:event type="preRenderView" listener="#{incomingView.initPrintCardView}" />
</f:metadata>
<ui:define name="content">
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<script type="text/javascript">
</script>
......@@ -31,18 +33,24 @@
<p:poll update="attachBarcode" interval="2" ignoreAutoUpdate="true" onerror="location.reload();" />
<h:panelGroup id="attachBarcode">
<h:panelGroup rendered="#{incomingView.showAttachDialog}">
<h:panelGroup id="attachhider" rendered="#{incomingView.showAttachDialog}">
<div id="attachpopup">
<script>
$(".attachbuttonidclass").focus();
</script>
<h1>#{i18n['incomingView.attachDialogTitle']}</h1>
<!-- napin painaminen aiheuttaa aina NullPOinterExceptionin, mutta tekee siitä huolimatta tarvittavat asiat -->
<p:commandButton value="#{i18n['incomingView.attach']}" actionListener="#{incomingView.attachCodeToCard}" update=":cardcodeform :placelistform :imgCropperForm" onerror="location.reload(true);" />
<p:commandButton styleClass="attachbuttonidclass" value="#{i18n['incomingView.attach']}" actionListener="#{incomingView.attachCodeToCard}" update=":cardcodeform :placelistform :imgCropperForm :cardsetform" onerror="location.reload(true);" />
<p:commandButton value="#{i18n['incomingView.cancel']}" actionListener="#{incomingView.hideAttachDialog}" update=":attachform:attachBarcode" />
</div>
</h:panelGroup>
</h:panelGroup>
</h:form>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<br />
......@@ -58,7 +66,7 @@
</h1>
<br />
<h:panelGrid id="cropper" columns="3">
<h:panelGrid id="cropper" columns="4">
......@@ -145,32 +153,24 @@
</p:fieldset>
</h:form>
</h:panelGroup>
<h:panelGroup>
<h:form id="imgCropperForm">
<p:fieldset id="cropperandcardset" legend="#{i18n['incomingflow.printedCard']}" toggleable="true" collapsed="#{fieldsetView.isCollapsed(component.id)}">
<p:ajax event="toggle" listener="#{fieldsetView.handleToggle}" />
<h:panelGroup>
<h:panelGrid columns="2">
<h:panelGroup rendered="#{!empty userView.selectedUser.currentImage}">
<p:commandButton value="#{i18n['user.imageCropRefresh']}" ajax="false" update="imgCropperForm" />
<h:outputLabel value="#{i18n['user.cropUserImage']}:" />
<p:imageCropper id="imgCropper" value="#{userView.croppedImage}" aspectRatio="0.7317073170731707" image="/dydata/userimage/#{userView.selectedUser.currentImage.id}.img" />
<br />
<h:commandButton action="#{userView.crop}" value="#{i18n['user.cropImage']}" />
</h:panelGroup>
<h:panelGroup>
<h:form id="cardsetform">
<p:fieldset id="cardset" legend="#{i18n['incomingflow.printedCard']}" toggleable="true" collapsed="#{fieldsetView.isCollapsed(component.id)}">
<p:ajax event="toggle" listener="#{fieldsetView.handleToggle}" />
<p:graphicImage url="/dydata/usercard/#{userView.selectedUser.user.id}.png" width="300" />
<br />
<h:commandButton action="#{incomingView.printCard}" value="#{i18n['print']}" /> (status: <p:outputLabel value="#{incomingView.printedStatus}" />)
</h:panelGroup>
</h:panelGrid>
</p:fieldset>
</h:form>
</h:panelGroup>
......@@ -199,8 +199,8 @@
<br />
<br />
<ui:fragment rendered="#{true}">
<p:photoCam widgetVar="pc" listener="#{userView.oncapture}" update=":imgCropperForm,:userform" />
<p:commandButton type="button" value="Capture" onclick="PF('pc').capture()" onerror="location.reload(true);" update=":imgCropperForm,:userform" />
<p:photoCam widgetVar="pc" listener="#{userView.oncapture}" update=":cardsetform,:imgCropperForm,:userform" />
<p:commandButton type="button" value="Capture" onclick="PF('pc').capture()" onerror="location.reload(true);" update=":cardsetform,:imgCropperForm,:userform" />
</ui:fragment>
<!-- -->
&nbsp;
......@@ -243,6 +243,30 @@
</p:fieldset>
</h:form>
</h:panelGroup>
<h:panelGroup>
<h:form id="imgCropperForm">
<p:fieldset id="cropperandcardset" legend="#{i18n['incomingflow.printedCard']}" toggleable="true" collapsed="#{fieldsetView.isCollapsed(component.id)}">
<p:ajax event="toggle" listener="#{fieldsetView.handleToggle}" />
<h:panelGrid columns="1">
<h:panelGroup rendered="#{!empty userView.selectedUser.currentImage}">
<p:commandButton value="#{i18n['user.imageCropRefresh']}" ajax="false" update=":cardsetform imgCropperForm" />
<h:outputLabel value="#{i18n['user.cropUserImage']}:" />
<p:imageCropper id="imgCropper" value="#{userView.croppedImage}" aspectRatio="0.7317073170731707" image="/dydata/userimage/#{userView.selectedUser.currentImage.id}.img" />
<br />
<h:commandButton action="#{userView.crop}" value="#{i18n['user.cropImage']}" />
</h:panelGroup>
</h:panelGrid>
</p:fieldset>
</h:form>
</h:panelGroup>
</h:panelGrid>
<h:outputText rendered="#{empty incomingView.groupMemberships}" value="#{i18n['placegroupview.noMemberships']}" />
......
......@@ -307,5 +307,19 @@ label {
#attachpopup {
display: block;
position: fixed;
border: 5px solid red;
border-radius: 11px;
left: 30%;
top: 30%;
width: 300px;
height: 100px;
background-color: white;
z-index: 999;
padding: 10px;
}
\ No newline at end of file
......@@ -12,8 +12,8 @@
<meta name="author" content="CodeCrew ry" />
<meta http-equiv="Content-Language" content="fi" />
<link rel="icon" href="#{request.contextPath}/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/blipview/css/style.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/blipview/css/general.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/infoview/css/style.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/infoview/css/general.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/custom_components.css" />
<ui:insert name="headerdata" />
......
......@@ -201,8 +201,6 @@ public class IncomingView extends GenericCDIView {
public boolean isShowAttachDialog() {
return showAttachDialog;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!