Fix OP image expanding if there is not reply, fix #53

This commit is contained in:
Mayhem 2011-05-01 17:34:40 +02:00
parent 4949d707c4
commit a683331a9e
2 changed files with 9 additions and 8 deletions

View File

@ -1999,10 +1999,11 @@
foo: function() {
var crap, formWidth, left, table, td;
formWidth = $('form[name=delform]').getBoundingClientRect().width;
td = $('td.reply');
table = td.parentNode.parentNode.parentNode;
left = td.getBoundingClientRect().left - table.getBoundingClientRect().left;
crap = td.getBoundingClientRect().width - parseInt(getComputedStyle(td).width);
if (td = $('td.reply')) {
table = td.parentNode.parentNode.parentNode;
left = td.getBoundingClientRect().left - table.getBoundingClientRect().left;
crap = td.getBoundingClientRect().width - parseInt(getComputedStyle(td).width);
}
imgExpand.maxWidthOP = formWidth;
imgExpand.maxWidthReply = formWidth - left - crap;
imgExpand.maxHeight = d.body.clientHeight;

View File

@ -1518,10 +1518,10 @@ imgExpand =
foo: ->
formWidth = $('form[name=delform]').getBoundingClientRect().width
td = $('td.reply')
table = td.parentNode.parentNode.parentNode
left = td.getBoundingClientRect().left - table.getBoundingClientRect().left
crap = td.getBoundingClientRect().width - parseInt(getComputedStyle(td).width)
if td = $('td.reply')
table = td.parentNode.parentNode.parentNode
left = td.getBoundingClientRect().left - table.getBoundingClientRect().left
crap = td.getBoundingClientRect().width - parseInt(getComputedStyle(td).width)
imgExpand.maxWidthOP = formWidth
imgExpand.maxWidthReply = formWidth - left - crap