annotate ireport_javascript.js @ 6:42076db43d42 draft

Fixed auto resizing plus various other minor bugs
author saskia-hiltemann
date Mon, 16 Nov 2015 08:56:22 -0500
parents a4813532bbc6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
1 function resizeIframe(obj) {
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
2 oldheight=obj.style.height
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
3 oldwidth=obj.style.width
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
4 obj.style.height = obj.contentWindow.document.body.scrollHeight + 4 + 'px';
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
5 obj.style.width = obj.contentWindow.document.body.scrollWidth + 4 + 'px';
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
6 if(obj.style.height < 50){
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
7 obj.style.height=oldheight
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
8 }
a4813532bbc6 Added MarkDown support
saskia-hiltemann
parents:
diff changeset
9 }