From 5be02b1592ab8b70ebeac995fd83febfc0f9b206 Mon Sep 17 00:00:00 2001 From: str4d Date: Wed, 27 Jun 2012 02:16:21 +0000 Subject: [PATCH] Fixed JS for iframed apps so the CSS class is injected on page change --- apps/routerconsole/jsp/i2ptunnelmgr.jsp | 7 +++---- apps/routerconsole/jsp/torrents.jsp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/routerconsole/jsp/i2ptunnelmgr.jsp b/apps/routerconsole/jsp/i2ptunnelmgr.jsp index a9faab899..3b4795cb3 100644 --- a/apps/routerconsole/jsp/i2ptunnelmgr.jsp +++ b/apps/routerconsole/jsp/i2ptunnelmgr.jsp @@ -23,20 +23,19 @@ function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); } function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; } function injectClass(f) { f.contentWindow.document.getElementsByTagName('body')[0].setAttribute('class', 'iframed'); } - function init() { + function setupFrame() { f = document.getElementById("i2ptunnelframe"); resizeFrame(f); injectClass(f); - initAjax(); } - + <%@include file="summary.jsi" %>

<%=intl._("I2P Tunnel Manager")%>

-
<% diff --git a/apps/routerconsole/jsp/torrents.jsp b/apps/routerconsole/jsp/torrents.jsp index 9bcb15929..fd6538698 100644 --- a/apps/routerconsole/jsp/torrents.jsp +++ b/apps/routerconsole/jsp/torrents.jsp @@ -23,20 +23,19 @@ function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); } function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; } function injectClass(f) { f.contentWindow.document.getElementsByTagName('body')[0].setAttribute('class', 'iframed'); } - function init() { + function setupFrame() { f = document.getElementById("i2psnarkframe"); resizeFrame(f); injectClass(f); - initAjax(); } - + <%@include file="summary.jsi" %>

<%=intl._("I2P Torrent Downloader")%>

-
<%