Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision de763d70

Von Stephan Köhler vor etwa 19 Jahren hinzugefügt

  • ID de763d70b4b2e0501565e579fb4726e033594589
  • Vorgänger 9a22f14c
  • Nachfolger dcebb8bc

Neues Menu von Holger L.
Wenn manuell eingespielt vorher makesymlinks und locales.pl ausführen!
-Auswahl über Programm
>Benutzereinstellungen "Setup Menu" New/Old,
dann ab- und neuanmelden.
-Die Auswahl im der Adminmaske funktioniert noch nicht!

Unterschiede anzeigen:

SL/Menu.pm
67 67
  }
68 68

  
69 69
  my $level = $form->escape($item);
70
  my $str   =
70

  
71
  my $str =
71 72
    qq|<a href=$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|;
73

  
72 74
  my @vars = qw(module action target href);
73 75

  
74 76
  if ($self->{$item}{href}) {
......
97 99
  return $str;
98 100
}
99 101

  
102
sub menuitemNew {
103
  my ($self, $myconfig, $form, $item) = @_;
104

  
105
  my $module = $form->{script};
106
  my $action = "section_menu";
107

  
108
  #if ($self->{$item}{module}) {
109
  $module = $self->{$item}{module};
110

  
111
  #}
112
  if ($self->{$item}{action}) {
113
    $action = $self->{$item}{action};
114
  }
115

  
116
  my $level = $form->escape($item);
117
  my $str   =
118
    qq|$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|;
119
  my @vars = qw(module action target href);
120

  
121
  if ($self->{$item}{href}) {
122
    $str  = qq|$self->{$item}{href}|;
123
    @vars = qw(module target href);
124
  }
125

  
126
  map { delete $self->{$item}{$_} } @vars;
127

  
128
  # add other params
129
  foreach my $key (keys %{ $self->{$item} }) {
130
    $str .= "&" . $form->escape($key, 1) . "=";
131
    ($value, $conf) = split /=/, $self->{$item}{$key}, 2;
132
    $value = $myconfig->{$value} . "/$conf" if ($conf);
133
    $str .= $form->escape($value, 1);
134
  }
135

  
136
  $str .= " ";
137

  
138
}
139

  
100 140
sub access_control {
101 141
  $main::lxdebug->enter_sub();
102 142

  
SL/User.pm
841 841
    currency dateformat dbconnect dbdriver dbhost dbport dboptions
842 842
    dbname dbuser dbpasswd email fax name numberformat password
843 843
    printer role sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen
844
    anfragen lieferantenbestellungen einkaufsrechnungen steuernummer ustid duns);
844
    anfragen lieferantenbestellungen einkaufsrechnungen steuernummer ustid duns menustyle);
845 845

  
846 846
  $main::lxdebug->leave_sub();
847 847

  
bin/mozilla/am.pl
282 282
	    <table>
283 283
	      <tr valign=top>
284 284
		<td><input name=category type=radio class=radio value=A $checked{A_}>&nbsp;|
285
    . $locale->text('Asset')
286
    . qq|\n<br>
285
    . $locale->text('Asset') . qq|\n<br>
287 286
		<input name=category type=radio class=radio value=L $checked{L_}>&nbsp;|
288
    . $locale->text('Liability')
289
    . qq|\n<br>
287
    . $locale->text('Liability') . qq|\n<br>
290 288
		<input name=category type=radio class=radio value=Q $checked{Q_}>&nbsp;|
291
    . $locale->text('Equity')
292
    . qq|\n<br>
289
    . $locale->text('Equity') . qq|\n<br>
293 290
		<input name=category type=radio class=radio value=I $checked{I_}>&nbsp;|
294
    . $locale->text('Revenue')
295
    . qq|\n<br>
291
    . $locale->text('Revenue') . qq|\n<br>
296 292
		<input name=category type=radio class=radio value=E $checked{E_}>&nbsp;|
297
    . $locale->text('Expense')
298
    . qq|</td>
293
    . $locale->text('Expense') . qq|</td>
299 294
		<td width=50>&nbsp;</td>
300 295
		<td>
301 296
		<input name=charttype type=radio class=radio value="H" $checked{H}>&nbsp;|
302 297
    . $locale->text('Heading') . qq|<br>
