Skip to content

Commit

Permalink
update gbif demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Dec 19, 2015
1 parent 5b9f098 commit 96d6b0d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
Binary file added demo/taxonomy-browser/busy_bg_eee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/taxonomy-browser/busy_bg_fff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions demo/taxonomy-browser/details.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<h3>{{#if vernacularName}} {{vernacularName}} {{else}} {{canonicalName}} {{/if}} <small>{{rank}}</small></h3>
<h3>
{{#if vernacularName}} {{vernacularName}} {{else}} {{canonicalName}} {{/if}}
{{#if isExtinct}} † {{/if}}
<small>{{rank}}</small>
</h3>
<!--
<h4>Taxonomy and Nomenclature</h4>
-->
<dl>
<dt>Scientific Name</dt>
<dd>{{scientificName}}</dd>
Expand Down Expand Up @@ -51,11 +57,15 @@
<dd>todo</dd>
-->
</dl>
GBIF Secretariat: GBIF Backbone Taxonomy, [YYYY-MM-DD].
Accessed via http://www.gbif.org/dataset/{{datasetKey}} on {{_now}}
<small>
GBIF Secretariat: GBIF Backbone Taxonomy,
Accessed via <a href="http://www.gbif.org/dataset/{{datasetKey}}">http://www.gbif.org/dataset/{{datasetKey}}</a> on {{_now}}
<p>
Open <a href="http://www.gbif.org/species/{{key}}"target="_blank">Authorative Information on GBIF</a>.
</p>
</small>
<!--
<div class="body">
{{body}}
</div>
-->
22 changes: 5 additions & 17 deletions demo/taxonomy-browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,29 @@
<link href="//cdn.jsdelivr.net/jquery.fancytree/2/skin-bootstrap/ui.fancytree.min.css"
rel="stylesheet" type="text/css">
<!--
-->
<script src="//cdn.jsdelivr.net/jquery.fancytree/2/jquery.fancytree-all.min.js"
type="text/javascript"></script>
-->
<!--
<script src="../../src/jquery.fancytree.js" type="text/javascript"></script>
<script src="../../src/jquery.fancytree.edit.js" type="text/javascript"></script>
<script src="../../src/jquery.fancytree.filter.js" type="text/javascript"></script>
<script src="../../src/jquery.fancytree.glyph.js" type="text/javascript"></script>
<script src="../../src/jquery.fancytree.table.js" type="text/javascript"></script>
<script src="../../src/jquery.fancytree.wide.js" type="text/javascript"></script>
-->

<link href="style.css" rel="stylesheet" type="text/css">
<script src="taxonomy-browser.js" type="text/javascript"></script>
<!--
<script src="details.tmpl" id="tmplDetails" type="text/x-handlebars-template"></script>
-->
</head>

<body>
<div class="page-header">
<h1>Taxonomy Browser</h1>
</div>
<!--
<div class="panel panel-default">
<div class="panel-body">
Search and browse the <a href="http://www.itis.gov/web_service.html">ITIS</a> database.
</div>
</div>
-->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Search <acronym title="Integrated Taxonomic Information System">ITIS</acronym></h3>
<h3 class="panel-title">Search <acronym title="Global Biodiversity Information Facility">GBIF</acronym></h3>
</div>
<div class="panel-body">

Expand Down Expand Up @@ -117,10 +109,6 @@ <h3 class="panel-title">Search <acronym title="Integrated Taxonomic Information
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active pane panel panel-default" id="tabDetails">
<!--
Details provided by
<acronym title="Integrated Taxonomic Information System">ITIS</acronym>:
-->
<div id="tsnDetails">
No data to display.
</div>
Expand All @@ -142,7 +130,7 @@ <h3 class="panel-title">Search <acronym title="Integrated Taxonomic Information
<div class="panel-body">
<p>
This site accesses data from external sources, namely the
<a href="http://www.itis.gov">Integrated Taxonomic Information System (ITIS)</a> database.
<a href="http://www.gbif.org/">Global Biodiversity Information Facility (GBIF)</a> database.
There is no guarantee, that the display is correct, complete, or
permanently available. Please refer to those original sources for
authorative information.
Expand Down
3 changes: 2 additions & 1 deletion demo/taxonomy-browser/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ div.panel[role=tabpanel] {
}
.busy {
color: gray;
background-color: #eee;
background-image: url("busy_bg_fff.png");
background-repeat: repeat;
}
13 changes: 9 additions & 4 deletions demo/taxonomy-browser/taxonomy-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ $("#taxonTree").fancytree({
// url: GBIF_URL + "getKingdomNames",
url: GBIF_URL + "species/search",
data: {
rank: "kingdom"
rank: "kingdom",
limit: 200
// key: "1,10"
},
cache: true
Expand All @@ -246,6 +247,9 @@ $("#taxonTree").fancytree({
lazyLoad: function(event, data) {
data.result = {
url: GBIF_URL + "species/" + data.node.key + "/children",
data: {
limit: 200
},
cache: true
// dataType: "jsonp"
};
Expand All @@ -266,9 +270,10 @@ $("#taxonTree").fancytree({
data.node.info("SPPR", data);
},
activate: function(event, data) {
$("#tsnDetails").addClass("busy"); //text("...");
$("#tsnDetails").addClass("busy");
$("ol.breadcrumb").addClass("busy");
updateControls();
_delay("showDetails", 1000, function(){
_delay("showDetails", 500, function(){
updateTsnDetails(data.node.key);
updateBreadcrumb(data.node.key);
});
Expand Down Expand Up @@ -315,7 +320,7 @@ $("#searchResultTree").fancytree({
$tdList.eq(4).text(node.data.author);
},
activate: function(event, data) {
_delay("activateNode", 1000, function(){
_delay("activateNode", 500, function(){
updateTsnDetails(data.node.key);
updateBreadcrumb(data.node.key);
});
Expand Down

0 comments on commit 96d6b0d

Please sign in to comment.