Apply slightly modified versions of DBell's patches for:

- admin bar causing pages to extend forever
  - changing asset URL returning to old URL rather than new
  - performance indicators interfering with non-HTML data
This commit is contained in:
Drake 2006-09-26 04:59:15 +00:00
parent 4f7a3bf490
commit dbc34c6270
4 changed files with 23 additions and 4 deletions

View file

@ -21,6 +21,9 @@
- change: overlong alternate text for Weather Data icons shortened to basename
- fix: multiple problems with static export, including wrong asset context and wrong status messages
- fix: WebGUI::Asset->new interacting badly with caching
- fix: changeUrlConfirm returns to previous URL rather than new URL
- fix: performance indicators interfering with CSS
- fix: admin bar causes pages to extend forever
7.0.7
- rfe: Image Management (funded by Formation Design Systems)

View file

@ -107,7 +107,16 @@ sub contentHandler {
if ($output =~ /<\/title>/) {
$output =~ s/<\/title>/ : ${t} seconds<\/title>/i;
} else {
$session->output->print("\nPage generated in $t seconds.\n");
# Kludge.
my $mimeType = $session->http->getMimeType();
if ($mimeType eq 'text/css') {
$session->output->print("\n/* Page generated in $t seconds. */\n");
} elsif ($mimeType eq 'text/html') {
$session->output->print("\nPage generated in $t seconds.\n");
} else {
# Don't apply to content when we don't know how
# to modify it semi-safely.
}
}
} else {
$output = page($session);

View file

@ -1925,9 +1925,15 @@ sub www_changeUrlConfirm {
$old->purgeRevision if defined $old;
}
}
if ($self->session->form->param("proceed") eq "manageAssets") {
return $self->www_manageAssets;
$self->session->http->setRedirect($self->getUrl('func=manageAssets'));
return 'redirect';
} else {
$self->session->http->setRedirect($self->getUrl());
return 'redirect';
}
return undef;
}

View file

@ -92,7 +92,8 @@ function sp_draw() {
var c=3;
//slide panel
document.write('<div id="slidePanel" style="width:'+this.width+'px">');
document.write('<div id="slidePanel" style="width:'+this.width+'px; ');
document.write('height:'+this.height+'px; overflow:hidden">');
document.write('<div class="slidePanel" id="'+this.name+'" style="left:');
document.write(this.xpos+'px; top:'+this.ypos+'px; width:'+this.width);
document.write('px; height:'+this.height+'px; ')
@ -231,7 +232,7 @@ function createSlidePanelBar(name) {
this.ypos=0; // bar y-pos
this.width=160; // bar width
//this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:document.body.offsetHeight)-10; // bar height
this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:docElement.offsetHeight)-10; // bar height
this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:docElement.offsetHeight)*0.95; // bar height
this.buttonspace=slidePanelButtonHeight-1; // distance of panel buttons
this.panels=new Array(); // panels
this.addPanel=sp_addPanel; // add new panel to bar