]> wagnertech.de Git - kivitendo-erp.git/commitdiff
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 514c282d2a8b4bbfa93bc62f9d1057238343724f..591e02df3e61108a6debb8da5bde601b298d4a5e 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 2bf801787f737789e17e757fdd109b4b4e1c2749..e31f322b6471f53040a3c0590dede84dda740673 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 3cb850d9863d6a9606d7b7a4b31debab39f77f08..59c2f9481671e2090b4b05617a31b2a9f109eb21 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 ea2c3d40a36dae270fbcbc8a1f6c4fe90a6911ca..378e5a17cf14e02f47c5c71244e2ad55f71509f3 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 071a7a4c246ad7246a03cbbe4929fcc12eec9f62..b58cd7190bd296f3adf130649cd4990dbf003729 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 b2e6037809b99e6cd5a8caa7fd4387b493686d3a..3b5adb230597532b2842b0d675714eef13b4c44a 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 41b9da9b731a20b336148d4f9c0a05881a6d985b..0bcb897bf98c446facfb361ab7fe7d92a46b4e8c 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();