diff --git a/module/bug/js/view.js b/module/bug/js/view.js index e69de29bb2..0fa36f3851 100644 --- a/module/bug/js/view.js +++ b/module/bug/js/view.js @@ -0,0 +1,4 @@ +$(document).ready(function() +{ + limitIframeLevel(); +}); diff --git a/module/task/js/view.js b/module/task/js/view.js index 6b0ac9c307..5691032fd7 100644 --- a/module/task/js/view.js +++ b/module/task/js/view.js @@ -5,3 +5,7 @@ function assign(taskID, assignedTo) $('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo)); } +$(document).ready(function() +{ + limitIframeLevel(); +}); diff --git a/module/testcase/js/view.js b/module/testcase/js/view.js index 28333b33a6..f35a6c8bbc 100644 --- a/module/testcase/js/view.js +++ b/module/testcase/js/view.js @@ -1,4 +1,4 @@ -$(document).ready(function() +$(document).ready(function() { if(config.onlybody != 'yes')$(".runCase").modalTrigger({width:'90%', type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}}); if(config.onlybody != 'yes')$(".results").modalTrigger({width:'90%', type:'iframe'}); @@ -21,4 +21,6 @@ $(document).ready(function() setTimeout($.resetToolbarPosition, 50); }); + + limitIframeLevel(); }) diff --git a/www/js/my.full.js b/www/js/my.full.js index 2db9b6a831..b819dcdb00 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -848,6 +848,24 @@ function scrollToSelected(id) } } +/** + * Limit iframe levels up to 3. + * + * @access public + * @return void + */ +function limitIframeLevel() +{ + /* Fix bug #15325. */ + if(window.parent != window.top) + { + $('body').find('a.iframe').each(function() + { + $(this).replaceWith($(this).clone().removeClass('iframe')); + }); + } +} + /* Ping the server every some minutes to keep the session. */ needPing = true;