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
+
+
+
+
+
+
diff --git a/xpfe/browser/samples/dexanimmaster.xul b/xpfe/browser/samples/dexanimmaster.xul
index 9d148e3818f..2598db16339 100644
--- a/xpfe/browser/samples/dexanimmaster.xul
+++ b/xpfe/browser/samples/dexanimmaster.xul
@@ -61,16 +61,16 @@
+
+
diff --git a/xpfe/browser/samples/dexsimpledialog.xul b/xpfe/browser/samples/dexsimpledialog.xul
index 4f843da17e5..dd49d3947b9 100644
--- a/xpfe/browser/samples/dexsimpledialog.xul
+++ b/xpfe/browser/samples/dexsimpledialog.xul
@@ -19,7 +19,12 @@
// OK button handler
function DoOK() {
- // get checkbox
+ var toolkitCore = GetToolkitCore();
+ if (toolkitCore)
+ toolkitCore.CloseWindow(window);
+ return;
+
+ // alternatively: get checkbox and tell some appcore about it
// (using a document method available on HTML and XUL
// documents, but not on XML documents)
var checkbox = document.getElementById("remind");
@@ -54,24 +59,34 @@
}
return element;
}
+
+ function GetToolkitCore() {
+ var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
+ if (!toolkitCore) {
+ toolkitCore = new ToolkitCore();
+ if (toolkitCore)
+ toolkitCore.Init("ToolkitCore");
+ }
+ return toolkitCore;
+ }
-
-
-
Give me your money
-
-
-
+
+
+ Give me your money
+
+
+
- Remind me
-
-
-
-
-
-
-
-
+ Remind me
+
+
+
+
+ OK
+
+
+
diff --git a/xpfe/browser/samples/dexsimplemaster.xul b/xpfe/browser/samples/dexsimplemaster.xul
index cb830d4d0a3..131d1db1ac8 100644
--- a/xpfe/browser/samples/dexsimplemaster.xul
+++ b/xpfe/browser/samples/dexsimplemaster.xul
@@ -33,14 +33,13 @@
-
+
+