diff --git a/js/pages/backoffice/toolbox.js b/js/pages/backoffice/toolbox.js index df7f11a1a..9a822516a 100644 --- a/js/pages/backoffice/toolbox.js +++ b/js/pages/backoffice/toolbox.js @@ -64,7 +64,34 @@ function SwitchTabMode() * @since 3.0.0 */ const CombodoBackofficeToolbox = { - + /** + * Set the oElem in fullscreen mode, meaning that it will take all the screen and be above everything else. + * + * @param {object} oElem The jQuery object of the element + * @constructor + */ + SetElementToFullscreenMode: function(oElem) { + oElem.parents().addClass('ibo-has-fullscreen-descendant'); + oElem.addClass('ibo-is-fullscreen'); + }, + /** + * Remove the oElem from fullscreen mode. + * If none passed, all fullscreen elements will be removed from it + * + * @param {object|null} oElem The jQuery object of the element + * @constructor + */ + RemoveElementFromFullscreenMode: function(oElem = null) { + // If no element passed, remove any element from fullscreen mode + if(oElem === null) { + $(document).find('.ibo-has-fullscreen-descendant').removeClass('ibo-has-fullscreen-descendant'); + $(document).find('.ibo-is-fullscreen').removeClass('ibo-is-fullscreen'); + } + else { + oElem.parents().removeClass('ibo-has-fullscreen-descendant'); + oElem.removeClass('ibo-is-fullscreen'); + } + } }; // Processing