make loading indicator work

This commit is contained in:
Sanj 2011-08-31 18:19:25 +05:30
parent c399888ab3
commit df1340cf1b
2 changed files with 3 additions and 1 deletions

View File

@ -16,12 +16,14 @@ $(function() {
e.preventDefault();
var bbox = map.getExtent().toBBOX();
var search_term = $('#search').val();
$('#searchField').addClass("loading");
$.getJSON("/feature/search.json", {
'bbox': bbox,
'q': search_term,
'srid': 3785,
'threshold': 0.5
}, function(features) {
$('#searchField').removeClass("loading");
$('#mapList tbody').empty();
// var headerRow = getHeaderRow();
// console.log(response);

View File

@ -24,7 +24,7 @@
<div class="header">
<form action="" method="get" class="searchForm" id="searchForm"><!--method is right???-->
<input type="text" placeholder="Search digital gazetteer" name="field" class="search loading" />
<input type="text" placeholder="Search digital gazetteer" id="searchField" name="field" class="search" />
<input type="submit" name="searchButton" value="Search" id="searchButton">
</form>