Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #625 dyn fields css #1615

Merged
merged 9 commits into from
Feb 22, 2022
19 changes: 7 additions & 12 deletions var/httpd/htdocs/js/Core.Form.ErrorTooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,7 @@ Core.Form.ErrorTooltips = (function (TargetNS) {
* @description
* The offset of the element for which a tooltip is shown.
*/
Offset,
/**
* @private
* @name CustomerInterface
* @memberof Core.Form.ErrorTooltips
* @member {Object}
* @description
* Whether we are in the CustomerInterface.
*/
CustomerInterface = ( Core.Config.Get('SessionName') === Core.Config.Get('CustomerPanelSessionName') );

Offset;
/**
* @name ShowTooltip
* @memberof Core.Form.ErrorTooltips
Expand Down Expand Up @@ -166,6 +156,11 @@ Core.Form.ErrorTooltips = (function (TargetNS) {
.append($Tooltip)
.show();

if ( Core.Config.Get('SessionName') === Core.Config.Get('CustomerPanelSessionName') ) {
TooltipOffsetLeft = 96;
TooltipOffsetTop = 24;
}

if (TooltipPosition === 'TongueBottom') {
TopOffset = Offset.top + TooltipOffsetTop;
}
Expand Down Expand Up @@ -259,7 +254,7 @@ Core.Form.ErrorTooltips = (function (TargetNS) {
TargetNS.InitRTETooltip = function ($Element, Message) {

// TODO: Error Tooltips are disabled for the Customerinterface
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this comment be removed?

if ( CustomerInterface ) { return }
if ( ( Core.Config.Get('SessionName') === Core.Config.Get('CustomerPanelSessionName') ) ) { return }

var ElementID = $Element.attr('id');
CKEDITOR.instances[ElementID].on('focus', ShowRTETooltip, null, {ElementID: ElementID, Message: Message});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ input[readonly=readonly] {
font-size: 18px;
}

.Tooltip p {
.Tooltip > p {
z-index: 1;
display: none;
padding: 24px 32px;
Expand All @@ -576,7 +576,7 @@ input[readonly=readonly] {
border-radius: 15px;
}

.Tooltip:hover p {
.Tooltip:hover > p {
display: inline;
position: absolute;
left: -260px;
Expand Down
51 changes: 51 additions & 0 deletions var/httpd/htdocs/skins/Customer/default/css/Core.Tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,54 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
* @package Skin "Default"
* @section Tooltips
*/

@media screen,projection,tv,handheld {

div.TooltipContainer {
position: absolute;
z-index: 6000;
display: none;
width: 400px;
}

div.TooltipContainer > div.Tooltip {
width: 400px;
}

div.Tooltip > div.Content {
background-color: #fff;
border: 1px solid #ccc;
padding: 5px;
position: relative;
border-radius: 15px;
padding: 24px 32px;
width: 280px;
line-height: 1.4;
white-space: normal;
box-shadow: 0 1px 4px 0 rgba(4, 0, 71, 0.16);
box-shadow: 0 1px 4px 0 var(--colShadowDark);
}

div.Tooltip > div.Content:after,
div.Tooltip > div.Content:before {
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}

div.Tooltip > div.Content:after {
border-color: rgba(255, 255, 255, 0);
border-width: 6px;
margin-left: -6px;
}

div.Tooltip > div.Content:before {
border-color: rgba(204, 204, 204, 0);
margin-left: -7px;
}

} /* end @media */