Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2a671a13
authored
Jun 05, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moar incomifng
1 parent
eff37fe6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
37 deletions
code/MoyaWeb/WebContent/info/incoming.xhtml
code/MoyaWeb/WebContent/resources/templates/infoview/css/style.css
code/MoyaWeb/WebContent/resources/templates/infoview/template.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/flow/IncomingView.java
code/MoyaWeb/WebContent/info/incoming.xhtml
View file @
2a671a1
...
...
@@ -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}"
>
<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
value=
"#{i18n['incomingView.cancel']}"
actionListener=
"#{incomingView.hideAttachDialog}"
update=
":attachform:attachBarcode"
/>
<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
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,8 +66,8 @@
</h1>
<br
/>
<h:panelGrid
id=
"cropper"
columns=
"
3
"
>
<h:panelGrid
id=
"cropper"
columns=
"
4
"
>
...
...
@@ -145,36 +153,28 @@
</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}"
/>
)
<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>
<h:panelGroup>
<h:form
id=
"userform"
enctype=
"multipart/form-data"
>
...
...
@@ -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>
<!-- -->
...
...
@@ -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']}"
/>
...
...
code/MoyaWeb/WebContent/resources/templates/infoview/css/style.css
View file @
2a671a1
...
...
@@ -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
code/MoyaWeb/WebContent/resources/templates/infoview/template.xhtml
View file @
2a671a1
...
...
@@ -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/
blip
view/css/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/
blip
view/css/general.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/
info
view/css/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/
info
view/css/general.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/custom_components.css"
/>
<ui:insert
name=
"headerdata"
/>
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/flow/IncomingView.java
View file @
2a671a1
...
...
@@ -199,10 +199,8 @@ public class IncomingView extends GenericCDIView {
}
public
boolean
isShowAttachDialog
()
{
return
showAttachDialog
;
}
...
...
@@ -292,5 +290,5 @@ public class IncomingView extends GenericCDIView {
}
return
null
;
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment