You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
(24) |
Aug
(93) |
Sep
(261) |
Oct
(257) |
Nov
(218) |
Dec
(95) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(184) |
Feb
(87) |
Mar
(155) |
Apr
(398) |
May
(201) |
Jun
(35) |
Jul
(68) |
Aug
(92) |
Sep
(52) |
Oct
(111) |
Nov
(135) |
Dec
(116) |
2009 |
Jan
(225) |
Feb
(204) |
Mar
(113) |
Apr
(137) |
May
(220) |
Jun
(199) |
Jul
(196) |
Aug
(98) |
Sep
(100) |
Oct
(179) |
Nov
(164) |
Dec
(72) |
2010 |
Jan
(59) |
Feb
(61) |
Mar
(64) |
Apr
(159) |
May
(107) |
Jun
(252) |
Jul
(180) |
Aug
(96) |
Sep
(82) |
Oct
(58) |
Nov
(43) |
Dec
(53) |
2011 |
Jan
(39) |
Feb
(18) |
Mar
(33) |
Apr
(66) |
May
(48) |
Jun
(124) |
Jul
(112) |
Aug
(62) |
Sep
(45) |
Oct
(102) |
Nov
(47) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(18) |
Mar
(1) |
Apr
(5) |
May
(18) |
Jun
(13) |
Jul
(9) |
Aug
(38) |
Sep
(3) |
Oct
(7) |
Nov
(24) |
Dec
(6) |
2013 |
Jan
(1) |
Feb
(14) |
Mar
(1) |
Apr
(2) |
May
(3) |
Jun
(4) |
Jul
(9) |
Aug
(4) |
Sep
(7) |
Oct
|
Nov
(1) |
Dec
(4) |
2014 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <san...@us...> - 2011-10-02 15:44:11
|
Revision: 21480 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21480&view=rev Author: sandersson Date: 2011-10-02 15:44:04 +0000 (Sun, 02 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 15:44:04 UTC (rev 21480) @@ -0,0 +1,388 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/* ************************************************************************ + +************************************************************************ */ + +/** + * A button pane is a pane with a number of buttons. It can be a standardised + * button pane with preset combinations of buttons. It can also be totally customised. + * All buttons are kept together in a Widget container with preset spacing. + */ +qx.Class.define("qxe.ui.form.ButtonPane", +{ + extend : qx.ui.core.Widget, + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + construct : function(orientation, spacing) + { + this.base(arguments); + + // Configure orientation + if(orientation != null) + { + this.setOrientation(orientation); + } + else + { + this.initOrientation(); + } + + if(spacing != null) + { + this.setSpacing(spacing); + } + }, + + + /* + ***************************************************************************** + EVENTS + ***************************************************************************** + */ + + events : + { + /** Fired if the {@link #execute} method is invoked.*/ + "execute" : "qx.event.type.Event" + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + // overridden + appearance : + { + refine : true, + init : "button-pane" + }, + + /** + * The button pane orientation + */ + orientation : + { + check : [ "horizontal", "vertical" ], + init : "horizontal", + apply : "_applyOrientation" + }, + + /** + * The spacing between buttons. + */ + spacing : + { + check : "Integer", + init : 4, + apply : "_applySpacing" + }, + + /** + * Sets the size constraint. Valid values are "less" and "same". + * The size constraint will apply to all components except if the component client property + * growX or growY set to true. + */ + sizeConstraint : + { + check : ["same", "less"], + init : "same", + apply : "_applySizeConstraint" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /* + --------------------------------------------------------------------------- + APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + // property apply + _applyOrientation : function(value, old) + { + // Dispose old layout + var oldLayout = this._getLayout(); + + if (oldLayout) + { + oldLayout.dispose(); + } + + // Reconfigure + if (value === "horizontal") + { + var layout = new qx.ui.layout.HBox(this.getSpacing()); + layout.setReversed(qx.locale.Manager.getInstance().getDirection() == "right-to-left"); + this._setLayout(layout); + + this.setAllowStretchX(true); + this.setAllowStretchY(false); + } + else + { + this._setLayout(new qx.ui.layout.VBox(this.getSpacing())); + + this.setAllowStretchX(false); + this.setAllowStretchY(true); + } + }, + + _applySpacing : function(value, old) + { + var layout = this._getLayout(); + value == null ? layout.resetSpacing() : layout.setSpacing(value); + }, + + _applySizeConstraint : function() + { + }, + + /* + --------------------------------------------------------------------------- + CHILD HANDLING + --------------------------------------------------------------------------- + */ + + /** + * Create a button for the button pane. + * + * @param value {qx.ui.form.Button} The button which should be added. + * @return {qx.ui.form.Button[]} The newly added button(s). + */ + createButton : function(value) + { + if(typeof value === "object") + { + value = [value]; + } + + var instance = qx.locale.Manager.getInstance(); + var buttons = []; + var button; + + for(var i = 0, len = value.length; i < len; i++) + { + button = new qx.ui.form.Button(); + button.setUserData("name", value[i].name || null); + button.setLabel(instance.translate(value[i].label, []).toString() || null); + button.setIcon(value[i].icon || null); + button.setToolTip(value[i].toolTip || null); + button.setToolTipIcon(value[i].toolTipIcon || null); + button.setToolTipText(instance.translate(value[i].toolTipText, []).toString() || null); + button.addListener("execute", function(e) { + this.fireDataEvent("execute", e.getTarget()); + }, this); + + this.add(button); + + buttons[i] = button; + } + + return buttons; + }, + + /** + * Adds button to buttonpane with specified constraint. + * The valid constraints are "affirmative", "cancel", "help" and "other". + * + * The main purpose of the constraints is to determine how the buttons are + * laid out on different platforms according to the OS convention. For example, on + * Windows, affirmative button appears on the right hand side of cancel button. + * On Mac OS X, affirmative button will appear on the left hand side of cancel button. + * + * @param button {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint used for the button. + */ + add : function(button, constraint) + { + if (qx.core.Environment.get("qx.debug")) + { + if (!(page instanceof qx.ui.form.Button)) + { + throw new Error("Incompatible child for ButtonPane: " + button); + } + } + + var index = this.getChidren().length; + + if(constraint != null) + { +// check valid constraints + button.setUserData("constraint", constraint); + index = this._constrainButtons(constraint); + } + + this._addAt(button, index); + }, + + /** + * Remove a button from the button pane. + * + * @param button {qx.ui.form.Button} The button to be removed. + */ + remove : function(button) + { + this._remove(button); + }, + + /** + * Add a spacer to the button pane. The spacer has a flex + * value of one and will stretch to the available space. + * + * @return {qx.ui.core.Spacer} The newly added spacer object. A reference + * to the spacer is needed to remove this spacer from the layout. + */ + addSpacer : function() + { + var spacer = new qx.ui.core.Spacer; + this._add(spacer, {flex:1}); + + return spacer; + }, + + + /* + --------------------------------------------------------------------------- + INTERNAL ROUTINES + --------------------------------------------------------------------------- + */ + + /** + * The main purpose of the constraints is to determine how the buttons are + * laid out on different platforms according to the OS convention. For example, on + * Windows, affirmative button appears on the right hand side of cancel button. + * On Mac OS X, affirmative button will appear on the left hand side of cancel button. + * + * @param constraint {qx.ui.form.Button} The button to be removed. + */ + _constrainButtons : function(constraint) + { + item = 0; + + // Windows versions + if(qx.core.Environment.get("os.name") == "win") + { + } + // All others osx, linux etc. + else + { + } + + return item; + }, + + + /* + --------------------------------------------------------------------------- + UTILITIES + --------------------------------------------------------------------------- + */ + + /** + * Gets the button with the index. + * + * @param index {Number} the button index. + * @return {qx.ui.form.Button} the button which has the name. null if there is no button with that name. + */ + getButton : function(index) + { + return this._getChildren()[index]; + }, + + /** + * Gets the button with the name. + * In order to use this method, you have to set a name to the button using {@link + * Widget#setUserData("name", String)} method. + * + * @param name {String} the button name. + * @return {qx.ui.form.Button} the button which has the name. null if there is no button with that name. + */ + getButtonByName : function(name) + { + var button = null; + var children = this._getChildren(); + + for(var i = 0, l = children.length; i < l; i++) + { + if(children[i].getUserData("name") == name) + { + button = children[i]; + break; + } + } + + return button; + }, + + /** + * Add a spacer to the button pane. The spacer has a flex + * value of one and will stretch to the available space. + * + * @return {qx.ui.core.Spacer} The newly added spacer object. A reference + * to the spacer is needed to remove this spacer from the layout. + */ + addSpacer : function() + { + var spacer = new qx.ui.core.Spacer; + this._add(spacer, {flex:1}); + + return spacer; + }, + + /** + * Read button resource. + * + * @return {qx.core.Object} The button resource object. + */ + getResources : function(bitValue) + { + var buttons = []; + + for(var key in this.BUTTONS) + { + var button = this.BUTTONS[key]; + + if(bitValue & button.bit) + { + buttons.push(button); + } + } + + return buttons; + } + } +}); + Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js 2011-10-01 21:23:07 UTC (rev 21479) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js 2011-10-02 15:44:04 UTC (rev 21480) @@ -22,28 +22,5 @@ { members : { - /** - * - */ - _addValidators : function(validator) - { - this.assertInstance(validator, qx.ui.form.validation.Manager); - }, - - /** - * - */ - _addSerializers : function(controller) - { - this.assertInstance(controller, qx.data.controller.Object); - }, - - /** - * - */ - _addResetter : function(resetter) - { - this.assertInstance(resetter, qx.ui.form.Resetter); - } } }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-10-01 21:23:07 UTC (rev 21479) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-10-02 15:44:04 UTC (rev 21480) @@ -109,58 +109,7 @@ check : "Boolean", init : false, event : "changeAllowNext" - }, - - /** - * Whether to allow to finish the wizard. - * The finish property is set to true when the validation has passed and coming to the last page. - */ - allowFinish : - { - check : "Boolean", - init : false, - event : "changeAllowFinish" } - }, - - - /* - ***************************************************************************** - MEMBERS - ***************************************************************************** - */ - - members : - { - /** - * Adding fields of the page to the validator. - * - * @param validator {qx.ui.form.validation.Manager} The validator object to use. - */ - _addValidators : function(validator) - { - }, - - /** - * Adding fields of the page to the serializer. - * - * @param controller {qx.data.controller.*} The controller object to use. - * - * @return {Json Array} Skeleton of fields. - */ - _addSerializers : function(controller) - { - return null; - }, - - /** - * Adding fields of the page to the resetter. - * - * @param resetter {qx.ui.form.Resetter} The resetter object to use. - */ - _addResetter : function(resetter) - { - } } }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:23:07 UTC (rev 21479) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-02 15:44:04 UTC (rev 21480) @@ -117,6 +117,17 @@ check : "qx.ui.form.Resetter", init : new qx.ui.form.Resetter(), event : "changeResetter" + }, + + /** + * Whether to allow to finish the wizard. + * The finish property is set to true when the validation has passed and coming to the last page. + */ + allowFinish : + { + check : "Boolean", + init : false, + event : "changeAllowFinish" } }, @@ -336,7 +347,7 @@ }, /** - * Remove a page from the Wizard. + * Remove a page from the wizard. * * @param page {qxe.ui.wizard.Page} The page to be removed. */ @@ -346,7 +357,7 @@ }, /** - * Return Wizard's children widgets. + * Return child pages. * * @return {qxe.ui.wizard.Page[]} List of children. */ @@ -356,15 +367,15 @@ }, /** - * Add children widgets. + * Add fields for model. * - * @return {qxe.ui.wizard.Page[]} List of children. + * @param e {json} Fields to append to model. */ addControlFields : function(items) { var skeleton = this.__skeleton; - // Concatenate each page's json skeleton to the model skeleton + // Append items (json format) to the model skeleton for(var key in items) { skeleton[key] = items[key]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-01 22:25:03
|
Revision: 21478 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21478&view=rev Author: sandersson Date: 2011-10-01 21:17:02 +0000 (Sat, 01 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:05:42 UTC (rev 21477) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:17:02 UTC (rev 21478) @@ -465,13 +465,14 @@ var stack = this.getChildControl("stack-pane"); var current = stack.getSelection()[0]; var previous = current.getPrevious(); -this.debug(current + " " + previous); + if(previous != null) { stack.setSelection([previous]); } else { +this.debug(stack.indexOf(current)); if(stack.indexOf(current)) { stack.previous(); @@ -487,7 +488,6 @@ var stack = this.getChildControl("stack-pane"); var current = stack.getSelection()[0]; var next = current.getNext(); -this.debug(current + " " + next); if(next != null) { @@ -495,7 +495,8 @@ } else { - if(stack.indexOf(current)) +this.debug(stack.indexOf(current)); + if(stack.indexOf(current) < (stack.getchildren().length - 1)) { stack.next(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-01 21:23:13
|
Revision: 21479 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21479&view=rev Author: sandersson Date: 2011-10-01 21:23:07 +0000 (Sat, 01 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:17:02 UTC (rev 21478) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:23:07 UTC (rev 21479) @@ -472,7 +472,6 @@ } else { -this.debug(stack.indexOf(current)); if(stack.indexOf(current)) { stack.previous(); @@ -495,8 +494,7 @@ } else { -this.debug(stack.indexOf(current)); - if(stack.indexOf(current) < (stack.getchildren().length - 1)) + if(stack.indexOf(current) < (stack.getChildren().length - 1)) { stack.next(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-01 21:05:48
|
Revision: 21477 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21477&view=rev Author: sandersson Date: 2011-10-01 21:05:42 +0000 (Sat, 01 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 20:48:22 UTC (rev 21476) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-01 21:05:42 UTC (rev 21477) @@ -465,7 +465,7 @@ var stack = this.getChildControl("stack-pane"); var current = stack.getSelection()[0]; var previous = current.getPrevious(); - +this.debug(current + " " + previous); if(previous != null) { stack.setSelection([previous]); @@ -487,6 +487,7 @@ var stack = this.getChildControl("stack-pane"); var current = stack.getSelection()[0]; var next = current.getNext(); +this.debug(current + " " + next); if(next != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-30 20:48:29
|
Revision: 21476 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21476&view=rev Author: sandersson Date: 2011-09-30 20:48:22 +0000 (Fri, 30 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 13:07:12 UTC (rev 21475) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 20:48:22 UTC (rev 21476) @@ -361,6 +361,7 @@ * @return {qxe.ui.wizard.Page[]} List of children. */ addControlFields : function(items) + { var skeleton = this.__skeleton; // Concatenate each page's json skeleton to the model skeleton This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-30 13:07:22
|
Revision: 21475 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21475&view=rev Author: sandersson Date: 2011-09-30 13:07:12 +0000 (Fri, 30 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 12:42:12 UTC (rev 21474) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 13:07:12 UTC (rev 21475) @@ -61,6 +61,8 @@ this._createChildControl("stack-pane"); this._createChildControl("navigation-pane"); + + this.addListenerOnce("appear", this._onAppearOnce, this); }, @@ -376,6 +378,11 @@ */ + /** + * Event handler for <code>onappear</code>. + * + * @param e {qx.event.type.Data} Data event. + */ _onAppearOnce : function() { var model = qx.data.marshal.Json.createModel(this.__skeleton, true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-30 12:42:19
|
Revision: 21474 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21474&view=rev Author: sandersson Date: 2011-09-30 12:42:12 +0000 (Fri, 30 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 12:20:19 UTC (rev 21473) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-30 12:42:12 UTC (rev 21474) @@ -83,6 +83,38 @@ { refine : true, init : "wizard" + }, + + /** + * Controller of the wizard. + */ + controller : + { + check : "qx.data.controller.Object", + init : new qx.data.controller.Object(), + event : "changeController", + apply : "_applyController" + }, + + /** + * Validator of the wizard. + */ + validator : + { + check : "qx.ui.form.validation.Manager", + init : new qx.ui.form.validation.Manager(), + event : "changeValidator", + apply : "_applyValidator" + }, + + /** + * Resetter of the wizard. + */ + resetter : + { + check : "qx.ui.form.Resetter", + init : new qx.ui.form.Resetter(), + event : "changeResetter" } }, @@ -95,6 +127,9 @@ members : { + // create the data model + __skeleton : {}, + /* --------------------------------------------------------------------------- WIDGET API @@ -223,6 +258,59 @@ /* --------------------------------------------------------------------------- + APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + /** + * Apply method for the controller. + * + * The controller connects all fields of the wizard. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applyController : function(value, old) + { + // create the controller and connect all fields +// var controller = new qx.data.controller.Object(); + }, + + /** + * Apply method for the validator. + * + * Validates all attached fields of the wizard. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applyValidator : function(value, old) + { + if(value) + { + value.setRequiredFieldMessage(this.tr("This field is required.")); + value.setInvalidMessage(this.tr("The validation of data failed.")); + + old = null; + } + }, + + /** + * Apply method for the resetter. + * + * Resets all attached fields of the wizard. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applyResetter : function(value, old) + { +// var resetter = this.__resetter = new qx.ui.form.Resetter(); +// old = null; + }, + + /* + --------------------------------------------------------------------------- CHILDREN HANDLING --------------------------------------------------------------------------- */ @@ -266,6 +354,47 @@ }, /** + * Add children widgets. + * + * @return {qxe.ui.wizard.Page[]} List of children. + */ + addControlFields : function(items) + var skeleton = this.__skeleton; + + // Concatenate each page's json skeleton to the model skeleton + for(var key in items) + { + skeleton[key] = items[key]; + } + }, + + + /* + --------------------------------------------------------------------------- + EVENT LISTENERS + --------------------------------------------------------------------------- + */ + + + _onAppearOnce : function() + { + var model = qx.data.marshal.Json.createModel(this.__skeleton, true); + + this.getController().setModel(model); + + // validate on every change of the model + model.addListener("changeBubble", function(e) { + this.getValidator().validate(); + }, this); + + // invoke the inital validate + this.getValidator().validate(); + + // switch the submit button on and off + this.getValidator().bind("valid", this.__submitB, "enabled"); + }, + + /** * Event handler for <code>changeSelection</code>. * * @param e {qx.event.type.Data} Data event. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-30 12:20:28
|
Revision: 21473 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21473&view=rev Author: spackers Date: 2011-09-30 12:20:19 +0000 (Fri, 30 Sep 2011) Log Message: ----------- fixed bug in date handling, includes update to jackson 1.8 Modified Paths: -------------- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.js trunk/qooxdoo-contrib/ServerObjects/trunk/demo-webapp/.classpath trunk/qooxdoo-contrib/ServerObjects/trunk/demo-webapp/WebContent/WEB-INF/web.xml trunk/qooxdoo-contrib/ServerObjects/trunk/server/.classpath trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/json/JsonSerialiserFactory.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyException.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyMethod.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyObjectMapper.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/collections/ArrayList.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/test/com/zenesis/qx/remote/test/properties/TestExceptions.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/test/com/zenesis/qx/remote/test/simple/TestBootstrap.java Added Paths: ----------- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.0e1c70c11bd7.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.39df8347a044.js trunk/qooxdoo-contrib/ServerObjects/trunk/demo-webapp/WebContent/WEB-INF/lib/jackson-core-lgpl-1.8.5.jar trunk/qooxdoo-contrib/ServerObjects/trunk/demo-webapp/WebContent/WEB-INF/lib/jackson-mapper-lgpl-1.8.5.jar trunk/qooxdoo-contrib/ServerObjects/trunk/demo-webapp/x.js trunk/qooxdoo-contrib/ServerObjects/trunk/server/lib/jackson-core-lgpl-1.8.5.jar trunk/qooxdoo-contrib/ServerObjects/trunk/server/lib/jackson-mapper-lgpl-1.8.5.jar Removed Paths: ------------- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.9c9d98f3fdcb.js trunk/qooxdoo-contrib/ServerObjects/trunk/server/lib/jackson-core-lgpl-1.5.2.jar trunk/qooxdoo-contrib/ServerObjects/trunk/server/lib/jackson-mapper-lgpl-1.5.2.jar Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json 2011-09-29 22:00:17 UTC (rev 21472) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json 2011-09-30 12:20:19 UTC (rev 21473) @@ -62,6 +62,14 @@ ] }, + "source-hybrid": { + "compile-options": { + "code": { + "=except": [ "com.zenesis.*", "demoapp.*" ] + } + } + }, + "source-script": { "compile-options" : { "uris" : { Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js 2011-09-29 22:00:17 UTC (rev 21472) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js 2011-09-30 12:20:19 UTC (rev 21473) @@ -70,6 +70,10 @@ var boot = manager.getBootstrapObject(); + var dt = boot.getTodaysDate(); + dt.setDate(dt.getDate() - 1); + qx.core.Assert.assertTrue(boot.isYesterday(dt), "Dates are not passed correctly"); + var pippo1 = new com.zenesis.qx.remote.test.simple.Pippo(); var result = pippo1.getExampleCode(); for (var i = 0; i < result.getLength(); i++) { Added: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.0e1c70c11bd7.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.0e1c70c11bd7.js (rev 0) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.0e1c70c11bd7.js 2011-09-30 12:20:19 UTC (rev 21473) @@ -0,0 +1,10653 @@ +/* ************************************************************************ + + qooxdoo - the new era of web development + + http://qooxdoo.org + + Copyright: + 2004-2009 1&1 Internet AG, Germany, http://www.1und1.de + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Martin Wittemann (martinwittemann) + +************************************************************************ */ + +/** + * Mixin used for the bubbling events. If you want to use this in your own model + * classes, be sure that every property will call the + * {@link #_applyEventPropagation} function on every change. + */ +qx.Mixin.define("qx.data.marshal.MEventBubbling", +{ + + events : + { + /** + * The change event which will be fired on every change in the model no + * matter what property changes. This event bubbles so the root model will + * fire a change event on every change of its children properties too. + * + * Note that properties are required to call + * {@link #_applyEventPropagation} on apply for changes to be tracked as + * desired. It is already taken care of that properties created with the + * {@link qx.data.marshal.Json} marshaler call this method. + * + * The data will contain a map with the following three keys + * <li>value: The new value of the property</li> + * <li>old: The old value of the property.</li> + * <li>name: The name of the property changed including its parent + * properties separated by dots.</li> + * Due to that, the <code>getOldData</code> method will always return null + * because the old data is contained in the map. + */ + "changeBubble": "qx.event.type.Data" + }, + + + members : + { + /** + * Apply function for every property created with the + * {@link qx.data.marshal.Json} marshaler. It fires and + * {@link #changeBubble} event on every change. It also adds the chaining + * listener if possible which is necessary for the bubbling of the events. + * + * @param value {var} The new value of the property. + * @param old {var} The old value of the property. + * @param name {String} The name of the changed property. + */ + _applyEventPropagation : function(value, old, name) + { + this.fireDataEvent("changeBubble", {value: value, name: name, old: old}); + + this._registerEventChaining(value, old, name); + }, + + + /** + * Registers for the given parameters the changeBubble listener, if + * possible. It also removes the old listener, if an old item with + * a changeBubble event is given. + * + * @param value {var} The new value of the property. + * @param old {var} The old value of the property. + * @param name {String} The name of the changed property. + */ + _registerEventChaining : function(value, old, name) + { + // if the child supports chaining + if ((value instanceof qx.core.Object) + && qx.Class.hasMixin(value.constructor, qx.data.marshal.MEventBubbling) + ) { + // create the listener + var listener = qx.lang.Function.bind( + this.__changePropertyListener, this, name + ); + // add the listener + var id = value.addListener("changeBubble", listener, this); + value.setUserData("idBubble", id); + } + // if an old value is given, remove the old listener if possible + if (old != null && old.getUserData && old.getUserData("idBubble") != null) { + old.removeListenerById(old.getUserData("idBubble")); + } + }, + + + /** + * Listener responsible for formating the name and firing the change event + * for the changed property. + * + * @param name {String} The name of the former properties. + * @param e {qx.event.type.Data} The date event fired by the property + * change. + */ + __changePropertyListener : function(name, e) + { + var data = e.getData(); + var value = data.value; + var old = data.old; + + // if the target is an array + if (qx.Class.hasInterface(e.getTarget().constructor, qx.data.IListData)) { + + if (data.name.indexOf) { + var dotIndex = data.name.indexOf(".") != -1 ? data.name.indexOf(".") : data.name.length; + var bracketIndex = data.name.indexOf("[") != -1 ? data.name.indexOf("[") : data.name.length; + + if (dotIndex < bracketIndex) { + var index = data.name.substring(0, dotIndex); + var rest = data.name.substring(dotIndex + 1, data.name.length); + if (rest[0] != "[") { + rest = "." + rest; + } + var newName = name + "[" + index + "]" + rest; + } else if (bracketIndex < dotIndex) { + var index = data.name.substring(0, bracketIndex); + var rest = data.name.substring(bracketIndex, data.name.length); + var newName = name + "[" + index + "]" + rest; + } else { + var newName = name + "[" + data.name + "]"; + } + } else { + var newName = name + "[" + data.name + "]"; + } + + // if the target is not an array + } else { + var newName = name + "." + data.name; + } + + this.fireDataEvent( + "changeBubble", + { + value: value, + name: newName, + old: old + } + ); + } + } +}); +/* ************************************************************************ + + qooxdoo - the new era of web development + + http://qooxdoo.org + + Copyright: + 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Martin Wittemann (martinwittemann) + +************************************************************************ */ + +/** + * The data array is a special array used in the data binding context of + * qooxdoo. It does not extend the native array of JavaScript but its a wrapper + * for it. All the native methods are included in the implementation and it + * also fires events if the content or the length of the array changes in + * any way. Also the <code>.length</code> property is available on the array. + */ +qx.Class.define("qx.data.Array", +{ + extend : qx.core.Object, + include : qx.data.marshal.MEventBubbling, + implement : [qx.data.IListData], + + /** + * Creates a new instance of an array. + * + * @param param {var} The parameter can be some types.<br/> + * Without a parameter a new blank array will be created.<br/> + * If there is more than one parameter is given, the parameter will be + * added directly to the new array.<br/> + * If the parameter is a number, a new Array with the given length will be + * created.<br/> + * If the parameter is a JavaScript array, a new array containing the given + * elements will be created. + */ + construct : function(param) + { + this.base(arguments); + // if no argument is given + if (param == undefined) { + this.__array = []; + + // check for elements (create the array) + } else if (arguments.length > 1) { + // create an empty array and go through every argument and push it + this.__array = []; + for (var i = 0; i < arguments.length; i++) { + this.__array.push(arguments[i]); + } + + // check for a number (length) + } else if (typeof param == "number") { + this.__array = new Array(param); + // check for an array itself + } else if (param instanceof Array) { + this.__array = qx.lang.Array.clone(param); + + // error case + } else { + this.__array = []; + throw new Error("Type of the parameter not supported!"); + } + + // propagate changes + for (var i=0; i<this.__array.length; i++) { + this._applyEventPropagation(this.__array[i], null, i); + } + + // update the length at startup + this.__updateLength(); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /** + * Flag to set the dispose behavior of the array. If the property is set to + * <code>true</code>, the array will dispose its content on dispose, too. + */ + autoDisposeItems : { + check : "Boolean", + init : false + } + }, + + /* + ***************************************************************************** + EVENTS + ***************************************************************************** + */ + + events : + { + /** + * The change event which will be fired if there is a change in the array. + * The data contains a map with three key value pairs: + * <li>start: The start index of the change.</li> + * <li>end: The end index of the change.</li> + * <li>type: The type of the change as a String. This can be 'add', + * 'remove' or 'order'</li> + * <li>items: The items which has been changed (as a JavaScript array).</li> + */ + "change" : "qx.event.type.Data", + + + /** + * The changeLength event will be fired every time the length of the + * array changes. + */ + "changeLength": "qx.event.type.Data" + }, + + + members : + { + // private members + __array : null, + + + /** + * Concatenates the current and the given array into a new one. + * + * @param array {Array} The javaScript array which should be concatenated + * to the current array. + * + * @return {qx.data.Array} A new array containing the values of both former + * arrays. + */ + concat: function(array) { + if (array) { + var newArray = this.__array.concat(array); + } else { + var newArray = this.__array.concat(); + } + return new qx.data.Array(newArray); + }, + + + /** + * Returns the array as a string using the given connector string to + * connect the values. + * + * @param connector {String} the string which should be used to past in + * between of the array values. + * + * @return {String} The array as a string. + */ + join: function(connector) { + return this.__array.join(connector); + }, + + + /** + * Removes and returns the last element of the array. + * An change event will be fired. + * + * @return {var} The last element of the array. + */ + pop: function() { + var item = this.__array.pop(); + this.__updateLength(); + // remove the possible added event listener + this._registerEventChaining(null, item, this.length - 1); + // fire change bubble event + this.fireDataEvent("changeBubble", { + value: [], + name: this.length, + old: [item] + }); + + this.fireDataEvent("change", + { + start: this.length - 1, + end: this.length - 1, + type: "remove", + items: [item] + }, null + ); + return item; + }, + + + /** + * Adds an element at the end of the array. + * + * @param varargs {var} Multiple elements. Every element will be added to + * the end of the array. An change event will be fired. + * + * @return {Number} The new length of the array. + */ + push: function(varargs) { + for (var i = 0; i < arguments.length; i++) { + this.__array.push(arguments[i]); + this.__updateLength(); + // apply to every pushed item an event listener for the bubbling + this._registerEventChaining(arguments[i], null, this.length - 1); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: [arguments[i]], + name: this.length - 1, + old: [] + }); + + // fire change event + this.fireDataEvent("change", + { + start: this.length - 1, + end: this.length - 1, + type: "add", + items: [arguments[i]] + }, null + ); + } + return this.length; + }, + + + /** + * Reverses the order of the array. An change event will be fired. + */ + reverse: function() { + // ignore on empty arrays + if (this.length == 0) { + return; + } + + var oldArray = this.__array.concat(); + this.__array.reverse(); + this.fireDataEvent("change", + {start: 0, end: this.length - 1, type: "order", items: null}, null + ); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: this.__array, + name: "0-" + (this.__array.length - 1), + old: oldArray + }); + }, + + + /** + * Removes the first element of the array and returns it. An change event + * will be fired. + * + * @return {var} the former first element. + */ + shift: function() { + // ignore on empty arrays + if (this.length == 0) { + return; + } + + var item = this.__array.shift(); + this.__updateLength(); + // remove the possible added event listener + this._registerEventChaining(null, item, this.length -1); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: [], + name: "0", + old: [item] + }); + + // fire change event + this.fireDataEvent("change", + { + start: 0, + end: this.length -1, + type: "remove", + items: [item] + }, null + ); + return item; + }, + + + /** + * Returns a new array based on the range specified by the parameters. + * + * @param from {Number} The start index. + * @param to {Number?null} The end index. If omitted, slice extracts to the + * end of the array. + * + * @return {qx.data.Array} A new array containing the given range of values. + */ + slice: function(from, to) { + return new qx.data.Array(this.__array.slice(from, to)); + }, + + + /** + * Method to remove and add new elements to the array. For every remove or + * add an event will be fired. + * + * @param startIndex {Integer} The index where the splice should start + * @param amount {Integer} Defines number of elements which will be removed + * at the given position. + * @param varargs {var} All following parameters will be added at the given + * position to the array. + * @return {qx.data.Array} An data array containing the removed elements. + * Keep in to dispose this one, even if you don't use it! + */ + splice: function(startIndex, amount, varargs) { + // store the old length + var oldLength = this.__array.length; + + // invoke the slice on the array + var returnArray = this.__array.splice.apply(this.__array, arguments); + + // fire a change event for the length + if (this.__array.length != oldLength) { + this.__updateLength(); + } + // fire an event for the change + var removed = amount > 0; + var added = arguments.length > 2; + var items = null; + if (removed || added) { + if (this.__array.length > oldLength) { + var type = "add"; + } else if (this.__array.length < oldLength) { + var type = "remove"; + items = returnArray; + } else { + var type = "order"; + } + this.fireDataEvent("change", + { + start: startIndex, + end: this.length - 1, + type: type, + items: items + }, null + ); + } + // add listeners + for (var i = 2; i < arguments.length; i++) { + this._registerEventChaining(arguments[i], null, startIndex + i); + } + // fire the changeBubble event + var value = []; + for (var i=2; i < arguments.length; i++) { + value[i-2] = arguments[i]; + }; + var endIndex = (startIndex + Math.max(arguments.length - 3 , amount - 1)); + var name = startIndex == endIndex ? endIndex : startIndex + "-" + endIndex; + this.fireDataEvent("changeBubble", { + value: value, name: name, old: returnArray + }); + + // remove the listeners + for (var i = 0; i < returnArray.length; i++) { + this._registerEventChaining(null, returnArray[i], i); + } + return (new qx.data.Array(returnArray)); + }, + + + /** + * Sorts the array. If a sort function is given, this will be used to + * compare the items. + * + * @param func {Function} A compare function comparing two parameters and + * should return a number. + */ + sort: function(func) { + // ignore if the array is empty + if (this.length == 0) { + return; + } + var oldArray = this.__array.concat(); + + this.__array.sort.apply(this.__array, arguments); + this.fireDataEvent("change", + {start: 0, end: this.length - 1, type: "order", items: null}, null + ); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: this.__array, + name: "0-" + (this.length - 1), + old: oldArray + }); + }, + + + /** + * Adds the given items to the beginning of the array. For every element, + * a change event will be fired. + * + * @param varargs {var} As many elements as you want to add to the beginning. + */ + unshift: function(varargs) { + for (var i = arguments.length - 1; i >= 0; i--) { + this.__array.unshift(arguments[i]) + this.__updateLength(); + // apply to every pushed item an event listener for the bubbling + this._registerEventChaining(arguments[i], null, 0); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: [this.__array[0]], + name: "0", + old: [this.__array[1]] + }); + + // fire change event + this.fireDataEvent("change", + { + start: 0, + end: this.length - 1, + type: "add", + items: [arguments[i]] + }, null + ); + } + return this.length; + }, + + + // interface implementation + toArray: function() { + return this.__array; + }, + + + /** + * Replacement function for the getting of the array value. + * array[0] should be array.getItem(0). + * + * @param index {Number} The index requested of the array element. + * + * @return {var} The element at the given index. + */ + getItem: function(index) { + return this.__array[index]; + }, + + + /** + * Replacement function for the setting of an array value. + * array[0] = "a" should be array.setItem(0, "a"). + * A change event will be fired if the value changes. Setting the same + * value again will not lead to a change event. + * + * @param index {Number} The index of the array element. + * @param item {var} The new item to set. + */ + setItem: function(index, item) { + var oldItem = this.__array[index]; + // ignore settings of already set items [BUG #4106] + if (oldItem === item) { + return; + } + this.__array[index] = item; + // set an event listener for the bubbling + this._registerEventChaining(item, oldItem, index); + // only update the length if its changed + if (this.length != this.__array.length) { + this.__updateLength(); + } + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: [item], + name: index, + old: [oldItem] + }); + + // fire change event + this.fireDataEvent("change", + { + start: index, + end: index, + type: "add", + items: [item] + }, null + ); + }, + + + /** + * This method returns the current length stored under .length on each + * array. + * + * @return {Number} The current length of the array. + */ + getLength: function() { + return this.length; + }, + + + /** + * Returns the index of the item in the array. If the item is not in the + * array, -1 will be returned. + * + * @param item {var} The item of which the index should be returned. + * @return {Number} The Index of the given item. + */ + indexOf: function(item) { + return this.__array.indexOf(item); + }, + + + /** + * Returns the toString of the original Array + * @return {String} The array as a string. + */ + toString: function() { + if (this.__array != null) { + return this.__array.toString(); + } + return ""; + }, + + + /* + --------------------------------------------------------------------------- + IMPLEMENTATION OF THE QX.LANG.ARRAY METHODS + --------------------------------------------------------------------------- + */ + /** + * Check if the given item is in the current array. + * + * @param item {var} The item which is possibly in the array. + * @return {boolean} true, if the array contains the given item. + */ + contains: function(item) { + return this.__array.indexOf(item) !== -1; + }, + + + /** + * Return a copy of the given arr + * + * @return {qx.data.Array} copy of this + */ + copy : function() { + return this.concat(); + }, + + + /** + * Insert an element at a given position. + * + * @param index {Integer} Position where to insert the item. + * @param item {var} The element to insert. + */ + insertAt : function(index, item) + { + this.splice(index, 0, item); + }, + + + /** + * Insert an item into the array before a given item. + * + * @param before {var} Insert item before this object. + * @param item {var} The item to be inserted. + */ + insertBefore : function(before, item) + { + var index = this.indexOf(before); + + if (index == -1) { + this.push(item); + } else { + this.splice(index, 0, item); + } + }, + + + /** + * Insert an element into the array after a given item. + * + * @param after {var} Insert item after this object. + * @param item {var} Object to be inserted. + */ + insertAfter : function(after, item) + { + var index = this.indexOf(after); + + if (index == -1 || index == (this.length - 1)) { + this.push(item); + } else { + this.splice(index + 1, 0, item); + } + }, + + + /** + * Remove an element from the array at the given index. + * + * @param index {Integer} Index of the item to be removed. + * @return {var} The removed item. + */ + removeAt : function(index) { + var returnArray = this.splice(index, 1); + var item = returnArray.getItem(0); + returnArray.dispose(); + return item; + }, + + + /** + * Remove all elements from the array. + * + * @return {Array} A native array containing the removed elements. + */ + removeAll : function() { + // remove all possible added event listeners + for (var i = 0; i < this.__array.length; i++) { + this._registerEventChaining(null, this.__array[i], i); + } + + // ignore if array is empty + if (this.getLength() == 0) { + return; + } + + // store the old data + var oldLength = this.getLength(); + var items = this.__array.concat(); + + // change the length + this.__array.length = 0; + this.__updateLength(); + + // fire change bubbles event + this.fireDataEvent("changeBubble", { + value: [], + name: "0-" + (oldLength - 1), + old: items + }); + + // fire the change event + this.fireDataEvent("change", + { + start: 0, + end: oldLength - 1, + type: "remove", + items: items + }, null + ); + return items; + }, + + + /** + * Append the items of the given array. + * + * @param array {Array|qx.data.IListData} The items of this array will + * be appended. + * @throws An exception if the second argument is not an array. + */ + append : function(array) + { + // qooxdoo array support + if (array instanceof qx.data.Array) { + array = array.toArray(); + } + + // this check is important because opera throws an uncatchable error if + // apply is called without an array as argument. + if (qx.core.Environment.get("qx.debug")) { + qx.core.Assert.assertArray(array, "The parameter must be an array."); + } + + Array.prototype.push.apply(this.__array, array); + + // add a listener to the new items + for (var i = 0; i < array.length; i++) { + this._registerEventChaining(array[i], null, this.__array.length + i); + } + + var oldLength = this.length; + this.__updateLength(); + + // fire change bubbles + this.fireDataEvent("changeBubble", { + value: array, + name: oldLength == (this.length-1) ? oldLength : oldLength + "-" + (this.length-1), + old: [] + }); + + // fire the change event + this.fireDataEvent("change", + { + start: oldLength, + end: this.length - 1, + type: "add", + items: array + }, null + ); + }, + + + /** + * Remove the given item. + * + * @param item {var} Item to be removed from the array. + * @return {var} The removed item. + */ + remove : function(item) + { + var index = this.indexOf(item); + + if (index != -1) + { + this.splice(index, 1); + return item; + } + }, + + + /** + * Check whether the given array has the same content as this. + * Checks only the equality of the arrays' content. + * + * @param array {Array} The array to check. + * @return {Boolean} Whether the two arrays are equal. + */ + equals : function(array) + { + if (this.length !== array.length) { + return false; + } + + for (var i = 0; i < this.length; i++) + { + if (this.getItem(i) !== array.getItem(i)) { + return false; + } + } + + return true; + }, + + + /** + * Returns the sum of all values in the array. Supports + * numeric values only. + * + * @return {Number} The sum of all values. + */ + sum : function() + { + var result = 0; + for (var i = 0; i < this.length; i++) { + result += this.getItem(i); + } + + return result; + }, + + + /** + * Returns the highest value in the given array. + * Supports numeric values only. + * + * @return {Number | null} The highest of all values or undefined if the + * array is empty. + */ + max : function() + { + var result = this.getItem(0); + + for (var i = 1; i < this.length; i++) + { + if (this.getItem(i) > result) { + result = this.getItem(i); + } + } + + return result === undefined ? null : result; + }, + + + /** + * Returns the lowest value in the array. Supports + * numeric values only. + * + * @return {Number | null} The lowest of all values or undefined + * if the array is empty. + */ + min : function() + { + var result = this.getItem(0); + + for (var i = 1; i < this.length; i++) + { + if (this.getItem(i) < result) { + result = this.getItem(i); + } + } + + return result === undefined ? null : result; + }, + + + /** + * Invokes the given function for every item in the array. + * + * @param callback {Function} The function which will be call for every + * item in the array. It will be invoked with three parameters: + * the item, the index and the array itself. + * @param context {var} The context in which the callback will be invoked. + */ + forEach : function(callback, context) + { + for (var i = 0; i < this.__array.length; i++) { + callback.call(context, this.__array[i], i, this); + } + }, + + + /* + --------------------------------------------------------------------------- + INTERNAL HELPERS + --------------------------------------------------------------------------- + */ + /** + * Internal function which updates the length property of the array. + * Every time the length will be updated, a {@link #changeLength} data + * event will be fired. + */ + __updateLength: function() { + var oldLength = this.length; + this.length = this.__array.length; + this.fireDataEvent("changeLength", this.length, oldLength); + } + }, + + + + /* + ***************************************************************************** + DESTRUCTOR + ***************************************************************************** + */ + + destruct : function() { + for (var i = 0; i < this.__array.length; i++) { + var item = this.__array[i]; + this._applyEventPropagation(null, item, i); + + // dispose the items on auto dispose + if (this.isAutoDisposeItems() && item && item instanceof qx.core.Object) { + item.dispose(); + } + } + + this.__array = null; + } +}); +/* ************************************************************************ + + qooxdoo - the new era of web development + + http://qooxdoo.org + + Copyright: + 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de + 2006 Derrell Lipman + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Sebastian Werner (wpbasti) + * Andreas Ecker (ecker) + * Derrell Lipman (derrell) + +************************************************************************ */ + +/** + * This class is used to send HTTP requests to the server. + * + * Note: This class will be deprecated in a future release. Instead, + * classes found in {@link qx.io.request} will offer request handling. + */ +qx.Class.define("qx.io.remote.Request", +{ + extend : qx.core.Object, + + + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param vUrl {String} + * Target url to issue the request to. + * + * @param vMethod {String} + * Determines http method (GET, POST, PUT, etc.) to use. See "method" property + * for valid values and default value. + * + * @param vResponseType {String} + * The mime type of the response. Default is text/plain. + */ + construct : function(vUrl, vMethod, vResponseType) + { + this.base(arguments); + + this.__requestHeaders = {}; + this.__urlParameters = {}; + this.__dataParameters = {}; + this.__formFields = {}; + + if (vUrl !== undefined) { + this.setUrl(vUrl); + } + + if (vMethod !== undefined) { + this.setMethod(vMethod); + } + + if (vResponseType !== undefined) { + this.setResponseType(vResponseType); + } + + this.setProhibitCaching(true); + + // Get the next sequence number for this request + this.__seqNum = ++qx.io.remote.Request.__seqNum; + }, + + + + + /* + ***************************************************************************** + EVENTS + ***************************************************************************** + */ + + events : { + + /** Fired when the Request object changes its state to 'created' */ + "created" : "qx.event.type.Event", + + /** Fired when the Request object changes its state to 'configured' */ + "configured" : "qx.event.type.Event", + + /** Fired when the Request object changes its state to 'sending' */ + "sending" : "qx.event.type.Event", + + /** Fired when the Request object changes its state to 'receiving' */ + "receiving" : "qx.event.type.Event", + + /** + * Fired once the request has finished successfully. The event object + * can be used to read the transferred data. + */ + "completed" : "qx.io.remote.Response", + + /** Fired when the pending request has been aborted. */ + "aborted" : "qx.event.type.Event", + + /** Fired when the pending request failes. */ + "failed" : "qx.io.remote.Response", + + /** Fired when the pending request times out. */ + "timeout" : "qx.io.remote.Response" + }, + + + + /* + ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + /* + --------------------------------------------------------------------------- + SEQUENCE NUMBER + --------------------------------------------------------------------------- + */ + + /** + * Sequence (id) number of a request, used to associate a response or error + * with its initiating request. + */ + __seqNum : 0, + + /** + * Returns true if the given HTTP method allows a request body being transferred to the server. + * This is currently POST and PUT. Other methods require their data being encoded into + * the URL + * + * @param httpMethod {String} one of the values of the method property + * @return {Boolean} + */ + methodAllowsRequestBody : function(httpMethod) { + return (httpMethod == "POST") || (httpMethod == "PUT"); + } + + }, + + + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /** + * Target url to issue the request to. + */ + url : + { + check : "String", + init : "" + }, + + + /** + * Determines what type of request to issue (GET or POST). + */ + method : + { + check : [ "GET", "POST", "PUT", "HEAD", "DELETE" ], + apply : "_applyMethod", + init : "GET" + }, + + + /** + * Set the request to asynchronous. + */ + asynchronous : + { + check : "Boolean", + init : true + }, + + + /** + * Set the data to be sent via this request + */ + data : + { + check : "String", + nullable : true + }, + + + /** + * Username to use for HTTP authentication. + * Set to NULL if HTTP authentication is not used. + */ + username : + { + check : "String", + nullable : true + }, + + + /** + * Password to use for HTTP authentication. + * Set to NULL if HTTP authentication is not used. + */ + password : + { + check : "String", + nullable : true + }, + + + /** + * The state that the request is in, while being processed. + */ + state : + { + check : [ "configured", "queued", "sending", "receiving", "completed", "aborted", "timeout", "failed" ], + init : "configured", + apply : "_applyState", + event : "changeState" + }, + + + /** + * Response type of request. + * + * The response type is a MIME type, default is text/plain. Other supported + * MIME types are text/javascript, text/html, application/json, + * application/xml. + */ + responseType : + { + check : [ "text/plain", "text/javascript", "application/json", "application/xml", "text/html" ], + init : "text/plain", + apply : "_applyResponseType" + }, + + + /** + * Number of milliseconds before the request is being timed out. + * + * If this property is null, the timeout for the request comes is the + * qx.io.remote.RequestQueue's property defaultTimeout. + */ + timeout : + { + check : "Integer", + nullable : true + }, + + + /** + * Prohibit request from being cached. + * + * Setting the value to <i>true</i> adds a parameter "nocache" to the + * request URL with a value of the current time, as well as adding request + * headers Pragma:no-cache and Cache-Control:no-cache. + * + * Setting the value to <i>false</i> removes the parameter and request + * headers. + * + * As a special case, this property may be set to the string value + * "no-url-params-on-post" which will prevent the nocache parameter from + * being added to the URL if the POST method is used but will still add + * the Pragma and Cache-Control headers. This is useful if your backend + * does nasty things like mixing parameters specified in the URL into + * form fields in the POST request. (One example of this nasty behavior + * is known as "mixed mode" in Oracle, as described here: + * http://download.oracle.com/docs/cd/B32110_01/web.1013/b28963/concept.htm#i1005684) + */ + prohibitCaching : + { + check : function(v) + { + return typeof v == "boolean" || v === "no-url-params-on-post"; + }, + init : true, + apply : "_applyProhibitCaching" + }, + + + /** + * Indicate that the request is cross domain. + * + * A request is cross domain if the request's URL points to a host other than + * the local host. This switches the concrete implementation that is used for + * sending the request from qx.io.remote.transport.XmlHttp to + * qx.io.remote.transport.Script, because only the latter can handle cross + * domain requests. + */ + crossDomain : + { + check : "Boolean", + init : false + }, + + + /** + * Indicate that the request will be used for a file upload. + * + * The request will be used for a file upload. This switches the concrete + * implementation that is used for sending the request from + * qx.io.remote.transport.XmlHttp to qx.io.remote.IFrameTransport, because only + * the latter can handle file uploads. + */ + fileUpload : + { + check : "Boolean", + init : false + }, + + + /** + * The transport instance used for the request. + * + * This is necessary to be able to abort an asynchronous request. + */ + transport : + { + check : "qx.io.remote.Exchange", + nullable : true + }, + + + /** + * Use Basic HTTP Authentication. + */ + useBasicHttpAuth : + { + check : "Boolean", + init : false + }, + + /** + * If true and the responseType property is set to "application/json", getContent() will + * return a Javascript map containing the JSON contents, i. e. the result qx.lang.Json.parse(). + * If false, the raw string data will be returned and the parsing must be done manually. + * This is usefull for special JSON dialects / extensions which are not supported by + * qx.lang.Json. + * + * Note that this is currently only respected by qx.io.remote.transport.XmlHttp, i. e. + * if the transport used is the one using XMLHttpRequests. The other transports + * do not support JSON parsing, so this property has no effect. + */ + parseJson : + { + check : "Boolean", + init : true + } + }, + + + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + + __requestHeaders : null, + __urlParameters : null, + __dataParameters : null, + __formFields : null, + __seqNum : null, + + /* + --------------------------------------------------------------------------- + CORE METHODS + --------------------------------------------------------------------------- + */ + + /** + * Schedule this request for transport to server. + * + * The request is added to the singleton class qx.io.remote.RequestQueue's + * list of pending requests. + * + * @return {void} + */ + send : function() { + qx.io.remote.RequestQueue.getInstance().add(this); + }, + + + /** + * Abort sending this request. + * + * The request is removed from the singleton class qx.io.remote.RequestQueue's + * list of pending events. If the request haven't been scheduled this + * method is a noop. + * + * @return {void} + */ + abort : function() { + qx.io.remote.RequestQueue.getInstance().abort(this); + }, + + + /** + * Abort sending this request if it has not already been aborted. + * + * @return {void} + */ + reset : function() + { + switch(this.getState()) + { + case "sending": + case "receiving": + this.error("Aborting already sent request!"); + + // no break + + case "queued": + this.abort(); + break; + } + }, + + + + + /* + --------------------------------------------------------------------------- + STATE ALIASES + --------------------------------------------------------------------------- + */ + + /** + * Determine if this request is in the configured state. + * + * @return {Boolean} <true> if the request is in the configured state; <false> otherwise. + */ + isConfigured : function() { + return this.getState() === "configured"; + }, + + + /** + * Determine if this request is in the queued state. + * + * @return {Boolean} <true> if the request is in the queued state; <false> otherwise. + */ + isQueued : function() { + return this.getState() === "queued"; + }, + + + /** + * Determine if this request is in the sending state. + * + * @return {Boolean} <true> if the request is in the sending state; <false> otherwise. + */ + isSending : function() { + return this.getState() === "sending"; + }, + + + /** + * Determine if this request is in the receiving state. + * + * @return {Boolean} <true> if the request is in the receiving state; <false> otherwise. + */ + isReceiving : function() { + return this.getState() === "receiving"; + }, + + + /** + * Determine if this request is in the completed state. + * + * @return {Boolean} <true> if the request is in the completed state; <false> otherwise. + */ + isCompleted : function() { + return this.getState() === "completed"; + }, + + + /** + * Determine if this request is in the aborted state. + * + * @return {Boolean} <true> if the request is in the aborted state; <false> otherwise. + */ + isAborted : function() { + return this.getState() === "aborted"; + }, + + + /** + * Determine if this request is in the timeout state. + * + * @return {Boolean} <true> if the request is in the timeout state; <false> otherwise. + */ + isTimeout : function() { + return this.getState() === "timeout"; + }, + + + /** + * Determine if this request is in the failed state. + * + * @return {Boolean} <true> if the request is in the failed state; <false> otherwise. + */ + isFailed : function() { + return this.getState() === "failed"; + }, + + + + + /* + --------------------------------------------------------------------------- + EVENT HANDLER + --------------------------------------------------------------------------- + */ + + /** + * Dispatches a clone of the given event on this instance + * + * @param e {qx.event.type.Event} The original event + */ + __forwardEvent : qx.event.GlobalError.observeMethod(function(e) + { + var clonedEvent = e.clone(); + clonedEvent.setTarget(this); + this.dispatchEvent(clonedEvent); + }), + + + + /** + * Event handler called when the request enters the queued state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _onqueued : function(e) + { + // Modify internal state + this.setState("queued"); + + // Bubbling up + this.__forwardEvent(e); + }, + + + /** + * Event handler called when the request enters the sending state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _onsending : function(e) + { + // Modify internal state + this.setState("sending"); + + // Bubbling up + this.__forwardEvent(e); + }, + + + /** + * Event handler called when the request enters the receiving state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _onreceiving : function(e) + { + // Modify internal state + this.setState("receiving"); + + // Bubbling up + this.__forwardEvent(e); + }, + + + /** + * Event handler called when the request enters the completed state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _oncompleted : function(e) + { + // Modify internal state + this.setState("completed"); + + // Bubbling up + this.__forwardEvent(e); + + // Automatically dispose after event completion + this.dispose(); + }, + + + /** + * Event handler called when the request enters the aborted state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _onaborted : function(e) + { + // Modify internal state + this.setState("aborted"); + + // Bubbling up + this.__forwardEvent(e); + + // Automatically dispose after event completion + this.dispose(); + }, + + + /** + * Event handler called when the request enters the timeout state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _ontimeout : function(e) + { + /* + // User's handler can block until timeout. + switch(this.getState()) + { + // If we're no longer running... + case "completed": + case "timeout": + case "aborted": + case "failed": + // then don't bubble up the timeout event + return; + } + + + */ // Modify internal state + this.setState("timeout"); + + // Bubbling up + this.__forwardEvent(e); + + // Automatically dispose after event completion + this.dispose(); + }, + + + /** + * Event handler called when the request enters the failed state. + * + * @param e {qx.event.type.Event} Event indicating state change + * @return {void} + */ + _onfailed : function(e) + { + // Modify internal state + this.setState("failed"); + + // Bubbling up + this.__forwardEvent(e); + + // Automatically dispose after event completion + this.dispose(); + }, + + + + + /* + --------------------------------------------------------------------------- + APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + // property apply + _applyState : function(value, old) + { + if (qx.core.Environment.get("qx.debug")) + { + if (qx.core.Environment.get("qx.ioRemoteDebug")) { + this.debug("State: " + value); + } + } + }, + + + // property apply + _applyProhibitCaching : function(value, old) + { + if (! value) + { + this.removeParameter("nocache"); + this.removeRequestHeader("Pragma"); + this.removeRequestHeader("Cache-Control"); + return; + } + + // If value isn't "no-url-params-on-post" or this isn't a POST request + if (value !== "no-url-params-on-post" || + this.getMethod() != "POST") + { + // ... then add a parameter to the URL to make it unique on each + // request. The actual id, "nocache" is irrelevant; it's the fact + // that a (usually) different date is added to the URL on each request + // that prevents caching. + this.setParameter("nocache", new Date().valueOf()); + } + else + { + // Otherwise, we don't want the nocache parameer in the URL. + this.removeParameter("nocache"); + } + + // Add the HTTP 1.0 request to avoid use of a cache + this.setRequestHeader("Pragma", "no-cache"); + + // Add the HTTP 1.1 request to avoid use of a cache + this.setRequestHeader("Cache-Control", "no-cache"); + }, + + + // property apply + _applyMethod : function(value, old) + { + if (qx.io.remote.Request.methodAllowsRequestBody(value)) { + this.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } else { + this.removeRequestHeader("Content-Type"); + } + + // Re-test the prohibit caching property. We may need to add or remove + // the "nocache" parameter. We explicitly call the _apply method since + // it wouldn't be called normally when setting the value to its already + // existant value. + var prohibitCaching = this.getProhibitCaching(); + this._applyProhibitCaching(prohibitCaching, prohibitCaching); + }, + + + // property apply + _applyResponseType : function(value, old) { + this.setRequestHeader("X-Qooxdoo-Response-Type", value); + }, + + + + + /* + --------------------------------------------------------------------------- + REQUEST HEADER + --------------------------------------------------------------------------- + */ + + /** + * Add a request header to the request. + * + * Example: request.setRequestHeader("Content-Type", "text/html") + * + * Please note: Some browsers, such as Safari 3 and 4, will capitalize + * header field names. This is in accordance with RFC 2616[1], which states + * that HTTP 1.1 header names are case-insensitive, so your server backend + * should be case-agnostic when dealing with request headers. + * + * [1]{@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2} + * + * @param vId {String} The identifier to use for this added header + * @param vValue {String} The value to use for this added header + * @return {void} + */ + setRequestHeader : function(vId, vValue) { + this.__requestHeaders[vId] = vValue; + }, + + + /** + * Remove a previously-added request header + * + * @param vId {String} The id of the header to be removed + * @return {void} + */ + removeRequestHeader : function(vId) { + delete this.__requestHeaders[vId]; + }, + + + /** + * Retrieve the value of a header which was previously set + * + * @param vId {String} The id of the header value being requested + * @return {String} The value of the header with the specified id + */ + getRequestHeader : function(vId) { + return this.__requestHeaders[vId] || null; + }, + + + /** + * Return the object containing all of the headers which have been added. + * + * @return {Object} The returned object has as its property names each of the ids of headers + * which have been added, and as each property value, the value of the + * property corresponding to that id. + */ + getRequestHeaders : function() { + return this.__requestHeaders; + }, + + + + + /* + --------------------------------------------------------------------------- + PARAMETERS + --------------------------------------------------------------------------- + */ + + /** + * Add a parameter to the request. + * + * @param vId {String} + * String identifier of the parameter to add. + * + * @param vValue {var} + * Value of parameter. May be a string (for one parameter) or an array + * of strings (for setting multiple parameter values with the same + * parameter name). + * + * @param bAsData {Boolean | false} + * If <i>false</i>, add the parameter to the URL. If <i>true</i> then + * instead the parameters added by calls to this method will be combined + * into a string added as the request data, as if the entire set of + * parameters had been pre-build and passed to setData(). + * + * Note: Parameters requested to be sent as data will be silently dropped + * if data is manually added via a call to setData(). + * + * Note: Some transports, e.g. Script, do not support passing parameters + * as data. + * + * @return {void} + */ + setParameter : function(vId, vValue, bAsData) + { + if (bAsData) + { + this.__dataParameters[vId] = vValue; + } + else + { + this.__urlParameters[vId] = vValue; + } + }, + + + /** + * Remove a parameter from the request. + * + * @param vId {String} + * Identifier of the parameter to remove. + * + * @param bFromData {Boolean} + * If <i>false</i> then remove the parameter of the URL parameter list. + * If <i>true</i> then remove it from the list of parameters to be sent + * as request data. + * + * @return {void} + */ + removeParameter : function(vId, bFromData) + { + if (bFromData) + { + delete this.__dataParameters[vId]; + } + else + { + delete this.__urlParameters[vId]; + } + }, + + + /** + * Get a parameter in the request. + * + * @param vId {String} + * Identifier of the parameter to get. + * + * @param bFromData {Boolean} + * If <i>false</i> then retrieve the parameter from the URL parameter + * list. If <i>true</i> then retrieve it from the list of parameters to + * be sent as request data. + * + * @return {var} + * The requested parameter value + * + */ + getParameter : function(vId, bFromData) + { + if (bFromData) + { + return this.__dataParameters[vId] || null; + } + else + { + return this.__urlParameters[vId] || null; + } + }, + + + /** + * Returns the object containg all parameters for the request. + * + * @param bFromData {Boolean} + * If <i>false</i> then retrieve the URL parameter list. + * If <i>true</i> then retrieve the data parameter list. + * + * @return {Object} + * The returned object has as its property names each of the ids of + * parameters which have been added, and as each property value, the + * value of the property corresponding to that id. + */ + getParameters : function(bFromData) + { + return (bFromData ? this.__dataParameters : this.__urlParameters); + }, + + + + + /* + --------------------------------------------------------------------------- + FORM FIELDS + --------------------------------------------------------------------------- + */ + + /** + * Add a form field to the POST request. + * + * NOTE: Adding any programatic form fields using this method will switch the + * Transport implementation to IframeTransport. + * + * NOTE: Use of these programatic form fields disallow use of synchronous + * requests and cross-domain requests. Be sure that you do not need + * those features when setting these programatic form fields. + * + * @param vId {String} String identifier of the form field to add. + * @param vValue {String} Value of form field + *... [truncated message content] |
From: <san...@us...> - 2011-09-29 22:00:24
|
Revision: 21472 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21472&view=rev Author: sandersson Date: 2011-09-29 22:00:17 +0000 (Thu, 29 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-29 19:06:41 UTC (rev 21471) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-29 22:00:17 UTC (rev 21472) @@ -232,7 +232,7 @@ * * @param page {qxe.ui.wizard.Page} The page which should be added. */ - _add : function(page) + add : function(page) { if (qx.core.Environment.get("qx.debug")) { @@ -250,7 +250,7 @@ * * @param page {qxe.ui.wizard.Page} The page to be removed. */ - _remove : function(page) + remove : function(page) { this.getChildControl("stack-pane").remove(page); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-29 19:06:48
|
Revision: 21471 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21471&view=rev Author: sandersson Date: 2011-09-29 19:06:41 +0000 (Thu, 29 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/widget/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/widget/Wizard.js Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/widget/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/widget/Wizard.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/widget/Wizard.js 2011-09-29 19:06:41 UTC (rev 21471) @@ -0,0 +1,58 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Class.define("qxe.demo.widget.Wizard", +{ + extend : qx.application.Standalone, + + members : + { + main: function() + { + this.base(arguments); + + var layout = new qx.ui.layout.Basic(); + + var container = new qx.ui.container.Composite(layout); + container.setPadding(10); + this.getRoot().add(container); + + this.addWizard(container); + }, + + addWizard : function(container) + { + var wizard = new qxe.ui.wizard.Wizard(); + + // The pages of the wizard + var pageOne = qxe.ui.wizard.Page(); + var pageTwo = qxe.ui.wizard.Page(); + var pageThree = qxe.ui.wizard.Page(); + var pageFour = qxe.ui.wizard.Page(); + var pageFive = qxe.ui.wizard.Page(); + var pageSix = qxe.ui.wizard.Page(); + + container.add(pageOne); + container.add(pageTwo); + container.add(pageThree); + container.add(pageFour); + container.add(pageFive); + container.add(pageSix); + } + } +}); + Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-29 17:18:30 UTC (rev 21470) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-29 19:06:41 UTC (rev 21471) @@ -16,7 +16,8 @@ ************************************************************************ */ /** - * + * A wizard consists of a collection of pages which are all one step in the + * wizard. */ qx.Class.define("qxe.ui.wizard.Page", { @@ -31,11 +32,10 @@ */ /** - * @param label {String} The label of the page. - * @param previous {qxe.ui.wizard.IPage} The previous page to navigate to. - * @param next {qxe.ui.wizard.IPage} The next page to navigate to. + * @param legend {String} The label of the page. + * @param icon {String} The icon of the page. */ - construct : function(legend, icon, previous, next) + construct : function(legend, icon) { this.base(arguments); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-29 17:18:36
|
Revision: 21470 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21470&view=rev Author: spackers Date: 2011-09-29 17:18:30 +0000 (Thu, 29 Sep 2011) Log Message: ----------- fix function name and add getUploadHandler() method Modified Paths: -------------- trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js 2011-09-29 14:25:54 UTC (rev 21469) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js 2011-09-29 17:18:30 UTC (rev 21470) @@ -77,6 +77,7 @@ // for the form's action attribute) // var uploader = new com.zenesis.qx.upload.UploadMgr(btn, "http://www.zenesis.com/demoupload"); + uploader.getUploadHandler().addParam("myParam", "test"); uploader.addListener("addFile", function(evt) { var file = evt.getData(), item = new qx.ui.form.ListItem(file.getFilename() + " (queued for upload)", null, file); Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js 2011-09-29 14:25:54 UTC (rev 21469) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js 2011-09-29 17:18:30 UTC (rev 21470) @@ -217,6 +217,14 @@ if (this.getAutoUpload()) this.__uploadHandler.beginUploads(); this._resetInputElement(widget); + }, + + /** + * Returns the upload handler + * @returns + */ + getUploadHandler: function() { + return this.__uploadHandler; } } }); \ No newline at end of file Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js 2011-09-29 14:25:54 UTC (rev 21469) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js 2011-09-29 17:18:30 UTC (rev 21470) @@ -27,7 +27,6 @@ ************************************************************************/ /* #ignore(File) -#ignore(encodeUriComponent) */ /** * Implementation of AbstractHandler that uses XMLHttpRequest; this is based on work @@ -105,7 +104,7 @@ action += "&"; else addAmpersand = true; - action += name + "=" + encodeUriComponent(params[name]); + action += name + "=" + encodeURIComponent(params[name]); } xhr.open("POST", action, true); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-29 14:26:05
|
Revision: 21469 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21469&view=rev Author: sandersson Date: 2011-09-29 14:25:54 +0000 (Thu, 29 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/__init__.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/__init__.js 2011-09-29 14:25:54 UTC (rev 21469) @@ -0,0 +1,6 @@ +/* + * The *qxe.ui.form* namespace contains classes to build complex forms for a + * large number of user inputs. + * + * Following is a complete list of the available *qxe.ui.from* packages: + */ Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-27 21:38:44 UTC (rev 21468) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-29 14:25:54 UTC (rev 21469) @@ -158,7 +158,7 @@ tooltip = new qx.ui.tooltip.ToolTip(this.tr("Go to previous step.")); control = new qx.ui.form.Button(this.tr("Previous"), "icon/16/actions/go-previous.png"); - control.addListener("execute", this.previous, this); + control.addListener("execute", this._onExecutePrevious, this); control.setToolTip(tooltip); control.setIconPosition("left"); break; @@ -211,7 +211,7 @@ tooltip = new qx.ui.tooltip.ToolTip(this.tr("Go to next step.")); control = new qx.ui.form.Button(this.tr("Next"), "icon/16/actions/go-next.png"); - control.addListener("execute", this.next, this); + control.addListener("execute", this._onExecuteNext, this); control.setToolTip(tooltip); control.setIconPosition("right"); break; @@ -227,13 +227,12 @@ --------------------------------------------------------------------------- */ - /** * Add a page to the wizard. * * @param page {qxe.ui.wizard.Page} The page which should be added. */ - add : function(page) + _add : function(page) { if (qx.core.Environment.get("qx.debug")) { @@ -251,7 +250,7 @@ * * @param page {qxe.ui.wizard.Page} The page to be removed. */ - remove : function(page) + _remove : function(page) { this.getChildControl("stack-pane").remove(page); }, @@ -295,7 +294,26 @@ this.getChildControl("num-steps").setValue("" + stack.getChildren().length); }, + /** + * Event handler for <code>execute</code> of the previous button. + * + * @param e {qx.event.type.Data} Data event. + */ + _onExecutePrevious : function(e) + { + this.previous(); + }, + /** + * Event handler for <code>execute</code> of the next button. + * + * @param e {qx.event.type.Data} Data event. + */ + _onExecuteNext : function(e) + { + this.next(); + }, + /* --------------------------------------------------------------------------- NAVIGATION @@ -305,10 +323,11 @@ /** * Navigate to previous page. */ - previous : function(e) + previous : function() { - var previous = e.getSource().getPrevious(); var stack = this.getChildControl("stack-pane"); + var current = stack.getSelection()[0]; + var previous = current.getPrevious(); if(previous != null) { @@ -316,17 +335,21 @@ } else { - stack.previous; + if(stack.indexOf(current)) + { + stack.previous(); + } } }, /** * Navigate to next page. */ - next : function(e) + next : function() { - var next = e.getSource().getNext(); var stack = this.getChildControl("stack-pane"); + var current = stack.getSelection()[0]; + var next = current.getNext(); if(next != null) { @@ -334,7 +357,10 @@ } else { - stack.next; + if(stack.indexOf(current)) + { + stack.next(); + } } }, @@ -343,7 +369,7 @@ */ enablePages : function() { - var children = this.getChildren(); + var children = this.getChildControl("stack-pane").getChildren(); for(var i = 0, l = children.length; i < l; i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2011-09-27 21:38:54
|
Revision: 21468 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21468&view=rev Author: thron7 Date: 2011-09-27 21:38:44 +0000 (Tue, 27 Sep 2011) Log Message: ----------- started json schema for apidata Added Paths: ----------- workspace/thron7/misc/jsonschema/ workspace/thron7/misc/jsonschema/apidata_schema.json workspace/thron7/tmp/qxoo/ workspace/thron7/tmp/qxoo/config.json Added: workspace/thron7/misc/jsonschema/apidata_schema.json =================================================================== --- workspace/thron7/misc/jsonschema/apidata_schema.json (rev 0) +++ workspace/thron7/misc/jsonschema/apidata_schema.json 2011-09-27 21:38:44 UTC (rev 21468) @@ -0,0 +1,29 @@ +// A schema description of the config.json format +// json-schema.org / http://tools.ietf.org/html/draft-zyp-json-schema-03 + +{ + "description" : "Apiviewer's apidata schema vers. 1.6", + "type" : "object", + + "properties" : + { + "type" : + { + "description" : "The root doctree node", + "type" : "string", + //"values" : ["doctree"], + "required" : true + }, + + "children" : + { + "description" : "Array of child nodes", + "type" : "list", + "items" : + { + "type" : ..., + "children" : ... + } + } + } +} Added: workspace/thron7/tmp/qxoo/config.json =================================================================== --- workspace/thron7/tmp/qxoo/config.json (rev 0) +++ workspace/thron7/tmp/qxoo/config.json 2011-09-27 21:38:44 UTC (rev 21468) @@ -0,0 +1,130 @@ +{ + "include" : + [ + { + "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" + } + ], + + "export": + [ + "api", + "api-data", + //"build", + "clean", + "distclean", + "fix", + "images", + "lint", + "lint-test", + "provider", + "test", + "test-inline", + "test-source", + "test-performance", + "test-performance-source", + "translation", + "qxoo-build", + "qxoo-noopt" + ], + + + "let" : + { + "APPLICATION" : "qx", + "QOOXDOO_PATH" : "..", + "API_EXCLUDE" : ["qx.test.*"], + "TEST_INCLUDE" : "qx.test.*", + "LOCALES" : [ "en" ], + "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache" + }, + + "jobs": + { + + "qxoo" : + { + "library" : + [ + { + "manifest" : "${QOOXDOO_PATH}/framework/Manifest.json", + "uri" : ".." + } + ], + + "extend" : [ "cache" ], + + "include" : + [ + "qx.Class", + "qx.Mixin", + "qx.Interface" + ], + + "exclude" : + [ + "qx.event.GlobalError" + ], + + "environment" : + { + "qx.debug" : false, + "qx.aspects" : false, + "qx.globalErrorHandling" : false + }, + + "compile-options" : + { + "paths" : + { + "loader-template" : "../tool/data/generator/oo.loader.tmpl.js" + }, + "uris" : + { + "script" : ".", + "resource" : "." + } + } + }, + + + "qxoo-build" : + { + "extend" : [ "qxoo" ], + + "compile-options" : + { + "paths" : + { + "file" : "build/script/qx-oo.js" + }, + "code" : + { + "format" : true, + "optimize" : [ "variables", "basecalls", "privates", "strings" ] + } + }, + "compile" : { "type" : "build" } + }, + + + "qxoo-noopt" : + { + "extend" : [ "qxoo" ], + + "compile-options" : + { + "paths" : + { + "file" : "build/script/qx-oo-noopt.js" + }, + "code" : + { + "format" : true, + "optimize" : [ ] + } + }, + "compile" : { "type" : "build" } + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-27 11:33:35
|
Revision: 21467 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21467&view=rev Author: sandersson Date: 2011-09-27 11:33:26 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-27 11:22:43 UTC (rev 21466) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-27 11:33:26 UTC (rev 21467) @@ -77,7 +77,7 @@ * Next page to navigate to. */ next : - { + { check : "qxe.ui.wizard.Page", nullable : true, init : null, Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-27 11:22:43 UTC (rev 21466) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-27 11:33:26 UTC (rev 21467) @@ -28,7 +28,7 @@ * and validated. It is possible to navigate between the pages by the previous and * next buttons, and by typing in the step number in the field. * - * The following features re included in the wizard widget: + * The following features are included in the wizard widget: * - Easy to implement wizard widget. * - Assemble a Wizard from a series of pages. * - Support for multiple branches (dynamically changing sets of steps) @@ -119,7 +119,7 @@ case "stack-pane": control = new qx.ui.container.Stack(); control.setDecorator("main"); - control.addListener("changeSelection", this._changeSelection, this); + control.addListener("changeSelection", this._onChangeSelection, this); this._add(control); break; @@ -139,14 +139,14 @@ var spacer1 = new qx.ui.core.Spacer(); spacer1.setAllowGrowX(true); - + control.add(spacer1, {flex : 1}); control.add(this._createChildControl("step-navigation")); var spacer2 = new qx.ui.core.Spacer(); spacer2.setAllowGrowX(true); - + control.add(spacer2, {flex : 1}); control.add(this._createChildControl("next-button")); @@ -283,7 +283,7 @@ } else if(index == (stack.getChildren().length - 1)) { - this.getChildControl("next-button").setEnabled(false); + this.getChildControl("next-button").setEnabled(false); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-27 11:22:50
|
Revision: 21466 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21466&view=rev Author: sandersson Date: 2011-09-27 11:22:43 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-27 08:07:38 UTC (rev 21465) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-27 11:22:43 UTC (rev 21466) @@ -35,13 +35,9 @@ * @param previous {qxe.ui.wizard.IPage} The previous page to navigate to. * @param next {qxe.ui.wizard.IPage} The next page to navigate to. */ - construct : function(label, previous, next) + construct : function(legend, icon, previous, next) { this.base(arguments); - - this.setLabel(label); - this.setPrevious(previous); - this.setNext(next); }, @@ -96,17 +92,6 @@ */ /** - * The label of the page. - */ - label : - { - check : "String", - init : null, - nullabe : true, - event : "changeLabel" - }, - - /** * Whether to allow to go to the previous wizard pane. */ allowPrevious : This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <d_w...@us...> - 2011-09-27 08:07:44
|
Revision: 21465 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21465&view=rev Author: d_wagner Date: 2011-09-27 08:07:38 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Don't try to set a global error handler for a demo that didn't load Modified Paths: -------------- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js Modified: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-09-27 06:12:07 UTC (rev 21464) +++ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-09-27 08:07:38 UTC (rev 21465) @@ -182,12 +182,21 @@ // run the sample this.runScript(scriptCode, "Running sample"); + var demoLoaded = false; try { this.waitForDemoApp(); + demoLoaded = true; } catch(ex) { this.log("Error while waiting for demo " + nextSampleCategory + " - " + nextSampleLabel + " to load: " + ex, "error"); } + var currentSample = "Unknown demo"; + var category = "Unknown category"; + + if (!demoLoaded) { + return [category,currentSample]; + } + if (this.getConfigSetting("sampleGlobalErrorLogging")) { try { this.addErrorHandlerToDemo(); @@ -196,9 +205,6 @@ } } - var currentSample = "Unknown demo"; - var category = "Unknown category"; - try { var sampleTemp = this.getEval(getSampleLabel, "Getting current sample label"); } catch(ex) {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-27 06:12:13
|
Revision: 21464 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21464&view=rev Author: sandersson Date: 2011-09-27 06:12:07 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json Modified: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-27 06:08:54 UTC (rev 21463) +++ trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-27 06:12:07 UTC (rev 21464) @@ -23,7 +23,7 @@ "provides" : { - "namespace" : "qxe.ui.wizard", + "namespace" : "qxe", "encoding" : "utf-8", "class" : "source/class", "resource" : "source/resource", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-27 06:09:01
|
Revision: 21463 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21463&view=rev Author: sandersson Date: 2011-09-27 06:08:54 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json Modified: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-26 20:39:22 UTC (rev 21462) +++ trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-27 06:08:54 UTC (rev 21463) @@ -23,7 +23,7 @@ "provides" : { - "namespace" : "qxe", + "namespace" : "qxe.ui.wizard", "encoding" : "utf-8", "class" : "source/class", "resource" : "source/resource", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-26 20:39:29
|
Revision: 21462 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21462&view=rev Author: sandersson Date: 2011-09-26 20:39:22 +0000 (Mon, 26 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Decoration.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Font.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Theme.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Color.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Font.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Theme.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/__init__.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/__init__.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,4 @@ +/** + * Themes are responsible for styling the graphical user interface of your + * application. + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,43 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/* ************************************************************************ + +#asset(qx/icon/Oxygen/16/actions/dialog-cancel.png) +#asset(qx/icon/Oxygen/16/actions/dialog-ok.png) + +# asset(qxe/decoration/Classic/*) + +************************************************************************* */ + +qx.Theme.define("qxe.theme.classic.Appearance", +{ + title : "qxe classic appearance theme", + + appearances : + { + /* + --------------------------------------------------------------------------- + WIZARD + --------------------------------------------------------------------------- + */ + + // Inherits from respective parent + "wizard" : "widget", + "wizard-page" : "groupbox" +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,23 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.classic.Color", +{ + colors : + { + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Decoration.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Decoration.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,24 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.classic.Decoration", +{ + decorations : + { + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Font.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Font.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Font.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,23 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.classic.Font", +{ + fonts : + { + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Theme.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Theme.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Theme.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,33 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/** + * Classic Windows Theme + */ +qx.Theme.define("qxe.theme.classic.Theme", +{ + title : "Classic Windows", + + meta : + { + color : qxe.theme.classic.Color, + decoration : qxe.theme.classic.Decoration, + font : qxe.theme.classic.Font, + appearance : qxe.theme.classic.Appearance, + icon : qx.theme.icon.Oxygen + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/__init__.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,4 @@ +/** + * qxe.theme.classic package + * + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,44 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/* ************************************************************************ + +#asset(qx/icon/Tango/16/actions/dialog-cancel.png) +#asset(qx/icon/Tango/16/actions/dialog-ok.png) + +# asset(qx/decoration/Modern/*) + +************************************************************************* */ + +qx.Theme.define("qxe.theme.modern.Appearance", +{ + title : "qxe modern appearance theme", + + appearances : + { + /* + --------------------------------------------------------------------------- + WIZARD + --------------------------------------------------------------------------- + */ + + // Inherits from respective parent + "wizard" : "widget", + "wizard-page" : "groupbox" + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Color.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Color.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Color.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,23 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.modern.Color", +{ + colors : + { + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,24 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.modern.Decoration", +{ + decorations : + { + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Font.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Font.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Font.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,23 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Theme.define("qxe.theme.modern.Font", +{ + fonts : + { + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Theme.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Theme.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Theme.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,33 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/** + * Contemporary Theme + */ +qx.Theme.define("qxe.theme.modern.Theme", +{ + title : "Modern", + + meta : + { + color : qxe.theme.modern.Color, + decoration : qxe.theme.modern.Decoration, + font : qxe.theme.modern.Font, + appearance : qxe.theme.modern.Appearance, + icon : qx.theme.icon.Tango + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/__init__.js 2011-09-26 20:39:22 UTC (rev 21462) @@ -0,0 +1,4 @@ +/** + * qxe.theme.modern package + * + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-26 11:16:47
|
Revision: 21461 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21461&view=rev Author: sandersson Date: 2011-09-26 11:16:41 +0000 (Mon, 26 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json trunk/qooxdoo-contrib/qxe/trunk/config.json trunk/qooxdoo-contrib/qxe/trunk/generate.py Added: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-26 11:16:41 UTC (rev 21461) @@ -0,0 +1,34 @@ +{ + "info" : + { + "name" : "qxe", + + "summary" : "qooxdoo extension framework", + "description" : "Extension of the standard qooxdoo framework.", + + "homepage" : "http://contrib.qooxdoo.org/project/qxe", + + "license" : "LGPL/EPL", + "authors" : + [ + { + "name" : "Stefan Andersson (sand)", + "email" : "ste...@li..." + } + ], + + "version" : "trunk", + "qooxdoo-versions": ["1.6"] + }, + + "provides" : + { + "namespace" : "qxe", + "encoding" : "utf-8", + "class" : "source/class", + "resource" : "source/resource", + "translation" : "source/translation", + "type" : "contribution" + } +} + Added: trunk/qooxdoo-contrib/qxe/trunk/config.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/config.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/config.json 2011-09-26 11:16:41 UTC (rev 21461) @@ -0,0 +1,40 @@ +{ + "name" : "qxe", + + "include" : + [ + { + "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" + } + ], + + "export" : + [ + "api", + "api-data", + "clean", + "distclean", + "fix", + "info", + "inspector", + "lint", + "migration", + "pretty", + "test", + "test-source", + "translation" + ], + + "let" : + { + "APPLICATION" : "qxe", + "APPLICATION_MAIN_CLASS" : "${APPLICATION}.demo.Demo", + "QOOXDOO_PATH" : "../../../qooxdoo", + //"QXTHEME" : "test.theme.modern.Theme", + "QXTHEME" : "qxe.theme.Theme", + "API_EXCLUDE" : [ "qx.test.*", "test.demo.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*" ], + "LOCALES" : [ "ar", "ar_JO", "da", "de", "de_DE", "de_AT", "de_CH", "en", "en_GB", "en_US", "es", "es_MX", "es_ES", "et", "fi", "fi_FI", "is", "pt", "pt_BR", "pt_PT", "sv", "sv_SE", "sv_FI" ], + "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache", + "ROOT" : "." + } +} Added: trunk/qooxdoo-contrib/qxe/trunk/generate.py =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/generate.py (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/generate.py 2011-09-26 11:16:41 UTC (rev 21461) @@ -0,0 +1,72 @@ +#!/usr/bin/env python +################################################################################ +# +# qooxdoo - the new era of web development +# +# http://qooxdoo.org +# +# Copyright: +# 2008 - 2010 1&1 Internet AG, Germany, http://www.1und1.de +# +# License: +# LGPL: http://www.gnu.org/licenses/lgpl.html +# EPL: http://www.eclipse.org/org/documents/epl-v10.php +# See the LICENSE file in the project's top-level directory for details. +# +# Authors: +# * Thomas Herchenroeder (thron7) +# +################################################################################ + +## +# This is a stub proxy for the real generator.py +## + +import sys, os, re, subprocess + +CMD_PYTHON = sys.executable +QOOXDOO_PATH = '../../../qooxdoo' + +def getQxPath(): + path = QOOXDOO_PATH + # try updating from config file + if os.path.exists('config.json'): + # "using QOOXDOO_PATH from config.json" + qpathr=re.compile(r'"QOOXDOO_PATH"\s*:\s*"([^"]*)"\s*,?') + conffile = open('config.json') + aconffile = conffile.readlines() + for line in aconffile: + mo = qpathr.search(line) + if mo: + path = mo.group(1) + break # assume first occurrence is ok + path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), path)) + + return path + +os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # switch to skeleton dir +qxpath = getQxPath() +REAL_GENERATOR = os.path.join(qxpath, 'tool', 'bin', 'generator.py') + +if not os.path.exists(REAL_GENERATOR): + print "Cannot find real generator script under: \"%s\"; aborting" % REAL_GENERATOR + sys.exit(1) + +argList = [] +argList.append(CMD_PYTHON) +argList.append(REAL_GENERATOR) +argList.extend(sys.argv[1:]) +if sys.platform == "win32": + argList1=[] + for arg in argList: + if arg.find(' ')>-1: + argList1.append('"%s"' % arg) + else: + argList1.append(arg) + argList = argList1 +else: + argList = ['"%s"' % x for x in argList] # quote argv elements + +cmd = " ".join(argList) +retval = subprocess.call(cmd, shell=True) +sys.exit(retval) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/generate.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-26 11:15:23
|
Revision: 21460 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21460&view=rev Author: sandersson Date: 2011-09-26 11:15:16 +0000 (Mon, 26 Sep 2011) Log Message: ----------- Removed Paths: ------------- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json trunk/qooxdoo-contrib/qxe/trunk/config.json trunk/qooxdoo-contrib/qxe/trunk/generate.py Deleted: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-26 09:55:53 UTC (rev 21459) +++ trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-26 11:15:16 UTC (rev 21460) @@ -1 +0,0 @@ -link /home/Sales/dev/javascript/perevotech/gui/trunk/Manifest.json \ No newline at end of file Deleted: trunk/qooxdoo-contrib/qxe/trunk/config.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/config.json 2011-09-26 09:55:53 UTC (rev 21459) +++ trunk/qooxdoo-contrib/qxe/trunk/config.json 2011-09-26 11:15:16 UTC (rev 21460) @@ -1 +0,0 @@ -link /home/Sales/dev/javascript/perevotech/gui/trunk/config.json \ No newline at end of file Deleted: trunk/qooxdoo-contrib/qxe/trunk/generate.py =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/generate.py 2011-09-26 09:55:53 UTC (rev 21459) +++ trunk/qooxdoo-contrib/qxe/trunk/generate.py 2011-09-26 11:15:16 UTC (rev 21460) @@ -1 +0,0 @@ -link /home/Sales/dev/javascript/perevotech/gui/trunk/generate.py \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <d_w...@us...> - 2011-09-26 09:55:59
|
Revision: 21459 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21459&view=rev Author: d_wagner Date: 2011-09-26 09:55:53 +0000 (Mon, 26 Sep 2011) Log Message: ----------- [BUG #5621] Added a test skeleton for the Twitter tutorial apps Added Paths: ----------- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/test_twitter.js Added: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/test_twitter.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/test_twitter.js (rev 0) +++ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/test_twitter.js 2011-09-26 09:55:53 UTC (rev 21459) @@ -0,0 +1,50 @@ +var baseConf = { + 'autName' : 'TutorialTwitter', + 'globalTimeout' : 300000, + 'stepSpeed' : '500', + 'debug' : true +}; + +var args = arguments ? arguments : ""; +var simSvn = baseConf.simulatorSvn; +for (var i=0; i<args.length; i++) { + if (args[i].indexOf('simulatorSvn') >= 0) { + simSvn = args[i].substr(args[i].indexOf('simulatorSvn=') + 13); + } +} + +load([simSvn + "/trunk/tool/selenium/simulation/Simulation.js"]); + +var mySim = new simulation.Simulation(baseConf,args); + +var selWin = simulation.Simulation.SELENIUMWINDOW; +var qxAppInst = simulation.Simulation.QXAPPINSTANCE; + +// - Main -------------------------------------------------------------------- +(function() { + mySim.testFailed = false; + + var sessionStarted = mySim.startSession(); + + if (!sessionStarted) { + return; + } + + var isAppReady = mySim.waitForCondition(simulation.Simulation.ISQXAPPREADY, 60000, + "Waiting for qooxdoo application"); + + + if (!isAppReady) { + mySim.testFailed = true; + mySim.stop(); + return; + } + + mySim.addGlobalErrorHandler(); + java.lang.Thread.sleep(5000); + mySim.logGlobalErrors(); + mySim.logResults(); + + mySim.stop(); + +})(); \ No newline at end of file Property changes on: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/tutorial/test_twitter.js ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-25 08:39:01
|
Revision: 21458 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21458&view=rev Author: sandersson Date: 2011-09-25 08:38:54 +0000 (Sun, 25 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/Wizard.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/__init__.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,16 @@ +/** + * This is the qooxdoo extension framework's top-level namespace or "package". + * + * It contains some fundamental classes, while the rest of the class hierarchy + * is available in the corresponding sub packages. Please see the descriptions + * below. The little **+** preceding a name offers more descriptive text when + * you click on it. + * + * All packages are structured in the same way. Use either the hyperlinks in + * the listing, or the tree structure to navigate to the corresponding packages + * and their documentation. You can also use the __Search__ button to find + * certain class and method names, and the __Legend__ button for information + * about the symbols used throughout this reference. Use the toolbar buttons to + * to the right to tailor the amount of information that is displayed with each + * class, e.g. you can enable display of inherited or protected class members. + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,9 @@ +/** + * This package contains the framework unit test classes; they are not relevant + * for custom application development. + * + * The testrunner application can be built by executing + * <code>./generate.py test</code> from within the + * trunk directory. It can then be started by opening + * <code>trunk/test/index.html</code>. + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,3 @@ +/** + * Test classes for qxe.ui + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/Wizard.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/Wizard.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,105 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +qx.Class.define("qxe.test.ui.selection.Wizard", +{ + extend : qx.test.ui.selection.AbstractSingleSelectonTest, + + members : + { + __radioButtons : null, + + setUp : function() + { + var length = 10; + this._notInSelection = []; + this._mode = "one"; + + this._widget = new qxe.ui.wizard.Wizard(); + this.getRoot().add(this._widget); + + for (var i = 0; i < length; i++) + { + var item = new qxe.ui.wizard.Page("Step" + i); + this._widget.add(item); + + if (i == 5) + { + this._widget.setSelection([item]); + this._selection = [item]; + } + else + { + this._notInSelection.push(item); + } + } + + this.flush(); + }, + + tearDown : function() + { + this.base(arguments); + this._widget.destroy(); + this._widget = null; + this._selection = null; + this._notInSelection = null; + this.flush(); + }, + + _getChildren : function() + { + if (this._widget != null) + { + return this._widget.getChildren(); + } + else + { + return []; + } + }, + + testAddAtIndex : function() + { + var index = parseInt(this._widget.getChildren().length/2); + var page = new qxe.ui.wizard.Page("insertedStep_" + index); + this._widget.addAt(page, index); + this.assertEquals(page.getLabel(),this._widget.getChildren()[index].getLabel()); + }, + + testAddPage : function() + { + var page = new qxe.ui.wizard.Page("insertedStep_Last"); + this._widget.add(page); + this.assertEquals(page.getLabel(),this._widget.getChildren()[this._widget.getChildren().length-1].getLabel()); + }, + + testAddAtLastIndex : function() + { + var index = this._widget.getChildren().length; + var page = new qxe.ui.wizard.Page("insertedStep_" + index); + this._widget.addAt(page, index); + this.assertEquals(page.getLabel(),this._widget.getChildren()[index].getLabel()); + this.assertEquals(page.getLabel(),this._widget.getChildren()[this._widget.getChildren().length-1].getLabel()); + }, + + _createTestElement : function(name) + { + return new qxe.ui.wizard.Page(name); + } + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/test/ui/selection/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,4 @@ +/** + * qxe.test.ui.selection package + * + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,12 @@ +/** + * The qooxdoo extension GUI toolkit includes a large set of widgets and layouts to + * extend your application's user interface. This is what you want to look at if + * you are building a GUI application. + * + * *GUI Widgets and Facilities* + * + * The *qxe.ui* namespace contains classes to extend the graphical user + * interfaces. Follow the provided links to the individual packages and classes to get more + * detailed information. + * + */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/IPage.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,49 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/** + * An interface for the wizard pages. + */ +qx.Interface.define("qxe.ui.wizard.IPage", +{ + members : + { + /** + * + */ + _addValidators : function(validator) + { + this.assertInstance(validator, qx.ui.form.validation.Manager); + }, + + /** + * + */ + _addSerializers : function(controller) + { + this.assertInstance(controller, qx.data.controller.Object); + }, + + /** + * + */ + _addResetter : function(resetter) + { + this.assertInstance(resetter, qx.ui.form.Resetter); + } + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,181 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/** + * + */ +qx.Class.define("qxe.ui.wizard.Page", +{ + extend : qx.ui.groupbox.GroupBox, + + implement : qxe.ui.wizard.IPage, + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param label {String} The label of the page. + * @param previous {qxe.ui.wizard.IPage} The previous page to navigate to. + * @param next {qxe.ui.wizard.IPage} The next page to navigate to. + */ + construct : function(label, previous, next) + { + this.base(arguments); + + this.setLabel(label); + this.setPrevious(previous); + this.setNext(next); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "wizard-page" + }, + + /** + * Previous page to navigate to. + */ + previous : + { + check : "qxe.ui.wizard.Page", + nullable : true, + init : null, + event : "changePrevious" + }, + + /** + * Next page to navigate to. + */ + next : + { + check : "qxe.ui.wizard.Page", + nullable : true, + init : null, + event : "changeNext" + }, + + + /* + --------------------------------------------------------------------------- + BASIC OPTIONS + --------------------------------------------------------------------------- + */ + + /** + * The label of the page. + */ + label : + { + check : "String", + init : null, + nullabe : true, + event : "changeLabel" + }, + + /** + * Whether to allow to go to the previous wizard pane. + */ + allowPrevious : + { + check : "Boolean", + init : false, + event : "changeAllowPrevious" + }, + + /** + * Whether to allow to go to the next wizard pane. + */ + allowNext : + { + check : "Boolean", + init : false, + event : "changeAllowNext" + }, + + /** + * Whether to allow to finish the wizard. + * The finish property is set to true when the validation has passed and coming to the last page. + */ + allowFinish : + { + check : "Boolean", + init : false, + event : "changeAllowFinish" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /** + * Adding fields of the page to the validator. + * + * @param validator {qx.ui.form.validation.Manager} The validator object to use. + */ + _addValidators : function(validator) + { + }, + + /** + * Adding fields of the page to the serializer. + * + * @param controller {qx.data.controller.*} The controller object to use. + * + * @return {Json Array} Skeleton of fields. + */ + _addSerializers : function(controller) + { + return null; + }, + + /** + * Adding fields of the page to the resetter. + * + * @param resetter {qx.ui.form.Resetter} The resetter object to use. + */ + _addResetter : function(resetter) + { + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,355 @@ +/* ************************************************************************ + + qxe - qooxdoo extension framework + + Copyright: + 2010-2011 Cost Savers, http://www.cost-savers.net + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + See the LICENSE file in the project's top-level directory for details. + + Authors: + * Stefan Andersson (sand) + +************************************************************************ */ + +/* ************************************************************************ + +#asset(qx/icon/${qx.icontheme}/16/actions/go-previous.png) +#asset(qx/icon/${qx.icontheme}/16/actions/go-next.png) + +************************************************************************ */ + +/** + * A wizard is a multi page view where only one page is visible at each time. + * Each page is a step following the wizard. The different steps can be conditional + * and validated. It is possible to navigate between the pages by the previous and + * next buttons, and by typing in the step number in the field. + * + * The following features re included in the wizard widget: + * - Easy to implement wizard widget. + * - Assemble a Wizard from a series of pages. + * - Support for multiple branches (dynamically changing sets of steps) + * - Option for specifying first selected step. + * - Option for making all steps enabled. + * - Step titles are act as anchors. + * - Easy Navigation to next or previous page. + * - Both vertical and horizontal navigation widgets possible. + * - Validation for each step and when finish the wizard. + * - Pages can be validated as the user interacts, or when the user presses next. + * - Support for long running operations with progress indication. + * - Support for end-of-wizard summary panels + */ +qx.Class.define("qxe.ui.wizard.Wizard", +{ + extend : qx.ui.core.Widget, + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + construct : function() + { + this.base(arguments); + + // configure internal layout + this._setLayout(new qx.ui.layout.VBox()); + + this._createChildControl("stack-pane"); + this._createChildControl("navigation-pane"); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "wizard" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + + // overridden + _createChildControlImpl : function(id) + { + var control; + var layout; + var widget; + var tooltip; + + switch(id) + { + /* + --------------------------------------------------------------------------- + CREATE #1: STACK PANE + --------------------------------------------------------------------------- + */ + case "stack-pane": + control = new qx.ui.container.Stack(); + control.setDecorator("main"); + control.addListener("changeSelection", this._changeSelection, this); + + this._add(control); + break; + + /* + --------------------------------------------------------------------------- + CREATE #2: NAVIGATION PANE + --------------------------------------------------------------------------- + */ + case "navigation-pane": + layout = new qx.ui.layout.HBox(5); + + control = new qx.ui.container.Composite(layout); + control.setMargin(5, 10); + + control.add(this._createChildControl("previous-button")); + + var spacer1 = new qx.ui.core.Spacer(); + spacer1.setAllowGrowX(true); + + control.add(spacer1, {flex : 1}); + + control.add(this._createChildControl("step-navigation")); + + var spacer2 = new qx.ui.core.Spacer(); + spacer2.setAllowGrowX(true); + + control.add(spacer2, {flex : 1}); + + control.add(this._createChildControl("next-button")); + + this._add(control); + break; + + case "previous-button": + tooltip = new qx.ui.tooltip.ToolTip(this.tr("Go to previous step.")); + + control = new qx.ui.form.Button(this.tr("Previous"), "icon/16/actions/go-previous.png"); + control.addListener("execute", this.previous, this); + control.setToolTip(tooltip); + control.setIconPosition("left"); + break; + + case "step-navigation": + layout = new qx.ui.layout.HBox(4); + + control = new qx.ui.container.Composite(layout); + + widget = this._createChildControl("current-step"); + + var label = new qx.ui.basic.Label(this.tr("Step")); + label.setBuddy(widget); + label.setAlignY("middle"); + + control.add(label); + + control.add(widget); + + widget = this._createChildControl("num-steps"); + + label = new qx.ui.basic.Label("/"); + label.setBuddy(widget); + label.setAlignY("middle"); + + control.add(label); + + control.add(widget); + break; + + case "current-step": + tooltip = new qx.ui.tooltip.ToolTip(this.tr("Current step in the wizard.")); + + control = new qx.ui.form.TextField(); + control.setReadOnly(true); + control.setWidth(20); + control.setToolTip(tooltip); + break; + + case "num-steps": + tooltip = new qx.ui.tooltip.ToolTip(this.tr("Number of steps in the wizard.")); + + control = new qx.ui.form.TextField(); + control.setReadOnly(true); + control.setWidth(20); + control.setToolTip(tooltip); + break; + + case "next-button": + tooltip = new qx.ui.tooltip.ToolTip(this.tr("Go to next step.")); + + control = new qx.ui.form.Button(this.tr("Next"), "icon/16/actions/go-next.png"); + control.addListener("execute", this.next, this); + control.setToolTip(tooltip); + control.setIconPosition("right"); + break; + } + + return control || this.base(arguments, id); + }, + + + /* + --------------------------------------------------------------------------- + CHILDREN HANDLING + --------------------------------------------------------------------------- + */ + + + /** + * Add a page to the wizard. + * + * @param page {qxe.ui.wizard.Page} The page which should be added. + */ + add : function(page) + { + if (qx.core.Environment.get("qx.debug")) + { + if (!(page instanceof qxe.ui.wizard.Page)) + { + throw new Error("Incompatible child for Wizard: " + page); + } + } + + this.getChildControl("stack-pane").add(page); + }, + + /** + * Remove a page from the Wizard. + * + * @param page {qxe.ui.wizard.Page} The page to be removed. + */ + remove : function(page) + { + this.getChildControl("stack-pane").remove(page); + }, + + /** + * Return Wizard's children widgets. + * + * @return {qxe.ui.wizard.Page[]} List of children. + */ + getChildren : function() + { + return this.getChildControl("stack-pane").getChildren(); + }, + + /** + * Event handler for <code>changeSelection</code>. + * + * @param e {qx.event.type.Data} Data event. + */ + _onChangeSelection : function(e) + { + var stack = this.getChildControl("stack-pane"); + + var index = stack.indexOf(stack.getSelection()[0]); + + if(index == 0) + { + this.getChildControl("previous-button").setEnabled(false); + } + else if(index == (stack.getChildren().length - 1)) + { + this.getChildControl("next-button").setEnabled(false); + } + else + { + this.getChildControl("previous-button").setEnabled(true); + this.getChildControl("next-button").setEnabled(true); + } + + this.getChildControl("current-step").setValue("" + (index + 1)); + this.getChildControl("num-steps").setValue("" + stack.getChildren().length); + }, + + + /* + --------------------------------------------------------------------------- + NAVIGATION + --------------------------------------------------------------------------- + */ + + /** + * Navigate to previous page. + */ + previous : function(e) + { + var previous = e.getSource().getPrevious(); + var stack = this.getChildControl("stack-pane"); + + if(previous != null) + { + stack.setSelection([previous]); + } + else + { + stack.previous; + } + }, + + /** + * Navigate to next page. + */ + next : function(e) + { + var next = e.getSource().getNext(); + var stack = this.getChildControl("stack-pane"); + + if(next != null) + { + stack.setSelection([next]); + } + else + { + stack.next; + } + }, + + /** + * Enable all pages. + */ + enablePages : function() + { + var children = this.getChildren(); + + for(var i = 0, l = children.length; i < l; i++) + { + children[i].setEnabled(); + } + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/__init__.js 2011-09-25 08:38:54 UTC (rev 21458) @@ -0,0 +1,32 @@ +/** + * The wizard stacks several pages above each other and allows to switch + * between them by previous and next navigation buttons, and the step field. + * + * *Example* + * + * Here is a little example of how to use the widget. + * + * <pre class='javascript'> + * var wizard = new qxe.ui.wizard.Wizard(); + * + * var page1 = new qxe.ui.wizard.Page("First step", "icon/16/apps/utilities-terminal.png"); + * page1.setLayout(new qx.ui.layout.VBox()); + * page1.add(new qx.ui.basic.Label("Page Content")); + * wizard.add(page1); + * + * var page2 = new qxe.ui.wizard.Page("Second step", "icon/16/apps/utilities-notes.png"); + * wizard.add(page2); + * + * this.getRoot().add(wizard); + * </pre> + * + * This example builds a wizard with two pages called "First step" and "Second step". + * Each page is a container widget, which can contain any other widget. Note + * that the pages need layout to render their children. + * + * *External Documentation* + * + * <a href='http://contrib.qooxdoo.org/project/qxe/trunk/manual +http://manual.qooxdoo.org/1.6/pages/widget/wizard.html' target='_blank'> + * Documentation of this widget in the qooxdoo extension manual.</a> + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-23 21:49:33
|
Revision: 21457 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21457&view=rev Author: sandersson Date: 2011-09-23 21:49:25 +0000 (Fri, 23 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/readme.txt trunk/qooxdoo-contrib/qxe/trunk/Manifest.json trunk/qooxdoo-contrib/qxe/trunk/config.json trunk/qooxdoo-contrib/qxe/trunk/demo/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/Manifest.json trunk/qooxdoo-contrib/qxe/trunk/demo/default/config.json trunk/qooxdoo-contrib/qxe/trunk/demo/default/generate.py trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/Application.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/simulation/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/simulation/DemoSimulation.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/test/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/test/DemoTest.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Appearance.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Color.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Decoration.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Font.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Theme.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/index.html trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/qxe/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/qxe/demo/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/qxe/demo/test.png trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/script/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/script/qxe.demo.js trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/translation/ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/translation/readme.txt trunk/qooxdoo-contrib/qxe/trunk/generate.py Removed Paths: ------------- trunk/qooxdoo-contrib/qxe/README.txt Deleted: trunk/qooxdoo-contrib/qxe/README.txt =================================================================== --- trunk/qooxdoo-contrib/qxe/README.txt 2011-09-23 11:09:06 UTC (rev 21456) +++ trunk/qooxdoo-contrib/qxe/README.txt 2011-09-23 21:49:25 UTC (rev 21457) @@ -1,10 +0,0 @@ -===== qxe ===== - -<note> -As qxe is using one namespace, qxe, for many integrated classes and components -we have decided to put it in a separate repository after discussing with the -qooxdoo core team. -</note> - -We will soon put some easy scripts to check it out from this place. Demos will -also be put here at a later stage. Copied: trunk/qooxdoo-contrib/qxe/readme.txt (from rev 21456, trunk/qooxdoo-contrib/qxe/README.txt) =================================================================== --- trunk/qooxdoo-contrib/qxe/readme.txt (rev 0) +++ trunk/qooxdoo-contrib/qxe/readme.txt 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,10 @@ +===== qxe ===== + +<note> +As qxe is using one namespace, qxe, for many integrated classes and components +we have decided to put it in a separate repository after discussing with the +qooxdoo core team. +</note> + +We will soon put some easy scripts to check it out from this place. Demos will +also be put here at a later stage. Added: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/Manifest.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/Manifest.json 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1 @@ +link /home/Sales/dev/javascript/perevotech/gui/trunk/Manifest.json \ No newline at end of file Property changes on: trunk/qooxdoo-contrib/qxe/trunk/Manifest.json ___________________________________________________________________ Added: svn:special + * Added: trunk/qooxdoo-contrib/qxe/trunk/config.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/config.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/config.json 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1 @@ +link /home/Sales/dev/javascript/perevotech/gui/trunk/config.json \ No newline at end of file Property changes on: trunk/qooxdoo-contrib/qxe/trunk/config.json ___________________________________________________________________ Added: svn:special + * Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/Manifest.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/Manifest.json 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,34 @@ +{ + "info" : + { + "name" : "qxe Demo", + + "summary" : "qooxdoo extension framework Demo", + "description" : "Extension of the standard qooxdoo framework demo.", + + "homepage" : "http://contrib.qooxdoo.org/project/qxe", + + "license" : "LGPL/EPL", + "authors" : + [ + { + "name" : "Stefan Andersson (sand)", + "email" : "ste...@li..." + } + ], + + "version" : "trunk", + "qooxdoo-versions": ["1.6"] + }, + + "provides" : + { + "namespace" : "qxe.demo", + "encoding" : "utf-8", + "class" : "source/class", + "resource" : "source/resource", + "translation" : "source/translation", + "type" : "application" + } +} + Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/config.json =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/config.json (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/config.json 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,66 @@ +{ + "name" : "qxe Demo", + + "include" : + [ + { + "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" + } + ], + + "export" : + [ + "api", + "api-data", + "build", + "clean", + "distclean", + "fix", + "info", + "inspector", + "lint", + "migration", + "pretty", + "profiling", + "source", + "source-all", + "source-each", + "source-hybrid", + "simulation-build", + "simulation-run", + "test", + "test-source", + "translation" + ], + + "default-job" : "source", + + "let" : + { + "APPLICATION" : "qxe.demo", + "QOOXDOO_PATH" : "../../../../qooxdoo/1.6", + "QXTHEME" : "qxe.demo.theme.Theme", + "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*", "${APPLICATION}.simulation.*"], + "LOCALES" : [ "en" ], + "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache", + "ROOT" : "." + }, + + "config-warnings" : + { + "job-shadowing" : ["libraries"] + }, + + "jobs" : + { + "libraries" : + { + "library" : + [ + { + "manifest" : "../../Manifest.json" + } + ] + } + } +} Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/generate.py =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/generate.py (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/generate.py 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,72 @@ +#!/usr/bin/env python +################################################################################ +# +# qooxdoo - the new era of web development +# +# http://qooxdoo.org +# +# Copyright: +# 2008 - 2010 1&1 Internet AG, Germany, http://www.1und1.de +# +# License: +# LGPL: http://www.gnu.org/licenses/lgpl.html +# EPL: http://www.eclipse.org/org/documents/epl-v10.php +# See the LICENSE file in the project's top-level directory for details. +# +# Authors: +# * Thomas Herchenroeder (thron7) +# +################################################################################ + +## +# This is a stub proxy for the real generator.py +## + +import sys, os, re, subprocess + +CMD_PYTHON = sys.executable +QOOXDOO_PATH = '../../qooxdoo/1.6' + +def getQxPath(): + path = QOOXDOO_PATH + # try updating from config file + if os.path.exists('config.json'): + # "using QOOXDOO_PATH from config.json" + qpathr=re.compile(r'"QOOXDOO_PATH"\s*:\s*"([^"]*)"\s*,?') + conffile = open('config.json') + aconffile = conffile.readlines() + for line in aconffile: + mo = qpathr.search(line) + if mo: + path = mo.group(1) + break # assume first occurrence is ok + path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), path)) + + return path + +os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # switch to skeleton dir +qxpath = getQxPath() +REAL_GENERATOR = os.path.join(qxpath, 'tool', 'bin', 'generator.py') + +if not os.path.exists(REAL_GENERATOR): + print "Cannot find real generator script under: \"%s\"; aborting" % REAL_GENERATOR + sys.exit(1) + +argList = [] +argList.append(CMD_PYTHON) +argList.append(REAL_GENERATOR) +argList.extend(sys.argv[1:]) +if sys.platform == "win32": + argList1=[] + for arg in argList: + if arg.find(' ')>-1: + argList1.append('"%s"' % arg) + else: + argList1.append(arg) + argList = argList1 +else: + argList = ['"%s"' % x for x in argList] # quote argv elements + +cmd = " ".join(argList) +retval = subprocess.call(cmd, shell=True) +sys.exit(retval) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/demo/default/generate.py ___________________________________________________________________ Added: svn:executable + * Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/Application.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/Application.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,75 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/* ************************************************************************ + +#asset(qxe/demo/*) + +************************************************************************ */ + +/** + * This is the main application class of your custom application "qxe" + */ +qx.Class.define("qxe.demo.Application", +{ + extend : qx.application.Standalone, + + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /** + * This method contains the initial application code and gets called + * during startup of the application + * + * @lint ignoreDeprecated(alert) + */ + main : function() + { + // Call super class + this.base(arguments); + + // Enable logging in debug variant + if (qx.core.Environment.get("qx.debug")) + { + // support native logging capabilities, e.g. Firebug for Firefox + qx.log.appender.Native; + // support additional cross-browser console. Press F7 to toggle visibility + qx.log.appender.Console; + } + + /* + ------------------------------------------------------------------------- + Below is your actual application code... + ------------------------------------------------------------------------- + */ + + // Create a button + var button1 = new qxe.Contribution("First Contribution", "qxe/test.png"); + + // Document is the application root + var doc = this.getRoot(); + + // Add button to document at fixed coordinates + doc.add(button1, {left: 100, top: 50}); + + // Add an event listener + button1.addListener("execute", function(e) { + alert("Hello World!"); + }); + } + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/simulation/DemoSimulation.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/simulation/DemoSimulation.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/simulation/DemoSimulation.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,44 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define simulated interaction tests for your + * application. See the manual for details: + * {@link http://manual.qooxdoo.org/1.6/pages/development/simulator.html} + * + * @lint ignoreUndefined(simulator) + */ +qx.Class.define("qxe.demo.simulation.DemoSimulation", { + + extend : simulator.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** Check if a widget is present (part of the DOM) */ + testButtonPresent : function() + { + this.assertNotNull(this.getSimulation().getWidgetOrNull("qxh=qx.ui.form.Button"), "Button widget not present!"); + }, + + /** Click a button and check if an alert box pops up */ + testButtonClick : function() + { + this.getQxSelenium().qxClick("qxh=qx.ui.form.Button"); + this.assertEquals("true", String(this.getQxSelenium().isAlertPresent())); + } + } + +}); Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/test/DemoTest.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/test/DemoTest.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/test/DemoTest.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,55 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define unit tests for your application. + * + * Execute <code>generate.py test</code> to generate a testrunner application + * and open it from <tt>test/index.html</tt> + * + * The methods that contain the tests are instance methods with a + * <code>test</code> prefix. You can create an arbitrary number of test + * classes like this one. They can be organized in a regular class hierarchy, + * i.e. using deeper namespaces and a corresponding file structure within the + * <tt>test</tt> folder. + */ +qx.Class.define("qxe.demo.test.DemoTest", +{ + extend : qx.dev.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** + * Here are some simple tests + */ + testSimple : function() + { + this.assertEquals(4, 3+1, "This should never fail!"); + this.assertFalse(false, "Can false be true?!"); + }, + + /** + * Here are some more advanced tests + */ + testAdvanced: function () + { + var a = 3; + var b = a; + this.assertIdentical(a, b, "A rose by any other name is still a rose"); + this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!"); + } + } +}); Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Appearance.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Appearance.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("qxe.demo.theme.Appearance", +{ + extend : qx.theme.modern.Appearance, + + appearances : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Color.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Color.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Color.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("qxe.demo.theme.Color", +{ + extend : qx.theme.modern.Color, + + colors : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Decoration.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Decoration.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("qxe.demo.theme.Decoration", +{ + extend : qx.theme.modern.Decoration, + + decorations : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Font.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Font.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Font.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("qxe.demo.theme.Font", +{ + extend : qx.theme.modern.Font, + + fonts : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Theme.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Theme.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/class/qxe/demo/theme/Theme.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,21 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("qxe.demo.theme.Theme", +{ + meta : + { + color : qxe.demo.theme.Color, + decoration : qxe.demo.theme.Decoration, + font : qxe.demo.theme.Font, + icon : qx.theme.icon.Tango, + appearance : qxe.demo.theme.Appearance + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/index.html =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/index.html (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/index.html 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>qxe</title> + <script type="text/javascript" src="script/qxe.demo.js"></script> +</head> +<body></body> +</html> Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/qxe/demo/test.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/resource/qxe/demo/test.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/script/qxe.demo.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/script/qxe.demo.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/script/qxe.demo.js 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,20 @@ +/* + * This is mock content and will be overwritten with the first 'generate.py source'. + */ +function inform(){ + var message = + "<div style='font-family: Verdana'>" + + "<h2>Application not yet ready!</h2>" + + "<div>Please use the generator to build this application, i.e. run <i>'generate.py source'</i> in an OS shell; then reload this page.</div>" + + "</div>"; + + window.setTimeout(function() { + document.body.innerHTML = message; + }, 0); +} + +if (window.attachEvent) { + window.attachEvent("onload", inform); +} else { + window.addEventListener("load", inform, false); +} Added: trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/translation/readme.txt =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/translation/readme.txt (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/demo/default/source/translation/readme.txt 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1,3 @@ +This directory will contain translation (.po) files once you run the +'translation' job in your project. + Added: trunk/qooxdoo-contrib/qxe/trunk/generate.py =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/generate.py (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/generate.py 2011-09-23 21:49:25 UTC (rev 21457) @@ -0,0 +1 @@ +link /home/Sales/dev/javascript/perevotech/gui/trunk/generate.py \ No newline at end of file Property changes on: trunk/qooxdoo-contrib/qxe/trunk/generate.py ___________________________________________________________________ Added: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <d_w...@us...> - 2011-09-23 11:09:12
|
Revision: 21456 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21456&view=rev Author: d_wagner Date: 2011-09-23 11:09:06 +0000 (Fri, 23 Sep 2011) Log Message: ----------- Added MutableList contrib Modified Paths: -------------- trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/config.demo.json Modified: trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/config.demo.json =================================================================== --- trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/config.demo.json 2011-09-23 04:31:54 UTC (rev 21455) +++ trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/config.demo.json 2011-09-23 11:09:06 UTC (rev 21456) @@ -12,6 +12,7 @@ "DarkTheme" : {}, "Dialog" : {}, "GraydientTheme" : {}, + "MutableList" : {}, "OpenFlashChart" : {}, "QxDyGraphs" : {}, "QxJqPlot" : {}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |