mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 7262: global settings page - if no value is assigned, display "Not applicable". (merge from 2.2.beta1 branch to master branch)
This commit is contained in:
parent
eb6169ad1e
commit
952dec199a
@ -58,11 +58,17 @@ function populateGlobalSettingGrid() {
|
||||
});
|
||||
}
|
||||
|
||||
var notApplicable = "Not applicable";
|
||||
var globalsettingGridIndex = 0;
|
||||
function globalsettingJSONToTemplate(jsonObj, template) {
|
||||
(globalsettingGridIndex++ % 2 == 0)? template.addClass("even"): template.addClass("odd");
|
||||
template.find("#name").text(fromdb(jsonObj.name));
|
||||
template.find("#value").text(fromdb(jsonObj.value));
|
||||
|
||||
if(fromdb(jsonObj.value).length > 0)
|
||||
template.find("#value").text(fromdb(jsonObj.value));
|
||||
else
|
||||
template.find("#value").text(notApplicable);
|
||||
|
||||
template.find("#value_edit").val(fromdb(jsonObj.value));
|
||||
template.find("#description").text(fromdb(jsonObj.description));
|
||||
}
|
||||
@ -90,7 +96,11 @@ function doEditGlobalSetting() {
|
||||
|
||||
function doEditGlobalSetting2($readonlyFields, $editFields) {
|
||||
$("#right_panel_content #tab_content_details").find("#globalsetting_template").each(function(index) {
|
||||
var $thisRow =$(this);
|
||||
var $thisRow =$(this);
|
||||
|
||||
if($thisRow.find("#value_edit").val() == "" && $thisRow.find("#value").text() == notApplicable)
|
||||
return;
|
||||
|
||||
if($thisRow.find("#value_edit").val() != $thisRow.find("#value").text()) {
|
||||
// validate values
|
||||
var isValid = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user