Mercurial > public > sg101
changeset 481:9f888dbe61ce
Fixing #230; add a scrollbar to the PM popup dialog if necessary. This wasn't as easy as I thought. Had to wrap the PM text in a div with its styling (max-height and overflow). If I then resized the dialog, I'd get two scrollbars. So for now, made the dialog non-resizable.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 07 Oct 2011 02:11:33 +0000 |
parents | 1a7ca5fa494f |
children | dc4638f37c22 |
files | gpp/messages/static/js/tabbed_messages.js |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/messages/static/js/tabbed_messages.js Wed Oct 05 00:09:30 2011 +0000 +++ b/gpp/messages/static/js/tabbed_messages.js Fri Oct 07 02:11:33 2011 +0000 @@ -32,6 +32,9 @@ $msgDialog = $('#msgDialog').dialog({ autoOpen: false, width: 460, + height: 'auto', + maxHeight: false, + resizable: false, buttons: [ { text: "Reply", @@ -89,7 +92,8 @@ } } - $msgDialog.html(msg.content); + var s = '<div style="max-height:450px;overflow:auto">' + msg.content + '</div>'; + $msgDialog.html(s); var title = 'PM From ' + msg.sender + ' To ' + msg.receiver + '<br /> ' + msg.subject; $msgDialog.dialog('option', 'title', title); $msgDialog.dialog('open');