Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,14 @@
ga('create', 'UA-41203333-1', 'vertnet.org');
ga('send', 'pageview');
</script>
<script>
var $buoop = {c:2};
function $buo_f(){
var e = document.createElement("script");
e.src = "//browser-update.org/update.min.js";
document.body.appendChild(e);
};
try {document.addEventListener("DOMContentLoaded", $buo_f,false)}
catch(e){window.attachEvent("onload", $buo_f)}
</script>
</body>
7 changes: 7 additions & 0 deletions www/css/vertnet.css
Original file line number Diff line number Diff line change
Expand Up @@ -597,4 +597,11 @@ VNlegend {

table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after {
content: " \25B4\25BE"
}

.table-striped>tbody>tr:nth-child(odd)>td, .table-striped>tbody>tr:nth-child(odd)>th {
background-color: #efefef
}
.table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {
background-color: #e5e5e5
}
4 changes: 2 additions & 2 deletions www/js/app/models/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ define([
{
if (newtext.length == 0)
{
newtext = parts[i].replace(exp,"<a href='$1'>$1</a>");
newtext = parts[i].replace(exp,"<a target='_blank' href='$1'>$1</a>");
} else {
newtext = newtext + ", " + parts[i].replace(exp,"<a href='$1'>$1</a>");
newtext = newtext + ", " + parts[i].replace(exp,"<a target='_blank' href='$1'>$1</a>");
}
}
return newtext;
Expand Down
32 changes: 31 additions & 1 deletion www/js/app/views/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,47 @@ <h1><% var occid = this.model.getOccIdentifier() %> <%= occid %> <small><%= this

<div class="tab-pane fade active in" id="summary">
<p>

<!-- <p class="lead">Overview</p> -->
<%if (this.model.get('associatedmedia')) {
var link = this.model.get('associatedmedia'); %>
<div id="hasmedia">
<a target='_blank' href="<%= link %>">View media</a>
<span id="has-media-icon" class="glyphicon glyphicon-facetime-video"></span>

</div>

<% } %>

<!-- <div>
<label>
Show Map <input id="occ-detail-map-toggle" type="checkbox">
</label>
</div>
-->


<div id="occ-detail-map" class="occ-detail-map">
<div id="detailmap"></div>
</div>
</div>

<!-- <div id="occ-detail-map-toggle">
<div>
<div>
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
</a>
</div>
<div id="collapseOne" class="accordion-body collapse" style="height: 0px;">
<div class="accordion-inner">
<div id="occ-detail-map" class="occ-detail-map">

<div id="detailmap"></div>
</div>
</div>
</div>
</div>
</div>
-->
<table class="table table-striped">
<thead>
<tr>
Expand Down
8 changes: 8 additions & 0 deletions www/js/app/views/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,15 @@ define([
this.$('#show-error-tip').tooltip('hide');
}, this));

//Show-hide detail map

//this.$("#occ-detail-map-toggle").click(_.bind(function(e) {
// if (this.$('#occ-detail-map-toggle').is(':checked')) {
// $("#collapseOne").collapse('show');
// } else {
// $("#collapseOne").collapse('hide');
// }
//}, this));

// Handler for click.
this.$('#submit-issue-btn').click(_.bind(function(e) {
Expand Down
8 changes: 4 additions & 4 deletions www/js/app/views/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
</li>
<li>
<a href="http://www.vertnet.org/resources/norms.html">VertNet Norms</a>
</li>
</li>
<li>
<a href="http://vertnet.org/resources/datatoolscode.html">Datasets &amp; Tools</a>
</li>
<li>
<a href="http://www.vertnet.org/resources/workshops.html">Training Workshops</a>
</li>
Expand All @@ -68,9 +71,6 @@
<li>
<a href="http://www.vertnet.org/resources/publications.html">Publications &amp; Video</a>
</li>
<li>
<a href="http://www.vertnet.org/resources/developers.html">Developers</a>
</li>
</ul>
</li>
<li class="dropdown">
Expand Down
4 changes: 2 additions & 2 deletions www/js/app/views/publishers.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ <h1>Publishers <small>VertNet</small></h1>
<th>Publisher</th>
<th>Code</th>
<th>Location</th>
<th style="text-align:right">Records</th>
<th style="text-align:right">Resources</th>
<th class="sorttable_numeric" style="text-align:right">Records</th>
<th class="sorttable_numeric" style="text-align:right">Resources</th>
</tr>
</thead>
<tbody>
Expand Down
20 changes: 10 additions & 10 deletions www/js/app/views/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h1>Search <small>VertNet</small></h1>
</div>

<div class="form-group">
<label class="col-lg-2 control-label"><a id="show-dcTerms-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="dcTerms-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Darwin Core terms</label>
<label class="col-lg-2 control-label"><a id="show-instCode-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="instCode-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Institution</label>
<div class="col-lg-10">
<select class="form-control" id="inst-dropdown">
</select>
Expand All @@ -133,7 +133,7 @@ <h1>Search <small>VertNet</small></h1>

<div id="dwcterm">
<div class="form-group">
<label class="col-lg-2 control-label">&nbsp;</label>
<label class="col-lg-2 control-label"><a id="show-dcTerms-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="dcTerms-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Darwin Core terms</label>
<div class="vn-col-md-2">
<input id="collectioncode" class="form-control" type="text" placeholder="CollectionCode">
</div>
Expand Down Expand Up @@ -227,30 +227,30 @@ <h1>Search <small>VertNet</small></h1>
</div>

<div class="form-group">
<label class="col-lg-2 control-label"><a id="show-years-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="years-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Years ranging from</label>
<label class="col-lg-2 control-label"><a id="show-years-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="years-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Years from</label>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="datestart" placeholder='1888'>
<input class="form-control" type="text" id="datestart">
</div>
<div id="dateto" class="col-md-0">
to
</div>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="dateend" placeholder='1922'>
<input class="form-control" type="text" id="dateend">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label"><a id="show-years-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="years-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Months ranging from</label>
<label class="col-lg-2 control-label"><a id="show-months-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="months-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Months from</label>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="monthstart" placeholder='3'>
<input class="form-control" type="text" id="monthstart">
</div>
<div id="dateto" class="col-md-0">
to
</div>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="monthend" placeholder='5'>
<input class="form-control" type="text" id="monthend">
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-lg-2 control-label"><a id="show-years-tip" href="http://www.vertnet.org/resources/advancedsearchoptionsguide.html" target="_blank"><span id="years-tip" class="infotipDisplay"><b class="glyphicon glyphicon-info-sign infotip"></b></span></a>Days ranging from</label>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="daystart" placeholder='9'>
Expand All @@ -261,7 +261,7 @@ <h1>Search <small>VertNet</small></h1>
<div class="vn-col-md-2">
<input class="form-control" type="text" id="dayend" placeholder='15'>
</div>
</div>
</div> -->
</form>

<div class="spacer"></div>
Expand Down
28 changes: 26 additions & 2 deletions www/js/app/views/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ define([
this.$('#show-recordType-tip').tooltip('hide');
}, this));

this.$('#show-instCode-tip').tooltip({
placement: 'top',
html: 'true',
title: 'Search will identify all records with the exact terms contained within the specified Darwin Core field(s).<br><br>Read more...',
container: '#instCode-tip'
});
this.$('#instCode-tip').mouseover(_.bind(function(e) {
this.$('#show-instCode-tip').tooltip('show');
}, this)).mouseout(_.bind(function(e) {
this.$('#show-instCode-tip').tooltip('hide');
}, this));

this.$('#show-dcTerms-tip').tooltip({
placement: 'top',
html: 'true',
Expand All @@ -393,13 +405,25 @@ define([
this.$('#show-years-tip').tooltip('hide');
}, this));

this.$('#show-months-tip').tooltip({
placement: 'top',
html: 'true',
title: 'Search will identify all records contained within the range of months submitted.<br><br>Read more...',
container: '#months-tip'
});
this.$('#months-tip').mouseover(_.bind(function(e) {
this.$('#show-months-tip').tooltip('show');
}, this)).mouseout(_.bind(function(e) {
this.$('#show-months-tip').tooltip('hide');
}, this));

//Get List of institutions and institutionCodes for institutionCode select
$.getJSON("http://vertnet.cartodb.com/api/v2/sql?q=SELECT icode, orgname, concat(icode,': ',orgname) AS instcombo FROM resource where ipt=TRUE AND networks LIKE %27%25VertNet%25%27 GROUP BY icode, orgname ORDER BY orgname, icode",function(institutions) {
$.getJSON("http://vertnet.cartodb.com/api/v2/sql?q=SELECT icode, orgname, concat(icode,' - ',orgname) AS instcombo FROM resource where ipt=TRUE AND networks LIKE %27%25VertNet%25%27 GROUP BY icode, orgname ORDER BY icode, orgname",function(institutions) {
var listItems = '<option value="">Select institution</option>';

$.each(institutions.rows, function(key, val) {

listItems += "<option value='" + val.icode + "'>" + val.orgname + "</option>";
listItems += "<option value='" + val.icode + "'>" + val.instcombo + "</option>";

$("#inst-dropdown").html(listItems);
});
Expand Down