Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b92bc207

Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt

  • ID b92bc20759a4ef39eb106fc80fa6aaedde4df02d
  • Vorgänger aacd6696
  • Nachfolger 1ccc89c8

calculate_qty (Formel): alu (?) und andere unbenutzte Parameter entfernt

Unterschiede anzeigen:

bin/mozilla/io.pl
319 319
    my $qty_dec = ($form->{"qty_$i"} =~ /\.(\d+)/) ? length $1 : 2;
320 320

  
321 321
    $column_data{qty}  = $cgi->textfield(-name => "qty_$i", -size => 5, -class => "numeric", -value => $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec));
322
    $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)", -value => $locale->text('*/'))
323
                       . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"}) . $cgi->hidden("-name" => "alu_$i", "-value" => $form->{"alu_$i"})
322
    $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i', 'formel_$i')", -value => $locale->text('*/'))
323
                       . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"})
324 324
      if $form->{"formel_$i"};
325 325

  
326 326
    $column_data{ship} = '';
js/calculate_qty.js
1
function calculate_qty_selection_window(input_name, alu, formel, row) {
1
function calculate_qty_selection_window(input_name, formel) {
2 2
  var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
3
  var name = document.getElementsByName(input_name)[0].value;
4
  if (document.getElementsByName(alu)[0].value == "1") {
5
    var action = "calculate_alu";
6
    var qty = document.getElementsByName("qty_" + row)[0].value;
7
    var description = document.getElementsByName("description_" + row)[0].value;
8
  }  else var action = "calculate_qty";
3
  var action = "calculate_qty";
9 4
  url = "common.pl?" +
10 5
    "INPUT_ENCODING=UTF-8&" +
11 6
    "action=" + action + "&" +
12
    "name=" + encodeURIComponent(name) + "&" +
13 7
    "input_name=" + encodeURIComponent(input_name) + "&" +
14
    "description=" + encodeURIComponent(description) + "&" +
15
    "qty=" + encodeURIComponent(qty) + "&" +
16
    "row=" + encodeURIComponent(row) + "&" +
17 8
   "formel=" + encodeURIComponent(document.getElementsByName(formel)[0].value)
18 9
  //alert(url);
19 10
  window.open(url, "_new_generic", parm);
templates/webpages/generic/calculate_qty.html
5 5
 <form name="Form">
6 6

  
7 7
  <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
8
  <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
9 8

  
10 9
  <table width="100%">
11 10
   <tr><td>[% 'Please insert object dimensions below.' | $T8 %]</td></tr>
......
82 81
     return arr_int[0] + sep + arr_int[1];
83 82
   }
84 83
 </script>
85

  

Auch abrufbar als: Unified diff