polish l&f

This commit is contained in:
Keith Donald
2008-04-24 05:07:52 +00:00
parent c05695b5f3
commit fd39215c26
8 changed files with 143 additions and 186 deletions

View File

@@ -80,6 +80,7 @@
} }
.section { .section {
text-align: left;
width: 505px; width: 505px;
float: left; float: left;
margin-bottom: 5px; margin-bottom: 5px;

View File

@@ -3,7 +3,7 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section"> <div class="section">
<h1>Book Hotel</h1> <h2>Book Hotel</h2>
</div> </div>
<div class="section"> <div class="section">

View File

@@ -3,7 +3,7 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section"> <div class="section">
<h1>Confirm Hotel Booking</h1> <h2>Confirm Hotel Booking</h2>
</div> </div>
<div class="section"> <div class="section">

View File

@@ -28,19 +28,7 @@
</c:if> </c:if>
</tbody> </tbody>
</table> </table>
<div class="next"> <div class="buttonGroup">
<c:if test="${not empty hotels}">
<a id="moreResultsLink" href="search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page + 1}">More Results</a>
<script>
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "moreResultsLink",
event: "onclick",
params: {fragments: "hotelResults"}
}));
</script>
</c:if>
</div>
<div class="prev">
<c:if test="${searchCriteria.page > 0}"> <c:if test="${searchCriteria.page > 0}">
<a id="prevResultsLink" href="search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page - 1}">Previous Results</a> <a id="prevResultsLink" href="search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page - 1}">Previous Results</a>
<script> <script>
@@ -51,6 +39,16 @@
})); }));
</script> </script>
</c:if> </c:if>
<c:if test="${not empty hotels}">
<a id="moreResultsLink" href="search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page + 1}">More Results</a>
<script>
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "moreResultsLink",
event: "onclick",
params: {fragments: "hotelResults"}
}));
</script>
</c:if>
</div> </div>
</c:if> </c:if>
</div> </div>

View File

@@ -7,7 +7,7 @@
<span class="errors"> <span class="errors">
<form:errors path="*"/> <form:errors path="*"/>
</span> </span>
<h1>Search Hotels</h1> <h2>Search Hotels</h2>
<fieldset> <fieldset>
<div class="field"> <div class="field">
<div class="label"> <div class="label">
@@ -43,41 +43,45 @@
</form:form> </form:form>
<security:authorize ifAllGranted="ROLE_USER"> <security:authorize ifAllGranted="ROLE_USER">
<div class="section"> <div class="section">
<h1>Current Hotel Bookings</h1> <h2>Current Hotel Bookings</h2>
<table class="summary"> <c:if test="${empty bookings}">
<thead> <tr>
<tr> <td colspan="7">No bookings found</td>
<th>Name</th> </tr>
<th>Address</th> </c:if>
<th>City, State</th>
<th>Check in Date</th> <c:if test="${!empty bookings}">
<th>Check out Date</th> <table class="summary">
<th>Confirmation Number</th> <thead>
<th>Action</th> <tr>
</tr> <th>Name</th>
</thead> <th>Address</th>
<tbody> <th>City, State</th>
<c:forEach var="booking" items="${bookings}"> <th>Check in Date</th>
<tr> <th>Check out Date</th>
<td>${booking.hotel.name}</td> <th>Confirmation Number</th>
<td>${booking.hotel.address}</td> <th>Action</th>
<td>${booking.hotel.city}, ${booking.hotel.state}</td> </tr>
<td>${booking.checkinDate}</td> </thead>
<td>${booking.checkoutDate}</td> <tbody>
<td>${booking.id}</td> <c:forEach var="booking" items="${bookings}">
<td> <tr>
<a href="deleteBooking?id=${booking.id}">Cancel</a> <td>${booking.hotel.name}</td>
</td> <td>${booking.hotel.address}</td>
</tr> <td>${booking.hotel.city}, ${booking.hotel.state}</td>
</c:forEach> <td>${booking.checkinDate}</td>
<c:if test="${empty bookings}"> <td>${booking.checkoutDate}</td>
<tr> <td>${booking.id}</td>
<td colspan="7">No booking history</td> <td>
</tr> <a href="deleteBooking?id=${booking.id}">Cancel</a>
</c:if> </td>
</tbody> </tr>
</table> </c:forEach>
</div> </tbody>
</security:authorize> </table>
</c:if>
</div>
</security:authorize>

View File

@@ -1,7 +1,7 @@
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<div id="heading" class="section"> <div id="heading" class="section">
<h1>Hotel Results</h1> <h2>Hotel Results</h2>
</div> </div>
<tiles:insertAttribute name="hotelResults" /> <tiles:insertAttribute name="hotelResults" />

