Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 698607d0
authored
Oct 26, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Foodwave myyti
1 parent
286953ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
23 deletions
code/LanBortalWeb/WebContent/foodwave/listProducts.xhtml
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
code/LanBortalWeb/WebContent/useradmin/foodwaveProducts.xhtml
code/LanBortalWeb/WebContent/useradmin/sendPicture.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveFoodView.java
code/LanBortalWeb/WebContent/foodwave/listProducts.xhtml
View file @
698607d
...
...
@@ -23,8 +23,8 @@
<ui:define
name=
"content"
>
<!-- products:shop commitaction="#{foodWaveFoodView.commitShoppingCart()}" items="#{foodWaveFoodView.shoppingcart}" commitValue="#{i18n['productshop.commit']}" /-->
<foodwave:listFoods
selectaction=
"#{foodWaveFoodView.
commitShoppingCart
()}"
items=
"#{foodWaveFoodView.shoppingcart}"
commitValue=
"
#{i18n['productshop.commit']}
"
/>
<foodwave:listFoods
selectaction=
"#{foodWaveFoodView.
buyFromCounter
()}"
items=
"#{foodWaveFoodView.shoppingcart}"
commitValue=
"
foodshop.buyFromCounter
"
/>
</ui:define>
...
...
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
View file @
698607d
...
...
@@ -85,7 +85,7 @@
</p:dataTable>
<h:commandButton
action=
"#{
foodWaveFoodView.buyFromCounter}"
value=
"#{i18n['foodshop.buyFromCounter'
]}"
>
<h:commandButton
action=
"#{
cc.attrs.selectaction}"
value=
"#{i18n[cc.attrs.commitValue
]}"
>
</h:commandButton>
...
...
code/LanBortalWeb/WebContent/useradmin/foodwaveProducts.xhtml
View file @
698607d
...
...
@@ -26,8 +26,8 @@
<ui:define
name=
"content"
>
<!-- products:shop commitaction="#{foodWaveFoodView.commitShoppingCart()}" items="#{foodWaveFoodView.shoppingcart}" commitValue="#{i18n['productshop.commit']}" /-->
<foodwave:listFoods
selectaction=
"#{foodWaveFoodView.
commitShoppingCart()
}"
items=
"#{foodWaveFoodView.shoppingcart}"
commitValue=
"
#{i18n['productshop.commit']}
"
/>
<foodwave:listFoods
selectaction=
"#{foodWaveFoodView.
buyAndPay
}"
items=
"#{foodWaveFoodView.shoppingcart}"
commitValue=
"
foodshop.buyAndPay
"
/>
</ui:define>
...
...
code/LanBortalWeb/WebContent/useradmin/sendPicture.xhtml
View file @
698607d
...
...
@@ -16,29 +16,12 @@
<h1>
#{i18n['sendPicture.header']}
</h1>
<users:usertabs
tabId=
"picture"
/>
</ui:define>
<ui:define
name=
"headerdata"
>
<script
type=
"text/javascript"
>
webcam
.
set_api_url
(
'#{request.contextPath}/UploadServlet?type=userimage&id=#{userView.selectedUser.id}'
);
webcam
.
set_hook
(
'onComplete'
,
'my_completion_handler'
);
webcam
.
set_swf_url
(
'#{request.contextPath}/resources/jpegcam/webcam.swf'
);
webcam
.
set_shutter_sound
(
true
,
'#{request.contextPath}/resources/jpegcam/shutter.mp3'
);
function
my_completion_handler
(
msg
)
{
// alert("Completition handler executed" + msg);
window
.
location
.
href
=
"#{request.contextPath}/user/sendPicture.jsf?userid=#{userView.user.id}"
;
}
</script>
</ui:define>
<ui:define
name=
"content"
>
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
target=
"head"
/>
<h:outputScript
target=
"head"
library=
"jpegcam"
name=
"webcam.js"
/>
<button
onclick=
"$('#webcamcontainer').prepend(webcam.get_html(320, 240));$('#webcamcontainer').show();$(this).hide();"
>
#{i18n['userimage.webcam']}
</button>
<div
id=
"webcamcontainer"
style=
"display: none;"
></div>
<h:form
enctype=
"multipart/form-data"
>
<p:fileUpload
value=
"#{userView.image}"
mode=
"simple"
required=
"true"
/>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveFoodView.java
View file @
698607d
package
fi
.
insomnia
.
bortal
.
web
.
cdiview
.
shop
;
import
java.math.BigDecimal
;
import
java.util.Calendar
;
import
java.util.Iterator
;
import
javax.ejb.EJB
;
...
...
@@ -145,6 +146,14 @@ public class FoodWaveFoodView extends GenericCDIView {
return
bill
;
}
public
String
buyAndPay
()
{
Bill
b
=
createBillFromShoppingcart
();
billBean
.
markPaid
(
b
,
Calendar
.
getInstance
());
super
.
addFaceMessage
(
"foodwave.markPaid"
);
return
"/useradmin/edit"
;
}
public
String
buyFromCounter
()
{
createBillFromShoppingcart
();
...
...
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