From dcf8112adaa151d38ffcb9e1882ca421fa930d04 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 27 Jul 2011 02:37:17 -0400
Subject: [PATCH] - Fix IE9 detection (#1488008)
---
program/include/rcube_html_page.php | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/program/include/rcube_html_page.php b/program/include/rcube_html_page.php
index 5b56ccc..200233c 100644
--- a/program/include/rcube_html_page.php
+++ b/program/include/rcube_html_page.php
@@ -5,7 +5,7 @@
| program/include/rcube_html_page.php |
| |
| This file is part of the Roundcube PHP suite |
- | Copyright (C) 2005-2009, The Roundcube Dev Team |
+ | Copyright (C) 2005-2011 The Roundcube Dev Team |
| Licensed under the GNU GPL |
| |
| CONTENTS: |
@@ -33,7 +33,7 @@
protected $charset = RCMAIL_CHARSET;
protected $script_tag_file = "<script type=\"text/javascript\" src=\"%s\"></script>\n";
- protected $script_tag = "<script type=\"text/javascript\">\n/* <![CDATA[ */\n%s\n/* ]]> */\n</script>";
+ protected $script_tag = "<script type=\"text/javascript\">\n/* <![CDATA[ */\n%s\n/* ]]> */\n</script>\n";
protected $link_css_file = "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n";
protected $default_template = "<html>\n<head><title></title></head>\n<body></body>\n</html>";
@@ -208,18 +208,23 @@
$page_header .= $this->header;
}
+ // put docready commands into page footer
+ if (!empty($this->scripts['docready'])) {
+ $this->add_script('$(document).ready(function(){ ' . $this->scripts['docready'] . "\n});", 'foot');
+ }
+
if (is_array($this->script_files['foot'])) {
foreach ($this->script_files['foot'] as $file) {
$page_footer .= sprintf($this->script_tag_file, $file);
}
}
- if (!empty($this->scripts['foot'])) {
- $page_footer .= sprintf($this->script_tag, $this->scripts['foot']);
+ if (!empty($this->footer)) {
+ $page_footer .= $this->footer . "\n";
}
- if (!empty($this->footer)) {
- $page_footer .= $this->footer;
+ if (!empty($this->scripts['foot'])) {
+ $page_footer .= sprintf($this->script_tag, $this->scripts['foot']);
}
// find page header
--
Gitblit v1.9.1