Revision 3bbe01f7
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/Helper/RequirementSpec.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use Exporter qw(import); |
6 |
our @EXPORT = qw(init_visible_section); |
|
6 |
our @EXPORT = qw(init_visible_section set_function_blocks_tab_menu_class);
|
|
7 | 7 |
|
8 | 8 |
use SL::DB::Manager::RequirementSpecItem; |
9 | 9 |
|
... | ... | |
22 | 22 |
return $self->visible_section($self->visible_item->section); |
23 | 23 |
} |
24 | 24 |
|
25 |
sub set_function_blocks_tab_menu_class { |
|
26 |
my $self = shift; |
|
27 |
my %params = Params::Validate::validate(@_, { class => 1 }); |
|
28 |
|
|
29 |
my $id = '#function-blocks-tab'; |
|
30 |
my @other_classes = grep { $_ ne $params{class} } qw(section-context-menu text-block-context-menu); |
|
31 |
|
|
32 |
$self->js->removeClass($id, $_) for @other_classes; |
|
33 |
$self->js->addClass($id, $params{class}); |
|
34 |
} |
|
35 |
|
|
25 | 36 |
1; |
Auch abrufbar als: Unified diff
Pflichtenhefte: Kontextmenüs für Items/Textblöcke auf größerer Fläche anzeigen