Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 94f3406d

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 94f3406dd6f85ad4c5ac33d6995c438630c2c028
  • Vorgänger c9f49c18
  • Nachfolger 31359f3e

Einlagern: Nach der Artikelauswahl per Popup automatisch "Erneuern" drücken.

Unterschiede anzeigen:

bin/mozilla/common.pl
127 127
  $order_dir = 1;
128 128
  $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
129 129

  
130
  %options   = map { $_ => 1 } split m/:/, $form->{options};
130
  my %options;
131 131

  
132
  map { $form->{$_} = 1 if ($options{$_}) } qw(no_services no_assemblies);
132
  foreach my $opt (split m/:/, $form->{options}) {
133
    if ($opt =~ /=/) {
134
      my ($key, $value) = split m/=/, $opt, 2;
135
      $options{$key} = $value;
136

  
137
    } else {
138
      $options{$opt} = 1;
139
    }
140
  }
141

  
142
  map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies click_button);
133 143

  
134 144
  $parts = Common->retrieve_parts(\%myconfig, $form, $order_by, $order_dir);
135 145

  
......
156 166
         },
157 167
        @header_sort);
158 168

  
169
  $form->{formname} ||= 'Form';
170

  
159 171
  $form->{title} = $locale->text("Select a part");
160 172
  $form->header();
161 173
  print $form->parse_html_template("generic/part_selection", { "HEADER" => \@header,
js/part_selection.js
33 33
    "input_partnotes="         + escape_more(input_partnotes)   + "&" +
34 34
    "filter="                  + escape_more(filter)            + "&" +
35 35
    "options="                 + escape_more(options)           + "&" +
36
    "formname="                + escape_more(formname)          + "&" +
36 37
    "allow_creation="          + (allow_creation ? "1" : "0")   + "&" +
37 38
    "action_on_part_selected=" + (null == action_on_part_selected ? "" : action_on_part_selected.value);
38 39
  //alert(url);
templates/webpages/generic/part_selection_de.html
9 9
  <input type="hidden" name="allow_creation" value="[% HTML.escape(allow_creation) %]">
10 10
  <input type="hidden" name="action_on_part_selected" value="[% HTML.escape(action_on_part_selected) %]">
11 11
  <input type="hidden" name="filter" value="[% HTML.escape(filter) %]">
12
  <input type="hidden" name="options" value="[% HTML.escape(options) %]">
12 13
  <input type="hidden" name="new_description" value="[% HTML.escape(description) %]">
13 14

  
14 15
  <div class="listtop">[% title %]</div>
......
92 93
        }
93 94
        if (document.Form.action_on_part_selected.value != "") {
94 95
          window.opener.document.getElementsByName("action")[0].value = document.Form.action_on_part_selected.value;
95
          window.opener.document.Form.submit();
96
          window.opener.document.[% formname %].submit();
96 97
        }
97 98

  
98 99

  
......
107 108
          input.value = name;
108 109
        }
109 110

  
111
        [%- IF click_button %]
112
        window.opener.document.[% formname %].[% click_button %].click();
113
        [%- END %]
114

  
110 115
        self.close();
111 116
      }
112 117
      //-->
templates/webpages/generic/part_selection_master.html
9 9
  <input type="hidden" name="allow_creation" value="[% HTML.escape(allow_creation) %]">
10 10
  <input type="hidden" name="action_on_part_selected" value="[% HTML.escape(action_on_part_selected) %]">
11 11
  <input type="hidden" name="filter" value="[% HTML.escape(filter) %]">
12
  <input type="hidden" name="options" value="[% HTML.escape(options) %]">
12 13
  <input type="hidden" name="new_description" value="[% HTML.escape(description) %]">
13 14

  
14 15
  <div class="listtop">[% title %]</div>
......
92 93
        }
93 94
        if (document.Form.action_on_part_selected.value != "") {
94 95
          window.opener.document.getElementsByName("action")[0].value = document.Form.action_on_part_selected.value;
95
          window.opener.document.Form.submit();
96
          window.opener.document.[% formname %].submit();
96 97
        }
97 98

  
98 99

  
......
107 108
          input.value = name;
108 109
        }
109 110

  
111
        [%- IF click_button %]
112
        window.opener.document.[% formname %].[% click_button %].click();
113
        [%- END %]
114

  
110 115
        self.close();
111 116
      }
112 117
      //-->
templates/webpages/wh/warehouse_selection_stock_de.html
96 96
     <th align="right" nowrap>Artikelbeschreibung</th>
97 97
     <td>
98 98
      <input name="description" size="30" value="[% HTML.escape(description) %]">
99
      <input type="button" onclick="part_selection_window('partnumber', 'description', 'parts_id', 0, 'Form', 'no_services:no_assemblies')" value="?">
99
      <input type="button" onclick="part_selection_window('partnumber', 'description', 'parts_id', 0, 'Form', 'no_services:no_assemblies:click_button=update_button')" value="?">
100 100
     </td>
101 101
    </tr>
102 102

  
......
124 124
  </p>
125 125

  
126 126
  <p>
127
   <input type="submit" class="submit" name="action" value="Erneuern">
127
   <input type="submit" class="submit" name="action" id="update_button" value="Erneuern">
128 128
   [%- IF parts_id %]
129 129
   <input type="submit" class="submit" name="action" value="Einlagern">
130 130
   [%- END %]
templates/webpages/wh/warehouse_selection_stock_master.html
96 96
     <th align="right" nowrap><translate>Part Description</translate></th>
97 97
     <td>
98 98
      <input name="description" size="30" value="[% HTML.escape(description) %]">
99
      <input type="button" onclick="part_selection_window('partnumber', 'description', 'parts_id', 0, 'Form', 'no_services:no_assemblies')" value="?">
99
      <input type="button" onclick="part_selection_window('partnumber', 'description', 'parts_id', 0, 'Form', 'no_services:no_assemblies:click_button=update_button')" value="?">
100 100
     </td>
101 101
    </tr>
102 102

  
......
124 124
  </p>
125 125

  
126 126
  <p>
127
   <input type="submit" class="submit" name="action" value="<translate>Update</translate>">
127
   <input type="submit" class="submit" name="action" id="update_button" value="<translate>Update</translate>">
128 128
   [%- IF parts_id %]
129 129
   <input type="submit" class="submit" name="action" value="<translate>Stock</translate>">
130 130
   [%- END %]

Auch abrufbar als: Unified diff