X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/4e7776aa3fa5ba3c1fd932c79ce741a4eb8d89fd..6f266e929ff3eaefc84c34b46fa452c50eecbcf4:/SL/Layout/Base.pm?ds=sidebyside diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm index 18ef133e9..cd5ace939 100644 --- a/SL/Layout/Base.pm +++ b/SL/Layout/Base.pm @@ -11,8 +11,8 @@ use Rose::Object::MakeMethods::Generic ( 'array' => [ 'add_stylesheets_inline' => { interface => 'add', hash_key => 'stylesheets_inline' }, 'add_javascripts_inline' => { interface => 'add', hash_key => 'javascripts_inline' }, - 'sub_layouts', - 'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' }, + 'sub_layouts', => { interface => 'get_set_init' }, + 'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' }, ], ); @@ -60,6 +60,8 @@ sub javascripts_inline { @{ $_[0]->{javascripts_inline} || [] }; } +sub init_sub_layouts { [] } + ######################################### # Interface @@ -99,10 +101,10 @@ sub get_stylesheet_for_user { -f "$css_path/$user_style/main.css") { $css_path = "$css_path/$user_style"; } else { - $css_path = "$css_path/lx-office-erp"; + $css_path = "$css_path/kivitendo"; } } else { - $css_path = "$css_path/lx-office-erp"; + $css_path = "$css_path/kivitendo"; } $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here @@ -123,7 +125,7 @@ sub javascripts { my ($self) = @_; return uniq map { $self->_find_javascript($_) } - $self->use_javascript, map { $_->javascripts } $self->sub_layouts; + map({ $_->javascripts } $self->sub_layouts), $self->use_javascript; } sub _find_javascript {