Update of /cvsroot/lastbash/lastbash/html
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16928
Modified Files:
lastbash.html
Log Message:
Detect if the window is a popup and write specific code.
Index: lastbash.html
===================================================================
RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- lastbash.html 5 Feb 2007 10:29:03 -0000 1.5
+++ lastbash.html 5 Feb 2007 12:25:07 -0000 1.6
@@ -91,7 +91,37 @@
padding: 0 10px;
margin: 0;
}
+
+ table td#winbutton {
+ text-align: right;
+ padding: 2px;
+ }
+
+ table td#winbutton a {
+ padding: 1px 10px;
+ border: solid 1px #e0e0d0;
+ }
+ table td#winbutton a:hover {
+ background-color: #e0e0d0;
+ }
</style>
+ <script language="JavaScript">
+ <!--
+ function new_lastbash_window() {
+ winLastBash = window.open(''+self.location, 'LastBash', 'width=520,height=190,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
+ return false
+ }
+ function write_button() {
+ if (self.name == "LastBash") {
+ content = "<a href=\"javascript:eval(\'self.close();\')\">Close</a>";
+ }
+ else {
+ content = "<a href=\"javascript:eval(\'new_lastbash_window(); self.refresh();\')\">New window</a>";
+ }
+ document.write(content);
+ }
+ //-->
+ </script>
</head>
<body>
<table>
@@ -123,7 +153,9 @@
</tr>
<tr>
<td class="label"> </td>
- <td class="data" align="right"><a href="" onclick="window.open(''+self.location,'lastbash_window','width=520,height=190,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no'); return false;">[ New window ]</a></td>
+ <td class="data" id="winbutton">
+ <script language="JavaScript">write_button();</script>
+ </td>
</tr>
</table>
</body>
|