X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Fcomponents%2FModal.js;h=3d3150b348b415e56e7a518440fecae954284d58;hb=86f06959d772c750a516780b448d5cbfa16cd48e;hp=f39cca36f73e99dc8c57417a1824ade437ec4bfa;hpb=e3071ef5a1e3a51e8a040534d2b24ac0e9c9fbb4;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/Modal.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/Modal.js index f39cca36f..3d3150b34 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/Modal.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/Modal.js @@ -8,6 +8,9 @@ qx.Class.define("org.argeo.ria.components.Modal", extend : qx.ui.window.Window, events : { + /** + * Triggered when the user clicks the "ok" button. + */ "ok" : "qx.event.type.Event" }, /** @@ -44,6 +47,10 @@ qx.Class.define("org.argeo.ria.components.Modal", this.add(label, {edge:'center', width:'100%'}); this.addCloseButton(); }, + /** + * Add a question and ok / cancel buttons + * @param text {String} The question to ask to the user + */ addConfirm : function(text){ var label = new qx.ui.basic.Label(text); label.setRich(true); @@ -99,9 +106,13 @@ qx.Class.define("org.argeo.ria.components.Modal", * @param callbackContext {Object} Context for the callback, optional. */ makePromptForm:function(questionString, validationCallback, callbackContext){ - this.add(new qx.ui.basic.Label(questionString), {edge:'north'}); + var label = new qx.ui.basic.Label(questionString); + label.setRich(true); + label.setTextAlign("center"); + this.add(label, {edge:'north'}); var textField = new qx.ui.form.TextField(); - textField.setMarginTop(20); + textField.setMarginTop(10); + textField.setMarginBottom(10); this.add(textField, {edge:'center'}); this.addOkCancel(); if(callbackContext){