From: Sven Schöling Date: Fri, 21 Sep 2012 14:19:27 +0000 (+0200) Subject: popups ohne layout rendern X-Git-Tag: release-3.0.0beta1~140 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ddb162b67dbd1c97df9a6f60608dd7cd0ff6f811;p=kivitendo-erp.git popups ohne layout rendern --- diff --git a/SL/Form.pm b/SL/Form.pm index 514c282d2..591e02df3 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -454,10 +454,14 @@ sub header { my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET; my @header; - my $layout = $::request->{layout}; - $::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++; + if ($params{no_layout}) { + $::request->{layout} = SL::Controller::Layout->new(style => 'none'); + } + + my $layout = $::request->{layout}; + # standard css for all $layout->use_stylesheet("$_.css") for qw( main menu tabcontent list_accounts jquery.autocomplete diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 2bf801787..e31f322b6 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -410,8 +410,6 @@ sub form_header { $form->header; print qq| - -
{script}> {id}> diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 3cb850d98..59c2f9481 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -196,7 +196,7 @@ sub part_selection_internal { $form->{formname} ||= 'Form'; $form->{title} = $locale->text("Select a part"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/part_selection", { "HEADER" => \@header, "PARTS" => $parts, }); @@ -244,7 +244,7 @@ sub delivery_customer_selection { @header_sort); $form->{"title"} = $locale->text("Select a Customer"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/select_delivery_customer", { "HEADER" => \@header, "DELIVERY" => $delivery, }); @@ -292,7 +292,7 @@ sub vendor_selection { @header_sort); $form->{"title"} = $locale->text("Select a Customer"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/select_vendor", { "HEADER" => \@header, "VENDOR" => $vendor, }); @@ -334,7 +334,7 @@ sub calculate_qty { $form->{formel} = $formel; $form->{title} = $locale->text("Please enter values"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/calculate_qty", { "HEADER" => \@header, "VARIABLES" => \@variable, }); @@ -350,7 +350,7 @@ sub set_longdescription { my $locale = $main::locale; $form->{title} = $locale->text("Enter longdescription"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/set_longdescription"); $main::lxdebug->leave_sub(); @@ -399,12 +399,12 @@ sub show_history { $sort =~ s/.*\.(.*)/$1/; $form->{title} = $locale->text("History"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template( "common/show_history", { "DATEN" => $form->get_history($dbh,$form->{input_name},"",$form->{order}), "SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0"), uc($sort) => 1, - uc($sort)."BY" => $sortby + uc($sort)."BY" => $sortby, } ); $dbh->disconnect(); @@ -458,7 +458,7 @@ sub show_vc_details { $form->{title} = $form->{vc} eq "customer" ? $locale->text("Customer details") : $locale->text("Vendor details"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("common/show_vc_details", { "is_customer" => $form->{vc} eq "customer" }); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index ea2c3d40a..378e5a17c 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -283,7 +283,7 @@ sub set_email { $main::auth->assert('dunning_edit'); $form->{"title"} = $locale->text("Set eMail text"); - $form->header(); + $form->header(no_layout => 1); print($form->parse_html_template("dunning/set_email")); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 071a7a4c2..b58cd7190 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -1150,7 +1150,7 @@ sub display_stock_in_form { get_basic_bin_wh_info($stock_info); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template('do/stock_in_form', { 'UNITS' => $units_data, 'STOCK_INFO' => $stock_info, 'PART_INFO' => $part_info, }); @@ -1244,7 +1244,7 @@ sub stock_out_form { } } - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template('do/stock_out_form', { 'UNITS' => $units_data, 'WHCONTENTS' => $form->{delivered} ? $stock_info : \@contents, 'PART_INFO' => $part_info, }); diff --git a/bin/mozilla/fu.pl b/bin/mozilla/fu.pl index b2e603780..3b5adb230 100644 --- a/bin/mozilla/fu.pl +++ b/bin/mozilla/fu.pl @@ -93,7 +93,7 @@ sub display_form { $form->{jsscript} = 1; - $form->header(); + $form->header(no_layout => $::form->{POPUP_MODE}); print $form->parse_html_template('fu/add_edit'); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 41b9da9b7..0bcb897bf 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1999,7 +1999,7 @@ sub edit_periodic_invoices_config { $::form->{AR} = [ grep { $_->{link} =~ m/(?:^|:)AR(?::|$)/ } @{ $::form->{ALL_CHARTS} } ]; $::form->{title} = $::locale->text('Edit the configuration for periodic invoices'); - $::form->header(); + $::form->header(no_layout => 1); print $::form->parse_html_template('oe/edit_periodic_invoices_config', $config); $::lxdebug->leave_sub();