Commit 249b3d72 authored by Cédric Anne's avatar Cédric Anne

Merge branch '9.5/bugfixes'

parents b4eef980 986bfb74
......@@ -1192,16 +1192,6 @@ class CommonGLPI {
function display($options = []) {
global $CFG_GLPI;
// Init active tab to main if not defined
if (!isset($_SESSION['glpi_tabs'][self::getType()])) {
// TODO: use array_key_first when php 7.3 is supported
$tabs = array_keys($this->defineAllTabs());
$first_tab = array_shift($tabs);
if ($first_tab) {
Session::setActiveTab(self::getType(), $first_tab);
}
}
if (isset($options['id'])
&& !$this->isNewID($options['id'])) {
if (!$this->getFromDB($options['id'])) {
......
......@@ -554,7 +554,15 @@ var GLPIPlanning = {
}
})
.load(ajaxurl, function() {
$(this).dialog('option', 'position', ['center', 'center'] );
$(this).dialog({
position: {
my: 'center',
at: 'center',
viewport: $(window),
of: $('#page'),
collision: 'fit'
}
});
});
}
},
......@@ -596,7 +604,15 @@ var GLPIPlanning = {
res_items_id: items_id,
},
function() {
$(this).dialog('option', 'position', ['center', 'center'] );
$(this).dialog({
position: {
my: 'center',
at: 'center',
viewport: $(window),
of: $('#page'),
collision: 'fit'
}
});
}
);
},
......@@ -606,7 +622,7 @@ var GLPIPlanning = {
},
position: {
my: 'center',
at: 'top',
at: 'center top',
viewport: $(window),
of: $('#page')
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment