Opened 14 years ago

Closed 14 years ago

#399 closed defect (fixed)

Fix The GetParent() function

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

Description

In some widget(BufferPanel, Search and SelectWithin) template, the GetParent() function is defined like this: function GetParent() {

if(popup)

return opener;

else

return parent.parent;

}

This is not correct. It should be like this: function GetParent() {

if(popup)

return opener;

else {

var node = parent; while (!node.Fusion && node.parent && node != node.parent)

node = node.parent;

return node;

}

}

Attachments (1)

fix GetParent().patch (3.8 KB ) - added by hubu 14 years ago.

Download all attachments as: .zip

Change History (5)

by hubu, 14 years ago

Attachment: fix GetParent().patch added

comment:1 by madair, 14 years ago

this is the problem with using frames but the patch looks ok. I think there is a similar function defined in MapGuideViewerAPI.js that should be changed as well, it might be worthwile to do a search on the whole source tree for it as well.

comment:2 by hubu, 14 years ago

In MapGuideViewerAPI.js, there is a function GetFusionWidget(). The function is defined like this: function GetFusionWindow() {

var curWindow = window; while (!curWindow.Fusion) {

if (curWindow.parent && curWindow != curWindow.parent) {

curWindow = curWindow.parent;

} else if(curWindow.opener) {

curWindow = curWindow.opener;

} else {

alert('Could not find Fusion instance'); break;

}

} return curWindow;

}

I think this function is already correct, no need to change it.

After search on the whole source tree, I didn't find any other place need change as well.

comment:3 by madair, 14 years ago

Milestone: Future2.2
Owner: changed from hubu to madair
Status: newassigned

comment:4 by madair, 14 years ago

Resolution: fixed
Status: assignedclosed

closing, patch applied to trunk

Note: See TracTickets for help on using tickets.