Skip to content
Extraits de code Groupes Projets
Valider 6307be0b rédigé par Thomas Steur's avatar Thomas Steur Validation de sgiehl
Parcourir les fichiers

refs #4620 removed some code that was only there for IE8

parent 42f9f52f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 12 ajouts et 134 suppressions
...@@ -32,7 +32,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' ...@@ -32,7 +32,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
* Updated AngularJS from 1.2.28 to 1.4.3 * Updated AngularJS from 1.2.28 to 1.4.3
### Internal change ### Internal change
* Support for IE8 was dropped * Support for IE8 was dropped. This affects only the Piwik UI, not the Piwik.js Tracker.
* Required PHP version was changed from 5.3 to 5.4 * Required PHP version was changed from 5.3 to 5.4
## Piwik 2.15.0 ## Piwik 2.15.0
......
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
}); });
notification.scrollToNotification(); notification.scrollToNotification();
} }
})['catch'](function (errorMessage) { }).catch(function (errorMessage) {
vm.errorPostResponse = errorMessage; vm.errorPostResponse = errorMessage;
})['finally'](function () { }).finally(function () {
vm.isSubmitting = false; vm.isSubmitting = false;
}); });
} }
......
...@@ -129,11 +129,11 @@ ...@@ -129,11 +129,11 @@
}, },
'finally': function () { 'finally': function () {
return addAbortMethod(to['finally'].apply(to, arguments), deferred); return addAbortMethod(to.finally.apply(to, arguments), deferred);
}, },
'catch': function () { 'catch': function () {
return addAbortMethod(to['catch'].apply(to, arguments), deferred); return addAbortMethod(to.catch.apply(to, arguments), deferred);
}, },
abort: function () { abort: function () {
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
} }
deferred.resolve(response); deferred.resolve(response);
})['catch'](function () { }).catch(function () {
deferred.reject.apply(deferred, arguments); deferred.reject.apply(deferred, arguments);
}); });
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
if (angular.isDefined(response)) { if (angular.isDefined(response)) {
return updateWebsitesList(response); return updateWebsitesList(response);
} }
})['finally'](function () { // .finally() is not IE8 compatible see https://github.com/angular/angular.js/commit/f078762d48d0d5d9796dcdf2cb0241198677582c }).finally(function () {
model.isLoading = false; model.isLoading = false;
model.currentRequest = null; model.currentRequest = null;
}); });
......
...@@ -39,7 +39,7 @@ var Piwik_Popover = (function () { ...@@ -39,7 +39,7 @@ var Piwik_Popover = (function () {
}, },
close: function (event, ui) { close: function (event, ui) {
container.find('div.jqplot-target').trigger('piwikDestroyPlot'); container.find('div.jqplot-target').trigger('piwikDestroyPlot');
container[0].innerHTML = ''; // IE8 fix container[0].innerHTML = '';
container.dialog('destroy').remove(); container.dialog('destroy').remove();
globalAjaxQueue.abort(); globalAjaxQueue.abort();
$('.ui-widget-overlay').off('click.popover'); $('.ui-widget-overlay').off('click.popover');
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
{% include "@CoreHome/_favicon.twig" %} {% include "@CoreHome/_favicon.twig" %}
</head> </head>
<!--[if lt IE 9 ]>
<body id="simple" ng-app="app" class="old-ie"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <!--[if (gte IE 9)|!(IE)]><!-->
<body id="simple" ng-app="app"><!--<![endif]--> <body id="simple" ng-app="app"><!--<![endif]-->
......
...@@ -14,7 +14,7 @@ $(document).ready(function () { ...@@ -14,7 +14,7 @@ $(document).ready(function () {
* disable_merged_assets = 1 * disable_merged_assets = 1
*/ */
if('undefined' != (typeof console)) { /* IE8 has no console */ if('undefined' != (typeof console)) { /* IE9 has no console */
console.log('Plugin file loaded'); console.log('Plugin file loaded');
} }
}); });
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
<script type="text/javascript" src="plugins/CoreHome/angularjs/piwikApp.js"></script> <script type="text/javascript" src="plugins/CoreHome/angularjs/piwikApp.js"></script>
<script type="text/javascript" src="plugins/Installation/javascripts/installation.js"></script> <script type="text/javascript" src="plugins/Installation/javascripts/installation.js"></script>
</head> </head>
<!--[if lt IE 9 ]>
<body ng-app="app" class="old-ie"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <!--[if (gte IE 9)|!(IE)]><!-->
<body ng-app="app"><!--<![endif]--> <body ng-app="app"><!--<![endif]-->
......
...@@ -181,9 +181,4 @@ ...@@ -181,9 +181,4 @@
#piwik a { #piwik a {
color: #CDCDCD; color: #CDCDCD;
} }
/* IE < 9 will use this */
body.old-ie .ie-hide {
display: none;
}
} }
...@@ -426,49 +426,6 @@ try { ...@@ -426,49 +426,6 @@ try {
oldArc.call(this, x, y, r, sAngle, eAngle, clockwise); oldArc.call(this, x, y, r, sAngle, eAngle, clockwise);
}; };
//--------------------------------------
//
// Array.reduce is not available in IE8 but used in Jqplot
//
//--------------------------------------
if ('function' !== typeof Array.prototype.reduce) {
Array.prototype.reduce = function(callback, opt_initialValue){
'use strict';
if (null === this || 'undefined' === typeof this) {
// At the moment all modern browsers, that support strict mode, have
// native implementation of Array.prototype.reduce. For instance, IE8
// does not support strict mode, so this check is actually useless.
throw new TypeError(
'Array.prototype.reduce called on null or undefined');
}
if ('function' !== typeof callback) {
throw new TypeError(callback + ' is not a function');
}
var index, value,
length = this.length >>> 0,
isValueSet = false;
if (1 < arguments.length) {
value = opt_initialValue;
isValueSet = true;
}
for (index = 0; length > index; ++index) {
if (this.hasOwnProperty(index)) {
if (isValueSet) {
value = callback(value, this[index], index, this);
}
else {
value = this[index];
isValueSet = true;
}
}
}
if (!isValueSet) {
throw new TypeError('Reduce of empty array with no initial value');
}
return value;
};
}
// Fix jQuery UI dialogs scrolling when click on links with tooltips // Fix jQuery UI dialogs scrolling when click on links with tooltips
jQuery.ui.dialog.prototype._focusTabbable = $.noop; jQuery.ui.dialog.prototype._focusTabbable = $.noop;
......
...@@ -56,7 +56,5 @@ ...@@ -56,7 +56,5 @@
.opacity(@opacity) { .opacity(@opacity) {
opacity: @opacity; opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})"; filter: ~"alpha(opacity=@{opacity-ie})";
} }
\ No newline at end of file
...@@ -13,11 +13,6 @@ div.clear { ...@@ -13,11 +13,6 @@ div.clear {
overflow: hidden; overflow: hidden;
} }
/* IE < 9 will use this */
body.old-ie .ie-hide {
display: none;
}
.centerLargeDiv { .centerLargeDiv {
width: 850px; width: 850px;
margin: auto; margin: auto;
......
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
<![endif]--> <![endif]-->
{% endblock %} {% endblock %}
</head> </head>
<!--[if lt IE 9 ]>
<body id="{{ bodyId|default('') }}" ng-app="app" class="old-ie {{ bodyClass|default('') }}">
<![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <!--[if (gte IE 9)|!(IE)]><!-->
<body id="{{ bodyId|default('') }}" ng-app="app" class="{{ bodyClass|default('') }}"> <body id="{{ bodyId|default('') }}" ng-app="app" class="{{ bodyClass|default('') }}">
<!--<![endif]--> <!--<![endif]-->
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
return piwikApi.fetch(params).then(function (response) { return piwikApi.fetch(params).then(function (response) {
updateWebsitesList(response); updateWebsitesList(response);
}, onError)['finally'](function () { }, onError).finally(function () {
model.isLoading = false; model.isLoading = false;
if (model.refreshInterval && model.refreshInterval > 0) { if (model.refreshInterval && model.refreshInterval > 0) {
......
...@@ -54,10 +54,7 @@ var Piwik_Overlay_Client = (function () { ...@@ -54,10 +54,7 @@ var Piwik_Overlay_Client = (function () {
src: piwikRoot + 'index.php?module=Overlay&action=notifyParentIframe#' + window.location.href src: piwikRoot + 'index.php?module=Overlay&action=notifyParentIframe#' + window.location.href
}).css({width: 0, height: 0, border: 0}); }).css({width: 0, height: 0, border: 0});
// in some cases, calling append right away doesn't work in IE8 $('body').append(iframe);
$(document).ready(function () {
$('body').append(iframe);
});
} }
} }
...@@ -84,50 +81,6 @@ var Piwik_Overlay_Client = (function () { ...@@ -84,50 +81,6 @@ var Piwik_Overlay_Client = (function () {
return el; return el;
} }
/** Special treatment for some internet explorers */
var ieStatusBarEventsBound = false;
function handleIEStatusBar() {
if (navigator.appVersion.indexOf("MSIE 7.") == -1
&& navigator.appVersion.indexOf("MSIE 8.") == -1) {
// this is not IE8 or lower
return;
}
// IE7/8 can't handle position:fixed so we need to do it by hand
statusBar.css({
position: 'absolute',
right: 'auto',
bottom: 'auto',
left: 0,
top: 0
});
var position = function () {
var scrollY = document.body.parentElement.scrollTop;
var scrollX = document.body.parentElement.scrollLeft;
statusBar.css({
top: (scrollY + $(window).height() - statusBar.outerHeight()) + 'px',
left: (scrollX + $(window).width() - statusBar.outerWidth()) + 'px'
});
};
position();
statusBar.css({width: 'auto'});
if (statusBar.width() < 350) {
statusBar.width(350);
} else {
statusBar.width(statusBar.width());
}
if (!ieStatusBarEventsBound) {
ieStatusBarEventsBound = true;
$(window).resize(position);
$(window).scroll(position);
}
}
return { return {
/** Initialize in-site analytics */ /** Initialize in-site analytics */
...@@ -225,15 +178,10 @@ var Piwik_Overlay_Client = (function () { ...@@ -225,15 +178,10 @@ var Piwik_Overlay_Client = (function () {
statusBar.show().append(item); statusBar.show().append(item);
handleIEStatusBar();
window.setTimeout(handleIEStatusBar, 100);
return function () { return function () {
item.remove(); item.remove();
if (statusBar.children().size() == 0) { if (statusBar.children().size() == 0) {
statusBar.hide(); statusBar.hide();
} else {
handleIEStatusBar();
} }
}; };
}, },
...@@ -243,8 +191,6 @@ var Piwik_Overlay_Client = (function () { ...@@ -243,8 +191,6 @@ var Piwik_Overlay_Client = (function () {
statusBar.find('.PIS_' + className).remove(); statusBar.find('.PIS_' + className).remove();
if (statusBar.children().size() == 0) { if (statusBar.children().size() == 0) {
statusBar.hide(); statusBar.hide();
} else {
handleIEStatusBar();
} }
}, },
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
setSites(sites); setSites(sites);
}, onError)['finally'](function () { }, onError).finally(function () {
if (callback) { if (callback) {
callback(); callback();
} }
......
...@@ -38,8 +38,4 @@ ...@@ -38,8 +38,4 @@
.sites_selector_container { .sites_selector_container {
padding-top: 0px; padding-top: 0px;
} }
}
.old-ie #sites.usersManager .sites_selector_title {
height: 30px;
} }
\ No newline at end of file
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
<link rel="stylesheet" type="text/css" href="plugins/Morpheus/stylesheets/ieonly.css"/> <link rel="stylesheet" type="text/css" href="plugins/Morpheus/stylesheets/ieonly.css"/>
<![endif]--> <![endif]-->
</head> </head>
<!--[if lt IE 9 ]>
<body ng-app="app" class="old-ie"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <!--[if (gte IE 9)|!(IE)]><!-->
<body ng-app="app"> <body ng-app="app">
<![endif]--> <![endif]-->
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter