Drop support for IE6, move IE7/IE8 support to legacy_browser plugin, update to jQuery-2.1.0

pull/176/head
Aleksander Machniak 10 years ago
parent 0ca75d4880
commit 64542fc803

@ -1,6 +1,8 @@
CHANGELOG Roundcube Webmail
===========================
- Drop support for IE6, move IE7/IE8 support to legacy_browser plugin
- Update to jQuery-2.1.0
- Search across multiple folders (#1485234)
- Improve UI integration of ACL settings
- Drop support for PHP < 5.3.7

File diff suppressed because one or more lines are too long

@ -0,0 +1,87 @@
<?php
/**
* Plugin which adds support for legacy browsers (IE 7/8)
*
* @author Aleksander Machniak <alec@alec.pl>
* @license GNU GPLv3+
*/
class legacy_browser extends rcube_plugin
{
public $noajax = true;
public function init()
{
$rcube = rcube::get_instance();
if ($rcube->output->browser->ie && $rcube->output->browser->ver < 9) {
$this->add_hook('send_page', array($this, 'send_page'));
$this->add_hook('render_page', array($this, 'render_page'));
}
}
function send_page($args)
{
// replace jQuery 2.x with 1.x
$ts = filemtime($this->home . '/js/jquery.min.js');
$args['content'] = preg_replace(
'|"program/js/jquery\.min\.js\?s=[0-9]+"|',
'"plugins/legacy_browser/js/jquery.min.js?s=' . $ts . '"',
$args['content'], 1);
return $args;
}
function render_page($args)
{
$rcube = rcube::get_instance();
$skin = $this->skin();
if ($skin == 'classic') {
$rcube->output->add_header(
'<link rel="stylesheet" type="text/css" href="plugins/legacy_browser/classic/iehacks.css" />'
);
}
else if ($skin == 'larry') {
if ($rcube->output->browser->ver < 8) {
$rcube->output->add_header(
'<link rel="stylesheet" type="text/css" href="plugins/legacy_browser/larry/ie7hacks.css" />'
);
}
else {
$rcube->output->add_header(
'<link rel="stylesheet" type="text/css" href="plugins/legacy_browser/larry/iehacks.css" />'
);
}
// fix missing :last-child selectors
$rcube->output->add_footer(implode("\n", array(
'<script type="text/javascript">',
'$(document).ready(function() {',
' $(\'ul.treelist ul\').each(function(i,ul) {',
' $(\'li:last-child\', ul).css(\'border-bottom\', 0);',
' });',
'});',
'</script>'
)));
}
}
private function skin()
{
$rcube = rcube::get_instance();
$skin = $rcube->config->get('skin');
// external skin, find if it inherits from other skin
if ($skin != 'larry' && $skin != 'classic') {
$json = @file_get_contents(INSTALL_PATH . "/skins/$skin/meta.json");
$json = @json_decode($json, true);
if (!empty($json['extends'])) {
return $json['extends'];
}
}
return $skin;
}
}

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
http://pear.php.net/dtd/tasks-1.0.xsd
http://pear.php.net/dtd/package-2.0
http://pear.php.net/dtd/package-2.0.xsd">
<name>legacy_browser</name>
<channel>pear.roundcube.net</channel>
<summary>Legacy browser (IE 7/8) support</summary>
<description>This adds support for legacy browsers (IE 7/8).</description>
<lead>
<name>Aleksander Machniak</name>
<user>alec</user>
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
<date>2014-04-12</date>
<version>
<release>1.0</release>
<api>1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
<file name="legacy_browser.php" role="php">
<tasks:replace from="@name@" to="name" type="package-info"/>
<tasks:replace from="@package_version@" to="version" type="package-info"/>
</file>
<file name="js/jquery.min.js" role="data"></file>
<file name="skins/classic/iehacks.css" role="data"></file>
<file name="skins/classic/images/abook_toolbar.gif" role="data"></file>
<file name="skins/classic/images/mail_toolbar.gif" role="data"></file>
<file name="skins/larry/ie7hacks.css" role="data"></file>
<file name="skins/larry/iehacks.css" role="data"></file>
<file name="skins/larry/images/buttons.gif" role="data"></file>
</dir>
<!-- / -->
</contents>
<dependencies>
<required>
<php>
<min>5.2.1</min>
</php>
<pearinstaller>
<min>1.7.0</min>
</pearinstaller>
</required>
</dependencies>
<phprelease/>
</package>

@ -219,7 +219,7 @@ div.message-part div.pre
div.draglayercopy
{
border-color: #00cc00;
background: url(images/messageactions.png) 0 -125px no-repeat #fff;
background: url(../../../skins/classic/images/messageactions.png) 0 -125px no-repeat #fff;
}
html.ie8 .draglayercopy:before

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

@ -204,10 +204,7 @@ ul.toolbarmenu li label {
box-sizing: border-box;
}
.minimal #taskbar a:hover .tooltip {
right: 34px;
top: 1px;
}

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -884,8 +884,8 @@ rcube_webmail.prototype.managesieve_create = function(force)
// show dialog window
dialog.dialog({
modal: false,
resizable: !bw.ie6,
closeOnEscape: (!bw.ie6 && !bw.ie7), // disable for performance reasons
resizable: true,
closeOnEscape: !bw.ie7, // disable for performance reasons
title: this.gettext('managesieve.newfilter'),
close: function() { rcmail.managesieve_dialog_close(); },
buttons: buttons,

@ -143,7 +143,7 @@ function rcube_webmail()
this.task = this.env.task;
// check browser
if (!bw.dom || !bw.xmlhttp_test() || (bw.mz && bw.vendver < 1.9)) {
if (!bw.dom || !bw.xmlhttp_test() || (bw.mz && bw.vendver < 1.9) || (bw.ie && bw.vendver < 7)) {
this.goto_url('error', '_code=0x199');
return;
}

@ -53,7 +53,6 @@ function roundcube_browser()
this.ie = (document.all && !window.opera) || (this.win && this.agent_lc.indexOf('trident/') > 0);
if (this.ie) {
this.ie6 = this.appver.indexOf('MSIE 6') > 0;
this.ie7 = this.appver.indexOf('MSIE 7') > 0;
this.ie8 = this.appver.indexOf('MSIE 8') > 0;
this.ie9 = this.appver.indexOf('MSIE 9') > 0;

File diff suppressed because one or more lines are too long

@ -106,8 +106,8 @@ function rcube_treelist_widget(node, p)
node.collapsed = typeof set == 'undefined' || set;
update_dom(node);
// Work around a bug in IE6 and IE7, see #1485309
if (window.bw && (bw.ie6 || bw.ie7) && node.collapsed) {
// Work around a bug in IE7, see #1485309
if (window.bw && bw.ie7 && node.collapsed) {
id2dom(node.id).next().children('ul:visible').hide().show();
}

@ -155,11 +155,6 @@ show_popupmenu: function(popup, show)
}
obj[show?'show':'hide']();
if (bw.ie6 && this.popups[popup].overlap) {
$('select').css('visibility', show?'hidden':'inherit');
$('select', obj).css('visibility', 'inherit');
}
},
dragmenu: function(show)
@ -319,9 +314,6 @@ listmenu: function(show)
}
});
$('#listmenu fieldset').css("min-height", maxheight+"px")
// IE6 complains if you set this attribute using either method:
//$('#listmenu fieldset').css({'height':'auto !important'});
//$('#listmenu fieldset').css("height","auto !important");
.height(maxheight);
};
},
@ -470,7 +462,7 @@ switch_preview_pane: function(elem)
}
else {
prev_frm.hide();
if (bw.ie6 || bw.ie7) {
if (bw.ie7) {
var fr = document.getElementById('mailcontframe');
fr.style.bottom = 0;
fr.style.height = parseInt(fr.parentNode.offsetHeight)+'px';

@ -1,184 +0,0 @@
/* CSS hacks for IE versions 5,6 */
#taskbar
{
background: url(images/taskbar.gif) top right no-repeat;
width: expression((parseInt(document.documentElement.clientWidth)-250)+'px');
}
img
{
behavior: url(skins/classic/pngbehavior.htc);
}
#logo
{
width: 178px;
height: 47px;
}
body > #message div.notice,
body > #message div.error,
body > #message div.warning,
body > #message div.confirmation,
#message-objects div.notice,
#message-objects div.error,
#message-objects div.warning,
#message-objects div.confirmation
{
background-image: url(images/display/icons.gif);
}
#messagemenu li a
{
background-image: url(images/messageactions.gif);
}
#mailboxlist li
{
background-image: url(images/icons/folders.gif);
}
#messagetoolbar a
{
display: block;
float: left;
padding-right: 10px;
}
.boxfooter a.button,
.boxfooter a.buttonPas
{
background-image: url(images/icons/groupactions.gif);
}
.pagenav
{
width: 250px;
}
.pagenav a.button,
.pagenav a.buttonPas
{
background-image: url(images/pagenav.gif);
}
#listcontrols a.button,
#listcontrols a.buttonPas {
background-image: url(images/mail_footer.gif);
}
#messagetoolbar a.button,
#messagetoolbar a.buttonPas {
background-image: url(images/mail_toolbar.gif);
}
#abooktoolbar a.button,
#abooktoolbar a.buttonPas,
#abooktoolbar span.separator {
background-image: url(images/abook_toolbar.gif);
}
ul.toolbarmenu li a,
.popupmenu li a
{
clear: left;
height: expression(Math.min(14, parseInt(document.documentElement.clientHeight))+'px');
width: expression(Math.min(130, parseInt(document.documentElement.clientWidth))+'px');
}
ul.toolbarmenu li.separator_below
{
padding-bottom: 3px;
}
.boxfooter
{
width: 100%;
bottom: -1px;
}
.boxtitle,
#directorylist li a
{
width: auto;
}
#directorylist li
{
background-image: url(images/icons/folders.gif);
}
.boxlistcontent
{
top: 21px;
height: expression((parseInt(this.parentNode.offsetHeight)-24-parseInt(this.style.top?this.style.top:21))+'px');
}
#compose-div .boxlistcontent
{
height: expression((parseInt(this.parentNode.offsetHeight)-23-parseInt(this.style.top?this.style.top:21))+'px');
}
#compose-body-div
{
height: expression(parseInt(this.parentNode.offsetHeight)+'px');
}
#folder-manager
{
height: expression((parseInt(document.documentElement.clientHeight)-105)+'px');
}
#messagelist tr td div.collapsed,
#messagelist tr td div.expanded,
#messagelist tr td.threads div.listmenu,
#messagelist tr td.attachment span.attachment,
#messagelist tr td.attachment span.report,
#messagelist tr td.priority span.priority,
#messagelist tr td.priority span.prio1,
#messagelist tr td.priority span.prio2,
#messagelist tr td.priority span.prio3,
#messagelist tr td.priority span.prio4,
#messagelist tr td.priority span.prio5,
#messagelist tr td.flag span.flagged,
#messagelist tr td.flag span.unflagged:hover,
#messagelist tr td.status span.status,
#messagelist tr td.status span.msgicon,
#messagelist tr td.status span.deleted,
#messagelist tr td.status span.unread,
#messagelist tr td.status span.unreadchildren,
#messagelist tr td.subject span.msgicon,
#messagelist tr td.subject span.deleted,
#messagelist tr td.subject span.unread,
#messagelist tr td.subject span.replied,
#messagelist tr td.subject span.forwarded,
#messagelist tr td.subject span.unreadchildren
{
background-image: url(images/messageicons.gif);
}
#messagelist tr td div.collapsed,
#messagelist tr td div.expanded {
background-color: #fff;
}
body.iframe .boxtitle
{
position: absolute;
}
#subscription-table
{
width: auto;
}
#sourcename
{
zoom: 1;
}
#abookactions a
{
background-image: url("images/icons/groupactions.gif");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -5,10 +5,6 @@
<roundcube:if condition="in_array(env:task, array('mail', 'addressbook', 'settings'))" />
<link rel="stylesheet" type="text/css" href="/<roundcube:var name="env:task" />.css" />
<roundcube:endif />
<roundcube:if condition="browser:ie" />
<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="/iehacks.css" /><![endif]-->
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="/ie6hacks.css" /><![endif]-->
<roundcube:endif />
<roundcube:if condition="browser:safari" />
<link rel="stylesheet" type="text/css" href="/safari.css" />
<roundcube:endif />

@ -1,84 +0,0 @@
<public:component lightWeight="true">
<public:attach event="onpropertychange" onevent="propertyChanged()" />
<public:attach event="onbeforeprint" onevent="beforePrint()" for="window"/>
<public:attach event="onafterprint" onevent="afterPrint()" for="window"/>
<script>
/*
* PNG Behavior
*
* This script was created by Erik Arvidsson (http://webfx.eae.net/contact.html#erik)
* for WebFX (http://webfx.eae.net)
* Copyright 2002-2004
*
* For usage see license at http://webfx.eae.net/license.html
*
* Version: 1.02
* Created: 2001-??-?? First working version
* Updated: 2002-03-28 Fixed issue when starting with a non png image and
* switching between non png images
* 2003-01-06 Fixed RegExp to correctly work with IE 5.0x
* 2004-05-09 When printing revert to original
*
*/
var supported = /MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32",
realSrc,
blankSrc = "program/resources/blank.gif",
isPrinting = false;
if (supported) fixImage();
function propertyChanged() {
if (!supported || isPrinting) return;
var pName = event.propertyName;
if (pName != "src") return;
// if not set to blank
if (!new RegExp(blankSrc).test(src))
fixImage();
};
function fixImage() {
// get src
var src = element.src;
// check for real change
if (src == realSrc && /\.png$/i.test(src)) {
element.src = blankSrc;
return;
}
if ( ! new RegExp(blankSrc).test(src)) {
// backup old src
realSrc = src;
}
// test for png
if (/\.png$/i.test(realSrc)) {
// set blank image
element.src = blankSrc;
// set filter
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
"AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
}
else {
// remove filter
element.runtimeStyle.filter = "";
}
}
function beforePrint() {
isPrinting = true;
element.src = realSrc;
element.runtimeStyle.filter = "";
realSrc = null;
}
function afterPrint() {
isPrinting = false;
fixImage();
}
</script>
</public:component>

@ -11,7 +11,6 @@ function rcube_splitter(attrib)
this.id = attrib.id ? attrib.id : this.p1id + '_' + this.p2id + '_splitter';
this.orientation = attrib.orientation;
this.horizontal = (this.orientation == 'horizontal' || this.orientation == 'h');
this.offset = bw.ie6 ? 2 : 0;
this.pos = attrib.start ? attrib.start * 1 : 0;
this.relative = attrib.relative ? true : false;
this.drag_active = false;
@ -67,7 +66,7 @@ function rcube_splitter(attrib)
this.resize = function()
{
if (this.horizontal) {
var lh = this.layer.height - this.offset * 2;
var lh = this.layer.height;
this.p1.style.height = Math.floor(this.pos - this.p1pos.top - lh / 2) + 'px';
this.p2.style.top = Math.ceil(this.pos + lh / 2) + 'px';
this.layer.move(this.layer.x, Math.round(this.pos - lh / 2 + 1));

@ -10,16 +10,3 @@ $(document).ready(function(){
});
</script>
<!--[if lte IE 8]>
<script type="text/javascript">
// fix missing :last-child selectors
$(document).ready(function(){
$('ul.treelist ul').each(function(i,ul){
$('li:last-child', ul).css('border-bottom', 0);
});
});
</script>
<![endif]-->

@ -6,6 +6,4 @@
<link rel="stylesheet" type="text/css" href="/<roundcube:var name="env:task" />.css" />
<roundcube:endif />
<!--[if IE 9]><link rel="stylesheet" type="text/css" href="/svggradients.css" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="/iehacks.css" /><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/ie7hacks.css" /><![endif]-->
<script type="text/javascript" src="/ui.js"></script>

@ -635,12 +635,6 @@ function rcube_mail_ui()
obj[show?'show':'hide']();
// hide drop-down elements on buggy browsers
if (bw.ie6 && config.overlap) {
$('select').css('visibility', show?'hidden':'inherit');
$('select', obj).css('visibility', 'inherit');
}
return show;
}

Loading…
Cancel
Save