PacketFence - BTS - PacketFence
View Issue Details
0000380PacketFencepublic2008-09-10 16:102008-09-10 16:24
user4 
user4 
normalfeaturealways
closedfixed 
 
 
0000380: replace javascript popup on release page with DHTML
replace javascript popup on release page with DHTML
No tags attached.
Issue History
2008-09-10 16:10user4New Issue
2008-09-10 16:10user4Statusnew => assigned
2008-09-10 16:10user4Assigned To => user4
2008-09-10 16:23user4Note Added: 0000791
2008-09-10 16:24user4Statusassigned => closed
2008-09-10 16:24user4Note Added: 0000792
2008-09-10 16:24user4Resolutionopen => fixed

Notes
(0000791)
user4   
2008-09-10 16:23   
============================================================
--- pf/html/user/content/templates/release.html 34728378d20da363ab27ac13a2ef4ad33e05934b
+++ pf/html/user/content/templates/release.html 9c73d9a0bd44ff52ec5b9bdcedb63813d03435ce
@@ -4,12 +4,7 @@ var waitTime=[% timer %];
 <script language="javascript">
 var destination_url="[% destination_url %]";
 var waitTime=[% timer %];
-var action = function()
-{
- hidebar();
- [% js_action %]
- top.location.href=destination_url;
-}
+[% js_action %]
 </script>
 <title>[% txt_page_title %]</title>
 </head>
@@ -35,7 +30,7 @@ var action = function()
     </tr>
     <tr>
       <td align="center">
- <p align="center"><font face="Arial">
+ <p align="center" id="toReplace"><font face="Arial">
           [% txt_message %]
         </font>


       </td>
============================================================
--- pf/lib/pf/web.pm 9298af7cdf512a50dc5927fe65142e86cd42f1e2
+++ pf/lib/pf/web.pm 05923d47cb11df30588f225b9cd3140ae3ef3163
@@ -49,7 +49,20 @@ sub generate_release_page {
     txt_enabling => gettext("Enabling ..."),
   };
   if (isenabled($Config{'network'}{'vlan'})) {
- $vars->{js_action} = "window.alert('" . gettext("release: reopen browser") . "');";
+ $vars->{js_action} = "var action = function()
+{
+ hidebar();
+ var toReplace=document.getElementById('toReplace');
+ toReplace.innerHTML = '<font face=\"Arial\">" . gettext("release: reopen browser") . "</font>';
+}";
+ } else {
+ $vars->{js_action} = <<EOT;
+var action = function()
+{
+ hidebar();
+ top.location.href=destination_url;
+}
+EOT
   }
   if (-r "$install_dir/conf/templates/release.pl") {
     open INCLUDE, "<$install_dir/conf/templates/release.pl";
(0000792)
user4   
2008-09-10 16:24   
fixed in mtn revision 41bf8a69f865c7113382bed5a7821587620c7ed2