From 8d4f03728ba78fdc525ecab06ac29b58da00fc66 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 19 Dec 2011 07:45:29 +0000 Subject: [PATCH] =?UTF-8?q?metadata-1.0=20=E5=A4=84=E7=90=86bing=20ajax?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=97=A0=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/views/scripts/data/view.phtml | 2 ++ application/default/views/scripts/heihe/view.phtml | 4 +++- application/default/views/scripts/water/view.phtml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 8ed46347..e93d005f 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -533,6 +533,8 @@ function bingSearch(keyword){ success:function(html){ var items = []; var obj = jQuery.parseJSON(html); + if(obj.SearchResponse.Web.Total==0) + {$('#searchlist').html("No results!");return false;} $.each(obj.SearchResponse.Web.Results, function(key, val) { var html = '

'+val['Title']+'

' +val['DisplayUrl'].replace(/%(.*)/i,"") +'

' diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml index 237d5682..5452f9c2 100755 --- a/application/default/views/scripts/heihe/view.phtml +++ b/application/default/views/scripts/heihe/view.phtml @@ -499,6 +499,8 @@ function bingSearch(keyword){ success:function(html){ var items = []; var obj = jQuery.parseJSON(html); + if(obj.SearchResponse.Web.Total==0) + {$('#searchlist').html("No results!");return false;} $.each(obj.SearchResponse.Web.Results, function(key, val) { var html = '

'+val['Title']+'

' +val['DisplayUrl'].replace(/%(.*)/i,"") +'

' @@ -564,7 +566,7 @@ zoomlevel--; new GLatLng(south; ?>,east; ?>), new GLatLng(south; ?>,west; ?>), new GLatLng(north; ?>,west; ?>) - ],"#f33f00",5,1,"#ff0000",0.2); + ],"#e4e4e4",5,1,"#FFFFFF",0.0); map.addOverlay(polygon); } diff --git a/application/default/views/scripts/water/view.phtml b/application/default/views/scripts/water/view.phtml index b4b08eb1..6f1abb55 100755 --- a/application/default/views/scripts/water/view.phtml +++ b/application/default/views/scripts/water/view.phtml @@ -489,6 +489,8 @@ function bingSearch(keyword){ success:function(html){ var items = []; var obj = jQuery.parseJSON(html); + if(obj.SearchResponse.Web.Total==0) + {$('#searchlist').html("No results!");return false;} $.each(obj.SearchResponse.Web.Results, function(key, val) { var html = '

'+val['Title']+'

' +val['DisplayUrl'].replace(/%(.*)/i,"") +'

'