projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
981c312
)
setupPoints und setupDateFormat in ein partial Layout verschoben
author
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 18 Sep 2012 13:32:32 +0000
(15:32 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Wed, 17 Oct 2012 14:00:02 +0000
(16:00 +0200)
21 files changed:
SL/Controller/Layout/Classic.pm
patch
|
blob
|
history
SL/Controller/Layout/Javascript.pm
patch
|
blob
|
history
SL/Controller/Layout/None.pm
patch
|
blob
|
history
SL/Controller/Layout/V3.pm
patch
|
blob
|
history
SL/Controller/Layout/V4.pm
patch
|
blob
|
history
SL/Form.pm
patch
|
blob
|
history
bin/mozilla/ap.pl
patch
|
blob
|
history
bin/mozilla/ar.pl
patch
|
blob
|
history
bin/mozilla/ca.pl
patch
|
blob
|
history
bin/mozilla/cp.pl
patch
|
blob
|
history
bin/mozilla/dn.pl
patch
|
blob
|
history
bin/mozilla/gl.pl
patch
|
blob
|
history
templates/webpages/ap/search.html
patch
|
blob
|
history
templates/webpages/ar/search.html
patch
|
blob
|
history
templates/webpages/do/form_header.html
patch
|
blob
|
history
templates/webpages/dunning/add.html
patch
|
blob
|
history
templates/webpages/generic/javascript_setup.html
[new file with mode: 0644]
patch
|
blob
templates/webpages/ir/form_header.html
patch
|
blob
|
history
templates/webpages/is/form_header.html
patch
|
blob
|
history
templates/webpages/oe/form_footer.html
patch
|
blob
|
history
templates/webpages/vk/search_invoice.html
patch
|
blob
|
history
diff --git
a/SL/Controller/Layout/Classic.pm
b/SL/Controller/Layout/Classic.pm
index
a4d99b4
..
b743874
100644
(file)
--- a/
SL/Controller/Layout/Classic.pm
+++ b/
SL/Controller/Layout/Classic.pm
@@
-14,6
+14,7
@@
sub new {
$self->add_sub_layouts([
SL::Controller::Layout::Top->new,
SL::Controller::Layout::MenuLeft->new,
$self->add_sub_layouts([
SL::Controller::Layout::Top->new,
SL::Controller::Layout::MenuLeft->new,
+ SL::Controller::Layout::None->new,
]);
$self;
]);
$self;
diff --git
a/SL/Controller/Layout/Javascript.pm
b/SL/Controller/Layout/Javascript.pm
index
590c53e
..
f9ee831
100644
(file)
--- a/
SL/Controller/Layout/Javascript.pm
+++ b/
SL/Controller/Layout/Javascript.pm
@@
-6,6
+6,18
@@
use parent qw(SL::Controller::Layout::Base);
use List::Util qw(max);
use URI;
use List::Util qw(max);
use URI;
+sub new {
+ my ($class, @slurp) = @_;
+
+ my $self = $class->SUPER::new(@slurp);
+
+ $self->add_sub_layouts([
+ SL::Controller::Layout::None->new,
+ ]);
+
+ $self;
+}
+
sub pre_content {
&display
}
sub pre_content {
&display
}
diff --git
a/SL/Controller/Layout/None.pm
b/SL/Controller/Layout/None.pm
index
f3fc79f
..
2d9e2e8
100644
(file)
--- a/
SL/Controller/Layout/None.pm
+++ b/
SL/Controller/Layout/None.pm
@@
-3,4
+3,8
@@
package SL::Controller::Layout::None;
use strict;
use parent qw(SL::Controller::Layout::Base);
use strict;
use parent qw(SL::Controller::Layout::Base);
+sub javascripts_inline {
+ $::form->parse_html_template('generic/javascript_setup')
+}
+
1;
1;
diff --git
a/SL/Controller/Layout/V3.pm
b/SL/Controller/Layout/V3.pm
index
e545b72
..
3a2c984
100644
(file)
--- a/
SL/Controller/Layout/V3.pm
+++ b/
SL/Controller/Layout/V3.pm
@@
-6,6
+6,18
@@
use SL::Controller::Layout::Css;
use URI;
use URI;
+sub new {
+ my ($class, @slurp) = @_;
+
+ my $self = $class->SUPER::new(@slurp);
+
+ $self->add_sub_layouts([
+ SL::Controller::Layout::None->new,
+ ]);
+
+ $self;
+}
+
sub pre_content {
&render;
}
sub pre_content {
&render;
}
diff --git
a/SL/Controller/Layout/V4.pm
b/SL/Controller/Layout/V4.pm
index
df61836
..
a89b414
100644
(file)
--- a/
SL/Controller/Layout/V4.pm
+++ b/
SL/Controller/Layout/V4.pm
@@
-11,7
+11,10
@@
sub new {
my ($class, @slurp) = @_;
my $self = $class->SUPER::new(@slurp);
my ($class, @slurp) = @_;
my $self = $class->SUPER::new(@slurp);
- $self->add_sub_layouts(SL::Controller::Layout::Top->new);
+ $self->add_sub_layouts(
+ SL::Controller::Layout::Top->new
+ SL::Controller::Layout::None->new,
+ );
$self;
}
$self;
}
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
46b1905
..
186e661
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-537,7
+537,7
@@
sub footer {
print $::request->{layout}->post_content;
if (my @inline_scripts = $::request->{layout}->javascripts_inline) {
print $::request->{layout}->post_content;
if (my @inline_scripts = $::request->{layout}->javascripts_inline) {
- print "<script type='text/javascript'>
$_</script>\n" for @inline_scripts
;
+ print "<script type='text/javascript'>
@inline_scripts</script>\n"
;
}
print <<EOL
}
print <<EOL
diff --git
a/bin/mozilla/ap.pl
b/bin/mozilla/ap.pl
index
564b3db
..
d7e9a4d
100644
(file)
--- a/
bin/mozilla/ap.pl
+++ b/
bin/mozilla/ap.pl
@@
-409,8
+409,6
@@
sub form_header {
'-default' => $form->{"globalproject_id"} ));
$form->header;
'-default' => $form->{"globalproject_id"} ));
$form->header;
- my $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print qq|
<body onLoad="$onload">
print qq|
<body onLoad="$onload">
diff --git
a/bin/mozilla/ar.pl
b/bin/mozilla/ar.pl
index
ced49fd
..
1e6c678
100644
(file)
--- a/
bin/mozilla/ar.pl
+++ b/
bin/mozilla/ar.pl
@@
-327,7
+327,6
@@
sub form_header {
qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
$onload = qq|focus()|;
qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
$onload = qq|focus()|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
# $amount = $locale->text('Amount');
# $project = $locale->text('Project');
# $amount = $locale->text('Amount');
# $project = $locale->text('Project');
diff --git
a/bin/mozilla/ca.pl
b/bin/mozilla/ca.pl
index
af6c6c8
..
b22ed29
100644
(file)
--- a/
bin/mozilla/ca.pl
+++ b/
bin/mozilla/ca.pl
@@
-155,8
+155,6
@@
sub list {
$::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}";
my $onload = qq|focus()|;
$::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}";
my $onload = qq|focus()|;
- $onload .= qq|;setupDateFormat('$::myconfig{dateformat}', '|. $::locale->text("Falsches Datumsformat!") .qq|')|;
- $onload .= qq|;setupPoints('$::myconfig{numberformat}', '|. $::locale->text("wrongformat") .qq|')|;
$::form->header;
print $::form->parse_html_template('ca/list', {
$::form->header;
print $::form->parse_html_template('ca/list', {
diff --git
a/bin/mozilla/cp.pl
b/bin/mozilla/cp.pl
index
a8caa52
..
7825ed6
100644
(file)
--- a/
bin/mozilla/cp.pl
+++ b/
bin/mozilla/cp.pl
@@
-84,7
+84,7
@@
sub payment {
# Standard Konto für Umlaufvermögen
my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
# Standard Konto für Umlaufvermögen
my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
- # Entsprechend präventiv die Auswahlliste für Kontonummer
+ # Entsprechend präventiv die Auswahlliste für Kontonummer
# auch mit value= zusammenbauen (s.a. oben bugfix 1771)
# Wichtig: Auch das Template anpassen, damit hidden input korrekt die "
# escaped.
# auch mit value= zusammenbauen (s.a. oben bugfix 1771)
# Wichtig: Auch das Template anpassen, damit hidden input korrekt die "
# escaped.
@@
-114,7
+114,7
@@
sub payment {
$form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
$curr[0];
$form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
$curr[0];
- # Entsprechend präventiv die Auswahlliste für Währungen
+ # Entsprechend präventiv die Auswahlliste für Währungen
# auch mit value= zusammenbauen (s.a. oben bugfix 1771)
$form->{selectcurrency} = "";
map { $form->{selectcurrency} .= "<option value=\"$_\">$_</option>\n" } @curr;
# auch mit value= zusammenbauen (s.a. oben bugfix 1771)
$form->{selectcurrency} = "";
map { $form->{selectcurrency} .= "<option value=\"$_\">$_</option>\n" } @curr;
@@
-168,8
+168,6
@@
sub form_header {
$arap = lc $form->{ARAP};
$onload = qq|focus()|;
$arap = lc $form->{ARAP};
$onload = qq|focus()|;
- $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print $::form->parse_html_template('cp/form_header', {
is_customer => $form->{vc} eq 'customer',
print $::form->parse_html_template('cp/form_header', {
is_customer => $form->{vc} eq 'customer',
@@
-278,8
+276,8
@@
sub update {
$form->{customer_id} = $form->{AR}[0]{customer_id};
}
$form->{customer_id} = $form->{AR}[0]{customer_id};
}
- # search by invoicenumber,
- if ($form->{invnumber}) {
+ # search by invoicenumber,
+ if ($form->{invnumber}) {
$form->{open} ='Y'; # only open invoices
if ($form->{ARAP} eq 'AR'){
# ar_transactions automatically searches by $form->{customer_id} or else
$form->{open} ='Y'; # only open invoices
if ($form->{ARAP} eq 'AR'){
# ar_transactions automatically searches by $form->{customer_id} or else
diff --git
a/bin/mozilla/dn.pl
b/bin/mozilla/dn.pl
index
627f696
..
92db5d8
100644
(file)
--- a/
bin/mozilla/dn.pl
+++ b/
bin/mozilla/dn.pl
@@
-317,8
+317,6
@@
sub search {
$form->header();
$form->{onload} = qq|focus()|
$form->header();
$form->{onload} = qq|focus()|
- . qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|
- . qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print $form->parse_html_template("dunning/search");
print $form->parse_html_template("dunning/search");
diff --git
a/bin/mozilla/gl.pl
b/bin/mozilla/gl.pl
index
e217aee
..
8cf9900
100644
(file)
--- a/
bin/mozilla/gl.pl
+++ b/
bin/mozilla/gl.pl
@@
-221,8
+221,6
@@
sub search {
$::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
my $onload = "focus()"
$::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
my $onload = "focus()"
- . qq|;setupDateFormat('|. $::myconfig{dateformat} . qq|', '| . $::locale->text("Falsches Datumsformat!") . qq|')|
- . qq|;setupPoints('|. $::myconfig{numberformat} . qq|', '| . $::locale->text("wrongformat") . qq|')|;
$::form->header;
print $::form->parse_html_template('gl/search', {
$::form->header;
print $::form->parse_html_template('gl/search', {
diff --git
a/templates/webpages/ap/search.html
b/templates/webpages/ap/search.html
index
a89b9b2
..
91ebc32
100644
(file)
--- a/
templates/webpages/ap/search.html
+++ b/
templates/webpages/ap/search.html
@@
-175,8
+175,6
@@
<!--
$(document).ready(function(){
focus();
<!--
$(document).ready(function(){
focus();
- setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
})
//-->
</script>
})
//-->
</script>
diff --git
a/templates/webpages/ar/search.html
b/templates/webpages/ar/search.html
index
ddd6881
..
07f2fc1
100644
(file)
--- a/
templates/webpages/ar/search.html
+++ b/
templates/webpages/ar/search.html
@@
-221,8
+221,6
@@
<!--
$(document).ready(function(){
$('customer').focus();
<!--
$(document).ready(function(){
$('customer').focus();
- setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
})
//-->
</script>
})
//-->
</script>
diff --git
a/templates/webpages/do/form_header.html
b/templates/webpages/do/form_header.html
index
848fa89
..
5c51329
100644
(file)
--- a/
templates/webpages/do/form_header.html
+++ b/
templates/webpages/do/form_header.html
@@
-18,8
+18,6
@@
<!--
function on_load() {
[% IF onload %][% onload %];[% END %]
<!--
function on_load() {
[% IF onload %][% onload %];[% END %]
- setupDateFormat('[% myconfig_dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
}
-->
</script>
}
-->
</script>
diff --git
a/templates/webpages/dunning/add.html
b/templates/webpages/dunning/add.html
index
889432a
..
62a11a4
100644
(file)
--- a/
templates/webpages/dunning/add.html
+++ b/
templates/webpages/dunning/add.html
@@
-4,8
+4,6
@@
<!--
function setup_controls() {
fokus();
<!--
function setup_controls() {
fokus();
- setupDateFormat('[% myconfig_dateformat %]', '[% 'Wrong date format!' | $T8 %]');
- setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
}
-->
</script>
}
-->
</script>
diff --git a/templates/webpages/generic/javascript_setup.html
b/templates/webpages/generic/javascript_setup.html
new file mode 100644
(file)
index 0000000..
49ecb0a
--- /dev/null
+++ b/
templates/webpages/generic/javascript_setup.html
@@ -0,0
+1,5
@@
+[%- USE T8 %]
+$(function() {
+ setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]');
+ setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
+})
diff --git
a/templates/webpages/ir/form_header.html
b/templates/webpages/ir/form_header.html
index
53acb60
..
f444c6d
100644
(file)
--- a/
templates/webpages/ir/form_header.html
+++ b/
templates/webpages/ir/form_header.html
@@
-196,8
+196,6
@@
[% ELSE %]
focus();
[% END %]
[% ELSE %]
focus();
[% END %]
- setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
});
function set_duedate() {
$.ajax({
});
function set_duedate() {
$.ajax({
diff --git
a/templates/webpages/is/form_header.html
b/templates/webpages/is/form_header.html
index
c2cfa06
..
416fea8
100644
(file)
--- a/
templates/webpages/is/form_header.html
+++ b/
templates/webpages/is/form_header.html
@@
-255,8
+255,6
@@
[% ELSE %]
focus();
[% END %]
[% ELSE %]
focus();
[% END %]
- setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
});
function set_duedate() {
$.ajax({
});
function set_duedate() {
$.ajax({
diff --git
a/templates/webpages/oe/form_footer.html
b/templates/webpages/oe/form_footer.html
index
61a6060
..
ddf4a53
100644
(file)
--- a/
templates/webpages/oe/form_footer.html
+++ b/
templates/webpages/oe/form_footer.html
@@
-186,13
+186,3
@@
[% END %]
</form>
[% END %]
</form>
-
-
- <script type="text/javascript">
- <!--
- $('document').ready(function(){
- setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
- });
- //-->
- </script>
diff --git
a/templates/webpages/vk/search_invoice.html
b/templates/webpages/vk/search_invoice.html
index
0b34502
..
95a4b61
100644
(file)
--- a/
templates/webpages/vk/search_invoice.html
+++ b/
templates/webpages/vk/search_invoice.html
@@
-52,7
+52,7
@@
<th align="right">[% 'Item mode' | $T8 %]</th>
<td colspan="3" align=left><input name="l_parts" class=checkbox type=checkbox value=Y> ([%'Show items from invoices individually' | $T8 %]) </td>
</tr>
<th align="right">[% 'Item mode' | $T8 %]</th>
<td colspan="3" align=left><input name="l_parts" class=checkbox type=checkbox value=Y> ([%'Show items from invoices individually' | $T8 %]) </td>
</tr>
- <tr>
+ <tr>
<th align="right">
[% 'Total sum' | $T8 %]
</th>
<th align="right">
[% 'Total sum' | $T8 %]
</th>
@@
-226,7
+226,7
@@
<td align=left><input name="l_lastcost_total" class=checkbox type=checkbox value=Y checked>[% 'Purchase price total' | $T8 %]</td>
<td align=left><input name="l_marge_total" class=checkbox type=checkbox value=Y checked>[% 'Margetotal' | $T8 %]</td>
<td colspan="4"> ([% 'Single values in item mode, cumulated values in invoice mode' | $T8 %])
<td align=left><input name="l_lastcost_total" class=checkbox type=checkbox value=Y checked>[% 'Purchase price total' | $T8 %]</td>
<td align=left><input name="l_marge_total" class=checkbox type=checkbox value=Y checked>[% 'Margetotal' | $T8 %]</td>
<td colspan="4"> ([% 'Single values in item mode, cumulated values in invoice mode' | $T8 %])
-
+
</tr>
<tr>
<td align=left><input name="l_sellprice" class=checkbox type=checkbox value=Y checked>[% 'Sales price' | $T8 %]</td>
</tr>
<tr>
<td align=left><input name="l_sellprice" class=checkbox type=checkbox value=Y checked>[% 'Sales price' | $T8 %]</td>
@@
-274,7
+274,7
@@
</th>
</tr>
[% CUSTOM_VARIABLES_INCLUSION_CODE_CT %]
</th>
</tr>
[% CUSTOM_VARIABLES_INCLUSION_CODE_CT %]
-
+
<tr><td colspan="7"> </td></tr>
<tr>
<th colspan="4" align="left">
<tr><td colspan="7"> </td></tr>
<tr>
<th colspan="4" align="left">
@@
-299,8
+299,6
@@
<!--
$(document).ready(function(){
$('customer').focus();
<!--
$(document).ready(function(){
$('customer').focus();
- setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
- setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
})
//-->
</script>
})
//-->
</script>