[FIX] website: need to add an attribute on html to apply css selector in function of the browser. Fix the media video display for ie

This commit is contained in:
Christophe Matthieu
2015-02-16 10:49:28 +01:00
parent 72c418e6dd
commit a7e0b73930
3 changed files with 19 additions and 0 deletions
@@ -602,6 +602,10 @@ div.media_iframe_video .css_editable_mode_display {
z-index: 2;
}
html[data-browser^="msie"] div.media_iframe_video iframe {
margin-left: 0;
}
/* Mobile view */
@media (max-width: 768px) {
img:not(.cke_iframe), .media_iframe_video, span.fa, i.fa {
@@ -484,6 +484,9 @@ div.media_iframe_video
display: none
z-index: 2
html[data-browser^="msie"] div.media_iframe_video iframe
margin-left: 0
/* Mobile view */
@media (max-width: 768px)
+12
View File
@@ -1,6 +1,18 @@
(function() {
"use strict";
/* --- Set the browser into the dom for css selectors --- */
var browser;
if ($.browser.webkit) browser = "webkit";
else if ($.browser.safari) browser = "safari";
else if ($.browser.opera) browser = "opera";
else if ($.browser.msie || ($.browser.mozilla && +$.browser.version.replace(/^([0-9]+\.[0-9]+).*/, '\$1') < 20)) browser = "msie";
else if ($.browser.mozilla) browser = "mozilla";
browser += ","+$.browser.version;
if (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())) browser += ",mobile";
document.documentElement.setAttribute('data-browser', browser);
/* ---------------------------------------------------- */
var website = {};
openerp.website = website;