mirror of https://github.com/apache/cloudstack.git
IP Address page - implement new advanced search.
This commit is contained in:
parent
bc8b7ed1ae
commit
bb74da01aa
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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("");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue