removed JavaScript, StyleSheet, and RawHeadTags macros
This commit is contained in:
parent
722a214f80
commit
11385d7957
14 changed files with 28 additions and 277 deletions
|
|
@ -65,6 +65,9 @@
|
|||
otherwise be slow or complex pages. More details in migration.txt. The
|
||||
amount of the increase depends upon the complexity of the page, but now
|
||||
complex pages should render almost as fast as simple pages.
|
||||
- Removed the JavaScript, RawHeadTags, and StyleSheet macros in favor of
|
||||
adding a Head Block parameter to templates. This was needed in order to
|
||||
implement content chunking.
|
||||
- The SMTP mail backend has been replaced with a new API that's capable of
|
||||
sending attachments, HTML messages, and more. This will introduce many new
|
||||
options for developers.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#PBtmpl0000000000000001
|
||||
|
||||
^StyleSheet(^Extras;adminConsole/adminConsole.css);
|
||||
^JavaScript(^Extras;adminConsole/adminConsole.js);
|
||||
|
||||
<div id="application_title">
|
||||
<tmpl_var application.title>
|
||||
|
|
@ -65,3 +63,8 @@
|
|||
<script type="text/javascript" defer="defer">
|
||||
initAdminConsole(<tmpl_if application.title>true<tmpl_else>false</tmpl_if>,<tmpl_if submenu_loop>true<tmpl_else>false</tmpl_if>);
|
||||
</script>
|
||||
|
||||
~~~
|
||||
<link href="^Extras;adminConsole/adminConsole.css" type="text/css" />
|
||||
<script src="^Extras;adminConsole/adminConsole.js" type="text/javascript"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
</tmpl_if>
|
||||
|
||||
|
||||
^JavaScript("<tmpl_var session.config.extrasURL>/coolmenus/coolmenus4.js");
|
||||
<script type="text/javascript">
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2001 Thomas Brattli (webmaster@dhtmlcentral.com)
|
||||
|
|
@ -227,4 +226,6 @@ coolmenu.construct();
|
|||
layer-background-color: #006699;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
<script src="^Extras;/coolmenus/coolmenus4.js" type="text/javascript"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
<p><tmpl_var description></p>
|
||||
</tmpl_if>
|
||||
|
||||
^StyleSheet("<tmpl_var session.config.extrasURL>/Navigation/dtree/dtree.css");
|
||||
^JavaScript("<tmpl_var session.config.extrasURL>/Navigation/dtree/dtree.js");
|
||||
|
||||
<tmpl_if session.var.adminOn>
|
||||
<tmpl_var controls>
|
||||
|
|
@ -18,7 +16,7 @@
|
|||
<script type="text/javascript">
|
||||
<!--
|
||||
// Path to dtree directory
|
||||
_dtree_url = "<tmpl_var session.config.extrasURL>/Navigation/dtree/";
|
||||
_dtree_url = "^Extras;/Navigation/dtree/";
|
||||
|
||||
d = new dTree('d');
|
||||
<tmpl_loop page_loop>
|
||||
|
|
@ -35,3 +33,7 @@
|
|||
//-->
|
||||
</script>
|
||||
</div>
|
||||
~~~
|
||||
<link href="^Extras;/Navigation/dtree/dtree.css" type="text/css" />
|
||||
<script src="^Extras;/Navigation/dtree/dtree.js" type="text/javascript"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -592,6 +592,9 @@ sub updateDatabaseLinksAndSQLReport {
|
|||
#-------------------------------------------------
|
||||
sub updateTemplates {
|
||||
print "\tUpdating base templates for XHTML compliance, and a cleaner look.\n" unless ($quiet);
|
||||
$session->config->deleteFromHash("macros","JavaScript");
|
||||
$session->config->deleteFromHash("macros","RawHeadTags");
|
||||
$session->config->deleteFromHash("macros","StyleSheet");
|
||||
$session->db->write("alter table template add column headBlock text");
|
||||
my $template = WebGUI::Asset->new($session, "PBtmpl0000000000000003", "WebGUI::Asset::Template");
|
||||
if (defined $template) {
|
||||
|
|
@ -841,6 +844,15 @@ sub templateParsers {
|
|||
#-------------------------------------------------
|
||||
sub removeFiles {
|
||||
print "\tRemoving old unneeded files.\n" unless ($quiet);
|
||||
unlink '../../lib/WebGUI/Help/Macro_StyleSheet.pm';
|
||||
unlink '../../lib/WebGUI/Help/Macro_JavaScript.pm';
|
||||
unlink '../../lib/WebGUI/Help/Macro_RawHeadTags.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/Macro_StyleSheet.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/Macro_JavaScript.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/Macro_RawHeadTags.pm';
|
||||
unlink '../../lib/WebGUI/Macro/StyleSheet.pm';
|
||||
unlink '../../lib/WebGUI/Macro/JavaScript.pm';
|
||||
unlink '../../lib/WebGUI/Macro/RawHeadTags.pm';
|
||||
unlink '../../lib/WebGUI/MessageLog.pm';
|
||||
unlink '../../lib/WebGUI/Operation/MessageLog.pm';
|
||||
unlink '../../lib/WebGUI/ErrorHandler.pm';
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
package WebGUI::Help::Macro_JavaScript;
|
||||
|
||||
our $HELP = {
|
||||
|
||||
'java script' => {
|
||||
title => 'java script title',
|
||||
body => 'java script body',
|
||||
fields => [
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'macros using',
|
||||
namespace => 'Macros'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package WebGUI::Help::Macro_RawHeadTags;
|
||||
|
||||
our $HELP = {
|
||||
|
||||
'raw head tags' => {
|
||||
title => 'raw head tags title',
|
||||
body => 'raw head tags body',
|
||||
fields => [
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'macros using',
|
||||
namespace => 'Macros'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package WebGUI::Help::Macro_StyleSheet;
|
||||
|
||||
our $HELP = {
|
||||
|
||||
'style sheet' => {
|
||||
title => 'style sheet title',
|
||||
body => 'style sheet body',
|
||||
fields => [
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'macros using',
|
||||
namespace => 'Macros'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
package WebGUI::Macro::JavaScript;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Macro::JavaScript
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This Macro is a wrapper for $session->style->setScript, which puts a script
|
||||
tag into the head of the current page with the contents of the javascript
|
||||
found at the url that is passed in.
|
||||
|
||||
=head2 process ( url )
|
||||
|
||||
=head3 url
|
||||
|
||||
URL to the javascript to include in the page's header tags.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
$session->style->setScript(shift,{type=>'text/javascript'});
|
||||
return undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
package WebGUI::Macro::RawHeadTags;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Macro::RawHeadTags
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Macro for adding
|
||||
|
||||
=head2 process ( tags )
|
||||
|
||||
process is a wrapper for $session->style->setRawHeadTags();
|
||||
|
||||
=head3 text
|
||||
|
||||
Text that will be added to the HEAD tags for this page.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
$session->style->setRawHeadTags(shift);
|
||||
return "";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
package WebGUI::Macro::StyleSheet;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Macro::StyleSheet
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Macro for dynamically adding references to CSS documents to use in this page.
|
||||
|
||||
=head2 process ( url )
|
||||
|
||||
process is a wrapper around $session->style->setLink().
|
||||
|
||||
=head3 url
|
||||
|
||||
The URL to the CSS document.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
$session->style->setLink(shift,{
|
||||
type=>'text/css',
|
||||
rel=>'stylesheet'
|
||||
});
|
||||
return "";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package WebGUI::i18n::English::Macro_JavaScript;
|
||||
|
||||
our $I18N = {
|
||||
|
||||
'macroName' => {
|
||||
message => q|JavaScript|,
|
||||
lastUpdated => 1128839022,
|
||||
},
|
||||
|
||||
'java script title' => {
|
||||
message => q|JavaScript Macro|,
|
||||
lastUpdated => 1112466408,
|
||||
},
|
||||
|
||||
'java script body' => {
|
||||
message => q|
|
||||
|
||||
<b>^JavaScript();</b><br>
|
||||
This macro allows you to include javascript in the head section of the page. Just pass in the URL to the javascript file.
|
||||
<p>
|
||||
|,
|
||||
lastUpdated => 1112466919,
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package WebGUI::i18n::English::Macro_RawHeadTags;
|
||||
|
||||
our $I18N = {
|
||||
|
||||
'macroName' => {
|
||||
message => q|Raw Head Tags|,
|
||||
lastUpdated => 1128918979,
|
||||
},
|
||||
|
||||
'raw head tags title' => {
|
||||
message => q|Raw Head Tags Macro|,
|
||||
lastUpdated => 1112466408,
|
||||
},
|
||||
|
||||
'raw head tags body' => {
|
||||
message => q|
|
||||
|
||||
<b>^RawHeadTags(<i>"header tags"</i>);</b><br>
|
||||
This macro allows you to set some arbitrary tags in the head section of the page. Just pass in the text.
|
||||
<p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1112466919,
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package WebGUI::i18n::English::Macro_StyleSheet;
|
||||
|
||||
our $I18N = {
|
||||
|
||||
'macroName' => {
|
||||
message => q|Style Sheet|,
|
||||
lastUpdated => 1128919083,
|
||||
},
|
||||
|
||||
'style sheet title' => {
|
||||
message => q|Style Sheet Macro|,
|
||||
lastUpdated => 1112466408,
|
||||
},
|
||||
|
||||
'style sheet body' => {
|
||||
message => q|
|
||||
|
||||
<b>^StyleSheet();</b><br>
|
||||
This macro allows you to set a cascading style sheet in the head section of the page. Just pass in the URL to the CSS file.
|
||||
<p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1112466919,
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue