From: Moritz Bunkus Date: Mon, 19 Nov 2012 09:11:50 +0000 (+0100) Subject: Menüsysteme v3 & v4 verschmolzen (Stil von v4, Name & Code von v3) X-Git-Tag: release-3.0.0beta2~11^2~5 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=871a70f0615e1b551ff89df27ad3111a53a6f47d;p=kivitendo-erp.git Menüsysteme v3 & v4 verschmolzen (Stil von v4, Name & Code von v3) --- diff --git a/SL/Auth.pm b/SL/Auth.pm index b9840fc08..d63b6a2f6 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -489,8 +489,9 @@ sub read_user { @user_data{qw(id login)} = @{$ref}{qw(id login)}; } - # The XUL/XML backed menu has been removed. - $user_data{menustyle} = 'v3' if lc($user_data{menustyle} || '') eq 'xml'; + # The XUL/XML & 'CSS new' backed menus have been removed. + my %menustyle_map = ( xml => 'new', v4 => 'v3' ); + $user_data{menustyle} = $menustyle_map{lc($user_data{menustyle} || '')} || $user_data{menustyle}; # Set default language if selected language does not exist (anymore). $user_data{countrycode} = $::lx_office_conf{system}->{language} unless $user_data{countrycode} && -d "locale/$user_data{countrycode}"; diff --git a/SL/Form.pm b/SL/Form.pm index 3e9704fd2..9cc1065f5 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -3581,7 +3581,6 @@ sub layout { my %style_to_script_map = ( v3 => 'v3', neu => 'new', - v4 => 'v4', ); my $menu_script = $style_to_script_map{$::myconfig{menustyle}} || ''; diff --git a/SL/Layout/Dispatcher.pm b/SL/Layout/Dispatcher.pm index 89c950b18..5d7688e2c 100644 --- a/SL/Layout/Dispatcher.pm +++ b/SL/Layout/Dispatcher.pm @@ -6,7 +6,6 @@ use SL::Layout::Admin; use SL::Layout::Login; use SL::Layout::Classic; use SL::Layout::V3; -use SL::Layout::V4; use SL::Layout::Javascript; sub new { @@ -14,7 +13,6 @@ sub new { return SL::Layout::Classic->new if $params{style} eq 'old'; return SL::Layout::V3->new if $params{style} eq 'v3'; - return SL::Layout::V4->new if $params{style} eq 'v4'; return SL::Layout::Javascript->new if $params{style} eq 'neu'; return SL::Layout::Admin->new if $params{style} eq 'admin'; return SL::Layout::Login->new if $params{style} eq 'login'; diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm index f007e09cb..075e2f267 100644 --- a/SL/Layout/Top.pm +++ b/SL/Layout/Top.pm @@ -24,7 +24,7 @@ __END__ =head1 NAME -SL::Layout::Top - Top line in classic and v4 menu. +SL::Layout::Top - Top line in classic and v3 menu. =head1 DOM MODEL diff --git a/SL/Layout/V4.pm b/SL/Layout/V4.pm deleted file mode 100644 index 81789d466..000000000 --- a/SL/Layout/V4.pm +++ /dev/null @@ -1,44 +0,0 @@ -package SL::Layout::V4; - -use strict; -use parent qw(SL::Layout::Base); -use SL::Layout::Css; -use SL::Layout::Top; - -use URI; - -sub init_sub_layouts { - [ - SL::Layout::Top->new, - SL::Layout::None->new, - ] -} - -sub start_content { - "
\n"; -} - -sub end_content { - "
\n"; -} - -sub pre_content { - my ($self) = @_; - - $self->{sub_class} = 1; - - my $callback = $::form->unescape($::form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - - $self->SUPER::pre_content . - - $self->SUPER::render('menu/menuv4', { no_menu => 1, no_output => 1 }, - force_ul_width => 1, - date => $self->clock_line, - menu => $self->print_menu, - callback => $callback, - ); -} - -1; diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 97180b4b7..767669899 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -80,7 +80,6 @@ my @all_stylesheets = qw(lx-office-erp.css Win2000.css Mobile.css kivitendo.css) my @all_menustyles = ( { id => 'old', title => $::locale->text('Old (on the side)') }, { id => 'v3', title => $::locale->text('Top (CSS)') }, - { id => 'v4', title => $::locale->text('Top (CSS) new') }, { id => 'neu', title => $::locale->text('Top (Javascript)') }, ); @@ -380,16 +379,14 @@ sub list_users { sub add_user { $::form->{title} = "kivitendo " . $::locale->text('Administration') . " / " . $::locale->text('Add User'); -# Note: Menu Style 'v3' is not compatible to all browsers! -# "menustyle" => "old" sets the HTML Menu to default. -# User does not have a well behaved new constructor, so we#Ll just have to build one ourself + # User does not have a well behaved new constructor, so we'll just have to build one ourself my $user = bless { "vclimit" => 200, "countrycode" => "de", "numberformat" => "1.000,00", "dateformat" => "dd.mm.yy", "stylesheet" => "kivitendo.css", - "menustyle" => "old", + "menustyle" => "neu", dbport => $::auth->{DB_config}->{port} || 5432, dbuser => $::auth->{DB_config}->{user} || 'lxoffice', dbhost => $::auth->{DB_config}->{host} || 'localhost', diff --git a/css/Mobile/menuv4.css b/css/Mobile/menuv4.css deleted file mode 120000 index 6f69e0fcd..000000000 --- a/css/Mobile/menuv4.css +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/menuv4.css \ No newline at end of file diff --git a/css/kivitendo/menu.css b/css/kivitendo/menu.css index b5819a6cc..ca7b2a23e 100644 --- a/css/kivitendo/menu.css +++ b/css/kivitendo/menu.css @@ -4,139 +4,6 @@ orangemenu color #FFFFFF whiteMenu Hover background color #FFFFE0 DarkGreensubenu pointer */ -body.menuv4 { - behavior: url("css/csshover.htc"); - /*font-size: 14pt;*/ - line-height: 20pt; - font-family: Verdana, Geneva, Tahoma, sans-serif; - background-color: #FFFFFF; - color: #000000; -} -#menuv4 { - /*font-size: 85%;*/ - width: 99.8%; - float: left; - /*border: 3px solid;*/ - background-color: #FFFFFF; - color: #000000; -} -#menuv4 a, #menuv4 h2, #menuv4 div.x { - font-size: 80%; - line-height: 120%; - display: block; - border: 0; - white-space: nowrap; - margin: 0; - padding: 0.3em 1em; -} -#menuv4 h2 { - background-color: #ffffff; - color: #000000; - /*padding: 2px 15px;*/ -/* Firefox */ - -moz-border-radius: 0.4em 0.4em 0; -/* Safari, Chrome */ - -webkit-border-radius: 0.4em 0.4em 0; -/* Konqueror */ - -khtml-border-radius: 0.4em 0.4em 0; -/* CSS3 */ - border-radius: 0.4em 0.4em 0 0; -/* behavior: url(border-radius.htc); */ -} -#menuv4 ul:hover h2 { - background-color:#DCDCDC; -} -#menuv4 a, #menuv4 a:visited, #menuv4 div.x, #menuv4 div.x:visited { - color: #000000; - text-decoration: none; - padding-right: 10px; -} -#menuv4 a { - background: #EBEBEB; -} -#menuv4 div.x, #menuv4 div.x:visited { - background-color: #EBEBEB; - border-right: 1em solid #FE5F14; -} -#menuv4 div.x:hover { - border-right: none; -} -#menuv4 a:hover, #menuv4 div.x:hover { - color: #FE5F14; - background-color: #EBEBEB; -} -#menuv4 a:active, #menuv4 div.x:active { - color: #FE5F14; - background-color: #EBEBEB; -} -#menuv4 ul { - list-style: none; - margin: 0; - padding: 0; - float: left; -} - -#menuv4 li { - position: relative; - float: none; - border: 0; -} -li.sub { - position: relativ; - left: 0.2em; - top: 0px; - background-color: #FFFFFF; -} -/* IE6 spacing bug fix,
  • s without a bottom border get spaced to far * correction:the bug will change the height of the parent element! this will also cause the whole menu to grow * so the only method to get this pile of crap going is to add a bottom border to the
  • s, where the enclosing