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)
Change History (5)
by , 14 years ago
Attachment: | fix GetParent().patch added |
---|
comment:1 by , 14 years ago
comment:2 by , 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 , 14 years ago
Milestone: | Future → 2.2 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
closing, patch applied to trunk
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.