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:
@@ -3583,23 +3583,19 @@ 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 : '') . '">';
|
||||
$html .= '<input type="hidden" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" value="' . ((in_array( $optionName, $value )) ? $optionName : '') . '">';
|
||||
}
|
||||
return $html;
|
||||
} else {
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user