diff --git a/inc/ajax.class.php b/inc/ajax.class.php
index 54798f3d2e2..6a021f01179 100644
--- a/inc/ajax.class.php
+++ b/inc/ajax.class.php
@@ -290,8 +290,10 @@ static function createTabs($tabdiv_id='tabspanel', $tabdivcontent_id='tabcontent
$rand = mt_rand();
if (count($tabs) > 0) {
-
- echo "
";
+ echo "
";
+ if (in_array($_SESSION['glpilayout'], array('classic', 'vsplit'))) {
+ $orientation = 'horizontal';
+ }
echo "
";
$current = 0;
$selected_tab = 0;
@@ -334,10 +336,16 @@ static function createTabs($tabdiv_id='tabspanel', $tabdivcontent_id='tabcontent
$.get('".$CFG_GLPI['root_doc']."/ajax/updatecurrenttab.php',
{ itemtype: '$type', id: '$ID', tab: newIndex });
}});";
+
if ($orientation=='vertical') {
$js .= "$('#tabs$rand').tabs().addClass( 'ui-tabs-vertical ui-helper-clearfix' );";
}
- $js .= "$('#tabs$rand').removeClass( 'ui-corner-top' ).addClass( 'ui-corner-left' );";
+
+ if (in_array($_SESSION['glpilayout'], array('classic', 'vsplit'))) {
+ $js .= "$('#tabs$rand').scrollabletabs();";
+ } else {
+ $js .= "$('#tabs$rand').removeClass( 'ui-corner-top' ).addClass( 'ui-corner-left' );";
+ }
$js .= "// force reload
function reloadTab(add) {