...
| Bloc de code |
|---|
/*********************************************
Resize d'iframe
*********************************************/
(function($){
$(document).ready(function(){
var resizeFrames = function() {
$('iframe').each(function(){
var height_window = $(window).height();
// do not open other iframe
// direct child of up-portlet-content-wrapper-inner
if($(this).parent().get(0).className == 'up-portlet-content-wrapper-inner') {
newHeight = height_window-210;
this.height=newHeight+"px";
$('#portalPageFooter').hide();
}
});
}
$(window).resize(function() {
resizeFrames();
});
resizeFrames();
});
})(jQuery);
|
...
(nb : testé avec uPortal 3.2 et tous les navigateurs testés : Firefox 3.6, Chrome 8.0, Safari, IE 8. Ne fonctionne pas avec IE6/IE7 qui ne gèrent pas postMessage)
Le portail qui reçoit la hauteur du contenu des iframes et ajuste la hauteur de l'iframe.
Cette solution fonctionne avec toutes les applications testées, même celles utilisant de l'ajax pour construire la page affichée.
...
Installer postMessage-resize-iframe-in-parent.js pour le rendre accessible aux applications (ex : http://xxx.univ.fr/zzz/postMessage-resize-iframe-in-parent.js
).
Dans l'application
...