Skip Menu |

This queue is for tickets about the RT-OnlineDocs CPAN distribution.

Report information
The Basics
Id: 70051
Status: resolved
Priority: 0/
Queue: RT-OnlineDocs

People
Owner: Nobody in particular
Requestors: howie [...] thingy.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.08
Fixed in: (no value)



Subject: RT::OnlineDocs broken in RT 4.x
Two bugs: 1) The Callback for adding the API Docs menu doesn't work anymore 2) The frames structure falls foul of anti-frame code in RT4 (as far as I can tell - TOC.html and Body.html work individually, just not in the frameset) Attached is a patch to change the layout to a basic CSS-based two-column layout, and also to provide the new Privileged callback required in 4.x. It ought to still work in 3.8.x too, since the older callback is still present.
Subject: RT-OnlineDocs-rt4-fixes.patch
Only in RT-OnlineDocs-0.08-hj/html/Callbacks/RT-OnlineDocs/Elements/Tabs: Privileged diff -ru RT-OnlineDocs-0.08/html/Developer/Perldoc/index.html RT-OnlineDocs-0.08-hj/html/Developer/Perldoc/index.html --- RT-OnlineDocs-0.08/html/Developer/Perldoc/index.html 2007-09-23 20:03:30.000000000 +0100 +++ RT-OnlineDocs-0.08-hj/html/Developer/Perldoc/index.html 2011-08-05 16:08:06.000000000 +0100 @@ -7,18 +7,23 @@ a { text-decoration: none } a:hover { text-decoration: underline } a:focus { background: #99ff99; border: 1px black dotted } + +#apidoc-content: { float: left; } +#apidoc-toc { float: right; width: 250px; border-left: 1px solid black; padding-left: 3px; } --></style> </head> -<FRAMESET COLS="*, 250"> - <FRAME src="Body.html" name="podBody"> - <FRAME src="TOC.html" name="podTOC"> - <NOFRAMES> - <a style="display: none" href="#toc">Table of Contents</a> -<& Body.html, Target => '' &> +<body> +<div id="apidoc-container"> +<div id="apidoc-toc"> <h1><a id="toc">Table of Contents</a></h1> <& TOC.html, Target => '' &> - </NOFRAMES> -</FRAMESET> +</div> + <div id="apidoc-content"> + <a style="display: none" href="#toc">Table of Contents</a> +<& Body.html, Target => '', n => $n &> + </div> +</div> +</body> <%args> $n => undef </%args> diff -ru RT-OnlineDocs-0.08/html/Developer/Perldoc/TOC.html RT-OnlineDocs-0.08-hj/html/Developer/Perldoc/TOC.html --- RT-OnlineDocs-0.08/html/Developer/Perldoc/TOC.html 2007-09-23 20:32:28.000000000 +0100 +++ RT-OnlineDocs-0.08-hj/html/Developer/Perldoc/TOC.html 2011-08-05 16:13:01.000000000 +0100 @@ -58,7 +58,7 @@ } } $m->print( ( '&nbsp;&nbsp;&nbsp;' x $indent ) - . '<a target="podBody" href="Body.html?n=' . $file . '">' . $name + . '<a href="index.html?n=' . $file . '">' . $name . '</a><br />' ."\n" ); $prev = $file; }
On Fri Aug 05 11:21:19 2011, howie@thingy.com wrote: Show quoted text
> Two bugs: > > 1) The Callback for adding the API Docs menu doesn't work anymore > 2) The frames structure falls foul of anti-frame code in RT4 (as far as > I can tell - TOC.html and Body.html work individually, just not in the > frameset) > > Attached is a patch to change the layout to a basic CSS-based two-column > layout, and also to provide the new Privileged callback required in 4.x. > It ought to still work in 3.8.x too, since the older callback is still > present.
Hi Howie It appears that your patch didn't include the new file you created. Can you send a new patch with -N? Thanks -kevin
Here is my /opt/rt4/share/html/Callbacks/RT-OnlineDocs/Elements/Tabs <%init> if ($session{'CurrentUser'}->UserObj->HasRight( Right => 'SuperUser', Object => $RT::System, )) { my $tabs = Menu; $tabs->child( 'zz-docs' => title => loc('API Docs'), path => $RT::WebURL . 'Developer/Perldoc/index.html' ); } </%init>
RT::OnlineDocs is now on CPAN, and works with RT 4.0 and above. It features your CSS solution, as well as a great many other changes. Thanks, - Alex