mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 8636: advanced search in Template page, ISO page, Event page - change domain dropdown to autoComplete input textbox.
This commit is contained in:
parent
08a535ec87
commit
8ba6821a8e
@ -297,8 +297,12 @@
|
|||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_domain_li" style="display: none;">
|
<li id="adv_search_domain_li" style="display: none;">
|
||||||
|
<input class="text textwatermark" type="text" id="domain" value='<fmt:message key="label.by.domain" />' />
|
||||||
|
<div id="domain_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||||
|
<!--
|
||||||
<select class="select" id="adv_search_domain">
|
<select class="select" id="adv_search_domain">
|
||||||
</select>
|
</select>
|
||||||
|
-->
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_account_li" style="display: none;">
|
<li id="adv_search_account_li" style="display: none;">
|
||||||
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
||||||
|
|||||||
@ -427,8 +427,12 @@ dictionary = {
|
|||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_domain_li" style="display: none;">
|
<li id="adv_search_domain_li" style="display: none;">
|
||||||
|
<input class="text textwatermark" type="text" id="domain" value='<fmt:message key="label.by.domain" />' />
|
||||||
|
<div id="domain_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||||
|
<!--
|
||||||
<select class="select" id="adv_search_domain">
|
<select class="select" id="adv_search_domain">
|
||||||
</select>
|
</select>
|
||||||
|
-->
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_account_li" style="display: none;">
|
<li id="adv_search_account_li" style="display: none;">
|
||||||
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
||||||
|
|||||||
@ -452,8 +452,12 @@ dictionary = {
|
|||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_domain_li" style="display: none;">
|
<li id="adv_search_domain_li" style="display: none;">
|
||||||
|
<input class="text textwatermark" type="text" id="domain" value='<fmt:message key="label.by.domain" />' />
|
||||||
|
<div id="domain_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||||
|
<!--
|
||||||
<select class="select" id="adv_search_domain">
|
<select class="select" id="adv_search_domain">
|
||||||
</select>
|
</select>
|
||||||
|
-->
|
||||||
</li>
|
</li>
|
||||||
<li id="adv_search_account_li" style="display: none;">
|
<li id="adv_search_account_li" style="display: none;">
|
||||||
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
<input class="text textwatermark" type="text" id="adv_search_account" value='<fmt:message key="label.by.account" />' />
|
||||||
|
|||||||
@ -34,10 +34,27 @@ function eventGetSearchParams() {
|
|||||||
if (level!=null && level.length > 0)
|
if (level!=null && level.length > 0)
|
||||||
moreCriteria.push("&level="+todb(level));
|
moreCriteria.push("&level="+todb(level));
|
||||||
|
|
||||||
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();
|
&& $advancedSearchPopup.find("#domain").hasClass("textwatermark") == false) {
|
||||||
if (domainId!=null && domainId.length > 0)
|
var domainName = $advancedSearchPopup.find("#domain").val();
|
||||||
moreCriteria.push("&domainid="+todb(domainId));
|
if (domainName != null && domainName.length > 0) {
|
||||||
|
var domainId;
|
||||||
|
if(autoCompleteDomains != null && autoCompleteDomains.length > 0) {
|
||||||
|
for(var i=0; i < autoCompleteDomains.length; i++) {
|
||||||
|
if(fromdb(autoCompleteDomains[i].name).toLowerCase() == domainName.toLowerCase()) {
|
||||||
|
domainId = autoCompleteDomains[i].id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(domainId == null) {
|
||||||
|
showError(false, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), g_dictionary["label.not.found"]);
|
||||||
|
}
|
||||||
|
else { //e.g. domainId == 5 (number)
|
||||||
|
showError(true, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), null)
|
||||||
|
moreCriteria.push("&domainid="+todb(domainId));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none"
|
if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none"
|
||||||
|
|||||||
@ -35,11 +35,28 @@ function isoGetSearchParams() {
|
|||||||
if (zone!=null && zone.length > 0)
|
if (zone!=null && zone.length > 0)
|
||||||
moreCriteria.push("&zoneId="+zone);
|
moreCriteria.push("&zoneId="+zone);
|
||||||
|
|
||||||
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();
|
&& $advancedSearchPopup.find("#domain").hasClass("textwatermark") == false) {
|
||||||
if (domainId!=null && domainId.length > 0)
|
var domainName = $advancedSearchPopup.find("#domain").val();
|
||||||
moreCriteria.push("&domainid="+domainId);
|
if (domainName != null && domainName.length > 0) {
|
||||||
}
|
var domainId;
|
||||||
|
if(autoCompleteDomains != null && autoCompleteDomains.length > 0) {
|
||||||
|
for(var i=0; i < autoCompleteDomains.length; i++) {
|
||||||
|
if(fromdb(autoCompleteDomains[i].name).toLowerCase() == domainName.toLowerCase()) {
|
||||||
|
domainId = autoCompleteDomains[i].id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(domainId == null) {
|
||||||
|
showError(false, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), g_dictionary["label.not.found"]);
|
||||||
|
}
|
||||||
|
else { //e.g. domainId == 5 (number)
|
||||||
|
showError(true, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), null)
|
||||||
|
moreCriteria.push("&domainid="+todb(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) {
|
&& $advancedSearchPopup.find("#adv_search_account").hasClass("textwatermark") == false) {
|
||||||
|
|||||||
@ -35,11 +35,28 @@ function templateGetSearchParams() {
|
|||||||
if (zone!=null && zone.length > 0)
|
if (zone!=null && zone.length > 0)
|
||||||
moreCriteria.push("&zoneId="+zone);
|
moreCriteria.push("&zoneId="+zone);
|
||||||
|
|
||||||
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();
|
&& $advancedSearchPopup.find("#domain").hasClass("textwatermark") == false) {
|
||||||
if (domainId!=null && domainId.length > 0)
|
var domainName = $advancedSearchPopup.find("#domain").val();
|
||||||
moreCriteria.push("&domainid="+domainId);
|
if (domainName != null && domainName.length > 0) {
|
||||||
}
|
var domainId;
|
||||||
|
if(autoCompleteDomains != null && autoCompleteDomains.length > 0) {
|
||||||
|
for(var i=0; i < autoCompleteDomains.length; i++) {
|
||||||
|
if(fromdb(autoCompleteDomains[i].name).toLowerCase() == domainName.toLowerCase()) {
|
||||||
|
domainId = autoCompleteDomains[i].id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(domainId == null) {
|
||||||
|
showError(false, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), g_dictionary["label.not.found"]);
|
||||||
|
}
|
||||||
|
else { //e.g. domainId == 5 (number)
|
||||||
|
showError(true, $advancedSearchPopup.find("#domain"), $advancedSearchPopup.find("#domain_errormsg"), null)
|
||||||
|
moreCriteria.push("&domainid="+todb(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) {
|
&& $advancedSearchPopup.find("#adv_search_account").hasClass("textwatermark") == false) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user