diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 9d30d93ad43..5bd060c878a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -190,8 +190,9 @@ function getBrowserInfo($user_agent)
}
// OS
- if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
+ if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
+ elseif (preg_match('/windows/i', $user_agent)) { $os='windows'; }
// Name
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
@@ -201,7 +202,8 @@ function getBrowserInfo($user_agent)
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; }
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
- elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
+ elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
+ elseif (preg_match('/(Windows NT\s([0-9]+\.[0-9])).*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
elseif (preg_match('/l(i|y)n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) { $name='lynxlinks'; $version=$reg[4]; }
if ($tablet) {
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index daa2edb87c0..68f580f4b23 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -706,7 +706,7 @@ div.fiche>form>div.div-table-responsive {
}
.flexcontainer {
- display: inline-flex;
+ browser->name, array('chrome','firefox'))) echo 'display: inline-flex;'."\n"; ?>
flex-flow: row wrap;
justify-content: flex-start;
}
@@ -716,10 +716,11 @@ div.fiche>form>div.div-table-responsive {
.thumbstat150 {
flex: 1 1 170px;
}
-.thumbstat, thumbstat150 {
+.thumbstat, .thumbstat150 {
/* flex-grow: 1; */
/* flex-shrink: 1; */
/* flex-basis: 140px; */
+ display: inline;
width: 100%;
justify-content: flex-start;
align-self: flex-start;
@@ -2819,7 +2820,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
width: 103px;
}
.boxstats130 {
- width: 160px;
+ width: 158px;
height: 48px;
padding: 3px
}
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index f75b1375894..91f576f5195 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -707,7 +707,7 @@ div.fiche>form>div.div-table-responsive {
}
.flexcontainer {
- display: inline-flex;
+ browser->browsername, array('chrome','firefox'))) echo 'display: inline-flex;' ?>
flex-flow: row wrap;
justify-content: flex-start;
}
@@ -717,10 +717,11 @@ div.fiche>form>div.div-table-responsive {
.thumbstat150 {
flex: 1 1 150px;
}
-.thumbstat, thumbstat150 {
+.thumbstat, .thumbstat150 {
/* flex-grow: 1; */
/* flex-shrink: 1; */
/* flex-basis: 140px; */
+ display: inline;
width: 100%;
justify-content: flex-start;
align-self: flex-start;
diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php
index 0821e6c7a6c..77953ed0141 100644
--- a/test/phpunit/FunctionsLibTest.php
+++ b/test/phpunit/FunctionsLibTest.php
@@ -82,7 +82,7 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
if (! function_exists('mb_substr')) { print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(); }
-
+
print __METHOD__."\n";
}
@@ -278,6 +278,15 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
$this->assertFalse($tmp['tablet']);
$this->assertEquals('classic', $tmp['layout']);
+ //Internet Explorer 11 bis
+ $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP06; rv:11.0) like Gecko';
+ $tmp=getBrowserInfo($user_agent);
+ $this->assertEquals('ie',$tmp['browsername']);
+ $this->assertEquals('11.0',$tmp['browserversion']);
+ $this->assertEmpty($tmp['phone']);
+ $this->assertFalse($tmp['tablet']);
+ $this->assertEquals('classic', $tmp['layout']);
+
//iPad
$user_agent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25';
$tmp=getBrowserInfo($user_agent);
@@ -445,11 +454,11 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
$text='ABC';
$after=dol_string_nohtmltag($text,1);
$this->assertEquals("ABC",$after,"test6");
-
+
$text='DEF';
$after=dol_string_nohtmltag($text,1);
$this->assertEquals("DEF",$after,"test7");
-
+
return true;
}