Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9d551488

Von Sven Schöling vor etwa 14 Jahren hinzugefügt

Revert "Das (linksseitige) HTML-Menü komaptibel zum Textbrowser Links gemacht."

This reverts commit d2d63d80de28c7356e81eb1143d729e4415cd1b4.

Das klappt so nicht. kopf.pl kann durchaus auch alleine aufgerufen werden ohne menu einzubinden, und selbst wenn darf framesize nicht einfach als globale Variable rumlungern. Siehe Dokumentation doc/INSTALL.fcgi (Entwicklungsaspekte) und Doku in SL/Dispatcher.pm Zeile 71.

Unterschiede anzeigen:

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

  
114
# is there any better solution then the JS-Link for Back? Possibly with the callback variable?
115

  
116 114
print qq|
117 115
<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;">
118 116
<script language='JavaScript' src='js/switchmenuframe.js'></script>
119 117
<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
120
  <tr>|;
121
   if ($framesize ne 240) {    # only show the the links in case of "links" in $ENV{HTTP_USER_AGENT} (see sub _calc_framesize)
122
      print qq|
123
      <td  style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
118
  <tr>
119
    <td  style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
124 120
      [<a href="JavaScript:Switch_Menu(|.$framesize.qq|);" title="| . $locale->text('Switch Menu on / off') . qq|">| . $locale->text('Menu') . qq|</a>]
125 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>]
126 122
      &nbsp;[<a href="JavaScript:top.main_window.print();" title="| . $locale->text('Hardcopy') . qq|">| . $locale->text('Print') . qq|</a>]
127 123
      &nbsp;[<a href="Javascript:top.main_window.history.back();" title="| . $locale->text('Go one step back') . qq|">| . $locale->text('Back') . qq|</a>]
128 124
      &nbsp;[<a href="Javascript:top.main_window.history.forward();" title="| . $locale->text('Go one step forward') . qq|">| . $locale->text('Fwd') . qq|</a>]
129
      </td>|;
130
   }
131
   print qq|
125
      <!-- is there any better solution for Back? Possibly with the callback variable? -->
126
    </td>
132 127
    <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
133 128
  . $login . $datum . qq| <script>writeclock()</script>&nbsp;
134 129
    </td>
bin/mozilla/menu.pl
33 33
# CHANGE LOG:
34 34
#   DS. 2002-03-25  Created
35 35
#  2004-12-14 - New Optik - Marco Welter <mawe@linux-studio.de>
36
#  2010-08-19 - Icons for sub entries and one click
36
#  2010-08-19 - Icons for sub entries and one click 
37 37
#               JS switchable HTML-menu - Sven Donath <lxo@dexo.de>
38 38
#######################################################################
39 39

  
......
45 45

  
46 46
my $menufile = "menu.ini";
47 47
my $mainlevel;
48
our $framesize;
49 48

  
50 49
# end of main
51 50

  
......
83 82

  
84 83
  my $form      = $main::form;
85 84
  my $locale    = $main::locale;
86
     $framesize = _calc_framesize(); # how to get it into kopf.pl or vice versa?
85
  my $framesize = _calc_framesize(); # how to get it into kopf.pl or vice versa?
87 86

  
88 87
  $mainlevel = $form->{level};
89 88
  $mainlevel =~ s/\Q$mainlevel\E--//g;
......
98 97

  
99 98
|;
100 99
  print qq|<div align="left">\n<table width="|
101
    . ($framesize-2)
100
    . $framesize
102 101
    . qq|" border="0">\n|;
103 102

  
104 103
  &section_menu($menu);
......
200 199
          if ($zeige) {
201 200
            if (scalar @chunks <= 1) {
202 201
              print
203
                qq|<tr><td class="hover" height="16" >$spacer|
202
                qq|<tr><td class="hover" height="16" >$spacer| 
204 203
                . $menu->menuitem(\%myconfig, \%$form, $item, $level) ;
205

  
206
            if (-f "image/icons/16x16/$label_icon" && ($framesize ne 240))
207
             { print
208
                qq|<img src="image/icons/16x16/$label_icon" border="0" style="vertical-align:text-top" title="|
209
                . $label
210
                . qq|">&nbsp;&nbsp;| }
204
              
205
            if (-f "image/icons/16x16/$label_icon")
206
             { print 
207
                qq|<img src="image/icons/16x16/$label_icon" border="0" style="vertical-align:text-top" title="| 
208
                . $label 
209
                . qq|">&nbsp;&nbsp;| } 
211 210
            else {
212
                   if ($framesize ne 240) {
213
                    print qq|<img src="image/unterpunkt.png" border="0" style="vertical-align:text-top">|;
214
                   }
211
               print qq|<img src="image/unterpunkt.png" border="0" style="vertical-align:text-top">|;   
215 212
                }
216

  
213
                
217 214
               print
218 215
                 qq|$label</a></td></tr>\n|;
219 216
            } else {
......
234 231
      } else {
235 232
        my $ml_ = $form->escape($ml);
236 233
        print
237
          qq|<tr><td class="bg" height="24" align="left" valign="middle">
238
          <a href="menu.pl?action=acc_menu&level=$ml_" class="nohover" title="$label">|;
239
              if ($framesize ne 240) {
240
                  print qq|<img src="image/icons/24x24/$item.png" border="0" style="vertical-align:middle" title="$label">|;
241
              }
242
          print qq|&nbsp;$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|;
234
          qq|<tr><td class="bg" height="24" align="left" valign="middle"><a href="menu.pl?action=acc_menu&level=$ml_" class="nohover" title="$label"><img src="image/icons/24x24/$item.png" border="0" style="vertical-align:middle" title="$label">&nbsp;$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|;
243 235
        &section_menu($menu, $item);
244 236

  
245 237
        print qq|\n|;

Auch abrufbar als: Unified diff