diff --git a/xpfe/browser/samples/dexanimdialog.xul b/xpfe/browser/samples/dexanimdialog.xul index 5b4d8529c75..f5e6e22c908 100644 --- a/xpfe/browser/samples/dexanimdialog.xul +++ b/xpfe/browser/samples/dexanimdialog.xul @@ -29,6 +29,11 @@ // OK button handler function DoOK() { + var toolkitCore = GetToolkitCore(); + if (toolkitCore) + toolkitCore.CloseWindow(window); + return; + // get checkbox // (using a document method available on HTML and XUL // documents, but not on XML documents) @@ -65,6 +70,16 @@ return element; } + function GetToolkitCore() { + var toolkitCore = XPAppCoresManager.Find("ToolkitCore"); + if (!toolkitCore) { + toolkitCore = new ToolkitCore(); + if (toolkitCore) + toolkitCore.Init("ToolkitCore"); + } + return toolkitCore; + } + function animateButtonImage() { var button = document.getElementById("animation"); if (button) { @@ -84,29 +99,29 @@ } - - - - - - - - - - - - - - - - - - - -
Give me your money
+ + + Give me your money + + + - Remind me -
+ Remind me + + + + + + + + Start Animation + Stop Animation + + +