bug 7262: global settings page - set padding in value column. So, description won't be shifted into value column when value is empty. (merge from 2.2.beta1 branch to master branch)

This commit is contained in:
Jessica Wang 2010-11-23 20:08:35 -08:00
parent dc27725739
commit bf92a20432
2 changed files with 3 additions and 12 deletions

View File

@ -77,7 +77,7 @@
<div class="row_celltitles" id="name">
</div>
</div>
<div class="grid_row_cell" style="width: 23%; border:none;">
<div class="grid_row_cell" style="width: 23%; border:none; padding:1px;">
<div class="row_celltitles" id="value">
</div>
<input class="text" id="value_edit" style="width: 120px; display: none;" type="text" />

View File

@ -58,17 +58,11 @@ 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));
if(fromdb(jsonObj.value).length > 0)
template.find("#value").text(fromdb(jsonObj.value));
else
template.find("#value").text(notApplicable);
template.find("#name").text(fromdb(jsonObj.name));
template.find("#value").text(fromdb(jsonObj.value));
template.find("#value_edit").val(fromdb(jsonObj.value));
template.find("#description").text(fromdb(jsonObj.description));
}
@ -98,9 +92,6 @@ function doEditGlobalSetting2($readonlyFields, $editFields) {
$("#right_panel_content #tab_content_details").find("#globalsetting_template").each(function(index) {
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;