mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Template page - implement new advanced search.
This commit is contained in:
parent
366cd3d053
commit
b2007715bd
@ -413,11 +413,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_name"
|
||||
value="by name" />
|
||||
</li>
|
||||
<ol>
|
||||
<li>
|
||||
<select class="select" id="adv_search_zone">
|
||||
</select>
|
||||
|
||||
@ -24,12 +24,13 @@ var g_zoneNames = [];
|
||||
function templateGetSearchParams() {
|
||||
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" ) {
|
||||
var zone = $advancedSearchPopup.find("#adv_search_zone").val();
|
||||
if (zone!=null && zone.length > 0)
|
||||
moreCriteria.push("&zoneId="+zone);
|
||||
@ -40,18 +41,13 @@ function templateGetSearchParams() {
|
||||
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…
x
Reference in New Issue
Block a user