Commit 5135afbc by Braden MacDonald

Fix two tip CSS issues

parent c3a2af39
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
padding: 22px 10px 10px 10px; padding: 22px 10px 10px 10px;
width: 300px; width: 300px;
min-height: 40px; min-height: 40px;
max-height: 180px;
z-index: 10000; z-index: 10000;
} }
...@@ -54,6 +55,8 @@ ...@@ -54,6 +55,8 @@
.mentoring .questionnaire .feedback .message-content { .mentoring .questionnaire .feedback .message-content {
position: relative; position: relative;
overflow-y: auto; overflow-y: auto;
line-height: normal;
max-height: 180px;
} }
.mentoring .questionnaire .choice-tips .close, .mentoring .questionnaire .choice-tips .close,
......
...@@ -18,24 +18,24 @@ function MessageView(element, mentoring) { ...@@ -18,24 +18,24 @@ function MessageView(element, mentoring) {
// Set the width/height // Set the width/height
var tip = $('.tip', popupDOM)[0]; var tip = $('.tip', popupDOM)[0];
var data = $(tip).data(); var data = $(tip).data();
var innerDOM = popupDOM.find('.tip-choice-group');
if (data && data.width) { if (data && data.width) {
popupDOM.css('width', data.width); popupDOM.css('width', data.width);
popupDOM.find('.tip-choice-group').css('width', data.width); innerDOM.css('width', data.width);
} else { } else {
popupDOM.css('width', ''); popupDOM.css('width', '');
popupDOM.find('.tip-choice-group').css('width', ''); innerDOM.css('width', '');
} }
if (data && data.height) { if (data && data.height) {
popupDOM.css('height', data.height); popupDOM.css('height', data.height);
popupDOM.css('maxHeight', data.height); popupDOM.css('maxHeight', data.height);
innerDOM.css('maxHeight', data.height);
} else { } else {
popupDOM.css('height', ''); popupDOM.css('height', '');
popupDOM.css('maxHeight', ''); popupDOM.css('maxHeight', '');
innerDOM.css('maxHeight', '');
} }
// .tip-choice-group should always be the same height as the popup
// for scrolling to work properly.
popupDOM.find('.tip-choice-group').height(popupDOM.height());
var container = popupDOM.parent('.choice-tips-container'); var container = popupDOM.parent('.choice-tips-container');
if (container.length) { if (container.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment