From a38da2a1b6f6a99dc5ccc19741b8ea2ae53027ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 14 May 2021 13:46:17 +0200 Subject: [PATCH] Layout: Anpassung von den meisten Layouts an die neue javascript/stylesheet Struktur --- SL/Layout/ActionBar.pm | 2 +- SL/Layout/CssMenu.pm | 2 +- SL/Layout/MenuLeft.pm | 4 ++-- SL/Layout/None.pm | 8 ++------ SL/Layout/Top.pm | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/SL/Layout/ActionBar.pm b/SL/Layout/ActionBar.pm index cdd845be4..5345e9e14 100644 --- a/SL/Layout/ActionBar.pm +++ b/SL/Layout/ActionBar.pm @@ -39,7 +39,7 @@ sub javascripts_inline { join '', map { $_->script } @{ $_[0]->actions }; } -sub javascripts { +sub static_javascripts { 'kivi.ActionBar.js' } diff --git a/SL/Layout/CssMenu.pm b/SL/Layout/CssMenu.pm index b67475f66..6897a478c 100644 --- a/SL/Layout/CssMenu.pm +++ b/SL/Layout/CssMenu.pm @@ -3,7 +3,7 @@ package SL::Layout::CssMenu; use strict; use parent qw(SL::Layout::Base); -sub use_stylesheet { +sub static_stylesheets { qw(icons16.css), } diff --git a/SL/Layout/MenuLeft.pm b/SL/Layout/MenuLeft.pm index d365210c9..ad7937e28 100644 --- a/SL/Layout/MenuLeft.pm +++ b/SL/Layout/MenuLeft.pm @@ -7,7 +7,7 @@ use List::MoreUtils qw(apply); use SL::JSON qw(to_json); use URI; -sub stylesheets { +sub static_stylesheets { qw(icons16.css icons24.css menu.css) } @@ -15,7 +15,7 @@ sub javascripts_inline { "\$(function(){kivi.LeftMenu.init(@{[ to_json([ section_menu($_[0]->menu) ]) ]})});" } -sub javascripts { +sub static_javascripts { qw( js/jquery.cookie.js js/kivi.LeftMenu.js diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm index 0569ff1e1..1504f9711 100644 --- a/SL/Layout/None.pm +++ b/SL/Layout/None.pm @@ -23,8 +23,7 @@ sub javascripts_inline { ); } -sub use_javascript { - my $self = shift; +sub static_javascripts { qw( jquery.js common.js @@ -33,16 +32,13 @@ sub use_javascript { kivi.js ), 'locale/'. $::myconfig{countrycode} .'.js', - $self->SUPER::use_javascript(@_); } -sub use_stylesheet { - my $self = shift; +sub static_stylesheets { qw( main.css menu.css ), - $self->SUPER::use_stylesheet(@_); } 1; diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm index 05c0046e1..471d6128d 100644 --- a/SL/Layout/Top.pm +++ b/SL/Layout/Top.pm @@ -22,11 +22,11 @@ sub pre_content { ); } -sub stylesheets { +sub static_stylesheets { 'frame_header/header.css'; } -sub javascripts { +sub static_javascripts { 'jquery-ui.js', 'kivi.QuickSearch.js', } -- 2.20.1