Instance page - implement new advanced search.

This commit is contained in:
Jessica Wang 2010-12-27 11:48:00 -08:00
parent 4b57e3c239
commit 2203f9c403
4 changed files with 20 additions and 37 deletions

View File

@ -1493,11 +1493,7 @@
<div id="advanced_search_popup" class="adv_searchpopup_bg" style="display: none;">
<div class="adv_searchformbox">
<form action="#" method="post">
<ol>
<li>
<input class="text textwatermark" type="text" name="adv_search_name" id="adv_search_name"
value="by name" />
</li>
<ol>
<li>
<select class="select" id="adv_search_state">
<option value=""></option>
@ -1531,11 +1527,7 @@
<div id="advanced_search_popup_nostate" class="adv_searchpopup_bg" style="display: none;">
<div class="adv_searchformbox">
<form action="#" method="post">
<ol>
<li>
<input class="text textwatermark" type="text" name="adv_search_name" id="adv_search_name"
value="by name" />
</li>
<ol>
<li>
<select class="select" id="adv_search_zone">
</select>
@ -1554,11 +1546,7 @@
<div id="advanced_search_popup_nodomainaccount" class="adv_searchpopup_bg" style="display: none;">
<div class="adv_searchformbox">
<form action="#" method="post">
<ol>
<li>
<input class="text textwatermark" type="text" name="adv_search_name" id="adv_search_name"
value="by name" />
</li>
<ol>
<li>
<select class="select" id="adv_search_state">
<option value=""></option>

View File

@ -24,7 +24,7 @@ function alertGetSearchParams() {
moreCriteria.push("&keyword="+todb(searchInput));
}
var $advancedSearchPopup = $("#advanced_search_container").find("#advanced_search_popup");
var $advancedSearchPopup = getAdvancedSearchPopupInSearchContainer();
if ($advancedSearchPopup.length > 0 && $advancedSearchPopup.css("display") != "none" ) {
var type = $advancedSearchPopup.find("#adv_search_type").val();
if ($advancedSearchPopup.find("#adv_search_type").hasClass("textwatermark") == false && type!=null && type.length > 0)

View File

@ -24,7 +24,7 @@ function eventGetSearchParams() {
moreCriteria.push("&keyword="+todb(searchInput));
}
var $advancedSearchPopup = $("#advanced_search_container").find("#advanced_search_popup");
var $advancedSearchPopup = getAdvancedSearchPopupInSearchContainer();
if ($advancedSearchPopup.length > 0 && $advancedSearchPopup.css("display") != "none" ) {
var type = $advancedSearchPopup.find("#adv_search_type").val();
if (type!=null && trim(type).length > 0)

View File

@ -18,13 +18,14 @@
function vmGetSearchParams() {
var moreCriteria = [];
var $advancedSearchPopup = $("#advanced_search_popup");
if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) {
var name = $advancedSearchPopup.find("#adv_search_name").val();
if (name!=null && trim(name).length > 0)
moreCriteria.push("&name="+todb(name));
var searchInput = $("#basic_search").find("#search_input").val();
if (searchInput != null && searchInput.length > 0) {
moreCriteria.push("&keyword="+todb(searchInput));
}
var $advancedSearchPopup = getAdvancedSearchPopupInSearchContainer();
if ($advancedSearchPopup.length > 0 && $advancedSearchPopup.css("display") != "none" ) {
if($advancedSearchPopup.find("#adv_search_state").length > 0) {
var state = $advancedSearchPopup.find("#adv_search_state").val();
if (state!=null && state.length > 0)
@ -43,20 +44,14 @@ function vmGetSearchParams() {
}
}
if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none") {
if($advancedSearchPopup.find("#adv_search_account").length > 0) {
var account = $advancedSearchPopup.find("#adv_search_account").val();
if(account!=null && account.length > 0)
moreCriteria.push("&account="+todb(account));
}
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();
if(account!=null && account.length > 0)
moreCriteria.push("&account="+todb(account));
}
}
else {
var searchInput = $("#basic_search").find("#search_input").val();
if (lastSearchType == "basic_search" && searchInput != null && searchInput.length > 0) {
moreCriteria.push("&keyword="+todb(searchInput));
}
}
}
return moreCriteria.join("");
}