Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 15672788

Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt

  • ID 156727889095b015ccd6662d92484047887b86bf
  • Vorgänger 09ca7881
  • Nachfolger 6c6a8d01

Erzwungener Layout-Stil: S:H:UserPreferences:DisplayPreferences

Unterschiede anzeigen:

SL/Helper/UserPreferences/DisplayPreferences.pm
17 17
  $_[0]->user_prefs->store('longdescription_dialog_size_percentage', $_[1]);
18 18
}
19 19

  
20
sub get_layout_style {
21
  my $value   = $_[0]->user_prefs->get('layout_style');
22
  $value    //= $::instance_conf->get_layout_style;
23
  return $value;
24
}
25

  
26
sub store_layout_style {
27
  my ($self, $style) = @_;
28

  
29
  if (!$style) {
30
    $self->user_prefs->delete('layout_style');
31
    return;
32
  }
33

  
34
  if ( !($style eq 'desktop' || $style eq 'mobile') ) {
35
    die "unknown layout style '$style'";
36
  }
37

  
38
  $self->user_prefs->store('layout_style', $style);
39
}
40

  
20 41
sub init_user_prefs {
21 42
  SL::Helper::UserPreferences->new(
22 43
    namespace => $_[0]->namespace,
......
52 73

  
53 74
This module manages storing the user's choise for settings for
54 75
various display settings.
55
For now the preferred procentual size of the edit-dialog for longdescriptions
76

  
77
=head2 These settings are supported:
78

  
79
=over 4
80

  
81
=item longdescription_dialog_size_percentage
82

  
83
The preferred procentual size of the edit-dialog for longdescriptions
56 84
of positions can be stored.
57 85

  
86
=item layout_style
87

  
88
Here the layout style can be forced to be 'desktop' or 'mobile'
89
regardless of the user agend string. If this user setting is unset
90
then the setting from the client configuration will be used.
91

  
92
=back
93

  
58 94
=head1 BUGS
59 95

  
60 96
None yet :)

Auch abrufbar als: Unified diff