Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision da80eb32

Von Sven Donath vor etwa 14 Jahren hinzugefügt

  • ID da80eb32dd2158bc959a15db82002e58628d8a32
  • Vorgänger 9d551488
  • Nachfolger 48c946bd

Zweiter Anlauf: Das (linksseitige) HTML-Menü komaptibel zum Textbrowser Links gemacht.
(siehe Commits d2d63d und 9d5514)
Weiterhin werden die Bedienelemente (HTML-Links) im Kopf nur angezeigt,
wenn nicht der Browser Links oder Links2 verwendet wird, da sie auf JavaScript
basieren und somit keine Funktion hätten.
Entgegen der zurück genommenen Version arbeitet es jetzt ohne globale Variable.
Das Menü Ein-/Ausklappen ist jetzt voll JavaScript-basiert.

Unterschiede anzeigen:

bin/mozilla/kopf.pl
107 107
</script>
108 108
|;
109 109

  
110
#
111
my $framesize = _calc_framesize(); # framesize calculation as in menu.pl is only a quick and dirty hack here
112
                                   # it would be better to use a global or config variable
113

  
114 110
print qq|
115 111
<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;">
116 112
<script language='JavaScript' src='js/switchmenuframe.js'></script>
117 113
<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
118
  <tr>
119
    <td  style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
120
      [<a href="JavaScript:Switch_Menu(|.$framesize.qq|);" title="| . $locale->text('Switch Menu on / off') . qq|">| . $locale->text('Menu') . qq|</a>]
121
      &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>]
122
      &nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
123
      &nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
124
      &nbsp;[<a href="Javascript:top.main_window.history.forward();" title="| . $locale->text('Go one step forward') . qq|">| . $locale->text('Fwd') . qq|</a>]
125
      <!-- is there any better solution for Back? Possibly with the callback variable? -->
126
    </td>
114
  <tr>|;
115
   if ( !($ENV{HTTP_USER_AGENT} =~ /links/i) ) {    # do not show the the links in case of "links" in HTTP_USER_AGENT
116
      print qq|
117
       <td  style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
118
       [<a href="JavaScript:Switch_Menu();" title="| . $locale->text('Switch Menu on / off') . qq|">| . $locale->text('Menu') . qq|</a>]
119
       &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>]
120
       &nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
121
       &nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
122
       &nbsp;[<a href="Javascript:top.main_window.history.forward();" title="| . $locale->text('Go one step forward') . qq|">| . $locale->text('Fwd') . qq|</a>]
123
      </td>|;
124
   }
125
   print qq|
127 126
    <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
128 127
  . $login . $datum . qq| <script>writeclock()</script>&nbsp;
129 128
    </td>
......
132 131
</body>
133 132
</html>
134 133
|;
135

  
136
sub _calc_framesize {
137
  my $is_lynx_browser   = $ENV{HTTP_USER_AGENT} =~ /links/i;
138
  my $is_mobile_browser = $ENV{HTTP_USER_AGENT} =~ /mobile/i;
139
  my $is_mobile_style   = $::form->{stylesheet} =~ /mobile/i;
140

  
141
  return  $is_mobile_browser && $is_mobile_style ?  130
142
        : $is_lynx_browser                       ?  240
143
        :                                           180;
144
}
145

  
146 134
}
147 135

  
148 136
1;

Auch abrufbar als: Unified diff