+ Fixed HTML path

This commit is contained in:
michael 2004-12-20 16:28:56 +00:00
parent e168bf6b91
commit 94d65e5ea7

View File

@ -242,6 +242,11 @@ implementation
uses SysUtils, XHTML, XMLWrite, HTMWrite, sh_pas; uses SysUtils, XHTML, XMLWrite, HTMWrite, sh_pas;
Function FixHTMLpath(S : String) : STring;
begin
Result:=StringReplace(S,'\','/',[rfReplaceAll]
end;
procedure TFileAllocator.AllocFilename(AElement: TPasElement; procedure TFileAllocator.AllocFilename(AElement: TPasElement;
ASubindex: Integer); ASubindex: Integer);
@ -543,7 +548,7 @@ begin
HeadEl.AppendChild(El); HeadEl.AppendChild(El);
El['rel'] := 'stylesheet'; El['rel'] := 'stylesheet';
El['type'] := 'text/css'; El['type'] := 'text/css';
El['href'] := Allocator.GetCSSFilename(AElement); El['href'] := FixHtmlPath(Allocator.GetCSSFilename(AElement));
end; end;
function THTMLWriter.CreateXHTMLPage(AElement: TPasElement; function THTMLWriter.CreateXHTMLPage(AElement: TPasElement;
@ -628,7 +633,7 @@ $ENDIF
AppendChild(El); AppendChild(El);
El['rel'] := 'stylesheet'; El['rel'] := 'stylesheet';
El['type'] := 'text/css'; El['type'] := 'text/css';
El['href'] := CSSName; El['href'] := FixHtmlPath(CSSName);
end; end;
Self.BodyElement := RequestBodyElement('en'); Self.BodyElement := RequestBodyElement('en');
end; end;
@ -773,7 +778,7 @@ function THTMLWriter.CreateLink(Parent: TDOMNode;
const AHRef: DOMString): THTMLElement; const AHRef: DOMString): THTMLElement;
begin begin
Result := CreateEl(Parent, 'a'); Result := CreateEl(Parent, 'a');
Result['href'] := AHRef; Result['href'] := FixHtmlPath(AHRef);
end; end;
function THTMLWriter.CreateAnchor(Parent: TDOMNode; function THTMLWriter.CreateAnchor(Parent: TDOMNode;
@ -2275,14 +2280,14 @@ var
AppendText(ParaEl, '['); AppendText(ParaEl, '[');
LinkEl := CreateEl(ParaEl, 'a'); LinkEl := CreateEl(ParaEl, 'a');
LinkEl['href'] := LinkEl['href'] :=
ResolveLinkWithinPackage(AClass, AListSubpageIndex); FixHtmlPath(ResolveLinkWithinPackage(AClass, AListSubpageIndex));
LinkEl['onClick'] := 'window.open(''' + LinkEl['href'] + ''', ''list'', ' + LinkEl['onClick'] := 'window.open(''' + LinkEl['href'] + ''', ''list'', ' +
'''dependent=yes,resizable=yes,scrollbars=yes,height=400,width=300''); return false;'; '''dependent=yes,resizable=yes,scrollbars=yes,height=400,width=300''); return false;';
AppendText(LinkEl, AText); AppendText(LinkEl, AText);
AppendText(ParaEl, ' ('); AppendText(ParaEl, ' (');
LinkEl := CreateEl(ParaEl, 'a'); LinkEl := CreateEl(ParaEl, 'a');
LinkEl['href'] := LinkEl['href'] :=
ResolveLinkWithinPackage(AClass, AListSubpageIndex + 1); FixHtmlPath(ResolveLinkWithinPackage(AClass, AListSubpageIndex + 1));
LinkEl['onClick'] := 'window.open(''' + LinkEl['href'] + ''', ''list'', ' + LinkEl['onClick'] := 'window.open(''' + LinkEl['href'] + ''', ''list'', ' +
'''dependent=yes,resizable=yes,scrollbars=yes,height=400,width=300''); return false;'; '''dependent=yes,resizable=yes,scrollbars=yes,height=400,width=300''); return false;';
AppendText(LinkEl, SDocByName); AppendText(LinkEl, SDocByName);
@ -2817,7 +2822,10 @@ end.
{ {
$Log$ $Log$
Revision 1.10 2004-10-22 19:58:35 michael Revision 1.11 2004-12-20 16:28:56 michael
+ Fixed HTML path
Revision 1.10 2004/10/22 19:58:35 michael
+ Sort list of modules in package page + Sort list of modules in package page
Revision 1.9 2004/08/31 09:40:05 michael Revision 1.9 2004/08/31 09:40:05 michael