- fix button tooltips on IE (#1485994)

release-0.6
alecpl 15 years ago
parent f134ad8c4c
commit c9e9fe1901

@ -810,8 +810,8 @@ class rcube_template extends rcube_html_page
} }
// set title to alt attribute for IE browsers // set title to alt attribute for IE browsers
if ($this->browser->ie && $attrib['title'] && !$attrib['alt']) { if ($this->browser->ie && !$attrib['title'] && $attrib['alt']) {
$attrib['alt'] = $attrib['title']; $attrib['title'] = $attrib['alt'];
} }
// add empty alt attribute for XHTML compatibility // add empty alt attribute for XHTML compatibility
@ -893,16 +893,15 @@ class rcube_template extends rcube_html_page
$attrib_str = html::attrib_string( $attrib_str = html::attrib_string(
$attrib, $attrib,
array( array(
'style', 'class', 'id', 'width', 'style', 'class', 'id', 'width', 'height', 'border', 'hspace',
'height', 'border', 'hspace', 'vspace', 'align', 'alt', 'tabindex', 'title'
'vspace', 'align', 'alt', 'tabindex'
) )
); );
$btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str); $btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str);
if ($attrib['label']) { if ($attrib['label']) {
$btn_content .= ' '.$attrib['label']; $btn_content .= ' '.$attrib['label'];
} }
$link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title', 'target'); $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'target');
} }
else if ($attrib['type']=='link') { else if ($attrib['type']=='link') {
$btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command']; $btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command'];
@ -918,8 +917,7 @@ class rcube_template extends rcube_html_page
$attrib_str = html::attrib_string( $attrib_str = html::attrib_string(
$attrib, $attrib,
array( array(
'type', 'value', 'onclick', 'type', 'value', 'onclick', 'id', 'class', 'style', 'tabindex'
'id', 'class', 'style', 'tabindex'
) )
); );
$out = sprintf('<input%s disabled="disabled" />', $attrib_str); $out = sprintf('<input%s disabled="disabled" />', $attrib_str);

Loading…
Cancel
Save