• Changing size and feature of new window in Fusion viewer “invoke URL”


    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.

    image

    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\Autodesk Infrastructure Web Server Extension 2013\www\fusion\widgets\InvokeURL.js in your favorite text editor, refer to around 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\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 many resources about that topic, and this post may be helpful as well.

    Hope this helps.

  • 相关阅读:
    快速排序
    C# String.Format
    理解C++ static
    程序地址空间
    map的实现
    【S4】使用empty()而不是判断size()是否为0
    RHEL6.4 NFS文件共享服务器搭建
    使用UDEV绑定ASM多路径磁盘
    MySQL的启动程序
    [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
  • 原文地址:https://www.cnblogs.com/junqilian/p/2665374.html
Copyright © 2020-2023  润新知