Skip to content
Snippets Groups Projects
Commit 28a0a1a0 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Hide then show pubdate.

parent e06e85ad
No related merge requests found
......@@ -38,15 +38,14 @@ function loadVis(facetFields, searchParams, baseURL, zooming) {
// AJAX call
var url = baseURL + '/AJAX/json?method=getVisData&facetFields=' + encodeURIComponent(facetFields) + '&' + searchParams;
//alert(url);
$.getJSON(url, function (data) {
if (data.status == 'OK') {
$.each(data['data'], function(key, val) {
//check if there is data to display, if there isn't hide the box
if (val['data'].length == 0){
$("#datevis" + key + "xWrapper").hide();
if (val['data'] == undefined || val['data'].length == 0) {
return;
}
$("#datevis" + key + "xWrapper").show();
// plot graph
var placeholder = $("#datevis" + key + "x");
......
......@@ -9,7 +9,7 @@
<? foreach ($visFacets as $facetField=>$facetRange): ?>
<div class="authorbox">
<div id="datevis<?=$this->escapeHtml($facetField)?>xWrapper">
<div id="datevis<?=$this->escapeHtml($facetField)?>xWrapper" style="display: none;">
<strong><?=$this->translate($facetRange['label']) ?></strong>
<? /* space the flot visualisation */ ?>
<div id="datevis<?=$facetField ?>x" style="margin:0 10px;width:auto;height:80px;cursor:crosshair;"></div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment