some bug fixes

This commit is contained in:
JT Smith 2007-07-26 02:19:46 +00:00
parent 13a50c74c8
commit 168ba28ccf
2 changed files with 16 additions and 21 deletions

View file

@ -14,6 +14,7 @@ use Getopt::Long;
use WebGUI::Session; use WebGUI::Session;
use WebGUI::Workflow; use WebGUI::Workflow;
use WebGUI::Storage; use WebGUI::Storage;
use WebGUI::Asset;
my $toVersion = "7.4.0"; # make this match what version you're going to my $toVersion = "7.4.0"; # make this match what version you're going to
my $quiet; # this line required my $quiet; # this line required
@ -43,7 +44,7 @@ finish($session); # this line required
sub addWikiAttachments { sub addWikiAttachments {
my $session = shift; my $session = shift;
print "\tAdding support for attachmetns to wikis.\n" unless ($quiet); print "\tAdding support for attachments to wikis.\n" unless ($quiet);
my $db = $session->db; my $db = $session->db;
$db->write("alter table WikiMaster add column allowAttachments int not null default 0"); $db->write("alter table WikiMaster add column allowAttachments int not null default 0");
my $sth = $db->read("select storageId from WikiPage"); my $sth = $db->read("select storageId from WikiPage");
@ -54,6 +55,8 @@ sub addWikiAttachments {
} }
} }
$db->write("alter table WikiPage drop column storageId"); $db->write("alter table WikiPage drop column storageId");
my $root = WebGUI::Asset->getRoot($session);
$root->addChild({title=>"Tempspace", url=>"tempspace", className=>"WebGUI::Asset::Wobject::Folder"}, "tempspace0000000000000");
} }
#------------------------------------------------- #-------------------------------------------------

View file

@ -285,19 +285,18 @@ a:visited { color: '.$form->get("visitedLinkColor").'; }
$f->hidden(name=>"step", value=>"7"); $f->hidden(name=>"step", value=>"7");
$f->hidden(name=>"styleTemplateId", value=>$style->getId); $f->hidden(name=>"styleTemplateId", value=>$style->getId);
$f->yesNo(name=>"contactUs",label=>"Contact Us"); $f->yesNo(name=>"contactUs",label=>"Contact Us");
$f->yesNo(name=>"aboutUs",label=>"About Us",
extras=>'onchange="document.getElementById(\'aboutUsContent_formId_row\').style.display=\'table-row\';"');
$f->HTMLArea(name=>"aboutUsContent", richEditId=>"PBrichedit000000000002",
value=>"Put your about us content here.");
if (isIn("WebGUI::Asset::Wobject::Collaboration", @{$session->config->get("assets")})) {
$f->yesNo(name=>"forums",label=>"Forums",
extras=>'onchange="document.getElementById(\'forumNames_formId_row\').style.display=\'table-row\'"');
$f->textarea(name=>"forumNames",subtext=>"One forum name per line", value=>"Support\nGeneral Discussion");
$f->yesNo(name=>"news",label=>"News");
}
$f->yesNo(name=>"calendar",label=>"Calendar"); $f->yesNo(name=>"calendar",label=>"Calendar");
$f->yesNo(name=>"wiki",label=>"Wiki"); $f->yesNo(name=>"wiki",label=>"Wiki");
$f->yesNo(name=>"search",label=>"Search"); $f->yesNo(name=>"search",label=>"Search");
$f->yesNo(name=>"aboutUs",label=>"About Us");
$f->HTMLArea(name=>"aboutUsContent", richEditId=>"PBrichedit000000000002",
value=>"Put your about us content here.");
if (isIn("WebGUI::Asset::Wobject::Collaboration", @{$session->config->get("assets")})) {
$f->yesNo(name=>"news",label=>"News");
$f->yesNo(name=>"forums",label=>"Forums");
$f->textarea(name=>"forumNames",subtext=>"One forum name per line",
value=>"Support\nGeneral Discussion");
}
$f->submit; $f->submit;
$legend = "Initial Pages"; $legend = "Initial Pages";
$output .= $f->print; $output .= $f->print;
@ -535,12 +534,12 @@ return props[propName];
top: 5%; left: 10%; position: absolute; top: 5%; left: 10%; position: absolute;
} }
#initBoxSleeve { #initBoxSleeve {
overflow: auto; width: 770px;
width: 700px;
height: 475px; height: 475px;
} }
a { color: black; } a { color: black; }
a:visited { color: black;} a:visited { color: black;}
body { margin: 0; }
'; ';
} }
else { else {
@ -551,16 +550,9 @@ return props[propName];
} }
'; ';
} }
if ($session->form->process("step") == 6) {
$page .= '
#forumNames_formId_row, #aboutUsContent_formId_row {
display: none;
}
';
}
$page .= ' </style> </head> <body> $page .= ' </style> </head> <body>
<div id="initBox"><h1>'.$legend.'</h1><div id="initBoxSleeve"> '.$output.'</div></div> <div id="initBox"><h1>'.$legend.'</h1><div id="initBoxSleeve"> '.$output.'</div></div>
<img src="'.$session->url->extras('background.jpg').'" style="border-style:none;position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;" /> <img src="'.$session->url->extras('background.jpg').'" style="border-style:none;position: absolute; top: 0; left: 0; width: 100%; height: 1000px; z-index: 1;" />
</body> </html>'; </body> </html>';
$session->http->setCacheControl("none"); $session->http->setCacheControl("none");
$session->http->setMimeType("text/html"); $session->http->setMimeType("text/html");