diff --git a/bundle/src/main/resources/angularjs-partials/configTable.html b/bundle/src/main/resources/angularjs-partials/configTable.html index d76e8def..8605b444 100644 --- a/bundle/src/main/resources/angularjs-partials/configTable.html +++ b/bundle/src/main/resources/angularjs-partials/configTable.html @@ -18,7 +18,7 @@

- +

diff --git a/bundle/src/main/resources/angularjs-partials/descriptionPopup.html b/bundle/src/main/resources/angularjs-partials/descriptionPopup.html index 162ba589..dcf69522 100644 --- a/bundle/src/main/resources/angularjs-partials/descriptionPopup.html +++ b/bundle/src/main/resources/angularjs-partials/descriptionPopup.html @@ -1,4 +1,4 @@ -

+
diff --git a/bundle/src/main/resources/angularjs-partials/helpInlinePopup.html b/bundle/src/main/resources/angularjs-partials/helpInlinePopup.html new file mode 100644 index 00000000..b1742563 --- /dev/null +++ b/bundle/src/main/resources/angularjs-partials/helpInlinePopup.html @@ -0,0 +1,4 @@ + + + + diff --git a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/css/editor.css b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/css/editor.css index e57af209..8281235f 100644 --- a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/css/editor.css +++ b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/css/editor.css @@ -230,16 +230,14 @@ span.caconfig-tagbrowser { margin-right: 0.5rem; } -.caconfig-property-inheritance .caconfig-description-popup { - display: inline; +.caconfig-help-inline-popup button { + padding: 0; + min-height: 0; + margin-top: 8px; +} +.coral-Table-headerCell .caconfig-help-inline-popup { text-transform: none; font-size: 14px; font-weight: normal; letter-spacing: 0; } -.caconfig-property-inheritance .caconfig-description-popup button { - padding: 0; - min-height: 0; - height: 20px; - margin-top: 8px; -} diff --git a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js.txt b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js.txt index 16318f28..c08ff958 100644 --- a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js.txt +++ b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js.txt @@ -33,6 +33,7 @@ widgets/widgets.module.js widgets/widgets.constants.js widgets/config-table.directive.js widgets/description-popup.directive.js +widgets/help-inline-popup.directive.js widgets/multifield.directive.js widgets/pathbrowser.directive.js widgets/property-dropdown.directive.js diff --git a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/help-inline-popup.directive.js b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/help-inline-popup.directive.js new file mode 100644 index 00000000..2d91d45a --- /dev/null +++ b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/help-inline-popup.directive.js @@ -0,0 +1,69 @@ +/* + * #%L + * wcm.io + * %% + * Copyright (C) 2024 wcm.io + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +(function (angular, Coral) { + "use strict"; + + /** + * Directive to render the "i" button with a popover for the decription of the property. + * Wraps a Coral UI Button and Coral.Popover widget. + * This directive transcludes the popup content elements. + * + * @example + * + * + * + * + */ + angular.module("io.wcm.caconfig.widgets") + .directive("caconfigHelpInlinePopup", helpInlinePopup); + + helpInlinePopup.$inject = ["$timeout", "templateUrlList"]; + + function helpInlinePopup($timeout, templateList) { + + var directive = { + restrict: "E", + replace: true, + templateUrl: templateList.helpInlinePopup, + link: link, + scope: { + content: "=" + } + }; + + return directive; + + function link(scope, element) { + scope.id = Coral.commons.getUID(); + + scope.$evalAsync(function () { + scope.helpInlinePopupReady = true; + }); + + $timeout(function() { + var $popover = element.find("coral-popover"); + var popover = $popover[0]; + Coral.commons.ready(popover, function() { + $popover.append($('

').text(scope.content)); + }); + }, false); + } + } +}(angular, Coral)); diff --git a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/widgets.constants.js b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/widgets.constants.js index 56904741..4028a5b9 100644 --- a/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/widgets.constants.js +++ b/bundle/src/main/webapp/app-root/clientlibs/io.wcm.caconfig.editor/js/widgets/widgets.constants.js @@ -32,6 +32,7 @@ .constant("templateUrlList", { configTable: "configTable.html", descriptionPopup: "descriptionPopup.html", + helpInlinePopup: "helpInlinePopup.html", multifield: "multifield.html", pathbrowser: "pathbrowser.html", propertyDropdown: "propertyDropdown.html",