X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLayout%2FBase.pm;h=e39502f1f583a7136bf7b6ec897030322047327e;hb=cb4847870dd086f46098ccd12dd03955766b2896;hp=2312ecfd2606f6ef3f379862339573470c6b0774;hpb=440e79f0cf88112e52aa711e9dbfd6a80612f82c;p=kivitendo-erp.git diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm index 2312ecfd2..e39502f1f 100644 --- a/SL/Layout/Base.pm +++ b/SL/Layout/Base.pm @@ -29,7 +29,7 @@ sub new { } sub init_menu { - Menu->new('crm/update/menu.ini', 'menus/erp.ini'); + SL::Menu->new('user'); } sub init_auto_reload_resources_param { @@ -103,7 +103,7 @@ sub _find_stylesheet { sub get_stylesheet_for_user { my $css_path = 'css'; if (my $user_style = $::myconfig{stylesheet}) { - $user_style =~ s/\.css$//; # nuke trailing .css, this is a remnand of pre 2.7.0 stylesheet handling + $user_style =~ s/\.css$//; # nuke trailing .css, this is a remnant of pre 2.7.0 stylesheet handling if (-d "$css_path/$user_style" && -f "$css_path/$user_style/main.css") { $css_path = "$css_path/$user_style"; @@ -113,7 +113,6 @@ sub get_stylesheet_for_user { } else { $css_path = "$css_path/kivitendo"; } - $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here return $css_path; } @@ -177,7 +176,7 @@ SL::Layout::Base - Base class for layouts =head1 DESCRIPTION -For a description about the external interface of layouts in general see +For a description of the external interface of layouts in general see L. This is a base class for layouts in general. It provides the basic interface @@ -187,7 +186,7 @@ and some capabilities to extend and cascade layouts. =head1 IMPLEMENTING LAYOUT CALLBACKS There are eight callbacks (C, C, C, -C, C, C, C, +C, C, C, C, C) which are documented in L. If you are writing a new simple layout, you can just override some of them like this: @@ -263,15 +262,15 @@ is to just add your content and dispatch to the base method. =head1 GORY DETAILS ABOUT JAVASCRIPT AND STYLESHEET OVERLOADING -The original code used to store one stylehsheet in C<< $form->{stylesheet} >> and +The original code used to store one stylesheet in C<< $form->{stylesheet} >> and allowed/expected authors of potential C controllers to change that into their own modified stylesheet. This was at some point cleaned up into a method C which took a string of space separated stylesheets and processed them into the response. -A lot of controllers are still using this methods so the layout interface -supports it to change as few controller code as possible, while providing the +A lot of controllers are still using this method so the layout interface +supports it to change as little controller code as possible, while providing the more intuitive C method. At the same time the following things need to be possible: @@ -297,7 +296,7 @@ A leaf layout should be able to override a callback to return a list. Sanitizing -C needs to retain it's sanitizing behaviour. +C needs to retain its sanitizing behaviour. =item 4. @@ -307,7 +306,7 @@ The standard implementation should be able to collect from sub layouts. =item 5. -Preserving of Inclusion Order +Preserving Inclusion Order Since there is currently no standard way of mixing own content and including sub layouts, this has to be done manually. Certain things like jquery get added