diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index bf357db51..0d5ed8e1a 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -2385,43 +2385,59 @@ class AttributeLinkedSet extends AttributeDefinition { if ($oFormField === null) { - $sFormFieldClass = static::GetFormFieldClass(); - $oFormField = new $sFormFieldClass($this->GetCode()); - } + $sFormFieldClass = static::GetFormFieldClass(); + $oFormField = new $sFormFieldClass($this->GetCode()); + } - // Setting target class + // Setting target class if (!$this->IsIndirect()) { - $sTargetClass = $this->GetLinkedClass(); - } else { - /** @var \AttributeExternalKey $oRemoteAttDef */ - /** @var \AttributeLinkedSetIndirect $this */ - $oRemoteAttDef = MetaModel::GetAttributeDef($this->GetLinkedClass(), $this->GetExtKeyToRemote()); - $sTargetClass = $oRemoteAttDef->GetTargetClass(); + $sTargetClass = $this->GetLinkedClass(); + } else { + /** @var \AttributeExternalKey $oRemoteAttDef */ + /** @var \AttributeLinkedSetIndirect $this */ + $oRemoteAttDef = MetaModel::GetAttributeDef($this->GetLinkedClass(), $this->GetExtKeyToRemote()); + $sTargetClass = $oRemoteAttDef->GetTargetClass(); - /** @var \AttributeLinkedSetIndirect $this */ - $oFormField->SetExtKeyToRemote($this->GetExtKeyToRemote()); - } - $oFormField->SetTargetClass($sTargetClass); - $oFormField->SetIndirect($this->IsIndirect()); - // Setting attcodes to display - $aAttCodesToDisplay = MetaModel::FlattenZList(MetaModel::GetZListItems($sTargetClass, 'list')); - // - Adding friendlyname attribute to the list is not already in it - $sTitleAttCode = MetaModel::GetFriendlyNameAttributeCode($sTargetClass); - if (($sTitleAttCode !== null) && !in_array($sTitleAttCode, $aAttCodesToDisplay)) { - $aAttCodesToDisplay = array_merge(array($sTitleAttCode), $aAttCodesToDisplay); - } - // - Adding attribute labels - $aAttributesToDisplay = array(); - foreach ($aAttCodesToDisplay as $sAttCodeToDisplay) { - $oAttDefToDisplay = MetaModel::GetAttributeDef($sTargetClass, $sAttCodeToDisplay); - $aAttributesToDisplay[$sAttCodeToDisplay] = $oAttDefToDisplay->GetLabel(); - } - $oFormField->SetAttributesToDisplay($aAttributesToDisplay); + /** @var \AttributeLinkedSetIndirect $this */ + $oFormField->SetExtKeyToRemote($this->GetExtKeyToRemote()); + } + $oFormField->SetTargetClass($sTargetClass); + $oFormField->SetLinkedClass($this->GetLinkedClass()); + $oFormField->SetIndirect($this->IsIndirect()); + // Setting attcodes to display + $aAttCodesToDisplay = MetaModel::FlattenZList(MetaModel::GetZListItems($sTargetClass, 'list')); + // - Adding friendlyname attribute to the list is not already in it + $sTitleAttCode = MetaModel::GetFriendlyNameAttributeCode($sTargetClass); + if (($sTitleAttCode !== null) && !in_array($sTitleAttCode, $aAttCodesToDisplay)) { + $aAttCodesToDisplay = array_merge(array($sTitleAttCode), $aAttCodesToDisplay); + } + // - Adding attribute properties + $aAttributesToDisplay = array(); + foreach ($aAttCodesToDisplay as $sAttCodeToDisplay) { + $oAttDefToDisplay = MetaModel::GetAttributeDef($sTargetClass, $sAttCodeToDisplay); + $aAttributesToDisplay[$sAttCodeToDisplay] = [ + 'label' => $oAttDefToDisplay->GetLabel(), + 'mandatory' => !$oAttDefToDisplay->IsNullAllowed(), + ]; + } + $oFormField->SetAttributesToDisplay($aAttributesToDisplay); - parent::MakeFormField($oObject, $oFormField); + // Append lnk attributes (filtered from zlist) + $aLnkAttDefToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectLinkClass($this->m_sHostClass, $this->m_sCode); + $aLnkAttributesToDisplay = array(); + foreach ($aLnkAttDefToDisplay as $oLnkAttDefToDisplay) { + $aLnkAttributesToDisplay[$oLnkAttDefToDisplay->GetCode()] = [ + 'sortable' => false, + 'label' => $oLnkAttDefToDisplay->GetLabel(), + 'mandatory' => !$oLnkAttDefToDisplay->IsNullAllowed(), + ]; + } + $oFormField->SetLnkAttributesToDisplay($aLnkAttributesToDisplay); - return $oFormField; - } + parent::MakeFormField($oObject, $oFormField); + + return $oFormField; + } public function IsPartOfFingerprint() { diff --git a/datamodels/2.x/itop-portal-base/portal/public/css/portal.css b/datamodels/2.x/itop-portal-base/portal/public/css/portal.css index 6bc789871..87f206385 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/css/portal.css +++ b/datamodels/2.x/itop-portal-base/portal/public/css/portal.css @@ -14,8 +14,7 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - */ -/*! + *//*! * Copyright (C) 2013-2023 Combodo SARL * * This file is part of iTop. @@ -31,1902 +30,6 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - */ -/*! + *//*! * Combodo portal template v1.0.0 -*/ -/*******************/ -/* Global settings */ -/*******************/ -@media (max-width: 768px) { - body { - padding-top: 60px; - } - - body.home { - padding-top: 70px; - } -} -footer { - margin: 5em 1em; - text-align: center; -} - -/* Environment banner */ -#envbanner { - position: relative; - z-index: 10; - padding: 5px 15px; - text-align: center; -} - -#envbanner > button { - margin-left: 5px; - color: #000; -} - -/* Navigation menu */ -.navbar-nav .dropdown-menu a .glyphicon, -.user_infos .dropdown-menu a .glyphicon { - margin-right: 15px; -} - -.nav > li > a > span.brick_icon, -.dropdown-menu > li > a > span.brick_icon { - margin-right: 20px; - vertical-align: sub; -} - -/* Topbar */ -#topbar .navbar-header { - position: relative; - z-index: 2; -} - -#topbar .navbar-collapse { - position: relative; - z-index: 1; - overflow-y: auto; -} - -#topbar .navbar-collapse > .navbar-nav { - padding-top: 30px; -} - -#topbar .navbar-brand > img { - max-height: 100%; -} - -#topbar .user_infos { - text-decoration: none; -} - -#topbar .user_photo { - position: absolute; - display: block; - top: 5px; - left: 10px; - width: 65px; - height: 65px; - background-size: 100%; - background-position: center center; - background-color: #585653; - border: 2px solid #FFFFFF; - border-radius: 100%; - box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.4); -} - -#topbar .user_fullname { - display: inline-block; - position: absolute; - padding-left: 85px; - max-width: 55%; - /*color: $white;*/ - white-space: nowrap; - text-overflow: ellipsis; - overflow-x: hidden; -} - -/* Sidebar */ -@media (min-width: 768px) { - #sidebar { - position: fixed; - top: 0px; - left: 0px; - padding: 0px; - /* Overriding BS */ - height: 100%; - } - - #sidebar .user_card { - padding: 30px 0px; - text-align: center; - } - - #sidebar .user_card .user_photo { - margin: 0px auto 10px auto; - width: 80px; - height: 80px; - background-size: 100%; - background-position: center center; - background-color: #585653; - background-repeat: no-repeat; - border: 2px solid #FFFFFF; - border-radius: 100%; - } - - #sidebar .user_card .user_infos { - font-size: 1em; - color: #FFFFFF; - } - - #sidebar .user_card .user_infos .dropdown-toggle { - color: #FFFFFF; - } - - #sidebar .user_card .user_options.dropdown-menu { - width: 92%; - left: 4%; - } - - #sidebar .user_card .user_fullname { - font-weight: 600; - } - - #sidebar .menu { - max-height: 59%; - overflow-y: auto; - overflow-x: hidden; - } - - #sidebar .menu .navbar-nav { - width: 100%; - } - - #sidebar .menu .navbar-nav > li { - width: 100%; - } - - #sidebar .menu .navbar-nav > li > a > .brick_icon { - width: 1.2em; - vertical-align: sub; - text-align: center; - margin-right: 10px; - } - - #sidebar .logo { - position: absolute; - bottom: 15px; - width: 100%; - text-align: center; - } - - #sidebar .logo img { - max-width: 100%; - max-height: 50px; - } - - /* Main content */ - #main-wrapper { - margin-top: 20px; - } -} -/* Warning : Not a offical BS breakpoint */ -@media (min-width: 1600px) { - #sidebar .user_card .user_photo { - width: 120px; - height: 120px; - } - - #sidebar .menu .nav > li > a > .brick_icon { - margin-right: 20px; - } -} -/* Overlays*/ -.global_overlay { - z-index: 9999; - display: none; - position: fixed; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - background-color: black; - opacity: 0.5; -} - -#page_overlay .overlay_content { - margin-top: 20em; - width: 100%; - color: white; -} - -.overlay_content { - text-align: center; -} - -.content_loader { - text-align: center; -} - -.content_loader .icon { - margin-bottom: 0.3em; - /*width: 52px;*/ - height: 38px; - /* 50px; */ - /* Hack to make loader circle perfectly */ - font-size: 3em; - /* 4em; */ - animation: spin 1.2s linear infinite; - -webkit-animation: spin 1.2s linear infinite; - -moz-animation: spin 1.2s linear infinite; - -ms-animation: spin 1.2s linear infinite; -} - -.content_loader .message { - font-size: 1.5em; - /* 2em; */ -} - -.datatables_overlay { - padding: 5% 0px !important; - background-color: white; -} - -/******************/ -/* Global classes */ -/******************/ -.vertical-center { - /* Make it a flex container */ - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - /* Align the bootstrap's container vertically */ - -webkit-box-align: center; - -webkit-align-items: center; - -moz-box-align: center; - -ms-flex-align: center; - align-items: center; - /* Also 'margin: 0 auto' doesn't have any effect on flex items in such web browsers - hence the bootstrap's container won't be aligned to the center anymore. - - Therefore, we should use the following declarations to get it centered again */ - -webkit-box-pack: center; - -moz-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.text_decoration { - vertical-align: baseline; - margin-right: 8px; -} - -/*********************/ -/* Global animations */ -/*********************/ -/* Spin */ -@keyframes spin { - 100% { - transform: rotate(360deg); - } -} -@-webkit-keyframes spin { - 100% { - -webkit-transform: rotate(360deg); - } -} -@-moz-keyframes spin { - 100% { - -moz-transform: rotate(360deg); - } -} -@-ms-keyframes spin { - 100% { - -ms-transform: rotate(360deg); - } -} -/*********************/ -/* BS theme override */ -/*********************/ -.list-group.tree { - margin-top: 11px; - margin-bottom: -11px; -} - -.list-group.tree .list-group-item { - padding-right: 0px; - /* To align all actions on the right without indent */ -} - -/******************/ -/* Modal settings */ -/******************/ -#modal-for-alert { - z-index: 9999; - /* Should always be on top to display errors messages */ -} - -.modal-content .content_loader { - margin: 7em 0em; - text-align: center; -} - -/*******************/ -/* Clipboard icons */ -/*******************/ -.url-to-clipboard.url-to-clipboard-icon { - opacity: 0.5; - cursor: pointer; - transition: opacity 0.2s linear; -} -.url-to-clipboard.url-to-clipboard-icon:hover { - opacity: 1; -} - -.url-to-clipboard-tooltip-copied { - color: green; - margin-right: 3px; -} - -/**************************/ -/* MagnificPopup settings */ -/**************************/ -.mfp-bg { - z-index: 1200; -} - -.mfp-wrap { - z-index: 1210; -} - -.mfp-img { - cursor: pointer; - cursor: zoom-out; -} - -/********************/ -/* Typeahead setting */ -/********************/ -.twitter-typeahead .tt-menu { - max-height: 200px; - overflow-y: auto; -} - -@media (min-width: 768px) { - .twitter-typeahead .tt-menu { - max-height: 300px; - } -} -.twitter-typeahead .tt-dataset > .content_loader { - margin: 10px 0px; - text-align: center; - font-size: 0.6em; -} - -.twitter-typeahead .tt-dataset > .content_loader .icon { - height: 25px; -} - -.twitter-typeahead .tt-dataset .no_result { - text-align: center; - font-style: italic; -} - -/*****************/ -/* Home settings */ -/*****************/ -.home #main-wrapper { - padding-top: 15px; -} - -.home .tile { - display: block; - margin-bottom: 8px; - padding: 0em 1em; - min-height: 4em; - background-color: #FFFFFF; - background-image: none; - border: none; - border-radius: 0px; - text-align: center; - text-decoration: none; - white-space: normal; - line-height: 4em; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); -} - -.home .tile .tile_decoration { - position: absolute; - top: 0.3em; - left: 2.5em; -} - -.home .tile .tile_title { - font-weight: bold; - color: #777; -} - -.home .tile .tile_title > span.icon { - color: #EA7D1E; -} - -.home .tile .tile_description { - display: none; - color: #555555; -} - -/**********************************/ -/* ManageBrick badge tile display */ -/**********************************/ -.home a.tile.tile_badge > div { - display: table; - width: 100%; -} - -.home a.tile.tile_badge > div > div { - display: table-row; -} - -.home a.tile.tile_badge > div > div > div { - display: table-cell; -} - -@media (max-width: 768px) { - .home a.tile.tile_badge > div > div > div.tile_body div.tile_count { - position: absolute; - top: 0em; - right: 2em; - text-align: right; - font-size: 1.2em; - } - - .home a.tile.tile_badge > div.tile_description { - display: none; - } -} -@media (min-width: 768px) { - .home .tile { - display: block; - margin-bottom: 25px; - padding: 40px 40px 30px 40px; - min-height: 10em; - text-align: left; - transition: all 0.2s linear; - } - - .home .tile:hover { - box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1); - } - - .home .tile .tile_decoration { - display: block; - position: relative; - float: left; - top: 1.5em; - left: initial; - margin: 0px 30px 15px 0px; - } - - .home .tile .tile_body { - display: block; - padding-left: 4.3em; - text-align: left; - line-height: 1.5em; - } - - .home .tile .tile_title { - margin-bottom: 1em; - font-size: 1em; - } - - .home .tile .tile_description { - display: block; - text-align: left; - } - - .home a.tile.tile_badge { - height: 10em; - overflow: hidden; - } - - .home a.tile.tile_badge > div > div > div.tile_decoration { - top: unset; - vertical-align: middle; - } - - .home a.tile.tile_badge > div > div > div.tile_decoration > span.icon { - font-size: 4em; - } - - .home a.tile.tile_badge > div > div > div.tile_body { - position: relative; - padding: 0; - margin: 0; - vertical-align: middle; - text-align: right; - } - - .home a.tile.tile_badge > div > div > div.tile_body .tile_title { - margin-top: 1em; - margin-bottom: 0; - font-size: 1em; - font-weight: normal; - } - - .home a.tile.tile_badge > div > div > div.tile_body .tile_count { - position: absolute; - top: 0; - right: 0; - font-size: 2em; - font-weight: bold; - color: #777; - } - - .home a.tile.tile_badge .tile_description { - display: none; - } -} -@media (min-width: 992px) { - .home .tile { - min-height: 14em; - padding: 30px 40px 30px 40px; - } - - .home .tile .tile_decoration > span.icon { - font-size: 4em; - } - - .home .tile .tile_body { - padding-left: 6.3em; - } - - .home .tile .tile_title { - font-size: 1.4em; - } - - .home .tile .tile_description { - font-size: 1.2em; - } - - .home a.tile.tile_badge > div > div > div.tile_body .tile_title { - font-size: 1.2em; - } - - .home a.tile.tile_badge > div > div > div.tile_body .tile_count { - font-size: 3em; - } - - .home a.tile.tile_badge > div > div > div.tile_decoration > span.icon { - font-size: 4em; - } - - .home a.tile.tile_badge .tile_description { - display: block; - font-size: 1em; - text-align: center; - } -} -@media (min-width: 1200px) { - .home .tile { - margin-bottom: 40px; - min-height: 15em; - padding: 40px 50px 30px 50px; - } - - .home .tile .tile_decoration { - margin: 0px 40px 15px 0px; - top: 1.5em; - } - - .home .tile .tile_decoration > span.icon { - font-size: 6em; - } - - .home .tile .tile_body { - padding-left: 9.1em; - } - - .home .tile .tile_title { - font-size: 1.5em; - } - - .home .tile .tile_description { - font-size: 1.2em; - } - - .home a.tile.tile_badge > div > div > div.tile_decoration > span.icon { - font-size: 6em; - } -} -/********************/ -/* Modules settings */ -/********************/ -#main-header { - text-align: center; -} - -#main-header-title { - margin-bottom: 15px; -} -#main-header-title .subtitle { - display: block; - margin-top: 8px; - margin-bottom: 20px; -} - -#main-header-actions { - margin-bottom: 15px; -} - -/* This is no longer necessary but we keep it just in case */ -/*#main-header-actions .btn-group .btn{ - padding: 0em 1.5em; - line-height: 2.4em; - font-size: 14px; - background-image: none; -}*/ -@media (min-width: 768px) { - #main-header:after { - clear: both; - } - - #main-header-title { - float: left; - margin-bottom: 0px; - min-height: 6em; - text-align: left; - } - - #main-header-actions { - float: right; - margin-bottom: 0px; - } -} -.dataTables_wrapper { - padding: 10px 10px; -} - -.dataTable.table td img { - max-width: 100%; - height: initial !important; -} - -#brick_content_toolbar { - /* margin: 10px 0px 6px 0px; */ - padding: 10px; -} - -#brick_content_toolbar > div label { - font-weight: normal; - white-space: nowrap; - text-align: left; -} - -#brick_content_toolbar > div label input { - margin-left: 0.5em; - display: inline-block; - width: 130px; -} - -/***********************/ -/* Brick communication */ -/***********************/ -/* Home tile */ -.home .tile.tile_communication { - padding: 20px; - background-color: #EDEDED; - border: none; - font-weight: initial; -} - -.home .tile_communication .carousel { - margin-bottom: 0px; - width: 100%; - height: 200px; -} - -/**********************/ -/* Brick user profile */ -/**********************/ -#user-profile-wrapper .user_profile_picture .content_loader { - position: absolute; - z-index: 1; - top: 0; - left: 0; - padding-top: 4em; - width: 100%; - height: 100%; - text-align: center; - color: white; - background-color: black; - opacity: 0.5; -} - -#user-profile-wrapper .user_profile_picture .preview { - display: inline-block; - position: relative; - max-width: 175px; - max-height: 175px; - overflow: hidden; -} - -#user-profile-wrapper .user_profile_picture .preview img { - max-width: 100%; - max-height: 100%; -} - -#user-profile-wrapper .user_profile_picture .actions { - display: inline-block; - vertical-align: top; - /*middle;*/ - margin-left: 5px; -} - -#user-profile-wrapper .user_profile_picture .actions .btn { - display: block; - position: relative; - margin-bottom: 10px; -} - -#user-profile-wrapper .user_profile_picture .actions .btn:last-child { - margin-bottom: 0px; -} - -#user-profile-wrapper .user_profile_picture .actions .btn.btn_edit { - overflow: hidden; -} - -#user-profile-wrapper .user_profile_picture .actions .btn.btn_edit input { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - opacity: 0; - cursor: pointer; -} - -/****************/ -/* Brick browse */ -/****************/ -/* - Tree mode */ -/****************/ -#brick_content_tree { - position: relative; - margin-top: 0px; -} - -#brick_content_tree .list-group-item { - padding-top: 0px; -} - -#brick_content_tree .list-group-item > .tree-item-wrapper { - display: block; - padding-top: 10px; - color: inherit; - text-decoration: inherit; - cursor: pointer; -} - -.list-group-item > .list-group-item-actions { - /*display: none; Displaying actions only when hovering was not unanimous in the team */ - position: absolute; - top: 10px; - right: 10px; -} - -.list-group-item:hover > .list-group-item-actions, -.mosaic-group-item:hover > .mosaic-group-item-actions { - display: block; -} - -.list-group-item .list-group-item-actions a:not(:first-child), -.mosaic-group-item .mosaic-group-item-actions a:not(:first-child) { - margin-left: 10px; -} - -.list-group-item .keep-spinning { - animation: spin 1s linear infinite; - -webkit-animation: spin 1s linear infinite; - -moz-animation: spin 1s linear infinite; - -ms-animation: spin 1s linear infinite; -} - -.list-group.tree .list-group-item .list-group-item-description { - display: block; - margin-top: 3px; - font-size: 0.8em; -} - -/* Secondary actions */ -.list-group-item-actions .group-actions-wrapper, -.mosaic-group-item-actions .group-actions-wrapper, -table .group-actions-wrapper { - text-align: center; -} - -table .group-actions { - position: relative; -} - -.list-group-item-actions a.glyphicon-menu-hamburger, -.mosaic-group-item-actions a.glyphicon-menu-hamburger, -table .group-actions a.glyphicon-menu-hamburger { - cursor: pointer; - text-decoration: none; -} - -.list-group-item-actions .item-action-wrapper, -.mosaic-group-item-actions .item-action-wrapper, -table .group-actions .item-action-wrapper { - display: none; - position: absolute; - z-index: 5; - bottom: -7px; - right: 15px; - -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15); - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15); -} - -.list-group-item-actions .item-action-wrapper .glyphicon, -.mosaic-group-item-actions .item-action-wrapper .glyphicon, -table .group-actions .item-action-wrapper .glyphicon { - margin-right: 0.6em; -} - -.list-group-item-actions .item-action-wrapper.collapse.in, -.mosaic-group-item-actions .item-action-wrapper.collapse.in, -table .group-actions .item-action-wrapper.collapse.in { - display: block; -} - -.list-group-item-actions .item-action-wrapper .panel-body > p, -.mosaic-group-item-actions .item-action-wrapper .panel-body > p, -table .group-actions .item-action-wrapper .panel-body > p { - text-align: left; - white-space: nowrap; -} - -.list-group-item-actions .item-action-wrapper .panel-body > p:last-child, -.mosaic-group-item-actions .item-action-wrapper .panel-body > p:last-child, -table .group-actions .item-action-wrapper .panel-body > p:last-child { - margin-bottom: 0px; -} - -#brick_content_empty { - display: none; - padding: 40px; - font-size: 1.3em; - font-style: italic; -} - -/* Loader */ -#brick_tree_overlay, -#brick_mosaic_overlay { - display: none; - padding: 8% 0px; - border-radius: 0px 0px 4px 4px; - font-size: 1em; -} - -/****************************************************************/ -/* - Mosaic mode */ -/* */ -/* Note: Some of the CSS is factorised in the "Tree mode" part */ -/* */ -/* Note: .mosaic-item-layout-x classes are for different */ -/* presentation modes. Like in binary, add the values to know */ -/* which class to use. */ -/* - 1 is for name */ -/* - 2 is for description */ -/* - 4 is for image */ -/* eg. .mosaic-item-layout-5 when just name and image */ -/****************************************************************/ -#brick_content_mosaic { - position: relative; - padding: 10px 10px 1px 10px; -} - -/* Breadcrumb */ -#mosaic-breadcrumb { - margin-bottom: 5px; - padding-left: 0px; - font-size: 12px; - white-space: nowrap; - overflow-x: hidden; - text-overflow: ellipsis; -} - -.mosaic-group { - display: none; -} - -/* Only the first level is showed by default */ -.mosaic-group:first-of-type { - display: block; -} - -.mosaic-group-back, -.mosaic-group-item { - position: relative; - height: 55px; - margin-bottom: 10px; - text-align: center; - color: #FFFFFF; -} - -.mosaic-group-back { - font-size: 25px; -} - -.mosaic-item { - display: table; - width: 100%; - height: 100%; - overflow: hidden; - background-color: #585653; - transition: all linear 0.3s; -} - -.mosaic-item, -.mosaic-item:hover, -.mosaic-item:active, -.mosaic-item:focus, -.mosaic-item:visited { - color: #FFFFFF; - text-decoration: none; -} - -.mosaic-item:active { - background-color: #9e510f; -} - -.mosaic-item-image, -.mosaic-item-text { - display: table-cell; - text-align: center; - vertical-align: middle; -} - -.mosaic-item-image > img { - max-width: 85%; -} - -.mosaic-item-text { - max-width: 1px; - /* This is an arbitrary value. It is just here to make .mosaic-item-name wrap when there is a very long word in it. */ - overflow: hidden; -} - -.mosaic-group-item > .mosaic-group-item-actions { - position: absolute; - top: 5px; - right: 5px; -} - -.mosaic-group-item-actions > a { - color: #FFFFFF; - text-decoration: none; -} - -.mosaic-group-item-actions > a:hover, -.mosaic-group-item-actions > a:focus { - color: #EEEEEE; -} - -@media (max-width: 768px) { - .mosaic-group-item > .mosaic-group-item-actions { - top: 12px; - right: 6px; - } - - .mosaic-group-item > .mosaic-group-item-actions > .glyphicon { - margin-top: 5px; - } - - .mosaic-group-item-actions > a { - font-size: 20px; - } - - /* All layouts */ - .mosaic-item-image { - width: 55px; - padding: 10px; - } - - .mosaic-item-image > img { - max-height: 30px; - } - - .mosaic-item-name { - font-size: 14px; - max-height: 50px; - overflow: hidden; - } - - .mosaic-item-description { - display: none; - } - - /* Layout 2 */ - .mosaic-item-layout-2 .mosaic-item-description { - display: block; - } - - /* Layout 5/7 */ - .mosaic-item-layout-5 .mosaic-item-name, -.mosaic-item-layout-7 .mosaic-item-name { - padding-right: 40px; - } -} -@media (min-width: 768px) { - .mosaic-group-item { - display: inline-block; - width: 32%; - height: 120px; - margin-right: 1.95%; - /* We don't put 2% to keep a margin in case of a bad browser rendering */ - word-break: break-word; - } - - .mosaic-item { - padding: 10px; - } - - .mosaic-item:hover, -.mosaic-item:focus { - background-color: #EA7D1E; - box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); - } - - /* All layouts */ - /* .mosaic-item-image{ - vertical-align: inherit; Note: This was introduced to avoid image from going down the tile when .mosaic-item-name was way too long, but the .mosaic-item-image glitched by being a little too high. As a very long .mosaic-item-name is extremely rare, we decided that it was not worth it. - }*/ - .mosaic-item-text .mosaic-item-text-wrapper { - max-height: 100px; - /* Must be .mosaic-item absolute height (in px) */ - } - - .mosaic-item-name { - max-height: 100%; - /* It's ok if description is pushed down and not visible; but we truncate before it flows out of the tile */ - overflow: hidden; - font-weight: 600; - font-size: 12px; - } - - .mosaic-item-description { - overflow: hidden; - text-overflow: ellipsis; - } - - /* Layout 1 */ - .mosaic-item-layout-1 .mosaic-item-name { - font-weight: inherit; - font-size: 14px; - } - - /* Layout 7 */ - .mosaic-item-layout-7 .mosaic-item-image { - display: none; - } - - .mosaic-item-layout-3 .mosaic-item-description, -.mosaic-item-layout-7 .mosaic-item-description { - margin-top: 10px; - max-height: 40px; - font-size: 10px; - } - - /* Layout 5 & 7 */ - .mosaic-item-layout-5 .mosaic-item-image, -.mosaic-item-layout-7 .mosaic-item-image { - display: table-cell; - width: 65px; - padding-left: 5px; - padding-right: 10px; - } - - .mosaic-item-layout-5 .mosaic-item-image > img, -.mosaic-item-layout-7 .mosaic-item-image > img { - max-width: 65px; - /* Equals parent element width */ - max-height: 100px; - /* Equals parent element height */ - } -} -@media (min-width: 992px) { - .mosaic-item { - padding: 10px 15px; - } - - .mosaic-group-back { - font-size: 40px; - } - - /* Layout 5 & 7 */ - .mosaic-item-layout-5 .mosaic-item-image, -.mosaic-item-layout-7 .mosaic-item-image { - width: 105px; - padding-right: 18px; - } - - .mosaic-item-layout-5 .mosaic-item-image > img, -.mosaic-item-layout-7 .mosaic-item-image > img { - max-width: 105px; - /* Equals parent element width */ - max-height: 100px; - /* Equals parent element height */ - } - - .mosaic-item-layout-5 .mosaic-item-name, -.mosaic-item-layout-7 .mosaic-item-name { - font-size: 12px; - } -} -@media (min-width: 1200px) { - .mosaic-group-item { - width: 24%; - height: 140px; - margin-right: 1.3%; - } - - /* All layouts */ - .mosaic-item-text .mosaic-item-text-wrapper { - max-height: 120px; - /* Must be .mosaic-item absolute height (in px) */ - /* overflow hidden inherited */ - } - - .mosaic-item-layout-5 .mosaic-item-image > img, -.mosaic-item-layout-7 .mosaic-item-image > img { - max-height: 120px; - /* Equals parent element height */ - } -} -/* Helper classes to remove margin depending on the screen size */ -@media (min-width: 768px) and (max-width: 992px) { - .mosaic-group-item:nth-child(3n) { - margin-right: 0px; - } -} -@media (min-width: 992px) and (max-width: 1200px) { - .mosaic-group-item:nth-child(3n) { - margin-right: 0px; - } -} -@media (min-width: 1200px) { - .mosaic-group-item:nth-child(4n) { - margin-right: 0px; - } -} -/****************/ -/* - List mode */ -/****************/ -/****************/ -/* Filter brick */ -/****************/ -.tile.tile-filter-brick a.tile_decoration { - cursor: default; -} - -.tile.tile-filter-brick .tile_filterbox .form-group:first-child { - width: 100%; -} - -.tile.tile-filter-brick .tile_filterbox input[type=text] { - width: 100%; -} - -@media (max-width: 768px) { - .tile.tile-filter-brick .tile_filterbox .form-group:first-child { - margin-bottom: 5px; - } -} -@media (min-width: 768px) { - .tile.tile-filter-brick .tile_filterbox form { - display: table; - } - - .tile.tile-filter-brick .tile_filterbox .form-group:first-child { - display: table-cell; - } - - .tile.tile-filter-brick .tile_filterbox button[type=submit] { - margin-left: 5px; - } -} -@media (min-width: 992px) { - .tile.tile-filter-brick .tile_filterbox .form-group:first-child { - display: table-cell; - } -} -/*********/ -/* Forms */ -/*********/ -.form_field_label > .control-label[data-tooltip-instantiated=true]::after { - content: "?"; - padding-left: 3px; - vertical-align: top; - cursor: pointer; - color: #777; - font-size: 0.85em; -} - -.form_field .form_mandatory .control-label:after { - content: "*"; - position: relative; - left: 3px; - color: #EA7D1E; - font-size: 0.9em; -} - -/* Note: We don't put the .form_field selector as it must work for read-only */ -.form-control-static img { - max-width: 100% !important; - height: initial !important; -} - -/* ExternalKey */ -.selectobject .input-group-addon { - cursor: pointer; -} - -/* InlineImage */ -.inline-image { - cursor: pointer; - cursor: zoom-in; -} - -/* CaseLog field */ -.caselog-thread { - position: relative; - border: 1px solid #ddd; - border-top: none; -} - -.caselog-thread--header { - padding: 8px; - font-size: 11px; - background-color: rgba(242, 242, 242, 0.38); - border-bottom: 1px solid #ddd; -} -.caselog-thread--header span { - color: #777; - /* body: color */ -} - -.caselog-thread--header-toggler { - cursor: pointer; - color: inherit; - text-decoration: none; -} -.caselog-thread--header-toggler:hover, .caselog-thread--header-toggler:active, .caselog-thread--header-toggler:focus { - color: inherit; - text-decoration: none; -} -.caselog-thread--header-toggler:not(:first-child)::before { - content: "-"; - margin: 0 0.4em 0 0.2em; - /* Note: Difference between left and right margin is due to a left space being output because the line break in the HTML isn't tidy */ -} - -.caselog-thread--header-info > span { - margin-left: 0.5em; -} -.caselog-thread--header-info > span > span { - margin-left: 0.5em; -} -.caselog-thread--header-info > span:first-child { - margin-left: 0; -} - -.caselog-thread--content { - padding: 5px; - /*max-height: 400px; - overflow: auto;*/ - background-color: #f2f2f2; -} - -.caselog-thread--date { - margin-bottom: 10px; - text-align: center; - color: #808080; -} -.caselog-thread--date:first-child { - display: none; -} - -.caselog-thread--block { - position: relative; - min-height: 40px; - /* .caselog-thread--block-medallion height */ - margin-bottom: 15px; -} -.caselog-thread--block:last-child { - margin-bottom: 0px; -} - -.caselog-thread--block-medallion, -.caselog-thread--block-entries { - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); -} - -.caselog-thread--block-medallion { - position: absolute; - top: 0px; - left: 0px; - width: 40px; - height: 40px; - text-align: center; - line-height: 40px; - font-size: 18px; - color: #FFFFFF; - /* .caselog-thread--block-entries color */ - background-size: 100%; - /* Full size is necessary for images with filled background to fit nicely in the medallion, even if this means that images with a transparent background might appear cropped */ - background-position: center center; - background-color: #585653; - /* .caselog-thread--block-entries background-color */ - background-repeat: no-repeat; - border-radius: 100%; -} - -.caselog-thread--block-user { - display: none; - margin-left: 54px; - font-size: 12px; - font-weight: bold; - color: #FFFFFF; - /* .caselog-thread--block-entries background-color */ -} - -.caselog-thread--block-entries { - position: relative; - display: inline-block; - margin-left: 60px; - max-width: calc(100% - 60px); - background-color: #585653; - color: #FFFFFF; -} - -.caselog-thread--block-entry { - position: relative; - padding: 8px 10px; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} -.caselog-thread--block-entry img { - max-width: 100%; -} -.caselog-thread--block-entry.closed { - cursor: pointer; -} -.caselog-thread--block-entry.closed .caselog-thread--block-entry-content { - height: 0px; - overflow-y: hidden; -} -.caselog-thread--block-entry.closed .caselog-thread--block-entry-content:after { - content: "..."; - position: absolute; - top: 10px; - left: 9px; -} -.caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - content: ""; - position: absolute; - top: 0px; - left: -15px; - width: 15px; - height: 15px; - border: 8px solid transparent; - border-top-color: #585653; - /* .caselog-thread--block-entries background-color */ - border-right-color: #585653; - /* .caselog-thread--block-entries background-color */ -} -.caselog-thread--block-entry:last-child { - border-bottom: none; -} -.caselog-thread--block-entry:hover .caselog-thread--block-entry-date { - opacity: 1; -} -.caselog-thread--block-entry:hover:not(.closed) .caselog-thread--block-entry-toggler { - opacity: 1; -} - -.caselog-thread--block-entry-content { - display: block; - overflow-x: auto; - /* Force user-generated tables to fit within the container as they often have an hard-coded width */ -} -.caselog-thread--block-entry-content > p:last-of-type { - margin-bottom: 0px; -} -.caselog-thread--block-entry-content table { - width: unset !important; - max-width: max-content; -} - -.caselog-thread--block-entry-date { - margin-top: 5px; - opacity: 0.6; - font-size: 10px; - text-align: right; - transition: all 0.2s linear; -} - -.caselog-thread--block-entry-toggler { - position: absolute; - top: 2px; - right: 5px; - padding: 2px 5px; - opacity: 0; - cursor: pointer; - background-color: #585653; - /* .caselog-thread--block-entries background-color */ - transition: all 0.2s linear; -} - -.caselog-thread--block-me { - text-align: right; -} -.caselog-thread--block-me .caselog-thread--block-medallion { - left: initial; - right: 0px; -} -.caselog-thread--block-me .caselog-thread--block-user { - display: none; - margin-left: initial; - margin-right: 54px; -} -.caselog-thread--block-me .caselog-thread--block-entries { - margin-left: initial; - margin-right: 60px; - text-align: right; -} -.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry { - text-align: left; -} -.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - right: initial; - left: 5px; -} -.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - left: initial; - right: -15px; - border-right-color: transparent; - border-left-color: #585653; - /* .caselog-thread--block-entries background-color */ -} - -.caselog-thread--block-color-1 .caselog-thread--block-medallion { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-1 .caselog-thread--block-user { - color: #FFFFFF; -} -.caselog-thread--block-color-1 .caselog-thread--block-entries { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-1 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - background-color: #FFFFFF; -} -.caselog-thread--block-color-1 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - border-top-color: #FFFFFF; - border-right-color: #FFFFFF; -} - -.caselog-thread--block-color-2 .caselog-thread--block-medallion { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-2 .caselog-thread--block-user { - color: #FFFFFF; -} -.caselog-thread--block-color-2 .caselog-thread--block-entries { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-2 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - background-color: #FFFFFF; -} -.caselog-thread--block-color-2 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - border-top-color: #FFFFFF; - border-right-color: #FFFFFF; -} - -.caselog-thread--block-color-3 .caselog-thread--block-medallion { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-3 .caselog-thread--block-user { - color: #FFFFFF; -} -.caselog-thread--block-color-3 .caselog-thread--block-entries { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-3 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - background-color: #FFFFFF; -} -.caselog-thread--block-color-3 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - border-top-color: #FFFFFF; - border-right-color: #FFFFFF; -} - -.caselog-thread--block-color-4 .caselog-thread--block-medallion { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-4 .caselog-thread--block-user { - color: #FFFFFF; -} -.caselog-thread--block-color-4 .caselog-thread--block-entries { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-4 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - background-color: #FFFFFF; -} -.caselog-thread--block-color-4 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - border-top-color: #FFFFFF; - border-right-color: #FFFFFF; -} - -.caselog-thread--block-color-5 .caselog-thread--block-medallion { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-5 .caselog-thread--block-user { - color: #FFFFFF; -} -.caselog-thread--block-color-5 .caselog-thread--block-entries { - color: #444; - background-color: #FFFFFF; -} -.caselog-thread--block-color-5 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler { - background-color: #FFFFFF; -} -.caselog-thread--block-color-5 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before { - border-top-color: #FFFFFF; - border-right-color: #FFFFFF; -} - -/* collapsable sections*/ -.form_linkedset_toggler, .form_linkedset_toggler:hover, .form_linkedset_toggler:focus, .form_upload_toggler, .form_upload_toggler:hover, .form_upload_toggler:focus { - text-decoration: none; - color: inherit; -} -.form_linkedset_toggler > .text, .form_upload_toggler > .text { - margin-left: 0.4em; -} -.form_linkedset_toggler > .text:before, .form_upload_toggler > .text:before { - content: "("; -} -.form_linkedset_toggler > .text:after, .form_upload_toggler > .text:after { - content: ")"; -} -.form_linkedset_toggler > .glyphicon, .form_upload_toggler > .glyphicon { - margin-left: 0.5em; - font-size: 0.85em; - color: #EA7D1E; - transition: transform 0.2s linear; -} -.form_linkedset_toggler > .glyphicon.collapsed, .form_upload_toggler > .glyphicon.collapsed { - transform: rotateZ(-90deg); -} - -/* - DataTables : Loader */ -.form_linkedset_wrapper .datatables_overlay { - padding: 8px !important; -} - -.form_linkedset_wrapper .overlay_content { - font-size: 0.6em; -} - -.form_linkedset_wrapper .content_loader { - margin: 0px; -} - -.form_linkedset_wrapper .content_loader .icon { - height: 23px; -} - -/* - DataTables : Fit the table in the form */ -.form_linkedset_wrapper .dataTables_wrapper { - margin-bottom: 5px; - padding: 0px; -} - -/* FileUpload */ -.attachments_container .attachments-list thead > tr > th { - text-align: center; -} -.attachments_container .attachments-list tbody > tr > td { - padding: 0.5rem 8px; - text-align: left; - vertical-align: middle; -} -.attachments_container .attachments-list tbody > tr > td[role=icon] { - text-align: center; -} -.attachments_container .attachments-list tbody > tr > td[role=icon] img { - max-height: 32px; -} -.attachments_container .attachments-list tbody > tr > td[role=formatted-size] { - text-align: right; -} -.attachments_container .attachments-list tbody > tr > td[role=delete] { - text-align: center; -} - -.attachment-tooltip { - max-width: 100%; - max-height: 100%; -} - -.upload_container input { - display: inline; -} - -.upload_container .loader { - visibility: hidden; - margin-left: 7px; - font-size: 1.2em; - animation: spin 1s linear infinite; - -webkit-animation: spin 1s linear infinite; - -moz-animation: spin 1s linear infinite; - -ms-animation: spin 1s linear infinite; -} - -#drag_overlay { - display: block; - top: inherit; - bottom: 0px; - height: 0px; -} - -#drag_overlay .overlay_content { - margin-top: 5em; - width: 100%; - color: white; -} - -#drag_overlay .overlay_content .icon { - font-size: 3em; -} - -#drag_overlay .overlay_content .message { - font-size: 1.5em; -} - -/* Attachments drag & drop zone, only for none mobile devices */ -@media (min-width: 768px) { - #drag_overlay.drag_in { - animation: show-drop-zone 0.3s ease-out forwards; - -webkit-animation: show-drop-zone 0.3s ease-out forwards; - -moz-animation: show-drop-zone 0.3s ease-out forwards; - -ms-animation: show-drop-zone 0.3s ease-out forwards; - } - - #drag_overlay.drag_out { - animation: hide-drop-zone 0.3s ease-out forwards; - -webkit-animation: hide-drop-zone 0.3s ease-out forwards; - -moz-animation: hide-drop-zone 0.3s ease-out forwards; - -ms-animation: hide-drop-zone 0.3s ease-out forwards; - } - - @keyframes show-drop-zone { - 100% { - height: 20%; - } - } - @-webkit-keyframes show-drop-zone { - 100% { - height: 20%; - } - } - @-moz-keyframes show-drop-zone { - 100% { - height: 20%; - } - } - @-ms-keyframes show-drop-zone { - 100% { - height: 20%; - } - } - @keyframes hide-drop-zone { - 0% { - height: 20%; - } - 100% { - height: 0%; - } - } - @-webkit-keyframes hide-drop-zone { - 0% { - height: 20%; - } - 100% { - height: 0%; - } - } - @-moz-keyframes hide-drop-zone { - 0% { - height: 20%; - } - 100% { - height: 0%; - } - } - @-ms-keyframes hide-drop-zone { - 0% { - height: 20%; - } - 100% { - height: 0%; - } - } -} -/* BlobField */ -.form_fields .file_open_link { - margin-left: 10px; -} - -.form_buttons { - padding-top: 20px; - text-align: center; -} - -.form_buttons .form_btn_misc { - margin-bottom: 20px; -} - -.form_buttons .form_btn_transitions { - margin-bottom: 20px; -} - -.form_buttons .btn .glyphicon { - margin-right: 0.5em; -} - -.form_btn_regular.sticky { - display: none; -} - -@media (min-width: 768px) { - .form_buttons .form_btn_misc { - float: left !important; - } - - .form_buttons .form_btn_transitions { - float: right !important; - margin-left: 3px; - } - - .form_buttons .form_btn_regular { - text-align: right; - } - - .form_buttons .form_btn_regular .btn { - width: inherit; - } - - /* Making regular button sticky */ - .form_btn_regular.sticky { - display: block; - position: fixed; - bottom: 5em; - right: -2px; - /* TODO : SASS this to col-xs-12 padding */ - padding: 15px; - background-color: #FFFFFF; - border: 1px solid #ddd; - border-radius: 0px; - transition: right 0.3s; - } - - .form_btn_regular.sticky.closed { - right: -75px; - } - - .form_btn_regular.sticky button { - display: block; - } - - .form_btn_regular.sticky button:first-child { - margin-bottom: 4px; - } -} -/* CKEditor : Adding BS error feedback */ -.form_field .cke { - border: 1px solid #ddd; -} - -.form_field.has-error .cke { - border: 1px solid #b94a48; - border-radius: 0px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -/* CKEditor : Styling notifications based on BS alerts */ -.cke_notification { - position: relative; - padding: 15px; - margin-bottom: 18px; - border: 1px solid transparent; - border-radius: 4px; - background-color: #FFFFFF; -} - -.cke_notification_close { - position: absolute; - top: 2px; - right: 5px; -} - -.cke_notification_message { - margin-bottom: 0px; - line-height: 1em; - font-size: 1em; -} - -.cke_notification_success { - display: none; - background-color: #dff0d8; - border-color: #58a959; - color: #468847; -} - -.cke_notification_warning { - background-color: #fcf8e3; - border-color: #ceae78; - color: #c09853; -} - -/* CKEditor : Misc */ -.cke_toolbox_collapser, -.cke_toolbox_collapser .cke_arrow { - cursor: pointer !important; -} - -.cke_toolbox_collapser.cke_toolbox_collapser_min ~ .editor-fullscreen-button { - display: block; - width: 12px; - height: 11px; - border: 1px solid #ddd; - cursor: pointer; - /* !important so it overrides the .cke_reset_all style */ - background-position: center center !important; - background-repeat: no-repeat !important; - background-size: 100% !important; - background-image: url("../../../../../images/full-screen.png") !important; -} -.cke_toolbox_collapser.cke_toolbox_collapser_min ~ .editor-fullscreen-button:hover { - background-color: #E5E5E5; -} - -/* DataTables : Selection inputs */ -.dataTable.table th span.row_input, -.dataTable.table td span.row_input { - display: inline-block; - width: 100%; - text-align: center; -} - -/* Wiki text (hyperlinks) */ -.wiki_broken_link { - text-decoration: line-through; -} - -/*# sourceMappingURL=portal.css.map */ +*/@media (max-width:768px){body{padding-top:60px}body.home{padding-top:70px}}footer{margin:5em 1em;text-align:center}#envbanner{position:relative;z-index:10;padding:5px 15px;text-align:center}#envbanner>button{margin-left:5px;color:#000}.navbar-nav .dropdown-menu a .glyphicon,.user_infos .dropdown-menu a .glyphicon{margin-right:15px}.nav>li>a>span.brick_icon,.dropdown-menu>li>a>span.brick_icon{margin-right:20px;vertical-align:sub}#topbar .navbar-header{position:relative;z-index:2}#topbar .navbar-collapse{position:relative;z-index:1;overflow-y:auto}#topbar .navbar-collapse>.navbar-nav{padding-top:30px}#topbar .navbar-brand>img{max-height:100%}#topbar .user_infos{text-decoration:none}#topbar .user_photo{position:absolute;display:block;top:5px;left:10px;width:65px;height:65px;background-size:100%;background-position:center center;background-color:#585653;border:2px solid #FFFFFF;border-radius:100%;box-shadow:0px 2px 3px rgba(0, 0, 0, 0.4)}#topbar .user_fullname{display:inline-block;position:absolute;padding-left:85px;max-width:55%;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}@media (min-width:768px){#sidebar{position:fixed;top:0px;left:0px;padding:0px;height:100%}#sidebar .user_card{padding:30px 0px;text-align:center}#sidebar .user_card .user_photo{margin:0px auto 10px auto;width:80px;height:80px;background-size:100%;background-position:center center;background-color:#585653;background-repeat:no-repeat;border:2px solid #FFFFFF;border-radius:100%}#sidebar .user_card .user_infos{font-size:1em;color:#FFFFFF}#sidebar .user_card .user_infos .dropdown-toggle{color:#FFFFFF}#sidebar .user_card .user_options.dropdown-menu{width:92%;left:4%}#sidebar .user_card .user_fullname{font-weight:600}#sidebar .menu{max-height:59%;overflow-y:auto;overflow-x:hidden}#sidebar .menu .navbar-nav{width:100%}#sidebar .menu .navbar-nav>li{width:100%}#sidebar .menu .navbar-nav>li>a>.brick_icon{width:1.2em;vertical-align:sub;text-align:center;margin-right:10px}#sidebar .logo{position:absolute;bottom:15px;width:100%;text-align:center}#sidebar .logo img{max-width:100%;max-height:50px}#main-wrapper{margin-top:20px}}@media (min-width:1600px){#sidebar .user_card .user_photo{width:120px;height:120px}#sidebar .menu .nav>li>a>.brick_icon{margin-right:20px}}.global_overlay{z-index:9999;display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;opacity:0.5}#page_overlay .overlay_content{margin-top:20em;width:100%;color:white}.overlay_content{text-align:center}.content_loader{text-align:center}.content_loader .icon{margin-bottom:0.3em;height:38px;font-size:3em;animation:spin 1.2s linear infinite;-webkit-animation:spin 1.2s linear infinite;-moz-animation:spin 1.2s linear infinite;-ms-animation:spin 1.2s linear infinite}.content_loader .message{font-size:1.5em}.datatables_overlay{padding:5% 0px !important;background-color:white}.vertical-center{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.text_decoration{vertical-align:baseline;margin-right:8px}@keyframes spin{100%{transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-ms-keyframes spin{100%{-ms-transform:rotate(360deg)}}.list-group.tree{margin-top:11px;margin-bottom:-11px}.list-group.tree .list-group-item{padding-right:0px}#modal-for-alert{z-index:9999}.modal-content .content_loader{margin:7em 0em;text-align:center}.url-to-clipboard.url-to-clipboard-icon{opacity:0.5;cursor:pointer;transition:opacity 0.2s linear}.url-to-clipboard.url-to-clipboard-icon:hover{opacity:1}.url-to-clipboard-tooltip-copied{color:green;margin-right:3px}.mfp-bg{z-index:1200}.mfp-wrap{z-index:1210}.mfp-img{cursor:pointer;cursor:zoom-out}.twitter-typeahead .tt-menu{max-height:200px;overflow-y:auto}@media (min-width:768px){.twitter-typeahead .tt-menu{max-height:300px}}.twitter-typeahead .tt-dataset>.content_loader{margin:10px 0px;text-align:center;font-size:0.6em}.twitter-typeahead .tt-dataset>.content_loader .icon{height:25px}.twitter-typeahead .tt-dataset .no_result{text-align:center;font-style:italic}.home #main-wrapper{padding-top:15px}.home .tile{display:block;margin-bottom:8px;padding:0em 1em;min-height:4em;background-color:#FFFFFF;background-image:none;border:none;border-radius:0px;text-align:center;text-decoration:none;white-space:normal;line-height:4em;box-shadow:0 1px 1px rgba(0, 0, 0, 0.15)}.home .tile .tile_decoration{position:absolute;top:0.3em;left:2.5em}.home .tile .tile_title{font-weight:bold;color:#777}.home .tile .tile_title>span.icon{color:#EA7D1E}.home .tile .tile_description{display:none;color:#555555}.home a.tile.tile_badge>div{display:table;width:100%}.home a.tile.tile_badge>div>div{display:table-row}.home a.tile.tile_badge>div>div>div{display:table-cell}@media (max-width:768px){.home a.tile.tile_badge>div>div>div.tile_body div.tile_count{position:absolute;top:0em;right:2em;text-align:right;font-size:1.2em}.home a.tile.tile_badge>div.tile_description{display:none}}@media (min-width:768px){.home .tile{display:block;margin-bottom:25px;padding:40px 40px 30px 40px;min-height:10em;text-align:left;transition:all 0.2s linear}.home .tile:hover{box-shadow:0px 5px 10px rgba(0, 0, 0, 0.1)}.home .tile .tile_decoration{display:block;position:relative;float:left;top:1.5em;left:initial;margin:0px 30px 15px 0px}.home .tile .tile_body{display:block;padding-left:4.3em;text-align:left;line-height:1.5em}.home .tile .tile_title{margin-bottom:1em;font-size:1em}.home .tile .tile_description{display:block;text-align:left}.home a.tile.tile_badge{height:10em;overflow:hidden}.home a.tile.tile_badge>div>div>div.tile_decoration{top:unset;vertical-align:middle}.home a.tile.tile_badge>div>div>div.tile_decoration>span.icon{font-size:4em}.home a.tile.tile_badge>div>div>div.tile_body{position:relative;padding:0;margin:0;vertical-align:middle;text-align:right}.home a.tile.tile_badge>div>div>div.tile_body .tile_title{margin-top:1em;margin-bottom:0;font-size:1em;font-weight:normal}.home a.tile.tile_badge>div>div>div.tile_body .tile_count{position:absolute;top:0;right:0;font-size:2em;font-weight:bold;color:#777}.home a.tile.tile_badge .tile_description{display:none}}@media (min-width:992px){.home .tile{min-height:14em;padding:30px 40px 30px 40px}.home .tile .tile_decoration>span.icon{font-size:4em}.home .tile .tile_body{padding-left:6.3em}.home .tile .tile_title{font-size:1.4em}.home .tile .tile_description{font-size:1.2em}.home a.tile.tile_badge>div>div>div.tile_body .tile_title{font-size:1.2em}.home a.tile.tile_badge>div>div>div.tile_body .tile_count{font-size:3em}.home a.tile.tile_badge>div>div>div.tile_decoration>span.icon{font-size:4em}.home a.tile.tile_badge .tile_description{display:block;font-size:1em;text-align:center}}@media (min-width:1200px){.home .tile{margin-bottom:40px;min-height:15em;padding:40px 50px 30px 50px}.home .tile .tile_decoration{margin:0px 40px 15px 0px;top:1.5em}.home .tile .tile_decoration>span.icon{font-size:6em}.home .tile .tile_body{padding-left:9.1em}.home .tile .tile_title{font-size:1.5em}.home .tile .tile_description{font-size:1.2em}.home a.tile.tile_badge>div>div>div.tile_decoration>span.icon{font-size:6em}}#main-header{text-align:center}#main-header-title{margin-bottom:15px}#main-header-title .subtitle{display:block;margin-top:8px;margin-bottom:20px}#main-header-actions{margin-bottom:15px}@media (min-width:768px){#main-header:after{clear:both}#main-header-title{float:left;margin-bottom:0px;min-height:6em;text-align:left}#main-header-actions{float:right;margin-bottom:0px}}.dataTables_wrapper{padding:10px 10px}.dataTable.table td img{max-width:100%;height:initial !important}#brick_content_toolbar{padding:10px}#brick_content_toolbar>div label{font-weight:normal;white-space:nowrap;text-align:left}#brick_content_toolbar>div label input{margin-left:0.5em;display:inline-block;width:130px}.home .tile.tile_communication{padding:20px;background-color:#EDEDED;border:none;font-weight:initial}.home .tile_communication .carousel{margin-bottom:0px;width:100%;height:200px}#user-profile-wrapper .user_profile_picture .content_loader{position:absolute;z-index:1;top:0;left:0;padding-top:4em;width:100%;height:100%;text-align:center;color:white;background-color:black;opacity:0.5}#user-profile-wrapper .user_profile_picture .preview{display:inline-block;position:relative;max-width:175px;max-height:175px;overflow:hidden}#user-profile-wrapper .user_profile_picture .preview img{max-width:100%;max-height:100%}#user-profile-wrapper .user_profile_picture .actions{display:inline-block;vertical-align:top;margin-left:5px}#user-profile-wrapper .user_profile_picture .actions .btn{display:block;position:relative;margin-bottom:10px}#user-profile-wrapper .user_profile_picture .actions .btn:last-child{margin-bottom:0px}#user-profile-wrapper .user_profile_picture .actions .btn.btn_edit{overflow:hidden}#user-profile-wrapper .user_profile_picture .actions .btn.btn_edit input{position:absolute;top:0px;left:0px;width:100%;height:100%;opacity:0;cursor:pointer}#brick_content_tree{position:relative;margin-top:0px}#brick_content_tree .list-group-item{padding-top:0px}#brick_content_tree .list-group-item>.tree-item-wrapper{display:block;padding-top:10px;color:inherit;text-decoration:inherit;cursor:pointer}.list-group-item>.list-group-item-actions{position:absolute;top:10px;right:10px}.list-group-item:hover>.list-group-item-actions,.mosaic-group-item:hover>.mosaic-group-item-actions{display:block}.list-group-item .list-group-item-actions a:not(:first-child),.mosaic-group-item .mosaic-group-item-actions a:not(:first-child){margin-left:10px}.list-group-item .keep-spinning{animation:spin 1s linear infinite;-webkit-animation:spin 1s linear infinite;-moz-animation:spin 1s linear infinite;-ms-animation:spin 1s linear infinite}.list-group.tree .list-group-item .list-group-item-description{display:block;margin-top:3px;font-size:0.8em}.list-group-item-actions .group-actions-wrapper,.mosaic-group-item-actions .group-actions-wrapper,table .group-actions-wrapper{text-align:center}table .group-actions{position:relative}.list-group-item-actions a.glyphicon-menu-hamburger,.mosaic-group-item-actions a.glyphicon-menu-hamburger,table .group-actions a.glyphicon-menu-hamburger{cursor:pointer;text-decoration:none}.list-group-item-actions .item-action-wrapper,.mosaic-group-item-actions .item-action-wrapper,table .group-actions .item-action-wrapper{display:none;position:absolute;z-index:5;bottom:-7px;right:15px;-webkit-box-shadow:0px 0px 10px 0px rgba(0, 0, 0, 0.15);-moz-box-shadow:0px 0px 10px 0px rgba(0, 0, 0, 0.15);box-shadow:0px 0px 10px 0px rgba(0, 0, 0, 0.15)}.list-group-item-actions .item-action-wrapper .glyphicon,.mosaic-group-item-actions .item-action-wrapper .glyphicon,table .group-actions .item-action-wrapper .glyphicon{margin-right:0.6em}.list-group-item-actions .item-action-wrapper.collapse.in,.mosaic-group-item-actions .item-action-wrapper.collapse.in,table .group-actions .item-action-wrapper.collapse.in{display:block}.list-group-item-actions .item-action-wrapper .panel-body>p,.mosaic-group-item-actions .item-action-wrapper .panel-body>p,table .group-actions .item-action-wrapper .panel-body>p{text-align:left;white-space:nowrap}.list-group-item-actions .item-action-wrapper .panel-body>p:last-child,.mosaic-group-item-actions .item-action-wrapper .panel-body>p:last-child,table .group-actions .item-action-wrapper .panel-body>p:last-child{margin-bottom:0px}#brick_content_empty{display:none;padding:40px;font-size:1.3em;font-style:italic}#brick_tree_overlay,#brick_mosaic_overlay{display:none;padding:8% 0px;border-radius:0px 0px 4px 4px;font-size:1em}#brick_content_mosaic{position:relative;padding:10px 10px 1px 10px}#mosaic-breadcrumb{margin-bottom:5px;padding-left:0px;font-size:12px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis}.mosaic-group{display:none}.mosaic-group:first-of-type{display:block}.mosaic-group-back,.mosaic-group-item{position:relative;height:55px;margin-bottom:10px;text-align:center;color:#FFFFFF}.mosaic-group-back{font-size:25px}.mosaic-item{display:table;width:100%;height:100%;overflow:hidden;background-color:#585653;transition:all linear 0.3s}.mosaic-item,.mosaic-item:hover,.mosaic-item:active,.mosaic-item:focus,.mosaic-item:visited{color:#FFFFFF;text-decoration:none}.mosaic-item:active{background-color:#9e510f}.mosaic-item-image,.mosaic-item-text{display:table-cell;text-align:center;vertical-align:middle}.mosaic-item-image>img{max-width:85%}.mosaic-item-text{max-width:1px;overflow:hidden}.mosaic-group-item>.mosaic-group-item-actions{position:absolute;top:5px;right:5px}.mosaic-group-item-actions>a{color:#FFFFFF;text-decoration:none}.mosaic-group-item-actions>a:hover,.mosaic-group-item-actions>a:focus{color:#EEEEEE}@media (max-width:768px){.mosaic-group-item>.mosaic-group-item-actions{top:12px;right:6px}.mosaic-group-item>.mosaic-group-item-actions>.glyphicon{margin-top:5px}.mosaic-group-item-actions>a{font-size:20px}.mosaic-item-image{width:55px;padding:10px}.mosaic-item-image>img{max-height:30px}.mosaic-item-name{font-size:14px;max-height:50px;overflow:hidden}.mosaic-item-description{display:none}.mosaic-item-layout-2 .mosaic-item-description{display:block}.mosaic-item-layout-5 .mosaic-item-name,.mosaic-item-layout-7 .mosaic-item-name{padding-right:40px}}@media (min-width:768px){.mosaic-group-item{display:inline-block;width:32%;height:120px;margin-right:1.95%;word-break:break-word}.mosaic-item{padding:10px}.mosaic-item:hover,.mosaic-item:focus{background-color:#EA7D1E;box-shadow:0px 3px 5px rgba(0, 0, 0, 0.2)}.mosaic-item-text .mosaic-item-text-wrapper{max-height:100px}.mosaic-item-name{max-height:100%;overflow:hidden;font-weight:600;font-size:12px}.mosaic-item-description{overflow:hidden;text-overflow:ellipsis}.mosaic-item-layout-1 .mosaic-item-name{font-weight:inherit;font-size:14px}.mosaic-item-layout-7 .mosaic-item-image{display:none}.mosaic-item-layout-3 .mosaic-item-description,.mosaic-item-layout-7 .mosaic-item-description{margin-top:10px;max-height:40px;font-size:10px}.mosaic-item-layout-5 .mosaic-item-image,.mosaic-item-layout-7 .mosaic-item-image{display:table-cell;width:65px;padding-left:5px;padding-right:10px}.mosaic-item-layout-5 .mosaic-item-image>img,.mosaic-item-layout-7 .mosaic-item-image>img{max-width:65px;max-height:100px}}@media (min-width:992px){.mosaic-item{padding:10px 15px}.mosaic-group-back{font-size:40px}.mosaic-item-layout-5 .mosaic-item-image,.mosaic-item-layout-7 .mosaic-item-image{width:105px;padding-right:18px}.mosaic-item-layout-5 .mosaic-item-image>img,.mosaic-item-layout-7 .mosaic-item-image>img{max-width:105px;max-height:100px}.mosaic-item-layout-5 .mosaic-item-name,.mosaic-item-layout-7 .mosaic-item-name{font-size:12px}}@media (min-width:1200px){.mosaic-group-item{width:24%;height:140px;margin-right:1.3%}.mosaic-item-text .mosaic-item-text-wrapper{max-height:120px}.mosaic-item-layout-5 .mosaic-item-image>img,.mosaic-item-layout-7 .mosaic-item-image>img{max-height:120px}}@media (min-width:768px) and (max-width:992px){.mosaic-group-item:nth-child(3n){margin-right:0px}}@media (min-width:992px) and (max-width:1200px){.mosaic-group-item:nth-child(3n){margin-right:0px}}@media (min-width:1200px){.mosaic-group-item:nth-child(4n){margin-right:0px}}.tile.tile-filter-brick a.tile_decoration{cursor:default}.tile.tile-filter-brick .tile_filterbox .form-group:first-child{width:100%}.tile.tile-filter-brick .tile_filterbox input[type="text"]{width:100%}@media (max-width:768px){.tile.tile-filter-brick .tile_filterbox .form-group:first-child{margin-bottom:5px}}@media (min-width:768px){.tile.tile-filter-brick .tile_filterbox form{display:table}.tile.tile-filter-brick .tile_filterbox .form-group:first-child{display:table-cell}.tile.tile-filter-brick .tile_filterbox button[type="submit"]{margin-left:5px}}@media (min-width:992px){.tile.tile-filter-brick .tile_filterbox .form-group:first-child{display:table-cell}}.form_field_label>.control-label[data-tooltip-instantiated="true"]::after{content:"?";padding-left:3px;vertical-align:top;cursor:pointer;color:#777;font-size:0.85em}.form_field .form_mandatory .control-label:after{content:"*";position:relative;left:3px;color:#EA7D1E;font-size:0.9em}.form-control-static img{max-width:100% !important;height:initial !important}.selectobject .input-group-addon{cursor:pointer}.inline-image{cursor:pointer;cursor:zoom-in}.caselog-thread{position:relative;border:1px solid #ddd;border-top:none}.caselog-thread--header{padding:8px;font-size:11px;background-color:rgba(242, 242, 242, 0.38);border-bottom:1px solid #ddd}.caselog-thread--header span{color:#777}.caselog-thread--header-toggler{cursor:pointer;color:inherit;text-decoration:none}.caselog-thread--header-toggler:hover,.caselog-thread--header-toggler:active,.caselog-thread--header-toggler:focus{color:inherit;text-decoration:none}.caselog-thread--header-toggler:not(:first-child)::before{content:"-";margin:0 0.4em 0 0.2em}.caselog-thread--header-info>span{margin-left:0.5em}.caselog-thread--header-info>span>span{margin-left:0.5em}.caselog-thread--header-info>span:first-child{margin-left:0}.caselog-thread--content{padding:5px;background-color:#f2f2f2}.caselog-thread--date{margin-bottom:10px;text-align:center;color:#808080}.caselog-thread--date:first-child{display:none}.caselog-thread--block{position:relative;min-height:40px;margin-bottom:15px}.caselog-thread--block:last-child{margin-bottom:0px}.caselog-thread--block-medallion,.caselog-thread--block-entries{box-shadow:0 1px 1px rgba(0, 0, 0, 0.15)}.caselog-thread--block-medallion{position:absolute;top:0px;left:0px;width:40px;height:40px;text-align:center;line-height:40px;font-size:18px;color:#FFFFFF;background-size:100%;background-position:center center;background-color:#585653;background-repeat:no-repeat;border-radius:100%}.caselog-thread--block-user{display:none;margin-left:54px;font-size:12px;font-weight:bold;color:#FFFFFF}.caselog-thread--block-entries{position:relative;display:inline-block;margin-left:60px;max-width:calc(100% - 60px);background-color:#585653;color:#FFFFFF}.caselog-thread--block-entry{position:relative;padding:8px 10px;border-bottom:1px solid rgba(0, 0, 0, 0.05)}.caselog-thread--block-entry img{max-width:100%}.caselog-thread--block-entry.closed{cursor:pointer}.caselog-thread--block-entry.closed .caselog-thread--block-entry-content{height:0px;overflow-y:hidden}.caselog-thread--block-entry.closed .caselog-thread--block-entry-content:after{content:"...";position:absolute;top:10px;left:9px}.caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{content:"";position:absolute;top:0px;left:-15px;width:15px;height:15px;border:8px solid transparent;border-top-color:#585653;border-right-color:#585653}.caselog-thread--block-entry:last-child{border-bottom:none}.caselog-thread--block-entry:hover .caselog-thread--block-entry-date{opacity:1}.caselog-thread--block-entry:hover:not(.closed) .caselog-thread--block-entry-toggler{opacity:1}.caselog-thread--block-entry-content{display:block;overflow-x:auto}.caselog-thread--block-entry-content>p:last-of-type{margin-bottom:0px}.caselog-thread--block-entry-content table{width:unset !important;max-width:max-content}.caselog-thread--block-entry-date{margin-top:5px;opacity:0.6;font-size:10px;text-align:right;transition:all 0.2s linear}.caselog-thread--block-entry-toggler{position:absolute;top:2px;right:5px;padding:2px 5px;opacity:0;cursor:pointer;background-color:#585653;transition:all 0.2s linear}.caselog-thread--block-me{text-align:right}.caselog-thread--block-me .caselog-thread--block-medallion{left:initial;right:0px}.caselog-thread--block-me .caselog-thread--block-user{display:none;margin-left:initial;margin-right:54px}.caselog-thread--block-me .caselog-thread--block-entries{margin-left:initial;margin-right:60px;text-align:right}.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry{text-align:left}.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{right:initial;left:5px}.caselog-thread--block-me .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{left:initial;right:-15px;border-right-color:transparent;border-left-color:#585653}.caselog-thread--block-color-1 .caselog-thread--block-medallion{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-1 .caselog-thread--block-user{color:#FFFFFF}.caselog-thread--block-color-1 .caselog-thread--block-entries{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-1 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{background-color:#FFFFFF}.caselog-thread--block-color-1 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{border-top-color:#FFFFFF;border-right-color:#FFFFFF}.caselog-thread--block-color-2 .caselog-thread--block-medallion{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-2 .caselog-thread--block-user{color:#FFFFFF}.caselog-thread--block-color-2 .caselog-thread--block-entries{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-2 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{background-color:#FFFFFF}.caselog-thread--block-color-2 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{border-top-color:#FFFFFF;border-right-color:#FFFFFF}.caselog-thread--block-color-3 .caselog-thread--block-medallion{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-3 .caselog-thread--block-user{color:#FFFFFF}.caselog-thread--block-color-3 .caselog-thread--block-entries{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-3 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{background-color:#FFFFFF}.caselog-thread--block-color-3 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{border-top-color:#FFFFFF;border-right-color:#FFFFFF}.caselog-thread--block-color-4 .caselog-thread--block-medallion{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-4 .caselog-thread--block-user{color:#FFFFFF}.caselog-thread--block-color-4 .caselog-thread--block-entries{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-4 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{background-color:#FFFFFF}.caselog-thread--block-color-4 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{border-top-color:#FFFFFF;border-right-color:#FFFFFF}.caselog-thread--block-color-5 .caselog-thread--block-medallion{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-5 .caselog-thread--block-user{color:#FFFFFF}.caselog-thread--block-color-5 .caselog-thread--block-entries{color:#444;background-color:#FFFFFF}.caselog-thread--block-color-5 .caselog-thread--block-entries .caselog-thread--block-entry .caselog-thread--block-entry-toggler{background-color:#FFFFFF}.caselog-thread--block-color-5 .caselog-thread--block-entries .caselog-thread--block-entry:first-child .caselog-thread--block-entry-content:before{border-top-color:#FFFFFF;border-right-color:#FFFFFF}.form_linkedset_toggler,.form_linkedset_toggler:hover,.form_linkedset_toggler:focus,.form_upload_toggler,.form_upload_toggler:hover,.form_upload_toggler:focus{text-decoration:none;color:inherit}.form_linkedset_toggler>.text,.form_upload_toggler>.text{margin-left:0.4em}.form_linkedset_toggler>.text:before,.form_upload_toggler>.text:before{content:"("}.form_linkedset_toggler>.text:after,.form_upload_toggler>.text:after{content:")"}.form_linkedset_toggler>.glyphicon,.form_upload_toggler>.glyphicon{margin-left:0.5em;font-size:0.85em;color:#EA7D1E;transition:transform 0.2s linear}.form_linkedset_toggler>.glyphicon.collapsed,.form_upload_toggler>.glyphicon.collapsed{transform:rotateZ(-90deg)}.form_linkedset_wrapper .datatables_overlay{padding:8px !important}.form_linkedset_wrapper .overlay_content{font-size:0.6em}.form_linkedset_wrapper .content_loader{margin:0px}.form_linkedset_wrapper .content_loader .icon{height:23px}.form_linkedset_wrapper .dataTables_wrapper{margin-bottom:5px;padding:0px}.attachments_container .attachments-list thead>tr>th{text-align:center}.attachments_container .attachments-list tbody>tr>td{padding:0.5rem 8px;text-align:left;vertical-align:middle}.attachments_container .attachments-list tbody>tr>td[role="icon"]{text-align:center}.attachments_container .attachments-list tbody>tr>td[role="icon"] img{max-height:32px}.attachments_container .attachments-list tbody>tr>td[role="formatted-size"]{text-align:right}.attachments_container .attachments-list tbody>tr>td[role="delete"]{text-align:center}.attachment-tooltip{max-width:100%;max-height:100%}.upload_container input{display:inline}.upload_container .loader{visibility:hidden;margin-left:7px;font-size:1.2em;animation:spin 1s linear infinite;-webkit-animation:spin 1s linear infinite;-moz-animation:spin 1s linear infinite;-ms-animation:spin 1s linear infinite}#drag_overlay{display:block;top:inherit;bottom:0px;height:0px}#drag_overlay .overlay_content{margin-top:5em;width:100%;color:white}#drag_overlay .overlay_content .icon{font-size:3em}#drag_overlay .overlay_content .message{font-size:1.5em}@media (min-width:768px){#drag_overlay.drag_in{animation:show-drop-zone 0.3s ease-out forwards;-webkit-animation:show-drop-zone 0.3s ease-out forwards;-moz-animation:show-drop-zone 0.3s ease-out forwards;-ms-animation:show-drop-zone 0.3s ease-out forwards}#drag_overlay.drag_out{animation:hide-drop-zone 0.3s ease-out forwards;-webkit-animation:hide-drop-zone 0.3s ease-out forwards;-moz-animation:hide-drop-zone 0.3s ease-out forwards;-ms-animation:hide-drop-zone 0.3s ease-out forwards}@keyframes show-drop-zone{100%{height:20%}}@-webkit-keyframes show-drop-zone{100%{height:20%}}@-moz-keyframes show-drop-zone{100%{height:20%}}@-ms-keyframes show-drop-zone{100%{height:20%}}@keyframes hide-drop-zone{0%{height:20%}100%{height:0%}}@-webkit-keyframes hide-drop-zone{0%{height:20%}100%{height:0%}}@-moz-keyframes hide-drop-zone{0%{height:20%}100%{height:0%}}@-ms-keyframes hide-drop-zone{0%{height:20%}100%{height:0%}}}.form_fields .file_open_link{margin-left:10px}.form_buttons{padding-top:20px;text-align:center}.form_buttons .form_btn_misc{margin-bottom:20px}.form_buttons .form_btn_transitions{margin-bottom:20px}.form_buttons .btn .glyphicon{margin-right:0.5em}.form_btn_regular.sticky{display:none}@media (min-width:768px){.form_buttons .form_btn_misc{float:left !important}.form_buttons .form_btn_transitions{float:right !important;margin-left:3px}.form_buttons .form_btn_regular{text-align:right}.form_buttons .form_btn_regular .btn{width:inherit}.form_btn_regular.sticky{display:block;position:fixed;bottom:5em;right:-2px;padding:15px;background-color:#FFFFFF;border:1px solid #ddd;border-radius:0px;transition:right 0.3s}.form_btn_regular.sticky.closed{right:-75px}.form_btn_regular.sticky button{display:block}.form_btn_regular.sticky button:first-child{margin-bottom:4px}}.form_field .cke{border:1px solid #ddd}.form_field.has-error .cke{border:1px solid #b94a48;border-radius:0px;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075)}.cke_notification{position:relative;padding:15px;margin-bottom:18px;border:1px solid transparent;border-radius:4px;background-color:#FFFFFF}.cke_notification_close{position:absolute;top:2px;right:5px}.cke_notification_message{margin-bottom:0px;line-height:1em;font-size:1em}.cke_notification_success{display:none;background-color:#dff0d8;border-color:#58a959;color:#468847}.cke_notification_warning{background-color:#fcf8e3;border-color:#ceae78;color:#c09853}.cke_toolbox_collapser,.cke_toolbox_collapser .cke_arrow{cursor:pointer !important}.cke_toolbox_collapser.cke_toolbox_collapser_min~.editor-fullscreen-button{display:block;width:12px;height:11px;border:1px solid #ddd;cursor:pointer;background-position:center center !important;background-repeat:no-repeat !important;background-size:100% !important;background-image:url("../../../../../images/full-screen.png") !important}.cke_toolbox_collapser.cke_toolbox_collapser_min~.editor-fullscreen-button:hover{background-color:#E5E5E5}.dataTable.table th span.row_input,.dataTable.table td span.row_input{display:inline-block;width:100%;text-align:center}.wiki_broken_link{text-decoration:line-through}.form_linkedset_wrapper label{display:none}.form_linkedset_wrapper .dataTables_scrollHead th.mandatory:after{content:"*";position:relative;left:3px;color:#EA7D1E;font-size:0.9em} \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss index 696e1c32f..cf4224cb5 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss +++ b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss @@ -1802,3 +1802,22 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{ .wiki_broken_link { text-decoration: line-through; } + +/**********************************************************/ +/* Shameful area (things that should be refactored soon) */ +/**********************************************************/ + +/* Hide attributes label in link set edition, will be fixed during attributes refactoring */ +.form_linkedset_wrapper label { + display: none; +} + +/* Add mandatory field column label */ +.form_linkedset_wrapper .dataTables_scrollHead th.mandatory:after { + content: "*"; + position: relative; + left: 3px; + color: #EA7D1E; + font-size: 0.9em; +} + diff --git a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php index 058a0303a..f8595c3af 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php @@ -29,6 +29,7 @@ use BinaryExpression; use Combodo\iTop\Portal\Brick\CreateBrick; use Combodo\iTop\Portal\Helper\ApplicationHelper; use Combodo\iTop\Portal\Helper\ContextManipulatorHelper; +use Combodo\iTop\Renderer\Bootstrap\FieldRenderer\BsLinkedSetFieldRenderer; use DBObject; use DBObjectSearch; use DBObjectSet; @@ -1312,14 +1313,20 @@ class ObjectController extends BrickController /** @var \Combodo\iTop\Portal\Helper\ScopeValidatorHelper $oScopeValidator */ $oScopeValidator = $this->get('scope_validator'); - $aData = array(); + // Data array + $aData = array( + 'js_inline' => '', + 'css_inline' => '', + ); // Retrieving parameters $sObjectClass = $oRequestManipulator->ReadParam('sObjectClass', ''); + $sLinkClass = $oRequestManipulator->ReadParam('sLinkClass', ''); $aObjectIds = $oRequestManipulator->ReadParam('aObjectIds', array(), FILTER_UNSAFE_RAW); $aObjectAttCodes = $oRequestManipulator->ReadParam('aObjectAttCodes', array(), FILTER_UNSAFE_RAW); - if (empty($sObjectClass) || empty($aObjectIds) || empty($aObjectAttCodes)) - { + $aLinkAttCodes = $oRequestManipulator->ReadParam('aLinkAttCodes', array(), FILTER_UNSAFE_RAW); + + if (empty($sObjectClass) || empty($aObjectIds) || empty($aObjectAttCodes)) { IssueLog::Info(__METHOD__.' at line '.__LINE__.' : sObjectClass, aObjectIds and aObjectAttCodes expected, "'.$sObjectClass.'", "'.implode('/', $aObjectIds).'" given.'); throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'Invalid request data, some information are missing'); @@ -1338,15 +1345,35 @@ class ObjectController extends BrickController // Checking that id is in the AttCodes // Note: We do that AFTER the array is used in OptimizeColumnLoad() because the function doesn't support this anymore. - if (!in_array('id', $aObjectAttCodes)) - { + if (!in_array('id', $aObjectAttCodes)) { $aObjectAttCodes = array_merge(array('id'), $aObjectAttCodes); } // Retrieving objects - while ($oObject = $oSet->Fetch()) - { - $aData['items'][] = $this->PrepareObjectInformation($oObject, $aObjectAttCodes); + while ($oObject = $oSet->Fetch()) { + // Prepare link data + $aObjectData = $this->PrepareObjectInformation($oObject, $aObjectAttCodes); + // New link object (needed for renderers) + $oNewLink = new $sLinkClass(); + foreach ($aLinkAttCodes as $sAttCode) { + $oAttDef = MetaModel::GetAttributeDef($sLinkClass, $sAttCode); + $oField = $oAttDef->MakeFormField($oNewLink); + $sFieldRendererClass = BsLinkedSetFieldRenderer::GetFieldRendererClass($oField); + $sValue = $oAttDef->GetAsHTML($oNewLink->Get($sAttCode)); + if ($sFieldRendererClass !== null) { + $oFieldRenderer = new $sFieldRendererClass($oField); + $oFieldOutput = $oFieldRenderer->Render(); + $sValue = $oFieldOutput->GetHtml(); + } + $aObjectData['attributes'][$sAttCode] = [ + 'att_code' => $sAttCode, + 'value' => $sValue, + 'css_inline' => $oFieldOutput->GetCss(), + 'js_inline' => $oFieldOutput->GetJs(), + ]; + } + + $aData['items'][] = $aObjectData; } return new JsonResponse($aData); @@ -1356,7 +1383,7 @@ class ObjectController extends BrickController * Prepare a DBObject information as an array for a client side usage (typically, add a row in a table) * * @param \DBObject $oObject - * @param array $aAttCodes + * @param array $aAttCodes * * @return array * @@ -1372,8 +1399,8 @@ class ObjectController extends BrickController $sObjectClass = get_class($oObject); $aObjectData = array( - 'id' => $oObject->GetKey(), - 'name' => $oObject->GetName(), + 'id' => $oObject->GetKey(), + 'name' => $oObject->GetName(), 'attributes' => array(), ); diff --git a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php index fff3352b3..3c2e4a231 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php @@ -44,6 +44,7 @@ use Exception; use ExceptionLog; use InlineImage; use IssueLog; +use LogChannels; use MetaModel; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; @@ -859,7 +860,10 @@ class ObjectFormManager extends FormManager foreach ($aAttCodesToDisplay as $sAttCodeToDisplay) { $oAttDefToDisplay = MetaModel::GetAttributeDef($oField->GetTargetClass(), $sAttCodeToDisplay); - $aAttributesToDisplay[$sAttCodeToDisplay] = $oAttDefToDisplay->GetLabel(); + $aAttributesToDisplay[$sAttCodeToDisplay] = [ + 'label' => $oAttDefToDisplay->GetLabel(), + 'mandatory' => !$oAttDefToDisplay->IsNullAllowed(), + ]; } $oField->SetAttributesToDisplay($aAttributesToDisplay); } @@ -869,7 +873,7 @@ class ObjectFormManager extends FormManager /** @var \ormLinkSet $oFieldOriginalSet */ $oFieldOriginalSet = $oField->GetCurrentValue(); - while ($oLink = $oFieldOriginalSet->Fetch()) { + foreach ($oFieldOriginalSet as $oLink) { if ($oField->IsIndirect()) { $iRemoteKey = $oLink->Get($oAttDef->GetExtKeyToRemote()); } else { @@ -1099,7 +1103,7 @@ class ObjectFormManager extends FormManager { $aData = parent::OnSubmit($aArgs); - if (! $aData['valid']) { + if (!$aData['valid']) { return $aData; } @@ -1282,6 +1286,15 @@ class ObjectFormManager extends FormManager $oLink = MetaModel::NewObject($sLinkedClass); $oLink->Set($oAttDef->GetExtKeyToRemote(), $iObjKey); $oLink->Set($oAttDef->GetExtKeyToMe(), $this->oObject->GetKey()); + // Set link attributes values... + foreach ($aObjdata as $sLinkAttCode => $oAttValue) { + if (!is_scalar($oAttValue)) { + IssueLog::Debug("ObjectFormManager::OnUpdate invalid link attribute value, $sLinkAttCode is not a scalar value", LogChannels::PORTAL); + continue; + } + $oLink->Set($sLinkAttCode, $oAttValue); + } + $oLinkSet->AddItem($oLink); } // ... or adding remote object when linkset id direct else @@ -1290,15 +1303,36 @@ class ObjectFormManager extends FormManager $oLink = MetaModel::GetObject($sLinkedClass, $iObjKey, false, true); } - if ($oLink !== null) - { + if ($oLink !== null) { $oLinkSet->AddItem($oLink); } } } // Checking links to modify - // TODO: Not implemented yet as we can't change lnk properties in the portal + if ($oAttDef->IsIndirect() && isset($value['current'])) { + foreach ($value['current'] as $iObjKey => $aObjData) { + if ($iObjKey < 0) { + continue; + } + $oLink = null; + $oLinkSet->Rewind(); + foreach ($oLinkSet as $oItem) { + if ($oItem->Get('id') != $iObjKey) { + continue; + } + $oLink = $oItem; + foreach ($aObjData as $sLinkAttCode => $oAttValue) { + if (!is_scalar($oAttValue)) { + IssueLog::Debug("ObjectFormManager::OnUpdate invalid link attribute value, $sLinkAttCode is not a scalar value", LogChannels::PORTAL); + continue; + } + $oLink->Set($sLinkAttCode, $oAttValue); + } + $oLinkSet->ModifyItem($oLink); + } + } + } // Setting value in the object $this->oObject->Set($sAttCode, $oLinkSet); diff --git a/dictionaries/ui/application/links/en.dictionary.itop.links.php b/dictionaries/ui/application/links/en.dictionary.itop.links.php index 1d6cc66f6..610648be0 100644 --- a/dictionaries/ui/application/links/en.dictionary.itop.links.php +++ b/dictionaries/ui/application/links/en.dictionary.itop.links.php @@ -70,4 +70,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:Links:Bulk:LinkExistForAllObjects' => 'All objets are already linked', 'UI:Links:Bulk:LinkExistForOneObject' => 'One object is linked', 'UI:Links:Bulk:LinkExistForXObjects' => '{count} objects are linked', + + // New item + 'UI:Links:NewItem' => 'New item', )); \ No newline at end of file diff --git a/dictionaries/ui/application/links/fr.dictionary.itop.links.php b/dictionaries/ui/application/links/fr.dictionary.itop.links.php index 6030d5edb..395ef46de 100644 --- a/dictionaries/ui/application/links/fr.dictionary.itop.links.php +++ b/dictionaries/ui/application/links/fr.dictionary.itop.links.php @@ -71,4 +71,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:Links:Bulk:LinkExistForAllObjects' => 'Tous les objets sont déjà liés', 'UI:Links:Bulk:LinkExistForOneObject' => 'Un objet est lié', 'UI:Links:Bulk:LinkExistForXObjects' => '{count} objets sont liés', + + // New item + 'UI:Links:NewItem' => 'Nouvel element', )); \ No newline at end of file diff --git a/sources/Form/Field/LinkedSetField.php b/sources/Form/Field/LinkedSetField.php index a4f28a5c3..30da524f6 100644 --- a/sources/Form/Field/LinkedSetField.php +++ b/sources/Form/Field/LinkedSetField.php @@ -21,6 +21,8 @@ namespace Combodo\iTop\Form\Field; use Closure; +use Dict; +use ormLinkSet; /** * Description of LinkedSetField @@ -35,10 +37,12 @@ class LinkedSetField extends Field /** @var bool DEFAULT_DISPLAY_OPENED */ const DEFAULT_DISPLAY_OPENED = false; /** @var bool DEFAULT_DISPLAY_LIMITED_ACCESS_ITEMS */ - const DEFAULT_DISPLAY_LIMITED_ACCESS_ITEMS = false; - + const DEFAULT_DISPLAY_LIMITED_ACCESS_ITEMS = false; + /** @var string $sTargetClass */ protected $sTargetClass; + /** @var string $sLinkedClass */ + protected $sLinkedClass; /** @var string $sExtKeyToRemote */ protected $sExtKeyToRemote; /** @var bool $bIndirect */ @@ -51,6 +55,8 @@ class LinkedSetField extends Field protected $aLimitedAccessItemIDs; /** @var array $aAttributesToDisplay */ protected $aAttributesToDisplay; + /** @var array $aLnkAttributesToDisplay */ + protected $aLnkAttributesToDisplay; /** @var string $sSearchEndpoint */ protected $sSearchEndpoint; /** @var string $sInformationEndpoint */ @@ -68,6 +74,7 @@ class LinkedSetField extends Field $this->bDisplayLimitedAccessItems = static::DEFAULT_DISPLAY_LIMITED_ACCESS_ITEMS; $this->aLimitedAccessItemIDs = array(); $this->aAttributesToDisplay = array(); + $this->aLnkAttributesToDisplay = array(); $this->sSearchEndpoint = null; $this->sInformationEndpoint = null; @@ -96,6 +103,31 @@ class LinkedSetField extends Field return $this; } + /** + * @return string + * @since 3.1 + * + */ + public function GetLinkedClass() + { + return $this->sLinkedClass; + } + + /** + * + * @since 3.1 + * + * @param string $sLinkedClass + * + * @return $this + */ + public function SetLinkedClass(string $sLinkedClass) + { + $this->sLinkedClass = $sLinkedClass; + + return $this; + } + /** * * @return string @@ -237,6 +269,35 @@ class LinkedSetField extends Field return $this; } + /** + * Returns a hash array of attributes to be displayed in the linkedset in the form $sAttCode => $sAttLabel + * + * @since 3.1 + * + * @param boolean $bAttCodesOnly If set to true, will return only the attcodes + * + * @return array + */ + public function GetLnkAttributesToDisplay(bool $bAttCodesOnly = false) + { + return ($bAttCodesOnly) ? array_keys($this->aLnkAttributesToDisplay) : $this->aLnkAttributesToDisplay; + } + + /** + * + * @since 3.1 + * + * @param array $aAttributesToDisplay + * + * @return $this + */ + public function SetLnkAttributesToDisplay(array $aAttributesToDisplay) + { + $this->aLnkAttributesToDisplay = $aAttributesToDisplay; + + return $this; + } + /** * @return string|null */ @@ -288,4 +349,30 @@ class LinkedSetField extends Field { return in_array($iItemID, $this->aLimitedAccessItemIDs, false); } + + /** @inheritdoc @since 3.1 */ + public function Validate() + { + $bValid = parent::Validate(); + + /** @var ormLinkSet $oSet */ + $oSet = $this->GetCurrentValue(); + + /** @var \DBObject $oItem */ + foreach ($oSet as $oItem) { + list($bRes, $aIssues) = $oItem->CheckToWrite(); + if ($bRes === false) { + foreach ($aIssues as $sIssue) { + $sItem = $oItem->Get('friendlyname') != '' ? $oItem->Get('friendlyname') : Dict::S('UI:Links:NewItem'); + $this->AddErrorMessage(''.$sItem.' : '.$sIssue); + } + $bValid = false; + } + + } + + $oSet->Rewind(); + + return $bValid; + } } diff --git a/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php b/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php index 5a2aeaa81..4a2efe30e 100644 --- a/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php +++ b/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php @@ -22,6 +22,11 @@ namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer; use ApplicationContext; use AttributeFriendlyName; +use Combodo\iTop\Form\Field\Field; +use Combodo\iTop\Renderer\Bootstrap\BsFieldRendererMappings; +use Combodo\iTop\Renderer\FieldRenderer; +use Combodo\iTop\Renderer\RenderingOutput; +use DBObject; use Dict; use Exception; use IssueLog; @@ -43,52 +48,62 @@ class BsLinkedSetFieldRenderer extends BsFieldRenderer */ public function Render() { - $oOutput = parent::Render(); + $oOutput = parent::Render(); $sFieldMandatoryClass = ($this->oField->GetMandatory()) ? 'form_mandatory' : ''; $sFieldDescriptionForHTMLTag = ($this->oField->HasDescription()) ? 'data-tooltip-content="'.utils::HtmlEntities($this->oField->GetDescription()).'"' : ''; + + // Merge lnk and remote class attributes to display + $aAttributesToDisplay = array_merge($this->oField->GetLnkAttributesToDisplay(), $this->oField->GetAttributesToDisplay()); + $iLinkAttributesToDisplayCount = count($this->oField->GetLnkAttributesToDisplay()) + 1; + // Vars to build the table - $sAttributesToDisplayAsJson = json_encode($this->oField->GetAttributesToDisplay()); + $sAttributesToDisplayAsJson = json_encode($aAttributesToDisplay); $sAttCodesToDisplayAsJson = json_encode($this->oField->GetAttributesToDisplay(true)); + $sLnkAttCodesToDisplayAsJson = json_encode($this->oField->GetLnkAttributesToDisplay(true)); + + $aItems = array(); $aItemIds = array(); - $this->PrepareItems($aItems, $aItemIds); + $aAddedItemIds = array(); + $aAddedTargetIds = array(); + $this->InjectRendererFileAssets($this->oField->GetLinkedClass(), $this->oField->GetLnkAttributesToDisplay(true), $oOutput); + $this->PrepareItems($aItems, $aItemIds, $oOutput, $aAddedItemIds, $aAddedTargetIds); $sItemsAsJson = json_encode($aItems); - $sItemIdsAsJson = utils::EscapeHtml(json_encode(array('current' => $aItemIds))); + $sItemIdsAsJson = utils::EscapeHtml(json_encode(array('current' => $aItemIds, 'add' => $aAddedItemIds))); - if (!$this->oField->GetHidden()) - { + foreach ($aAddedTargetIds as $sId) { + $aItemIds[$sId] = array(); + } + + if (!$this->oField->GetHidden()) { // Rendering field $sIsEditable = ($this->oField->GetReadOnly()) ? 'false' : 'true'; $sCollapseTogglerIconVisibleClass = 'glyphicon-menu-down'; $sCollapseTogglerIconHiddenClass = 'glyphicon-menu-down collapsed'; $sCollapseTogglerClass = 'form_linkedset_toggler'; - $sCollapseTogglerId = $sCollapseTogglerClass . '_' . $this->oField->GetGlobalId(); - $sFieldWrapperId = 'form_linkedset_wrapper_' . $this->oField->GetGlobalId(); + $sCollapseTogglerId = $sCollapseTogglerClass.'_'.$this->oField->GetGlobalId(); + $sFieldWrapperId = 'form_linkedset_wrapper_'.$this->oField->GetGlobalId(); // Preparing collapsed state - if($this->oField->GetDisplayOpened()) - { - $sCollapseTogglerExpanded = 'true'; - $sCollapseTogglerIconClass = $sCollapseTogglerIconVisibleClass; - $sCollapseJSInitState = 'true'; - } - else - { - $sCollapseTogglerClass .= ' collapsed'; - $sCollapseTogglerExpanded = 'false'; - $sCollapseTogglerIconClass = $sCollapseTogglerIconHiddenClass; - $sCollapseJSInitState = 'false'; - } + if ($this->oField->GetDisplayOpened()) { + $sCollapseTogglerExpanded = 'true'; + $sCollapseTogglerIconClass = $sCollapseTogglerIconVisibleClass; + $sCollapseJSInitState = 'true'; + } else { + $sCollapseTogglerClass .= ' collapsed'; + $sCollapseTogglerExpanded = 'false'; + $sCollapseTogglerIconClass = $sCollapseTogglerIconHiddenClass; + $sCollapseJSInitState = 'false'; + } - $oOutput->AddHtml('