From 58419a9ef4d07dc83fe8f9f19417557c4d260653 Mon Sep 17 00:00:00 2001 From: juliar Date: Wed, 24 Oct 2012 09:23:02 +0200 Subject: [PATCH 1/2] =?UTF-8?q?stoppade=20tillbaka=20autocomplete=20thingy?= =?UTF-8?q?=20i=20functions.js.=20Och=20=C3=A4ndrade=20rubrikstorlek=20i?= =?UTF-8?q?=20changeInfo=20(om=20f=C3=B6r=20stort-syns=20inte=20felmeddela?= =?UTF-8?q?nden...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/resources/js/functions.js | 60 ++++++++++++++++++++++- src/main/webapp/users/changeInfo.xhtml | 6 +-- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/resources/js/functions.js b/src/main/webapp/resources/js/functions.js index 529a5ec..9fd52c5 100644 --- a/src/main/webapp/resources/js/functions.js +++ b/src/main/webapp/resources/js/functions.js @@ -8,7 +8,7 @@ // This is a bug-fix. function greeting() { -alert("hej"); + alert("hej"); } var $ = jQuery; @@ -31,4 +31,60 @@ $(document).ready(function() { $(this).addClass("arrow_right"); } }); // toggle end -}); // document ready end \ No newline at end of file +}); // document ready end + + +//This adds an autocomplete function to the From and To fields. +//delay a bit in the textfield after entering a letter... +$(document).ready(function() { + $(function() { + var availableTags = [ + "Arlanda (Stockholm)", + + "Schiphol (Amsterdam)", + + "Bangkok International", + + "Beijing Capital International", + + "Dubai International", + + "Frankfurt Airport", + + "Haneda Airport (Tokyo)", + + "Heathrow (London)", + + "Hong Kong International", + + "O'Hare (Chicago)", + + "John F. Kennedy (New York City)", + + "Landvetter (Gothenburg)", + + "Leonardo da Vinci-Fiumicino (Rome)", + + "London Gatwick", + + "Los Angeles International", + + "Madrid Barajas", + + "McCarran International (Las Vegas)", + + "Munich Airport", + + "Newark Liberty (New Jersey)", + + "Paris-Charles de Gaulle", + + "San Francisco International", + + "Singapore Changi", + ]; + $( ".autoCompleteInputForm" ).autocomplete({ + source: availableTags + }); + }); +}); \ No newline at end of file diff --git a/src/main/webapp/users/changeInfo.xhtml b/src/main/webapp/users/changeInfo.xhtml index c47018e..dd8459a 100644 --- a/src/main/webapp/users/changeInfo.xhtml +++ b/src/main/webapp/users/changeInfo.xhtml @@ -24,7 +24,7 @@ -


Change your personal info:

+


Change your personal info:

@@ -56,7 +56,7 @@ -


Change password

+


Change password

@@ -78,7 +78,7 @@