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 5b540454
authored
Mar 10, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hups, samassa commitissa kanhta, paikkakoodia ja infoilua
1 parent
d1c474a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
138 additions
and
31 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BarcodeBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/BarcodeBeanLocal.java
code/MoyaWeb/WebContent/admin/incoming/printCard.xhtml → code/MoyaWeb/WebContent/info/incoming.xhtml
code/MoyaWeb/WebContent/admin/incoming/index.xhtml → code/MoyaWeb/WebContent/info/index.xhtml
code/MoyaWeb/WebContent/resources/cditools/infoview/userselector.xhtml
code/MoyaWeb/WebContent/resources/templates/blipview/css/style.css
code/MoyaWeb/WebContent/resources/templates/blipview/template.xhtml
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/menu/MenuView.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BarcodeBean.java
View file @
5b54045
This diff is collapsed.
Click to expand it.
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
5b54045
...
...
@@ -20,6 +20,7 @@ import fi.codecrew.moya.enums.apps.MapPermission;
import
fi.codecrew.moya.enums.apps.PollPermission
;
import
fi.codecrew.moya.enums.apps.ShopPermission
;
import
fi.codecrew.moya.enums.apps.SpecialPermission
;
import
fi.codecrew.moya.enums.apps.TerminalPermission
;
import
fi.codecrew.moya.enums.apps.TournamentPermission
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.facade.MenuNavigationFacade
;
...
...
@@ -196,7 +197,7 @@ public class MenuBean implements MenuBeanLocal {
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/list"
),
ShopPermission
.
LIST_ALL_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/create"
),
ShopPermission
.
MANAGE_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/edit"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
;
MenuNavigation
foodnavi
=
adminshop
.
addPage
(
null
,
null
);
foodnavi
.
setKey
(
"topnavi.foodwave"
);
...
...
@@ -256,13 +257,14 @@ public class MenuBean implements MenuBeanLocal {
gamenavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/license/manageCodes"
),
LicensePermission
.
MANAGE
);
adminevent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/eventorg/editEvent"
),
EventPermission
.
MANAGE_PROPERTIES
);
navifacade
.
create
(
adminmenu
);
//MenuNavigation shopmenu = new MenuNavigation(ev, "topnavi.shopnavi", menusort = +10);
// shopnavi.addPage(menuitemfacade.findOrCreate("/index3"),
// UserPermission.ANYUSER);
// navifacade.create(shopmenu);
MenuNavigation
tournamentsadm
=
adminmenu
.
addPage
(
null
,
null
);
tournamentsadm
.
setKey
(
"tournaments.menutitle"
);
...
...
@@ -273,6 +275,32 @@ public class MenuBean implements MenuBeanLocal {
tournamentsadm
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/tournaments/admin/edit"
),
TournamentPermission
.
MANAGE_ALL
).
setVisible
(
false
);
tournamentsadm
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/tournaments/admin/delete"
),
TournamentPermission
.
MANAGE_ALL
).
setVisible
(
false
);
tournamentsadm
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/tournaments/admin/editrules"
),
TournamentPermission
.
MANAGE_ALL
).
setVisible
(
false
);
MenuNavigation
infoviews
=
adminmenu
.
addPage
(
null
,
null
);
infoviews
.
setKey
(
"topnavi.infoviews"
);
infoviews
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/admin/adduser/index"
),
UserPermission
.
CREATE_NEW
);
MenuNavigation
infonavi
=
infoviews
.
addPage
(
null
,
null
);
infonavi
.
setKey
(
"subnavi.info"
);
infonavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/info/index"
),
TerminalPermission
.
INFO
);
infonavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/info/incoming"
),
TerminalPermission
.
INFO
);
navifacade
.
create
(
adminmenu
);
//MenuNavigation shopmenu = new MenuNavigation(ev, "topnavi.shopnavi", menusort = +10);
// shopnavi.addPage(menuitemfacade.findOrCreate("/index3"),
// UserPermission.ANYUSER);
// navifacade.create(shopmenu);
/*
* MenuNavigation profileTopmenu = new MenuNavigation(ev,
* "topnavi.profile", menusort = +10);
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
View file @
5b54045
...
...
@@ -589,7 +589,7 @@ public class PlaceBean implements PlaceBeanLocal {
font
.
setSize
(
font2
);
textLine
=
new
TextLine
(
font
);
textLine
.
setText
(
barcodeBean
.
getPlace
Hexc
ode
(
place
));
textLine
.
setText
(
barcodeBean
.
getPlace
TextC
ode
(
place
));
textLine
.
setPosition
(
currentX
,
(
pagey
/
2
)
+
font1
);
textLine
.
setColor
(
new
int
[]
{
0
,
0
,
0
});
textLine
.
drawOn
(
page
);
...
...
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/BarcodeBeanLocal.java
View file @
5b54045
...
...
@@ -18,8 +18,8 @@ public interface BarcodeBeanLocal {
public
InputStream
getUserBarcode
(
EventUser
user
)
throws
IOException
;
public
InputStream
getCardBarcode
(
PrintedCard
printedCard
)
throws
IOException
;
public
String
getPlace
Hexc
ode
(
Place
place
);
public
Place
getPlaceFrom
Hexc
ode
(
String
hexcode
);
public
String
getPlace
TextC
ode
(
Place
place
);
public
Place
getPlaceFrom
TextC
ode
(
String
hexcode
);
public
String
checkVrAuthCode
(
String
code
);
public
Product
getProduct
(
String
barcode
);
...
...
code/MoyaWeb/WebContent/
admin/incoming/printCard
.xhtml
→
code/MoyaWeb/WebContent/
info/incoming
.xhtml
View file @
5b54045
...
...
@@ -10,16 +10,16 @@
<f:viewParam
name=
"userid"
value=
"#{userView.userid}"
/>
<f:event
type=
"preRenderView"
listener=
"#{incomingView.initPrintCardView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
target=
"head"
/>
<h1>
#{i18n['incomingflow.userdetails']}
</h1>
<h1>
#{i18n['incomingflow.userdetails']}
</h1>
<h:panelGrid
id=
"cropper"
columns=
"3"
>
<h:panelGroup>
<user:edit
id=
"usereditor"
commitaction=
"#{incomingView.saveUser()}"
commitvalue=
"#{i18n['user.save']}"
camAlwaysOn=
"true"
/>
<user:edit
id=
"usereditor"
commitaction=
"#{incomingView.saveUser()}"
commitvalue=
"#{i18n['user.save']}"
camAlwaysOn=
"true"
/>
</h:panelGroup>
<h:panelGroup>
<h:form
id=
"imgCropperForm"
rendered=
"#{!empty userView.user.currentImage}"
>
<p:commandButton
value=
"#{i18n['user.imageCropRefresh']}"
ajax=
"false"
update=
"imgCropperForm"
/>
<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.user.currentImage.id}.img"
/>
<br
/>
...
...
@@ -27,18 +27,19 @@
</h:form>
</h:panelGroup>
<h:panelGroup>
<h:form
>
<p:graphicImage
url=
"/dydata/usercard/#{userView.user.user.id}.png"
width=
"300"
/><br
/>
<h:commandButton
action=
"#{incomingView.printCard}"
value=
"#{i18n['print']}"
/>
(status: #{incomingView.printedStatus})
<h:form>
<p:graphicImage
url=
"/dydata/usercard/#{userView.user.user.id}.png"
width=
"300"
/>
<br
/>
<h:commandButton
action=
"#{incomingView.printCard}"
value=
"#{i18n['print']}"
/>
(status: #{incomingView.printedStatus})
</h:form>
</h:panelGroup>
</h:panelGrid>
<h:outputText
rendered=
"#{empty incomingView.groupMemberships}"
value=
"#{i18n['placegroupview.noMemberships']}"
/>
<h:form
rendered=
"#{!empty incomingView.groupMemberships}"
id=
"placelistform"
>
<h:form
rendered=
"#{!empty incomingView.groupMemberships}"
id=
"placelistform"
>
<p:dataTable
value=
"#{incomingView.groupMemberships}"
var=
"member"
rowStyleClass=
"#{member.enteredEvent != null ? 'success':''}"
>
...
...
@@ -83,15 +84,15 @@
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"#{i18n['incomingflow.barcode']}"
/>
<h:outputText
value=
"#{i18n['incomingflow.multisearch']}"
/>
<p:autoComplete
id=
"acs"
value=
"#{incomingView.searchBarcode}"
completeMethod=
"#{incomingView.matchBarcode}"
>
<p:ajax
event=
"itemSelect"
listener=
"#{incomingView.changeUser}"
/>
</p:autoComplete>
<p:autoComplete
id=
"acsb"
value=
"#{incomingView.searchMulti}"
completeMethod=
"#{incomingView.matchMulti}"
converter=
"#{eventUserConverter}"
var=
"usrx"
itemLabel=
"#{usrx.shortUserDescriptor}"
itemValue=
"#{usrx}"
>
<p:ajax
event=
"itemSelect"
listener=
"#{incomingView.changeUser}"
/>
</p:autoComplete>
</h:panelGrid>
</h:panelGrid>
</h:form>
</ui:define>
...
...
code/MoyaWeb/WebContent/
admin/incoming
/index.xhtml
→
code/MoyaWeb/WebContent/
info
/index.xhtml
View file @
5b54045
...
...
@@ -9,6 +9,7 @@
xmlns:p=
"http://primefaces.org/ui"
xmlns:shop=
"http://java.sun.com/jsf/composite/cditools/shop"
xmlns:reader=
"http://java.sun.com/jsf/composite/cditools/reader"
xmlns:infoview=
"http://java.sun.com/jsf/composite/cditools/infoview"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
>
<h:body>
<ui:composition
...
...
@@ -22,6 +23,11 @@
<f:event
type=
"preRenderView"
listener=
"#{readerList.initReaderList}"
/>
</f:metadata>
<ui:define
name=
"headercontent"
>
<infoview:userselector
/>
</ui:define>
<ui:define
name=
"content"
>
<h:form>
...
...
@@ -36,6 +42,7 @@
</ui:define>
</ui:composition>
</h:body>
...
...
code/MoyaWeb/WebContent/resources/cditools/infoview/userselector.xhtml
0 → 100644
View file @
5b54045
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
xmlns:reader=
"http://java.sun.com/jsf/composite/cditools/reader"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<reader:bacendReader
/>
</composite:implementation>
</html>
\ No newline at end of file
code/MoyaWeb/WebContent/resources/templates/blipview/css/style.css
View file @
5b54045
...
...
@@ -283,12 +283,29 @@ label {
text-decoration
:
none
;
}
#header_left
{
float
:
left
;
width
:
400px
;
}
#header_center
{
float
:
left
;
widows
:
300px
;
}
#header_right
{
text-align
:
right
;
float
:
right
;
width
:
400px
;
}
.success
{
color
:
#006600
;
}
\ No newline at end of file
}
\ No newline at end of file
code/MoyaWeb/WebContent/resources/templates/blipview/template.xhtml
View file @
5b54045
...
...
@@ -14,6 +14,7 @@
<link
rel=
"icon"
href=
"#{request.contextPath}/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/blipview/css/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/blipview/css/general.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/templates/custom_components.css"
/>
<ui:insert
name=
"headerdata"
/>
</h:head>
...
...
@@ -37,8 +38,17 @@
</h1>
</ui:fragment>
</c:otherwise>
</c:choose>
</h:link>
<div
class=
"topmenu"
>
<h:form>
<p:menubar
rendered=
"#{primeMenuView.hasSecondaryMenu}"
model=
"#{primeMenuView.secondaryMenuModel}"
/>
</h:form>
</div>
</div>
<div
id=
"header_center"
>
<ui:insert
name=
"headercontent"
/>
</div>
<div
id=
"header_right"
>
<img
src=
"#{request.contextPath}/resources/templates/template1/img/moya_logo.png"
/>
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
View file @
5b54045
...
...
@@ -231,12 +231,17 @@ resetMail.username = Username
resetmailSent.body
=
Email has been sent containing a link where you can change the password.
resetmailSent.header
=
Email sent
submenu.NotImplementedYet
=
Not implemented
submenu.frontpage
=
Frontpage
submenu.NotImplementedYet
=
Not implemented
submenu.admin.adduser
=
K
\u
00E4ytt
\u
00E4j
\u
00E4nlis
\u
00E4ys
submenu.admin.adduser.index
=
K
\u
00E4ytt
\u
00E4j
\u
00E4nlis
\u
00E4ys
submenu.frontpage
=
Frontpage
submenu.info.incoming
=
Incomingview
submenu.info.index
=
Infon
\u
00E4kym
\u
00E4
subnavi.cards
=
\u0009\u0009
subnavi.info
=
Info
topnavi.license
=
Lisenssikoodit
topnavi.license
=
Lisenssikoodit
user.cropImage
=
Crop
user.imageUpload.imageNotFound
=
Select image to upload
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
5b54045
...
...
@@ -909,6 +909,8 @@ sitepagelist.header = Site pages
submenu.NotImplementedYet
=
Not implemented
submenu.actionlog.messagelist
=
ActionLog
submenu.actionlog.taskview
=
View tasks
submenu.admin.adduser
=
Adduser
submenu.admin.adduser.index
=
Adduser
submenu.admin.adduser.login
=
Login
submenu.admin.adduser.start
=
Welcome
submenu.admin.adduser.update
=
Update profile picture
...
...
@@ -935,6 +937,8 @@ submenu.foodmanager.listFoodwaves = List active foodwaves
submenu.foodwave.list
=
Foodwaves
submenu.foodwave.listTemplates
=
Food provides
submenu.index
=
Frontpage
submenu.info.incoming
=
Sis
\u
00E4
\u
00E4ntulo
submenu.info.index
=
Infoview
submenu.license.manageCodes
=
Manage codes
submenu.license.viewCodes
=
View codes
submenu.map.create
=
Create map
...
...
@@ -993,6 +997,7 @@ submenu.voting.submitEntry = Submit entry
subnavi.billing
=
Billing
subnavi.cards
=
Cards
subnavi.info
=
Info
subnavi.products
=
Products
subnavi.readers
=
Readers
subnavi.roles
=
Roles
...
...
@@ -1025,6 +1030,7 @@ topnavi.event = Event
topnavi.foodwave
=
Food
topnavi.frontpage
=
Front page
topnavi.game
=
Gamecodes
topnavi.infoviews
=
Infoviews
topnavi.license
=
Licensecodes
topnavi.log
=
Log
topnavi.login
=
Login
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
5b54045
...
...
@@ -357,7 +357,7 @@ foodwavetemplate.actions = Toimet
foodwavetemplate.addproduct
=
Lis
\u
00E4
\u
00E4
foodwavetemplate.basicinfo
=
Tilauspohja
foodwavetemplate.createFoodwave
=
Luo ruokatilaus
foodwavetemplate.createwave
=
Luo tilaus
pohja
foodwavetemplate.createwave
=
Luo tilaus
foodwavetemplate.description
=
Kuvaus
foodwavetemplate.edit
=
Muokkaa tilauspohjaa
foodwavetemplate.editRow
=
Muokkaa
...
...
@@ -891,6 +891,8 @@ sitepagelist.header = Sivuston sis\u00E4ll\u00F6t
submenu.NotImplementedYet
=
Toteuttamatta
submenu.actionlog.messagelist
=
ActionLog
submenu.actionlog.taskview
=
N
\u
00E4yt
\u
00E4 toiminnat
submenu.admin.adduser
=
K
\u
00E4ytt
\u
00E4j
\u
00E4nlis
\u
00E4ys
submenu.admin.adduser.index
=
K
\u
00E4ytt
\u
00E4j
\u
00E4nlis
\u
00E4ys
submenu.admin.adduser.login
=
Kirjaudu sis
\u
00E4
\u
00E4n
submenu.admin.adduser.start
=
Tervetuloa
submenu.admin.adduser.update
=
P
\u
00E4ivit
\u
00E4 profiilikuva
...
...
@@ -917,6 +919,8 @@ submenu.foodmanager.listFoodwaves = Aktiiviset ruokatilaukset
submenu.foodwave.list
=
Ruokatilaukset
submenu.frontpage
=
Etusivu
submenu.index
=
Etusivu
submenu.info.incoming
=
Incomingview
submenu.info.index
=
Infon
\u
00E4kym
\u
00E4
submenu.license.manageCodes
=
Hallinnoi lisenssej
\u
00E4
submenu.license.viewCodes
=
N
\u
00E4yt
\u
00E4 koodit
submenu.map.create
=
Uusi kartta
...
...
@@ -978,6 +982,7 @@ submenu.voting.submitEntry = L\u00E4het\u00E4 entry
subnavi.billing
=
Laskutus
subnavi.cards
=
Kortit
subnavi.info
=
Info
subnavi.products
=
Tuotteet
subnavi.readers
=
Lukijat
subnavi.roles
=
Roolit
...
...
@@ -1010,6 +1015,7 @@ topnavi.event = Tapahtuma
topnavi.foodwave
=
Ruokatilaus
topnavi.frontpage
=
Etusivu
topnavi.game
=
Pelikoodit
topnavi.infoviews
=
Infon
\u
00E4kym
\u
00E4t
topnavi.license
=
Lisenssikoodit
topnavi.log
=
Logi
topnavi.login
=
Kirjaudu sis
\u
00E4
\u
00E4n
...
...
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
View file @
5b54045
...
...
@@ -273,7 +273,8 @@ public class PlaceMap extends HttpServlet {
logger
.
error
(
"Cannot convert string {} to color."
,
p
.
getProduct
().
getColor
());
}
}
else
{
logger
.
debug
(
"Nothing special for this place. Color should be default."
);
// too much debugging -TKjne
// logger.debug("Nothing special for this place. Color should be default.");
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/menu/MenuView.java
View file @
5b54045
...
...
@@ -63,7 +63,8 @@ public class MenuView {
public
List
<
PageContent
>
getPagecontent
(
String
pagekey
)
{
String
key
=
new
StringBuilder
(
layoutview
.
getPagepath
()).
append
(
":"
).
append
(
pagekey
).
toString
();
logger
.
debug
(
"Getting pagecontent for key {}. Matches: {}"
,
key
,
contents
.
containsKey
(
key
));
// Removed by tkfftk, enought is enought
// logger.debug("Getting pagecontent for key {}. Matches: {}", key, contents.containsKey(key));
if
(!
contents
.
containsKey
(
key
))
{
contents
.
put
(
key
,
pagebean
.
findContentsForUser
(
key
,
sessionstore
.
getLocale
()));
...
...
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