Opened 13 years ago

Closed 13 years ago

#253 closed defect (invalid)

Maptip opened URL does not obey sWinFeatures

Reported by: amorsell Owned by: madair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

While trying to fix the default behavior of the maptip URL opened window not having scrollbars, I discovered that the openLink function does not obey the sWinFeatures.

Try editing the sWinFeatures on or around line 59 to something like:

sWinFeatures : 'menubar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=1024,height=800',

But, the opened window will not reflect those overrides. The only way to override the opened window behavior is through something like:

openLink : function(evt, url) {
	//below line added since window.open did not seem to obey changes in sWinFeatures
	var myWinFeatures = 'menubar=no,location=no,resizable=no,status=no,width=1024,height=800,scrollbars=yes';
        	var taskPaneTarget = Fusion.getWidgetById(this.sTarget);
        	if ( taskPaneTarget ) {
            	taskPaneTarget.setContent(url);
        	} else {
            	var pageElement = $(this.sTarget);
            	if ( pageElement ) {
                	pageElement.src = url;
            	} else {
                		window.open(url, this.sTarget, myWinFeatures);
            	}
        }
        OpenLayers.Event.stop(evt, true);
        return false;
    }

Change History (1)

comment:1 by madair, 13 years ago

Resolution: invalid
Status: newclosed

I'm not able to reproduce this in the Fusion 2.0 branch and the window open code is getting the correct sWinFeatures value.

Looking at the spokanemaps example however, I can see that the sWinFeatures value is being overridden by a value specified in the AppDef file which is why you aren't getting the value you are expecting. You can set the value for sWinFeatures for the MapTip in Studio.

Note: See TracTickets for help on using tickets.