diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index b080ce0e..cc3cf15f 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -127,10 +127,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?>
-
@@ -392,131 +392,71 @@ endforeach;

Cannot find the metadata.

diff --git a/htdocs/js/metadata-view.js b/htdocs/js/metadata-view.js index ee5e5c7f..ab1c6fa7 100644 --- a/htdocs/js/metadata-view.js +++ b/htdocs/js/metadata-view.js @@ -1,3 +1,33 @@ +function literature_get(page,uuid){ + $.ajax({ + type:"GET", + url:"/service/literature/uuid/"+uuid, + data:'page='+page, + success:function(html){$('#literature-list').html('
    '+html+'
');}, + beforeSend:function(){$('#literature-list').html('加载中');} + }); +} + +function recommend_get(page,uuid){ + $.ajax({ + type:"GET", + url:"/service/recommend/uuid/"+uuid, + data:'page='+page, + success:function(html){$('#recommend').html('');}, + beforeSend:function(){$('#recommend').html('加载中');} + }); +} + +function related_get(page,uuid){ + $.ajax({ + type:"GET", + url:"/service/related/uuid/"+uuid, + data:'page='+page, + success:function(html){$('#related').html('
    '+html+'
');}, + beforeSend:function(){$('#related').html('加载中');} + }); +} + function postcomment(){ var url="/data/postcomment"; var date = $('#postcommentform').serialize(); @@ -163,4 +193,86 @@ function onDataVersionLoad(data){ function Alert(html){ $.colorbox({'innerWidth':'50%','html':'

'+html+'

'}); +} + +function getFileList_h(uuid){ + html ='
' + + '
' + + '
' + + '
加载中...
' + + '
    ' + + '
' + + '
' + + '
' + +'
'; + $.colorbox({width:"80%",height:"80%",html:html}); + $.getJSON("/service/filelist/uuid/"+uuid, function(data) { + var items = []; + if(data.length>0) + { + $.each(data, function(key, val) { + if(val['filename'].match(/\/$/)) + { + items.push('
  • + ' + val['filename'] + '
  • '); + }else{ + items.push('
  • ' + val['filename'] + '
  • '); + } + }); + }else{ + items.push('
  • 暂无数据
  • '); + } + $('#file-list').html(items.join('')); + }) + .complete(function() { + $('#window-loading').hide(); + }); +} + +function ajaxpage_get(page,uuid){ + var url = "/data/comment/uuid/"+uuid; + data='page='+page; + $.ajax({ + type:"GET", + url:url, + data:data, + success:function(html){$('#allcomments').html(html);}, + beforeSend:function(){$('#allcomments').html('评论加载中');} + }); +}; + +//map +//加载地图 +function initialize() { + var myLatlng = new google.maps.LatLng(bound.lat,bound.lng); + + zoomlevel = bound.zoom; + + var myOptions = { + zoom: zoomlevel, + center: myLatlng, + mapTypeId: google.maps.MapTypeId.HYBRID + } + map = new google.maps.Map(document.getElementById(mapElementID), myOptions); + + setRectangle(bound.east,bound.west,bound.south,bound.north); +} + +function setRectangle(east,west,south,north){ + + bounds = new google.maps.LatLngBounds( + new google.maps.LatLng(south,west), + new google.maps.LatLng(north,east) + ); + + rectangle = new google.maps.Rectangle({ + bounds: bounds, + editable: false + }); + + rectangle.setMap(map); + + var bounds = new google.maps.LatLngBounds(); + bounds.extend(new google.maps.LatLng(south, west)); + bounds.extend(new google.maps.LatLng(north,east)); + map.fitBounds(bounds); } \ No newline at end of file