move each HTML Popup into its own name space and modify the functions to

accept a typical OO calling sequence with a $self as first argument.
This commit is contained in:
kestes%walrus.com 2002-05-01 02:01:49 +00:00
Родитель 39f46b41fe
Коммит 3703c7843c
4 изменённых файлов: 25 добавлений и 39 удалений

Просмотреть файл

@ -5,8 +5,8 @@
# application MajorCool.
# $Revision: 1.9 $
# $Date: 2001/07/20 19:05:04 $
# $Revision: 1.10 $
# $Date: 2002/05/01 02:01:49 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/MajorCoolWindow.pm,v $
# $Name: $
@ -38,15 +38,8 @@
# Contributor(s):
# We need this empty package namespace for our dependency analysis, it
# gets confused if there is not a package name which matches the file
# name and in this case the file is one of several possible
# implementations.
package HTMLPopUp::MajorCoolWindow;
package HTMLPopUp;
$VERSION = '#tinder_version#';
@ -73,6 +66,7 @@ $VERSION = '#tinder_version#';
sub page_header {
my $self = shift @_;
my (%args) = @_;
my ($html_time) = $main::LOCALTIME;
@ -346,6 +340,7 @@ sub Link {
# "windowwidth"=>"",
# );
my $self = shift @_;
my (%args) = @_;
my $out = '';
@ -389,10 +384,10 @@ sub Link {
# determine what a HTML row is.
$args{'windowheight'} = ($args{'windowheight'} ||
$DEFAULT_POPUP_HEIGHT);
$HTMLPopUp::DEFAULT_POPUP_HEIGHT);
$args{'windowwidth'} = ($args{'windowwidth'} ||
$DEFAULT_POPUP_WIDTH);
$HTMLPopUp::DEFAULT_POPUP_WIDTH);
#
@ -442,6 +437,7 @@ sub Link {
# don't forget that tip() is recursive )
sub test_define_structures {
my $self = shift @_;
my (@out) =();
push @out, "popuptxt = new Array();\n";

Просмотреть файл

@ -15,8 +15,8 @@
# $Revision: 1.6 $
# $Date: 2001/07/20 19:05:04 $
# $Revision: 1.7 $
# $Date: 2002/05/01 02:01:49 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/MozillaLayers.pm,v $
# $Name: $
@ -48,15 +48,9 @@
# Contributor(s):
# We need this empty package namespace for our dependency analysis, it
# gets confused if there is not a package name which matches the file
# name and in this case the file is one of several possible
# implementations.
package HTMLPopUp::MozillaLayers;
package HTMLPopUp;
$VERSION = '#tinder_version#';
@ -69,6 +63,7 @@ $VERSION = '#tinder_version#';
sub page_header {
my $self = shift @_;
my (%args) = @_;
my ($html_time) = $main::LOCALTIME;
@ -199,6 +194,7 @@ sub Link {
# "windowwidth"=>"",
# );
my $self = shift @_;
my (%args) = @_;
my $out = '';
@ -223,7 +219,7 @@ sub Link {
# set the defaults
$args{'windowtitle'} = $args{'windowtitle'} ||
$HTML::DEFAULT_POPUP_TITLE;
$HTMLPopUp::DEFAULT_POPUP_TITLE;
# the arguments:
@ -303,6 +299,7 @@ sub Link {
sub define_structures {
my $self = shift @_;
my (@out) =();
push @out, "\t<SCRIPT>\n";

Просмотреть файл

@ -3,8 +3,8 @@
# HTMLPopUp::None.pm - the implementation of the header and link
# command which will be used if no popup menus are desired.
# $Revision: 1.5 $
# $Date: 2001/07/20 19:05:05 $
# $Revision: 1.6 $
# $Date: 2002/05/01 02:01:49 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/None.pm,v $
# $Name: $
@ -36,15 +36,9 @@
# Contributor(s):
# We need this empty package namespace for our dependency analysis, it
# gets confused if there is not a package name which matches the file
# name and in this case the file is one of several possible
# implementations.
package HTMLPopUp::None;
package HTMLPopUp;
$VERSION = '#tinder_version#';
@ -62,6 +56,7 @@ $VERSION = '#tinder_version#';
sub page_header {
my $self = shift @_;
my (%args) = @_;
my ($html_time) = $main::LOCALTIME;
@ -128,7 +123,8 @@ EOF
sub Link {
my ($args) = @_;
my $self = shift @_;
my (%args) = @_;
my ($out) = '';
my ($name) ="";
@ -151,6 +147,7 @@ sub Link {
sub define_structures {
my $self = shift @_;
my (@out) = ();
return @out;

Просмотреть файл

@ -4,8 +4,8 @@
# windows using javascript layers written by Elena Dykhno.
# $Revision: 1.2 $
# $Date: 2002/02/25 19:32:42 $
# $Revision: 1.3 $
# $Date: 2002/05/01 02:01:49 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/PortableLayers.pm,v $
# $Name: $
@ -37,15 +37,8 @@
# Contributor(s):
# We need this empty package namespace for our dependency analysis, it
# gets confused if there is not a package name which matches the file
# name and in this case the file is one of several possible
# implementations.
package HTMLPopUp::PortableLayers;
package HTMLPopUp;
$VERSION = '#tinder_version#';
@ -58,6 +51,7 @@ $VERSION = '#tinder_version#';
sub page_header {
my $self = shift @_;
my (%args) = @_;
my ($html_time) = $main::LOCALTIME;
@ -242,6 +236,7 @@ sub Link {
# "windowwidth"=>"",
# );
my $self = shift @_;
my (%args) = @_;
my $out = '';
@ -264,7 +259,7 @@ sub Link {
# set the defaults
$args{'windowtitle'} = $args{'windowtitle'} ||
$DEFAULT_POPUP_TITLE;
$HTMLPopUp::DEFAULT_POPUP_TITLE;
# These characters inside the popupwindow will confuse my popup
@ -300,6 +295,7 @@ sub Link {
sub define_structures {
my $self = shift @_;
my $out = "</div>\n\n\n";