Skip to content
Permalink
Browse files

visual tests: added stripped down autocomplete demo

  • Loading branch information
Paul Bakaus
Paul Bakaus committed Aug 11, 2008
1 parent 3c6607b commit d90fe750a3e77d7f0323483a1b60c5263428a1cd
Showing with 401 additions and 0 deletions.
  1. BIN tests/visual/autocomplete/bg.gif
  2. BIN tests/visual/autocomplete/images/Amsterdam Van-Gogh Museum.jpg
  3. BIN tests/visual/autocomplete/images/Amsterdam.jpg
  4. BIN tests/visual/autocomplete/images/Antwerpen Rubenshaus.jpg
  5. BIN tests/visual/autocomplete/images/Antwerpen.jpg
  6. BIN tests/visual/autocomplete/images/Appenzell.jpg
  7. BIN tests/visual/autocomplete/images/Arnhem Historisches Museum.jpg
  8. BIN tests/visual/autocomplete/images/Bled.jpg
  9. BIN tests/visual/autocomplete/images/Bled_Die Burg von Bled.jpg
  10. BIN tests/visual/autocomplete/images/Bogojina_Die Pfarrkirche.jpg
  11. BIN tests/visual/autocomplete/images/BolognaBasilicadiSanPetronio.jpg
  12. BIN tests/visual/autocomplete/images/BolognaFontanadelNettuno.jpg
  13. BIN tests/visual/autocomplete/images/BolognaPiazzaMaggiore.jpg
  14. BIN tests/visual/autocomplete/images/Bolsward Martinikerk.jpg
  15. BIN tests/visual/autocomplete/images/Bolsward Stadhuis.jpg
  16. BIN tests/visual/autocomplete/images/Bolsward.jpg
  17. BIN tests/visual/autocomplete/images/BordeauxND.jpg
  18. BIN tests/visual/autocomplete/images/BordeauxPlaceB.jpg
  19. BIN tests/visual/autocomplete/images/BotanischerGartenZuerich.jpg
  20. BIN tests/visual/autocomplete/images/Bouillon.jpg
  21. BIN tests/visual/autocomplete/images/Gent Hotel de Ville2.jpg
  22. BIN tests/visual/autocomplete/images/Gent.jpg
  23. BIN tests/visual/autocomplete/images/GenuaStrand.jpg
  24. BIN tests/visual/autocomplete/images/GenuabeiNacht.jpg
  25. BIN tests/visual/autocomplete/images/Giessbachfaelle Brienz.jpg
  26. BIN tests/visual/autocomplete/images/Giethoorn.jpg
  27. BIN tests/visual/autocomplete/images/Gnesen.jpg
  28. BIN tests/visual/autocomplete/images/Gornij Grad_KATHEDRALE.jpg
  29. BIN tests/visual/autocomplete/images/Gossensass.jpg
  30. BIN tests/visual/autocomplete/images/Grad_Burg Grad2.jpg
  31. BIN tests/visual/autocomplete/images/GrandDixence.jpg
  32. BIN tests/visual/autocomplete/images/GrenoblePanorama.jpg
  33. BIN tests/visual/autocomplete/images/Groningen.jpg
  34. BIN tests/visual/autocomplete/images/GrottenvonReclere.jpg
  35. BIN tests/visual/autocomplete/images/Guebwiller.jpg
  36. BIN tests/visual/autocomplete/images/Kamnik_Die Franziskaner Bibliothek.jpg
  37. BIN tests/visual/autocomplete/images/Karlsbad Muehlbrunnkolonnade.jpg
  38. BIN tests/visual/autocomplete/images/Kazimierz.jpg
  39. BIN tests/visual/autocomplete/images/KirchbergAltesRathaus1.jpg
  40. BIN tests/visual/autocomplete/images/KlagenfurtDom.jpg
  41. BIN tests/visual/autocomplete/images/KleineMeerjungfreu.jpg
  42. BIN tests/visual/autocomplete/images/LazienkiparkWarschau.jpg
  43. BIN tests/visual/autocomplete/images/LeHavreHafen.jpg
  44. BIN tests/visual/autocomplete/images/LeMans.jpg
  45. BIN tests/visual/autocomplete/images/Lednice.jpg
  46. BIN tests/visual/autocomplete/images/Leeuwarden Fries Museum.jpg
  47. BIN tests/visual/autocomplete/images/Leeuwarden.jpg
  48. BIN tests/visual/autocomplete/images/Lelystad.jpg
  49. BIN tests/visual/autocomplete/images/Lemmer.jpg
  50. BIN tests/visual/autocomplete/images/Leper Halles aux draps.jpg
  51. BIN tests/visual/autocomplete/images/Leuven Museum fuer Kirchenkunst.jpg
  52. BIN tests/visual/autocomplete/images/Leuven.jpg
  53. BIN tests/visual/autocomplete/images/Luxemburg.jpg
  54. BIN tests/visual/autocomplete/images/LuzernAltstadt.jpg
  55. BIN tests/visual/autocomplete/images/LuzernPicassoMuseum.jpg
  56. BIN tests/visual/autocomplete/images/Lyon.jpg
  57. BIN tests/visual/autocomplete/images/Maastricht Onze Lieve Vrou...jpg
  58. BIN tests/visual/autocomplete/images/Maastricht St Servaasbasiliek.jpg
  59. BIN tests/visual/autocomplete/images/Maastricht Walmuur.jpg
  60. BIN tests/visual/autocomplete/images/Maastricht.jpg
  61. BIN tests/visual/autocomplete/images/MagiatalMaggia.jpg
  62. BIN tests/visual/autocomplete/images/Mailand3.jpg
  63. BIN tests/visual/autocomplete/images/Metlika_Bela Krajina Museum.jpg
  64. BIN tests/visual/autocomplete/images/MilanoCastelloSforzesco.jpg
  65. BIN tests/visual/autocomplete/images/MilanoDom.jpg
  66. BIN tests/visual/autocomplete/images/MilazzoBurg.jpg
  67. BIN tests/visual/autocomplete/images/Novo Mesto_Das Museum.jpg
  68. BIN tests/visual/autocomplete/images/ObervellachBurgFalkenstein.jpg
  69. BIN tests/visual/autocomplete/images/OdenseeAndersen.jpg
  70. BIN tests/visual/autocomplete/images/Olimje_Kirche und Apotheke in Olimje.jpg
  71. BIN tests/visual/autocomplete/images/Olomouc.jpg
  72. BIN tests/visual/autocomplete/images/OlympischesMuseumLausanne.jpg
  73. BIN tests/visual/autocomplete/images/OrleansMaisonJeannedArc.jpg
  74. BIN tests/visual/autocomplete/images/OrleansParcFloraldelaSource.jpg
  75. BIN tests/visual/autocomplete/images/OstiaAntica.jpg
  76. BIN tests/visual/autocomplete/images/Ostrow Tumski.jpg
  77. BIN tests/visual/autocomplete/images/PoertschachSchlossLeonstain.jpg
  78. BIN tests/visual/autocomplete/images/Portoroz.jpg
  79. BIN tests/visual/autocomplete/images/Posen.jpg
  80. BIN tests/visual/autocomplete/images/Postojna.jpg
  81. BIN tests/visual/autocomplete/images/Prag Altstaedter Ring.jpg
  82. BIN tests/visual/autocomplete/images/Prag Waldsteinpalais.jpg
  83. BIN tests/visual/autocomplete/images/RouenNotreDame.jpg
  84. BIN tests/visual/autocomplete/images/Salzbergwerk Bex.jpg
  85. BIN tests/visual/autocomplete/images/SalzbergwerkWieliczka.jpg
  86. BIN tests/visual/autocomplete/images/SalzburgFestungHohensalzburg.jpg
  87. BIN tests/visual/autocomplete/images/SalzburgResidenz.jpg
  88. BIN tests/visual/autocomplete/images/WienMuseumsQuartier.jpg
  89. BIN tests/visual/autocomplete/images/WienMusikverein.jpg
  90. BIN tests/visual/autocomplete/images/WienRiesenrad.jpg
  91. BIN tests/visual/autocomplete/images/WienRingstrasse.jpg
  92. +132 −0 tests/visual/autocomplete/index.html
  93. BIN tests/visual/autocomplete/indicator.gif
  94. +216 −0 tests/visual/autocomplete/localdata.js
  95. +53 −0 tests/visual/autocomplete/main.css
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -0,0 +1,132 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<title>jQuery Autocomplete Plugin</title>

