in src/main/resources/org/apache/directory/fortress/web/modal/modal.js [626:675]
close: function(force) {
// can user close the window?
if (force !== true && (!this.canClose() || !this.canCloseInternal())) {
return;
}
// if the update handler was set clean it
if (typeof(this.update) !== "undefined") {
window.clearInterval(this.update);
}
// clean event bindings
this.bindClean();
// hide elements
this.window.style.display = "none";
// if the window has a div content, the div is reparented to it's old parent
if (typeof(this.oldParent) !== "undefined") {
try {
this.content.removeChild(this.settings.element);
this.oldParent.appendChild(this.settings.element);
this.oldParent = null;
} catch (ignore) {}
}
// remove the elements from document
this.window.parentNode.removeChild(this.window);
// clean references to elements
this.window = this.classElement = this.caption = this.bottomLeft = this.bottomRight = this.bottom =
this.left = this.right = this.topLeft = this.topRight = this.top = this.captionText = null;
// restore old unload handler
window.onunload = this.old_onunload;
this.old_onunload = null;
Wicket.Event.remove(window, 'beforeunload',this.onbeforeunload);
// hids and cleanup the mask
this.destroyMask();
if (force !== true) {
// call onclose handler
this.settings.onClose();
}
this.adjustOpenWindowsStatusAndZIndexesOnClose();
},