View File

@@ -3,7 +3,7 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section"> <div class="section">
<h1>View Hotel</h1> <h2>View Hotel</h2>
</div> </div>
<div class="section"> <div class="section">

View File

@@ -11,11 +11,17 @@
text-decoration: none; text-decoration: none;
font-weight: bold; font-weight: bold;
} }
body.spring { body.spring {
background-color: #9cac7c; background-color: #9cac7c;
} }
form div,
form p {
padding: 0px;
margin: 0 0 .5em 0;
}
#header.spring { #header.spring {
margin: 0 0 1em 0; margin: 0 0 1em 0;
padding: 0px 0px; padding: 0px 0px;
@@ -27,6 +33,7 @@
width: 100%; width: 100%;
margin: 10px 0 0 0; margin: 10px 0 0 0;
padding: 0 0 0 0; padding: 0 0 0 0;
text-align: none;
} }
#welcome { #welcome {
@@ -40,135 +47,13 @@
#welcome div.right { #welcome div.right {
float: right; float: right;
} }
form div,
form p {
padding: 0px;
margin: 0 0 .5em 0;
}
#content.spring { #content.spring {
width: 740px; width: 740px;
background: #fff url(../images/bg.gif) 0 0 repeat; background: #fff url(../images/bg.gif) 0 0 repeat;
margin-bottom: 0px; margin-bottom: 0px;
} }
#content .section {
width: 505px;
float: left;
margin-bottom: 5px;
}
#content.spring input[type="submit"],
#content.spring input[type="button"],
#content.spring button {
font-weight: bold;
color: #fff;
height: 20px;
background: #fff url(../images/btn.bg.gif) 0 0 repeat-x;
border-style: none;
vertical-align: middle;
}
#content.spring button
{
font-size: 1em;
font-family: arial,helvetica,verdana,sans-serif;
margin-top: 0pt;
margin-right: 0pt;
margin-bottom: 0pt;
margin-left: 0pt;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 2px;
}
#content.spring button
{
vertical-align: middle;
}
.errors {
font-weight: bold;
text-align: left;
color: #600;
}
.errors ul {
list-style: none;
}
#content .field {
float:left;
}
#content .field .label {
float: left;
padding-top: 5px;
padding-right: 5px;
font-weight: bold;
width: 150px;
text-align: right;
}
#content .field .output {
float: left;
width: 250px;
padding-top: 5px;
text-align: left;
}
#content .field .input {
float: left;
width: 250px;
text-align: left;
}
#content .searchGroup {
width: 35%;
}
#content .buttonGroup {
clear: both;
margin-top: 5px;
text-align: right;
}
#content .previous {
float: right;
}
#content .next {
float: right;
}
#content .next a {
margin-left: 20px;
}
#content .summary {
width: 100%;
border: 1px solid #414f23;
border-collapse: collapse;
}
#content .summary thead th {
border-left: 1px solid #414f23;
background: #fff url(../images/th.bg.gif) 0 100% repeat-x;
border-bottom: 1px solid #414f23;
padding: 6px;
text-align: left;
font-size: small;
}
#content .summary tbody td {
border-left: 1px solid #9cac7c;
padding: 4px;
border-bottom: 1px solid #9cac7c;
font-size: 8pt;
}
#local.spring{ #local.spring{
width: 215px; width: 215px;
} }
@@ -184,7 +69,76 @@
padding-right: 20px; padding-right: 20px;
} }
div#header a { .errors {
color: inherit; font-weight: bold;
background-color: inherit; text-align: left;
} color: #600;
}
.errors ul {
list-style: none;
}
.section {
text-align: left;
width: 505px;
float: left;
margin-bottom: 5px;
}
.field {
float:left;
}
.field .label {
float: left;
padding-top: 5px;
padding-right: 5px;
font-weight: bold;
width: 150px;
text-align: right;
}
.field .input {
float: left;
width: 250px;
text-align: left;
}
.field .output {
float: left;
width: 250px;
padding-top: 5px;
text-align: left;
}
.buttonGroup {
clear: both;
text-align: right;
}
.buttonGroup input[type="submit"], .buttonGroup input[type="button"], .buttonGroup a {
margin-right: 5px;
}
.summary {
width: 100%;
border: 1px solid #414f23;
border-collapse: collapse;
}
.summary thead th {
border-left: 1px solid #414f23;
background: #fff url(../images/th.bg.gif) 0 100% repeat-x;
border-bottom: 1px solid #414f23;
padding: 6px;
text-align: left;
font-size: small;
}
.summary tbody td {
border-left: 1px solid #9cac7c;
padding: 4px;
border-bottom: 1px solid #9cac7c;
font-size: 8pt;
}