[Mono-list] Live Monodoc server.

Piers Haken piersh@friskit.com
Sun, 10 Aug 2003 16:01:34 -0700


Here's a patch (untested):

Index: monodoc.ashx
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/monodoc/browser/web/monodoc.ashx,v
retrieving revision 1.9
diff -u -r1.9 monodoc.ashx
--- monodoc.ashx	8 Aug 2003 04:34:44 -0000	1.9
+++ monodoc.ashx	10 Aug 2003 22:45:54 -0000
@@ -81,6 +81,7 @@
 				w.WriteStartElement ("tree");
 				w.WriteAttributeString ("text",
n.Caption);
 				w.WriteAttributeString ("action",
"monodoc.ashx?tlink=3D"+n.tree.HelpSource.SourceID + "@" +
HttpUtility.UrlEncode (n.URL));
+				w.WriteAttributeString ("target",
"content");
 				if (n.Nodes !=3D null){
 					w.WriteAttributeString ("src",
"monodoc.ashx?tree=3D" + tree + "@" + i);
 				}
@@ -250,13 +251,15 @@
 	webFXTreeConfig.tIcon			=3D
'xtree/images/msdn/menu_tee.gif';
 =09
 	var tree =3D new WebFXTree('Mono Documentation');
+	var node;
 	");
 			for (int i =3D 0; i < help_tree.Nodes.Count; i++)
{
+				context.Response.Write ("node =3D ");
 				Node n =3D (Node)help_tree.Nodes [i];
 				if (n.Nodes.Count !=3D 0)
-					context.Response.Write
(@"tree.add(new WebFXLoadTreeItem('");
+					context.Response.Write (@"new
WebFXLoadTreeItem('");
 				else
-					context.Response.Write
(@"tree.add(new WebFXTreeItem('");
+					context.Response.Write (@"new
WebFXTreeItem('");
 				=09
 				context.Response.Write (n.Caption);
 				if (n.Nodes.Count !=3D 0) {
@@ -269,7 +272,9 @@
 				context.Response.Write
(context.Request.Path);
 				context.Response.Write (@"?link=3D");
 				context.Response.Write (n.URL);
-				context.Response.Write (@"')); ");
+				context.Response.Write ("');\n");
+				context.Response.Write ("node.target =3D
'content';\n");
+				context.Response.Write ("tree.add
(node);\n");
 			}
 			context.Response.Write (@"
 	document.write(tree);


Piers.

> -----Original Message-----
> From: Piers Haken=20
> Sent: Sunday, August 10, 2003 3:32 PM
> To: Miguel de Icaza
> Cc: Mono Docs; mono-list@ximian.com
> Subject: RE: [Mono-list] Live Monodoc server.
>=20
>=20
> I think you need to set add an attribute 'target=3D"content"'=20
> to each of the XML tree items and each of the root WebFXLoadTreeItems.
>=20
> Then you can remove the base element.
>=20
> Piers.
>=20
> > -----Original Message-----
> > From: Miguel de Icaza [mailto:miguel@ximian.com]
> > Sent: Sunday, August 10, 2003 8:20 AM
> > To: Piers Haken
> > Cc: Mono Docs; mono-list@ximian.com
> > Subject: RE: [Mono-list] Live Monodoc server.
> >=20
> >=20
> > Hello!
> >=20
> > > I should clarify this. The tree doesn't work in IE, and I
> > think it's
> > > this line that's the culprit. All the URLs are being expanded as
> > > "http://./..."
> >=20
> > Yeah, but if I make this change the target of clicking on a
> > link starts
> > changing the other panel.    Any suggestions about how to fix this?
> >=20
> > Miguel
> >=20
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com=20
> http://lists.ximian.com/mailman/listinfo/mono-list
>=20