Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 60676414

Von Sven Schöling vor mehr als 2 Jahren hinzugefügt

  • ID 606764140f56ea76b55ae5f76ce9a6801aa4d314
  • Vorgänger 276068f2
  • Nachfolger 9a66f1e0

design40: Layout Switch für Design40 stylesheet

Unterschiede anzeigen:

SL/Controller/Admin.pm
505 505
sub init_all_printers      { SL::DB::Manager::Printer   ->get_all_sorted                                                     }
506 506
sub init_all_dateformats   { [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd)      ]                                              }
507 507
sub init_all_numberformats { [ '1,000.00', '1000.00', '1.000,00', '1000,00', "1'000.00" ]                                    }
508
sub init_all_stylesheets   { [ qw(lx-office-erp.css Mobile.css kivitendo.css) ]                                              }
508
sub init_all_stylesheets   { [ qw(lx-office-erp.css Mobile.css kivitendo.css design40.css) ]                                 }
509 509
sub init_all_dbsources             { [ sort User->dbsources($::form)                               ] }
510 510
sub init_all_used_dbsources        { { map { (join(':', $_->dbhost || 'localhost', $_->dbport || 5432, $_->dbname) => $_->name) } @{ $_[0]->all_clients }  } }
511 511
sub init_all_accounting_methods    { [ { id => 'accrual',   name => t8('Accrual accounting')  }, { id => 'cash',     name => t8('Cash accounting')       } ] }
SL/Layout/Classic.pm
1 1
package SL::Layout::Classic;
2 2

  
3 3
use strict;
4
use parent qw(SL::Layout::Base);
4
use parent qw(SL::Layout::Design40Switch);
5 5

  
6 6
use SL::Layout::Top;
7 7
use SL::Layout::MenuLeft;
SL/Layout/Design40Switch.pm
1
package SL::Layout::Design40Switch;
2

  
3
use strict;
4
use parent qw(SL::Layout::Base);
5

  
6
sub is_design40 {
7
  $::myconfig{stylesheet} =~ /design40/i;
8
}
9

  
10
sub webpages_path {
11
  is_design40() ? "templates/design40_webpages" : $_[0]->SUPER::webpages_path
12
}
13

  
14
sub allow_stylesheet_fallback {
15
  !is_design40();
16
}
17

  
18
1;
19

  
20
__END__
21

  
22
=encoding utf-8
23

  
24
=head1 NAME
25

  
26
SL::Layout::Design40Switch - Layout switch for Design 4.0
27

  
28
=head1 SYNOPSIS
29

  
30
Detects whether the user selected the Design4.0 stylesheet, and if so,
31
overrides some implementation details.
32

  
33
=head1 DESCRIPTION
34

  
35
Once activated, it will set the templates to use C<templates/design40_webpages> instead.
36

  
37
It will also disable css fallback, so that common.css etc won't interfere.
38

  
39
=head1 BUGS
40

  
41
None yet. :)
42

  
43
=head1 AUTHOR
44

  
45
Sven Schöling $<lt>s.schoeling@googlemail.comE<gt>
46

  
47
=cut
SL/Layout/Javascript.pm
1 1
package SL::Layout::Javascript;
2 2

  
3 3
use strict;
4
use parent qw(SL::Layout::Base);
4
use parent qw(SL::Layout::Design40Switch);
5 5

  
6 6
use SL::Layout::None;
7 7
use SL::Layout::DHTMLMenu;
SL/Layout/V3.pm
1 1
package SL::Layout::V3;
2 2

  
3 3
use strict;
4
use parent qw(SL::Layout::Base);
4
use parent qw(SL::Layout::Design40Switch);
5 5

  
6 6
use SL::Layout::None;
7 7
use SL::Layout::Top;
bin/mozilla/am.pl
637 637
  }
638 638

  
639 639
  $form->{STYLESHEETS} = [];
640
  foreach my $item (qw(lx-office-erp.css kivitendo.css)) {
640
  foreach my $item (qw(lx-office-erp.css kivitendo.css design40.css)) {
641 641
    push @{ $form->{STYLESHEETS} }, {
642 642
      'name'     => $item,
643 643
      'value'    => $item,

Auch abrufbar als: Unified diff