first style goes in place for the 7.0 series. yay!

This commit is contained in:
JT Smith 2006-03-28 05:33:20 +00:00
parent 1ad61ac861
commit 6ff2562e19
4 changed files with 40 additions and 37 deletions

View file

@ -30,7 +30,8 @@ sub addNewStyles {
my $styleCounter = 0;
foreach my $style (qw(style1 style2 style3)) {
$styleCounter++;
opendir(DIR,$style);
print "\t\tStyle $styleCounter\n";
opendir(DIR,"7fixup/".$style);
my @files = readdir(DIR);
closedir(DIR);
$assetCounter++;
@ -49,22 +50,22 @@ sub addNewStyles {
next if $file eq "..";
next if $file eq ".";
$assetCounter++;
my $newId = "7.0-style".sprintf("%013d",$assetCounter);
if ($file =~ m/\.[png|jpg|gif]+$/) {
my $asset = $folder->addChild({
className=>"WebGUI::Asset::File::Image",
title=>$file,
menuTitle=>$file,
url=>$file,
url=>$style."/".$file,
ownerUserId=>'3',
groupIdView=>'7',
groupIdEdit=>'12',
templateId=>'PBtmpl0000000000000088',
filename=>$file
},"7.0-style".sprintf("%013d",$assetCounter));
$asset->getStorageLocation->addFileFromFileSystem($style."/".$file);
$asset->getStorageLocation->addFileFromFilesystem("7fixup/".$style."/".$file);
$asset->getStorageLocation->generateThumbnail($file);
} elsif ($file =~ m/.tmpl$/) {
open(FILE,"<".$style."/".$file);
open(FILE,"<7fixup/".$style."/".$file);
my $first = 1;
my $head = 0;
my %properties = (className=>"WebGUI::Asset::Template");
@ -87,7 +88,7 @@ sub addNewStyles {
close(FILE);
my $template = $folder->addChild(\%properties, $properties{id});
} elsif ($file =~ m/.nav$/) {
open(FILE,"<".$style."/".$file);
open(FILE,"<"."7fixup/".$style."/".$file);
my $first = 1;
my $head = 0;
my %properties = (className=>"WebGUI::Asset::Wobject::Navigation", styleTemplateId=>'PBtmpl0000000000000060');
@ -103,7 +104,7 @@ sub addNewStyles {
close(FILE);
my $template = $folder->addChild(\%properties, "7.0-style".sprintf("%013d",$assetCounter));
} elsif ($file =~ m/.snippet$/) {
open(FILE,"<".$style."/".$file);
open(FILE,"<7fixup/".$style."/".$file);
my $head = 0;
my %properties = (className=>"WebGUI::Asset::Snippet");
while (my $line = <FILE>) {
@ -118,11 +119,13 @@ sub addNewStyles {
}
}
}
# $session->db->write("update assetData set templateId='stevesnewid' where templateId in ('B1bNjWVtzSjsvGZh9lPz_A','9tBSOV44a9JPS8CcerOvYw')");
# my $asset = WebGUI::Asset->new($session,'9tBSOV44a9JPS8CcerOvYw');
# $asset->purge if defined $asset;
# my $asset = WebGUI::Asset->new($session,'B1bNjWVtzSjsvGZh9lPz_A');
# $asset->purge if defined $asset;
print "\t\tSetting all pages to use new style.\n";
$session->db->write("update wobject set styleTemplateId='stevestyle000000000001' where styleTemplateId in ('B1bNjWVtzSjsvGZh9lPz_A','9tBSOV44a9JPS8CcerOvYw')");
print "\t\tDeleting old styles.\n";
my $asset = WebGUI::Asset->new($session,'9tBSOV44a9JPS8CcerOvYw');
$asset->purge if defined $asset;
my $asset = WebGUI::Asset->new($session,'B1bNjWVtzSjsvGZh9lPz_A');
$asset->purge if defined $asset;
}
#-------------------------------------------------

View file

@ -1,8 +1,8 @@
#id:PBnav00000000000000701
#title:RootTab Level 1
#menutitle:RootTab Level 1
#url:roottab_level1
#startpointtype:relative to root
#startpoint:/a/b/(+2)
#startpointtype:relativeToRoot
#startpoint:2
#relativestoinclude:descendants
#descendantendpoint:./a/(+1)
#descendantendpoint:1
#templateId:stevenav00000000000001

View file

@ -1,6 +1,6 @@
#id:zUdLnzRY5LtpblSLrw3G-Q
#stevestyle000000000001
#title:Style 01
#menutitle:Style 01
#menuTitle:Style 01
#url:style_01
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
@ -38,8 +38,8 @@
<div id="gui">
^L("","","PBtmpl0000000000000044");
<div style="clear:both;padding-right:12px;">^AdminToggle;</div>
^AssetProxy(6-9_style01/gui_bottom.jpg);<br />
<a href="http://www.plainblack.com/webgui"><img src="^FileUrl(6-9_style01/webgui_btn.jpg);" style="border:none;" alt="WebGUI Button" /></a>
^AssetProxy(style1/gui_bottom.jpg);<br />
<a href="http://www.webgui.org"><img src="^FileUrl(style1/webgui_btn.jpg);" style="border:none;" alt="WebGUI Button" /></a>
</div>
</div>
</body>
@ -58,7 +58,7 @@
#main
{
width:800px;
background: url('^FileUrl(6-9_style01/main_bg.jpg);') repeat-y;
background: url('^FileUrl(style1/main_bg.jpg);') repeat-y;
height:100%;
margin-left:auto;
margin-right:auto;
@ -76,7 +76,7 @@
{
width:800px;
height:133px;
background: url('^FileUrl(6-9_style01/header.jpg);') no-repeat;
background: url('^FileUrl(style1/header.jpg);') no-repeat;
margin-bottom:0px;
position:relative;
}
@ -93,7 +93,7 @@
#main #mainContent
{
background: url('^FileUrl(6-9_style01/orange_left01.jpg);') left top no-repeat;
background: url('^FileUrl(style1/orange_left01.jpg);') left top no-repeat;
width:100%;
height:100%;
margin-top:0px;
@ -139,50 +139,50 @@
height:25px;
display:block;
float:left;
background: url('^FileUrl(6-9_style01/nav1_off_left.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav1_off_left.jpg);') no-repeat top left;
}
#main .mainNav_2 div .left {
background: url('^FileUrl(6-9_style01/nav2_off_left.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav2_off_left.jpg);') no-repeat top left;
}
#main .mainNav_1 div .center, #main .mainNav_2 div .center {
height:25px;
display:block;
float:left;
background: url('^FileUrl(6-9_style01/nav1_off_center.jpg);') repeat-x top left;
background: url('^FileUrl(style1/nav1_off_center.jpg);') repeat-x top left;
color:white;
font-family:arial, verdana;
font-size:8pt;
}
#main .mainNav_2 div .center {
background: url('^FileUrl(6-9_style01/nav2_off_center.jpg);') repeat-x top left;
background: url('^FileUrl(style1/nav2_off_center.jpg);') repeat-x top left;
}
#main .mainNav_1 div .right, #main .mainNav_2 div .right {
width:10px;
height:25px;
display:block;
float:left;
background: url('^FileUrl(6-9_style01/nav1_off_right.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav1_off_right.jpg);') no-repeat top left;
}
#main .mainNav_2 div .right {
background: url('^FileUrl(6-9_style01/nav2_off_right.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav2_off_right.jpg);') no-repeat top left;
}
#main .mainNav_1 div.navOn .left {
background: url('^FileUrl(6-9_style01/nav1_on_left.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav1_on_left.jpg);') no-repeat top left;
}
#main .mainNav_1 div.navOn .center {
background: url('^FileUrl(6-9_style01/nav1_on_center.jpg);') repeat-x top left;
background: url('^FileUrl(style1/nav1_on_center.jpg);') repeat-x top left;
}
#main .mainNav_1 div.navOn .right {
background: url('^FileUrl(6-9_style01/nav1_on_right.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav1_on_right.jpg);') no-repeat top left;
}
#main .mainNav_2 div.navOn .left {
background: url('^FileUrl(6-9_style01/nav2_on_left.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav2_on_left.jpg);') no-repeat top left;
}
#main .mainNav_2 div.navOn .center {
background: url('^FileUrl(6-9_style01/nav2_center_on.jpg);') repeat-x top left;
background: url('^FileUrl(style1/nav2_center_on.jpg);') repeat-x top left;
}
#main .mainNav_2 div.navOn .right {
background: url('^FileUrl(6-9_style01/nav2_on_right.jpg);') no-repeat top left;
background: url('^FileUrl(style1/nav2_on_right.jpg);') no-repeat top left;
}
#main .mainNav_1 div.navOn a:link, #main .mainNav_1 div.navOn a:visited, #main .mainNav_2 div.navOn a:link, #main .mainNav_2 div.navOn a:visited {
color:black;

View file

@ -1,6 +1,6 @@
#id:fk9EMfHpG_KYEFjZ5jD9dA
#stevenav00000000000001
#title:Style 01 Nav
#menutitle:Style 01 Nav
#menuTitle:Style 01 Nav
#url:style01_nav
<tmpl_if displayTitle>
<h2><tmpl_var title></h2>