Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 08b6539d

Von Sven Donath vor mehr als 14 Jahren hinzugefügt

  • ID 08b6539d1b4a06760bd12208b76f15e767d336d4
  • Vorgänger ad27efa6
  • Nachfolger f28c12f1

Seitliches HTML-Menü lässt sich ein- und ausklappen. (Link "Menü" in Kopfzeile)
Das bringt auf kleinen Bildschirmen zusätzlichen horizontalen Platz.
Getestet mit Opera, Firefox, Chrome, IE8, Android Webkit.
Funktioniert auf allen außer Android. ^^ Hier muss noch nachgebessert werden,
am besten im Zusammenhang mit dem Mobile.css.
Außerdem Reihenfolge der Links in der Kopfzeile geändert, und Title-Tag
für Logout hinzugefügt.

Unterschiede anzeigen:

bin/mozilla/kopf.pl
$name = $wert;
}
my $login =
"[" . $form->{login}
. " - <a href=\"login.pl?action=logout\" target=\"_top\">"
"". $locale->text('User') . ": " . $form->{login}
. " [<a href=\"login.pl?action=logout\" target=\"_top\" title=\"". $locale->text('Logout now') . "\">"
. $locale->text('Logout')
. "</a>] ";
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
......
|;
#
my $framesize = _calc_framesize(); # framesize calculation as in menu.pl is only a quick and dirty hack here
# it would be better to use a global or config variable
print qq|
<body bgcolor="#ffffff" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="background-image: url('image/fade.png'); background-repeat:repeat-x;">
<script language='JavaScript' src='js/switchmenuframe.js'></script>
<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
<tr>
<td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;">
&nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
[<a href="JavaScript:Switch_Menu(|.$framesize.qq|);" title="| . $locale->text('Switch Menu on / off') . qq|">| . $locale->text('Menu') . qq|</a>]
&nbsp;[<a HREF="login.pl" target="_blank" title="| . $locale->text('Open a further Lx-Office Window or Tab') . qq|">| . $locale->text('New Win/Tab') . qq|</a>]
&nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
&nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
&nbsp;[<a href="Javascript:top.main_window.history.forward();" title="| . $locale->text('Go one step forward') . qq|">| . $locale->text('Fwd') . qq|</a>]
<!-- is there a better solution for Back? Possibly with the callback variable? -->
<!-- is there any better solution for Back? Possibly with the callback variable? -->
</td>
<td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
. $login . $datum . qq| <script>writeclock()</script>&nbsp;
......
</html>
|;
sub _calc_framesize {
my $is_lynx_browser = $ENV{HTTP_USER_AGENT} =~ /links/i;
my $is_mobile_browser = $ENV{HTTP_USER_AGENT} =~ /mobile/i;
my $is_mobile_style = $::form->{stylesheet} =~ /mobile/i;
return $is_mobile_browser && $is_mobile_style ? 130
: $is_lynx_browser ? 240
: 180;
}
}
1;
bin/mozilla/menu.pl
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#######################################################################
#
# thre frame layout with refractured menu
# the frame layout with refractured menu
#
# CHANGE LOG:
# DS. 2002-03-25 Created
# 2004-12-14 - New Optik - Marco Welter <mawe@linux-studio.de>
# 2010-08-19 - Icons for sub entries and one click
# JS switchable HTML-menu - Sven Donath <lxo@dexo.de>
#######################################################################
use strict;
......
print qq|
<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">
<frame src="kopf.pl" name="kopf" scrolling="NO">
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" id="menuframe" name="menuframe">
<frame src="$form->{script}?action=acc_menu" name="acc_menu" scrolling="auto" noresize marginwidth="0">
<frame src="$callback" name="main_window" scrolling="auto">
</frameset>
......
my $form = $main::form;
my $locale = $main::locale;
my $framesize = _calc_framesize();
my $framesize = _calc_framesize(); # how to get it into kopf.pl or vice versa?
$mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
......
return $is_mobile_browser && $is_mobile_style ? 130
: $is_lynx_browser ? 240
: 190;
: 180;
}
1;
bin/mozilla/switchmenuframe.js
/* This is used in bin/mozilla/kopf.pl to switch the HTML sidemenu on/off
2010, Sven Donath, lxo@dexo.de */
var vSwitch_Menu = 1;
function Switch_Menu(framesize)
{
if (vSwitch_Menu)
{
vSwitch_Menu=false;
parent.document.getElementById('menuframe').setAttribute('cols','30,*')
}
else
{
vSwitch_Menu=true;
framesize = framesize + ',*';
parent.document.getElementById('menuframe').setAttribute('cols',framesize);
}
return;
}
locale/de/all
'Account saved!' => 'Konto gespeichert!',
'Accounting Group deleted!' => 'Buchungsgruppe gel&ouml;scht!',
'Accounting Group saved!' => 'Buchungsgruppe gespeichert!',
'Accounting Menu' => 'Kontoverwaltung',
'Accrual' => 'Bilanzierung',
'Active' => 'Aktiv',
'Active?' => 'Aktiviert?',
......
'Lock System' => 'System sperren',
'Lockfile created!' => 'System gesperrt!',
'Lockfile removed!' => 'System entsperrt!',
'Login' => 'Anmeldung',
'Login' => 'Anmelden',
'Login Name' => 'Benutzername',
'Login name missing!' => 'Loginname fehlt.',
'Logout' => 'Abmelden',
'Logout now' => 'Lx-Office jetzt verlassen',
'Long Dates' => 'Lange Monatsnamen',
'Long Description' => 'Langtext',
'Lx-Office' => 'Lx-Office',
'Lx-Office 2.4.0 introduces two new concepts: tax zones and Buchungsgruppen.' => 'Lx-Office 2.4.0 f&uuml;hrt zwei neue Konzepte ein: Steuerzonen und Buchungsgruppen.',
'Lx-Office can fix these problems automatically.' => 'Lx-Office kann solche Probleme automatisch beheben.',
'Lx-Office has been switched to group-based access restrictions.' => 'Lx-Office wurde auf eine gruppenbasierte Benutzerzugriffsverwaltung umgestellt.',
......
'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen',
'Medium Number' => 'Datentr&auml;gernummer',
'Memo' => 'Memo',
'Menu' => 'Men&uuml;',
'Message' => 'Nachricht',
'Method' => 'Verfahren',
'Microfiche' => 'Mikrofilm',
......
'Sum per' => 'Summe per',
'Summen- und Saldenliste' => 'Summen- und Saldenliste',
'Superuser name' => 'Datenbankadministrator',
'Switch Menu on / off' => 'Men&uuml; ein- / ausklappen',
'System' => 'System',
'TODO list' => 'Aufgabenliste',
'TODO list options' => 'Aufgabenlistenoptionen',

Auch abrufbar als: Unified diff