Commit 70890659 by Tuukka Kivilahti

moar, still not perfect

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