303 298
		<input name=charttype type=radio class=radio value="A" $checked{A}>&nbsp;|
304
    . $locale->text('Account')
305
    . qq|</td>
299
    . $locale->text('Account') . qq|</td>
306 300
	      </tr>
307 301
	    </table>
308 302
	  </td>
......
316 310
	    <table>
317 311
	      <tr>
318 312
		<th align=left>|
319
      . $locale->text('Is this a summary account to record')
320
      . qq|</th>
313
      . $locale->text('Is this a summary account to record') . qq|</th>
321 314
		<td>
322 315
		<input name=AR type=checkbox class=checkbox value=AR $form->{AR}>&nbsp;|
323 316
      . $locale->text('AR')
......
345 338
	      <tr>
346 339
		<td>
347 340
		<input name=AR_amount type=checkbox class=checkbox value=AR_amount $form->{AR_amount}>&nbsp;|
348
      . $locale->text('Revenue')
349
      . qq|\n<br>
341
      . $locale->text('Revenue') . qq|\n<br>
350 342
		<input name=AR_paid type=checkbox class=checkbox value=AR_paid $form->{AR_paid}>&nbsp;|
351
      . $locale->text('Receipt')
352
      . qq|\n<br>
343
      . $locale->text('Receipt') . qq|\n<br>
353 344
		<input name=AR_tax type=checkbox class=checkbox value=AR_tax $form->{AR_tax}>&nbsp;|
354 345
      . $locale->text('Tax') . qq|
355 346
		</td>
356 347
		<td>
357 348
		<input name=AP_amount type=checkbox class=checkbox value=AP_amount $form->{AP_amount}>&nbsp;|
358
      . $locale->text('Expense/Asset')
359
      . qq|\n<br>
349
      . $locale->text('Expense/Asset') . qq|\n<br>
360 350
		<input name=AP_paid type=checkbox class=checkbox value=AP_paid $form->{AP_paid}>&nbsp;|
361
      . $locale->text('Payment')
362
      . qq|\n<br>
351
      . $locale->text('Payment') . qq|\n<br>
363 352
		<input name=AP_tax type=checkbox class=checkbox value=AP_tax $form->{AP_tax}>&nbsp;|
364 353
      . $locale->text('Tax') . qq|
365 354
		</td>
366 355
		<td>
367 356
		<input name=IC_sale type=checkbox class=checkbox value=IC_sale $form->{IC_sale}>&nbsp;|
368
      . $locale->text('Revenue')
369
      . qq|\n<br>
357
      . $locale->text('Revenue') . qq|\n<br>
370 358
		<input name=IC_cogs type=checkbox class=checkbox value=IC_cogs $form->{IC_cogs}>&nbsp;|
371
      . $locale->text('COGS')
372
      . qq|\n<br>
359
      . $locale->text('COGS') . qq|\n<br>
373 360
		<input name=IC_taxpart type=checkbox class=checkbox value=IC_taxpart $form->{IC_taxpart}>&nbsp;|
374 361
      . $locale->text('Tax') . qq|
375 362
		</td>
376 363
		<td>
377 364
		<input name=IC_income type=checkbox class=checkbox value=IC_income $form->{IC_income}>&nbsp;|
378
      . $locale->text('Revenue')
379
      . qq|\n<br>
365
      . $locale->text('Revenue') . qq|\n<br>
380 366
		<input name=IC_expense type=checkbox class=checkbox value=IC_expense $form->{IC_expense}>&nbsp;|
381
      . $locale->text('Expense')
382
      . qq|\n<br>
367
      . $locale->text('Expense') . qq|\n<br>
383 368
		<input name=IC_taxservice type=checkbox class=checkbox value=IC_taxservice $form->{IC_taxservice}>&nbsp;|
384 369
      . $locale->text('Tax') . qq|
385 370
		</td>
......
1419 1404
  <tr>
1420 1405
    <td></td>
1421 1406
    <th align=left><input name=sictype type=checkbox style=checkbox value="H" $checked> |
1422
    . $locale->text('Heading')
1423
    . qq|</th>
1407
    . $locale->text('Heading') . qq|</th>
1424 1408
  <tr>
1425 1409
  <tr>
1426 1410
    <th align=right>| . $locale->text('Description') . qq|</th>
......
1605 1589
  %countrycodes = User->country_codes;