<script type="text/javascript" src="../../../jquery-1.2.6.js"></script>
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../../ui/ui.autocomplete.js"></script>

<script type='text/javascript' src='localdata.js'></script>
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" href="../../../themes/default/ui.all.css" type="text/css" media="screen" title="no title" charset="utf-8">

<script type="text/javascript">
$().ready(function() {

function findValueCallback(event, data, formatted) {
$("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result");
}

function formatItem(row) {
return row[0] + " (<strong>id: " + row[1] + "</strong>)";
}
function formatResult(row) {
return row[0].replace(/(<.+?>)/gi, '');
}

$("#suggest1").autocomplete({ data: cities });
$("#month").autocomplete({
data: months,
minChars: 0,
max: 12,
autoFill: true,
mustMatch: true,
matchContains: false,
scrollHeight: 220,
formatItem: function(data, i, total) {
// don't show the current month in the list of values (for whatever reason)
if ( data[0] == months[new Date().getMonth()] )
return false;
return data[0];
}
});
$("#suggest13").autocomplete({
data: emails,
minChars: 0,
width: 310,
matchContains: "word",
autoFill: false,
formatItem: function(row, i, max) {
return i + "/" + max + ": \"" + row.name + "\" [" + row.to + "]";
},
formatMatch: function(row, i, max) {
return row.name + " " + row.to;
},
formatResult: function(row) {
return row.to;
}
});

$("#suggest3").autocomplete({
data: cities,
multiple: true,
mustMatch: true,
autoFill: true
});

$("#tags").autocomplete(["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "pearl"], {
width: 320,
max: 4,
highlight: false,
multiple: true,
multipleSeparator: " ",
scroll: true,
scrollHeight: 300
});



$("#clear").click(function() {
$(":input").unautocomplete();
});
});

</script>

</head>

<body>

<div id="content">

<form autocomplete="off">
<p>
<label>Single City (local):</label>
<input type="text" id="suggest1" />
<input type="button" value="Get Value" />
</p>
<p>
<label>Month (local):</label>
<input type="text" id="month" />
<input type="button" value="Get Value" />
(Current month is excluded from list)
</p>
<p>
<label>E-Mail (local):</label>
<input type="text" id="suggest13" />
<input type="button" value="Get Value" />
</p>
<p>
<label>Multiple Cities (local):</label>
<textarea id='suggest3' cols='40' rows='3'></textarea>
<input type="button" value="Get Value" />
</p>
<p>
<label>Tags (local):</label>
<input type="text" id='tags' />
<input type="button" value="Get Value" />
</p>

<input type="submit" value="Submit" />
</form>


<button id="clear">Remove all autocompletes</button>

<h3>Result:</h3> <ol id="result"></ol>

</div>
</body>
</html>
Diff not rendered.
@@ -0,0 +1,216 @@
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var emails = [
{ name: "Peter Pan", to: "peter@pan.de" },
{ name: "Molly", to: "molly@yahoo.com" },
{ name: "Forneria Marconi", to: "live@japan.jp" },
{ name: "Master <em>Sync</em>", to: "205bw@samsung.com" },
{ name: "Dr. <strong>Tech</strong> de Log", to: "g15@logitech.com" },
{ name: "Don Corleone", to: "don@vegas.com" },
{ name: "Mc Chick", to: "info@donalds.org" },
{ name: "Donnie Darko", to: "dd@timeshift.info" },
{ name: "Quake The Net", to: "webmaster@quakenet.org" },
{ name: "Dr. Write", to: "write@writable.com" }
];
var cities = [
"Aberdeen", "Ada", "Adamsville", "Addyston", "Adelphi", "Adena", "Adrian", "Akron",
"Albany", "Alexandria", "Alger", "Alledonia", "Alliance", "Alpha", "Alvada",
"Alvordton", "Amanda", "Amelia", "Amesville", "Amherst", "Amlin", "Amsden",
"Amsterdam", "Andover", "Anna", "Ansonia", "Antwerp", "Apple Creek", "Arcadia",
"Arcanum", "Archbold", "Arlington", "Ashland", "Ashley", "Ashtabula", "Ashville",
"Athens", "Attica", "Atwater", "Augusta", "Aurora", "Austinburg", "Ava", "Avon",
"Avon Lake", "Bainbridge", "Bakersville", "Baltic", "Baltimore", "Bannock",
"Barberton", "Barlow", "Barnesville", "Bartlett", "Barton", "Bascom", "Batavia",
"Bath", "Bay Village", "Beach City", "Beachwood", "Beallsville", "Beaver",