Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
juliar committed Oct 23, 2012
2 parents 83ae600 + 4c77e08 commit a468de1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 109 deletions.
8 changes: 3 additions & 5 deletions src/main/webapp/admins/admins.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
"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:ui="http://java.sun.com/jsf/facelets" >
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ace="http://www.icefaces.org/icefaces/components">
<h:body>
<ui:composition template="/jsf/template/template.xhtml">
<ui:define name="sideboxTop">
Inloggad som admin.
</ui:define>
</ui:composition>
</h:body>
</html>
</html>
50 changes: 33 additions & 17 deletions src/main/webapp/contact.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,45 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ace="http://www.icefaces.org/icefaces/components">
xmlns:ace="http://www.icefaces.org/icefaces/components"
xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<ui:composition template="/jsf/template/template.xhtml">
<ui:define name="content">
<h1>Contact us</h1>
<h1>Contact us</h1>
<p>
Ask a question in this formula. We will reach back with an answer within a week.
</p>

<h:form id="contactForm">

<p><label for="name">Name:</label><br />
<ace:textEntry id="name" value="#{contactBB.name}" styleClass="autoCompleteInputForm"/></p>

<p><label for="mail">Mail:</label><br />
<ace:textEntry id="mail" value="#{contactBB.mail}" styleClass="autoCompleteInputForm"/></p>

<p><label for="message">Message:</label><br />
<ace:textAreaEntry value="#{contactBB.comment}" id="message" styleClass="autoCompleteTextAreaForm"></ace:textAreaEntry></p>
<ace:pushButton value="Send" action="#{contactBB.submit}" />

</p>

<h:form id="contactForm" onsubmit="greeting()">

<p><label for="name">Name:</label><br />
<h:inputText id="name" value="#{contactBB.name}" styleClass="inputForm" validatorMessage="At least 3 characters">
<f:validateLength minimum="3" />
<f:ajax event="blur" render="nameOutput"/>
</h:inputText>
<h:message id="nameOutput" for="name" errorClass="error"/></p>


<p><label for="mail">Mail:</label><br />
<h:inputText id="mail" value="#{contactBB.mail}" styleClass="inputForm" validatorMessage="Invalid Email">
<f:validateRegex pattern="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"/>
<f:ajax event="blur" render="mailOutput" />
</h:inputText>
<h:message id="mailOutput" for="mail" styleClass="error"/></p>

<p><label for="message">Message:</label><br />
<h:inputTextarea id="message" value="#{contactBB.comment}" styleClass="inputTextArea" validatorMessage="At least 12 characters">
<f:validateLength minimum="12" />
<f:ajax event="blur" render="messageOutput"/>
</h:inputTextarea></p>
<h:message id="messageOutput" for="message" styleClass="error"/>



<h:commandButton value="Send" action="#{contactBB.submit}" styleClass="inputButton"/>
</h:form>

</ui:define>
</ui:composition>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/jsf/template/sideboxTop.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</h:form>

</h:form>
<h:panelGroup rendered="#{empty request.remoteUser}">
<h:panelGroup rendered="#{empty request.remoteUser}">
<h1 class="titleRibbon"><strong class="titleContent">User Panel</strong></h1>
<p>It seems that you are not logged in. You can login
<h:link outcome="/users/users">here</h:link>. </p>
Expand Down
15 changes: 4 additions & 11 deletions src/main/webapp/resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,12 @@ nav#main_menu{
text-align: center;
}

.autoCompleteTextAreaForm
.inputTextArea,.autoCompleteTextAreaForm
{
padding: 4px 6px;
font-size: 12px;
width: 100%;
width: 95%;
margin: 0 auto 0px auto;
height: 250px;
overflow: hidden;
resize: none;
Expand Down Expand Up @@ -343,22 +344,14 @@ label{
border: 1px solid #FFF;
}

span.error{
span.error, div.error, ul.error{
color:#000;
background-color:#ffeded;
padding:5px;
margin:0 0 0 10px;
border:1px solid #f27c7c;
}

div.error, ul.error{
color:#000;
background-color:#ffeded;
padding:5px;
margin:0 0 0 10px;
border:1px solid #f27c7c;
}

ul.error{
margin-top: 10px;
width: 94%;
Expand Down
64 changes: 7 additions & 57 deletions src/main/webapp/resources/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/

// This is a bug-fix.
function greeting()
{
alert("hej");
}

var $ = jQuery;
$(document).ready(function() {
$(document).ready(function() {

// Handles the effects of the main menu.
$("#toggle_arrow").click(function () {
Expand All @@ -26,59 +31,4 @@ $(document).ready(function() {
$(this).addClass("arrow_right");
}
}); // toggle end
}); // document ready end


$(document).ready(function() {
$(function() {
var availableTags = [
"Arlanda Airport (Stockholm)",

"Amsterdam Airport Schiphol",

"Bangkok International Airport",

"Beijing Capital International Airport",

"Dubai International Airport",

"Frankfurt Airport",

"Haneda Airport (Tokyo)",

"Heathrow Airport (London)",

"Hong Kong International Airport",

"O'Hare International Airport (Chicago)",

"John F. Kennedy International Airport (New York City)",

"Landvetter Airport (Gothenburg)",

"Leonardo da Vinci-Fiumicino Airport (Rome)",

"London Gatwick Airport",

"Los Angeles International Airport",

"Madrid Barajas Airport",

"McCarran International Airport (Las Vegas)",

"Munich Airport",

"Newark Liberty International Airport (New Jersey)",

"Paris-Charles de Gaulle Airport",

"San Francisco International Airport",

"Singapore Changi Airport",
];
$( ".autoCompleteInputForm" ).autocomplete({
source: availableTags
});
});

});
}); // document ready end
18 changes: 0 additions & 18 deletions src/main/webapp/users/users.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@
xmlns:ace="http://www.icefaces.org/icefaces/components">
<h:body>
<ui:composition template="/jsf/template/template.xhtml">
<ui:define name="content">
<article>
<header>
<h1>Search for a flight now!</h1>
</header>
<h:form>
<ace:dateTimeEntry id="cal"
value="#{search.flight.departureTime}"
timeZone="Europe/Stockholm"
pattern="MMM/dd/yyyy"/>
<p><label for="from">From:</label><br/>
<ace:textEntry id="from" value="#{search.flight.fromAirport}" styleClass="autoCompleteInputForm" /></p>
<p><label for="to">To:</label><br/>
<ace:textEntry id="to" value="#{search.flight.toAirport}" styleClass="autoCompleteInputForm" /></p>
<ace:pushButton value="Search Travel" action="#{search.search}"/>
</h:form>
</article>
</ui:define>
</ui:composition>
</h:body>
</html>

0 comments on commit a468de1

Please sign in to comment.