Skip to content

Commit

Permalink
Mostrando fileira e posição do lugar
Browse files Browse the repository at this point in the history
  • Loading branch information
analosnak committed Apr 25, 2019
1 parent 6e8f1d7 commit 77c9a41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/main/java/br/com/caelum/ingresso/model/Lugar.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ public boolean equals(Object obj) {
return true;
}

@Override
public String toString() {
return this.fileira + this.posicao;
}

}
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/sessao/lugares.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<tr>
<c:forEach var="lugar" items="${map.value}">
<td class="fileira-assento"><figure>
<svg class="assento disponivel" id="${lugar.id}" version="1.0" id="SEAT" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg class="assento disponivel" data-lugar="${lugar}" id="${lugar.id}" version="1.0" id="SEAT" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.224 305.246" enable-background="new 0 0 318.224 305.246" xml:space="preserve">
<g id="FILL">
<path d="M269.395,132.246h-15.02V51.414c0-11.758-9.492-21.248-21.248-21.248H85.097
Expand Down Expand Up @@ -127,7 +127,7 @@
console.log(checkbox.value);
var salaId = ${sessao.sala.id};
var sessaoId = ${sessao.id};
var lugarNome = img.id;
var lugarNome = img.getAttribute('data-lugar');
var linhaId = "linha_" + salaId + "_" + sessaoId + "_" + lugarNome;
console.log(linhaId);
Expand Down

0 comments on commit 77c9a41

Please sign in to comment.