Skip to content

Commit

Permalink
improved html dump a little: you can try it out, if you use +d=bltdum…
Browse files Browse the repository at this point in the history
…p +dumpTarget=log.html (or some other filename ending with .html)

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17643 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Christian SChubert committed Oct 10, 2013
1 parent 0855a8d commit b6b83f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -1880,8 +1880,8 @@ algorithm
//dumpOption(mT,dumpIncidenceMatrixT);
tags := dumpFullMatchingHTML(matching,prefixId,tags);
// doc := DumpHTML.addBodyTags(tags,doc);
doc := DumpHTML.addLine("<hr>",doc);
doc := DumpHTML.addHyperLink("javascript:toggle('" +& prefixId +& "system')","System einblenden","System " +& intString(i) +& " ein/ausblenden",doc);
doc := DumpHTML.addLine("",doc);
doc := DumpHTML.addDivision(prefixId +& "system",{("display","none")},tags,doc);
outTpl := (doc,i+1);
end dumpEqSystemHTML;
Expand Down Expand Up @@ -2016,7 +2016,7 @@ algorithm
s = intString(i);
eqn = v[i];
s2 = intString(eqn);
s = "Variable <a href=\"#" +& prefixId +& "varanker" +& s +& "\">" +& s +& "</a> is solved in Equation <a href=\"#" +& prefixId +& "eqanker" +& s2 +& "\">" +& s2 +& "</a>";
s = "Variable <a href=\"#" +& prefixId +& "varanker" +& s +& "\" onclick=\"return show('" +& prefixId +& "variables');\">" +& s +& "</a> is solved in Equation <a href=\"#" +& prefixId +& "eqanker" +& s2 +& "\" onclick=\"return show('" +& prefixId +& "equations');\">" +& s2 +& "</a>";
then
dumpMatchingHTML2(v, i+1, len, prefixId, DumpHTML.LINE(s)::inTags);
else
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/DumpHTML.mo
Expand Up @@ -94,7 +94,7 @@ public function emtypDocumentWithToggleFunktion
output Document outDoc;
algorithm
outDoc := addScript("text/Javascript",
"function toggle(name) {\n var element = document.getElementById(name);\n if (element.style.display == \"none\") {\n // show the div\n element.style.display = \"block\"; }\n else {\n // hide the div\n element.style.display = \"none\";\n // reset element\n element.reset();\n }\n}",
"function toggle(name) {\n var element = document.getElementById(name);\n if (element.style.display == \"none\") {\n // show the div\n element.style.display = \"block\"; \n } else {\n // hide the div\n element.style.display = \"none\";\n // reset element\n element.reset();\n }\n}\n\nfunction show(name) {\n var element = document.getElementById(name);\n if (element.style.display == \"none\") {\n // show the div\n element.style.display = \"block\"; \n }\n return true;\n}\n",
emptyDocument);
end emtypDocumentWithToggleFunktion;

Expand Down

0 comments on commit b6b83f5

Please sign in to comment.