Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f7f03503

Von Sven Schöling vor etwa 12 Jahren hinzugefügt

  • ID f7f03503cfc22a15f5497d09dd9215c10c1d39b1
  • Vorgänger 981c312d
  • Nachfolger d26b7d6c

setupPoints und setupDateFormat in ein partial Layout verschoben

Unterschiede anzeigen:

SL/Controller/Layout/Classic.pm
14 14
  $self->add_sub_layouts([
15 15
    SL::Controller::Layout::Top->new,
16 16
    SL::Controller::Layout::MenuLeft->new,
17
    SL::Controller::Layout::None->new,
17 18
  ]);
18 19

  
19 20
  $self;
SL/Controller/Layout/Javascript.pm
6 6
use List::Util qw(max);
7 7
use URI;
8 8

  
9
sub new {
10
  my ($class, @slurp) = @_;
11

  
12
  my $self = $class->SUPER::new(@slurp);
13

  
14
  $self->add_sub_layouts([
15
    SL::Controller::Layout::None->new,
16
  ]);
17

  
18
  $self;
19
}
20

  
9 21
sub pre_content {
10 22
  &display
11 23
}
SL/Controller/Layout/None.pm
3 3
use strict;
4 4
use parent qw(SL::Controller::Layout::Base);
5 5

  
6
sub javascripts_inline {
7
  $::form->parse_html_template('generic/javascript_setup')
8
}
9

  
6 10
1;
SL/Controller/Layout/V3.pm
6 6

  
7 7
use URI;
8 8

  
9
sub new {
10
  my ($class, @slurp) = @_;
11

  
12
  my $self = $class->SUPER::new(@slurp);
13

  
14
  $self->add_sub_layouts([
15
    SL::Controller::Layout::None->new,
16
  ]);
17

  
18
  $self;
19
}
20

  
9 21
sub pre_content {
10 22
  &render;
11 23
}
SL/Controller/Layout/V4.pm
11 11
  my ($class, @slurp) = @_;
12 12

  
13 13
  my $self = $class->SUPER::new(@slurp);
14
  $self->add_sub_layouts(SL::Controller::Layout::Top->new);
14
  $self->add_sub_layouts(
15
    SL::Controller::Layout::Top->new
16
    SL::Controller::Layout::None->new,
17
  );
15 18
  $self;
16 19
}
17 20

  
SL/Form.pm
537 537
  print $::request->{layout}->post_content;
538 538

  
539 539
  if (my @inline_scripts = $::request->{layout}->javascripts_inline) {
540
    print "<script type='text/javascript'>$_</script>\n" for @inline_scripts;
540
    print "<script type='text/javascript'>@inline_scripts</script>\n";
541 541
  }
542 542

  
543 543
  print <<EOL
bin/mozilla/ap.pl
409 409
                         '-default' => $form->{"globalproject_id"} ));
410 410

  
411 411
  $form->header;
412
  my $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
413
  $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
414 412
  print qq|
415 413
<body onLoad="$onload">
416 414

  
bin/mozilla/ar.pl
327 327
    qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
328 328

  
329 329
  $onload = qq|focus()|;
330
  $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
331 330

  
332 331
#  $amount  = $locale->text('Amount');
333 332
#  $project = $locale->text('Project');
bin/mozilla/ca.pl
155 155
  $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}";
156 156

  
157 157
  my $onload = qq|focus()|;
158
  $onload .= qq|;setupDateFormat('$::myconfig{dateformat}', '|. $::locale->text("Falsches Datumsformat!") .qq|')|;
159
  $onload .= qq|;setupPoints('$::myconfig{numberformat}', '|. $::locale->text("wrongformat") .qq|')|;
160 158

  
161 159
  $::form->header;
