Skip to content

Commit

Permalink
Hiding the graph when there no dupliacte results
Browse files Browse the repository at this point in the history
  • Loading branch information
k-joseph committed Jul 23, 2015
1 parent d92940a commit acea2ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions omod/src/main/webapp/fragments/searchSavingSection.gsp
Expand Up @@ -113,16 +113,16 @@
cursor: pointer;
}
#lauche-stored-bookmark, #lauche-other-chartsearch-features {
display:none;
}
</style>

<script type="text/javascript">
var jq = jQuery;
jq(document).ready(function() {
jq("#lauche-stored-bookmark").hide();
jq("#lauche-other-chartsearch-features").hide();
displayExistingBookmarks();
displayBothPersonalAndGlobalNotes(jsonAfterParse);
updateBookmarksAndNotesUI();
Expand Down
8 changes: 3 additions & 5 deletions omod/src/main/webapp/fragments/topArea.gsp
Expand Up @@ -7,10 +7,7 @@
var reversed = false;
jq(document).ready(function() {
jq('#searchText').focus();
jq("#chart-previous-searches-display").hide();
jq("#custom-date-dialog-content").hide();
jq("#ui-datepicker-start").datepicker();
jq("#ui-datepicker-stop").datepicker();
Expand All @@ -22,8 +19,6 @@
jq( "#date_filter_options" ).toggle();
});
jq("#chart-searches-suggestions").hide();
jq( "#date_filter_options" ).click(function(e) {
jq( "#date_filter_options" ).hide();
var txt = jq(e.target).text();
Expand Down Expand Up @@ -696,6 +691,9 @@
cursor: pointer;
color: rgb(79, 100, 155);
}
#chart-previous-searches-display, #custom-date-dialog-content, #chart-searches-suggestions {
display:none;
}
</style>

<article id="search-box">
Expand Down
5 changes: 4 additions & 1 deletion omod/src/main/webapp/resources/scripts/views_factory.js
Expand Up @@ -534,7 +534,10 @@ function load_single_detailed_obs(obs_id, obsIdElement) {
resultText += '</div>';

document.getElementById('obsgroup_view').innerHTML = resultText;
if (obsJSON.value_type == 'Numeric') {
var obsJSONDups = get_obs_history_json_by_name(obsJSON.concept_name);

if (obsJSON.value_type == 'Numeric'
&& obsJSONDups.length > 0) {
enable_graph(obs_id);
} else {
$(".demo-container").hide();
Expand Down

0 comments on commit acea2ef

Please sign in to comment.