This commit is contained in:
Karen 2011-08-31 19:24:51 +05:30
commit e739c416d3
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
$(function() {
$.getJSON("/feature/search_related.json", {
'id': FEATURE_ID
$.getJSON("/feature/" + FEATURE_ID + "/similar.json", {
}, function(data) {
for (var i=0; i<data.length;i++) {
var $row = getRow(data[i]);

View File

@ -15,8 +15,9 @@ $(function() {
$('#searchForm').submit(function(e) {
e.preventDefault();
var bbox = map.getExtent().toBBOX();
var search_term = $('#search').val();
var search_term = $('#searchField').val();
$('#searchField').addClass("loading");
$('#searchTerm').text(search_term);
$('#searchField').attr("disabled", "disabled");
$.getJSON("/feature/search.json", {
'bbox': bbox,
@ -32,7 +33,7 @@ $(function() {
}
$('#noOfResults').text(features.results);
$('#currPage').text(features.current_page);
$('#currPageNo').text(features.current_page);
$('#totalPages').text(features.pages);
$('#searchField').removeAttr("disabled");
$('#searchField').removeClass("loading");