BUG 10952: Background color de listbox en modo view only muy oscuro y/o color de letras debieran ser blancas SOLVED

- When a browser uses a addon/skin/theme overwrite the default styles
- Force to use neutral background and a specific color for the selected options
This commit is contained in:
Julio Cesar Laura
2013-03-11 11:05:45 -04:00
parent 3009e7b74b
commit b5b728ffc7
4 changed files with 8 additions and 30 deletions

View File

@@ -3583,20 +3583,16 @@ class XmlForm_Field_Listbox extends XmlForm_Field
$html .= $this->renderHint();
return $html;
} elseif ($this->mode === 'view') {
$html = '<select multiple id="form[' . $this->name . ']" name="form[' . $this->name . '][]" size="' . $this->size . '" ' . $this->NSFieldType() . ' disabled>'; //disabled>';
$html = '<select multiple="multiple" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" size="' . $this->size . '" ' . $this->NSFieldType() . ' style="background: none;" disabled="disabled">';
foreach ($this->option as $optionName => $option) {
if ((in_array( $optionName, $value )) == 1) {
$html .= ' <option class="module_ListBoxView" value="' . $optionName . '" ' . ((in_array( $optionName, $value )) ? 'selected' : '') . '>' . $option . '</option>';
} else {
$html .= '<option value="' . $optionName . '" ' . ((in_array( $optionName, $value )) ? 'selected' : '') . '>' . $option . '</option>';
}
$html .= '<option value="' . $optionName . '" ' . ((in_array( $optionName, $value )) ? 'class="module_ListBoxView" selected="selected"' : '') . '>' . $option . '</option>';
}
foreach ($this->sqlOption as $optionName => $option) {
$html .= '<option value="' . $optionName . '" ' . ((in_array( $optionName, $value )) ? 'selected' : '') . '>' . $option . '</option>';
$html .= '<option value="' . $optionName . '" ' . ((in_array( $optionName, $value )) ? 'class="module_ListBoxView" selected="selected"' : '') . '>' . $option . '</option>';
}
$html .= '</select>';
foreach ($this->option as $optionName => $option) {
$html .= '<input style="color:white;" type="hidden" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" value="' . ((in_array( $optionName, $value )) ? $optionName : '') . '">';
$html .= '<input type="hidden" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" value="' . ((in_array( $optionName, $value )) ? $optionName : '') . '">';
}
foreach ($this->sqlOption as $optionName => $option) {
$html .= '<input type="hidden" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" value="' . ((in_array( $optionName, $value )) ? $optionName : '') . '">';

View File

@@ -587,14 +587,8 @@ INPUT {
}
.module_ListBoxView
{
color: white;
background:#CCDDFF;
padding:1px;
border:1px solid #AAA;
padding-left:3px;
background-position:0px 0px;
font :normal 8pt sans-serif;
background: #0A246A;
}
.module_app_inputHover___gray
{

View File

@@ -587,14 +587,8 @@ INPUT {
}
.module_ListBoxView
{
color: white;
background:#CCDDFF;
padding:1px;
border:1px solid #AAA;
padding-left:3px;
background-position:0px 0px;
font :normal 8pt sans-serif;
background: #0A246A;
}
.module_app_inputHover___gray
{

View File

@@ -617,14 +617,8 @@
}
.module_ListBoxView
{
color: white;
background:#CCDDFF;
padding:1px;
border:1px solid #AAA;
padding-left:3px;
background-position:0px 0px;
font :normal 8pt sans-serif;
background: #0A246A;
}
.module_app_inputHover___gray
{