popups ohne layout rendern
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 21 Sep 2012 14:19:27 +0000 (16:19 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 17 Oct 2012 14:02:23 +0000 (16:02 +0200)
SL/Form.pm
bin/mozilla/ap.pl
bin/mozilla/common.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/fu.pl
bin/mozilla/oe.pl

index 514c282..591e02d 100644 (file)
@@ -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
index 2bf8017..e31f322 100644 (file)
@@ -410,8 +410,6 @@ sub form_header {
 
   $form->header;
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 
 <input type=hidden name=id value=$form->{id}>
index 3cb850d..59c2f94 100644 (file)
@@ -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();
index ea2c3d4..378e5a1 100644 (file)
@@ -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();
index 071a7a4..b58cd71 100644 (file)
@@ -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, });
index b2e6037..3b5adb2 100644 (file)
@@ -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();
index 41b9da9..0bcb897 100644 (file)
@@ -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();