IP Address page - implement new advanced search.

This commit is contained in:
Jessica Wang 2010-12-27 12:17:13 -08:00
parent bc8b7ed1ae
commit bb74da01aa
2 changed files with 12 additions and 19 deletions

View File

@ -730,11 +730,7 @@
<div class="adv_searchpopup_bg" id="advanced_search_popup" 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_ipaddress"
value="by name" />
</li>
<ol>
<li>
<select class="select" id="adv_search_zone">
</select>

View File

@ -19,12 +19,14 @@
function ipGetSearchParams() {
var moreCriteria = [];
var $advancedSearchPopup = $("#advanced_search_popup");
if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) {
var ipaddress = $advancedSearchPopup.find("#adv_search_ipaddress").val();
if (ipaddress!=null && trim(ipaddress).length > 0)
moreCriteria.push("&ipaddress="+todb(ipaddress));
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" ) {
var zone = $advancedSearchPopup.find("#adv_search_zone").val();
if (zone!=null && zone.length > 0)
moreCriteria.push("&zoneId="+zone);
@ -35,18 +37,13 @@ function ipGetSearchParams() {
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();
if (account!=null && account.length > 0)
moreCriteria.push("&account="+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("");
}