Changing size and feature of new window in Fusion viewer "invoke URL"

Source: Internet
Author: User

By Daniel Du

If you use "invoke URL" command of fusion viewer and select "New Window" as target to open a new browser window, you may find this window is fixed, not resizable, no memubar, no status bar, and no location bar.

If you want to change the features of this window, please keep reading.

Actually it is hard-coded in fusion viewer, you can edit the source code, please open C: \ Program Files \ Autodesk Infrastructure Web Server Extension 2013 \ www \ fusion \ widgets \ InvokeURL. js in your favorite text editor, refer to und line 40:

...

Fusion. Widget. InvokeURL = OpenLayers. Class (Fusion. Widget ,{

UiClass: Jx. Button,

SFeatures:'Menubar = no, location = no, resizable = no, status = no',

...

And also refer to line 124 for the usage of it:

...

Var pageElement = $ (this. sTarget );

If (pageElement ){

PageElement. src = url;

} Else {

Window. open (url,This. sTarget, this. sFeatures );

}

It is a parameter passed to JavaScript function window. open, please refer to this link for detailed information to set suitable value you need.

Finally, to apply your changes, you need to switch to debug mode by editing the script reference in template html page. as I said in previous post, for Fusion Viewer, let's say you are using the "slate" template, please open C: \ Program Files \ Autodesk Infrastructure Web Server Extension 2013 \ www \ fusion \ templates \ mapguide \ slate \ index.html with your favorite text editor, I am using notepad ++, change following code:

<script type="text/javascript" 
src="../../../lib/fusionSF-compressed.js"></script>

To

<script type="text/javascript" 
src="../../../lib/fusion.js"></script>

Of cause you can also re-compress all JavaScript files with your changes using tools like YUI compressor to improve performance, I will not cover how to use YUI compressor in this blog, please search yourself, I bet you can get started resources about that topic, and this post may be helpful as well.

Hope this helps.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.