162 160
  print $::form->parse_html_template('ca/list', {
bin/mozilla/cp.pl
84 84

  
85 85
  # Standard Konto für Umlaufvermögen
86 86
  my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
87
  # Entsprechend präventiv die Auswahlliste für Kontonummer 
87
  # Entsprechend präventiv die Auswahlliste für Kontonummer
88 88
  # auch mit value= zusammenbauen (s.a. oben bugfix 1771)
89 89
  # Wichtig: Auch das Template anpassen, damit hidden input korrekt die "
90 90
  # escaped.
......
114 114
  $form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
115 115
    $curr[0];
116 116

  
117
  # Entsprechend präventiv die Auswahlliste für Währungen 
117
  # Entsprechend präventiv die Auswahlliste für Währungen
118 118
  # auch mit value= zusammenbauen (s.a. oben bugfix 1771)
119 119
  $form->{selectcurrency} = "";
120 120
  map { $form->{selectcurrency} .= "<option value=\"$_\">$_</option>\n" } @curr;
......
168 168

  
169 169
  $arap = lc $form->{ARAP};
170 170
  $onload = qq|focus()|;
171
  $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
172
  $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
173 171

  
174 172
  print $::form->parse_html_template('cp/form_header', {
175 173
    is_customer => $form->{vc}   eq 'customer',
......
278 276
    $form->{customer_id} = $form->{AR}[0]{customer_id};
279 277
  }
280 278

  
281
  # search by invoicenumber, 
282
  if ($form->{invnumber}) { 
279
  # search by invoicenumber,
280
  if ($form->{invnumber}) {
283 281
    $form->{open} ='Y'; # only open invoices
284 282
    if ($form->{ARAP} eq 'AR'){
285 283
      # ar_transactions automatically searches by $form->{customer_id} or else
bin/mozilla/dn.pl
317 317
  $form->header();
318 318

  
319 319
  $form->{onload} = qq|focus()|
320
    . qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|
321
    . qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
322 320

  
323 321
  print $form->parse_html_template("dunning/search");
324 322

  
bin/mozilla/gl.pl
221 221
  $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
222 222

  
223 223
  my $onload = "focus()"
224
             . qq|;setupDateFormat('|. $::myconfig{dateformat} . qq|', '| . $::locale->text("Falsches Datumsformat!") . qq|')|
225
             . qq|;setupPoints('|. $::myconfig{numberformat} .   qq|', '| . $::locale->text("wrongformat") . qq|')|;
226 224

  
227 225
  $::form->header;
228 226
  print $::form->parse_html_template('gl/search', {
templates/webpages/ap/search.html
175 175
 <!--
176 176
   $(document).ready(function(){
177 177
    focus();
178
    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
179
    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
180 178
   })
181 179
 //-->
182 180
 </script>
templates/webpages/ar/search.html
221 221
 <!--
222 222
   $(document).ready(function(){
223 223
    $('customer').focus();
224
    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
225
    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
226 224
   })
227 225
 //-->
228 226
 </script>
templates/webpages/do/form_header.html
18 18
  <!--
19 19
      function on_load() {
20 20
        [% IF onload %][% onload %];[% END %]
21
        setupDateFormat('[% myconfig_dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
22
        setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
23 21
      }
24 22
    -->
25 23
 </script>
templates/webpages/dunning/add.html
4 4
 <!--
5 5
     function setup_controls() {
6 6
       fokus();
7
       setupDateFormat('[% myconfig_dateformat %]', '[% 'Wrong date format!' | $T8 %]');
8
       setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
9 7
     }
10 8
   -->
11 9
</script>
templates/webpages/generic/javascript_setup.html
1
[%- USE T8 %]
2
$(function() {
3
  setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]');
4
  setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
5
})
templates/webpages/ir/form_header.html
196 196
[% ELSE %]
197 197
       focus();
198 198
[% END %]
199
       setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
200
       setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
201 199
     });
202 200
     function set_duedate() {
203 201
       $.ajax({
templates/webpages/is/form_header.html
255 255
[% ELSE %]
256 256
       focus();
257 257
[% END %]
258
       setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
259
       setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
260 258
     });
261 259
     function set_duedate() {
262 260
       $.ajax({
templates/webpages/oe/form_footer.html
186 186
[% END %]
187 187

  
188 188
</form>
189

  
190

  
191
    <script type="text/javascript">
192
     <!--
193
       $('document').ready(function(){
194
         setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
195
         setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
196
       });
197
     //-->
198
    </script>
templates/webpages/vk/search_invoice.html
52 52
           <th align="right">[% 'Item mode' | $T8 %]</th>
53 53
           <td colspan="3" align=left><input name="l_parts" class=checkbox type=checkbox value=Y> ([%'Show items from invoices individually' | $T8 %]) </td>
54 54
          </tr>
55
          <tr> 
55
          <tr>
56 56
           <th align="right">
57 57
             [% 'Total sum' | $T8 %]
58 58
           </th>
......
226 226
           <td align=left><input name="l_lastcost_total" class=checkbox type=checkbox value=Y checked>[% 'Purchase price total' | $T8 %]</td>
227 227
           <td align=left><input name="l_marge_total" class=checkbox type=checkbox value=Y checked>[% 'Margetotal' | $T8 %]</td>
228 228
           <td colspan="4"> ([% 'Single values in item mode, cumulated values in invoice mode' | $T8 %])
229
           
229

  
230 230
          </tr>
231 231
          <tr>
232 232
           <td align=left><input name="l_sellprice" class=checkbox type=checkbox value=Y checked>[% 'Sales price' | $T8 %]</td>
......
274 274
    </th>
275 275
    </tr>
276 276
        [% CUSTOM_VARIABLES_INCLUSION_CODE_CT %]
277
 
277

  
278 278
     <tr><td colspan="7">&nbsp;</td></tr>
279 279
    <tr>
280 280
    <th colspan="4" align="left">
......
299 299
 <!--
300 300
   $(document).ready(function(){
301 301
    $('customer').focus();
302
    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
303
    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
304 302
   })
305 303
 //-->
306 304
 </script>

Auch abrufbar als: Unified diff