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 8f92fad3
authored
Aug 31, 2013
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of codecrew.fi:bortal into devel
2 parents
39393d8f
717d08dc
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
422 additions
and
218 deletions
code/MoyaBeans/.settings/org.eclipse.core.resources.prefs
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/CheckoutFiBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/UserBean.java
code/MoyaBeans/pom.xml
code/MoyaBeansClient/.settings/org.eclipse.core.resources.prefs
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/UserBeanLocal.java
code/MoyaCardPrinter/.settings/org.eclipse.core.resources.prefs
code/MoyaDatabase/.settings/org.eclipse.core.resources.prefs
code/MoyaEar/.settings/org.eclipse.core.resources.prefs
code/MoyaEar/.settings/org.eclipse.wst.common.component
code/MoyaUtilities/.settings/org.eclipse.core.resources.prefs
code/MoyaWeb/.settings/org.eclipse.core.resources.prefs
code/MoyaWeb/WebContent/WEB-INF/web.xml
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
code/MoyaWeb/WebContent/bill/showBill.xhtml
code/MoyaWeb/WebContent/resources/cditools/loginLogout.xhtml
code/MoyaWeb/WebContent/resources/cditools/user/create.xhtml
code/MoyaWeb/WebContent/resources/cditools/user/edit.xhtml
code/MoyaWeb/WebContent/resources/cditools/user/newedit.xhtml
code/MoyaWeb/WebContent/resources/templates/template1/template.xhtml
code/MoyaWeb/WebContent/user/sendPicture.xhtml
code/MoyaWeb/WebContent/useradmin/list.xhtml
code/MoyaWeb/WebContent/useradmin/overview.xhtml
code/MoyaWeb/WebContent/useradmin/showTakePicture.xhtml
code/MoyaWeb/pom.xml
code/MoyaWeb/src/ValidationMessages_en.properties
code/MoyaWeb/src/fi/codecrew/moya/handler/SessionHandler.java
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/web/cdiview/menu/MenuView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/menu/PrimeMenuView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
code/MoyaBeans/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/CheckoutFiBean.java
View file @
8f92fad
...
@@ -193,6 +193,7 @@ public class CheckoutFiBean implements CheckoutFiBeanLocal {
...
@@ -193,6 +193,7 @@ public class CheckoutFiBean implements CheckoutFiBeanLocal {
HttpResponse
response
=
client
.
execute
(
postRequest
);
HttpResponse
response
=
client
.
execute
(
postRequest
);
final
StringWriter
writer
=
new
StringWriter
();
final
StringWriter
writer
=
new
StringWriter
();
IOUtils
.
copy
(
response
.
getEntity
().
getContent
(),
writer
,
"UTF8"
);
IOUtils
.
copy
(
response
.
getEntity
().
getContent
(),
writer
,
"UTF8"
);
final
String
xmlReturn
=
writer
.
toString
();
final
String
xmlReturn
=
writer
.
toString
();
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
8f92fad
...
@@ -116,7 +116,8 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -116,7 +116,8 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
userprofile
=
usermenu
.
addPage
(
null
,
null
);
MenuNavigation
userprofile
=
usermenu
.
addPage
(
null
,
null
);
userprofile
.
setKey
(
"topnavi.profile"
);
userprofile
.
setKey
(
"topnavi.profile"
);
userprofile
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/edit"
),
UserPermission
.
MODIFY
);
userprofile
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/edit"
),
UserPermission
.
MODIFY
);
userprofile
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/changePassword"
),
UserPermission
.
VIEW_SELF
);
userprofile
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/logout"
),
UserPermission
.
LOGOUT
);
userprofile
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/logout"
),
UserPermission
.
LOGOUT
);
/*
/*
...
@@ -195,6 +196,12 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -195,6 +196,12 @@ public class MenuBean implements MenuBeanLocal {
adminPlaces
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/place/adminPlacemap"
),
UserPermission
.
VIEW_ALL
);
adminPlaces
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/place/adminPlacemap"
),
UserPermission
.
VIEW_ALL
);
// adminPlaces.addPage(menuitemfacade.findOrCreate("/place/adminGroups"), UserPermission.VIEW_ALL); // todo: make new view for managing
// adminPlaces.addPage(menuitemfacade.findOrCreate("/place/adminGroups"), UserPermission.VIEW_ALL); // todo: make new view for managing
MenuNavigation
mapnavi
=
adminPlaces
.
addPage
(
null
,
null
);
mapnavi
.
setKey
(
"topnavi.maps"
);
mapnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/map/list"
),
MapPermission
.
MANAGE_MAPS
);
mapnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/map/create"
),
MapPermission
.
MANAGE_MAPS
);
mapnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/map/edit"
),
null
).
setVisible
(
false
);
// event
// event
MenuNavigation
adminevent
=
adminmenu
.
addPage
(
null
,
null
);
MenuNavigation
adminevent
=
adminmenu
.
addPage
(
null
,
null
);
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/UserBean.java
View file @
8f92fad
...
@@ -6,6 +6,7 @@ import java.awt.image.BufferedImage;
...
@@ -6,6 +6,7 @@ import java.awt.image.BufferedImage;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.text.MessageFormat
;
import
java.text.MessageFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
...
@@ -28,8 +29,6 @@ import javax.persistence.PersistenceContext;
...
@@ -28,8 +29,6 @@ import javax.persistence.PersistenceContext;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
com.sun.enterprise.security.webservices.GFServerPipeCreator
;
import
fi.codecrew.moya.enums.apps.SpecialPermission
;
import
fi.codecrew.moya.enums.apps.SpecialPermission
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.facade.ApprovalFacade
;
import
fi.codecrew.moya.facade.ApprovalFacade
;
...
@@ -75,8 +74,7 @@ public class UserBean implements UserBeanLocal {
...
@@ -75,8 +74,7 @@ public class UserBean implements UserBeanLocal {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UserBean
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UserBean
.
class
);
/**
/**
* Java EE container injektoi tämän luokkamuuttujan luokan luonnin
* Java EE container injektoi tämän luokkamuuttujan luokan luonnin yhteydessä.
* yhteydessä.
*/
*/
@EJB
@EJB
private
UserFacade
userFacade
;
private
UserFacade
userFacade
;
...
@@ -226,7 +224,7 @@ public class UserBean implements UserBeanLocal {
...
@@ -226,7 +224,7 @@ public class UserBean implements UserBeanLocal {
@Override
@Override
@RolesAllowed
(
SpecialPermission
.
S_USER
)
@RolesAllowed
(
SpecialPermission
.
S_USER
)
public
UserImage
uploadImage
(
EventUser
user
,
String
contentType
,
byte
[]
image
,
String
filename
,
String
description
)
{
public
UserImage
uploadImage
(
EventUser
user
,
String
contentType
,
InputStream
imagestream
,
String
filename
,
String
description
)
{
user
=
eventUserFacade
.
merge
(
user
);
user
=
eventUserFacade
.
merge
(
user
);
logger
.
debug
(
"uploading image to userid {}"
,
user
);
logger
.
debug
(
"uploading image to userid {}"
,
user
);
...
@@ -237,7 +235,6 @@ public class UserBean implements UserBeanLocal {
...
@@ -237,7 +235,6 @@ public class UserBean implements UserBeanLocal {
throw
new
EJBAccessException
(
"No permission to upload image as another user"
);
throw
new
EJBAccessException
(
"No permission to upload image as another user"
);
}
}
ByteArrayInputStream
imagestream
=
new
ByteArrayInputStream
(
image
);
BufferedImage
bimage
;
BufferedImage
bimage
;
try
{
try
{
bimage
=
ImageIO
.
read
(
imagestream
);
bimage
=
ImageIO
.
read
(
imagestream
);
...
@@ -587,9 +584,6 @@ public class UserBean implements UserBeanLocal {
...
@@ -587,9 +584,6 @@ public class UserBean implements UserBeanLocal {
return
user
;
return
user
;
}
}
@Override
@Override
public
SearchResult
<
User
>
getEventUsers
(
SearchQuery
search
)
{
public
SearchResult
<
User
>
getEventUsers
(
SearchQuery
search
)
{
...
@@ -619,19 +613,19 @@ public class UserBean implements UserBeanLocal {
...
@@ -619,19 +613,19 @@ public class UserBean implements UserBeanLocal {
returnUsers
=
new
SearchResult
<
EventUser
>(
newSearchList
,
(
long
)
newSearchList
.
size
());
returnUsers
=
new
SearchResult
<
EventUser
>(
newSearchList
,
(
long
)
newSearchList
.
size
());
}
}
else
if
(
searchQuery
.
isUsersWithUnusedCodes
())
{
else
if
(
searchQuery
.
isUsersWithUnusedCodes
())
{
List
<
EventUser
>
newSearchList
=
new
ArrayList
<
EventUser
>();
List
<
EventUser
>
newSearchList
=
new
ArrayList
<
EventUser
>();
List
<
GroupMembership
>
groupMembers
=
new
ArrayList
<
GroupMembership
>();
List
<
GroupMembership
>
groupMembers
=
new
ArrayList
<
GroupMembership
>();
groupMembers
=
gmfacade
.
findAllWithoutUser
();
groupMembers
=
gmfacade
.
findAllWithoutUser
();
for
(
GroupMembership
member
:
groupMembers
)
{
for
(
GroupMembership
member
:
groupMembers
)
{
PlaceGroup
group
=
member
.
getPlaceGroup
();
PlaceGroup
group
=
member
.
getPlaceGroup
();
if
(
group
!=
null
&&
!
newSearchList
.
contains
(
group
.
getCreator
()))
{
if
(
group
!=
null
&&
!
newSearchList
.
contains
(
group
.
getCreator
()))
{
newSearchList
.
add
(
group
.
getCreator
());
newSearchList
.
add
(
group
.
getCreator
());
}
}
}
}
returnUsers
=
new
SearchResult
<
EventUser
>(
newSearchList
,
(
long
)
newSearchList
.
size
());
returnUsers
=
new
SearchResult
<
EventUser
>(
newSearchList
,
(
long
)
newSearchList
.
size
());
}
}
return
returnUsers
;
return
returnUsers
;
...
...
code/MoyaBeans/pom.xml
View file @
8f92fad
...
@@ -51,11 +51,7 @@
...
@@ -51,11 +51,7 @@
<artifactId>
pdfjet
</artifactId>
<artifactId>
pdfjet
</artifactId>
<version>
0.0.0-2013-08-19
</version>
<version>
0.0.0-2013-08-19
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
1.3.2
</version>
</dependency>
<dependency>
<dependency>
<groupId>
fi.codecrew.moya
</groupId>
<groupId>
fi.codecrew.moya
</groupId>
<artifactId>
moya-authmodule-client
</artifactId>
<artifactId>
moya-authmodule-client
</artifactId>
...
@@ -66,5 +62,10 @@
...
@@ -66,5 +62,10 @@
<artifactId>
httpclient
</artifactId>
<artifactId>
httpclient
</artifactId>
<version>
4.3-beta2
</version>
<version>
4.3-beta2
</version>
</dependency>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.2
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
code/MoyaBeansClient/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/UserBeanLocal.java
View file @
8f92fad
package
fi
.
codecrew
.
moya
.
beans
;
package
fi
.
codecrew
.
moya
.
beans
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
javax.ejb.Local
;
import
javax.ejb.Local
;
...
@@ -27,7 +28,7 @@ public interface UserBeanLocal {
...
@@ -27,7 +28,7 @@ public interface UserBeanLocal {
EventUser
mergeChanges
(
EventUser
user
);
EventUser
mergeChanges
(
EventUser
user
);
UserImage
uploadImage
(
EventUser
user
,
String
contentType
,
byte
[]
image
,
String
filename
,
String
description
);
UserImage
uploadImage
(
EventUser
user
,
String
contentType
,
InputStream
inputStream
,
String
filename
,
String
description
);
UserImage
findUserImage
(
int
id
);
UserImage
findUserImage
(
int
id
);
...
@@ -69,8 +70,7 @@ public interface UserBeanLocal {
...
@@ -69,8 +70,7 @@ public interface UserBeanLocal {
List
<
Role
>
findUsersRoles
(
EventUser
u
);
List
<
Role
>
findUsersRoles
(
EventUser
u
);
/**
/**
* NOTICE! If the user parameter is a persisted object the returned
* NOTICE! If the user parameter is a persisted object the returned EventUser has a reloaded user, eg changes to the User object are lost!
* EventUser has a reloaded user, eg changes to the User object are lost!
*
*
* @param user
* @param user
* @return
* @return
...
...
code/MoyaCardPrinter/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaDatabase/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaEar/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaEar/.settings/org.eclipse.wst.common.component
View file @
8f92fad
...
@@ -29,9 +29,6 @@
...
@@ -29,9 +29,6 @@
<dependent-module
archiveName=
"pdfjet-0.0.0-2013-08-19.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/fi/iudex/pdfjet/pdfjet/0.0.0-2013-08-19/pdfjet-0.0.0-2013-08-19.jar"
>
<dependent-module
archiveName=
"pdfjet-0.0.0-2013-08-19.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/fi/iudex/pdfjet/pdfjet/0.0.0-2013-08-19/pdfjet-0.0.0-2013-08-19.jar"
>
<dependency-type>
uses
</dependency-type>
<dependency-type>
uses
</dependency-type>
</dependent-module>
</dependent-module>
<dependent-module
archiveName=
"commons-io-1.3.2.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar"
>
<dependency-type>
uses
</dependency-type>
</dependent-module>
<dependent-module
archiveName=
"moya-authmodule-client-0.2.0.jar"
deploy-path=
"/lib"
handle=
"module:/resource/MoyaAuthModuleClient/MoyaAuthModuleClient"
>
<dependent-module
archiveName=
"moya-authmodule-client-0.2.0.jar"
deploy-path=
"/lib"
handle=
"module:/resource/MoyaAuthModuleClient/MoyaAuthModuleClient"
>
<dependency-type>
uses
</dependency-type>
<dependency-type>
uses
</dependency-type>
</dependent-module>
</dependent-module>
...
@@ -47,6 +44,9 @@
...
@@ -47,6 +44,9 @@
<dependent-module
archiveName=
"commons-codec-1.6.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
>
<dependent-module
archiveName=
"commons-codec-1.6.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
>
<dependency-type>
uses
</dependency-type>
<dependency-type>
uses
</dependency-type>
</dependent-module>
</dependent-module>
<dependent-module
archiveName=
"commons-io-2.2.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/commons-io/commons-io/2.2/commons-io-2.2.jar"
>
<dependency-type>
uses
</dependency-type>
</dependent-module>
<dependent-module
archiveName=
"slf4j-jdk14-1.7.5.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/org/slf4j/slf4j-jdk14/1.7.5/slf4j-jdk14-1.7.5.jar"
>
<dependent-module
archiveName=
"slf4j-jdk14-1.7.5.jar"
deploy-path=
"/lib"
handle=
"module:/classpath/var/M2_REPO/org/slf4j/slf4j-jdk14/1.7.5/slf4j-jdk14-1.7.5.jar"
>
<dependency-type>
uses
</dependency-type>
<dependency-type>
uses
</dependency-type>
</dependent-module>
</dependent-module>
...
...
code/MoyaUtilities/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
39393d8
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/MoyaWeb/.settings/org.eclipse.core.resources.prefs
View file @
8f92fad
eclipse.preferences.version=1
eclipse.preferences.version=1
encoding//WebContent/resources/templates/template1/css/style.css=UTF-8
encoding//WebContent/resources/templates/template1/css/style.css=UTF-8
encoding/<project>=UTF-8
code/MoyaWeb/WebContent/WEB-INF/web.xml
View file @
8f92fad
...
@@ -12,13 +12,14 @@
...
@@ -12,13 +12,14 @@
<res-ref-name>
jsf/ProjectStage
</res-ref-name>
<res-ref-name>
jsf/ProjectStage
</res-ref-name>
<res-type>
java.lang.String
</res-type>
<res-type>
java.lang.String
</res-type>
</resource-ref>
</resource-ref>
<context-param>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-value>
Development
</param-value>
<param-value>
Development
</param-value>
</context-param>
</context-param>
<filter>
<filter>
<display-name>
PrimefacesFileupload
</display-name>
<display-name>
PrimefacesFileupload
</display-name>
<filter-name>
Prime
F
acesFileupload
</filter-name>
<filter-name>
Prime
f
acesFileupload
</filter-name>
<filter-class>
org.primefaces.webapp.filter.FileUploadFilter
<filter-class>
org.primefaces.webapp.filter.FileUploadFilter
</filter-class>
</filter-class>
</filter>
</filter>
...
@@ -28,7 +29,7 @@
...
@@ -28,7 +29,7 @@
<filter-class>
fi.codecrew.moya.HostnameFilter
</filter-class>
<filter-class>
fi.codecrew.moya.HostnameFilter
</filter-class>
</filter>
</filter>
<filter-mapping>
<filter-mapping>
<filter-name>
Prime
F
acesFileupload
</filter-name>
<filter-name>
Prime
f
acesFileupload
</filter-name>
<servlet-name>
Faces Servlet
</servlet-name>
<servlet-name>
Faces Servlet
</servlet-name>
</filter-mapping>
</filter-mapping>
<filter-mapping>
<filter-mapping>
...
...
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
View file @
8f92fad
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<h1>
#{i18n["adduser.update"]}
</h1>
<h1>
#{i18n["adduser.update"]}
</h1>
<br
/>
<br
/>
<br
/>
<br
/>
<a
class=
"touchItem"
href=
"javascript:dophoto(
pc
);"
>
<a
class=
"touchItem"
href=
"javascript:dophoto(
PF('pc')
);"
>
<div>
#{i18n["adduser.takePhoto"]}
</div>
<div>
#{i18n["adduser.takePhoto"]}
</div>
</a>
</a>
</h:panelGroup>
</h:panelGroup>
...
...
code/MoyaWeb/WebContent/bill/showBill.xhtml
View file @
8f92fad
...
@@ -61,12 +61,12 @@
...
@@ -61,12 +61,12 @@
<ui:fragment
rendered=
"#{!billEditView.bill.paid and !billEditView.bill.expired}"
>
<ui:fragment
rendered=
"#{!billEditView.bill.paid and !billEditView.bill.expired}"
>
<h:form>
<h:form>
<p:commandButton
id=
"cancelbtn"
onclick=
"
confirmation
.show()"
value=
"#{i18n['bill.cancel']}"
/>
<p:commandButton
id=
"cancelbtn"
onclick=
"
PF('confirmation')
.show()"
value=
"#{i18n['bill.cancel']}"
/>
<p:confirmDialog
id=
"confirmDialog"
message=
"#{i18n['generic.sure.message']}"
header=
"#{i18n['generic.sure.header']}"
severity=
"alert"
widgetVar=
"confirmation"
>
<p:confirmDialog
id=
"confirmDialog"
message=
"#{i18n['generic.sure.message']}"
header=
"#{i18n['generic.sure.header']}"
severity=
"alert"
widgetVar=
"confirmation"
>
<p:commandButton
value=
"#{i18n['generic.sure.yes']}"
onclick=
"
confirmation
.hide()"
actionListener=
"#{billEditView.expireBill()}"
ajax=
"false"
/>
<p:commandButton
value=
"#{i18n['generic.sure.yes']}"
onclick=
"
PF('confirmation')
.hide()"
actionListener=
"#{billEditView.expireBill()}"
ajax=
"false"
/>
<p:commandButton
value=
"#{i18n['generic.sure.no']}"
onclick=
"
confirmation
.hide()"
type=
"button"
/>
<p:commandButton
value=
"#{i18n['generic.sure.no']}"
onclick=
"
PF('confirmation')
.hide()"
type=
"button"
/>
</p:confirmDialog>
</p:confirmDialog>
</h:form>
</h:form>
...
...
code/MoyaWeb/WebContent/resources/cditools/loginLogout.xhtml
View file @
8f92fad
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
</c:when>
</c:when>
<c:otherwise>
<c:otherwise>
<login:login
isOneliner=
"true"
/>
<login:login
isOneliner=
"true"
/>
<br/>
<h:link
value=
"#{i18n['submenu.user.create']}"
outcome=
"/user/create"
/>
<br/>
<h:link
value=
"#{i18n['submenu.auth.sendResetMail']}"
outcome=
"/auth/sendResetMail"
/>
</c:otherwise>
</c:otherwise>
</c:choose>
</c:choose>
</composite:implementation>
</composite:implementation>
...
...
code/MoyaWeb/WebContent/resources/cditools/user/create.xhtml
View file @
8f92fad
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<p:overlayPanel
id=
"chartPanel"
for=
"webcamButton"
hideEffect=
"fade"
>
<p:overlayPanel
id=
"chartPanel"
for=
"webcamButton"
hideEffect=
"fade"
>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
pc
.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
PF('pc')
.capture()"
/>
</p:overlayPanel>
</p:overlayPanel>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
...
...
code/MoyaWeb/WebContent/resources/cditools/user/edit.xhtml
View file @
8f92fad
<?xml version='1.0' encoding='UTF-8' ?>
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
"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:tools=
"http://java.sun.com/jsf/composite/tools"
xmlns:p=
"http://primefaces.org/ui"
>
<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:tools=
"http://java.sun.com/jsf/composite/tools"
xmlns:p=
"http://primefaces.org/ui"
>
<composite:interface>
<composite:interface>
...
@@ -20,27 +21,28 @@
...
@@ -20,27 +21,28 @@
<h:panelGroup>
<h:panelGroup>
<ui:fragment
rendered=
"#{not empty userView.user.id}"
>
<ui:fragment
rendered=
"#{not empty userView.user.id}"
>
<p:dialog
rendered=
"#{!cc.attrs.camAlwaysOn}"
id=
"chartPanel"
for=
"webcamButton"
modal=
"true"
dynamic=
"true"
widgetVar=
"webcamDialog"
>
<p:dialog
id=
"chartPanel"
for=
"webcamButton"
modal=
"true"
dynamic=
"true"
widgetVar=
"webcamDialog"
>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
pc
.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
PF('pc')
.capture()"
/>
</p:dialog>
</p:dialog>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
<ui:fragment
rendered=
"#{!empty userView.user.currentImage}"
>
<ui:fragment
rendered=
"#{!empty userView.user.currentImage}"
>
<img
style=
"width: 150px;"
src=
"#{request.contextPath}/dydata/userimage/#{userView.user.currentImage.id}.img"
alt=
"image"
/>
<img
style=
"width: 150px;"
src=
"#{request.contextPath}/dydata/userimage/#{userView.user.currentImage.id}.img"
alt=
"image"
/>
</ui:fragment>
</ui:fragment>
<br
/>
<br
/>
<p:commandButton
rendered=
"#{!cc.attrs.camAlwaysOn}"
id=
"webcamButton"
value=
"#{i18n['userimage.webcam']}"
onclick=
"webcamDialog
.show()"
type=
"button"
/>
<p:commandButton
rendered=
"#{!cc.attrs.camAlwaysOn}"
id=
"webcamButton"
value=
"#{i18n['userimage.webcam']}"
onclick=
"PF('webcamDialog')
.show()"
type=
"button"
/>
<br
/>
<br
/>
<br
/>
<br
/>
<ui:fragment
rendered=
"#{cc.attrs.camAlwaysOn}"
>
<ui:fragment
rendered=
"#{cc.attrs.camAlwaysOn}"
>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"pc.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"PF('pc').capture()"
/>
</ui:fragment>
</ui:fragment>
<!-- -->
<p:fileUpload
id=
"uploadfile"
value=
"#{userView.image}"
mode=
"simple"
required=
"true"
requiredMessage=
"Required!"
invalidSizeMessage=
"#{i18n['user.imageTooBig']}"
sizeLimit=
"1024"
/>
<p:fileUpload
id=
"uploadfile"
required=
"TRUE"
requiredMessage=
"Required!"
invalidSizeMessage=
"#{i18n['user.imageTooBig']}"
sizeLimit=
"1024"
value=
"#{userView.image}"
mode=
"simple"
/>
<p:message
for=
"uploadfile"
/>
<p:message
for=
"uploadfile"
/>
<p:commandButton
action=
"#{userView.sendImage}"
ajax=
"false"
value=
"#{i18n['user.imagesubmit']}"
/>
<p:commandButton
action=
"#{userView.sendImage}"
ajax=
"false"
value=
"#{i18n['user.imagesubmit']}"
/>
</ui:fragment>
</ui:fragment>
...
...
code/MoyaWeb/WebContent/resources/cditools/user/newedit.xhtml
View file @
8f92fad
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<p:overlayPanel
id=
"chartPanel"
for=
"webcamButton"
hideEffect=
"fade"
>
<p:overlayPanel
id=
"chartPanel"
for=
"webcamButton"
hideEffect=
"fade"
>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
pc
.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
PF('pc')
.capture()"
/>
</p:overlayPanel>
</p:overlayPanel>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
<h:outputText
rendered=
"#{empty userView.user.currentImage}"
value=
"#{i18n['user.noCurrentImage']}"
/>
...
...
code/MoyaWeb/WebContent/resources/templates/template1/template.xhtml
View file @
8f92fad
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<!DOCTYPE html>
<html
class=
"no-js"
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
>
<html
class=
"no-js"
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
>
<f:view
contentType=
"text/html"
locale=
"#{sessionHandler.locale}"
>
<f:view
contentType=
"text/html"
locale=
"#{sessionHandler.locale}"
>
...
@@ -111,16 +112,17 @@
...
@@ -111,16 +112,17 @@
</div>
</div>
<br
/>
<br
/>
<div
class=
"ui-widget-header"
>
Select Mode
</div>
<ui:fragment
rendered=
"#{menuView.renderTopmenuChanger}"
>
<div
class=
"ui-widget-content"
style=
"text-align: center"
>
<div
class=
"ui-widget-header"
>
Select Mode: #{menuView.renderTopmenuChanger}
</div>
<h:form
render=
"#{menuview.viewChangeTopmenu.size() gt 1}"
>
<div
class=
"ui-widget-content"
style=
"text-align: center"
>
<h:form>
<p:selectOneMenu
value=
"#{menuView.menuChange}"
>
<p:selectOneMenu
value=
"#{menuView.menuChange}"
>
<p:ajax
listener=
"#{menuView.menuChangeEvent}"
/>
<p:ajax
listener=
"#{menuView.menuChangeEvent}"
/>
<f:selectItems
var=
"menuitem"
value=
"#{menuView.viewChangeTopmenu}"
itemLabel=
"#{i18n[menuitem.navigation.key]}"
itemValue=
"#{menuitem.outcome}"
/>
<f:selectItems
var=
"menuitem"
value=
"#{menuView.viewChangeTopmenu}"
itemLabel=
"#{i18n[menuitem.navigation.key]}"
itemValue=
"#{menuitem.outcome}"
/>
</p:selectOneMenu>
</p:selectOneMenu>
</h:form>
</h:form>
</div>
</div>
</ui:fragment>
</div>
</div>
</aside>
</aside>
</section>
</section>
...
...
code/MoyaWeb/WebContent/user/sendPicture.xhtml
View file @
8f92fad
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
id=
"webcamcontainer"
style=
"display: none;"
>
<div
id=
"webcamcontainer"
style=
"display: none;"
>
<h:form>
<h:form>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
pc
.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
PF('pc')
.capture()"
/>
</h:form>
</h:form>
</div>
</div>
...
...
code/MoyaWeb/WebContent/useradmin/list.xhtml
View file @
8f92fad
...
@@ -42,17 +42,17 @@
...
@@ -42,17 +42,17 @@
<h:selectBooleanCheckbox
id=
"onlythisevent"
value=
"#{userSearchView.searchQuery.onlyThisEvent}"
/>
<h:selectBooleanCheckbox
id=
"onlythisevent"
value=
"#{userSearchView.searchQuery.onlyThisEvent}"
/>
<h:outputLabel
for=
"onlythisevent"
value=
"#{i18n['userlist.onlythisevent']}"
/>
<h:outputLabel
for=
"onlythisevent"
value=
"#{i18n['userlist.onlythisevent']}"
/>
<br
/>
<br
/>
<h:selectBooleanCheckbox
id=
"userswithunusedcodes"
value=
"#{userSearchView.searchQuery.usersWithUnusedCodes}"
/>
<h:selectBooleanCheckbox
id=
"userswithunusedcodes"
value=
"#{userSearchView.searchQuery.usersWithUnusedCodes}"
/>
<h:outputLabel
for=
"userswithunusedcodes"
value=
"#{i18n['userlist.usersWithUnusedCodes']}"
/>
<h:outputLabel
for=
"userswithunusedcodes"
value=
"#{i18n['userlist.usersWithUnusedCodes']}"
/>
<br
/>
<br
/>
<h:inputText
value=
"#{userSearchView.search}"
/>
<h:inputText
value=
"#{userSearchView.search}"
/>
<h:commandButton
value=
"#{i18n['userlist.search']}"
action=
"#{userSearchView.newSearch()}"
/>
<h:commandButton
value=
"#{i18n['userlist.search']}"
action=
"#{userSearchView.newSearch()}"
/>
</h:panelGroup>
</h:panelGroup>
<h:panelGroup>
<h:panelGroup>
<a
style=
"display: #{((userCartView.isEmpty())?'block':'none')}
;
"
onclick=
"$('#usercart').show(); $(this).hide();"
><h:outputText
value=
"#{i18n['usercart.showCart']}"
/></a>
<a
style=
"display: #{((userCartView.isEmpty())?'block':'none')}"
onclick=
"$('#usercart').show(); $(this).hide();"
><h:outputText
value=
"#{i18n['usercart.showCart']}"
/></a>
<div
id=
"usercart"
style=
"display: #{((userCartView.isEmpty())?'none':'block')}
;
"
>
<div
id=
"usercart"
style=
"display: #{((userCartView.isEmpty())?'none':'block')}"
>
<h:outputText
value=
"#{i18n['usercart.cartsize']}"
/>
<h:outputText
value=
"#{i18n['usercart.cartsize']}"
/>
<h:outputText
value=
" #{userCartView.userCartSize}"
/>
<h:outputText
value=
" #{userCartView.userCartSize}"
/>
<h:commandButton
action=
"#{userCartView.clearCart()}"
value=
"#{i18n['usercart.clear']}"
/>
<h:commandButton
action=
"#{userCartView.clearCart()}"
value=
"#{i18n['usercart.clear']}"
/>
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</div>
</div>
</h:panelGroup>
</h:panelGroup>
</h:panelGrid>
</h:panelGrid>
<h:outputText
value=
"#{i18n['userlist.searchcount']}"
/>
:
<h:outputText
value=
"#{userSearchView.resultcount}"
/>
<h:outputText
value=
"#{i18n['userlist.searchcount']}"
/>
:
<h:outputText
value=
"#{userSearchView.resultcount}"
/>
</h:form>
</h:form>
<p>
<p>
<users:list
rendered=
"#{!userSearchView.searchQuery.onlyThisEvent}"
/>
<users:list
rendered=
"#{!userSearchView.searchQuery.onlyThisEvent}"
/>
...
...
code/MoyaWeb/WebContent/useradmin/overview.xhtml
View file @
8f92fad
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
<p:inputTextarea
/>
<p:inputTextarea
/>
<br
/>
<br
/>
<p:commandButton
oncomplete=
"
dialog
.hide()"
actionListener=
"#{userOverviewView.rejectCard()}"
value=
"Apply"
/>
<p:commandButton
oncomplete=
"
PF('dialog')
.hide()"
actionListener=
"#{userOverviewView.rejectCard()}"
value=
"Apply"
/>
<p:commandButton
onclick=
"
dialog
.hide()"
type=
"button"
value=
"Cancel"
/>
<p:commandButton
onclick=
"
PF('dialog')
.hide()"
type=
"button"
value=
"Cancel"
/>
</p:dialog>
</p:dialog>
<h:form
id=
"form"
>
<h:form
id=
"form"
>
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<!-- <f:ajax execute="uov-items" render="@all"></f:ajax> -->
<!-- <f:ajax execute="uov-items" render="@all"></f:ajax> -->
</p:commandButton>
</p:commandButton>
<p:commandButton
id=
"Reject"
value=
"Reject"
onclick=
"
dialog
.show();"
type=
"button"
/>
<p:commandButton
id=
"Reject"
value=
"Reject"
onclick=
"
PF('dialog')
.show();"
type=
"button"
/>
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
</h:form>
</h:form>
...
...
code/MoyaWeb/WebContent/useradmin/showTakePicture.xhtml
View file @
8f92fad
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<h:form>
<h:form>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:photoCam
widgetVar=
"pc"
listener=
"#{userView.oncapture}"
update=
"@all"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
pc
.capture()"
/>
<p:commandButton
type=
"button"
value=
"Capture"
onclick=
"
PF('pc')
.capture()"
/>
</h:form>
</h:form>
...
...
code/MoyaWeb/pom.xml
View file @
8f92fad
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</plugin>
</plugin>
<plugin>
<plugin>
<artifactId>
maven-war-plugin
</artifactId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.
3
</version>
<version>
2.
4
</version>
<configuration>
<configuration>
<warSourceDirectory>
WebContent
</warSourceDirectory>
<warSourceDirectory>
WebContent
</warSourceDirectory>
<failOnMissingWebXml>
false
</failOnMissingWebXml>
<failOnMissingWebXml>
false
</failOnMissingWebXml>
...
@@ -56,12 +56,7 @@
...
@@ -56,12 +56,7 @@
<dependency>
<dependency>
<groupId>
org.primefaces
</groupId>
<groupId>
org.primefaces
</groupId>
<artifactId>
primefaces
</artifactId>
<artifactId>
primefaces
</artifactId>
<version>
3.5
</version>
<version>
4.0-20130828.122054-5
</version>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<version>
1.3
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.sshd
</groupId>
<groupId>
org.apache.sshd
</groupId>
...
@@ -78,5 +73,15 @@
...
@@ -78,5 +73,15 @@
<artifactId>
javamelody-core
</artifactId>
<artifactId>
javamelody-core
</artifactId>
<version>
1.46.0
</version>
<version>
1.46.0
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
1.7.5
</version>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<version>
1.3
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
code/MoyaWeb/src/ValidationMessages_en.properties
View file @
8f92fad
user.nickSizeMessage
=
Nick has to be at least {min} characters long.
user.emailregex
=
Field must contain an email address.
javax.validation.constraints.NotNull.message
=
Field can not be empty
actionlog.message.tooshort
=
Message is too short!
voting.create.participantsError
=
Value must be 1 or over.
voting.create.nameError
=
Name must be longer than 3 chars.
javax.validation.constraints.NotEmpty.message
=
Field cannot be empty
javax.validation.constraints.NotNull.message
=
Field can not be empty
user.emailregex
=
Field must contain an email address.
user.nickSizeMessage
=
Nick has to be at least {min} characters long.
voting.create.nameError
=
Name must be longer than 3 chars.
voting.create.participantsError
=
Value must be 1 or over.
code/MoyaWeb/src/fi/codecrew/moya/handler/SessionHandler.java
View file @
8f92fad
...
@@ -50,6 +50,7 @@ public class SessionHandler {
...
@@ -50,6 +50,7 @@ public class SessionHandler {
public
TimeZone
getTimezone
()
{
public
TimeZone
getTimezone
()
{
return
TimeZone
.
getTimeZone
(
"Europe/Helsinki"
);
return
TimeZone
.
getTimeZone
(
"Europe/Helsinki"
);
}
}
public
String
getLocale
()
{
public
String
getLocale
()
{
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
View file @
8f92fad
...
@@ -16,6 +16,14 @@ actionlog.tasklist.header = Tasklist
...
@@ -16,6 +16,14 @@ actionlog.tasklist.header = Tasklist
actionlog.time
=
Time
actionlog.time
=
Time
actionlog.user
=
User
actionlog.user
=
User
adduser.newphoto
=
Take new photo
adduser.newuser
=
Create new user
adduser.takePhoto
=
Take photo
adduser.tostart
=
Back to start
adduser.update
=
Update profile picture
adduser.welcome
=
Welcome
adduser.welcometext
=
Here you can add new user or update your current user profile image. Please select desired action below.
bill.billAmount
=
Amount
bill.billAmount
=
Amount
bill.billNumber
=
Number
bill.billNumber
=
Number
bill.cancel
=
Cancel bill
bill.cancel
=
Cancel bill
...
@@ -24,60 +32,75 @@ bill.isExpired = Bill is expired
...
@@ -24,60 +32,75 @@ bill.isExpired = Bill is expired
bill.markPaid.show
=
Show Mark paid -buttons
bill.markPaid.show
=
Show Mark paid -buttons
bill.save
=
Save
bill.save
=
Save
bortalApplication.BILL
=
Creating, and managing bills
bortalApplication.BILL
=
Creating, and managing bills
bortalApplication.COMPO
=
Managing compos
bortalApplication.COMPO
=
Managing compos
bortalApplication.CONTENT
=
Product & shop management
bortalApplication.CONTENT
=
Product & shop management
bortalApplication.LAYOUT
=
Laout management
bortalApplication.EVENT
=
Event permissions
bortalApplication.MAP
=
Map management
bortalApplication.LAYOUT
=
Laout management
bortalApplication.POLL
=
Polling stuff
bortalApplication.LICENSE
=
License stuff
bortalApplication.SALESPOINT
=
Managing salespoint
bortalApplication.MAP
=
Map management
bortalApplication.SHOP
=
Product % shop management
bortalApplication.POLL
=
Polling stuff
bortalApplication.TERMINAL
=
Sales and self help terminal roles
bortalApplication.SALESPOINT
=
Managing salespoint
bortalApplication.USER
=
User management related
bortalApplication.SHOP
=
Product % shop management
bortalApplication.bill.CREATE_BILL
=
Create bills for self
bortalApplication.TERMINAL
=
Sales and self help terminal roles
bortalApplication.bill.READ_ALL
=
"Read all bills"
bortalApplication.USER
=
User management related
bortalApplication.bill.VIEW_OWN
=
View own bills
bortalApplication.bill.CREATE_BILL
=
Create bills for self
bortalApplication.bill.WRITE_ALL
=
Modify all bills
bortalApplication.bill.CREATE_VERKKOMAKSU
=
Can create web payment to self
bortalApplication.compo.MANAGE
=
Manage compos
bortalApplication.bill.READ_ALL
=
"Read all bills"
bortalApplication.compo.SUBMIT_ENTRY
=
Submit entry
bortalApplication.bill.VIEW_OWN
=
View own bills
bortalApplication.compo.VIEW_COMPOS
=
View compos
bortalApplication.bill.WRITE_ALL
=
Modify all bills
bortalApplication.compo.VOTE
=
Vote
bortalApplication.compo.MANAGE
=
Manage compos
bortalApplication.content.MANAGE_ACTIONLOG
=
Manage actionlog
bortalApplication.compo.SUBMIT_ENTRY
=
Submit entry
bortalApplication.content.MANAGE_MENU
=
Manage menus
bortalApplication.compo.VIEW_COMPOS
=
View compos
bortalApplication.content.MANAGE_NEWS
=
Manage newsgroups
bortalApplication.compo.VOTE
=
Vote
bortalApplication.content.MANAGE_PAGES
=
Manage pages
bortalApplication.content.MANAGE_ACTIONLOG
=
Manage actionlog
bortalApplication.map.BUY_PLACES
=
Reserve and buy places from map
bortalApplication.content.MANAGE_MENU
=
Manage menus
bortalApplication.map.MANAGE_MAPS
=
Create and modify maps
bortalApplication.content.MANAGE_NEWS
=
Manage newsgroups
bortalApplication.map.MANAGE_OTHERS
=
Manage other users reservations in map
bortalApplication.content.MANAGE_PAGES
=
Manage pages
bortalApplication.map.VIEW
=
View maps
bortalApplication.event.MANAGE_PRIVATE_PROPERTIES
=
Can manage event private properties
bortalApplication.poll.ANSWER
=
Can answer and view availabe polls
bortalApplication.event.MANAGE_PROPERTIES
=
Can manage event properties
bortalApplication.poll.CREATE
=
Create and manage polls
bortalApplication.license.MANAGE
=
Can manage licenses
bortalApplication.poll.VIEW_RESULTS
=
View anonymized poll results
bortalApplication.license.VIEW_OWN_CODES
=
Can view own licenses
bortalApplication.salespoint.MODIFY
=
Modify salespoints
bortalApplication.map.BUY_PLACES
=
Reserve and buy places from map
bortalApplication.salespoint.VIEW
=
View salespoints
bortalApplication.map.MANAGE_MAPS
=
Create and modify maps
bortalApplication.shop.LIST_ALL_PRODUCTS
=
List all products in shop
bortalApplication.map.MANAGE_OTHERS
=
Manage other users reservations in map
bortalApplication.shop.LIST_USERPRODUCTS
=
List products for users in shop
bortalApplication.map.RELEASE_PLACE
=
Can release place
bortalApplication.shop.MANAGE_PRODUCTS
=
Create and modify products
bortalApplication.map.VIEW
=
View maps
bortalApplication.shop.SHOP_PRODUCTS
=
Shop products to self
bortalApplication.poll.ANSWER
=
Can answer and view availabe polls
bortalApplication.shop.SHOP_TO_OTHERS
=
Shop to other users
bortalApplication.poll.CREATE
=
Create and manage polls
bortalApplication.terminal.CASHIER
=
Access cashier terminal functions
bortalApplication.poll.VIEW_RESULTS
=
View anonymized poll results
bortalApplication.terminal.CUSTOMER
=
Access client terminal functions
bortalApplication.salespoint.MODIFY
=
Modify salespoints
bortalApplication.terminal.SELFHELP
=
Self help terminal
bortalApplication.salespoint.VIEW
=
View salespoints
bortalApplication.user.ANYUSER
=
All users have this anyways
bortalApplication.shop.LIST_ALL_PRODUCTS
=
List all products in shop
bortalApplication.user.CREATE_NEW
=
Create new user
bortalApplication.shop.LIST_USERPRODUCTS
=
List products for users in shop
bortalApplication.user.INVITE_USERS
=
Invite users
bortalApplication.shop.MANAGE_FOODWAVES
=
Can manage food waves
bortalApplication.user.LOGIN
=
Can login
bortalApplication.shop.MANAGE_PRODUCTS
=
Create and modify products
bortalApplication.user.LOGOUT
=
Can logout
bortalApplication.shop.SHOP_FOODWAVE
=
Can shop on food wave
bortalApplication.user.MANAGE_HTTP_SESSION
=
Manage http sessions
bortalApplication.shop.SHOP_PRODUCTS
=
Shop products to self
bortalApplication.user.MODIFY
=
Modify users
bortalApplication.shop.SHOP_TO_OTHERS
=
Shop to other users
bortalApplication.user.MODIFY_ACCOUNTEVENTS
=
Modify Account events
bortalApplication.terminal.CASHIER
=
Access cashier terminal functions
bortalApplication.user.READ_ORGROLES
=
View organization roles
bortalApplication.terminal.CUSTOMER
=
Access client terminal functions
bortalApplication.user.READ_ROLES
=
View all roles.
bortalApplication.terminal.SELFHELP
=
Self help terminal
bortalApplication.user.VIEW_ACCOUNTEVENTS
=
Show other users account events
bortalApplication.user
=
User permissions
bortalApplication.user.VIEW_ALL
=
View all users
bortalApplication.user.ANYUSER
=
All users have this anyways
bortalApplication.user.VIEW_SELF
=
Can view self
bortalApplication.user.CREATE_NEW
=
Create new user
bortalApplication.user.WRITE_ORGROLES
=
Modify organization roles
bortalApplication.user.INVITE_USERS
=
Invite users
bortalApplication.user.WRITE_ROLES
=
Modify roles
bortalApplication.user.LOGGED_IN_USER
=
Logged in user
bortalApplication.user.LOGIN
=
Can login
bortalApplication.user.LOGOUT
=
Can logout
bortalApplication.user.MANAGE_HTTP_SESSION
=
Manage http sessions
bortalApplication.user.MODIFY
=
Modify users
bortalApplication.user.MODIFY_ACCOUNTEVENTS
=
Modify Account events
bortalApplication.user.READ_ORGROLES
=
View organization roles
bortalApplication.user.READ_ROLES
=
View all roles.
bortalApplication.user.VIEW_ACCOUNTEVENTS
=
Show other users account events
bortalApplication.user.VIEW_ALL
=
View all users
bortalApplication.user.VIEW_SELF
=
Can view self
bortalApplication.user.VITUTTAAKO
=
Can send feedback
bortalApplication.user.WRITE_ORGROLES
=
Modify organization roles
bortalApplication.user.WRITE_ROLES
=
Modify roles
card.massprint.title
=
Print all
cardTemplate.emptyCardTemplate
=
----
cardTemplate.emptyCardTemplate
=
----
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
8f92fad
...
@@ -50,43 +50,45 @@ applicationPermission.name = Rightsgroup
...
@@ -50,43 +50,45 @@ applicationPermission.name = Rightsgroup
barcodeReader.readBarcode
=
Read barcode
barcodeReader.readBarcode
=
Read barcode
bill.addr1
=
Address 1
bill.addr1
=
Address 1
bill.addr2
=
Address 2
bill.addr2
=
Address 2
bill.addr3
=
Address 3
bill.addr3
=
Address 3
bill.addr4
=
Address 4
bill.addr4
=
Address 4
bill.addr5
=
Address 5
bill.addr5
=
Address 5
bill.address
=
Payers address
bill.address
=
Payers address
bill.billAmount
=
Bill amount
bill.billAmount
=
Bill amount
bill.billIsPaid
=
Bill is paid
bill.billIsPaid
=
Bill is paid
bill.billLines
=
Products
bill.billLines
=
Products
bill.billNumber
=
Number
bill.billMarkedPaidMail.message
=
Your deposit number {0} has been marked as paid.
bill.billPaidDate
=
Paid date
bill.billMarkedPaidMail.subject
=
Bill marked paid
bill.cancel
=
Cancel bill
bill.billNumber
=
Number
bill.deliveryTerms
=
Delivery terms
bill.billPaidDate
=
Paid date
bill.edit
=
edit
bill.cancel
=
Cancel bill
bill.expires
=
Expires
bill.deliveryTerms
=
Delivery terms
bill.isExpired
=
Bill is expired
bill.edit
=
edit
bill.isPaid
=
Paid
bill.expires
=
Expires
bill.markPaid
=
Mark paid
bill.isExpired
=
Bill is expired
bill.markPaid.show
=
Show Mark paid -buttons
bill.isPaid
=
Paid
bill.markedPaid
=
Bill marked paid
bill.markPaid
=
Mark paid
bill.notes
=
Notes
bill.markPaid.show
=
Show Mark paid -buttons
bill.noticetime
=
Notice time
bill.markedPaid
=
Bill marked paid
bill.ourReference
=
Our reference
bill.notes
=
Notes
bill.paidDate
=
Paid date
bill.noticetime
=
Notice time
bill.payer
=
Payer
bill.ourReference
=
Our reference
bill.paymentTime
=
Payment time
bill.paidDate
=
Paid date
bill.paymentTime.now
=
Now
bill.payer
=
Payer
bill.printBill
=
Print bill
bill.paymentTime
=
Payment time
bill.receiverAddress
=
Receiver address
bill.paymentTime.now
=
Now
bill.referenceNumberBase
=
Reference number base
bill.printBill
=
Print bill
bill.referencenumber
=
Reference nr.
bill.receiverAddress
=
Receiver address
bill.save
=
Save
bill.referenceNumberBase
=
Reference number base
bill.sentDate
=
Sent date
bill.referencenumber
=
Reference nr.
bill.show
=
Show
bill.save
=
Save
bill.theirReference
=
Clients reference
bill.sentDate
=
Sent date
bill.totalPrice
=
Total
bill.show
=
Show
bill.totalprice
=
Total
bill.theirReference
=
Clients reference
bill.totalPrice
=
Total
bill.totalprice
=
Total
billLine.eventuser
=
Customer
billLine.eventuser
=
Customer
billLine.nick
=
Nick
billLine.nick
=
Nick
...
@@ -108,6 +110,74 @@ billine.vat = VAT
...
@@ -108,6 +110,74 @@ billine.vat = VAT
bills.noBills
=
No bills
bills.noBills
=
No bills
bortalApplication.BILL
=
Creating, and managing bills
bortalApplication.COMPO
=
Managing compos
bortalApplication.CONTENT
=
Product & shop management
bortalApplication.EVENT
=
Event permissions
bortalApplication.LAYOUT
=
Laout management
bortalApplication.LICENSE
=
License stuff
bortalApplication.MAP
=
Map management
bortalApplication.POLL
=
Polling stuff
bortalApplication.SALESPOINT
=
Managing salespoint
bortalApplication.SHOP
=
Product and shop management
bortalApplication.TERMINAL
=
Sales and self help terminal roles
bortalApplication.USER
=
User management related
bortalApplication.bill.CREATE_BILL
=
Create bills for self
bortalApplication.bill.CREATE_VERKKOMAKSU
=
Can create web payment to self
bortalApplication.bill.READ_ALL
=
Read all bills
bortalApplication.bill.VIEW_OWN
=
View own bills
bortalApplication.bill.WRITE_ALL
=
Modify all bills
bortalApplication.compo.MANAGE
=
Manage compos
bortalApplication.compo.SUBMIT_ENTRY
=
Submit compo entry
bortalApplication.compo.VIEW_COMPOS
=
View compos
bortalApplication.compo.VOTE
=
Vote on compos
bortalApplication.content.MANAGE_ACTIONLOG
=
Manage actionlog
bortalApplication.content.MANAGE_MENU
=
Manage menus
bortalApplication.content.MANAGE_NEWS
=
Manage newsgroups
bortalApplication.content.MANAGE_PAGES
=
Manage pages
bortalApplication.event.MANAGE_PRIVATE_PROPERTIES
=
Can manage event private properties
bortalApplication.event.MANAGE_PROPERTIES
=
Can manage event properties
bortalApplication.license.MANAGE
=
Can manage licenses
bortalApplication.license.VIEW_OWN_CODES
=
Can view own licenses
bortalApplication.map.BUY_PLACES
=
Reserve and buy places from map
bortalApplication.map.MANAGE_MAPS
=
Create and modify maps
bortalApplication.map.MANAGE_OTHERS
=
Manage other users reservations in map
bortalApplication.map.RELEASE_PLACE
=
Can release place
bortalApplication.map.VIEW
=
View maps
bortalApplication.poll.ANSWER
=
Can answer and view availabe polls
bortalApplication.poll.CREATE
=
Create and manage polls
bortalApplication.poll.VIEW_RESULTS
=
View anonymized poll results
bortalApplication.salespoint.MODIFY
=
Modify salespoints
bortalApplication.salespoint.VIEW
=
View salespoints
bortalApplication.shop.LIST_ALL_PRODUCTS
=
List all products in shop
bortalApplication.shop.LIST_USERPRODUCTS
=
List products for users in shop
bortalApplication.shop.MANAGE_FOODWAVES
=
Can manage food waves
bortalApplication.shop.MANAGE_PRODUCTS
=
Create and modify products
bortalApplication.shop.SHOP_FOODWAVE
=
Can shop on food wave
bortalApplication.shop.SHOP_PRODUCTS
=
Shop products to self
bortalApplication.shop.SHOP_TO_OTHERS
=
Shop to other users
bortalApplication.terminal.CASHIER
=
Access cashier terminal functions
bortalApplication.terminal.CUSTOMER
=
Access client terminal functions
bortalApplication.terminal.SELFHELP
=
Self help terminal
bortalApplication.user
=
User permissions
bortalApplication.user.ANYUSER
=
All users have this anyways
bortalApplication.user.CREATE_NEW
=
Create new user
bortalApplication.user.INVITE_USERS
=
Invite users
bortalApplication.user.LOGGED_IN_USER
=
Logged in user
bortalApplication.user.LOGIN
=
Can login
bortalApplication.user.LOGOUT
=
Can logout
bortalApplication.user.MANAGE_HTTP_SESSION
=
Manage http sessions
bortalApplication.user.MODIFY
=
Modify users
bortalApplication.user.MODIFY_ACCOUNTEVENTS
=
Modify Account events
bortalApplication.user.READ_ORGROLES
=
View organization roles
bortalApplication.user.READ_ROLES
=
View all roles.
bortalApplication.user.VIEW_ACCOUNTEVENTS
=
Show other users account events
bortalApplication.user.VIEW_ALL
=
View all users
bortalApplication.user.VIEW_SELF
=
Can view self
bortalApplication.user.VITUTTAAKO
=
Can send feedback
bortalApplication.user.WRITE_ORGROLES
=
Modify organization roles
bortalApplication.user.WRITE_ROLES
=
Modify roles
card.massprint.title
=
Print all
card.massprint.title
=
Print all
cardTemplate.create
=
Create
cardTemplate.create
=
Create
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
8f92fad
...
@@ -98,6 +98,8 @@ billLine.product = Tuote
...
@@ -98,6 +98,8 @@ billLine.product = Tuote
billLine.quantity
=
M
\u
00E4
\u
00E4r
\u
00E4
billLine.quantity
=
M
\u
00E4
\u
00E4r
\u
00E4
billLine.time
=
Tilausaika
billLine.time
=
Tilausaika
billedit.billnotfound
=
Laskua ei l
\u
00F6ytynyt. Ole hyv
\u
00E4 ja valitse uudelleen.
billine.linePrice
=
Yhteens
\u
00E4
billine.linePrice
=
Yhteens
\u
00E4
billine.name
=
Tuote
billine.name
=
Tuote
billine.quantity
=
Lukum
\u
00E4
\u
00E4r
\u
00E4
billine.quantity
=
Lukum
\u
00E4
\u
00E4r
\u
00E4
...
@@ -109,6 +111,74 @@ billine.vat = ALV
...
@@ -109,6 +111,74 @@ billine.vat = ALV
bills.noBills
=
Ei laskuja
bills.noBills
=
Ei laskuja
bortalApplication.BILL
=
Laskujen oikeudet
bortalApplication.COMPO
=
Compojen oikeudet
bortalApplication.CONTENT
=
Sis
\u
00E4lt
\u
00F6jen hallitaoikeudet
bortalApplication.EVENT
=
Tapahtuman oikeudet
bortalApplication.LAYOUT
=
N
\u
00E4kymien hallinta
bortalApplication.LICENSE
=
Lisenssioikeudet
bortalApplication.MAP
=
Karttojen oikeudet
bortalApplication.POLL
=
Kyselyiden oikeudet
bortalApplication.SALESPOINT
=
Myyntipisteiden oikeudet
bortalApplication.SHOP
=
Kaupan oikeudet
bortalApplication.TERMINAL
=
K
\u
00E4ytt
\u
00F6p
\u
00E4
\u
00E4tteiden roolit
bortalApplication.USER
=
K
\u
00E4ytt
\u
00E4j
\u
00E4oikeudet
bortalApplication.bill.CREATE_BILL
=
Voi luoda laskuja itselle
bortalApplication.bill.CREATE_VERKKOMAKSU
=
Voi luoda verkkomaksun itselleen
bortalApplication.bill.READ_ALL
=
Saa lukea kaikkia laskuja
bortalApplication.bill.VIEW_OWN
=
Voi katsoa omia laskuja
bortalApplication.bill.WRITE_ALL
=
Saa muokata kaikkia laskuja
bortalApplication.compo.MANAGE
=
Saa hallita compoja
bortalApplication.compo.SUBMIT_ENTRY
=
Saa lis
\u
00E4t
\u
00E4 entryn compoon
bortalApplication.compo.VIEW_COMPOS
=
Saa katsoa compoja
bortalApplication.compo.VOTE
=
Voi
\u
00E4
\u
00E4nest
\u
00E4
\u
00E4 compoissa
bortalApplication.content.MANAGE_ACTIONLOG
=
Saa hallita tapahtumalogia
bortalApplication.content.MANAGE_MENU
=
Saa hallinnoida valikoita
bortalApplication.content.MANAGE_NEWS
=
Saa hallinnoida uutisia
bortalApplication.content.MANAGE_PAGES
=
Saa hallinnoida sivuja
bortalApplication.event.MANAGE_PRIVATE_PROPERTIES
=
Saa hallita tapahtuman yksityisi
\u
00E4 asetuksia
bortalApplication.event.MANAGE_PROPERTIES
=
Saa hallita tapahtuman asetuksia
bortalApplication.license.MANAGE
=
Saa hallinnoida lisenssej
\u
00E4
bortalApplication.license.VIEW_OWN_CODES
=
Voi katsella omia lisenssej
\u
00E4
bortalApplication.map.BUY_PLACES
=
Voi varata ja ostaa konepaikkoja kartalta
bortalApplication.map.MANAGE_MAPS
=
Saa luoda ja muokata karttoja
bortalApplication.map.MANAGE_OTHERS
=
Saa hallita muiden k
\u
00E4ytt
\u
00E4jien varauksia kartalla
bortalApplication.map.RELEASE_PLACE
=
Voi vapauttaa paikan
bortalApplication.map.VIEW
=
Saa n
\u
00E4hd
\u
00E4 kartat
bortalApplication.poll.ANSWER
=
Voi vastata avoimiin kyselyihin
bortalApplication.poll.CREATE
=
Saa luoda ja hallita kyselyit
\u
00E4
bortalApplication.poll.VIEW_RESULTS
=
Saa n
\u
00E4hd
\u
00E4 nimett
\u
00F6mien kyselyiden vastaukset
bortalApplication.salespoint.MODIFY
=
Saa muokata myyntipisteit
\u
00E4
bortalApplication.salespoint.VIEW
=
Saa n
\u
00E4hd
\u
00E4 myyntipisteet
bortalApplication.shop.LIST_ALL_PRODUCTS
=
Saa listata kaikki kaupan tuotteet
bortalApplication.shop.LIST_USERPRODUCTS
=
Voi listata kaikki k
\u
00E4ytt
\u
00E4jille tarkoitetut tuotteet kaupassa
bortalApplication.shop.MANAGE_FOODWAVES
=
Saa hallita ruokatilauksia
bortalApplication.shop.MANAGE_PRODUCTS
=
Saa luoda ja muokata tuotteita
bortalApplication.shop.SHOP_FOODWAVE
=
Voi ostaa ruokatilauksessa
bortalApplication.shop.SHOP_PRODUCTS
=
Voi ostaa tuotteita itselle
bortalApplication.shop.SHOP_TO_OTHERS
=
Saa ostaa tuotteita muille
bortalApplication.terminal.CASHIER
=
Muokata rahastusp
\u
00E4
\u
00E4tteiden toimintoja
bortalApplication.terminal.CUSTOMER
=
Muokata k
\u
00E4vij
\u
00E4p
\u
00E4
\u
00E4tteiden toimintoja
bortalApplication.terminal.SELFHELP
=
Itsepalvelup
\u
00E4
\u
00E4te
bortalApplication.user
=
K
\u
00E4ytt
\u
00E4j
\u
00E4oikeudet
bortalApplication.user.ANYUSER
=
AINA kaikilla k
\u
00E4ytt
\u
00E4jill
\u
00E4
bortalApplication.user.CREATE_NEW
=
Voi luoda uuden k
\u
00E4ytt
\u
00E4j
\u
00E4n
bortalApplication.user.INVITE_USERS
=
Voi kutsua k
\u
00E4ytt
\u
00E4j
\u
00E4ksi
bortalApplication.user.LOGGED_IN_USER
=
Kirjautunut k
\u
00E4ytt
\u
00E4j
\u
00E4
bortalApplication.user.LOGIN
=
Voi kirjautua
bortalApplication.user.LOGOUT
=
Voi uloskirjautua
bortalApplication.user.MANAGE_HTTP_SESSION
=
Saa hallita http istuntoja
bortalApplication.user.MODIFY
=
Saa muokata k
\u
00E4ytt
\u
00E4ji
\u
00E4
bortalApplication.user.MODIFY_ACCOUNTEVENTS
=
Saa muokata k
\u
00E4ytt
\u
00E4j
\u
00E4tapahtumia
bortalApplication.user.READ_ORGROLES
=
Saa n
\u
00E4hd
\u
00E4 j
\u
00E4rjest
\u
00E4j
\u
00E4roolit
bortalApplication.user.READ_ROLES
=
Saa n
\u
00E4hd
\u
00E4 kaikki roolit
bortalApplication.user.VIEW_ACCOUNTEVENTS
=
Saa n
\u
00E4hd
\u
00E4 muiden k
\u
00E4ytt
\u
00E4jien tapahtumat
bortalApplication.user.VIEW_ALL
=
Saa n
\u
00E4hd
\u
00E4 kaikki k
\u
00E4ytt
\u
00E4j
\u
00E4t
bortalApplication.user.VIEW_SELF
=
Voi katsella omaa tunnusta
bortalApplication.user.VITUTTAAKO
=
Saa avautua
bortalApplication.user.WRITE_ORGROLES
=
Saa muokata organisaation rooleja
bortalApplication.user.WRITE_ROLES
=
Saa muokata rooleja
card.massprint.title
=
Tulosta kaikki
card.massprint.title
=
Tulosta kaikki
cardTemplate.create
=
Luo
cardTemplate.create
=
Luo
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/menu/MenuView.java
View file @
8f92fad
...
@@ -18,7 +18,6 @@ import org.slf4j.LoggerFactory;
...
@@ -18,7 +18,6 @@ import org.slf4j.LoggerFactory;
import
fi.codecrew.moya.beans.MenuBeanLocal
;
import
fi.codecrew.moya.beans.MenuBeanLocal
;
import
fi.codecrew.moya.beans.SitePageBeanLocal
;
import
fi.codecrew.moya.beans.SitePageBeanLocal
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.model.MenuNavigation
;
import
fi.codecrew.moya.model.MenuNavigation
;
import
fi.codecrew.moya.model.PageContent
;
import
fi.codecrew.moya.model.PageContent
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
...
@@ -52,7 +51,6 @@ public class MenuView extends GenericCDIView {
...
@@ -52,7 +51,6 @@ public class MenuView extends GenericCDIView {
private
String
menuChange
;
private
String
menuChange
;
@SuppressWarnings
(
"unused"
)
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MenuView
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MenuView
.
class
);
public
List
<
PageContent
>
getPagecontent
(
String
pagekey
)
public
List
<
PageContent
>
getPagecontent
(
String
pagekey
)
...
@@ -90,17 +88,38 @@ public class MenuView extends GenericCDIView {
...
@@ -90,17 +88,38 @@ public class MenuView extends GenericCDIView {
// super.navihandler.forward(menuChange);
// super.navihandler.forward(menuChange);
}
}
public
boolean
isRenderTopmenuChanger
()
{
return
getViewChangeTopmenu
().
size
()
>
1
;
}
private
List
<
JsfMenuitem
>
viewchangeTopmenu
;
private
List
<
JsfMenuitem
>
viewchangeTopmenu
;
public
List
<
JsfMenuitem
>
getViewChangeTopmenu
()
public
List
<
JsfMenuitem
>
getViewChangeTopmenu
()
{
{
if
(
viewchangeTopmenu
==
null
)
{
if
(
viewchangeTopmenu
==
null
)
{
viewchangeTopmenu
=
new
ArrayList
<
JsfMenuitem
>();
viewchangeTopmenu
=
new
ArrayList
<
JsfMenuitem
>();
viewchangeTopmenu
.
add
(
new
JsfMenuitem
(
"topmenu.user"
,
"/index"
));
if
(
super
.
hasPermission
(
UserPermission
.
VIEW_ALL
))
{
for
(
MenuNavigation
topmenu
:
menubean
.
getTopmenus
())
{
viewchangeTopmenu
.
add
(
new
JsfMenuitem
(
"topmenu.helpdesk"
,
"/admin/info/index"
));
viewchangeTopmenu
.
add
(
new
JsfMenuitem
(
"topmenu.admin"
,
"/useradmin/list"
));
String
out
=
null
;
if
(
topmenu
.
getItem
()
!=
null
)
{
out
=
topmenu
.
getItem
().
getUrl
();
}
if
(
out
==
null
)
{
out
=
getOutcome
(
topmenu
);
}
if
(
out
!=
null
)
{
logger
.
info
(
"Adding topmenu {}"
,
out
);
viewchangeTopmenu
.
add
(
new
JsfMenuitem
(
topmenu
.
getKey
(),
out
));
}
}
}
// viewchangeTopmenu.add(new JsfMenuitem("topmenu.user", "/index"));
// if (super.hasPermission(UserPermission.VIEW_ALL)) {
// viewchangeTopmenu.add(new JsfMenuitem("topmenu.helpdesk", "/admin/info/index"));
// viewchangeTopmenu.add(new JsfMenuitem("topmenu.admin", "/useradmin/list"));
// }
}
}
return
viewchangeTopmenu
;
return
viewchangeTopmenu
;
...
@@ -170,6 +189,7 @@ public class MenuView extends GenericCDIView {
...
@@ -170,6 +189,7 @@ public class MenuView extends GenericCDIView {
private
String
getOutcome
(
MenuNavigation
navi
)
{
private
String
getOutcome
(
MenuNavigation
navi
)
{
String
ret
=
null
;
String
ret
=
null
;
// try to get the outcome from the first child we have permission to.
// try to get the outcome from the first child we have permission to.
for
(
MenuNavigation
child
:
navi
.
getChildren
())
for
(
MenuNavigation
child
:
navi
.
getChildren
())
{
{
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/menu/PrimeMenuView.java
View file @
8f92fad
...
@@ -7,16 +7,16 @@ import javax.enterprise.context.RequestScoped;
...
@@ -7,16 +7,16 @@ import javax.enterprise.context.RequestScoped;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
import
javax.inject.Named
;
import
org.primefaces.component.menuitem.MenuItem
;
import
org.primefaces.model.menu.DefaultMenuItem
;
import
org.primefaces.component.separator.Separator
;
import
org.primefaces.model.menu.DefaultMenuModel
;
import
org.primefaces.component.submenu.Submenu
;
import
org.primefaces.model.menu.DefaultSeparator
;
import
org.primefaces.model.DefaultMenuModel
;
import
org.primefaces.model.menu.DefaultSubMenu
;
import
org.primefaces.model.MenuModel
;
import
org.primefaces.model.menu.MenuModel
;
import
org.primefaces.model.menu.Submenu
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
fi.codecrew.moya.beans.MenuBeanLocal
;
import
fi.codecrew.moya.beans.MenuBeanLocal
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.MenuNavigation
;
import
fi.codecrew.moya.model.MenuNavigation
;
import
fi.codecrew.moya.utilities.I18n
;
import
fi.codecrew.moya.utilities.I18n
;
...
@@ -91,11 +91,11 @@ public class PrimeMenuView extends GenericCDIView {
...
@@ -91,11 +91,11 @@ public class PrimeMenuView extends GenericCDIView {
{
{
if
(
m
.
getItem
()
!=
null
&&
m
.
getChildren
().
isEmpty
())
if
(
m
.
getItem
()
!=
null
&&
m
.
getChildren
().
isEmpty
())
{
{
MenuItem
menuitem
=
mkMenuitem
(
m
);
Default
MenuItem
menuitem
=
mkMenuitem
(
m
);
if
(
menuitem
!=
null
)
if
(
menuitem
!=
null
)
{
{
menuModel
.
add
MenuItem
(
menuitem
);
menuModel
.
add
Element
(
menuitem
);
}
}
}
else
{
}
else
{
...
@@ -103,22 +103,22 @@ public class PrimeMenuView extends GenericCDIView {
...
@@ -103,22 +103,22 @@ public class PrimeMenuView extends GenericCDIView {
if
(
subm
!=
null
)
if
(
subm
!=
null
)
{
{
menuModel
.
add
Submenu
(
subm
);
menuModel
.
add
Element
(
subm
);
}
}
}
}
}
}
}
}
return
menuModel
;
return
menuModel
;
}
}
private
Subm
enu
addSubmenu
(
MenuNavigation
m
)
{
private
DefaultSubM
enu
addSubmenu
(
MenuNavigation
m
)
{
Subm
enu
ret
=
null
;
DefaultSubM
enu
ret
=
null
;
if
(
m
.
isVisible
()
&&
(
m
.
getPermission
()
==
null
||
super
.
hasPermission
(
m
.
getPermission
())))
if
(
m
.
isVisible
()
&&
(
m
.
getPermission
()
==
null
||
super
.
hasPermission
(
m
.
getPermission
())))
{
{
ret
=
new
Subm
enu
();
ret
=
new
DefaultSubM
enu
();
ret
.
setLabel
(
I18n
.
get
(
m
.
getKey
()));
ret
.
setLabel
(
I18n
.
get
(
m
.
getKey
()));
for
(
MenuNavigation
child
:
m
.
getChildren
())
for
(
MenuNavigation
child
:
m
.
getChildren
())
{
{
...
@@ -126,29 +126,28 @@ public class PrimeMenuView extends GenericCDIView {
...
@@ -126,29 +126,28 @@ public class PrimeMenuView extends GenericCDIView {
if
(
child
.
getItem
()
!=
null
)
if
(
child
.
getItem
()
!=
null
)
{
{
MenuItem
item
=
mkMenuitem
(
child
);
Default
MenuItem
item
=
mkMenuitem
(
child
);
if
(
item
!=
null
)
if
(
item
!=
null
)
{
{
item
.
setValue
(
I18n
.
get
(
child
.
getKey
()));
item
.
setValue
(
I18n
.
get
(
child
.
getKey
()));
ret
.
getChildren
().
add
(
item
);
ret
.
addElement
(
item
);
}
}
}
else
if
(
ret
.
get
Child
Count
()
>
0
)
{
}
else
if
(
ret
.
get
Elements
Count
()
>
0
)
{
ret
.
getChildren
().
add
(
new
Separator
());
ret
.
addElement
(
new
Default
Separator
());
}
}
}
else
{
}
else
{
Subm
enu
subm
=
addSubmenu
(
child
);
DefaultSubM
enu
subm
=
addSubmenu
(
child
);
if
(
subm
!=
null
)
if
(
subm
!=
null
)
{
{
subm
.
setLabel
(
I18n
.
get
(
child
.
getKey
()));
subm
.
setLabel
(
I18n
.
get
(
child
.
getKey
()));
ret
.
getChildren
().
add
(
subm
);
ret
.
addElement
(
subm
);
}
}
}
}
}
}
if
(
ret
.
getChildCount
()
==
0
)
if
(
ret
.
getElementsCount
()
==
0
)
{
{
ret
=
null
;
ret
=
null
;
}
}
...
@@ -156,11 +155,11 @@ public class PrimeMenuView extends GenericCDIView {
...
@@ -156,11 +155,11 @@ public class PrimeMenuView extends GenericCDIView {
return
ret
;
return
ret
;
}
}
private
MenuItem
mkMenuitem
(
MenuNavigation
m
)
{
private
Default
MenuItem
mkMenuitem
(
MenuNavigation
m
)
{
MenuItem
item
=
null
;
Default
MenuItem
item
=
null
;
if
(
m
.
isVisible
()
&&
(
m
.
getPermission
()
==
null
||
super
.
hasPermission
(
m
.
getPermission
())))
if
(
m
.
isVisible
()
&&
(
m
.
getPermission
()
==
null
||
super
.
hasPermission
(
m
.
getPermission
())))
{
{
item
=
new
MenuItem
();
item
=
new
Default
MenuItem
();
String
outcome
;
String
outcome
;
if
(
m
.
getSitepage
()
!=
null
)
if
(
m
.
getSitepage
()
!=
null
)
{
{
...
@@ -170,6 +169,7 @@ public class PrimeMenuView extends GenericCDIView {
...
@@ -170,6 +169,7 @@ public class PrimeMenuView extends GenericCDIView {
outcome
=
m
.
getItem
().
getUrl
();
outcome
=
m
.
getItem
().
getUrl
();
}
}
String
key
=
I18n
.
get
(
m
.
getKey
());
String
key
=
I18n
.
get
(
m
.
getKey
());
item
.
setValue
(
key
);
item
.
setValue
(
key
);
item
.
setOutcome
(
outcome
);
item
.
setOutcome
(
outcome
);
}
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
View file @
8f92fad
...
@@ -2,6 +2,7 @@ package fi.codecrew.moya.web.cdiview.user;
...
@@ -2,6 +2,7 @@ package fi.codecrew.moya.web.cdiview.user;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.EJB
;
...
@@ -14,6 +15,7 @@ import javax.inject.Inject;
...
@@ -14,6 +15,7 @@ import javax.inject.Inject;
import
javax.inject.Named
;
import
javax.inject.Named
;
import
org.primefaces.event.CaptureEvent
;
import
org.primefaces.event.CaptureEvent
;
import
org.primefaces.event.FileUploadEvent
;
import
org.primefaces.model.CroppedImage
;
import
org.primefaces.model.CroppedImage
;
import
org.primefaces.model.DefaultStreamedContent
;
import
org.primefaces.model.DefaultStreamedContent
;
import
org.primefaces.model.StreamedContent
;
import
org.primefaces.model.StreamedContent
;
...
@@ -60,7 +62,7 @@ public class UserView extends GenericCDIView {
...
@@ -60,7 +62,7 @@ public class UserView extends GenericCDIView {
private
transient
ReaderBeanLocal
readerbean
;
private
transient
ReaderBeanLocal
readerbean
;
private
Integer
userid
;
private
Integer
userid
;
private
transient
UploadedFile
image
;
private
UploadedFile
image
;
private
CroppedImage
croppedImage
;
private
CroppedImage
croppedImage
;
...
@@ -121,9 +123,18 @@ public class UserView extends GenericCDIView {
...
@@ -121,9 +123,18 @@ public class UserView extends GenericCDIView {
return
permbean
.
getCurrentUser
();
return
permbean
.
getCurrentUser
();
}
}
public
void
handleImageUpload
(
FileUploadEvent
event
)
{
FacesMessage
msg
=
new
FacesMessage
(
"Succesful"
,
event
.
getFile
().
getFileName
()
+
" is uploaded."
);
FacesContext
.
getCurrentInstance
().
addMessage
(
null
,
msg
);
UploadedFile
f
=
event
.
getFile
();
if
(
f
!=
null
)
logger
.
info
(
"Received file {}, {}, {}"
,
f
.
getContentType
(),
f
.
getFileName
(),
f
.
getSize
());
}
public
void
oncapture
(
CaptureEvent
captureEvent
)
{
public
void
oncapture
(
CaptureEvent
captureEvent
)
{
byte
[]
data
=
captureEvent
.
getData
(
);
ByteArrayInputStream
data
=
new
ByteArrayInputStream
(
captureEvent
.
getData
()
);
UserImage
img
=
userbean
.
uploadImage
(
user
,
"image/png"
,
data
,
"userimage.png"
,
"Uploaded image"
);
UserImage
img
=
userbean
.
uploadImage
(
user
,
"image/png"
,
data
,
"userimage.png"
,
"Uploaded image"
);
user
=
userbean
.
getEventUser
(
img
.
getUser
());
user
=
userbean
.
getEventUser
(
img
.
getUser
());
// super.navihandler.forward("/admin/adduser/capturesuccess");
// super.navihandler.forward("/admin/adduser/capturesuccess");
...
@@ -222,15 +233,13 @@ public class UserView extends GenericCDIView {
...
@@ -222,15 +233,13 @@ public class UserView extends GenericCDIView {
return
null
;
return
null
;
}
}
public
String
sendImage
()
{
public
String
sendImage
()
throws
IOException
{
if
(
image
==
null
)
{
if
(
getImage
()
==
null
)
{
super
.
addFaceMessage
(
"user.imageUpload.imageNotFound"
);
super
.
addFaceMessage
(
"user.imageUpload.imageNotFound"
);
}
else
{
}
else
{
UserImage
userimage
=
userbean
.
uploadImage
(
user
,
getImage
().
getContentType
(),
getImage
().
getContents
(),
getImage
().
getFileName
(),
""
);
InputStream
istr
=
getImage
().
getInputstream
();
UserImage
userimage
=
userbean
.
uploadImage
(
user
,
getImage
().
getContentType
(),
getImage
().
getInputstream
(),
getImage
().
getFileName
(),
""
);
user
=
userbean
.
getEventUser
(
userimage
.
getUser
());
user
=
userbean
.
getEventUser
(
userimage
.
getUser
());
super
.
addFaceMessage
(
"user.imageUploaded"
);
super
.
addFaceMessage
(
"user.imageUploaded"
);
}
}
...
...
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