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 c96ef66f
authored
Feb 28, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Kielenvaihtofix korjaa issuen #18 Reviewed-by:
@tuomari
2 parents
f689b093
bbbff801
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/CashierView.java
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/CustomerView.java
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/RedirectView.java
code/MoyaWeb/WebContent/resources/templates/template1/template.xhtml
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/CashierView.java
View file @
c96ef66
...
@@ -10,7 +10,7 @@ public class CashierView extends AbstractView {
...
@@ -10,7 +10,7 @@ public class CashierView extends AbstractView {
private
static
final
long
serialVersionUID
=
-
4415449134790807417L
;
private
static
final
long
serialVersionUID
=
-
4415449134790807417L
;
public
void
initCreateView
()
{
public
void
initCreateView
()
{
if
(
super
.
requirePermissions
(
TerminalPermission
.
CASHIER
))
{
if
(
super
.
requirePermissions
(
TerminalPermission
.
INFO
))
{
super
.
beginConversation
();
super
.
beginConversation
();
}
}
}
}
...
...
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/CustomerView.java
View file @
c96ef66
...
@@ -10,7 +10,7 @@ public class CustomerView extends AbstractView {
...
@@ -10,7 +10,7 @@ public class CustomerView extends AbstractView {
private
static
final
long
serialVersionUID
=
-
8746462342138568821L
;
private
static
final
long
serialVersionUID
=
-
8746462342138568821L
;
public
void
initCreateView
()
{
public
void
initCreateView
()
{
if
(
super
.
requirePermissions
(
TerminalPermission
.
CUSTOM
ER
))
{
if
(
super
.
requirePermissions
(
TerminalPermission
.
US
ER
))
{
super
.
beginConversation
();
super
.
beginConversation
();
}
}
}
}
...
...
code/MoyaTerminalWeb/src/fi/codecrew/moya/terminal/view/RedirectView.java
View file @
c96ef66
...
@@ -18,10 +18,10 @@ public class RedirectView {
...
@@ -18,10 +18,10 @@ public class RedirectView {
public
void
redirectByPermissions
()
throws
Exception
{
public
void
redirectByPermissions
()
throws
Exception
{
FacesContext
fcont
=
FacesContext
.
getCurrentInstance
();
FacesContext
fcont
=
FacesContext
.
getCurrentInstance
();
if
(
permissionBean
.
hasPermission
(
TerminalPermission
.
CASHIER
))
{
if
(
permissionBean
.
hasPermission
(
TerminalPermission
.
INFO
))
{
fcont
.
getApplication
().
getNavigationHandler
()
fcont
.
getApplication
().
getNavigationHandler
()
.
handleNavigation
(
fcont
,
null
,
"/cashier"
);
.
handleNavigation
(
fcont
,
null
,
"/cashier"
);
}
else
if
(
permissionBean
.
hasPermission
(
TerminalPermission
.
CUSTOM
ER
))
{
}
else
if
(
permissionBean
.
hasPermission
(
TerminalPermission
.
US
ER
))
{
fcont
.
getApplication
().
getNavigationHandler
()
fcont
.
getApplication
().
getNavigationHandler
()
.
handleNavigation
(
fcont
,
null
,
"/customer"
);
.
handleNavigation
(
fcont
,
null
,
"/customer"
);
}
else
{
}
else
{
...
...
code/MoyaWeb/WebContent/resources/templates/template1/template.xhtml
View file @
c96ef66
...
@@ -110,8 +110,9 @@
...
@@ -110,8 +110,9 @@
<section
id=
"main"
class=
"flex2"
>
<section
id=
"main"
class=
"flex2"
>
<div
class=
"container top"
>
<div
class=
"container top"
>
<h:form
id=
"selectLanguage"
>
<h:form
id=
"selectLanguage"
>
<p:selectOneButton
id=
"langselect"
styleClass=
"languageSelector"
value=
"#{sessionStore.locale}"
onchange=
"this.form.submit()
"
converter=
"#{localeConverter}"
>
<p:selectOneButton
id=
"langselect"
styleClass=
"languageSelector"
value=
"#{sessionStore.locale}"
immediate=
"true
"
converter=
"#{localeConverter}"
>
<f:selectItems
value=
"#{localeSelectorView.availableLocales}"
var=
"loc"
itemValue=
"#{loc.locale}"
itemLabel=
"#{loc.locale.displayName}"
/>
<f:selectItems
value=
"#{localeSelectorView.availableLocales}"
var=
"loc"
itemValue=
"#{loc.locale}"
itemLabel=
"#{loc.locale.displayName}"
/>
<p:ajax
update=
"@all"
event=
"change"
/>
</p:selectOneButton>
</p:selectOneButton>
</h:form>
</h:form>
...
...
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