use SL::DB::Manager::AuthUser;
use SL::DB::Helper::Util;
-use constant CONFIG_VARS => qw(copies countrycode dateformat timeformat default_media default_printer_id email favorites fax hide_cvar_search_options mandatory_departments menustyle name
- numberformat show_form_details signature stylesheet taxincluded_checked tel template_format vclimit);
+use constant CONFIG_VARS => qw(copies countrycode dateformat timeformat default_media default_printer_id
+ email favorites fax hide_cvar_search_options mandatory_departments menustyle name
+ numberformat show_form_details signature stylesheet taxincluded_checked tel
+ template_format vclimit focus_position);
__PACKAGE__->meta->add_relationship(
groups => {
'First 20 Lines' => 'Nur erste 20 Datensätze',
'Fix transaction' => 'Buchung korrigieren',
'Fix transactions' => 'Buchungen korrigieren',
+ 'Focus position after update' => 'Kursor-Position nach Erneuern',
'Folgekonto' => 'Folgekonto',
'Follow-Up' => 'Wiedervorlage',
'Follow-Up Date' => 'Wiedervorlagedatum',
'Last modification' => 'Letzte Änderung',
'Last opening balance or all transactions' => 'Letzte Eröffnungsbuchung oder alle Buchungen',
'Last opening balance or start of year' => 'Letzte Eröffnungsbuchung oder Jahresanfang',
+ 'Last row, description' => 'Letzte Zeile, Artikelbeschreibung',
+ 'Last row, partnumber' => 'Letzte Zeile, Nummer',
'Last run at' => 'Letzte Ausführung um',
'Lastcost' => 'Einkaufspreis',
'Lastcost (with X being a number)' => 'Einkaufspreis (X ist eine fortlaufende Zahl)',
'New invoice' => 'Neue Rechnung',
'New name' => 'Neuer Name',
'New part' => 'Neue Ware',
+ 'New row, description' => 'Neue Zeile, Artikelbeschreibung',
+ 'New row, partnumber' => 'Neue Zeile, Nummer',
'New sales order' => 'Neuer Auftrag',
'New service' => 'Neue Dienstleistung',
'New shipto' => 'Neue Lieferadresse',
<th align="right">[% 'E-mail' | $T8 %]</th>
<td><input name="email" size="30" value="[% HTML.escape(myconfig_email) %]"></td>
</tr>
-
+
<tr valign="top">
<th align="right">[% 'Signature' | $T8 %]</th>
<td><textarea id="signature" name="signature" class="toggletextarea" rows="5" cols="50">[% HTML.escape(myconfig_signature) %] </textarea>
- <span id="full_signature" class="toggletextarea"> <textarea readonly name="full_signature" rows="10" cols="50" >[% HTML.escape(full_signature) %]</textarea> </span>
+ <span id="full_signature" class="toggletextarea"> <textarea readonly name="full_signature" rows="10" cols="50" >[% HTML.escape(full_signature) %]</textarea> </span>
<a href="#" class="togglelink">[% 'Check full signature' | $T8 %]</a>
<a href="#" id="edit_signature" class="togglelink">[% 'Edit user signature' | $T8 %]</a>
</td> </tr>
</td>
</tr>
+ <tr>
+ <th align="right">[% 'Focus position after update' | $T8 %]</th>
+ <td>
+ [% L.select_tag(
+ 'focus_position',
+ [
+ ['new_description', LxERP.t8('New row, description')],
+ ['new_partnumber', LxERP.t8('New row, partnumber')],
+ ['last_description', LxERP.t8('Last row, description')],
+ ['last_partnumber', LxERP.t8('Last row, partnumber')],
+ ],
+ default => myconfig_focus_position)
+ %]
+ </td>
+ </tr>
+
</table>
</div>
</form>
<script type="text/javascript">
- <!--
+ <!--
$(function() {
$("#full_signature").toggle();
$("#edit_signature").toggle();
[%- USE T8 %]
[%- USE HTML %]
+
[%- PROCESS 'amcvar/render_inputs_block.html' %]
<tr>
<td>
[%- END %]
</tr>
[%- FOREACH row = ROWS %]
- <tr valign="top" class="[% IF row.error %]error_message[% ELSE %]listrow[% loop.count % 2 %][% END %]">
+ <tr valign="top" class="row [% IF row.error %]error_message[% ELSE %]listrow[% loop.count % 2 %][% END %]">
[%- FOREACH row1 = row.ROW1 %]
<td[% IF row1.align %] align="[% row1.align %]"[% END %][% IF row1.nowrap %] nowrap[% END %]>[% row1.value %]</td>
[%- END %]
[%- END %]
</table>
- </td>
-</tr>
-<tr style='display:none'>
- <td>
-<script type='text/javascript'>
- $(document).ready( function(){ $('#display_row tr:gt(1) input[name*="description"]').focus() });
-</script>
+
+ <script type='text/javascript'>
+ $(function() {
+ setTimeout(function(){
+ [% SWITCH( myconfig_focus_position ) %]
+ [% CASE 'last_partnumber' %]
+ $('#display_row tr.row:gt(-3):lt(-1) input[name*="partnumber"]').focus();
+ [% CASE 'last_description' %]
+ $('#display_row tr.row:gt(-3):lt(-1) input[name*="description"]').focus();
+ [% CASE 'new_partnumber' %]
+ $('#display_row tr:gt(1) input[name*="partnumber"]').focus();
+ [% CASE DEFAULT %]
+ $('#display_row tr:gt(1) input[name*="description"]').focus();
+ [% END %]
+ }, 1);
+ });
+ </script>
+
</td>
</tr>