[ 1471218 ] 6.8.8: Unable to change Default Home Page
This commit is contained in:
parent
149789c11e
commit
29e4effdb9
3 changed files with 47 additions and 9 deletions
|
|
@ -110,6 +110,7 @@
|
||||||
- added [ 1201811 ] resizable textAreas
|
- added [ 1201811 ] resizable textAreas
|
||||||
- added [ 1376374 ] WebGUI should return a Last-Modified http/1.x header
|
- added [ 1376374 ] WebGUI should return a Last-Modified http/1.x header
|
||||||
- added [ 1216059 ] Admin Bar Made Sticky
|
- added [ 1216059 ] Admin Bar Made Sticky
|
||||||
|
- fix [ 1471218 ] 6.8.8: Unable to change Default Home Page
|
||||||
- fix [ 1463411 ] Denied content not getting expired or trashed
|
- fix [ 1463411 ] Denied content not getting expired or trashed
|
||||||
- fix [ 1461522 ] 6.8.7 Linking items in the page tree (PDF and other files)
|
- fix [ 1461522 ] 6.8.7 Linking items in the page tree (PDF and other files)
|
||||||
- fix [ 1465280 ] BR Tag in Outlook
|
- fix [ 1465280 ] BR Tag in Outlook
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,8 @@ Renders an asset selector.
|
||||||
sub toHtml {
|
sub toHtml {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $asset = WebGUI::Asset->newByDynamicClass($self->session, $self->get("value")) || WebGUI::Asset->getRoot($self->session);
|
my $asset = WebGUI::Asset->newByDynamicClass($self->session, $self->get("value")) || WebGUI::Asset->getRoot($self->session);
|
||||||
|
my $url = $asset->getUrl("op=formAssetTree;formId=".$self->get('id'));
|
||||||
|
$url .= ";classLimiter=".$self->get("class") if ($self->get("class"));
|
||||||
return WebGUI::Form::Hidden->new($self->session,
|
return WebGUI::Form::Hidden->new($self->session,
|
||||||
name=>$self->get("name"),
|
name=>$self->get("name"),
|
||||||
extras=>$self->get("extras"),
|
extras=>$self->get("extras"),
|
||||||
|
|
@ -110,7 +112,7 @@ sub toHtml {
|
||||||
)->toHtml
|
)->toHtml
|
||||||
.WebGUI::Form::Button->new($self->session,
|
.WebGUI::Form::Button->new($self->session,
|
||||||
value=>"...",
|
value=>"...",
|
||||||
extras=>'onclick="window.open(\''.$asset->getUrl("op=formAssetTree;classLimiter=".$self->get("class").";formId=".$self->get('id')).'\',\'assetPicker\',\'toolbar=no, location=no, status=no, directories=no, width=400, height=400\');"'
|
extras=>'onclick="window.open(\''.$url.'\',\'assetPicker\',\'toolbar=no, location=no, status=no, directories=no, width=400, height=400\');"'
|
||||||
)->toHtml;
|
)->toHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,24 +41,59 @@ sub www_formAssetTree {
|
||||||
my @crumb;
|
my @crumb;
|
||||||
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
||||||
foreach my $ancestor (@{$ancestors}) {
|
foreach my $ancestor (@{$ancestors}) {
|
||||||
push(@crumb,'<a href="'.$ancestor->getUrl("op=formAssetTree;classLimiter=".$session->form->process("classLimiter").";formId="
|
my $url = $ancestor->getUrl("op=formAssetTree;formId=".$session->form->process("formId"));
|
||||||
.$session->form->process("formId")).'">'.$ancestor->get("menuTitle").'</a>');
|
$url .= ";classLimiter=".$session->form->process("classLimiter") if ($session->form->process("classLimiter"));
|
||||||
|
push(@crumb,'<a href="'.$url.'" class="crumb">'.$ancestor->get("menuTitle").'</a>');
|
||||||
}
|
}
|
||||||
my $output = '<p>'.join(" > ", @crumb)."</p>\n";
|
my $output = '
|
||||||
|
<html><head>
|
||||||
|
<style type="text/css">
|
||||||
|
.base {
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #0f3ccc;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #000080;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.selectLink {
|
||||||
|
color: #cc7700;
|
||||||
|
}
|
||||||
|
.crumb {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
.crumbTrail {
|
||||||
|
padding: 3px;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
}
|
||||||
|
.traverse {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
</style></head><body>
|
||||||
|
<div class="base">
|
||||||
|
<div class="crumbTrail">'.join(" > ", @crumb)."</div><br />\n";
|
||||||
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
||||||
my $i18n = WebGUI::International->new($session);
|
my $i18n = WebGUI::International->new($session);
|
||||||
|
my $limit = $session->form->process("classLimiter");
|
||||||
foreach my $child (@{$children}) {
|
foreach my $child (@{$children}) {
|
||||||
next unless $child->canView;
|
next unless $child->canView;
|
||||||
if ($child->get("className") =~ /^$session->form->process("classLimiter")/) {
|
if ($limit eq "" || $child->get("className") =~ /^$limit/) {
|
||||||
$output .= '<a href="#" onclick="window.opener.document.getElementById(\''.$session->form->process("formId")
|
$output .= '<a href="#" class="selectLink" onclick="window.opener.document.getElementById(\''.$session->form->process("formId")
|
||||||
.'\').value=\''.$child->getId.'\';window.opener.document.getElementById(\''.
|
.'\').value=\''.$child->getId.'\';window.opener.document.getElementById(\''.
|
||||||
$session->form->process("formId").'_display\').value=\''.$child->get("title").'\';window.close();">['.$i18n->get("select").']</a> ';
|
$session->form->process("formId").'_display\').value=\''.$child->get("title").'\';window.close();">['.$i18n->get("select").']</a> ';
|
||||||
} else {
|
} else {
|
||||||
$output .= "[".$i18n->get("select")."] ";
|
$output .= '<span class="selectLink">['.$i18n->get("select").']</span> ';
|
||||||
}
|
}
|
||||||
$output .= '<a href="'.$child->getUrl("op=formAssetTree;classLimiter=".$session->form->process("classLimiter").";formId="
|
my $url = $child->getUrl("op=formAssetTree;formId=".$session->form->process("formId"));
|
||||||
.$session->form->process("formId")).'">'.$child->get("menuTitle").'</a>'."<br />\n";
|
$url .= ";classLimiter=".$session->form->process("classLimiter") if ($session->form->process("classLimiter"));
|
||||||
|
$output .= '<a href="'.$url.'" class="traverse">'.$child->get("menuTitle").'</a>'."<br />\n";
|
||||||
}
|
}
|
||||||
|
$output .= '</div></body></html>';
|
||||||
$session->style->useEmptyStyle("1");
|
$session->style->useEmptyStyle("1");
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue