From: Moritz Bunkus Date: Fri, 28 Jun 2013 07:34:50 +0000 (+0200) Subject: $::request->layout->focus() größtenteils durch class="initial_focus" ersetzen X-Git-Tag: release-3.1.0beta1~252^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8abd9ce32e946691e0953f9a8e2c183183d7854e;p=kivitendo-erp.git $::request->layout->focus() größtenteils durch class="initial_focus" ersetzen --- diff --git a/SL/Controller/CustomVariableConfig.pm b/SL/Controller/CustomVariableConfig.pm index d87b8ac92..b366ffbf2 100644 --- a/SL/Controller/CustomVariableConfig.pm +++ b/SL/Controller/CustomVariableConfig.pm @@ -64,7 +64,6 @@ sub show_form { split m/;/, ($self->config->flags || '') ]); - $::request->layout->focus('#config_name'); $self->render('custom_variable_config/form', %params); } diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm index 8c431ca3e..a06686af2 100644 --- a/SL/Controller/LoginScreen.pm +++ b/SL/Controller/LoginScreen.pm @@ -183,7 +183,6 @@ sub init_default_client_id { sub show_login_form { my ($self, %params) = @_; - $::request->layout->focus('#auth_login'); $self->render('login_screen/user_login', %params); } diff --git a/SL/Controller/Project.pm b/SL/Controller/Project.pm index 46a8c591e..d152d6a01 100644 --- a/SL/Controller/Project.pm +++ b/SL/Controller/Project.pm @@ -149,8 +149,6 @@ sub display_form { $params{CUSTOM_VARIABLES} = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id); CVar->render_inputs(variables => $params{CUSTOM_VARIABLES}) if @{ $params{CUSTOM_VARIABLES} }; - $::request->{layout}->focus('#projectnumber'); - $self->render('project/form', %params); } diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index ad6248f3d..c918770b0 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -1558,7 +1558,6 @@ sub add_price_factor { $form->{title} = $locale->text('Add Price Factor'); $form->{callback} ||= build_std_url('action=add_price_factor'); - $::request->{layout}->focus('#description'); $form->header(); print $form->parse_html_template('am/edit_price_factor'); @@ -1577,7 +1576,6 @@ sub edit_price_factor { $form->{title} = $locale->text('Edit Price Factor'); $form->{callback} ||= build_std_url('action=add_price_factor'); - $::request->{layout}->focus('#description'); AM->get_price_factor(\%myconfig, $form); @@ -1665,7 +1663,6 @@ sub add_warehouse { $form->{title} = $locale->text('Add Warehouse'); $form->{callback} ||= build_std_url('action=add_warehouse'); - $::request->{layout}->focus('#description'); $form->header(); print $form->parse_html_template('am/edit_warehouse'); @@ -1688,7 +1685,6 @@ sub edit_warehouse { $form->{title} = $locale->text('Edit Warehouse'); $form->{callback} ||= build_std_url('action=list_warehouses'); - $::request->{layout}->focus('#description'); $form->header(); print $form->parse_html_template('am/edit_warehouse'); diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 6d7e399c9..f8c6972e6 100644 --- a/bin/mozilla/amtemplates.pl +++ b/bin/mozilla/amtemplates.pl @@ -275,10 +275,7 @@ sub display_template_form { $options{"CAN_EDIT"} = $form->{"edit"}; - if ($form->{edit}) { - $::request->{layout}->focus("#edit_content"); - - } else { + if (!$form->{edit}) { $options{"content"} = "\n\n" if (!$options{"content"}); $options{"SHOW_SECOND_EDIT_BUTTON"} = $options{"lines"} > 25; } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index e566ea6f7..ffd94d2b9 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -807,7 +807,6 @@ sub search { $form->all_vc(\%myconfig, "vendor", "AP"); $form->{title} = $locale->text('AP Transactions'); - $::request->{layout}->focus('#vendor'); $form->{jsscript} = 1; $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e1b10f63c..c079b4e75 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -315,8 +315,6 @@ sub form_header { $taxcharts{$item->{id}} = $item; } - $::request->{layout}->focus("#customer"); - my $follow_up_vc = $form->{customer}; $follow_up_vc =~ s/--.*?//; my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 797ee393e..2cc187ee0 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -103,7 +103,6 @@ sub search { $form->{jsscript} = 1; $form->{title} = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors'); - $::request->{layout}->focus('#name'); $form->header(); print $form->parse_html_template('ct/search'); @@ -174,7 +173,7 @@ sub list_names { my @columns = ( 'id', 'name', "$form->{db}number", 'contact', 'phone', 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', - 'business', 'invnumber', 'ordnumber', 'quonumber', 'salesman', 'country' + 'business', 'invnumber', 'ordnumber', 'quonumber', 'salesman', 'country' ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -477,7 +476,6 @@ sub form_header { $form->{taxzone_id} = 0 if !$form->{id}; $form->{jsscript} = 1; $form->{SHIPTO_ALL} = [ +{ shipto_id => '0', shiptoname => $::locale->text('All') }, @{ $form->{SHIPTO} } ]; - $::request->{layout}->focus("#greeting"); $form->{title} = $form->{title_save} || $locale->text("$form->{title} " . ucfirst $form->{db}) . ($form->{title} eq "Edit" ? " $form->{name}" : ''); diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index e9df30944..79c5c57e2 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -106,7 +106,6 @@ sub add { $form->{title} = $locale->text('Start Dunning Process'); $form->{jsscript} = 1; - $::request->{layout}->focus('#customer'); $form->header(); print $form->parse_html_template("dunning/add"); @@ -310,7 +309,6 @@ sub search { $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); - $::request->{layout}->focus('#customer'); $form->header(); diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 837b842b4..feb5ba02d 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1618,8 +1618,6 @@ sub form_header { $form->{defaults} = AM->get_defaults(); - $::request->{layout}->focus("#partnumber"); - $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id}); CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}, show_disabled_message => 1) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index e67bbbb2b..e7ba050a1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -996,7 +996,6 @@ sub edit_e_mail { my $attachment_filename = $form->generate_attachment_filename(); my $subject = $form->{subject} || $form->generate_email_subject(); - $::request->{layout}->focus($form->{"email"} ? "#subject" : "#email"); $form->header; my (@dont_hide_key_list, %dont_hide_key, @hidden_keys); diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index b226bb011..b14ee0df0 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -329,8 +329,6 @@ sub form_header { $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}; $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/; - $::request->{layout}->focus('#vendor'); - my $follow_up_vc = $form->{vendor}; $follow_up_vc =~ s/--\d*\s*$//; $TMPL_VAR{vendor_name} = $follow_up_vc; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 220c993aa..e9ea9f003 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -353,8 +353,6 @@ sub form_header { $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}; $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/; - $::request->{layout}->focus('#customer'); - my $follow_up_vc = $form->{customer}; $follow_up_vc =~ s/--\d*\s*$//; $TMPL_VAR{customer_name} = $follow_up_vc; diff --git a/templates/webpages/am/edit_price_factor.html b/templates/webpages/am/edit_price_factor.html index dc00c7c6c..a2191300b 100644 --- a/templates/webpages/am/edit_price_factor.html +++ b/templates/webpages/am/edit_price_factor.html @@ -11,7 +11,7 @@ - + @@ -31,4 +31,3 @@ [% IF id %][% IF orphaned %][% END %][% END %]

- diff --git a/templates/webpages/am/edit_templates.html b/templates/webpages/am/edit_templates.html index 220b9ecb6..9d7420c13 100644 --- a/templates/webpages/am/edit_templates.html +++ b/templates/webpages/am/edit_templates.html @@ -53,7 +53,7 @@

[% IF CAN_EDIT %] -

+

@@ -78,4 +78,3 @@ [% END %] - diff --git a/templates/webpages/am/edit_warehouse.html b/templates/webpages/am/edit_warehouse.html index 2208de527..9da65b81c 100644 --- a/templates/webpages/am/edit_warehouse.html +++ b/templates/webpages/am/edit_warehouse.html @@ -17,7 +17,7 @@

@@ -106,4 +106,3 @@ [% END %] [% END %] - diff --git a/templates/webpages/ap/search.html b/templates/webpages/ap/search.html index 99898a6ea..9932cdd1f 100644 --- a/templates/webpages/ap/search.html +++ b/templates/webpages/ap/search.html @@ -17,6 +17,7 @@ name = 'vendor', default = oldvendor, style = 'width: 250px', + class = 'initial_focus', DATA = ALL_VC, id_sub = 'vc_keys', label_key = 'name', diff --git a/templates/webpages/ar/form_header.html b/templates/webpages/ar/form_header.html index 8d470faf4..af9262ddb 100644 --- a/templates/webpages/ar/form_header.html +++ b/templates/webpages/ar/form_header.html @@ -39,9 +39,9 @@ [% L.hidden_tag('selectcustomer', selectcustomer) %] diff --git a/templates/webpages/ct/form_header.html b/templates/webpages/ct/form_header.html index ff2d36b90..294cf4769 100644 --- a/templates/webpages/ct/form_header.html +++ b/templates/webpages/ct/form_header.html @@ -80,7 +80,7 @@ - + @@ -174,4 +174,3 @@ - diff --git a/templates/webpages/custom_variable_config/form.html b/templates/webpages/custom_variable_config/form.html index f29a3d850..2703cdc1d 100644 --- a/templates/webpages/custom_variable_config/form.html +++ b/templates/webpages/custom_variable_config/form.html @@ -12,7 +12,7 @@ - + diff --git a/templates/webpages/dunning/add.html b/templates/webpages/dunning/add.html index c58651e42..7648bf205 100644 --- a/templates/webpages/dunning/add.html +++ b/templates/webpages/dunning/add.html @@ -9,12 +9,12 @@ @@ -81,5 +81,3 @@ - - diff --git a/templates/webpages/dunning/search.html b/templates/webpages/dunning/search.html index 18737886c..f27c2fe1e 100644 --- a/templates/webpages/dunning/search.html +++ b/templates/webpages/dunning/search.html @@ -16,13 +16,13 @@ @@ -120,4 +120,3 @@ - diff --git a/templates/webpages/generic/edit_email.html b/templates/webpages/generic/edit_email.html index b8303a0cc..b31fde030 100644 --- a/templates/webpages/generic/edit_email.html +++ b/templates/webpages/generic/edit_email.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[%- USE HTML %] +[%- USE HTML %][%- USE L -%]
[% 'Description' | $T8 %]
[% 'Description' | $T8 %] - +
[% 'Customer' | $T8 %] [%- IF selectcustomer %] - + [%- ELSE %] - + [%- END %]
[% 'Greeting' | $T8 %] -   +   [%- INCLUDE generic/multibox.html name = 'selected_company_greeting', DATA = MB_COMPANY_GREETINGS, diff --git a/templates/webpages/ct/search.html b/templates/webpages/ct/search.html index 9d3f696aa..617925e9d 100644 --- a/templates/webpages/ct/search.html +++ b/templates/webpages/ct/search.html @@ -15,7 +15,7 @@
[% IF IS_CUSTOMER %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]
[% 'Variable Name' | $T8 %](1)[%- L.input_tag("config.name", SELF.config.name) %][%- L.input_tag("config.name", SELF.config.name, class='initial_focus') %]
[% 'Customer' | $T8 %] [% IF SHOW_CUSTOMER_SELECTION %] - [% FOREACH row = all_customer %][% END %] [% ELSE %] - + [% END %]
[% 'Customer' | $T8 %] [% IF SHOW_CUSTOMER_DDBOX %] - [% FOREACH row = ALL_CUSTOMERS %] [% END %] [% ELSE %] - + [% END %]
@@ -14,7 +14,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -70,4 +70,3 @@
- diff --git a/templates/webpages/ic/form_header.html b/templates/webpages/ic/form_header.html index 658979a81..23a793316 100644 --- a/templates/webpages/ic/form_header.html +++ b/templates/webpages/ic/form_header.html @@ -51,7 +51,7 @@
[% 'To' | $T8 %][% L.input_tag('email', email, size=30, class=(email ? '' : 'initial_focus')) %]
[% 'Cc' | $T8 %]
[% 'Subject' | $T8 %][% L.input_tag('subject', subject, size=30, class=(email ? 'initial_focus' : '')) %]
[% 'Attachment name' | $T8 %]
- + diff --git a/templates/webpages/ir/form_header.html b/templates/webpages/ir/form_header.html index 8c849fdd7..10739b6ea 100644 --- a/templates/webpages/ir/form_header.html +++ b/templates/webpages/ir/form_header.html @@ -48,6 +48,7 @@ id = 'vendor', name = 'vendor', style = 'width: 250px', + class = 'initial_focus', DATA = ALL_VENDORS, id_sub = 'vc_keys', label_key = 'name', diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index 7aa2732bd..89aa3fc4f 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -49,6 +49,7 @@ id = 'customer', name = 'customer', style = 'width: 250px', + class = 'initial_focus', DATA = ALL_CUSTOMERS, id_sub = 'vc_keys', label_key = 'name', diff --git a/templates/webpages/login_screen/user_login.html b/templates/webpages/login_screen/user_login.html index 75eb399ec..671724b3d 100644 --- a/templates/webpages/login_screen/user_login.html +++ b/templates/webpages/login_screen/user_login.html @@ -29,7 +29,7 @@
[% 'Part Number' | $T8 %]
[% 'Part Description' | $T8 %]
- + diff --git a/templates/webpages/project/form.html b/templates/webpages/project/form.html index 5b2594cdb..f046132f5 100644 --- a/templates/webpages/project/form.html +++ b/templates/webpages/project/form.html @@ -26,7 +26,7 @@
[% 'Login Name' | $T8 %][% L.input_tag('{AUTH}login', '', id='auth_login', style=style) %][% L.input_tag('{AUTH}login', '', id='auth_login', style=style, class='initial_focus') %]
[% 'Password' | $T8 %]
- +
[% 'Number' | $T8 %][% L.input_tag("project.projectnumber", SELF.project.projectnumber, size=60) %][% L.input_tag("project.projectnumber", SELF.project.projectnumber, size=60, class='initial_focus') %]