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.

作者: 峻祁连
邮箱:junqilian@163.com 
出处: http://junqilian.cnblogs.com 
转载请保留此信息。




本文转自峻祁连. Moving to Cloud/Mobile博客园博客,原文链接:http://www.cnblogs.com/junqilian/archive/2012/08/31/2665374.html ,如需转载请自行联系原作者
相关文章
|
6月前
|
JavaScript 前端开发 API
(简单详细)javascript中new url()属性,轻松解析url地址
(简单详细)javascript中new url()属性,轻松解析url地址
551 0
|
Java
JAVA new URL引起死机一例
JAVA new URL引起死机一例
118 0
|
6月前
uView queryParams 对象转URL参数
uView queryParams 对象转URL参数
64 0
|
6月前
|
JavaScript
vue截取URL中的参数
vue截取URL中的参数
68 0
|
2月前
|
前端开发 JavaScript
前端JS截取url上的参数
文章介绍了两种前端JS获取URL参数的方法:手动截取封装和使用URLSearchParams。
46 0
|
3月前
|
开发框架 前端开发 .NET
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
|
3月前
|
Java
JAVA 获取 URL 指定参数的值
JAVA 获取 URL 指定参数的值
45 0
|
4月前
|
JavaScript 前端开发 数据格式
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
218 0
|
4月前
|
JavaScript
js 获取并解析 url 中参数的三种方法
js 获取并解析 url 中参数的三种方法
398 0

热门文章

最新文章