1606 1590
  $countrycodes = '';
1607 1591
  foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
1608
                keys %countrycodes) {
1592
                keys %countrycodes
1593
    ) {
1609 1594
    $countrycodes .=
1610 1595
      ($myconfig{countrycode} eq $key)
1611 1596
      ? "<option selected value=$key>$countrycodes{$key}\n"
......
1639 1624

  
1640 1625
  $form->header;
1641 1626

  
1627
  if ($myconfig{menustyle} eq "old") { $oldS = "checked"; }
1628
  else { $newS = "checked"; }
1629

  
1642 1630
  print qq|
1643 1631
<body>
1644 1632

  
......
1709 1697
	  <th align=right>| . $locale->text('Stylesheet') . qq|</th>
1710 1698
	  <td><select name=usestylesheet>$selectstylesheet</select></td>
1711 1699
	</tr>
1700
	<tr>
1701
	  <th align=right>| . $locale->text('Setup Menu') . qq|</th>
1702
	  <td><input name=menustyle type=radio class=radio value=neu $newS>&nbsp;New
1703
  		  <input name=menustyle type=radio class=radio value=old $oldS>&nbsp;Old</td>
1704
	</tr>	
1712 1705
	<input name=printer type=hidden value="$myconfig{printer}">
1713 1706
	<tr class=listheading>
1714 1707
	  <th colspan=2>&nbsp;</th>
......
1731 1724
	</tr>
1732 1725
	<tr class=listheading>
1733 1726
	  <th colspan=2>|
1734
    . $locale->text('Last Numbers & Default Accounts')
1735
    . qq|</th>
1727
    . $locale->text('Last Numbers & Default Accounts') . qq|</th>
1736 1728
	</tr>
1737 1729
	<tr>
1738 1730
	  <td colspan=2>
......
1759 1751
	      </tr>
1760 1752
	      <tr>
1761 1753
		<td colspan=2>|
1762
    . $locale->text('Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies')
1754
    . $locale->text(
1755
    'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies'
1756
    )
1763 1757
    . qq|<br><input name=curr size=40 value="$form->{defaults}{curr}"></td>
1764 1758
	      </tr>
1765 1759
            </table>
......
1772 1766
		<th align=right nowrap>| . $locale->text('Last Invoice Number') . qq|</th>
1773 1767
		<td><input name=invnumber size=10 value=$form->{defaults}{invnumber}></td>
1774 1768
                <th align=right nowrap>|
1775
    . $locale->text('Last Customer Number')
1776
    . qq|</th>
1769
    . $locale->text('Last Customer Number') . qq|</th>
1777 1770
		<td><input name=customernumber size=10 value=$form->{defaults}{customernumber}></td>
1778 1771
	      </tr>
1779 1772
	      <tr>
1780 1773
		<th align=right nowrap>|
1781
    . $locale->text('Last Sales Order Number')
1782
    . qq|</th>
1774
    . $locale->text('Last Sales Order Number') . qq|</th>
1783 1775
		<td><input name=sonumber size=10 value=$form->{defaults}{sonumber}></td>
1784 1776
                <th align=right nowrap>|
1785
    . $locale->text('Last Vendor Number')
1786
    . qq|</th>
1777
    . $locale->text('Last Vendor Number') . qq|</th>
1787 1778
		<td><input name=vendornumber size=10 value=$form->{defaults}{vendornumber}></td>
1788 1779
	      </tr>
1789 1780
	      <tr>
1790 1781
		<th align=right nowrap>|
1791
    . $locale->text('Last Purchase Order Number')
1792
    . qq|</th>
1782
    . $locale->text('Last Purchase Order Number') . qq|</th>
1793 1783
		<td><input name=ponumber size=10 value=$form->{defaults}{ponumber}></td>
1794 1784
                <th align=right nowrap>|
1795
    . $locale->text('Last Article Number')
1796
    . qq|</th>
1785
    . $locale->text('Last Article Number') . qq|</th>
1797 1786
		<td><input name=articlenumber size=10 value=$form->{defaults}{articlenumber}></td>
1798 1787
	      </tr>
1799 1788
	      <tr>
1800 1789
		<th align=right nowrap>|
1801
    . $locale->text('Last Sales Quotation Number')
1802
    . qq|</th>
1790
    . $locale->text('Last Sales Quotation Number') . qq|</th>
1803 1791
		<td><input name=sqnumber size=10 value=$form->{defaults}{sqnumber}></td>
1804 1792
                <th align=right nowrap>|
1805
    . $locale->text('Last Service Number')
1806
    . qq|</th>
1793
    . $locale->text('Last Service Number') . qq|</th>
1807 1794
		<td><input name=servicenumber size=10 value=$form->{defaults}{servicenumber}></td>
1808 1795
	      </tr>
1809 1796
	      <tr>
......
1944 1931
      <table>
1945 1932
	<tr>
1946 1933
	  <td>|
1947
    . $locale->text('Enforce transaction reversal for all dates')
1948
    . qq|</th>
1934
    . $locale->text('Enforce transaction reversal for all dates') . qq|</th>
1949 1935
	  <td><input name=revtrans class=radio type=radio value="1" $checked{Y}> |
1950 1936
    . $locale->text('Yes')
1951 1937
    . qq| <input name=revtrans class=radio type=radio value="0" $checked{N}> |
bin/mozilla/login.pl
84 84
  <tr>
85 85
    <td class=login align=center><a href="http://www.lx-office.org" target=_top><img src="image/lx-office-erp.png" border=0></a>
86 86
<h1 class=login align=center>|
87
    . $locale->text('Version')
88
    . qq| $form->{version}
87
    . $locale->text('Version') . qq| $form->{version}
89 88
</h1>
90 89

  
91 90
<p>
......
153 152
  }
154 153

  
155 154
  # made it this far, execute the menu
156
  $form->{callback} =
157
    "menu.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
155
  if ($user->{menustyle} eq "neu") {
156
    $form->{callback} =
157
      "menunew.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
158
  } else {
159
    $form->{callback} =
160
      "menu.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
161
  }
158 162

  
159 163
  $form->redirect;
160 164

  
bin/mozilla/menunew.pl
1
#=====================================================================
2
# LX-Office ERP
3
# Copyright (C) 2004
4
# Based on SQL-Ledger Version 2.1.9
5
# Web http://www.lx-office.org
6
#
7
######################################################################
8
# SQL-Ledger Accounting
9
# Copyright (c) 1998-2002
10
#
11
#  Author: Dieter Simader
12
#   Email: dsimader@sql-ledger.org
13
#     Web: http://www.sql-ledger.org
14
#
15
#  Contributors: Christopher Browne
16
#
17
# This program is free software; you can redistribute it and/or modify
18
# it under the terms of the GNU General Public License as published by
19
# the Free Software Foundation; either version 2 of the License, or
20
# (at your option) any later version.
21
#
22
# This program is distributed in the hope that it will be useful,
23
# but WITHOUT ANY WARRANTY; without even the implied warranty of
24
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
# GNU General Public License for more details.
26
# You should have received a copy of the GNU General Public License
27
# along with this program; if not, write to the Free Software
28
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
#######################################################################
30
#
31
# thre frame layout with refractured menu
32
#
33
# CHANGE LOG:
34
#   DS. 2002-03-25  Created
35
#  2004-12-14 - New Optik - Marco Welter <mawe@linux-studio.de>
36
#######################################################################
37

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

  
42
1;
43

  
44
# end of main
45

  
46
sub display {
47

  
48
  $form->header;
49

  
50
  &clock_line;
51

  
52
  &acc_menu;
53

  
54
  print qq|
55
<iframe src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo&path=$form->{path}" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
56
<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.
57
</p>
58
</iframe>
59
</body>
60
</html>
61

  
62
|;
63

  
64
}
65

  
66
sub clock_line {
67

  
68
  $login = "["
69
    . $form->{login}
70
    . " - <a href=\"login.pl?path="
71
    . $form->{"path"}
72
    . "&password="
73
    . $form->{"password"}
74
    . "&action=logout\" target=\"_top\">"
75
    . $locale->text('Logout')
76
    . "</a>] ";
77
  my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
78
      $Jahr,     $Wochentag, $Jahrestag, $Sommerzeit)
79
    = localtime(time);
80
  my $CTIME_String = localtime(time);
81
  $Monat     += 1;
82
  $Jahrestag += 1;
83
  $Monat     = $Monat < 10     ? $Monat     = "0" . $Monat     : $Monat;
