diff --git a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/ajax-search.php b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/ajax-search.php index 76eaf44a..9d88640e 100644 --- a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/ajax-search.php +++ b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/ajax-search.php @@ -28,22 +28,19 @@ // Prepare the WHERE clause $where = "WHERE r.finished = 1 "; - if(isset($_GET["startrev"]) || isset($_GET["source"]) || isset($_GET["platform"])) - { - if(isset($_GET["startrev"])) - $where .= "AND r.revision >= " . (int)$_GET["startrev"] . " AND r.revision <= " . (int)$_GET["endrev"] . " "; - - if(isset($_GET["source"])) - $where .= "AND src.name LIKE " . $dbh->quote("%" . $_GET["source"] . "%") . " "; - - if(isset($_GET["platform"])) - $where .= "AND r.platform LIKE " . $dbh->quote($_GET["platform"] . "%") . " "; - } + if(isset($_GET["startrev"]) && $_GET["startrev"]) + $where .= "AND r.revision >= " . (int)$_GET["startrev"] . " AND r.revision <= " . (int)$_GET["endrev"] . " "; + if(isset($_GET["source"]) && $_GET["source"]) + $where .= "AND src.name LIKE " . $dbh->quote("%" . $_GET["source"] . "%") . " "; + + if(isset($_GET["platform"]) && $_GET["platform"]) + $where .= "AND r.platform LIKE " . $dbh->quote($_GET["platform"] . "%") . " "; + // Prepare some clauses $tables = "FROM winetest_runs r JOIN sources src ON r.source_id = src.id "; - if(isset($_GET["desc"])) + if(isset($_GET["desc"]) && $_GET["desc"]) $order = "ORDER BY revision DESC, r.id DESC "; else $order = "ORDER BY revision ASC, r.id ASC "; diff --git a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/config.inc.php b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/config.inc.php index a911734a..61bc7cc8 100644 --- a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/config.inc.php +++ b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/config.inc.php @@ -15,7 +15,7 @@ define("DEFAULT_SEARCH_LIMIT", 10); define("DEFAULT_SEARCH_SOURCE", "CMake_x86_GCCLin (KVM)"); - define("MAX_COMPARE_RESULTS", 5); + define("MAX_COMPARE_RESULTS", 8); define("RESULTS_PER_PAGE", 100); ?> diff --git a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/css/index.css b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/css/index.css index d5110536..85862972 100644 --- a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/css/index.css +++ b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/css/index.css @@ -28,7 +28,7 @@ button { } select { - width: 200px; + width: 275px; } th.TestCheckbox { @@ -37,6 +37,7 @@ th.TestCheckbox { #searchform tr td { vertical-align: top; + padding-bottom: 10px; } .controlgroup { @@ -92,7 +93,7 @@ th.TestCheckbox { .comboedit { position: relative; background-color: white; - width: 200px; + width: 275px; height: 18px; } @@ -101,7 +102,7 @@ th.TestCheckbox { top: 0px; left: 0px; font-size: 14px; - width: 200px; + width: 275px; margin: 0; } @@ -109,7 +110,7 @@ th.TestCheckbox { position: absolute; top: 2px; left: 4px; - width: 176px; + width: 251px; padding: 1px; font-size: 14px; border: none !important; diff --git a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/index.php b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/index.php index 6bcb176f..0a3e9259 100644 --- a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/index.php +++ b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/index.php @@ -52,8 +52,6 @@ //first hide, then fadeIn jQuery("#js_stuff").hide(); jQuery("#js_stuff").fadeIn(500); - if(window.localStoratge) - document.getElementById('search_source').value = window.localStorage.getItem('testman_source'); });

diff --git a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/js/index.js.php b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/js/index.js.php index f05aa651..d9b3b56a 100644 --- a/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/js/index.js.php +++ b/www/www.reactos.org/drupal/sites/all/modules/reactos/testman/js/index.js.php @@ -12,6 +12,7 @@ var data; var FullRange; var inputbox_startrev; var inputbox_endrev; +var initialSearch = 1; var PageCount; var ResultCount; var SelectedResults = new Object(); @@ -238,7 +239,13 @@ function Load() data["desc"] = 1; data["limit"] = ; - data["source"] = ""; + + if(window.localStorage && window.localStorage.getItem('testman_source')) + data["source"] = window.localStorage.getItem('testman_source'); + else + data["source"] = ""; + + document.getElementById('search_source').value = data["source"]; data["page"] = CurrentPage; data["resultlist"] = 1; @@ -267,6 +274,8 @@ function SearchCallback(HttpRequest) } var html = ""; + var first_rev = 0; + var last_rev = 0; if(data["resultlist"]) { @@ -417,7 +426,22 @@ function SearchCallback(HttpRequest) SearchCall(); return; } - + + if(initialSearch) + { + first_rev = HttpRequest.responseXML.getElementsByTagName("firstrev")[0].firstChild.data + last_rev = HttpRequest.responseXML.getElementsByTagName("lastrev")[0].firstChild.data + + if(first_rev == last_rev) + document.getElementById('search_revision').value = first_rev; + else if(first_rev > last_rev) + document.getElementById('search_revision').value = last_rev + "-" + first_rev; + else + document.getElementById('search_revision').value = first_rev + "-" + last_rev; + + initialSearch = 0; + } + document.getElementById("ajax_loading_search").style.visibility = "hidden"; }