修改高级搜索中的bug,修改相关文献和相关搜索部分
This commit is contained in:
parent
4dfafbb55b
commit
1576d6f258
|
@ -135,7 +135,7 @@ function setRectangle(east,west,south,north){
|
||||||
|
|
||||||
google.maps.event.addListener(rectangle, 'bounds_changed', function () {
|
google.maps.event.addListener(rectangle, 'bounds_changed', function () {
|
||||||
var latlng = rectangle.getBounds();
|
var latlng = rectangle.getBounds();
|
||||||
MapValueChange(latlng.ca.d,latlng.Z.d,latlng.ca.b,latlng.Z.b);
|
MapValueChange(latlng.fa.d,latlng.Z.d,latlng.fa.b,latlng.Z.b);
|
||||||
//console.dir(latlng);
|
//console.dir(latlng);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
$this->theme->AppendPlus($this,'google_map_v3');
|
$this->theme->AppendPlus($this,'google_map_v3');
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
?>
|
?>
|
||||||
|
<style>
|
||||||
|
h3.gs_rt{font-size:110%;}
|
||||||
|
</style>
|
||||||
<?php $md=$this->metadata;if ($md):?>
|
<?php $md=$this->metadata;if ($md):?>
|
||||||
<h3><?php echo $this->escape($md->title);
|
<h3><?php echo $this->escape($md->title);
|
||||||
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
|
@ -124,15 +126,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
<div id="related" class="tab-pane active">
|
<div id="related" class="tab-pane active">
|
||||||
</div>
|
</div>
|
||||||
<div id="literature" class="tab-pane">
|
<div id="literature" class="tab-pane">
|
||||||
|
<div class="">
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
<li><a href="javascript:;" class="literatures">西部计划知识库</a></li>
|
||||||
|
<li><a href="javascript:;" class="scholar">Google学术搜索</a></li>
|
||||||
|
<li><a href="javascript:;" class="cnkiSearch">CNKI学术搜索</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="literature-list">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="gsearch" class="tab-pane">
|
<div id="gsearch" class="tab-pane">
|
||||||
<ul id="searchctrl" class="unstyled span2">
|
<ul id="searchlist" class="unstyled well well-small"></ul>
|
||||||
<li><a href="javascript:;" class="googlesearch">Google搜索</a></li>
|
|
||||||
<li><a href="javascript:;" class="bingsearch">BING搜索</a></li>
|
|
||||||
<li><a href="javascript:;" class="scholar">Google学术搜索</a></li>
|
|
||||||
<li><a href="javascript:;" class="cnkiSearch">CNKI学术搜索</a></li>
|
|
||||||
</ul>
|
|
||||||
<ul id="searchlist" class="unstyled span6 well well-small"></ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="service" class="tab-pane">
|
<div id="service" class="tab-pane">
|
||||||
<?php if ($this->downhistory) : ?>
|
<?php if ($this->downhistory) : ?>
|
||||||
|
@ -390,8 +395,8 @@ endforeach;
|
||||||
ajaxpage(0);
|
ajaxpage(0);
|
||||||
$('#literature_t').click(function(){literature(1);});
|
$('#literature_t').click(function(){literature(1);});
|
||||||
//ajax literature
|
//ajax literature
|
||||||
function literature(page){$.ajax({type:"GET",url:"/service/literature/uuid/<?= $md->uuid; ?>",data:'page='+page,success:function(html){$('#literature').html('<ol start="'+ ((page-1)*10+1) +'">'+html+'</ol>');},
|
function literature(page){$.ajax({type:"GET",url:"/service/literature/uuid/<?= $md->uuid; ?>",data:'page='+page,success:function(html){$('#literature-list').html('<ol start="'+ ((page-1)*10+1) +'">'+html+'</ol>');},
|
||||||
beforeSend:function(){$('#literature').html('<img src="/images/loading.gif" />加载中');}});}
|
beforeSend:function(){$('#literature-list').html('<img src="/images/loading.gif" />加载中');}});}
|
||||||
|
|
||||||
$('#related_t').click(function(){related(1);});
|
$('#related_t').click(function(){related(1);});
|
||||||
//ajax related
|
//ajax related
|
||||||
|
@ -454,6 +459,8 @@ $('#gsearch_t').click(function(){
|
||||||
googleSearch('<?php echo $ev;?>');
|
googleSearch('<?php echo $ev;?>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.literatures').click(function(){literature(1);});
|
||||||
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
|
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
|
||||||
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
|
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
|
||||||
$('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');});
|
$('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');});
|
||||||
|
|
|
@ -89,43 +89,11 @@ function scholarSearch(keyword){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
items.push('<li class="more"><a href="'+obj.morelink+'" target="_blank">查看更多搜索结果</a></div>');
|
items.push('<li class="more"><a href="'+obj.morelink+'" target="_blank">查看更多搜索结果</a></div>');
|
||||||
$('#searchlist').html(items.join(''));
|
$('#literature-list').html(items.join(''));
|
||||||
searchFinish();
|
searchFinish();
|
||||||
},
|
},
|
||||||
beforeSend:function(){$('#searchlist').html('<img src="/images/loading.gif" />结果加载中');},
|
beforeSend:function(){$('#literature-list').html('<img src="/images/loading.gif" />结果加载中');},
|
||||||
error:function(){$('#searchlist').html('');Alert('检索中发现错误,请稍后重试或直接访问');}
|
error:function(){$('#literature-list').html('');Alert('检索中发现错误,请稍后重试或直接访问');}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function bingSearch(keyword){
|
|
||||||
$.ajax({type:"POST",url:"/service/bingsearch",data:'q='+keyword,
|
|
||||||
success:function(html){
|
|
||||||
var items = [];
|
|
||||||
var obj = jQuery.parseJSON(html);
|
|
||||||
if($.isArray(obj.SearchResponse.Web))
|
|
||||||
{
|
|
||||||
if(obj.SearchResponse.Web.Total==0)
|
|
||||||
{
|
|
||||||
$('#searchlist').html("No results!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$.each(obj.SearchResponse.Web.Results, function(key, val) {
|
|
||||||
var html = '<p><a href="' +val['Url']+'">'+val['Title']+'<a/></p><p><span>'
|
|
||||||
+val['DisplayUrl'].replace(/%(.*)/i,"") +'</span></p><p>'
|
|
||||||
+val['Description']
|
|
||||||
+'</p>';
|
|
||||||
items.push('<li>' + html + '</li>');
|
|
||||||
});
|
|
||||||
items.push('<li class="more"><a href="http://cn.bing.com/search?q='+encodeURIComponent(keyword)+
|
|
||||||
'&go=&qs=n&sk=&form=QBLH" target="_blank">查看更多搜索结果(约'+obj.SearchResponse.Web.Total+'条)</a></div>');
|
|
||||||
}else{
|
|
||||||
Alert('暂无搜索结果');$('#searchlist').html('');
|
|
||||||
}
|
|
||||||
$('#searchlist').html(items.join(''));
|
|
||||||
searchFinish();
|
|
||||||
},
|
|
||||||
beforeSend:function(){$('#searchlist').html('<img src="/images/loading.gif" />结果加载中');},
|
|
||||||
error:function(){$('#searchlist').html('');Alert('检索中发现错误,请稍后重试或直接访问');}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,11 +116,11 @@ function cnkiSearch(keyword){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
items.push('<li class="more"><a href="'+obj.morelink+'" target="_blank">查看更多搜索结果</a></div>');
|
items.push('<li class="more"><a href="'+obj.morelink+'" target="_blank">查看更多搜索结果</a></div>');
|
||||||
$('#searchlist').html(items.join(''));
|
$('#literature-list').html(items.join(''));
|
||||||
searchFinish()
|
searchFinish()
|
||||||
},
|
},
|
||||||
beforeSend:function(){$('#searchlist').html('<img src="/images/loading.gif" />结果加载中');},
|
beforeSend:function(){$('#literature-list').html('<img src="/images/loading.gif" />结果加载中');},
|
||||||
error:function(){Alert('检索中发现错误,请稍后重试或直接访问');$('#searchlist').html('');}
|
error:function(){Alert('检索中发现错误,请稍后重试或直接访问');$('#literature-list').html('');}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue