Skip to content

Commit

Permalink
Fixed some bug in time filter, left only with custom option
Browse files Browse the repository at this point in the history
  • Loading branch information
k-joseph committed Jul 9, 2015
1 parent 8cf6d96 commit f1a2012
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions omod/src/main/webapp/fragments/resultBox.gsp
Expand Up @@ -7,6 +7,7 @@
jQuery( document ).ready(function() {
refresh_data(jsonAfterParse);
autoClickFirstResultToShowItsDetails(jsonAfterParse);
storeJsonFromServer(jsonAfterParse);
});
/* document.getElementById('result_main_box').innerHTML += resultText;*/
Expand Down
4 changes: 3 additions & 1 deletion omod/src/main/webapp/fragments/searchSavingSection.gsp
Expand Up @@ -563,10 +563,12 @@
jq(".inside_filter_categories").fadeOut(500);
jsonAfterParse = JSON.parse(results);
refresh_data(jsonAfterParse);
storeJsonFromServer(jsonAfterParse);
autoClickFirstResultToShowItsDetails(jsonAfterParse);
jq(".results_table_wrap").fadeIn(500);
autoClickFirstResultToShowItsDetails(jsonAfterParse);
jq(".inside_filter_categories").fadeIn(500);
jq("#bookmark-category-names").text(cats);
jq("#bookmark-search-phrase").text(phrase);
Expand Down
4 changes: 3 additions & 1 deletion omod/src/main/webapp/fragments/topArea.gsp
Expand Up @@ -297,10 +297,12 @@
jq(".inside_filter_categories").fadeOut(500);
jsonAfterParse = JSON.parse(results);
refresh_data(jsonAfterParse);
storeJsonFromServer(jsonAfterParse);
autoClickFirstResultToShowItsDetails(jsonAfterParse);
jq(".results_table_wrap").fadeIn(500);
autoClickFirstResultToShowItsDetails(jsonAfterParse);
jq(".inside_filter_categories").fadeIn(500);
showHistorySuggestionsOnLoad();
Expand Down
2 changes: 2 additions & 0 deletions omod/src/main/webapp/pages/chartsearch.gsp
Expand Up @@ -29,4 +29,6 @@ ${ ui.includeFragment("chartsearch", "cssIncludes") }
${ ui.includeFragment("chartsearch", "topArea") }
<div style="clear:both;"></div>

<input type='hidden' id='json-stored-string' />

</div>
9 changes: 7 additions & 2 deletions omod/src/main/webapp/resources/scripts/views_factory.js
Expand Up @@ -1588,8 +1588,8 @@ function isLoggedInSynchronousCheck() {// $.getJSON(emr.fragmentActionLink('html
}

function filterResultsUsingTime(selectedPeriod) {

var newResultsJson = jsonAfterParse;
var storedJsonAfterParse = JSON.parse($("#json-stored-string").val());
var newResultsJson = storedJsonAfterParse;
var new_obs_groups = [];
var new_obs_singles = [];
var new_patientAllergies = [];
Expand Down Expand Up @@ -1789,3 +1789,8 @@ function getMatchedDatePeriod(dateTime, period) {

return matchedPeriod;
}

function storeJsonFromServer(json) {
var jsonStringToStore = JSON.stringify(json);
$("#json-stored-string").val(jsonStringToStore);
}

0 comments on commit f1a2012

Please sign in to comment.