Mathijs den Burger pushed to branch feature/cmng-psp1-CHANNELMGR-605 at 
cms-community / hippo-addon-channel-manager


Commits:
284c5ad4 by Mathijs den Burger at 2016-05-30T12:00:40+02:00
CHANNELMGR-605 merge multi-line tooltip into help-icon-tooltip

Multi-line tooltips need a max-width, which can only be calculated
properly for help icons. So merge the multi-line styling into the
help icon styling to simplify things.

- - - - -


3 changed files:

- 
frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
- frontend-ng/src/styles/_channel.scss
- frontend-ng/src/styles/_tooltips.scss


Changes:

=====================================
frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
=====================================
--- 
a/frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
+++ 
b/frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
@@ -15,6 +15,6 @@
   -->
 
 <div ng-if="text" class="help-icon">
-  <md-tooltip class="tooltip-help-icon tooltip-multiline" 
md-direction="left">{{ text }}</md-tooltip>
+  <md-tooltip class="tooltip-help-icon" md-direction="left">{{ text 
}}</md-tooltip>
   <md-icon class="material-icons">info_outline</md-icon>
 </div>


=====================================
frontend-ng/src/styles/_channel.scss
=====================================
--- a/frontend-ng/src/styles/_channel.scss
+++ b/frontend-ng/src/styles/_channel.scss
@@ -55,6 +55,10 @@ md-input-container.input-container-picker {
   right: -$help-icon-width;
 }
 
+// avoid that help icon tooltips grow wider than the subpage; wrap text when 
necessary.
 .tooltip-help-icon ._md-content {
-  max-width: $subpage-max-width - $help-icon-width;  // avoid that help icon 
tooltips get wider than the subpage
+  height: auto;
+  max-width: $subpage-max-width - $help-icon-width;
+  text-overflow: initial;
+  white-space: initial;
 }


=====================================
frontend-ng/src/styles/_tooltips.scss
=====================================
--- a/frontend-ng/src/styles/_tooltips.scss
+++ b/frontend-ng/src/styles/_tooltips.scss
@@ -1,26 +1,17 @@
-/*
- * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
- *
- * 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.
- */
-md-tooltip {
-  ._md-content {
-    background-color: $tooltip-bg !important;
-  }
+// Copyright 2016 Hippo B.V. (http://www.onehippo.com)
+//
+// 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.
 
-  &.tooltip-multiline ._md-content {
-    height: auto;
-    white-space: pre;
-  }
+md-tooltip ._md-content {
+  background-color: $tooltip-bg !important;
 }
-



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/284c5ad4dc4b41a6a83abceb6dbd88f58dc836cd
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to