[freeside-commits] freeside/httemplate/edit/elements ApplicationCommon.html, 1.4, 1.5

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Nov 17 12:56:34 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv11185

Modified Files:
	ApplicationCommon.html 
Log Message:
work around ie7 javascript issues

Index: ApplicationCommon.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/ApplicationCommon.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ApplicationCommon.html	28 Oct 2009 19:01:18 -0000	1.4
+++ ApplicationCommon.html	17 Nov 2009 20:56:32 -0000	1.5
@@ -283,6 +283,7 @@
   var amount_cell = document.getElementById('original_amount');
   var inputs = amount_cell.getElementsByTagName('input');
   if (inputs.length) {
+    src_amount_changed();
     amount_cell.innerHTML = '<B><% $money_char %></B>' + inputs.item(0).value;
   } else {
     amount_cell.innerHTML = '<% $money_char %>';
@@ -298,11 +299,16 @@
   }
 }
 
-function src_amount_changed (what) {
-  what.form.src_amount.value = what.value;
-  var unapplied_cell = document.getElementById('unapplied_amount');
-  unapplied_cell.innerHTML = '<B><% $money_char %>' + what.value + '</B>';
-  set_amount_color(what);
+function src_amount_changed () {
+  //alert('src_amount_changed called');
+  var entered_amount = document.getElementById('entered_amount');
+  if ( entered_amount ) {
+    entered_amount.form.src_amount.value = entered_amount.value;
+    var unapplied_cell = document.getElementById('unapplied_amount');
+    unapplied_cell.innerHTML = '<B><% $money_char %>' + entered_amount.value + '</B>';
+    set_amount_color(entered_amount);
+  }
+  return true;
 }
 
 </SCRIPT>
@@ -335,7 +341,15 @@
 </TABLE>
 
 <BR>
-<CENTER><INPUT TYPE="submit" VALUE="Apply" NAME="submit" ID="submit" DISABLED></CENTER>
+<CENTER><INPUT TYPE="submit"
+               VALUE="Apply"
+               NAME="submit"
+               ID="submit"
+% if ($use_sub_dst_thing && $can_change_credit) {
+               onClick="src_amount_changed()"
+% }
+               DISABLED
+></CENTER>
 
 </FORM>
 



More information about the freeside-commits mailing list