Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1213b27a

Von Hans Peter Schlaepfer vor etwa 5 Jahren hinzugefügt

  • ID 1213b27a2c4abdafd1490186f257a157fdbb4459
  • Vorgänger c641a47a
  • Nachfolger b2978890

Design-4.0: Kosmetik: templates/webpages/wh/..: Einrückung/HTML

Neues kivitendo Design Aenderungen in templates/webpages/wh/..

Unterschiede anzeigen:

templates/webpages/wh/transfer_parts_selection.html
4 4

  
5 5
<h1>[% title %]</h1>
6 6

  
7
 <script type="text/javascript">
8
  <!--
9
      warehouses = new Array();
10
      [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
11
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
      [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
13
      [% END %]
14
      [% END %]
7
<script type="text/javascript"><!--
8
  warehouses = new Array();
9
  [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
10
  [% FOREACH wh = WAREHOUSES_it %]
11
    warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
    [% USE BINS_it = Iterator(wh.BINS) %]
13
    [% FOREACH bin = BINS_it %]
14
      warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
15
    [% END %]
16
  [% END %]
15 17

  
16
      function warehouse_selected(row, index) {
17
        var cname = "dst_bin_id_" + row;
18
        var control = document.getElementById(cname);
18
  function warehouse_selected(row, index) {
19
    var cname = "dst_bin_id_" + row;
20
    var control = document.getElementById(cname);
19 21

  
20
        for (var i = control.options.length - 1; i >= 0; i--) {
21
          control.options[i] = null;
22
        }
22
    for (var i = control.options.length - 1; i >= 0; i--) {
23
      control.options[i] = null;
24
    }
23 25

  
24
        for (i = 0; i < warehouses[index].length; i++) {
25
          control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
26
        }
26
    for (i = 0; i < warehouses[index].length; i++) {
27
      control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
28
    }
27 29

  
28
        control.options[0].selected = true;
29
      }
30
    control.options[0].selected = true;
31
  }
30 32

  
31
      $(function() {
32
        [% FOREACH row = CONTENTS %]
33
        warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
34
        [% END %]
35
      });
36
    -->
37
 </script>
33
  $(function() {
34
    [% FOREACH row = CONTENTS %]
35
    warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
36
    [% END %]
37
  });
38
--></script>
38 39

  
39
 <form method="post" action="wh.pl" id="form">
40
<form method="post" action="wh.pl" id="form">
40 41

  
41
  <input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
42
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
42 43

  
43
  <p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
44
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
44 45

  
45 46
  <p>
46 47
   <table>
47 48
    <tr>
48
     <td>[% 'Select type of transfer' | $T8 %]:</td>
49
     <td>
50
      <select name="transfer_type_id">
51
       [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %]
52
      </select>
53
     </td>
49
      <th>[% 'Select type of transfer' | $T8 %]:</th>
50
      <td>
51
        <select name="transfer_type_id">
52
          [% FOREACH type = TRANSFER_TYPES %]
53
           <option value="[% HTML.escape(type.id) %]">[% type.description %]</option>
54
          [% END %]
55
        </select>
56
      </td>
54 57
    </tr>
55

  
56 58
    <tr>
57
     <td>[% 'Optional comment' | $T8 %]:</td>
58
     <td><input name="comment" size="20"></td>
59
      <th>[% 'Optional comment' | $T8 %]:</th>
60
      <td><input type="text" name="comment" size="20"></td>
59 61
    </tr>
60 62
    <tr>
61
     <td>[% 'Change default bin for this parts' | $T8 %]:</td>
62
    <td><input type="checkbox" name="change_default_bin"<td>
63
      <td>[% 'Change default bin for this parts' | $T8 %]:</th>
64
      <td><input type="checkbox" name="change_default_bin"><td>
63 65
    </tr>
64
   </table>
65
  </p>
66
  </tbody>
67
</table>
66 68

  
67 69
  <p>
68 70
   <table>
......
81 83
    </tr>
82 84

  
83 85
    [% FOREACH row = CONTENTS %]
84
    <tr class="listrow[% loop.count % 2 %]">
85
     <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
86
     <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
87
     <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
88
     <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
89
     <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
90
     [% IF INSTANCE_CONF.get_show_bestbefore %]
91
     <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
92
     [% END %]
93
     <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
94
     <td>[% HTML.escape(row.bindescription) %]</td>
95
     <td>[% HTML.escape(row.partnumber) %]</td>
96
     <td>[% HTML.escape(row.partdescription) %]</td>
97
     <td>[% HTML.escape(row.chargenumber) %]</td>
98
     [% IF INSTANCE_CONF.get_show_bestbefore %]
99
     <td>[% HTML.escape(row.bestbefore) %]</td>
100
     [% END %]
101
     <td>[% HTML.escape(row.ean) %]</td>
102
     <td>[% HTML.escape(row.qty) %]</td>
103
     <td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
104
     <td>
105
      <select name="unit_[% loop.count %]">
106
       [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
107
      </select>
108
     </td>
109

  
110
     <td>
111
      <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
112
       [% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %]
113
      </select>
114
     </td>
115
     <td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td>
116
    </tr>
117

  
86
      <tr>
87
        <td>
88
          <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
89
          <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
90
          <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
91
          <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
92
          <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
93
          [% IF INSTANCE_CONF.get_show_bestbefore %]
94
            <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
95
          [% END %]
96
          <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
97
          [% HTML.escape(row.bindescription) %]
98
        </td>
99
        <td>[% HTML.escape(row.partnumber) %]</td>
100
        <td>[% HTML.escape(row.partdescription) %]</td>
101
        <td>[% HTML.escape(row.chargenumber) %]</td>
102
        [% IF INSTANCE_CONF.get_show_bestbefore %]
103
          <td>[% HTML.escape(row.bestbefore) %]</td>
104
        [% END %]
105
        <td>[% HTML.escape(row.ean) %]</td>
106
        <td>[% HTML.escape(row.qty) %]</td>
107
        <td><input type="text" name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
108
        <td>
109
          <select name="unit_[% loop.count %]">
110
            [% FOREACH unit = row.UNITS %]
111
              <option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
112
            [% END %]
113
          </select>
114
        </td>
115
        <td>
116
          <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
117
            [% FOREACH wh = WAREHOUSES %]
118
              <option value="[% HTML.escape(wh.id) %]" [% if wh.selected %] selected[% end %]>[% HTML.escape(wh.description) %]</option>
119
            [% END %]
120
          </select>
121
        </td>
122
        <td>
123
          <select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select>
124
        </td>
125
      </tr>
118 126
    [% END %]
119 127

  
120
    <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
128
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
121 129

  
122
   </table>
123
  </p>
124
 </form>
130
</form>

Auch abrufbar als: Unified diff