By Daniel Du
In MapGuide Ajax viewer, I can open a new window if I specify the value for “Display result in this target interface” to “New window” or “Specified frame” in Web layout editor, but it always opens a 500*500 window without toolbar. How can I resize the window or change its appearance when it is opened?
The solution is simple. It can be edited in <WebExetension Installation folder>wwwviewerfilesajaxmappane.templ
For AIMS2012: C:Program FilesAutodeskAutodesk Infrastructure Web Server Extension 2012wwwviewerfilesajaxmappane.templ
For MapGuide 2011: C:Program FilesAutodeskMapGuideEnterprise2011WebServerExtensionswwwviewerfilesajaxmappane.templ, etc.
Edit the source code at about line 3785:
//the code can be modified here,
//if necessary, to control the size and appearance of the
//new window. e.g.
window.open(url, targetFrame,
"toolbar=no,width=500,height=500,resizable,scrollbars");
//window.open(linkURL, targetFrame);
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/white-space: pre;/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Leave a Reply