Skip to content

Commit 841737e

Browse files
Improves display of popups with large amounts of content
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
1 parent 53897c5 commit 841737e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Themes/default/css/index.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,21 +2913,28 @@ dl.addrules dt.floatleft {
29132913
width: 480px;
29142914
padding: 0 6px 6px 6px;
29152915
}
2916+
.popup_window.large {
2917+
min-width: 80%;
2918+
top: 7vh;
2919+
}
29162920
.popup_heading {
29172921
padding: 10px 8px;
29182922
color: #bf6900;
29192923
}
29202924
.popup_content {
29212925
color: #222;
29222926
line-height: 1.6em;
2923-
max-height: 30em;
2927+
max-height: 65vh;
29242928
overflow: auto;
29252929
padding: 10px 8px;
29262930
border: 1px solid #bbb;
29272931
border-bottom: 1px solid #ddd;
29282932
border-radius: 6px 6px 2px 2px;
29292933
box-shadow: 0 -2px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(255, 255, 255, 0.2);
29302934
}
2935+
.popup_window.large .popup_content {
2936+
max-height: 80vh;
2937+
}
29312938
#main_menu .popup_heading,
29322939
#genericmenu .popup_heading,
29332940
#adm_submenus .popup_heading {

Themes/default/scripts/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ function reqOverlayDiv(desktopURL, sHeader, sIcon)
366366
success: function (data, textStatus, xhr) {
367367
var help_content = $('<div id="temp_help">').html(data).find('a[href$="self.close();"]').hide().prev('br').hide().parent().html();
368368
oPopup_body.html(help_content);
369+
370+
if (oPopup_body.text().length > 1200) {
371+
$('#' + oContainer.popup_id).find('.popup_window').addClass('large');
372+
}
369373
},
370374
error: function (xhr, textStatus, errorThrown) {
371375
oPopup_body.html(textStatus);

0 commit comments

Comments
 (0)