pari: trunk r392 - in /trunk/config: guialert.html scripts/astman.js
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed Feb 28 23:45:11 MST 2007
Author: pari
Date: Thu Mar 1 00:45:10 2007
New Revision: 392
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=392
Log:
the window of an iframe can be accessed by the contentWindow property - so reusing the same iframe for all alerts :)
Modified:
trunk/config/guialert.html
trunk/config/scripts/astman.js
Modified: trunk/config/guialert.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/guialert.html?view=diff&rev=392&r1=391&r2=392
==============================================================================
--- trunk/config/guialert.html (original)
+++ trunk/config/guialert.html Thu Mar 1 00:45:10 2007
@@ -10,7 +10,8 @@
}
function close_guialert( ){
- top.document.body.removeChild( top.document.getElementById( top.alertframename ) );
+ //top.document.body.removeChild( top.document.getElementById( top.alertframename ) );
+ top.document.getElementById( top.alertframename ).style.display = "none";
}
</script>
<head>
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=392&r1=391&r2=392
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu Mar 1 00:45:10 2007
@@ -38,7 +38,8 @@
top.alertframename = "alertiframe";
top.alertmsg = msg ;
top.alertmsgtype = msgtype ;
- var h= top.document.createElement("IFRAME");
+ if( !top.document.getElementById(top.alertframename)){
+ var h= top.document.createElement("IFRAME");
h.setAttribute("id", top.alertframename );
h.setAttribute("ALLOWTRANSPARENCY", "true");
h.style.position="absolute";
@@ -53,6 +54,10 @@
h.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90)';
//h.style.MozOpacity = .90;
top.document.body.appendChild(h);
+ }else{
+ top.document.getElementById( top.alertframename ).contentWindow.update( );
+ top.document.getElementById( top.alertframename ).style.display = "";
+ }
}
More information about the asterisk-gui-commits
mailing list