diff --git a/css/backoffice/vendors/_datatables.scss b/css/backoffice/vendors/_datatables.scss index 231961e66..c873c17ae 100644 --- a/css/backoffice/vendors/_datatables.scss +++ b/css/backoffice/vendors/_datatables.scss @@ -46,6 +46,8 @@ $ibo-vendors-datatables--row-highlight--colors:( 'warning': ($ibo-color-orange-200), 'blue': ($ibo-color-blue-200), 'info': ($ibo-color-blue-200), + 'green': ($ibo-color-green-100), + 'success': ($ibo-color-green-200), ) !default; .dataTables_paginate { diff --git a/css/backoffice/vendors/_jqueryui.scss b/css/backoffice/vendors/_jqueryui.scss index 8905b9690..4d9e59f5e 100644 --- a/css/backoffice/vendors/_jqueryui.scss +++ b/css/backoffice/vendors/_jqueryui.scss @@ -300,6 +300,7 @@ $ibo-vendors-jqueryui--ui-slider--ui-slider-handle--hover--border-color: $ibo-co // Date picker .ui-datepicker { /* Note: We can't put the padding directly here as the jQuery JS code will position it regarding its inner width, not taking the padding here into account, so it is placed in the header/calendar elements */ + display: none; background-color: $ibo-vendors-jqueryui--ui-datepicker--background-color; border-radius: $ibo-vendors-jqueryui--ui-datepicker--border-radius; box-shadow: $ibo-vendors-jqueryui--ui-datepicker--box-shadow; diff --git a/js/utils.js b/js/utils.js index 78907be06..57b0562a2 100644 --- a/js/utils.js +++ b/js/utils.js @@ -807,8 +807,10 @@ const CombodoTooltip = { oOptions['content'] = sContent; // Interaction (selection, click, ...) have to be enabled manually - // Important: When set to true, if "data-tooltip-append-to" is not specified, tooltip will be append to the parent element instead of the body - const bInteractive = oElem.attr('data-tooltip-interaction-enabled') === 'true'; + // Important: When set to true, if "data-tooltip-append-to" is not specified, tooltip will be appended to the parent element instead of the body + // Note: Defaults to true if it contains hyperlink + let bDefaultInteractive = (bEnableHTML && sContent.indexOf(" -1) + const bInteractive = oElem.attr('data-tooltip-interaction-enabled') !== undefined ? oElem.attr('data-tooltip-interaction-enabled') === 'true' : bDefaultInteractive; oOptions['interactive'] = bInteractive; // Element to append the tooltip to diff --git a/sources/Controller/PreferencesController.php b/sources/Controller/PreferencesController.php index 187639219..5fb731910 100644 --- a/sources/Controller/PreferencesController.php +++ b/sources/Controller/PreferencesController.php @@ -7,6 +7,7 @@ namespace Combodo\iTop\Controller; use appUserPreferences; +use CoreUnexpectedValue; use Exception; use MetaModel; use ormDocument; @@ -38,9 +39,14 @@ class PreferencesController appUserPreferences::SetPref('user_picture_placeholder', $sImageFilename); $sUserPicturesFolder = 'images/user-pictures/'; - $sImageAbsPath = APPROOT.$sUserPicturesFolder.$sImageFilename; + $sImageAbsPath = utils::RealPath(APPROOT.$sUserPicturesFolder.$sImageFilename, APPROOT.$sUserPicturesFolder); $sImageAbsUrl = utils::GetAbsoluteUrlAppRoot().$sUserPicturesFolder.$sImageFilename; - + + // Check if we're still in the right folder + if($sImageAbsPath === false){ + throw new CoreUnexpectedValue('Error while updating user image, invalid image path "'.$sUserPicturesFolder.$sImageFilename.'"'); + } + // Check file can be read $sImageData = file_get_contents($sImageAbsPath); if (false === $sImageData) {