84
  $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
85
  $Jahr += 1900;
86
  my @Wochentage = ("Sonntag",    "Montag",  "Dienstag", "Mittwoch",
87
                    "Donnerstag", "Freitag", "Samstag");
88
  my @Monatsnamen = ("",       "Januar",    "Februar", "M&auml;rz",
89
                     "April",  "Mai",       "Juni",    "Juli",
90
                     "August", "September", "Oktober", "November",
91
                     "Dezember");
92
  $datum =
93
      $Wochentage[$Wochentag] . ", der "
94
    . $Monatstag . "."
95
    . $Monat . "."
96
    . $Jahr . " - ";
97

  
98
  #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
99
  $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
100
  print qq|
101
<script type="text/javascript">
102
<!--
103
var clockid=new Array()
104
var clockidoutside=new Array()
105
var i_clock=-1
106
var thistime= new Date()
107
var hours= | . $Stunden . qq|;
108
var minutes= | . $Minuten . qq|;
109
var seconds= | . $Sekunden . qq|;
110
if (eval(hours) <10) {hours="0"+hours}
111
if (eval(minutes) < 10) {minutes="0"+minutes}
112
if (seconds < 10) {seconds="0"+seconds}
113
//var thistime = hours+":"+minutes+":"+seconds
114
var thistime = hours+":"+minutes
115

  
116
function writeclock() {
117
	i_clock++
118
	if (document.all \|\| document.getElementById \|\| document.layers) {
119
		clockid[i_clock]="clock"+i_clock
120
		document.write("<font family=arial size=2><span id='"+clockid[i_clock]+"' style='position:relative'>"+thistime+"</span></font>")
121
	}
122
}
123

  
124
function clockon() {
125
	thistime= new Date()
126
	hours=thistime.getHours()
127
	minutes=thistime.getMinutes()
128
	seconds=thistime.getSeconds()
129
	if (eval(hours) <10) {hours="0"+hours}
130
	if (eval(minutes) < 10) {minutes="0"+minutes}
131
	if (seconds < 10) {seconds="0"+seconds}
132
	//thistime = hours+":"+minutes+":"+seconds
133
	thistime = hours+":"+minutes
134

  
135
	if (document.all) {
136
		for (i=0;i<=clockid.length-1;i++) {
137
			var thisclock=eval(clockid[i])
138
			thisclock.innerHTML=thistime
139
		}
140
	}
141

  
142
	if (document.getElementById) {
143
		for (i=0;i<=clockid.length-1;i++) {
144
			document.getElementById(clockid[i]).innerHTML=thistime
145
		}
146
	}
147
	var timer=setTimeout("clockon()",60000)
148
}
149
//window.onload=clockon
150
//-->
151
</script>
152
<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
153
	<tr>
154
		<td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
155
    . $login
156
    . $datum
157
    . qq| <script>writeclock()</script>&nbsp;
158
		</td>
159
	</tr>
