Unterstützung für 'href'-Menüeinträge im JavaScript-Menü gefixt
[kivitendo-erp.git] / SL / Layout / Base.pm
index 1d31a82..0c209e2 100644 (file)
@@ -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,11 +60,17 @@ sub javascripts_inline {
   @{ $_[0]->{javascripts_inline} || [] };
 }
 
+sub init_sub_layouts { [] }
+
 
 #########################################
 # Interface
 ########################################
 
+sub add_stylesheets {
+  &use_stylesheet;
+}
+
 sub use_stylesheet {
   my $self = shift;
   push @{ $self->{stylesheets} ||= [] }, @_ if @_;
@@ -105,6 +111,9 @@ sub get_stylesheet_for_user {
   return $css_path;
 }
 
+sub add_javascripts {
+  &use_javascript
+}
 
 sub use_javascript {
   my $self = shift;