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 3631ff43
authored
Jan 12, 2017
by
Tuomas Riihimäki
Committed by
Tuomas Riihimäki
Apr 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI fixes, etc
1 parent
615b85c4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
21 deletions
code/moya-web/WebContent/neomap/moveplaces.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/map/MapPlacechangeView.java
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
code/moya-web/WebContent/neomap/moveplaces.xhtml
View file @
3631ff4
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- Place slot count -->
<!-- Place slot count -->
<h3>
<h3>
<h:outputText
value=
"#{i18n['
mapView.yourPlaces
']}"
/>
<h:outputText
value=
"#{i18n['
placemove.header
']}"
/>
</h3>
</h3>
<p:fragment
id=
"placeselector"
>
<p:fragment
id=
"placeselector"
>
<h:form>
<h:form>
...
@@ -37,22 +37,27 @@
...
@@ -37,22 +37,27 @@
value=
"#{mapPlacechangeView.slots}"
>
value=
"#{mapPlacechangeView.slots}"
>
<!-- rowStyleClass="#{mapPlacechangeView.srcPlace.contains(slot.place) ? 'selected' : 'unselected'}" -->
<!-- rowStyleClass="#{mapPlacechangeView.srcPlace.contains(slot.place) ? 'selected' : 'unselected'}" -->
<p:column
headerText=
"#{i18n['
mapView.productcount
.productname']}"
>
<p:column
headerText=
"#{i18n['
placemove
.productname']}"
>
<h:outputText
value=
"#{slot.src.product.name}"
/>
<h:outputText
value=
"#{slot.src.product.name}"
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['
mapView.productcount.unused
']}"
>
<p:column
headerText=
"#{i18n['
placemove.placename
']}"
>
<h:outputText
renderer=
"#{!empty slot.src.place}"
<h:outputText
renderer=
"#{!empty slot.src.place}"
value=
"#{slot.src.place.name}"
/>
value=
"#{slot.src.place.name}"
/>
</p:column>
<p:column
headerText=
"#{i18n['mapView.productcount.selected']}"
>
<h:outputText
renderer=
"#{!empty slot.moving}"
value=
"#{slot.moving}"
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['mapView.productcount.selected']}"
>
<p:column
headerText=
"#{i18n['placemove.placeuser']}"
>
<h:outputText
rendered=
"#{!empty slot.src.place.currentUser}"
value=
"#{slot.src.place.currentUser.wholeNmae}"
/>
<h:outputText
rendered=
"#{empty slot.src.place.currentUser}"
value=
"-"
/>
</p:column>
<p:column
headerText=
"#{i18n['placemove.dstplace']}"
>
<div
style=
"padding: 0.3em 0;"
>
<h:outputText
renderer=
"#{!empty slot.dst}"
<h:outputText
renderer=
"#{!empty slot.dst}"
value=
"#{slot.dst.name}"
/>
value=
"#{slot.dst.name}"
/>
</div>
</p:column>
</p:column>
<p:column>
<p:column>
...
@@ -66,23 +71,26 @@
...
@@ -66,23 +71,26 @@
actionListener=
"#{mapPlacechangeView.unselectSlot}"
actionListener=
"#{mapPlacechangeView.unselectSlot}"
rendered=
"#{slot.moving}"
value=
"#{i18n['placemove.deselect']}"
rendered=
"#{slot.moving}"
value=
"#{i18n['placemove.deselect']}"
update=
"placeselector"
/>
update=
"placeselector"
/>
</ui:fragment>
</ui:fragment>
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
</h:form>
</h:form>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
toggleSuccess
=
#
{
mapPlacechangeView
.
toggleSuccess
};
toggleSuccess
=
#
{
mapPlacechangeView
.
toggleSuccess
};
</script>
</script>
</p:fragment>
</p:fragment>
<div
style=
"padding: 1em 0;"
>
<h:form
id=
"placemove"
>
<h:form
id=
"placemove"
>
<p:commandButton
<p:commandButton
disabled=
"#{!mapPlacechangeView.isReadyForCommit()}"
rendered=
"#{ajaxMapView.canUserBuy()}"
rendered=
"#{ajaxMapView.canUserBuy()}"
value=
"#{i18n['mapPlacechange.commitMove']}"
value=
"#{i18n['placemove.commitMove']}"
action=
"#{mapPlacechangeView.commitMove()}"
action=
"#{mapPlacechangeView.commitMove()}"
ajax=
"false"
/>
ajax=
"false"
/>
</h:form>
</h:form>
</div>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/map/MapPlacechangeView.java
View file @
3631ff4
...
@@ -79,6 +79,15 @@ public class MapPlacechangeView extends GenericCDIView {
...
@@ -79,6 +79,15 @@ public class MapPlacechangeView extends GenericCDIView {
}
}
public
boolean
isReadyForCommit
()
{
for
(
MoveContainer
mc
:
moveContainers
)
{
if
(
mc
.
isMoving
()
&&
mc
.
getDst
()
==
null
)
{
return
false
;
}
}
return
true
;
}
public
void
initView
()
{
public
void
initView
()
{
// If we are overriding user, check permission.
// If we are overriding user, check permission.
...
@@ -98,18 +107,18 @@ public class MapPlacechangeView extends GenericCDIView {
...
@@ -98,18 +107,18 @@ public class MapPlacechangeView extends GenericCDIView {
}
}
}
}
public
String
commitMove
(){
public
String
commitMove
()
{
HashMap
<
Place
,
Place
>
change
=
new
HashMap
<
Place
,
Place
>();
HashMap
<
Place
,
Place
>
change
=
new
HashMap
<
Place
,
Place
>();
for
(
MoveContainer
s
:
slots
)
{
for
(
MoveContainer
s
:
slots
)
{
if
(
s
.
isMoving
()
&&
s
.
getDst
()
!=
null
)
{
if
(
s
.
isMoving
()
&&
s
.
getDst
()
!=
null
)
{
change
.
put
(
s
.
getSrc
().
getPlace
(),
s
.
getDst
());
change
.
put
(
s
.
getSrc
().
getPlace
(),
s
.
getDst
());
}
}
}
}
placebean
.
movePlaces
(
change
);
placebean
.
movePlaces
(
change
);
//slots = null;
//
slots = null;
//initView();
//
initView();
return
"/place/myGroups?faces_redirect=true"
;
return
"/place/myGroups?faces_redirect=true"
;
}
}
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
View file @
3631ff4
...
@@ -731,7 +731,7 @@ place.release = Release this place
...
@@ -731,7 +731,7 @@ place.release = Release this place
place.releasetime
=
Release time
place.releasetime
=
Release time
place.reserveForUser
=
Reserve for the user
place.reserveForUser
=
Reserve for the user
place.reservetime
=
Reservetime
place.reservetime
=
Reservetime
place.send
=
Transfer place
place.send
=
Assign to user
place.width
=
Width
place.width
=
Width
placeReservation.buyConfirm.content
=
Are you sure, this is difficult to cancel?
placeReservation.buyConfirm.content
=
Are you sure, this is difficult to cancel?
...
@@ -782,6 +782,15 @@ placegroupview.token = Place token / user
...
@@ -782,6 +782,15 @@ placegroupview.token = Place token / user
placegroupview.toptext
=
\
placegroupview.toptext
=
\
placegroupview.unlockedPlacesNotification
=
You have unlocked places, you must lock them before you can see your tickets!
placegroupview.unlockedPlacesNotification
=
You have unlocked places, you must lock them before you can see your tickets!
placemove.commitMove
=
Move places
placemove.deselect
=
Cancel relocation
placemove.dstplace
=
New location
placemove.header
=
Relocate places
placemove.placename
=
Place
placemove.placeuser
=
User
placemove.productname
=
Ticket type
placemove.selectSlotForMove
=
Select for relocation
placeslot.add
=
Add place slot
placeslot.add
=
Add place slot
placeslot.bill
=
Bill
placeslot.bill
=
Bill
placeslot.id
=
ID
placeslot.id
=
ID
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
View file @
3631ff4
...
@@ -992,7 +992,7 @@ place.release = Release this place
...
@@ -992,7 +992,7 @@ place.release = Release this place
place.releasetime
=
Release time
place.releasetime
=
Release time
place.reserveForUser
=
Reserve for the user
place.reserveForUser
=
Reserve for the user
place.reservetime
=
Reservetime
place.reservetime
=
Reservetime
place.send
=
Transfer place
place.send
=
Assign to user
place.width
=
Width
place.width
=
Width
placeReservation.buyConfirm.content
=
Are you sure, this is difficult to cancel?
placeReservation.buyConfirm.content
=
Are you sure, this is difficult to cancel?
...
@@ -1042,6 +1042,15 @@ placegroupview.reserveForSelf = Select the place for yourself
...
@@ -1042,6 +1042,15 @@ placegroupview.reserveForSelf = Select the place for yourself
placegroupview.token
=
Place token / user
placegroupview.token
=
Place token / user
placegroupview.unlockedPlacesNotification
=
You have unlocked places, you must lock them before you can see your tickets!
placegroupview.unlockedPlacesNotification
=
You have unlocked places, you must lock them before you can see your tickets!
placemove.commitMove
=
Move places
placemove.deselect
=
Cancel relocation
placemove.dstplace
=
New location
placemove.header
=
Relocate places
placemove.placename
=
Place
placemove.placeuser
=
User
placemove.productname
=
Ticket type
placemove.selectSlotForMove
=
Select for relocation
placeslot.add
=
Add place slot
placeslot.add
=
Add place slot
placeslot.bill
=
Bill
placeslot.bill
=
Bill
placeslot.id
=
ID
placeslot.id
=
ID
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
View file @
3631ff4
...
@@ -979,7 +979,7 @@ place.release = Vapauta paikka
...
@@ -979,7 +979,7 @@ place.release = Vapauta paikka
place.releasetime
=
Vapautusaika
place.releasetime
=
Vapautusaika
place.reserveForUser
=
Varaa k
\u
00E4ytt
\u
00E4j
\u
00E4lle
place.reserveForUser
=
Varaa k
\u
00E4ytt
\u
00E4j
\u
00E4lle
place.reservetime
=
Varaamisaika
place.reservetime
=
Varaamisaika
place.send
=
Siirr
\u
00E4 paikka
place.send
=
Luovuta k
\u
00E4ytt
\u
00E4j
\u
00E4lle
place.width
=
Leveys
place.width
=
Leveys
placeReservation.buyConfirm.content
=
Oletko varma, t
\u
00E4t
\u
00E4 on vaikea peruuttaa?
placeReservation.buyConfirm.content
=
Oletko varma, t
\u
00E4t
\u
00E4 on vaikea peruuttaa?
...
@@ -1029,6 +1029,15 @@ placegroupview.reserveForSelf = Valitse paikka itsellesi
...
@@ -1029,6 +1029,15 @@ placegroupview.reserveForSelf = Valitse paikka itsellesi
placegroupview.token
=
Paikkakoodi / k
\u
00E4ytt
\u
00E4j
\u
00E4
placegroupview.token
=
Paikkakoodi / k
\u
00E4ytt
\u
00E4j
\u
00E4
placegroupview.unlockedPlacesNotification
=
Sinulla on lukitsemattomia paikkoja, sinun tulee lukita ne ennenkuin voit tarkastella lippuasi!
placegroupview.unlockedPlacesNotification
=
Sinulla on lukitsemattomia paikkoja, sinun tulee lukita ne ennenkuin voit tarkastella lippuasi!
placemove.commitMove
=
Siirr
\u
00E4 paikat
placemove.deselect
=
Peru siirto
placemove.dstplace
=
Uusi paikka
placemove.header
=
Siirr
\u
00E4 paikkoja
placemove.placename
=
Paikka
placemove.placeuser
=
K
\u
00E4ytt
\u
00E4j
\u
00E4
placemove.productname
=
Lipputyyppi
placemove.selectSlotForMove
=
Valitse siirrett
\u
00E4v
\u
00E4ksi
placeslot.add
=
Lis
\u
00E4
\u
00E4 paikkaslotti
placeslot.add
=
Lis
\u
00E4
\u
00E4 paikkaslotti
placeslot.bill
=
Lasku
placeslot.bill
=
Lasku
placeslot.id
=
ID
placeslot.id
=
ID
...
...
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