Commit 70890659 by Tuukka Kivilahti

moar, still not perfect

1 parent 3c29d0e7
......@@ -8,7 +8,8 @@
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{userView.initView}" />
<f:event type="preRenderView" listener="#{userView.setCaptureForwardUrl('/admin/adduser/capturesuccess')}" />
<f:event type="preRenderView" listener="#{userView.setCaptureForwardUrl('/admin/adduser/update')}" />
</f:metadata>
<ui:define name="topbar">
......@@ -22,6 +23,10 @@
<ui:define name="content">
<div style="text-align: center;">
<h:form styleClass="captureForm">
<h:panelGrid columns="2">
......@@ -34,21 +39,33 @@
</a>
</h:panelGroup>
<h:panelGroup>
<div id="webcamcontainer">
<p:photoCam widgetVar="pc" listener="#{userView.oncapture}" />
<p:commandButton type="button" value="Capture" onclick="PF('pc').capture()" />
<div id="count" />
<p:photoCam widgetVar="pc" listener="#{userView.oncapture}" update="@all" />
<!-- <p:commandButton type="button" value="Capture" onclick="dophoto(pc)" />
-->
</div>
</h:panelGroup>
</h:panelGrid>
</h:form>
</div>
<div style="">
<h:form>
<h:commandLink style="margin: 0 auto; font-size: 3em;" action="#{userView.incomingPhotoReady}" value="Valmis" />
<h:form id="incomingpictureform">
<h:commandLink rendered="#{!empty userView.selectedUser.currentImage}" style="margin: 0 auto; font-size: 3em;" action="#{userView.incomingPhotoReady}" value="Valmis" />
<br />
<p:fragment rendered="#{!empty userView.selectedUser.currentImage}">
<p:graphicImage value="/dydata/userimage/#{userView.selectedUser.currentImage.id}.img" alt="image" />
</p:fragment>
</h:form>
</div>
......
......@@ -154,6 +154,12 @@ public class UserView extends GenericCDIView {
}
/**
* This is the user we are currently editing, if that is not found we user
* current user
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!