]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/Modal.js
Fix bug with NOT CLOSED instead of date format
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / source / class / org / argeo / ria / components / Modal.js
index 6906599434bb14086dd73644d4ecdf19c5998746..2c8aef04d6f6ce9b7338f9402fa2cae82809e07d 100644 (file)
@@ -1,16 +1,18 @@
-/* ************************************************************************\r
-\r
-  Copyright: 2008 Argeo\r
-\r
-   License: \r
-\r
-   Authors: Charles du Jeu\r
-\r
-************************************************************************ */\r
+/**\r
+ * Generic modal popup window.\r
+ * It is layed out with a dock layout. When adding components to it, they are added as "center".\r
+ * @author Charles du Jeu\r
+ */\r
 qx.Class.define("org.argeo.ria.components.Modal",\r
 {\r
        extend : qx.ui.window.Window,\r
   \r
+       /**\r
+        * \r
+        * @param caption {String} Title of the window\r
+        * @param icon {String} Icon of the window\r
+        * @param text {String} Default content of the window.\r
+        */\r
        construct : function(caption, icon, text){\r
                this.base(arguments);\r
                this.set({\r
@@ -34,12 +36,23 @@ qx.Class.define("org.argeo.ria.components.Modal",
        },\r
        \r
        members : {\r
+               /**\r
+                * Display text inside the popup\r
+                * @param text {String} A string content for the popup\r
+                */\r
                addLabel:function(text){\r
                        this.add(new qx.ui.basic.Label(text), {edge:'center', width:'100%'});           \r
                },\r
+               /**\r
+                * Display a component (panel) in the center of the popup\r
+                * @param panel {qx.ui.core.Widget} A gui component (will be set at width 100%).\r
+                */\r
                addContent: function(panel){\r
                        this.add(panel, {edge:'center', width:'100%'});\r
                },\r
+               /**\r
+                * Automatically attach to the application root, then show.\r
+                */\r
                attachAndShow:function(){\r
                        org.argeo.ria.components.ViewsManager.getInstance().getApplicationRoot().add(this);                     \r
                        this.show();\r