Main.pm
This module opens the windows for the application an launches modules such as Ledger.pm. For notes on past ideas to open windows look at MainNotes.html.
I have thought of a way that would allow us to let the user close a window and still have it be unregistered. If every window generated an onUnload method that would close the window but only if a global JavaScript variable was not set, then we open a small javascript window (uniquely named so as not to conflict - unregister_time) that submits to the portal and informs XIWA of the window that needs to be unregistered. After XIWA or the Portal unregisters the window name, they would send back code to close the popup window.
To implement this, we would have a global variable called CloseWindow=true. When you go to submit to another script, part of your submission process would be to set CloseWindow=false. The onUnload method would check to make sure that CloseWindow=true otherwise it does nothing. As long as we don't implement this onUnload event in any frames, but only do it on the master window then the master windows onUnload method would only be called when the window was actually being closed, the frameset was being redone or you had blown away the frameset and went to a single frame for output. This way we wouldn't have to try and figure out what frames were in the window (if any) and modify their variables when we go and close the Portal or XIWA.
If XIWA or the Portal were to be closed, we would have to modify each windows CloseWindow variable to be false so that it doesn't try and unregister the window from the Portal (as we are already doing that).
Accounts: The account mainteance screen will be in its own frameset.
Reports: The reporting engine will open in its own sets of windows
These are standard forms that a page in the accounting application will use: mainForm, menuForm, optionsForm
Commands:
display - shows a list of Ledgers to open (Main menu)
blank - simply returns a blank document
preferences
Details:
display: display a menu to choose a
ledger and open it. Also will display links to the reporting engine and account
and sub account maintenance.
Main Menu - XIWA 1.4.1 |
|||
---|---|---|---|
|
Ledger 1 | \/ | |
Open |
|
|
Reports |
| New | |
|
|
|
|
|
|
|||
Preferences |
Admin |
Will open a window for subsequent actions (ledger, reports, accounts, etc.). Each ledger window will have a unique random name. Account Maintenance window will be called Accounts and subAccounts will be SubAccounts. Report windows will have random names as well.
(When a window is called for user interaction from another window, the name of the calling window will be passed to the child if data needs to be retrieved from the child window.)
Open When the Open button/link is clicked, a ledger window is opened submitting to a frameset created by the Ledger module. It will use javascript to open a new window with random name and submit to
index.cgi?app=XIWA
&state=Main
&command=LedgerFrame
&ledgerCode=
&ledgerName=
&windowName={randomValue}
[ &topURL=""&bottomURL="" ]
This submission will
register the window name with the portal
output the frameset with the optional URLs or the defaults screens LedgerMenu and LedgerSummary.
Reports When the reports link is clicked a window is opened
index.cgi?app=XIWA
&state=Main
&command=reports
&ledgerCode=
&ledgerName=
&windowName={randomValue}
[ &topURL=""&bottomURL="" ]
This submission will
register the window name with the portal
output the report selection screen w/wo a ledger choice at the top
Preferences - shows screen with options for report window and ledger window sizes, w/wo statusbar etc. Also for accounts window.
Admin - List of admistrative functions. Will submit to the
Admin module
Account Maint.
Sub Account Maint.
Security
Delete Ledger
Subroutines
Navigation
The navigation system will be changed to a dropdown list instead of a banner menu
Copyright (c) 2001 HLR
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1; A copy of the
license is available at http://www.gnu.org/licenses/licenses.html#FDL.
Updated: $Id: Main.html,v 1.9 2002/08/12 19:30:06 moreejt Exp $