Snapshot page - implement new advanced search.

This commit is contained in:
Jessica Wang 2010-12-27 12:08:35 -08:00
parent 2a87d31e93
commit bc8b7ed1ae
2 changed files with 5 additions and 12 deletions

View File

@ -203,11 +203,7 @@
<div id="advanced_search_popup" class="adv_searchpopup_bg" style="display: none;"> <div id="advanced_search_popup" class="adv_searchpopup_bg" style="display: none;">
<div class="adv_searchformbox"> <div class="adv_searchformbox">
<form action="#" method="post"> <form action="#" method="post">
<ol> <ol>
<li>
<input class="text textwatermark" type="text" name="adv_search_name" id="adv_search_name"
value="by name" />
</li>
<li id="adv_search_domain_li" style="display: none;"> <li id="adv_search_domain_li" style="display: none;">
<select class="select" id="adv_search_domain"> <select class="select" id="adv_search_domain">
</select> </select>

View File

@ -24,19 +24,16 @@ function snapshotGetSearchParams() {
moreCriteria.push("&keyword="+todb(searchInput)); moreCriteria.push("&keyword="+todb(searchInput));
} }
var $advancedSearchPopup = $("#advanced_search_popup"); var $advancedSearchPopup = getAdvancedSearchPopupInSearchContainer();
if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) { if ($advancedSearchPopup.length > 0 && $advancedSearchPopup.css("display") != "none" ) {
var name = $advancedSearchPopup.find("#adv_search_name").val();
if (name!=null && trim(name).length > 0)
moreCriteria.push("&name="+todb(name));
if ($advancedSearchPopup.find("#adv_search_domain_li").css("display") != "none") { if ($advancedSearchPopup.find("#adv_search_domain_li").css("display") != "none") {
var domainId = $advancedSearchPopup.find("#adv_search_domain").val(); var domainId = $advancedSearchPopup.find("#adv_search_domain").val();
if (domainId!=null && domainId.length > 0) if (domainId!=null && domainId.length > 0)
moreCriteria.push("&domainid="+domainId); moreCriteria.push("&domainid="+domainId);
} }
if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none") { if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none"
&& $advancedSearchPopup.find("#adv_search_account").hasClass("textwatermark") == false) {
var account = $advancedSearchPopup.find("#adv_search_account").val(); var account = $advancedSearchPopup.find("#adv_search_account").val();
if (account!=null && account.length > 0) if (account!=null && account.length > 0)
moreCriteria.push("&account="+account); moreCriteria.push("&account="+account);