summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js
diff options
context:
space:
mode:
Diffstat (limited to 'webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js')
-rw-r--r--webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js77
1 files changed, 77 insertions, 0 deletions
diff --git a/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js b/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js
new file mode 100644
index 0000000000..218c988c83
--- /dev/null
+++ b/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/manager/object/PopupManager.js
@@ -0,0 +1,77 @@
+/* ************************************************************************
+
+ qooxdoo - the new era of web development
+
+ http://qooxdoo.org
+
+ Copyright:
+ 2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org
+
+ License:
+ LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
+
+ Authors:
+ * Sebastian Werner (wpbasti)
+ * Andreas Ecker (ecker)
+
+************************************************************************ */
+
+/* ************************************************************************
+
+#module(ui_popup)
+
+************************************************************************ */
+
+/*!
+ This singleton is used to manager multiple instances of popups and their state.
+*/
+qx.OO.defineClass("qx.manager.object.PopupManager", qx.manager.object.ObjectManager,
+function() {
+ qx.manager.object.ObjectManager.call(this);
+});
+
+
+
+/*
+---------------------------------------------------------------------------
+ METHODS
+---------------------------------------------------------------------------
+*/
+
+qx.Proto.update = function(vTarget)
+{
+ // be sure that target is correctly set (needed for contains() later)
+ if (!(vTarget instanceof qx.ui.core.Widget)) {
+ vTarget = null;
+ }
+
+ var vPopup, vHashCode;
+ var vAll = this.getAll();
+
+ for (vHashCode in vAll)
+ {
+ vPopup = vAll[vHashCode];
+
+ if(!vPopup.getAutoHide() || vTarget == vPopup || vPopup.contains(vTarget)) {
+ continue;
+ }
+
+ vPopup.hide();
+ }
+}
+
+
+
+
+
+
+/*
+---------------------------------------------------------------------------
+ DEFER SINGLETON INSTANCE
+---------------------------------------------------------------------------
+*/
+
+/**
+ * Singleton Instance Getter
+ */
+qx.Class.getInstance = qx.util.Return.returnInstance;