160
</table>
161
|;
162
}
163

  
164
sub acc_menu {
165
  $mainlevel = $form->{level};
166
  $mainlevel =~ s/$mainlevel--//g;
167
  my $menu = new Menu "$menufile";
168
  $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
169
  $menu = new Menu "$form->{login}_$menufile"
170
    if (-f "$form->{login}_$menufile");
171

  
172
  $| = 1;
173

  
174
  print qq|
175
<script type="text/javascript">
176
<!--
177
var isDOM = (document.getElementById ? true : false); 
178
var isIE4 = ((document.all && !isDOM) ? true : false);
179
var isNS4 = (document.layers ? true : false);
180
function getRef(id) {
181
	if (isDOM) return document.getElementById(id);
182
	if (isIE4) return document.all[id];
183
	if (isNS4) return document.layers[id];
184
}
185
function getSty(id) {
186
	return (isNS4 ? getRef(id) : getRef(id).style);
187
} 
188
var popTimer = 0;
189
var litNow = new Array();
190
function popOver(menuNum, itemNum) {
191
	clearTimeout(popTimer);
192
	hideAllBut(menuNum);
193
	litNow = getTree(menuNum, itemNum);
194
	changeCol(litNow, true);
195
	targetNum = menu[menuNum][itemNum].target;
196
	if (targetNum > 0) {
197
		thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
198
		thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
199
		with (menu[targetNum][0].ref) {
200
			left = parseInt(thisX + menu[targetNum][0].x);
201
			top = parseInt(thisY + menu[targetNum][0].y);
202
			visibility = 'visible';
203
		}
204
	}
205
}
206
function popOut(menuNum, itemNum) {
207
	if ((menuNum == 0) && !menu[menuNum][itemNum].target)
208
		hideAllBut(0)
209
	else
210
		popTimer = setTimeout('hideAllBut(0)', 500);
211
}
212
function getTree(menuNum, itemNum) {
213
	itemArray = new Array(menu.length);
214
	while(1) {
215
		itemArray[menuNum] = itemNum;
216
		if (menuNum == 0) return itemArray;
217
		itemNum = menu[menuNum][0].parentItem;
218
		menuNum = menu[menuNum][0].parentMenu;
219
	}
220
}
221
function changeCol(changeArray, isOver) {
222
	for (menuCount = 0; menuCount < changeArray.length; menuCount++) {
223
		if (changeArray[menuCount]) {
224
			newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
225
			with (menu[menuCount][changeArray[menuCount]].ref) {
226
				if (isNS4) bgColor = newCol;
227
				else backgroundColor = newCol;
228
			}
229
		}
230
	}
231
}
232
function hideAllBut(menuNum) {
233
	var keepMenus = getTree(menuNum, 1);
234
	for (count = 0; count < menu.length; count++)
235
		if (!keepMenus[count])
236
			menu[count][0].ref.visibility = 'hidden';
237
	changeCol(litNow, false);
238
}
239
function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) {
240
	this.isVert = isVert;
241
	this.popInd = popInd
242
	this.x = x;
243
	this.y = y;
244
	this.width = width;
245
	this.overCol = overCol;
246
	this.backCol = backCol;
247
	this.borderClass = borderClass;
248
	this.textClass = textClass;
249
	this.parentMenu = null;
250
	this.parentItem = null;
251
	this.ref = null;
252
}
253
function Item(text, href, frame, length, spacing, target) {
254
	this.text = text;
255
	this.href = href;
256
	this.frame = frame;
257
	this.length = length;
258
	this.spacing = spacing;
259
	this.target = target;
260
	this.ref = null;
261
}
262
function writeMenus() {
263
	if (!isDOM && !isIE4 && !isNS4) return;
264
	for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) {
265
		var str = '', itemX = 0, itemY = 0;
266
		for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem]) {
267
			var itemID = 'menu' + currMenu + 'item' + currItem;
268
			var w = (isVert ? width : length);
269
			var h = (isVert ? length : width);
270
			if (isDOM \|\| isIE4) {
271
				str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
272
				if (backCol) str += 'background: ' + backCol + '; ';
273
				str += '" ';
274
			}
275
			if (isNS4) {
276
				str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';
277
				if (backCol) str += 'bgcolor="' + backCol + '" ';
278
			}
279
			if (borderClass) str += 'class="' + borderClass + '" ';
280
			str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';
281
			str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '"><tr><td align="left" height="' + (h - 7) + '">' + '<a class="' + textClass + '" href="' + href + '"' + (frame ? ' target="' + frame + '">' : '>') + text + '</a></td>';
282
			if (target > 0) {
283
				menu[target][0].parentMenu = currMenu;
284
				menu[target][0].parentItem = currItem;
285
				if (popInd) str += '<td class="' + textClass + '" align="right">' + popInd + '</td>';
286
			}
287
			str += '</tr></table>' + (isNS4 ? '</layer>' : '</div>');
288
			if (isVert) itemY += length + spacing;
289
			else itemX += length + spacing;
290
		}
291
		if (isDOM) {
292
			var newDiv = document.createElement('div');
293
			document.getElementsByTagName('body').item(0).appendChild(newDiv);
294
			newDiv.innerHTML = str;
295
			ref = newDiv.style;
296
			ref.position = 'absolute';
297
			ref.visibility = 'hidden';
298
		}
299
		if (isIE4) {
300
			document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');
301
			ref = getSty('menu' + currMenu + 'div');
302
		}
303
		if (isNS4) {
304
			ref = new Layer(0);
305
			ref.document.write(str);
306
			ref.document.close();
307
		}
