summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-19 17:01:57 +0000
committerthomascube <thomas@roundcube.net>2008-09-19 17:01:57 +0000
commita3f149eb5729ef1ba6d1c05b29fead1058f4c888 (patch)
tree746acb9824e42bb0148ce79e5afa28eb0ba3b1fc
parent20a25197f3e2c51fb42db0832dc22d493334f20f (diff)
Fix search box on Safari and make pages validate
-rw-r--r--program/include/html.php2
-rw-r--r--program/include/rcube_browser.php3
-rwxr-xr-xprogram/include/rcube_template.php9
-rw-r--r--skins/default/mail.css1
-rw-r--r--skins/default/watermark.html1
5 files changed, 10 insertions, 6 deletions
diff --git a/program/include/html.php b/program/include/html.php
index 8d3144d93..50689f2e7 100644
--- a/program/include/html.php
+++ b/program/include/html.php
@@ -248,7 +248,7 @@ class html_inputfield extends html
{
protected $tagname = 'input';
protected $type = 'text';
- protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked','onchange','onclick','disabled','readonly','spellcheck');
+ protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked','onchange','onclick','disabled','readonly','spellcheck','results');
public function __construct($attrib = array())
{
diff --git a/program/include/rcube_browser.php b/program/include/rcube_browser.php
index 0d4766417..162844f32 100644
--- a/program/include/rcube_browser.php
+++ b/program/include/rcube_browser.php
@@ -43,7 +43,8 @@ class rcube_browser
$this->ns = ($this->ns4 || stristr($HTTP_USER_AGENT, 'netscape'));
$this->ie = stristr($HTTP_USER_AGENT, 'compatible; msie') && !$this->opera;
$this->mz = stristr($HTTP_USER_AGENT, 'mozilla/5');
- $this->safari = stristr($HTTP_USER_AGENT, 'safari');
+ $this->khtml = stristr($HTTP_USER_AGENT, 'khtml');
+ $this->safari = ($this->khtml || stristr($HTTP_USER_AGENT, 'safari'));
if ($this->ns) {
$test = eregi("mozilla\/([0-9\.]+)", $HTTP_USER_AGENT, $regs);
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 61e4975eb..2108ed7ee 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -54,6 +54,7 @@ class rcube_template extends rcube_html_page
$this->app = rcmail::get_instance();
$this->config = $this->app->config->all();
+ $this->browser = new rcube_browser();
//$this->framed = $framed;
$this->set_env('task', $task);
@@ -707,8 +708,6 @@ class rcube_template extends rcube_html_page
return '';
}
- $browser = new rcube_browser();
-
// try to find out the button type
if ($attrib['type']) {
$attrib['type'] = strtolower($attrib['type']);
@@ -755,7 +754,7 @@ class rcube_template extends rcube_html_page
$attrib['alt'] = Q(rcube_label($attrib['alt']));
}
// set title to alt attribute for IE browsers
- if ($browser->ie && $attrib['title'] && !$attrib['alt']) {
+ if ($this->browser->ie && $attrib['title'] && !$attrib['alt']) {
$attrib['alt'] = $attrib['title'];
unset($attrib['title']);
}
@@ -1018,6 +1017,10 @@ class rcube_template extends rcube_html_page
if (empty($attrib['id'])) {
$attrib['id'] = 'rcmqsearchbox';
}
+ if ($attrib['type'] == 'search' && !$this->browser->khtml) {
+ unset($attrib['type'], $attrib['results']);
+ }
+
$input_q = new html_inputfield($attrib);
$out = $input_q->show();
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 81e4cff35..ec78cd7a2 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -755,7 +755,6 @@ table.headers-table tr td.all
#messagebody
{
position:relative;
- min-height: 300px;
padding-bottom: 10px;
background-color: #FFFFFF;
}
diff --git a/skins/default/watermark.html b/skins/default/watermark.html
index 85e53652a..6202b8f83 100644
--- a/skins/default/watermark.html
+++ b/skins/default/watermark.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+ <title></title>
</head>
<body style="background-color:#F2F2F2;">