From d6915ab597253aa4ab23897bdf4c2aa3bd2a335d Mon Sep 17 00:00:00 2001 From: Alessandro Gubitosi Date: Mon, 4 Aug 2014 12:28:47 +0200 Subject: [PATCH] Fixed some bugs --- common/css/main.css | 2 +- common/include/conf/menu.php | 3 ++- common/js/_main/form.js | 21 +++++++++++++++------ common/js/_main/main.js | 6 ++++++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/common/css/main.css b/common/css/main.css index 0000ed01..4e17b846 100755 --- a/common/css/main.css +++ b/common/css/main.css @@ -730,7 +730,7 @@ section #se_p form .input-group, section #se_p #statistics { width: 100%; } } -section #se_p #summary { +section #se_p #summary, section #se_p #results { margin-top: 5em; } section #se_p .panel_content-head, section #se_p .panel_content-body, section #se_p .panel_content-footer { diff --git a/common/include/conf/menu.php b/common/include/conf/menu.php index 6bfe0ff7..ad2cb4d2 100644 --- a/common/include/conf/menu.php +++ b/common/include/conf/menu.php @@ -127,7 +127,8 @@ "class" => "btn btn-link" ), "divider" => "vertical-divider" - ), + ) + //), /* "Map" => array( "content" => array( diff --git a/common/js/_main/form.js b/common/js/_main/form.js index 7ba7943d..f56d9393 100644 --- a/common/js/_main/form.js +++ b/common/js/_main/form.js @@ -713,7 +713,6 @@ case kAPI_PARAM_INPUT_ENUM: rt[kAPI_PARAM_INPUT_TYPE] = af_obj[kAPI_PARAM_INPUT_TYPE]; rt[kAPI_RESULT_ENUM_TERM] = af_obj.term.split(","); - rt[kAPI_PARAM_GROUP] = [kTAG_DOMAIN]; active_forms[af_obj.tags] = rt; break; case kAPI_PARAM_INPUT_RANGE: @@ -890,6 +889,7 @@ }); if(storage_also) { $.remove_storage("pgrdg_cache." + content); + $.remove_storage("pgrdg_cache.selected_forms"); } }; @@ -1129,7 +1129,7 @@ if(content[kAPI_PARAM_RESPONSE_FRMT_DOCU] === undefined) { switch($.type(content[kAPI_PARAM_RESPONSE_FRMT_DISP])) { case "object": - r += '
  • ' + $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + content[kAPI_PARAM_RESPONSE_FRMT_DISP][kAPI_PARAM_RESPONSE_FRMT_DISP]; + r += '
  • ' + $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + $.highlight(content[kAPI_PARAM_RESPONSE_FRMT_DISP][kAPI_PARAM_RESPONSE_FRMT_DISP]); break; case "array": $.each(content[kAPI_PARAM_RESPONSE_FRMT_DISP], function(k, v) { @@ -1144,7 +1144,7 @@ if(v_type == "string") { r += '
  • ' + content[kAPI_PARAM_RESPONSE_FRMT_NAME] + ':
  • '; } else { @@ -1153,14 +1153,14 @@ break; case "string": if(content[kAPI_PARAM_RESPONSE_FRMT_LINK] !== undefined) { - r += '
  • ' + $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + content[kAPI_PARAM_RESPONSE_FRMT_DISP] + '
  • '; + r += '
  • ' + $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + $.highlight(content[kAPI_PARAM_RESPONSE_FRMT_DISP]) + '
  • '; } else { if(content[kAPI_PARAM_RESPONSE_FRMT_DISP] !== undefined) { if(content.serv !== undefined) { var a_id = $.uuid(); - r += '
  • '+ $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ':   ' + content[kAPI_PARAM_RESPONSE_FRMT_DISP] + '
  • '; + r += '
  • '+ $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ':   ' + $.highlight(content[kAPI_PARAM_RESPONSE_FRMT_DISP]) + '
  • '; } else { - r += '
  • '+ $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + content[kAPI_PARAM_RESPONSE_FRMT_DISP] + '
  • '; + r += '
  • '+ $.cycle_disp(content, kAPI_PARAM_RESPONSE_FRMT_NAME, "label") + ': ' + $.highlight(content[kAPI_PARAM_RESPONSE_FRMT_DISP]) + '
  • '; } } } @@ -1188,6 +1188,15 @@ return '
    '; }; + $.highlight = function(string) { + if($.isNumeric(string)) { + return '' + string + ''; + } else if (Date.parse("some string")) { + return '' + string + ''; + } else { + return string; + } + }; /** * Show row data contents diff --git a/common/js/_main/main.js b/common/js/_main/main.js index 8fed1b0b..a1cdb273 100644 --- a/common/js/_main/main.js +++ b/common/js/_main/main.js @@ -475,6 +475,12 @@ $("#contents #" + hash.toLowerCase()).fadeIn(300); } } + } else if(current_path == "Search"){ + if(hash.length > 0) { + if($("#contents #" + hash.toLowerCase() + " h1").html().length > 0) { + $("#contents #" + hash.toLowerCase()).fadeIn(300); + } + } } } }