[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5475] trunk/bin



Revision: 5475
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5475&view=rev
Author:   einhverfr
Date:     2013-01-04 10:46:11 +0000 (Fri, 04 Jan 2013)
Log Message:
-----------
Fixing javascript for Firefox

Modified Paths:
--------------
    trunk/bin/ir.pl
    trunk/bin/is.pl
    trunk/bin/oe.pl

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2013-01-04 10:26:40 UTC (rev 5474)
+++ trunk/bin/ir.pl	2013-01-04 10:46:11 UTC (rev 5475)
@@ -439,15 +439,19 @@
 <body onLoad="document.forms[0].${focus}.focus()" />
 | . $form->open_status_div . qq|
 <script> 
-function on_return_submit(){
-    if (window.event.keyCode == 13){
-        document.forms[0].submit()
-    }
+function on_return_submit(event){
+  var kc;
+  if (window.event){
+    kc = window.event.keyCode;
+  } else {
+    kc = event.which;
+  }
+  if (kc == '13'){
+        document.forms[0].submit();
+  }
 }
 </script>
-<form method=post action="$form->{script}" onkeypress="on_return_submit()">
-
-<form method=post action="$form->{script}">
+<form method=post action="$form->{script}" onkeypress="on_return_submit(event)">
 |;
     if ($form->{notice}){
          print qq|$form->{notice}<br/>|;

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2013-01-04 10:26:40 UTC (rev 5474)
+++ trunk/bin/is.pl	2013-01-04 10:46:11 UTC (rev 5475)
@@ -442,13 +442,19 @@
 <body onLoad="document.forms[0].${focus}.focus()" /> 
 | . $form->open_status_div . qq|
 <script> 
-function on_return_submit(){
-    if (window.event.keyCode == 13){
-        document.forms[0].submit()
-    }
+function on_return_submit(event){
+  var kc;
+  if (window.event){
+    kc = window.event.keyCode;
+  } else {
+    kc = event.which;
+  }
+  if (kc == '13'){
+        document.forms[0].submit();
+  }
 }
 </script>
-<form method=post action="$form->{script}" onkeypress="on_return_submit()">
+<form method=post action="$form->{script}" onkeypress="on_return_submit(event)">
 |;
 
     $form->hide_form(

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2013-01-04 10:26:40 UTC (rev 5474)
+++ trunk/bin/oe.pl	2013-01-04 10:46:11 UTC (rev 5475)
@@ -591,15 +591,20 @@
 <body onLoad="document.forms[0].${focus}.focus()" />
 | . $form->open_status_div . qq|
 <script> 
-function on_return_submit(){
-    if (window.event.keyCode == 13){
-        document.forms[0].submit()
-    }
+function on_return_submit(event){
+  var kc;
+  if (window.event){
+    kc = window.event.keyCode;
+  } else {
+    kc = event.which;
+  }
+  if (kc == '13'){
+        document.forms[0].submit();
+  }
 }
 </script>
-<form method=post action="$form->{script}" onkeypress="on_return_submit()">
+<form method=post action="$form->{script}" onkeypress="on_return_submit(event)">
 
-<form method=post action="$form->{script}">
 |;
 
     if ($form->{notice}){

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.