diff --git a/docs/upgrades/7fixup.pl b/docs/upgrades/7fixup.pl index 4ce3b958c..307bbe0d8 100644 --- a/docs/upgrades/7fixup.pl +++ b/docs/upgrades/7fixup.pl @@ -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 = ) { @@ -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; } #------------------------------------------------- diff --git a/docs/upgrades/7fixup/style1/roottab_level1.nav b/docs/upgrades/7fixup/style1/roottab_level1.nav index bba1c8ce1..d04959fa6 100644 --- a/docs/upgrades/7fixup/style1/roottab_level1.nav +++ b/docs/upgrades/7fixup/style1/roottab_level1.nav @@ -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) \ No newline at end of file +#descendantendpoint:1 +#templateId:stevenav00000000000001 diff --git a/docs/upgrades/7fixup/style1/style01.tmpl b/docs/upgrades/7fixup/style1/style01.tmpl index 82f45bd20..b864e5a02 100644 --- a/docs/upgrades/7fixup/style1/style01.tmpl +++ b/docs/upgrades/7fixup/style1/style01.tmpl @@ -1,6 +1,6 @@ -#id:zUdLnzRY5LtpblSLrw3G-Q +#stevestyle000000000001 #title:Style 01 -#menutitle:Style 01 +#menuTitle:Style 01 #url:style_01 @@ -38,8 +38,8 @@
^L("","","PBtmpl0000000000000044");
^AdminToggle;
- ^AssetProxy(6-9_style01/gui_bottom.jpg);
- WebGUI Button + ^AssetProxy(style1/gui_bottom.jpg);
+ WebGUI Button
@@ -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; diff --git a/docs/upgrades/7fixup/style1/style01_nav.tmpl b/docs/upgrades/7fixup/style1/style01_nav.tmpl index b1b34da4e..08b1d8c98 100644 --- a/docs/upgrades/7fixup/style1/style01_nav.tmpl +++ b/docs/upgrades/7fixup/style1/style01_nav.tmpl @@ -1,6 +1,6 @@ -#id:fk9EMfHpG_KYEFjZ5jD9dA +#stevenav00000000000001 #title:Style 01 Nav -#menutitle:Style 01 Nav +#menuTitle:Style 01 Nav #url:style01_nav