Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 675f6be5
authored
Oct 27, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foooooood.
1 parent
078d6814
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
28 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
code/LanBortalWeb/WebContent/WEB-INF/web.xml
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/ProductShopView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
View file @
675f6be
...
@@ -207,7 +207,7 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -207,7 +207,7 @@ public class MenuBean implements MenuBeanLocal {
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodadmin/editTemplate"
),
ShopPermission
.
MANAGE_FOODWAVES
).
setVisible
(
false
);
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodadmin/editTemplate"
),
ShopPermission
.
MANAGE_FOODWAVES
).
setVisible
(
false
);
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodmanager/listFoodwaves"
),
ShopPermission
.
MANAGE_FOODWAVES
);
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodmanager/listFoodwaves"
),
ShopPermission
.
MANAGE_FOODWAVES
);
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodmanager/listOrders"
),
ShopPermission
.
MANAGE_FOODWAVES
);
foodnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodmanager/listOrders"
),
ShopPermission
.
MANAGE_FOODWAVES
)
.
setVisible
(
false
)
;
}
}
...
...
code/LanBortalWeb/WebContent/WEB-INF/web.xml
View file @
675f6be
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<context-param>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<!-- <param-value>Production</param-value> -->
<!-- <param-value>Production</param-value> -->
<param-value>
Development
</param-value>
<param-value>
Development
</param-value>
</context-param>
</context-param>
...
...
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
675f6be
...
@@ -12,13 +12,12 @@
...
@@ -12,13 +12,12 @@
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:metadata>
<f:viewParam
name=
"foodwaveid"
value=
"#{foodWaveView.foodWaveId}"
/>
<f:viewParam
name=
"foodwaveid"
value=
"#{foodWaveView.foodWaveId}"
/>
<f:event
type=
"preRenderView"
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodWaveOrderList}"
/>
listener=
"#{foodWaveView.initFoodWaveOrderList}"
/>
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
</f:metadata>
</f:metadata>
<ui:define
name=
"title"
>
<ui:define
name=
"title"
>
<h1>
#{foodWaveView.
f
oodWave.name}
</h1>
<h1>
#{foodWaveView.
selectedF
oodWave.name}
</h1>
</ui:define>
</ui:define>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
...
...
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
View file @
675f6be
...
@@ -18,8 +18,6 @@
...
@@ -18,8 +18,6 @@
</composite:interface>
</composite:interface>
<composite:implementation>
<composite:implementation>
<!-- <h:outputScript target="head" library="script" name="jquery.min.js" /> -->
<!-- <h:outputScript target="head" library="script" name="shopscript.js" /> -->
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
/>
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
/>
...
@@ -84,14 +82,14 @@
...
@@ -84,14 +82,14 @@
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
<div>
<h:
commandButton
action=
"#{cc.attrs.selectaction}"
value=
"#{i18n[cc.attrs.commitValue]}"
>
<h:
outputLabel
for=
"total"
value=
"#{i18n['foodshop.total']}: "
/
>
<h:outputText
id=
"total"
value=
"#{foodWaveFoodView.totalPrice}"
>
</h:commandButton
>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"2"
/
>
</h:outputText>
<
h:commandButton
action=
"#{foodWaveFoodView.buyFromInternet}"
value=
"#{i18n['foodshop.buyFromInternet']}"
>
<
/div
>
<h:commandButton
action=
"#{cc.attrs.selectaction}"
value=
"#{i18n[cc.attrs.commitValue]}"
/>
<
/h:commandButton
>
<
h:commandButton
action=
"#{foodWaveFoodView.buyFromInternet}"
value=
"#{i18n['foodshop.buyFromInternet']}"
/
>
</h:form>
</h:form>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
View file @
675f6be
...
@@ -212,13 +212,17 @@ foodWave.unconfirmedOrders = Unconfirmed
...
@@ -212,13 +212,17 @@ foodWave.unconfirmedOrders = Unconfirmed
foodadmin.editTemplate
=
Edit
foodadmin.editTemplate
=
Edit
foodshop.buyAndPay
=
Buy and Pay
foodshop.buyFromCounter
=
Pay at info
foodshop.buyFromCounter
=
Pay at info
foodshop.buyFromInternet
=
Pay at Internet
foodshop.buyFromInternet
=
Pay at Internet
foodshop.total
=
Total
foodwave.orders
=
Foodwave Orders
foodwave.orders
=
Foodwave Orders
foodwave.template.basicinfo
=
Template Information
foodwave.template.basicinfo
=
Template Information
foodwave.template.description
=
Description
foodwave.template.edit.title
=
Foodwave Template Editor
foodwave.template.edit.title
=
Foodwave Template Editor
foodwave.template.list.title
=
Foodwave Templates
foodwave.template.list.title
=
Foodwave Templates
foodwave.template.name
=
Name
foodwave.template.selectproducts
=
Products
foodwave.template.selectproducts
=
Products
foodwaveTemplate.name
=
Name
foodwaveTemplate.name
=
Name
...
@@ -227,8 +231,11 @@ foodwavetemplate.actions = Actions
...
@@ -227,8 +231,11 @@ foodwavetemplate.actions = Actions
foodwavetemplate.addproduct
=
Add
foodwavetemplate.addproduct
=
Add
foodwavetemplate.basicinfo
=
Template
foodwavetemplate.basicinfo
=
Template
foodwavetemplate.createFoodwave
=
Create Foodwave
foodwavetemplate.createFoodwave
=
Create Foodwave
foodwavetemplate.createwave
=
Create foodwave
foodwavetemplate.description
=
Description
foodwavetemplate.description
=
Description
foodwavetemplate.edit
=
Edit foodwave template
foodwavetemplate.editRow
=
Edit
foodwavetemplate.editRow
=
Edit
foodwavetemplate.maxfoods
=
Maximum orders
foodwavetemplate.name
=
Name
foodwavetemplate.name
=
Name
foodwavetemplate.price
=
Price
foodwavetemplate.price
=
Price
foodwavetemplate.productdescription
=
Description
foodwavetemplate.productdescription
=
Description
...
@@ -237,6 +244,8 @@ foodwavetemplate.removeFromList = Remove
...
@@ -237,6 +244,8 @@ foodwavetemplate.removeFromList = Remove
foodwavetemplate.save
=
Ok
foodwavetemplate.save
=
Ok
foodwavetemplate.savetemplate
=
Submit
foodwavetemplate.savetemplate
=
Submit
foodwavetemplate.selectproducts
=
Products
foodwavetemplate.selectproducts
=
Products
foodwavetemplate.startTime
=
Foodwave time
foodwavetemplate.waveName
=
Wave name
game.gamepoints
=
Game points
game.gamepoints
=
Game points
...
@@ -625,7 +634,9 @@ submenu.auth.sendResetMail = Password reset
...
@@ -625,7 +634,9 @@ submenu.auth.sendResetMail = Password reset
submenu.bill.billSummary
=
Bill summary
submenu.bill.billSummary
=
Bill summary
submenu.bill.list
=
My bills
submenu.bill.list
=
My bills
submenu.bill.listAll
=
All bills
submenu.bill.listAll
=
All bills
submenu.foodadmin.createTemplate
=
Create foodwave template
submenu.foodadmin.listTemplates
=
List foodwave templates
submenu.foodadmin.listTemplates
=
List foodwave templates
submenu.foodmanager.listFoodwaves
=
List active foodwaves
submenu.foodwave.list
=
Open foodwaves
submenu.foodwave.list
=
Open foodwaves
submenu.foodwave.listTemplates
=
Food provides
submenu.foodwave.listTemplates
=
Food provides
submenu.index
=
Frontpage
submenu.index
=
Frontpage
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
675f6be
...
@@ -210,13 +210,17 @@ foodWave.unconfirmedOrders = Vahvistamattomia
...
@@ -210,13 +210,17 @@ foodWave.unconfirmedOrders = Vahvistamattomia
foodadmin.editTemplate
=
Muokkaa
foodadmin.editTemplate
=
Muokkaa
foodshop.buyAndPay
=
Varaa ja maksa
foodshop.buyFromCounter
=
Maksa infossa
foodshop.buyFromCounter
=
Maksa infossa
foodshop.buyFromInternet
=
Maksa Internetiss
\u
00E4
foodshop.buyFromInternet
=
Maksa Internetiss
\u
00E4
foodshop.total
=
Yhteens
\u
00E4
foodwave.orders
=
Maksetut Tilaukset
foodwave.orders
=
Maksetut Tilaukset
foodwave.template.basicinfo
=
Template Infot
foodwave.template.basicinfo
=
Template Infot
foodwave.template.description
=
Kuvaus
foodwave.template.edit.title
=
Foodwave Template Editori
foodwave.template.edit.title
=
Foodwave Template Editori
foodwave.template.list.title
=
Ruokatilaus Templatet
foodwave.template.list.title
=
Ruokatilaus Templatet
foodwave.template.name
=
Nimi
foodwave.template.selectproducts
=
Tuotteet
foodwave.template.selectproducts
=
Tuotteet
foodwaveTemplate.name
=
Nimi
foodwaveTemplate.name
=
Nimi
...
@@ -225,8 +229,11 @@ foodwavetemplate.actions = Toimet
...
@@ -225,8 +229,11 @@ foodwavetemplate.actions = Toimet
foodwavetemplate.addproduct
=
Lis
\u
00E4
\u
00E4
foodwavetemplate.addproduct
=
Lis
\u
00E4
\u
00E4
foodwavetemplate.basicinfo
=
Templeitti
foodwavetemplate.basicinfo
=
Templeitti
foodwavetemplate.createFoodwave
=
Luo ruokatilaus
foodwavetemplate.createFoodwave
=
Luo ruokatilaus
foodwavetemplate.createwave
=
Luo tilauspohja
foodwavetemplate.description
=
Kuvaus
foodwavetemplate.description
=
Kuvaus
foodwavetemplate.edit
=
Muokkaa tilauspohjaa
foodwavetemplate.editRow
=
Muokkaa
foodwavetemplate.editRow
=
Muokkaa
foodwavetemplate.maxfoods
=
Tilausten enimm
\u
00E4ism
\u
00E4
\u
00E4r
\u
00E4
foodwavetemplate.name
=
Nimi
foodwavetemplate.name
=
Nimi
foodwavetemplate.price
=
Hinta
foodwavetemplate.price
=
Hinta
foodwavetemplate.productdescription
=
Kuvaus
foodwavetemplate.productdescription
=
Kuvaus
...
@@ -235,6 +242,8 @@ foodwavetemplate.removeFromList = Poista
...
@@ -235,6 +242,8 @@ foodwavetemplate.removeFromList = Poista
foodwavetemplate.save
=
Ok
foodwavetemplate.save
=
Ok
foodwavetemplate.savetemplate
=
Tallenna
foodwavetemplate.savetemplate
=
Tallenna
foodwavetemplate.selectproducts
=
Tuotteet
foodwavetemplate.selectproducts
=
Tuotteet
foodwavetemplate.startTime
=
Tilausaika
foodwavetemplate.waveName
=
Tilauksen nimi
game.gamepoints
=
Insomnia Game pisteet:
game.gamepoints
=
Insomnia Game pisteet:
...
@@ -605,7 +614,9 @@ submenu.auth.sendResetMail = Salasanan palautus
...
@@ -605,7 +614,9 @@ submenu.auth.sendResetMail = Salasanan palautus
submenu.bill.billSummary
=
Laskujen yhteenveto
submenu.bill.billSummary
=
Laskujen yhteenveto
submenu.bill.list
=
N
\u
00E4yt
\u
00E4 omat laskut
submenu.bill.list
=
N
\u
00E4yt
\u
00E4 omat laskut
submenu.bill.listAll
=
Kaikki laskut
submenu.bill.listAll
=
Kaikki laskut
submenu.foodadmin.createTemplate
=
Luo tilauspohja
submenu.foodadmin.listTemplates
=
Muokkaa tilauspohjia
submenu.foodadmin.listTemplates
=
Muokkaa tilauspohjia
submenu.foodmanager.listFoodwaves
=
Aktiiviset ruokatilaukset
submenu.foodwave.list
=
Avoimet tilaukset
submenu.foodwave.list
=
Avoimet tilaukset
submenu.index
=
Etusivu
submenu.index
=
Etusivu
submenu.map.create
=
Uusi kartta
submenu.map.create
=
Uusi kartta
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
675f6be
...
@@ -14,7 +14,8 @@ import javax.faces.model.ListDataModel;
...
@@ -14,7 +14,8 @@ import javax.faces.model.ListDataModel;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
import
javax.inject.Named
;
import
com.sun.xml.rpc.processor.schema.UnimplementedFeatureException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
fi.insomnia.bortal.beans.AccountEventBeanLocal
;
import
fi.insomnia.bortal.beans.AccountEventBeanLocal
;
import
fi.insomnia.bortal.beans.BillBeanLocal
;
import
fi.insomnia.bortal.beans.BillBeanLocal
;
...
@@ -67,9 +68,12 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -67,9 +68,12 @@ public class FoodWaveView extends GenericCDIView {
private
Integer
foodWaveId
;
private
Integer
foodWaveId
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
private
List
<
FoodWave
>
foodWaves
;
private
List
<
FoodWave
>
foodWaves
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FoodWaveView
.
class
);
public
List
<
Product
>
getProducts
()
{
public
List
<
Product
>
getProducts
()
{
return
productbeanlocal
.
getProducts
();
List
<
Product
>
ret
=
productbeanlocal
.
getProducts
();
ret
.
removeAll
(
template
.
getProducts
());
return
ret
;
}
}
public
void
onEdit
()
{
public
void
onEdit
()
{
...
@@ -142,22 +146,22 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -142,22 +146,22 @@ public class FoodWaveView extends GenericCDIView {
super
.
beginConversation
();
super
.
beginConversation
();
}
}
}
}
public
List
<
FoodwaveProductSummary
>
getProductSummaries
()
{
public
List
<
FoodwaveProductSummary
>
getProductSummaries
()
{
System
.
out
.
println
(
"..asdfasdf"
);
System
.
out
.
println
(
"..asdfasdf"
);
HashMap
<
Product
,
FoodwaveProductSummary
>
pmap
=
new
HashMap
<
Product
,
FoodwaveProductSummary
>();
HashMap
<
Product
,
FoodwaveProductSummary
>
pmap
=
new
HashMap
<
Product
,
FoodwaveProductSummary
>();
for
(
AccountEvent
ae
:
getSelectedFoodWave
().
getAccountEvents
())
{
for
(
AccountEvent
ae
:
getSelectedFoodWave
().
getAccountEvents
())
{
if
(!
pmap
.
containsKey
(
ae
.
getProduct
()))
{
if
(!
pmap
.
containsKey
(
ae
.
getProduct
()))
{
pmap
.
put
(
ae
.
getProduct
(),
new
FoodwaveProductSummary
(
ae
.
getProduct
(),
new
BigDecimal
(
0
),
new
BigDecimal
(
0
)));
pmap
.
put
(
ae
.
getProduct
(),
new
FoodwaveProductSummary
(
ae
.
getProduct
(),
new
BigDecimal
(
0
),
new
BigDecimal
(
0
)));
}
}
System
.
out
.
println
(
".."
);
System
.
out
.
println
(
".."
);
pmap
.
get
(
ae
.
getProduct
()).
add
(
ae
);
pmap
.
get
(
ae
.
getProduct
()).
add
(
ae
);
}
}
System
.
out
.
println
(
"::"
+
pmap
.
values
().
size
());
System
.
out
.
println
(
"::"
+
pmap
.
values
().
size
());
return
new
ArrayList
<
FoodwaveProductSummary
>(
pmap
.
values
());
return
new
ArrayList
<
FoodwaveProductSummary
>(
pmap
.
values
());
}
}
private
void
createNewProductSkeleton
()
{
private
void
createNewProductSkeleton
()
{
...
@@ -221,9 +225,9 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -221,9 +225,9 @@ public class FoodWaveView extends GenericCDIView {
public
void
initFoodWaveOrderList
()
{
public
void
initFoodWaveOrderList
()
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
)
&&
selectedFoodWave
==
null
)
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
)
&&
selectedFoodWave
==
null
)
{
System
.
out
.
println
(
"Testiä"
);
selectedFoodWave
=
foodWaveBean
.
findFoodwave
(
foodWaveId
);
selectedFoodWave
=
foodWaveBean
.
findFoodwave
(
foodWaveId
);
logger
.
debug
(
"Got foodwave {} with id {}"
,
selectedFoodWave
,
foodWaveId
);
this
.
setAccountEventLines
(
new
ListDataModel
<
AccountEvent
>(
selectedFoodWave
.
getAccountEvents
()));
this
.
setAccountEventLines
(
new
ListDataModel
<
AccountEvent
>(
selectedFoodWave
.
getAccountEvents
()));
List
<
BillLine
>
tmpLines
=
new
ArrayList
<
BillLine
>();
List
<
BillLine
>
tmpLines
=
new
ArrayList
<
BillLine
>();
...
@@ -264,7 +268,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -264,7 +268,7 @@ public class FoodWaveView extends GenericCDIView {
}
}
public
FoodWave
getSelectedFoodWave
()
{
public
FoodWave
getSelectedFoodWave
()
{
//System.out.println("APOFKASFASFASFASFASFASFASFASFASFKJIOJIO");
//
System.out.println("APOFKASFASFASFASFASFASFASFASFASFKJIOJIO");
return
selectedFoodWave
;
return
selectedFoodWave
;
}
}
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/ProductShopView.java
View file @
675f6be
...
@@ -72,7 +72,6 @@ public class ProductShopView extends GenericCDIView {
...
@@ -72,7 +72,6 @@ public class ProductShopView extends GenericCDIView {
private
boolean
blip
=
false
;
private
boolean
blip
=
false
;
private
ListDataModel
<
ProductShopItem
>
boughtItems
;
private
ListDataModel
<
ProductShopItem
>
boughtItems
;
@EJB
public
void
initBillView
()
{
public
void
initBillView
()
{
if
(
requirePermissions
(
ShopPermission
.
LIST_USERPRODUCTS
)
if
(
requirePermissions
(
ShopPermission
.
LIST_USERPRODUCTS
)
&&
shoppingcart
==
null
)
{
&&
shoppingcart
==
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