Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 74e345d0

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

  • ID 74e345d0723f81c5f6668f7dc532dbf2cd245f23
  • Vorgänger 883a5485
  • Nachfolger 2dacd279

menujs strict

Unterschiede anzeigen:

bin/mozilla/menujs.pl
35 35
#  2004-12-14 - Holger Lindemann
36 36
#######################################################################
37 37

  
38
$menufile = "menu.ini";
38
my $menufile = "menu.ini";
39 39
use SL::Menu;
40 40
use CGI::Carp qw(fatalsToBrowser);
41 41

  
42
use strict;
43

  
44
my $locale;
45

  
42 46
1;
43 47

  
44 48
# end of main
45 49

  
46 50
sub display {
51

  
52
  my $form     = $main::form;
53

  
47 54
  $form->{callback}   = $form->unescape($form->{callback});
48 55
  $form->{callback} ||= "login.pl?action=company_logo";
49 56

  
......
67 74

  
68 75
sub clock_line {
69 76

  
70
  $fensterlink="menujs.pl?action=display";
71
  $fenster = "["."<a href=\"$fensterlink\" target=\"_blank\">neues Fenster</a>]";
77
  my $form     = $main::form;
72 78

  
73
  $login = "[Nutzer "
79
  my $fensterlink="menujs.pl?action=display";
80
  my $fenster = "["."<a href=\"$fensterlink\" target=\"_blank\">neues Fenster</a>]";
81

  
82
  my $login = "[Nutzer "
74 83
    . $form->{login}
75 84
    . " - <a href=\"login.pl?action=logout\" target=\"_top\">"
76 85
    . $locale->text('Logout')
......
90 99
                     "April",  "Mai",       "Juni",    "Juli",
91 100
                     "August", "September", "Oktober", "November",
92 101
                     "Dezember");
93
  $datum =
102
  my $datum =
94 103
      $Wochentage[$Wochentag] . ", der "
95 104
    . $Monatstag . "."
96 105
    . $Monat . "."
97 106
    . $Jahr . " - ";
98 107

  
99 108
  #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
100
  $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
109
  my $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
101 110
  print qq|
102 111
<script type="text/javascript">
103 112
<!--
......
123 132
}
124 133

  
125 134
sub acc_menu {
135

  
136
  my $form     = $main::form;
137
  my %myconfig = %main::myconfig;
138

  
126 139
  $locale = Locale->new($myconfig{countrycode}, "menu");
127
  $mainlevel = $form->{level};
140
  my $mainlevel = $form->{level};
128 141
  $mainlevel =~ s/$mainlevel--//g;
129 142
  my $menu = new Menu "$menufile";
130 143

  
......
361 374
sub section_menu {
362 375
  my ($menu, $level) = @_;
363 376

  
377
  my $form     = $main::form;
378
  my %myconfig = %main::myconfig;
379

  
364 380
  # build tiered menus
365 381
  my @menuorder = $menu->access_control(\%myconfig, $level);
366
  $main = 0;
382
  my $main = 0;
367 383

  
368 384
  #$pm=0;
369
  $shlp=0;
385
  my $shlp=0;
386
  my (%mlz, $sm, $z, $pm, $mm);
370 387
  while (@menuorder) {
371
    $item  = shift @menuorder;
372
    $label = $item;
373
    $ml    = $item;
388
    my $item  = shift @menuorder;
389
    my $label = $item;
390
    my $ml    = $item;
374 391
    $label =~ s/$level--//g;
375 392
    $ml    =~ s/--.*//;
376 393
    $label = $locale->text($label);
......
403 420
      if ($menu->{$item}{module}) {
404 421

  
405 422
        #Untermen?punkte
406
        $target = $menu->{$item}{target};
407
        $uri    = $menu->menuitem_js(\%myconfig, \%$form, $item, $level);
423
        my $target = $menu->{$item}{target};
424
        my $uri    = $menu->menuitem_js(\%myconfig, \%$form, $item, $level);
408 425

  
409 426
        print
410 427
          qq|menu[$pm][$sm] = new Item('$label', '$uri', '$target', defLength, 0, 0);\n|;
......
416 433
        %mlz   = ($ml, $pm, "s$ml", 1);
417 434
        $shlp = $sm;
418 435
        $sm    = 1;
419
        $breit = 15 + length($label) * 6;
436
        my $breit = 15 + length($label) * 6;
420 437
        print
421 438
          qq|menu[0][$mm] = new Item('  $label', '#', '', $breit, 10, $pm);	\n|;
422 439
        print qq|menu[$pm] = new Array();\n|;

Auch abrufbar als: Unified diff