308
		for (currItem = 1; currItem < menu[currMenu].length; currItem++) {
309
			itemName = 'menu' + currMenu + 'item' + currItem;
310
			if (isDOM \|\| isIE4) menu[currMenu][currItem].ref = getSty(itemName);
311
			if (isNS4) menu[currMenu][currItem].ref = ref.document[itemName];
312
		}
313
	}
314
	with(menu[0][0]) {
315
		ref.left = x;
316
		ref.top = y;
317
		ref.visibility = 'visible';
318
   }
319
}
320
var menu = new Array();
321
var defOver = '#AAAAFF', defBack = '#8888DD';
322
var defLength = 22;
323
menu[0] = new Array();
324
menu[0][0] = new Menu(false, '', 5, 18, 19, '#AAAAFF', '#AAAAFF', '', 'itemText');
325

  
326
|;
327

  
328
  #
329
  &section_menu($menu);
330

  
331
  print qq|
332
var popOldWidth = window.innerWidth;
333
nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');
334
if (isNS4) document.captureEvents(Event.CLICK);
335
document.onclick = clickHandle;
336
function clickHandle(evt) {
337
	if (isNS4) document.routeEvent(evt);
338
	hideAllBut(0);
339
}
340
function moveRoot() {
341
	with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);
342
}
343
//  End -->
344
</script>
345
<style>
346
<!--
347

  
348
.itemBorder { border: 1px solid black }
349
.itemText { text-decoration: none; color: #FFFFFF; font: 12px Arial, Helvetica }
350

  
351
-->
352
</style>
353

  
354
<!--body bgcolor="#AAAAff" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff" topmargin="0" leftmargin="0"  marginwidth="0" marginheight="0"-->
355
<BODY scrolling="no" topmargin="0" leftmargin="0"  marginwidth="0" marginheight="0" style="margin: 0" onLoad="writeMenus(); clockon();" onResize="if (isNS4) nsResizeHandler()">
356
<!--BODY marginwidth="0" marginheight="0" style="margin: 0" onLoad="writeMenus()" onResize="if (isNS4) nsResizeHandler()"-->
357

  
358

  
359
<table bgcolor="#AAAAFF" width="100%" border="0" cellpadding="0" cellspacing="0">
360
<tr><td height="21"><font size="1"> </font></td></tr></table>
361

  
362
|;
363

  
364
  print qq|
365
  
366
|;
367

  
368
}
369

  
370
sub section_menu {
371
  my ($menu, $level) = @_;
372

  
373
  # build tiered menus
374
  my @menuorder = $menu->access_control(\%myconfig, $level);
375
  $main = 0;
376

  
377
  #$pm=0;
378
  while (@menuorder) {
379
    $item  = shift @menuorder;
380
    $label = $item;
381
    $ml    = $item;
382
    $label =~ s/$level--//g;
383
    $ml    =~ s/--.*//;
384
    $label = $locale->text($label);
385
    $label =~ s/ /&nbsp;/g;
386
    $menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
387

  
388
    if ($menu->{$item}{submenu}) {
389
      $menu->{$item}{$item} = !$form->{$item};
390

  
391
      # Untermenü
392
      if ($mlz{"s$ml"} > 1) { $z = $mlz{"s$ml"}++; $sm = 1; }
393
      else { $z = $sm; $mlz{"s$ml"}++; }
394
      print
395
        qq|menu[$mlz{$ml}][$z] = new Item('$label', '#', '', defLength, 0, |
396
        . ++$pm
397
        . qq|);\n|;
398
      $sm = 1;
399
      print qq|menu[$pm] = new Array();\n|;
400
      print
401
        qq|menu[$pm][0] = new Menu(true, '', 85, 0, 140, defOver, defBack, 'itemBorder', 'itemText');\n|;
402
      map { shift @menuorder } grep /^$item/, @menuorder;
403
      &section_menu($menu, $item);
404
      map { shift @menuorder } grep /^$item/, @menuorder;
405
    } else {
406
      if ($menu->{$item}{module}) {
407

  
408
        #Untermenüpunkte
409
        $target = $menu->{$item}{target};
410
        $uri    = $menu->menuitemNew(\%myconfig, \%$form, $item, $level);
411

  
412
        #print qq|<tr><td class="hover" height="13" >$spacer<img src="image/unterpunkt.png"  style="vertical-align:text-top">|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a></td></tr>\n|;
413
        print
414
          qq|menu[$pm][$sm] = new Item('$label', '$uri', '$target', defLength, 0, 0);\n|;
415
        $sm++;
416
      } else {    # Hauptmenu
417
        my $ml_ = $form->escape($ml);
418
        $mm++;
419
        $pm++;
420
        %mlz   = ($ml, $pm, "s$ml", 1);
421
        $sm    = 1;
422
        $breit = 20 + length($label) * 5;
423
        print
424
          qq|menu[0][$mm] = new Item('  $label', '#', '', $breit, 10, $pm);	\n|;
425
        print qq|menu[$pm] = new Array();\n|;
426
        print
427
          qq|menu[$pm][0] = new Menu(true, '>', 0, 22, 160, defOver, defBack, 'itemBorder', 'itemText');\n|;
428

  
429
        #print qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle">&nbsp;<a href="menu.pl?path=bin/mozilla&action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|;
430
        &section_menu($menu, $item);
431

  
432
        #print qq|<br>\n|;
433
      }
434
    }
435
  }
436
}
locale/de/all
297 297
  'Edit Warehouse'              => 'Lager bearbeiten',
