diff --git a/css/backoffice/layout/tab-container/_tab-container.scss b/css/backoffice/layout/tab-container/_tab-container.scss index 66d1b71d4..5221f7e66 100644 --- a/css/backoffice/layout/tab-container/_tab-container.scss +++ b/css/backoffice/layout/tab-container/_tab-container.scss @@ -38,6 +38,14 @@ $ibo-tab-container--tab-container--label--spacing: 20px !default; $ibo-tab-container--tab-container--label--margin-bottom: 20px !default; $ibo-tab-container--tab-container--label--span--margin-left: 40px !default; +$ibo-tab--temporary-remote-content-max-height: 300px !default; + +$ibo-tab--temporary-remote-content--button--color: $ibo-color-grey-800 !default; + +$ibo-tab--temporary-remote-content--button--hover--opacity: 0.5 !default; +$ibo-tab--temporary-remote-content--button--hover--background-color: $ibo-color-grey-900 !default; +$ibo-tab--temporary-remote-content--button--hover--color: $ibo-color-grey-200 !default; + /* Rules */ .ibo-tab-container--tabs-list { position: relative; @@ -116,7 +124,12 @@ $ibo-tab-container--tab-container--label--span--margin-left: 40px !default; padding: $ibo-tab-container--tab-container--padding-y $ibo-tab-container--tab-container--padding-x; } +.ibo-is-scrollable .ibo-tab-container--tab-container--label{ + display: block; +} + .ibo-tab-container--tab-container--label{ + display: none; margin-bottom: $ibo-tab-container--tab-container--label--margin-bottom; overflow-x: hidden; > span{ @@ -144,4 +157,41 @@ $ibo-tab-container--tab-container--label--span--margin-left: 40px !default; left: 100%; margin-left: $ibo-tab-container--tab-container--label--spacing; } +} + +.ibo-tab--temporary-remote-content{ + position: relative; +} + +.ibo-tab--temporary-remote-content--placeholder{ + height: auto; + position: relative; + max-height: $ibo-tab--temporary-remote-content-max-height; + >svg{ + max-height: $ibo-tab--temporary-remote-content-max-height; + } +} + +.ibo-tab--temporary-remote-content--button{ + position: absolute; + top: 0; + display: flex; + justify-content: center; + align-content: center; + flex-direction: column; + text-align: center; + + height: 100%; + width: 100%; + + cursor: pointer; + @extend %ibo-font-ral-med-300; + + background-color: transparent; + color: $ibo-tab--temporary-remote-content--button--color; + &:hover{ + opacity: $ibo-tab--temporary-remote-content--button--hover--opacity; + background-color: $ibo-tab--temporary-remote-content--button--hover--background-color; + color: $ibo-tab--temporary-remote-content--button--hover--color; + } } \ No newline at end of file diff --git a/dictionaries/ui/layouts/en.dictionary.itop.tab-container.php b/dictionaries/ui/layouts/en.dictionary.itop.tab-container.php index e8b661324..0892bca76 100644 --- a/dictionaries/ui/layouts/en.dictionary.itop.tab-container.php +++ b/dictionaries/ui/layouts/en.dictionary.itop.tab-container.php @@ -6,4 +6,5 @@ Dict::Add('EN US', 'English', 'English', [ 'UIBlock:Error:AddBlockNotTabForbidden' => 'Cannot add block %1$s to %2$s (only Tab blocks are allowed)', + 'UIBlock:TabContainer:RemoteTabLoad' => 'Click to load this tab', ]); diff --git a/images/placeholders/skeleton.svg b/images/placeholders/skeleton.svg new file mode 100644 index 000000000..8c945d230 --- /dev/null +++ b/images/placeholders/skeleton.svg @@ -0,0 +1,87 @@ + \ No newline at end of file diff --git a/js/layouts/tab-container/scrollable-tabs.js b/js/layouts/tab-container/scrollable-tabs.js index 69c53597a..3eef3427a 100644 --- a/js/layouts/tab-container/scrollable-tabs.js +++ b/js/layouts/tab-container/scrollable-tabs.js @@ -4,10 +4,25 @@ $.widget( "itop.scrollabletabs", $.ui.tabs, { tab_toggler: '[data-role="ibo-tab-container--tab-toggler"]', tab_container_list: '[data-role="ibo-tab-container--tab-container-list"]' }, + options: + { + remote_tab_load_dict: 'Click to load', + remotePanelCreated: function( panel, tab , placeholder ) { + if(tab.attr('data-role') === 'ibo-tab-container--tab-header') + { + panel.prepend('