298 298
  'Employee'                    => 'Bearbeiter',
299 299
  'Enforce transaction reversal for all dates' => 'Gegenbuchungen f?r jeden Zeitraum aktualisieren',
300
  'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte W?hrungsk?rzel mit maximal 3 Buchstaben auff?hren; Ihre eigene LandesW?hrung zuerst (z.B. EUR:USD:CAD)',
301 300
  'Equity'                      => 'Passiva',
302 301
  'Exch'                        => 'Wechselkurs.',
303 302
  'Exchangerate'                => 'Wechselkurs',
......
634 633
  'Service Items'               => 'Dienstleistungen',
635 634
  'Service Number missing!'     => 'Dienstleistungsnummer fehlt!',
636 635
  'Services'                    => 'Dienstleistungen',
636
  'Setup Menu'                  => '',
637 637
  'Setup Templates'             => 'Vorlagen ausw?hlen',
638 638
  'Ship'                        => 'Lagerausgang',
639 639
  'Ship Merchandise'            => 'Waren versenden',
locale/de/am
64 64
  'Edit Template'               => 'Vorlage bearbeiten',
65 65
  'Edit Warehouse'              => 'Lager bearbeiten',
66 66
  'Enforce transaction reversal for all dates' => 'Gegenbuchungen f?r jeden Zeitraum aktualisieren',
67
  'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte W?hrungsk?rzel mit maximal 3 Buchstaben auff?hren; Ihre eigene LandesW?hrung zuerst (z.B. EUR:USD:CAD)',
68 67
  'Equity'                      => 'Passiva',
69 68
  'Expense'                     => 'Aufwandskonto',
70 69
  'Expense Account'             => 'Aufwandskonto',
......
117 116
  'Salesman'                    => 'Vertreter',
118 117
  'Save'                        => 'Speichern',
119 118
  'Service Items'               => 'Dienstleistungen',
119
  'Setup Menu'                  => 'Setup Menu',
120 120
  'Signature'                   => 'Unterschrift',
121 121
  'Standard Industrial Codes'   => 'SIC',
122 122
  'Steuersatz'                  => 'Steuersatz',
locale/de/locales.pl
62 62
      &scanmenu("$basedir/$item");
63 63
    }
64 64
  }
65
  
65

  
66
  if ($file eq 'menunew.pl') {
67
    foreach $item (@menufiles) {
68
      &scanmenu("$basedir/$item");
69
    }
70
  }
71

  
66 72
  $file =~ s/\.pl//;
67 73

  
68 74

  
makesymlinks
3 3
# Erstellt die benotigten Symlinks
4 4

  
5 5
ln -vsf login.pl admin.pl
6
for i in ap ar bp ca cp ct gl ic ir is menu oe pe rc rp datev licenses fa ustva; do
6
for i in ap ar bp ca cp ct gl ic ir is menu oe pe rc rp datev licenses fa ustva menunew; do
7 7
  ln -vsf am.pl $i.pl
8 8
done
9 9

  

Auch abrufbar als: Unified diff