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: <spa...@us...> - 2011-10-05 07:29:16
|
Revision: 21505 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21505&view=rev Author: spackers Date: 2011-10-05 07:29:10 +0000 (Wed, 05 Oct 2011) Log Message: ----------- added inputNamePrefix property to UploadMgr Modified Paths: -------------- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/InputElement.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/InputElement.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/InputElement.js 2011-10-04 22:39:46 UTC (rev 21504) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/InputElement.js 2011-10-05 07:29:10 UTC (rev 21505) @@ -1,7 +1,7 @@ qx.Class.define("com.zenesis.qx.upload.InputElement", { extend: qx.html.Element, - construct: function(widget, multiple) { + construct: function(widget, multiple, name) { // styling the input[type=file] // element is a bit tricky. Some browsers just ignore the normal // css style input. Firefox is especially tricky in this regard. @@ -36,7 +36,7 @@ this.base(arguments, 'input', css, { type : 'file', - name : 'myinput' + name : name }); this.__widget = widget; this.setMultiple(!!multiple); 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-10-04 22:39:46 UTC (rev 21504) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js 2011-10-05 07:29:10 UTC (rev 21505) @@ -104,12 +104,22 @@ nullable: false, event: "changeMultiple", apply: "_applyMultiple" + }, + + /** + * Prefix to apply to the name of input fields + */ + inputNamePrefix: { + check: "String", + init: "uploadMgrInput", + nullable: false, + event: "changeInputNamePrefix" } }, members: { __widgetsData: null, - __inputElement: null, + __inputSerial: 0, __uploadHandler: null, /** @@ -184,9 +194,10 @@ * @returns */ _createInputElement: function(widget) { - var data = this.__widgetsData[widget.toHashCode()]; + var data = this.__widgetsData[widget.toHashCode()], + name = this.getInputNamePrefix() + '-' + (++this.__inputSerial); qx.core.Assert.assertNull(data.inputElement); - var elem = data.inputElement = new com.zenesis.qx.upload.InputElement(widget, this.getMultiple()); + var elem = data.inputElement = new com.zenesis.qx.upload.InputElement(widget, this.getMultiple(), name); elem.addListenerOnce("change", qx.lang.Function.bind(this._onInputChange, this, elem)); return elem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-10-04 22:39:52
|
Revision: 21504 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21504&view=rev Author: derrell Date: 2011-10-04 22:39:46 +0000 (Tue, 04 Oct 2011) Log Message: ----------- don't canonicalize missing search criteria; no 'contains' on Rhino Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:39:33 UTC (rev 21503) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:39:46 UTC (rev 21504) @@ -430,7 +430,7 @@ canonicalize = rpcjs.dbif.Entity.propertyTypes[entityType].canonicalize; // Are there any canonicalization functions for this class - if (canonicalize) + if (canonicalize && searchCriteria) { // Yup. Rebuild the search criteria, replacing non-canonicalized // fields with their peer canonical fields. Start with a clone of the @@ -658,12 +658,14 @@ for (name in canonicalize) { // If the property is an array type, ... - if ([ - "KeyArray", - "StringArray", - "LongStringArray", - "NumberArray" - ].contains(propertyTypes.fields[name])) + if (qx.lang.Array.contains( + [ + "KeyArray", + "StringArray", + "LongStringArray", + "NumberArray" + ], + propertyTypes.fields[name])) { // ... then canonicalize each value within the array newArray = []; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-10-04 22:39:39
|
Revision: 21503 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21503&view=rev Author: derrell Date: 2011-10-04 22:39:33 +0000 (Tue, 04 Oct 2011) Log Message: ----------- canonicalization appears to be working, both in key fields and non-key Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:39:19 UTC (rev 21502) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:39:33 UTC (rev 21503) @@ -303,7 +303,7 @@ * * // The canonicalized value will be a string * type : "String", - + * * // Function to convert a value to lower case * func : function(value) * { @@ -311,6 +311,11 @@ * } * } * }; + * + * Note that if the property being canonicalized is an array, the + * specified function is called once for each member of the array, so + * the resulting canonical value will also be an array, containing + * individually-canonicalized values. */ registerPropertyTypes : function(entityType, propertyTypes, @@ -416,7 +421,6 @@ // Get the entity type entityType = rpcjs.dbif.Entity.entityTypeMap[classname]; -console.log("entityType = " + entityType); if (! entityType) { throw new Error("No mapped entity type for " + classname); @@ -424,7 +428,6 @@ // Gain easy access to the canonicalize map. canonicalize = rpcjs.dbif.Entity.propertyTypes[entityType].canonicalize; -console.log("canonicalize = " + canonicalize); // Are there any canonicalization functions for this class if (canonicalize) @@ -434,8 +437,6 @@ // original criteria, so we don't modify the caller's map. searchCriteria = qx.util.Serializer.toNativeObject(searchCriteria); -console.log("search criteria = " + qx.dev.Debug.debugObjectToString(searchCriteria)); - // Get a list of the fields to be mapped canonFields = qx.lang.Object.getKeys(canonicalize); @@ -455,17 +456,12 @@ // Is this field name one to be canonicalized? if (qx.lang.Array.contains(canonFields, criterium.field)) { + // Replace the value with the canonical version + criterium.value = + canonicalize[criterium.field].func(criterium.value); -console.log("Replacing: " + criterium.field + "-->" + criterium.value + - " with " + canonicalize[criterium.field].prop + "-->" + - canonicalize[criterium.field].func(criterium.value)); - // Replace the field name with its canonical peer criterium.field = canonicalize[criterium.field].prop; - - // Replace the value with the canonical version - criterium.value = - canonicalize[criterium.field].func(criterium.value); } } else if (criterium.children) @@ -649,6 +645,7 @@ var propertyTypes; var canonicalize; var data; + var newArray; // Retrieve the property data data = this.getData(); @@ -660,7 +657,27 @@ { for (name in canonicalize) { - data[canonicalize[name].prop] = canonicalize[name].func(data[name]); + // If the property is an array type, ... + if ([ + "KeyArray", + "StringArray", + "LongStringArray", + "NumberArray" + ].contains(propertyTypes.fields[name])) + { + // ... then canonicalize each value within the array + newArray = []; + data[name].forEach( + function(elem) + { + newArray.push(canonicalize[name].func(elem)); + }); + data[canonicalize[name].prop] = newArray; + } + else + { + data[canonicalize[name].prop] = canonicalize[name].func(data[name]); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-10-04 22:39:25
|
Revision: 21502 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21502&view=rev Author: derrell Date: 2011-10-04 22:39:19 +0000 (Tue, 04 Oct 2011) Log Message: ----------- wip on query mods for canonicalization Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:38:44 UTC (rev 21501) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:39:19 UTC (rev 21502) @@ -74,22 +74,25 @@ // Determine if the key field is autogenerated by canonicalization canonProps = propertyTypes.canonicalize; - for (name in canonProps) + if (canonProps) { - // Is this canonical property name our key field? - if (canonProps[name].prop == keyField) + for (name in canonProps) { - // Yes. Save the non-canonicalized field name - nonCanonKeyField = name; - - // Save the original (non-canonicalized) key value - nonCanonKey = entityKey; + // Is this canonical property name our key field? + if (canonProps[name].prop == keyField) + { + // Yes. Save the non-canonicalized field name + nonCanonKeyField = name; - // Canonicalize the entity key - entityKey = canonProps[name].func(entityKey); + // Save the original (non-canonicalized) key value + nonCanonKey = entityKey; - // No need to search farther - break; + // Canonicalize the entity key + entityKey = canonProps[name].func(entityKey); + + // No need to search farther + break; + } } } @@ -325,12 +328,14 @@ } // Add the canonicalize properties to the property list - canonicalize = canonicalize || {}; - for (name in canonicalize) + if (canonicalize) { - // Add the property in which to store the canonicalized value to the - // list of database properties. - propertyTypes[canonicalize[name].prop] = canonicalize[name].type; + for (name in canonicalize) + { + // Add the property in which to store the canonicalized value to the + // list of database properties. + propertyTypes[canonicalize[name].prop] = canonicalize[name].type; + } } rpcjs.dbif.Entity.propertyTypes[entityType] = @@ -342,11 +347,9 @@ }, + /** - * Function to query for objects. The actual function that's used depends - * on which database driver gets installed. The database driver will - * register the function with us so user code can always use a common - * entry point to the function, here. + * Function to query for objects. * * @param classname {String} * The name of the class, descended from rpcjs.dbif.Entity, of @@ -407,6 +410,93 @@ */ query : function(classname, searchCriteria, resultCriteria) { + var entityType; + var canonicalize; + var canonFields; + + // Get the entity type + entityType = rpcjs.dbif.Entity.entityTypeMap[classname]; +console.log("entityType = " + entityType); + if (! entityType) + { + throw new Error("No mapped entity type for " + classname); + } + + // Gain easy access to the canonicalize map. + canonicalize = rpcjs.dbif.Entity.propertyTypes[entityType].canonicalize; +console.log("canonicalize = " + canonicalize); + + // Are there any canonicalization functions for this class + if (canonicalize) + { + // Yup. Rebuild the search criteria, replacing non-canonicalized + // fields with their peer canonical fields. Start with a clone of the + // original criteria, so we don't modify the caller's map. + searchCriteria = qx.util.Serializer.toNativeObject(searchCriteria); + +console.log("search criteria = " + qx.dev.Debug.debugObjectToString(searchCriteria)); + + // Get a list of the fields to be mapped + canonFields = qx.lang.Object.getKeys(canonicalize); + + // Recursively descend through the search criteria, replacing + // non-canonicalized field names with their canonical peer. + (function replaceCanonFields(criterium) + { + // Null or undefined means retrieve all objects. Nothing for us to do + if (! criterium) + { + return; + } + + // Is this an element criterium (type="element" or no type field)? + if (! criterium.type || criterium.type == "element") + { + // Is this field name one to be canonicalized? + if (qx.lang.Array.contains(canonFields, criterium.field)) + { + +console.log("Replacing: " + criterium.field + "-->" + criterium.value + + " with " + canonicalize[criterium.field].prop + "-->" + + canonicalize[criterium.field].func(criterium.value)); + + // Replace the field name with its canonical peer + criterium.field = canonicalize[criterium.field].prop; + + // Replace the value with the canonical version + criterium.value = + canonicalize[criterium.field].func(criterium.value); + } + } + else if (criterium.children) + { + // If there are children, deal with each of them. + criterium.children.forEach( + function(child) + { + replaceCanonFields(criterium[child]); + }); + } + })(searchCriteria); + } + + return rpcjs.dbif.Entity.__query(classname, + searchCriteria, + resultCriteria); + }, + + + + /** + * Function to query for objects. The actual function that's used depends + * on which database driver gets installed. The database driver will + * register the function with us so user code can always use a common + * entry point to the function, here. + * + * See query() documentation for details. + */ + __query : function(classname, searchCriteria, resultCriteria) + { // This is a temporary place holder. // // This method is replaced by the query method of the specific database @@ -538,7 +628,7 @@ getBlob, putBlob, removeBlob) { // Save the specified functions. - rpcjs.dbif.Entity.query = query; + rpcjs.dbif.Entity.__query = query; rpcjs.dbif.Entity.__put = put; rpcjs.dbif.Entity.__remove = remove; rpcjs.dbif.Entity.getBlob = getBlob; @@ -566,9 +656,12 @@ // Canonicalize each value that has canonicalization specified propertyTypes = rpcjs.dbif.Entity.propertyTypes[entityType]; canonicalize = propertyTypes.canonicalize; - for (name in canonicalize) + if (canonicalize) { - data[canonicalize[name].prop] = canonicalize[name].func(data[name]); + for (name in canonicalize) + { + data[canonicalize[name].prop] = canonicalize[name].func(data[name]); + } } // Write this data This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-10-04 22:38:51
|
Revision: 21501 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21501&view=rev Author: derrell Date: 2011-10-04 22:38:44 +0000 (Tue, 04 Oct 2011) Log Message: ----------- adding database canonicalize capability, step 1 Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:19:53 UTC (rev 21500) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-10-04 22:38:44 UTC (rev 21501) @@ -31,6 +31,7 @@ construct : function(entityType, entityKey) { var i; + var name; var queryResults; var keyField; var cloneObj; @@ -40,6 +41,10 @@ var query; var field; var propertyType; + var propertyTypes; + var canonProps; + var nonCanonKeyField = null; + var nonCanonKey; // Call the superclass constructor this.base(arguments); @@ -47,6 +52,9 @@ // Save the entity type this.setEntityType(entityType); + // Gain easy access to the property type definition for this entity type + propertyTypes = rpcjs.dbif.Entity.propertyTypes[entityType]; + // Get the key field name. keyField = this.getEntityKeyProperty(); @@ -64,6 +72,27 @@ this.setData(entityData); } + // Determine if the key field is autogenerated by canonicalization + canonProps = propertyTypes.canonicalize; + for (name in canonProps) + { + // Is this canonical property name our key field? + if (canonProps[name].prop == keyField) + { + // Yes. Save the non-canonicalized field name + nonCanonKeyField = name; + + // Save the original (non-canonicalized) key value + nonCanonKey = entityKey; + + // Canonicalize the entity key + entityKey = canonProps[name].func(entityKey); + + // No need to search farther + break; + } + } + // If an entity key was specified... if (typeof entityKey != "undefined" && entityKey !== null) { @@ -87,6 +116,13 @@ { // Not composite, so just assign the key to the single field entityData[keyField] = entityKey; + + // If this key field is canonicalized... + if (nonCanonKeyField) + { + // ... then save the original value too + entityData[nonCanonKeyField] = nonCanonKey; + } } } else @@ -101,7 +137,7 @@ } // Fill in any missing properties - for (propertyType in rpcjs.dbif.Entity.propertyTypes[entityType].fields) + for (propertyType in propertyTypes.fields) { // If this property type is not represented in the entity data... if (typeof(entityData[propertyType]) == "undefined") @@ -153,8 +189,7 @@ entityKeyProperty : { init : "uid", - check : "qx.lang.Type.isString(value) || qx.lang.Type.isArray(value)", - apply : "_applyEntityKeyProperty" + check : "qx.lang.Type.isString(value) || qx.lang.Type.isArray(value)" }, /** Mapping from classname to type used in the database */ @@ -233,9 +268,54 @@ * contains an array of strings, where each string is the name of a * property, and the key is composed of the fields from each of these * properties, in the order listed herein. + * + * @param canonicalize {Map?} + * A map describing fields that are to be canonicalized, and the + * canonicalization function. The map contains one or more members. Each + * member name is a property name defined in the propertyTypes map. The + * associated member value is itself a map, consisting of three members: + * prop, which defines a new property in which the canonical value is to + * be stored; type, the type of the canonical property (see the + * propertyTypes parameter); and func, which is the canonicalization + * function. The canonicalization function takes one parameter, the + * value to be canonicalized, and returns the canonical value. + * + * When a canonicalized field is provided, all query criteria + * referencing the original field are modified to search using the + * canonicalized field in its stead. The criterium is modified by + * converting the search value using the canonicalization function, and + * using the canonicalized property instead of the original property. + * + * Here is an example canonicalize map. This one uses the "value" + * property (previously defined in propertyTypes}, and adds a + * canonicalized value in a field called "value_lc". The canonicalized + * value is created by converting the "value" field to lower case. + * { + * "value" : + * { + * // Property in which to store the canonicalized value. Since we + * // are converting the value to lower case, we'll give the + * // property a name suffix that reflects that. + * prop : "value_lc", + * + * // The canonicalized value will be a string + * type : "String", + + * // Function to convert a value to lower case + * func : function(value) + * { + * return value.toLowerCase(); + * } + * } + * }; */ - registerPropertyTypes : function(entityType, propertyTypes, keyField) + registerPropertyTypes : function(entityType, + propertyTypes, + keyField, + canonicalize) { + var name; + // If there's no key field name specified... if (! keyField) { @@ -244,10 +324,20 @@ keyField = "uid"; } + // Add the canonicalize properties to the property list + canonicalize = canonicalize || {}; + for (name in canonicalize) + { + // Add the property in which to store the canonicalized value to the + // list of database properties. + propertyTypes[canonicalize[name].prop] = canonicalize[name].type; + } + rpcjs.dbif.Entity.propertyTypes[entityType] = { keyField : keyField, - fields : propertyTypes + fields : propertyTypes, + canonicalize : canonicalize }; }, @@ -464,6 +554,23 @@ */ put : function() { + var name; + var entityType = this.getEntityType(); + var propertyTypes; + var canonicalize; + var data; + + // Retrieve the property data + data = this.getData(); + + // Canonicalize each value that has canonicalization specified + propertyTypes = rpcjs.dbif.Entity.propertyTypes[entityType]; + canonicalize = propertyTypes.canonicalize; + for (name in canonicalize) + { + data[canonicalize[name].prop] = canonicalize[name].func(data[name]); + } + // Write this data rpcjs.dbif.Entity.__put(this); @@ -498,28 +605,6 @@ { var props = rpcjs.dbif.Entity.propertyTypes[this.getEntityType()]; return props; - }, - - // property apply function - _applyEntityKeyProperty : function(value, old) - { - if (qx.lang.Type.isArray(value)) - { -/* - * At the time that setEntityKeyProperty() is called from the Obj* - * constructor, the entity type has not yet been set. - - var properties = rpcjs.dbif.Entity.propertyTypes[this.getEntityType()]; - value.forEach( - function(subcomponent) - { - if (! qx.lang.Array.contains(properties, subcomponent)) - { - throw new Error("Unexpected property in key: " + subcomponent); - } - }); -*/ - } } } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-04 22:20:00
|
Revision: 21500 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21500&view=rev Author: sandersson Date: 2011-10-04 22:19:53 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionDialog.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js 2011-10-04 21:53:35 UTC (rev 21499) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js 2011-10-04 22:19:53 UTC (rev 21500) @@ -33,11 +33,10 @@ /** * @param caption {String} The caption text - * @param icon {String} The URL of the caption bar icon */ - construct : function(caption, icon) + construct : function(caption) { - this.base(arguments, caption, icon); + this.base(arguments, caption); }, @@ -116,6 +115,12 @@ members : { + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + // Augmented show : function() { @@ -130,6 +135,7 @@ this.base(arguments); }, + // Augmented hide : function() { if(this.isBlocker()) Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionDialog.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionDialog.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionDialog.js 2011-10-04 22:19:53 UTC (rev 21500) @@ -0,0 +1,183 @@ +/* ************************************************************************ + + 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 option dialog widget + * + * More information can be found in the package description {@link qxe.ui.dialog}. + */ +qx.Class.define("qxe.ui.dialog.OptionDialog", +{ + extend : qxe.ui.dialog.Dialog, + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param caption {string} The caption + * @param optionPane {qxe.ui.dialog.OptionPane} The option pane + */ + construct : function(caption, optionPane) + { + this.base(arguments, caption); + + this.setLayout(new qx.ui.layout.Basic()); + + if(optionPane != null) + { + this.setOptionPane(optionPane); + } + }, + + + /* + ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + /** + * Get an instance of an option dialog. + * + * @param type {object} The option pane type. + * @param message {string} The message to show. + * @param modal {boolean} The modality of the dialog. + * @param blocker {object} The blocker object. + * @param parent {object} The parent widget to attach to. + * + * @return {qxe.ui.wizard.Page[]} List of children. + */ + getInstance : function(type, message, modal, blocker, parent) + { + var typeStruct = (typeof type === "string") ? qxe.ui.dialog.OptionPanes[type] : type; + + var messageOP = new qxe.ui.dialog.OptionPane(typeStruct, message); + + var caption = qx.locale.Manager.getInstance().translate(typeStruct.caption, []).toString() || null; + + var messageOD = new qxe.ui.dialog.OptionDialog(caption, messageOP); + messageOD.setModal(modal || false); + messageOD.setBlocker(blocker); + messageOD.addListenerOnce("resize", function(e) { + if(parent) + { + messageOD.center(parent); + } + else + { + messageOD.center(e); + } + }, messageOD); + + qx.core.Init.getApplication().getRoot().add(messageOD); + + messageOD.open(); + + return messageOD; + } + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "option-dialog" + }, + + /** + * The option pane. + */ + optionPane : + { + check : "qxe.ui.dialog.OptionPane", + init : null, + apply : "_applyOptionPane" + } + }, + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /* + --------------------------------------------------------------------------- + APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + /** + * Apply method for the option pane. + * + * The option pane is the inner pane of the dialog. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applyOptionPane : function(value, old) + { + if (old) + { + old.dispose(); + } + + this.add(value); + }, + + + /* + --------------------------------------------------------------------------- + USER API + --------------------------------------------------------------------------- + */ + + /** + * Close the option dialog. + */ + close : function() + { + this.base(arguments); + + qx.core.Init.getApplication().getRoot().remove(this); + } + } +}); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-04 21:53:42
|
Revision: 21499 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21499&view=rev Author: sandersson Date: 2011-10-04 21:53:35 +0000 (Tue, 04 Oct 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-10-04 21:21:42 UTC (rev 21498) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Page.js 2011-10-04 21:53:35 UTC (rev 21499) @@ -25,6 +25,8 @@ implement : qxe.ui.wizard.IPage, +// type : "abstract", + /* ***************************************************************************** CONSTRUCTOR This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-04 21:21:48
|
Revision: 21498 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21498&view=rev Author: sandersson Date: 2011-10-04 21:21:42 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/statusbar/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/statusbar/__init__.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/__init__.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/statusbar/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/statusbar/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/statusbar/__init__.js 2011-10-04 21:21:42 UTC (rev 21498) @@ -0,0 +1,3 @@ +/** + * The widget for StatusBar and its Pane. + */ Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js 2011-10-04 19:50:52 UTC (rev 21497) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js 2011-10-04 21:21:42 UTC (rev 21498) @@ -174,6 +174,7 @@ statusBar : { + check : "qxe.ui.statusbar.StatusBar", apply : "_applyStatusBarChange", event : "changeStatusBar", nullable : true Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/__init__.js 2011-10-04 21:21:42 UTC (rev 21498) @@ -0,0 +1,3 @@ +/** + * The widgets Window, DecoratedWindow and Frame. + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-04 19:50:59
|
Revision: 21497 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21497&view=rev Author: sandersson Date: 2011-10-04 19:50:52 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Modified Paths: -------------- 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/modern/Appearance.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js 2011-10-04 19:29:53 UTC (rev 21496) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js 2011-10-04 19:50:52 UTC (rev 21497) @@ -17,9 +17,6 @@ /* ************************************************************************ -#asset(qx/icon/Oxygen/16/actions/dialog-cancel.png) -#asset(qx/icon/Oxygen/16/actions/dialog-ok.png) - # asset(qxe/decoration/Classic/*) ************************************************************************* */ @@ -40,6 +37,91 @@ /* --------------------------------------------------------------------------- + DECORATED WINDOW + --------------------------------------------------------------------------- + */ + + "decorated-window/captionbar" : + { + style : function(states) + { + return { + padding : 1, + backgroundColor : states.active ? "dialog-active-caption" : "dialog-inactive-caption", + textColor : states.active ? "dialog-active-caption-text" : "dialog-inactive-caption-text" + }; + } + }, + + "decorated-window/title" : + { + style : function(states) + { + return { + cursor : "default", + font : "bold", + margin : states.rtl ? [ 0, 0, 0, 20] : [ 0, 20, 0, 0], + alignY: "middle" + }; + } + }, + + "decorated-window/close-button" : + { + include : "button", + alias : "button", + + style : function(states) + { + var rtl = states.rtl; + + return { + margin : rtl ? [ 0, 2, 0, 0 ] : [ 0, 0, 0, 2 ], + icon : "decoration/window/close.gif", + padding : states.pressed || states.abandoned ? (rtl ? [ 2, 3, 0, 1] : [ 2, 1, 0, 3]) : [ 1, 2 ] + }; + } + }, + + /* + --------------------------------------------------------------------------- + DIALOG + --------------------------------------------------------------------------- + */ + + "dialog" : + { + style : function(states) + { + return { + contentPadding : [ 10, 10, 10, 10 ], + backgroundColor : "background", + decorator : states.maximized ? undefined : "outset", + shadow : states.maximized ? undefined : "shadow-small" + }; + } + }, + + "dialog/pane" : {}, + + /* + --------------------------------------------------------------------------- + FRAME + --------------------------------------------------------------------------- + */ + + "frame/icon" : + { + style : function(states) + { + return { + margin : states.rtl ? [ 0, 0, 0, 4] : [ 0, 4, 0, 0] + }; + } + }, + + /* + --------------------------------------------------------------------------- OPTION PANE --------------------------------------------------------------------------- */ @@ -52,7 +134,6 @@ --------------------------------------------------------------------------- */ - // Inherits from respective parent "wizard" : "widget", "wizard-page" : "groupbox" }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js 2011-10-04 19:29:53 UTC (rev 21496) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Color.js 2011-10-04 19:50:52 UTC (rev 21497) @@ -19,5 +19,15 @@ { colors : { + /* + --------------------------------------------------------------------------- + DIALOG + --------------------------------------------------------------------------- + */ + + "dialog-active-caption-text" : [ 255, 255, 255 ], + "dialog-inactive-caption-text" : [ 255, 255, 255 ], + "dialog-active-caption" : [ 51, 94, 168 ], + "dialog-inactive-caption" : [ 111, 161, 217 ] } }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js 2011-10-04 19:29:53 UTC (rev 21496) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js 2011-10-04 19:50:52 UTC (rev 21497) @@ -40,6 +40,95 @@ /* --------------------------------------------------------------------------- + DECORATED WINDOW + --------------------------------------------------------------------------- + */ + + "decorated-window/captionbar" : + { + style : function(states) + { + return { + decorator : states.active ? "decorated-window-captionbar-active" : "decorated-window-captionbar-inactive", + textColor : states.active ? "white" : "text-gray", + minHeight : 26, + padding : states.rtl ? [ 0, 0, 0, 2 ] : [ 0, 2, 0, 0 ] + }; + } + }, + + "decorated-window/title" : + { + style : function(states) + { + return { + alignY : "middle", + font : "bold", + margin : states.rtl ? [ 0, 6, 0, 12] : [ 0, 12, 0, 6] + }; + } + }, + + "decorated-window/close-button" : + { + alias : "atom", + + style : function(states) + { + return { + icon : states.active ? states.hovered ? "decoration/window/close-active-hovered.png" : + "decoration/window/close-active.png" : + "decoration/window/close-inactive.png", + margin : states.rtl ? [ 4, 0, 2, 8 ] : [ 4, 8, 2, 0 ] + }; + } + }, + + /* + --------------------------------------------------------------------------- + DIALOG + --------------------------------------------------------------------------- + */ + + "dialog" : + { + style : function(states) + { + return { + shadow : "shadow-window", + contentPadding : [ 10, 10, 10, 10 ] + }; + } + }, + + "dialog/pane" : + { + style : function(states) + { + return { + decorator : "dialog" + }; + } + }, + + /* + --------------------------------------------------------------------------- + FRAME + --------------------------------------------------------------------------- + */ + + "frame/icon" : + { + style : function(states) + { + return { + margin : states.rtl ? [ 5, 6, 3, 0 ] : [ 5, 0, 3, 6 ] + }; + } + }, + + /* + --------------------------------------------------------------------------- OPTION PANE --------------------------------------------------------------------------- */ Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js 2011-10-04 19:29:53 UTC (rev 21496) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Decoration.js 2011-10-04 19:50:52 UTC (rev 21497) @@ -19,6 +19,49 @@ { decorations : { + /* + --------------------------------------------------------------------------- + DIALOG + --------------------------------------------------------------------------- + */ + + "dialog" : + { + decorator: qx.ui.decoration.Single, + + style : + { + backgroundColor : "background-pane", + + width : 1, + color : "border-main", + widthTop : 0 + } + }, + + /* + --------------------------------------------------------------------------- + DECORATED WINDOW + --------------------------------------------------------------------------- + */ + + "decorated-window-captionbar-active" : + { + decorator : qx.ui.decoration.Grid, + + style : { + baseImage : "decoration/window/captionbar-active.png" + } + }, + + "decorated-window-captionbar-inactive" : + { + decorator : qx.ui.decoration.Grid, + + style : { + baseImage : "decoration/window/captionbar-inactive.png" + } + } } }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js 2011-10-04 19:29:53 UTC (rev 21496) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js 2011-10-04 19:50:52 UTC (rev 21497) @@ -98,6 +98,20 @@ { /* --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "decorated-window" + }, + + + /* + --------------------------------------------------------------------------- BASIC OPTIONS --------------------------------------------------------------------------- */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2011-10-04 19:30:00
|
Revision: 21496 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21496&view=rev Author: thron7 Date: 2011-10-04 19:29:53 +0000 (Tue, 04 Oct 2011) Log Message: ----------- started api2rst script Added Paths: ----------- workspace/thron7/misc/api2rst/ workspace/thron7/misc/api2rst/api2rst.py workspace/thron7/misc/api2rst/apidata.json workspace/thron7/misc/api2rst/apidata_f.json Added: workspace/thron7/misc/api2rst/api2rst.py =================================================================== --- workspace/thron7/misc/api2rst/api2rst.py (rev 0) +++ workspace/thron7/misc/api2rst/api2rst.py 2011-10-04 19:29:53 UTC (rev 21496) @@ -0,0 +1,200 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +################################################################################ +# +# qooxdoo - the new era of web development +# +# http://qooxdoo.org +# +# Copyright: +# 2006-2011 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) +# +################################################################################ + +import sys, string, re +from misc import json + +KEY = re.compile("^[A-Za-z0-9_$]+$") + +class Packer(object): + + symbol_table = {} + + def __init__(self): + Packer.init_symtab() + + # -- class symbol_base ----------------------------------------------------- + + class symbol_base(object): + + @classmethod + def emit(cls, node): + str = u"" + n = None + if node.type in Packer.symbol_table: + n = Packer.symbol_table[node.type]() + str += n.opening(node) + if node.hasChildren(): + for child in node.children: + if not node.type in ["commentsBefore", "commentsAfter"]: + str += cls.emit(child) + if n: + str += n.closing(node) + + # some other stuff + if node.hasParent() and not node.type in ["comment", "commentsBefore", "commentsAfter"]: + + # Add comma dividers between statements in these parents + if node.parent.type in ["array", "params", "expressionList"]: + if not node.isLastChild(True): + str += Packer.comma(str) + else: + # close the last child of a file/block-level expressionList with semicolon + if node.parent.type == "expressionList" and node.parent.parent.type in ["file", "block"]: + str += Packer.semicolon(str) + + # Semicolon handling + elif node.type in ["group", "block", "assignment", "call", "operation", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable", "emptyStatement"]: + + # Default semicolon handling + if node.parent.type in ["block", "file"]: + str += Packer.semicolon(str) + + # Special handling for switch statements + elif node.parent.type == "statement" and node.parent.parent.type == "switch" and node.parent.parent.get("switchType") == "case": + str += Packer.semicolon(str) + + # Special handling for loops (e.g. if) without blocks {} + elif ( + node.parent.type in ["statement", "elseStatement"] and + not node.parent.hasChild("block") and + node.parent.parent.type == "loop" + ): + str += Packer.semicolon(str) + + return str + + # tokens -> string + def opening(self, node): + raise NotImplementedError("You need to override 'opening' method") + + def closing(self, node): + raise NotImplementedError("You need to override 'closing' method") + + # -- end symbol_base ------------------------------------------------------- + + + # -- class factory ------------------ + + @staticmethod + def symbol(id, bp=0): + try: + s = Packer.symbol_table[id] + except KeyError: + class s(Packer.symbol_base): + pass + s.__name__ = "symbol-" + id # for debugging + s.id = id + Packer.symbol_table[id] = s + return s + + # decorator + + @staticmethod + def method(s): + assert issubclass(s, Packer.symbol_base) + def bind(fn): + setattr(s, fn.__name__, fn) + return bind + + # - Grammar ---------------------------------------------------------------- + + @classmethod + def init_symtab(cls): + symbol = cls.symbol + method = cls.method + + @method(symbol("doctree")) + def opening(s, node): # 's' is 'self' + r = u'' + return r + + @method(symbol("packages")) + def closing(s, node): + r = u'' + if node.hasParent() and node.parent.type == "variable" and not node.isLastChild(True): + r += cls.write(".") + return r + + + @method(symbol("package")) + def opening(s, node): + r = u'' + r += cls.write("[") + if node.hasChildren(True): + r += cls.space(False,r) + return r + + @method(symbol("desc")) + def closing(s, node): + r = u'' + if node.hasChildren(True): + r += cls.space(False,r) + + r += cls.write("]") + return r + + + + #end:init_symtab() + + + # -------------------------------------------------------------------------- + # -- Helper for symbol methods --------------------------------------------- + # -------------------------------------------------------------------------- + + @staticmethod + def space(force=True, result=u''): + s = u'' + + if not force and not pretty: + return s + + if afterDoc or afterBreak or afterLine or result and (result.endswith(" ") or result.endswith("\n")): + return s + else: + return u' ' + + + @staticmethod + def write(txt=u""): + result = u"" + + if breaks: + if afterArea or afterDivider or afterDoc or afterBreak or afterLine: + result += "\n" + result += txt + + return result + + + + # -------------------------------------------------------------------------- + # -- Interface Methods ----------------------------------------------------- + # -------------------------------------------------------------------------- + + + @staticmethod + def serializeNode(node, opts, rslt, enableBreaks=False, enableVerbose=False): + + return [ Packer.symbol_base.emit(node) ] # caller expects [] + + Added: workspace/thron7/misc/api2rst/apidata.json =================================================================== --- workspace/thron7/misc/api2rst/apidata.json (rev 0) +++ workspace/thron7/misc/api2rst/apidata.json 2011-10-04 19:29:53 UTC (rev 21496) @@ -0,0 +1 @@ @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-04 15:32:23
|
Revision: 21495 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21495&view=rev Author: sandersson Date: 2011-10-04 15:32:16 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Window.js Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/Dialog.js 2011-10-04 15:32:16 UTC (rev 21495) @@ -0,0 +1,144 @@ +/* ************************************************************************ + + 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 dialog widget + * + * More information can be found in the package description {@link qxe.ui.dialog}. + */ +qx.Class.define("qxe.ui.dialog.Dialog", +{ + extend : qxe.ui.window.DecoratedWindow, + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param caption {String} The caption text + * @param icon {String} The URL of the caption bar icon + */ + construct : function(caption, icon) + { + this.base(arguments, caption, icon); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "dialog" + }, + + /** Should the dialog be undecorated */ + undecorated : + { + check : "Boolean", + init : false, + event : "changeUndecorated" + }, + + /** Should the dialog be resizable */ + resizabe : + { + check : "Boolean", + init : false, + event : "changeResizable" + }, + + /** Should the window be modal (this disables minimize and maximize buttons) */ + modal : + { + check : "Boolean", + init : false, + event : "changeModal" + }, + + /** + * Block the ui underneath the dialog while displayed. + */ + blocker : + { + check : "Boolean", + init : false + }, + + /** + * Blocker color + */ + blockerColor : + { + check : "String", + init : "black" + }, + + /** + * Blocker opacity + */ + blockerOpacity : + { + check : "Number", + init : 0.5 + } + }, + + members : + { + // Augmented + show : function() + { + if(this.isBlocker()) + { + var root = this.getApplicationRoot(); + root.setBlockerOpacity(this.getBlockerOpacity()); + root.setBlockerColor(this.getBlockerColor()); + root.blockContent(this.getZIndex() - 1); + } + + this.base(arguments); + }, + + hide : function() + { + if(this.isBlocker()) + { + this.getApplicationRoot().unblockContent(); + } + + this.base(arguments); + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/DecoratedWindow.js 2011-10-04 15:32:16 UTC (rev 21495) @@ -0,0 +1,295 @@ +/* ************************************************************************ + + 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: + * Sebastian Werner (wpbasti) + * Andreas Ecker (ecker) + * Fabian Jakobs (fjakobs) + * Christian Hagendorn (chris_schmidt) + + Revision: 28835-> + * Stefan Andersson (sand) + - removed status text + - added functionality for a real statusbar, which can be added + - removed DEFAULT_WINDOW_MANAGER to Desktop to make Desktop independent + Window and open up for different window manager classes. + ! Try to remove Table's dependence on Window + ----- + - Window class split into two classes; Window and a superclass of Frame, + and a creation of a new class Dialog. + +************************************************************************ */ + +/** + * A window widget + * + * More information can be found in the package description {@link qx.ui.window}. + * + * @state active Whether the window is activated + * + * @childControl captionbar {qx.ui.container.Composite} Container for all widgets inside the captionbar + * @childControl title {qx.ui.basic.Label} caption of the window + * @childControl close-button {qx.ui.form.Button} button to close the window + */ +qx.Class.define("qxe.ui.window.DecoratedWindow", +{ + extend : qxe.ui.window.Window, + + include : + [ + qx.ui.core.MResizable, + qx.ui.core.MMovable + ], + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param caption {String} The caption text + * @param icon {String} The URL of the caption bar icon + */ + construct : function(caption, icon) + { + this.base(arguments); + + // force creation of captionbar + this._createChildControl("captionbar"); + this._createChildControl("pane"); + + // apply constructor parameters + if (icon != null) { + this.setIcon(icon); + } + + if (caption != null) { + this.setCaption(caption); + } + + // Update captionbar + this._updateCaptionBar(); + + // change the reszie frames appearance + this._getResizeFrame().setAppearance("window-resize-frame"); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + BASIC OPTIONS + --------------------------------------------------------------------------- + */ + + /** Should the window be always on top */ + alwaysOnTop : + { + check : "Boolean", + init : false, + event : "changeAlwaysOnTop" + }, + + /** The text of the caption */ + caption : + { + apply : "_applyCaptionBarChange", + event : "changeCaption", + nullable : true + }, + + /** The icon of the caption */ + icon : + { + check : "String", + nullable : true, + apply : "_applyCaptionBarChange", + event : "changeIcon", + themeable : true + }, + + + /* + --------------------------------------------------------------------------- + HIDE CAPTIONBAR FEATURES + --------------------------------------------------------------------------- + */ + + /** Should the close button be shown */ + showClose : + { + check : "Boolean", + init : true, + apply : "_applyCaptionBarChange", + themeable : true + }, + + + /* + --------------------------------------------------------------------------- + DISABLE CAPTIONBAR FEATURES + --------------------------------------------------------------------------- + */ + + /** Should the user have the ability to close the window */ + allowClose : + { + check : "Boolean", + init : true, + apply : "_applyCaptionBarChange" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + + // overridden + _createChildControlImpl : function(id, hash) + { + var control; + + switch(id) + { + case "captionbar": + // captionbar + var layout = new qx.ui.layout.Grid(); + layout.setRowFlex(0, 1); + layout.setColumnFlex(1, 1); + control = new qx.ui.container.Composite(layout); + this._add(control); + + // captionbar events + control.addListener("dblclick", this._onCaptionMouseDblClick, this); + + // register as move handle + this._activateMoveHandle(control); + break; + + case "title": + control = new qx.ui.basic.Label(this.getCaption()); + control.setWidth(0); + control.setAllowGrowX(true); + + var captionBar = this.getChildControl("captionbar"); + captionBar.add(control, {row: 0, column:1}); + break; + + case "close-button": + control = new qx.ui.form.Button(); + control.setFocusable(false); + control.addListener("execute", this._onCloseButtonClick, this); + + this.getChildControl("captionbar").add(control, {row: 0, column:6}); + break; + } + + return control || this.base(arguments, id); + }, + + + /* + --------------------------------------------------------------------------- + CAPTIONBAR INTERNALS + --------------------------------------------------------------------------- + */ + + /** + * Updates the status and the visibility of each element of the captionbar. + */ + _updateCaptionBar : function() + { + var btn; + + var caption = this.getCaption() + if (caption) { + this.getChildControl("title").setValue(caption); + this._showChildControl("title"); + } else { + this._excludeChildControl("title"); + } + + if (this.getShowClose()) + { + this._showChildControl("close-button"); + + btn = this.getChildControl("close-button"); + this.getAllowClose() ? btn.resetEnabled() : btn.setEnabled(false); + } + else + { + this._excludeChildControl("close-button"); + } + }, + + /* + --------------------------------------------------------------------------- + BASIC EVENT HANDLERS + --------------------------------------------------------------------------- + */ + + /** + * Maximizes the window or restores it if it is already + * maximized. + * + * @param e {qx.event.type.Mouse} double click event + */ + _onCaptionMouseDblClick : function(e) + { + if (this.getAllowMaximize()) { + this.isMaximized() ? this.restore() : this.maximize(); + } + }, + + + /* + --------------------------------------------------------------------------- + EVENTS FOR CAPTIONBAR BUTTONS + --------------------------------------------------------------------------- + */ + + /** + * Closes the window, removes all states from the close button and + * stops the further propagation of the event (calling {@link qx.event.type.Event#stopPropagation}). + * + * @param e {qx.event.type.Mouse} mouse click event + */ + _onCloseButtonClick : function(e) + { + this.close(); + this.getChildControl("close-button").reset(); + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Frame.js 2011-10-04 15:32:16 UTC (rev 21495) @@ -0,0 +1,379 @@ +/* ************************************************************************ + + 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: + * Sebastian Werner (wpbasti) + * Andreas Ecker (ecker) + * Fabian Jakobs (fjakobs) + * Christian Hagendorn (chris_schmidt) + + Revision: 28835-> + * Stefan Andersson (sand) + - removed status text + - added functionality for a real statusbar, which can be added + - removed DEFAULT_WINDOW_MANAGER to Desktop to make Desktop independent + Window and open up for different window manager classes. + ! Try to remove Table's dependence on Window + ----- + - Window class split into two classes; Window and a superclass of Frame, + and a creation of a new class Dialog. + +************************************************************************ */ + +/** + * A window widget + * + * More information can be found in the package description {@link qxe.ui.window}. + * + * @state maximized Whether the window is maximized + * + * @childControl icon {qx.ui.basic.Image} icon at the left of the captionbar + * @childControl minimize-button {qx.ui.form.Button} button to minimize the window + * @childControl restore-button {qx.ui.form.Button} button to restore the window + * @childControl maximize-button {qx.ui.form.Button} button to maximize the window + * @childControl statusbar {qx.ui.container.Composite} statusbar container which shows the statusbar text + */ +qx.Class.define("qxe.ui.window.Frame", +{ + extend : qxe.ui.window.DecoratedWindow, + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param caption {String} The caption text + * @param icon {String} The URL of the caption bar icon + * @param statusbar {StatusBar} The statusbar of the Frame + */ + construct : function(caption, icon, statusbar) + { + this.base(arguments, caption, icon); + + this._createChildControl("statusbar"); + + if (statusbar != null) { + this.setStatusBar(statusbar); + } + + // Update statusbar + this._updateStatusBar(); + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + events : + { + /** + * Fired before the window is minimize. + * + * The minimize action can be prevented by calling + * {@link qx.event.type.Event#preventDefault} on the event object + */ + "beforeMinimize" : "qx.event.type.Event", + + /** Fired if the window is minimized */ + "minimize" : "qx.event.type.Event", + + /** + * Fired before the window is maximize. + * + * The maximize action can be prevented by calling + * {@link qx.event.type.Event#preventDefault} on the event object + */ + "beforeMaximize" : "qx.event.type.Event", + + /** Fired if the window is maximized */ + "maximize" : "qx.event.type.Event", + + /** + * Fired before the window is restored from a minimized or maximized state. + * + * The restored action can be prevented by calling + * {@link qx.event.type.Event#preventDefault} on the event object + */ + "beforeRestore" : "qx.event.type.Event", + + /** Fired if the window is restored from a minimized or maximized state */ + "restore" : "qx.event.type.Event" + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "frame" + }, + + + /* + --------------------------------------------------------------------------- + HIDE CAPTIONBAR FEATURES + --------------------------------------------------------------------------- + */ + + /** Should the maximize button be shown */ + showMaximize : + { + check : "Boolean", + init : true, + apply : "_applyCaptionBarChange", + themeable : true + }, + + + /** Should the minimize button be shown */ + showMinimize : + { + check : "Boolean", + init : true, + apply : "_applyCaptionBarChange", + themeable : true + }, + + + /* + --------------------------------------------------------------------------- + STATUSBAR CONFIG + --------------------------------------------------------------------------- + */ + + statusBar : + { + apply : "_applyStatusBarChange", + event : "changeStatusBar", + nullable : true + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + // overridden + /** + * @lint ignoreReferenceField(_forwardStates) + */ + _forwardStates : + { + maximized : true, + showStatusbar : true + }, + + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + + // overridden + _createChildControlImpl : function(id) + { + var control; + + switch(id) + { + case "icon": + control = new qx.ui.basic.Image(this.getIcon()); + this.getChildControl("captionbar").add(control, {row: 0, column:0}); + break; + + case "statusbar": + control = new qx.ui.container.Composite(new qx.ui.layout.HBox()); + control.add(this.getStatusBar(), {flex: 1}); + this._add(control); + break; + + case "minimize-button": + control = new qx.ui.form.Button(); + control.setFocusable(false); + control.addListener("execute", this._onMinimizeButtonClick, this); + + this.getChildControl("captionbar").add(control, {row: 0, column: 2}); + break; + + case "restore-button": + control = new qx.ui.form.Button(); + control.setFocusable(false); + control.addListener("execute", this._onRestoreButtonClick, this); + + this.getChildControl("captionbar").add(control, {row: 0, column: 3}); + break; + + case "maximize-button": + control = new qx.ui.form.Button(); + control.setFocusable(false); + control.addListener("execute", this._onMaximizeButtonClick, this); + + this.getChildControl("captionbar").add(control, {row: 0, column: 4}); + break; + } + + return control || this.base(arguments, id); + }, + + + /* + --------------------------------------------------------------------------- + CAPTIONBAR INTERNALS + --------------------------------------------------------------------------- + */ + + /** + * Updates the status and the visibility of each element of the captionbar. + */ + _updateCaptionBar : function() + { + var btn; + + var icon = this.getIcon(); + if (icon) { + this.getChildControl("icon").setSource(icon); + this._showChildControl("icon"); + } else { + this._excludeChildControl("icon"); + } + + if (this.getShowMinimize()) + { + this._showChildControl("minimize-button"); + + btn = this.getChildControl("minimize-button"); + this.getAllowMinimize() ? btn.resetEnabled() : btn.setEnabled(false); + } + else + { + this._excludeChildControl("minimize-button"); + } + + if (this.getShowMaximize()) + { + if (this.isMaximized()) + { + this._showChildControl("restore-button"); + this._excludeChildControl("maximize-button"); + } + else + { + this._showChildControl("maximize-button"); + this._excludeChildControl("restore-button"); + } + + btn = this.getChildControl("maximize-button"); + this.getAllowMaximize() ? btn.resetEnabled() : btn.setEnabled(false); + } + else + { + this._excludeChildControl("maximize-button"); + this._excludeChildControl("restore-button"); + } + }, + + _updateStatusBar : function() + { + var statusbar = this.getStatusBar(); + + if (statusbar) { + this._showChildControl("statusbar"); + } else { + this._excludeChildControl("statusbar"); + } + }, + + /* + --------------------------------------------------------------------------- + PROPERTY APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + // property apply + _applyStatusBarChange : function(value, old) + { + this._updateStatusBar(); + }, + + /* + --------------------------------------------------------------------------- + EVENTS FOR CAPTIONBAR BUTTONS + --------------------------------------------------------------------------- + */ + + /** + * Minimizes the window, removes all states from the minimize button and + * stops the further propagation of the event (calling {@link qx.event.type.Event#stopPropagation}). + * + * @param e {qx.event.type.Mouse} mouse click event + */ + _onMinimizeButtonClick : function(e) + { + this.minimize(); + this.getChildControl("minimize-button").reset(); + }, + + + /** + * Restores the window, removes all states from the restore button and + * stops the further propagation of the event (calling {@link qx.event.type.Event#stopPropagation}). + * + * @param e {qx.event.type.Mouse} mouse click event + */ + _onRestoreButtonClick : function(e) + { + this.restore(); + this.getChildControl("restore-button").reset(); + }, + + + /** + * Maximizes the window, removes all states from the maximize button and + * stops the further propagation of the event (calling {@link qx.event.type.Event#stopPropagation}). + * + * @param e {qx.event.type.Mouse} mouse click event + */ + _onMaximizeButtonClick : function(e) + { + this.maximize(); + this.getChildControl("maximize-button").reset(); + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Window.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Window.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/window/Window.js 2011-10-04 15:32:16 UTC (rev 21495) @@ -0,0 +1,438 @@ +/* ************************************************************************ + + 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: + * Sebastian Werner (wpbasti) + * Andreas Ecker (ecker) + * Fabian Jakobs (fjakobs) + * Christian Hagendorn (chris_schmidt) + + Revision: 28835-> + * Stefan Andersson (sand) + - removed status text + - added functionality for a real statusbar, which can be added + - removed DEFAULT_WINDOW_MANAGER to Desktop to make Desktop independent + Window and open up for different window manager classes. + ! Try to remove Table's dependence on Window + ----- + - Window class split into two classes; Window and a superclass of Frame, + and a creation of a new class Dialog. + +************************************************************************ */ + +/** + * A window widget + * + * More information can be found in the package description {@link qxe.ui.window}. + * + * @state active Whether the window is activated + * + * @childControl pane {qx.ui.container.Composite} window pane which holds the content + */ +qx.Class.define("qxe.ui.window.Window", +{ + extend : qx.ui.core.Widget, + + include : + [ + qx.ui.core.MRemoteChildrenHandling, + qx.ui.core.MRemoteLayoutHandling, + qx.ui.core.MContentPadding + ], + + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + construct : function() + { + this.base(arguments); + + // configure internal layout + this._setLayout(new qx.ui.layout.VBox()); + + // Activation listener + this.addListener("mousedown", this._onWindowMouseDown, this, true); + + // Focusout listener + this.addListener("focusout", this._onWindowFocusOut, this); + + // Automatically add to application root. + qx.core.Init.getApplication().getRoot().add(this); + + // Initialize visibiltiy + this.initVisibility(); + + // Register as root for the focus handler + qx.ui.core.FocusHandler.getInstance().addRoot(this); + }, + + + /* + ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + /** {Class} The default window manager class. */ + DEFAULT_MANAGER_CLASS : qx.ui.window.Manager + }, + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + events : + { + /** + * Fired before the window is closed. + * + * The close action can be prevented by calling + * {@link qx.event.type.Event#preventDefault} on the event object + */ + "beforeClose" : "qx.event.type.Event", + + /** Fired if the window is closed */ + "close" : "qx.event.type.Event" + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + /* + --------------------------------------------------------------------------- + INTERNAL OPTIONS + --------------------------------------------------------------------------- + */ + + // overridden + appearance : + { + refine : true, + init : "window" + }, + + + // overridden + visibility : + { + refine : true, + init : "excluded" + }, + + + // overridden + focusable : + { + refine : true, + init : true + }, + + + /** + * If the window is active, only one window in a single qx.ui.window.Manager could + * have set this to true at the same time. + */ + active : + { + check : "Boolean", + init : false, + apply : "_applyActive", + event : "changeActive" + }, + + + /* + --------------------------------------------------------------------------- + BASIC OPTIONS + --------------------------------------------------------------------------- + */ + + /** Should the window be always on top */ + alwaysOnTop : + { + check : "Boolean", + init : false, + event : "changeAlwaysOnTop" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /** {Integer} Original top value before maximation had occoured */ + __restoredTop : null, + + /** {Integer} Original left value before maximation had occoured */ + __restoredLeft : null, + + + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + + /** + * The children container needed by the {@link qx.ui.core.MRemoteChildrenHandling} + * mixin + * + * @return {qx.ui.container.Composite} pane sub widget + */ + getChildrenContainer : function() { + return this.getChildControl("pane"); + }, + + + // overridden + /** + * @lint ignoreReferenceField(_forwardStates) + */ + _forwardStates : + { + active : true + }, + + + // overridden + setLayoutParent : function(parent) + { + if (qx.core.Environment.get("qx.debug")) + { + parent && this.assertInterface( + parent, qx.ui.window.IDesktop, + "Windows can only be added to widgets, which implement the interface "+ + "qx.ui.window.IDesktop. All root widgets implement this interface." + ); + } + this.base(arguments, parent); + }, + + + // overridden + _createChildControlImpl : function(id, hash) + { + var control; + + switch(id) + { + case "pane": + control = new qx.ui.container.Composite(); + this._add(control, {flex: 1}); + break; + } + + return control || this.base(arguments, id); + }, + + + /* + --------------------------------------------------------------------------- + USER API + --------------------------------------------------------------------------- + */ + + /** + * Closes the current window instance. + * Technically calls the {@link qx.ui.core.Widget#hide} method. + */ + close : function() + { + if (!this.isVisible()) { + return; + } + + if (this.fireNonBubblingEvent("beforeClose", qx.event.type.Event, [false, true])) + { + this.hide(); + this.fireEvent("close"); + } + }, + + + /** + * Opens the window. + */ + open : function() + { + this.show(); + this.setActive(true); + this.focus(); + }, + + + /** + * Centers the window to the parent. + * + * This call works with the size of the parent widget and the size of + * the window as calculated in the last layout flush. It is best to call + * this method just after rendering the window in the "resize" event: + * <pre class='javascript'> + * win.addListenerOnce("resize", this.center, this); + * </pre> + */ + center : function(e) + { + var parent; + var bounds; + + if(e instanceof qx.event.type.Data) + { + parent = this.getLayoutParent(); + } + else + { + parent = e; + } + + if (parent) + { + var location = parent.getContainerLocation("padding"); + + if (location) + { + var hint = this.getSizeHint(); + var left = Math.round(location.left + (location.right - location.left - hint.width) / 2); + var top = Math.round(location.top + (location.bottom - location.top - hint.height) / 2); + + if (top < 0) { + top = 0; + } + + this.moveTo(left, top); + + return; + } + } + + if (qx.core.Environment.get("qx.debug")) + { + this.warn("Centering depends on parent bounds!"); + } + }, + + + /** + * Set the window's position relative to its parent + * + * @param left {Integer} The left position + * @param top {Integer} The top position + */ + moveTo : function(left, top) + { + if (this.isMaximized()) { + return; + } + + this.setLayoutProperties({ + left : left, + top : top + }); + }, + + /* + --------------------------------------------------------------------------- + PROPERTY APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + // property apply + _applyActive : function(value, old) + { + if (old) { + this.removeState("active"); + } else { + this.addState("active"); + } + }, + + + /** + * Returns the element, to which the content padding should be applied. + * + * @return {qx.ui.core.Widget} The content padding target. + */ + _getContentPaddingTarget : function() { + return this.getChildControl("pane"); + }, + + + /* + --------------------------------------------------------------------------- + BASIC EVENT HANDLERS + --------------------------------------------------------------------------- + */ + + /** + * Stops every event + * + * @param e {qx.event.type.Event} any event + */ + _onWindowEventStop : function(e) { + e.stopPropagation(); + }, + + + /** + * Focuses the window instance. + * + * @param e {qx.event.type.Mouse} mouse down event + */ + _onWindowMouseDown : function(e) { + this.setActive(true); + }, + + + /** + * Listens to the "focusout" event to deactivate the window (if the + * currently focused widget is not a child of the window) + * + * @param e {qx.event.type.Focus} focus event + */ + _onWindowFocusOut : function(e) { + // only needed for non-modal windows + if (this.getModal()) + { + return; + } + + // get the current focused widget and check if it is a child + var current = e.getRelatedTarget(); + if (current != null && !qx.ui.core.Widget.contains(this, current)) + { + this.setActive(false); + } + } + } +}); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-10-04 13:27:23
|
Revision: 21494 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21494&view=rev Author: derrell Date: 2011-10-04 13:27:14 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Bug 5675: Handle whichever of fileSize and size is available Modified Paths: -------------- trunk/qooxdoo-contrib/UploadWidget/trunk/source/class/uploadwidget/UploadButton.js Modified: trunk/qooxdoo-contrib/UploadWidget/trunk/source/class/uploadwidget/UploadButton.js =================================================================== --- trunk/qooxdoo-contrib/UploadWidget/trunk/source/class/uploadwidget/UploadButton.js 2011-10-03 22:14:08 UTC (rev 21493) +++ trunk/qooxdoo-contrib/UploadWidget/trunk/source/class/uploadwidget/UploadButton.js 2011-10-04 13:27:14 UTC (rev 21494) @@ -250,7 +250,10 @@ this.__valueInputOnChange = true; if (controlDom.files && controlDom.files.length > 0 ){ - this.setFileSize(controlDom.files[0].fileSize); + this.setFileSize( + typeof controlDom.files[0].fileSize != "undefined" + ? controlDom.files[0].fileSize + : controlDom.files[0].size); } var value = e.getData(); this.setFileName(value); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 22:14:14
|
Revision: 21493 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21493&view=rev Author: sandersson Date: 2011-10-03 22:14:08 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionPane.js trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/error.png trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/information.png trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/warning.png trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/error.png trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/information.png trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/warning.png Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionPane.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/OptionPane.js 2011-10-03 22:14:08 UTC (rev 21493) @@ -0,0 +1,250 @@ +/* ************************************************************************ + + 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(qxe/decoration/Modern/dialog/icon/16/information.png) +#asset(qxe/decoration/Modern/dialog/icon/48/information.png) +#asset(qxe/decoration/Modern/dialog/icon/16/warning.png) +#asset(qxe/decoration/Modern/dialog/icon/48/warning.png) +#asset(qxe/decoration/Modern/dialog/icon/16/error.png) +#asset(qxe/decoration/Modern/dialog/icon/48/error.png) + +************************************************************************ */ + +/** + * An option pane. + * + * @childControl pane {qx.ui.container.Composite} a pane which holds the content + * @childControl image {qx.ui.basic.Image} an image for the pane + * @childControl message {qx.ui.form.Label} a message for the pane + * @childControl button-pane {qxe.ui.form.ButtonPane} a button pane for the pane + */ +qx.Class.define("qxe.ui.dialog.OptionPane", +{ + extend : qx.ui.core.Widget, + + /** + * @param message {String} The message to display + * @param messageType {qx.core.Object} The message type definition + */ + construct : function(message, messageType) + { + this.base(arguments); + + // configure internal layout + this._setLayout(new qx.ui.layout.VBox()); + + this._createChildControl("pane"); + + if(message != null) + { + this.setMessage(message); + } + + // Configure type + if (messageType != null) + { + this.setMessageType(messageType); + } + else + { + this.initMessageType(); + } + }, + + + /* + ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + // Panes + /** The information pane */ + INFO : { + icon : "qxe/decoration/Modern/dialog/icon/16/information.png", + caption : qx.locale.Manager.marktr("Information Message"), + image : "qxe/decoration/Modern/dialog/icon/48/information.png", + message : null, + buttons : qxe.ui.form.ButtonPane.OK + }, + + /** The warning pane */ + WARN : { + icon : "qxe/decoration/Modern/dialog/icon/16/warning.png", + caption : qx.locale.Manager.marktr("Warning Message"), + image : "qxe/decoration/Modern/dialog/icon/48/warning.png", + message : null, + buttons : qxe.ui.form.ButtonPane.OK + }, + + /** The error pane */ + ERR : { + icon : "qxe/decoration/Modern/dialog/icon/16/error.png", + caption : qx.locale.Manager.marktr("Error Message"), + image : "qxe/decoration/Modern/dialog/icon/48/error.png", + message : null, + buttons : qxe.ui.form.ButtonPane.OK + }, + + /** The message pane */ + MSG : { + icon : "qxe/decoration/Modern/dialog/icon/16/message.png", + caption : qx.locale.Manager.marktr("Message"), + image : "qxe/decoration/Modern/dialog/icon/48/message.png", + message : null, + buttons : qxe.ui.form.ButtonPane.OK + } + }, + + + /* + ***************************************************************************** + PROPERTIES + ***************************************************************************** + */ + + properties : + { + // overridden + appearance : + { + refine : true, + init : "option-pane" + }, + + /** + * The message type. + */ + messageType : + { + check : "Object", + init : function() { + return qxe.ui.dialog.OptionPane.INFO; + }, + apply : "_applyMessageType" + } + }, + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /* + --------------------------------------------------------------------------- + WIDGET API + --------------------------------------------------------------------------- + */ + + // overridden + _createChildControlImpl : function(id) + { + var control; + var layout; + var widget; + var rtl = (qx.locale.Manager.getInstance().getDirection() == "right-to-left"); + + switch(id) + { + case "pane": + layout = new qx.ui.layout.HBox(); + layout.setReversed(rtl); + + control = new qx.ui.container.Composite(layout); + + widget = this.getChildControl("image"); + control.add(widget); + + widget = this.getChildControl("message"); + control.add(widget); + + this._add(control, {flex: 1}); + + widget = this.getChildControl("button-pane"); + + this._add(widget, {flex: 1}); + break; + + case "image": + control = new qx.ui.basic.Image(); + control.setAlignY("middle"); + control.setMargin(10); + break; + + case "message": + control = new qx.ui.basic.Label(); + control.setRich(true); + control.setAlignY("middle"); + control.setMargin(5); + break; + + case "button-pane": + control = new qxe.ui.form.ButtonPane(qxe.ui.form.ButtonPane.CUSTOM); + control.setMargin(5); + control._getLayout().setAlignX("center"); + break; + } + + return control || this.base(arguments, id); + }, + + + /* + --------------------------------------------------------------------------- + APPLY ROUTINES + --------------------------------------------------------------------------- + */ + + /** + * Apply method for the message type. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applyMessageType : function(value, old) + { + this.getChildControl("image").setSource(value.image); + this.getChildControl("buttons").setType(value.buttons); + }, + + + /* + --------------------------------------------------------------------------- + UTILITIES + --------------------------------------------------------------------------- + */ + + /** + * Setting the message. + * + * @param message {String} The message to set. + */ + setMessage : function(message) + { + this.getChildControl("message").setValue(message); + } + } +}); + Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/error.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/error.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/information.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/information.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/warning.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/16/warning.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/error.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/error.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/information.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/information.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/warning.png =================================================================== (Binary files differ) Property changes on: trunk/qooxdoo-contrib/qxe/trunk/source/resource/qxe/decoration/Modern/dialog/icon/48/warning.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 21:51:12
|
Revision: 21492 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21492&view=rev Author: sandersson Date: 2011-10-03 21:51:06 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 20:53:45 UTC (rev 21491) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 21:51:06 UTC (rev 21492) @@ -21,12 +21,6 @@ #asset(qx/icon/${qx.icontheme}/16/actions/dialog-cancel.png) #asset(qx/icon/${qx.icontheme}/16/actions/dialog-apply.png) #asset(qx/icon/${qx.icontheme}/16/actions/help-about.png) -//submit -# asset(qx/icon/${qx.icontheme}/16/actions/document-send.png) -// yes -// no -// clean -# asset(qx/icon/${qx.icontheme}/16/actions/document-revert.png) ************************************************************************ */ @@ -45,11 +39,14 @@ ***************************************************************************** */ + /** + * @param orientation {String} Orientation of the button pane + * @param spacing {Integer} The spacing between buttons of the button pane + */ construct : function(orientation, spacing) { this.base(arguments); - // Configure orientation if(orientation != null) { this.setOrientation(orientation); @@ -75,49 +72,49 @@ statics : { // Buttons + /** The OK button */ OK : { -// name : "OK", label : qx.locale.Manager.marktr("OK"), - icon : "qx/icon/16/actions/dialog-ok.png", + icon : "icon/16/actions/dialog-ok.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Accept the dialog.") }, + /** The Cancel button */ CANCEL : { -// name : "CANCEL", label : qx.locale.Manager.marktr("Cancel"), - icon : "qx/icon/16/actions/dialog-cancel.png", + icon : "icon/16/actions/dialog-cancel.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Cancel the dialog.") }, + /** The Help button */ HELP : { -// name : "HELP", label : qx.locale.Manager.marktr("Help"), - icon : "qx/icon/16/actions/help-about.png", + icon : "icon/16/actions/help-about.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Get help about the dialog.") }, + /** The YES button */ YES : { -// name : "YES", label : qx.locale.Manager.marktr("Yes"), - icon : "", + icon : "icon/16/actions/dialog-ok.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", - toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + toolTipIcon : "icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Answer yes to the dialog.") }, + /** The NO button */ NO : { -// name : "NO", - label : qx.locale.Manager.marktr("NO"), - icon : "", + label : qx.locale.Manager.marktr("No"), + icon : "icon/16/actions/dialog-cancel.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", - toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + toolTipIcon : "icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Answer no to the dialog.") } }, @@ -138,7 +135,7 @@ }, /** - * The button pane orientation + * The orientation. */ orientation : { @@ -185,7 +182,12 @@ --------------------------------------------------------------------------- */ - // property apply + /** + * Apply method for the orientation. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ _applyOrientation : function(value, old) { // Dispose old layout @@ -215,13 +217,25 @@ } }, + /** + * Apply method for spacing between buttons. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ _applySpacing : function(value, old) { var layout = this._getLayout(); value == null ? layout.resetSpacing() : layout.setSpacing(value); }, - _applySizeConstraint : function() + /** + * Apply method for size constraint. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applySizeConstraint : function(value, old) { }, @@ -240,7 +254,8 @@ * 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. + * @param button {qx.ui.form.Button} The button to add. + * @param constraint {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint used for the button. */ add : function(button, constraint) { @@ -302,17 +317,19 @@ * 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. + * @param constraint {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint for buttons. */ _constrainButtons : function(constraint) { var item = 0; // Windows versions + // affirm button to the right of the cancel button. if(qx.core.Environment.get("os.name") == "win") { } // All others osx, linux etc. + // affirm button to the left of the cancel button. else { } @@ -373,31 +390,9 @@ addSpacer : function() { var spacer = new qx.ui.core.Spacer; - this._add(spacer, {flex:1}); + 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/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 20:53:45 UTC (rev 21491) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 21:51:06 UTC (rev 21492) @@ -20,6 +20,12 @@ #asset(qx/icon/${qx.icontheme}/16/actions/go-previous.png) #asset(qx/icon/${qx.icontheme}/16/actions/go-next.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-send.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-revert.png) +#asset(qx/icon/${qx.icontheme}/16/actions/dialog-cancel.png) + +#asset(qx/icon/${qx.icontheme}/16/actions/help-about.png) + ************************************************************************ */ /** @@ -41,6 +47,20 @@ * - 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 + * + * @childControl statusbar {qx.ui.container.Composite} statusbar container which shows the statusbar text + * + * @childControl stack-pane {qx.ui.container.Stack} stack container keeping all the pages + * @childControl navigation-pane {qx.ui.container.Composite} container for navigation buttons + * @childControl previous-button {qx.ui.form.Button} button to navigate to previous page + * @childControl step-navigation {qx.ui.container.Composite} container for step navigation + * @childControl current-step {qx.ui.form.TextField} textfield containing current step + * @childControl num-steps {qx.ui.form.TextField} textfield containing total number of steps + * @childControl next-button {qx.ui.form.Button} button to navigate to next page + * @childControl button-pane {qxe.ui.form.ButtonPane} button pane for wizard actions + * @childControl affirm-button {qx.ui.form.Button} button for finishing the wizard + * @childControl reset-button {qx.ui.form.Button} button to reset fields of the wizard + * @childControl cancel-button {qx.ui.form.Button} button to cancel the wizard */ qx.Class.define("qxe.ui.wizard.Wizard", { @@ -283,8 +303,8 @@ control = new qx.ui.form.Button(); control.setUserData("name", "FINISH"); control.setLabel(this.tr("Finish")); - control.setIcon(""), - control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setIcon("icon/16/actions/document-send.png"), + control.setToolTipIcon("icon/16/actions/help-about.png"); control.setToolTipText(this.tr("Finish wizard.")); control.setEnabled(false); break; @@ -293,8 +313,8 @@ control = new qx.ui.form.Button(); control.setUserData("name", "RESET"); control.setLabel(this.tr("Reset")); - control.setIcon(""), - control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setIcon("icon/16/actions/document-revert.png"), + control.setToolTipIcon("icon/16/actions/help-about.png"); control.setToolTipText(this.tr("Reset the fields of the wizard.")); control.setEnabled(false); break; @@ -427,17 +447,16 @@ /* --------------------------------------------------------------------------- - EVENT LISTENERS + BASIC EVENT HANDLERS --------------------------------------------------------------------------- */ - /** * Event handler for <code>onappear</code>. * * @param e {qx.event.type.Data} Data event. */ - _onAppearOnce : function() + _onAppearOnce : function(e) { var model = qx.data.marshal.Json.createModel(this.__skeleton, true); @@ -568,6 +587,9 @@ } }, + /** + * Destruct function. + */ destruct : function() { this.__skeleton = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 20:53:52
|
Revision: 21491 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21491&view=rev Author: sandersson Date: 2011-10-03 20:53:45 +0000 (Mon, 03 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-03 20:33:21 UTC (rev 21490) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 20:53:45 UTC (rev 21491) @@ -275,6 +275,8 @@ control.add(this._createChildControl("affirm-button"), "affirm"); control.add(this._createChildControl("reset-button")); control.add(this._createChildControl("cancel-button"), "cancel"); + + this._add(control); break; case "affirm-button": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 20:33:27
|
Revision: 21490 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21490&view=rev Author: sandersson Date: 2011-10-03 20:33:21 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 20:21:45 UTC (rev 21489) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 20:33:21 UTC (rev 21490) @@ -124,19 +124,6 @@ /* ***************************************************************************** - EVENTS - ***************************************************************************** - */ - - events : - { - /** Fired if the {@link #execute} method is invoked.*/ - "execute" : "qx.event.type.Event" - }, - - - /* - ***************************************************************************** PROPERTIES ***************************************************************************** */ @@ -270,8 +257,8 @@ if(constraint != null) { // check valid constraints - button.setUserData("constraint", constraint); - index = this._constrainButtons(constraint); +// button.setUserData("constraint", constraint); +// index = this._constrainButtons(constraint); } this._addAt(button, index); 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-03 20:21:45 UTC (rev 21489) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 20:33:21 UTC (rev 21490) @@ -267,7 +267,7 @@ break; case "button-pane": - control = new qxe.ui.form.ButtonPane(qxe.ui.form.ButtonPane.CUSTOM); + control = new qxe.ui.form.ButtonPane(); // ??? control.setAlignX("center"); control._getLayout().setAlignX("center"); control.setMargin(5); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 20:21:51
|
Revision: 21489 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21489&view=rev Author: sandersson Date: 2011-10-03 20:21:45 +0000 (Mon, 03 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-03 16:44:58 UTC (rev 21488) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 20:21:45 UTC (rev 21489) @@ -272,8 +272,8 @@ control._getLayout().setAlignX("center"); control.setMargin(5); - control.add(this._createChildControl("affirm-button"), "affirm") - control.add(this._createChildControl("reset-button")) + control.add(this._createChildControl("affirm-button"), "affirm"); + control.add(this._createChildControl("reset-button")); control.add(this._createChildControl("cancel-button"), "cancel"); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-10-03 16:45:04
|
Revision: 21488 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21488&view=rev Author: spackers Date: 2011-10-03 16:44:58 +0000 (Mon, 03 Oct 2011) Log Message: ----------- fix for parameters in FormHandler Modified Paths: -------------- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js 2011-10-03 14:55:54 UTC (rev 21487) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js 2011-10-03 16:44:58 UTC (rev 21488) @@ -169,6 +169,7 @@ for (var name in params) { var el = qx.bom.Element.create('input', { type: "hidden", + name: name, value: params[name] }); form.appendChild(el); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 14:56:00
|
Revision: 21487 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21487&view=rev Author: sandersson Date: 2011-10-03 14:55:54 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 14:06:19 UTC (rev 21486) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 14:55:54 UTC (rev 21487) @@ -76,7 +76,7 @@ { // Buttons OK : { - name : "OK", +// name : "OK", label : qx.locale.Manager.marktr("OK"), icon : "qx/icon/16/actions/dialog-ok.png", toolTip : null, @@ -85,7 +85,7 @@ }, CANCEL : { - name : "CANCEL", +// name : "CANCEL", label : qx.locale.Manager.marktr("Cancel"), icon : "qx/icon/16/actions/dialog-cancel.png", toolTip : null, @@ -94,7 +94,7 @@ }, HELP : { - name : "HELP", +// name : "HELP", label : qx.locale.Manager.marktr("Help"), icon : "qx/icon/16/actions/help-about.png", toolTip : null, @@ -103,7 +103,7 @@ }, YES : { - name : "YES", +// name : "YES", label : qx.locale.Manager.marktr("Yes"), icon : "", toolTip : null, @@ -112,7 +112,7 @@ }, NO : { - name : "NO", +// name : "NO", label : qx.locale.Manager.marktr("NO"), icon : "", toolTip : null, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 14:06:25
|
Revision: 21486 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21486&view=rev Author: sandersson Date: 2011-10-03 14:06:19 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 13:07:56 UTC (rev 21485) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 14:06:19 UTC (rev 21486) @@ -265,7 +265,7 @@ } } - var index = this.getChildren().length; + var index = this._getChildren().length; if(constraint != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 13:08:02
|
Revision: 21485 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21485&view=rev Author: sandersson Date: 2011-10-03 13:07:56 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 12:38:59 UTC (rev 21484) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 13:07:56 UTC (rev 21485) @@ -265,7 +265,7 @@ } } - var index = this.getChidren().length; + var index = this.getChildren().length; if(constraint != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-03 12:39:08
|
Revision: 21484 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21484&view=rev Author: sandersson Date: 2011-10-03 12:38:59 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 17:17:36 UTC (rev 21483) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 12:38:59 UTC (rev 21484) @@ -245,44 +245,6 @@ */ /** - * 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". * 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-02 17:17:36 UTC (rev 21483) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 12:38:59 UTC (rev 21484) @@ -61,6 +61,7 @@ this._createChildControl("stack-pane"); this._createChildControl("navigation-pane"); + this._createChildControl("button-pane"); this.addListenerOnce("appear", this._onAppearOnce, this); }, @@ -156,6 +157,7 @@ var layout; var widget; var tooltip; + var def; switch(id) { @@ -263,6 +265,44 @@ control.setToolTip(tooltip); control.setIconPosition("right"); break; + + case "button-pane": + control = new qxe.ui.form.ButtonPane(qxe.ui.form.ButtonPane.CUSTOM); + // ??? control.setAlignX("center"); + control._getLayout().setAlignX("center"); + control.setMargin(5); + + control.add(this._createChildControl("affirm-button"), "affirm") + control.add(this._createChildControl("reset-button")) + control.add(this._createChildControl("cancel-button"), "cancel"); + break; + + case "affirm-button": + control = new qx.ui.form.Button(); + control.setUserData("name", "FINISH"); + control.setLabel(this.tr("Finish")); + control.setIcon(""), + control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setToolTipText(this.tr("Finish wizard.")); + control.setEnabled(false); + break; + + case "reset-button": + control = new qx.ui.form.Button(); + control.setUserData("name", "RESET"); + control.setLabel(this.tr("Reset")); + control.setIcon(""), + control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setToolTipText(this.tr("Reset the fields of the wizard.")); + control.setEnabled(false); + break; + + case "cancel-button": + control = new qx.ui.form.Button(); + control.set(qxe.ui.form.ButtonPane.CANCEL); + control.setUserData("name", "CANCEL"); + control.setToolTipText(this.tr("Cancel the wizard.")); + break; } return control || this.base(arguments, id); @@ -524,6 +564,11 @@ children[i].setEnabled(); } } + }, + + destruct : function() + { + this.__skeleton = null; } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-02 17:17:43
|
Revision: 21483 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21483&view=rev Author: sandersson Date: 2011-10-02 17:17:36 +0000 (Sun, 02 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 16:34:01 UTC (rev 21482) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 17:17:36 UTC (rev 21483) @@ -17,6 +17,17 @@ /* ************************************************************************ +#asset(qx/icon/${qx.icontheme}/16/actions/dialog-ok.png) +#asset(qx/icon/${qx.icontheme}/16/actions/dialog-cancel.png) +#asset(qx/icon/${qx.icontheme}/16/actions/dialog-apply.png) +#asset(qx/icon/${qx.icontheme}/16/actions/help-about.png) +//submit +# asset(qx/icon/${qx.icontheme}/16/actions/document-send.png) +// yes +// no +// clean +# asset(qx/icon/${qx.icontheme}/16/actions/document-revert.png) + ************************************************************************ */ /** @@ -57,6 +68,62 @@ /* ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + // Buttons + OK : { + name : "OK", + label : qx.locale.Manager.marktr("OK"), + icon : "qx/icon/16/actions/dialog-ok.png", + toolTip : null, + toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + }, + + CANCEL : { + name : "CANCEL", + label : qx.locale.Manager.marktr("Cancel"), + icon : "qx/icon/16/actions/dialog-cancel.png", + toolTip : null, + toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Cancel the dialog.") + }, + + HELP : { + name : "HELP", + label : qx.locale.Manager.marktr("Help"), + icon : "qx/icon/16/actions/help-about.png", + toolTip : null, + toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Get help about the dialog.") + }, + + YES : { + name : "YES", + label : qx.locale.Manager.marktr("Yes"), + icon : "", + toolTip : null, + toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + }, + + NO : { + name : "NO", + label : qx.locale.Manager.marktr("NO"), + icon : "", + toolTip : null, + toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + } + }, + + + /* + ***************************************************************************** EVENTS ***************************************************************************** */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-02 16:34:07
|
Revision: 21482 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21482&view=rev Author: sandersson Date: 2011-10-02 16:34:01 +0000 (Sun, 02 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/__init__.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js 2011-10-02 15:52:00 UTC (rev 21481) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/classic/Appearance.js 2011-10-02 16:34:01 UTC (rev 21482) @@ -32,6 +32,22 @@ { /* --------------------------------------------------------------------------- + BUTTON PANE + --------------------------------------------------------------------------- + */ + + "button-pane" : "widget", + + /* + --------------------------------------------------------------------------- + OPTION PANE + --------------------------------------------------------------------------- + */ + + "option-pane" : "widget", + + /* + --------------------------------------------------------------------------- WIZARD --------------------------------------------------------------------------- */ Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js 2011-10-02 15:52:00 UTC (rev 21481) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/theme/modern/Appearance.js 2011-10-02 16:34:01 UTC (rev 21482) @@ -32,6 +32,22 @@ { /* --------------------------------------------------------------------------- + BUTTON PANE + --------------------------------------------------------------------------- + */ + + "button-pane" : "widget", + + /* + --------------------------------------------------------------------------- + OPTION PANE + --------------------------------------------------------------------------- + */ + + "option-pane" : "widget", + + /* + --------------------------------------------------------------------------- WIZARD --------------------------------------------------------------------------- */ Added: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/__init__.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/__init__.js (rev 0) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/dialog/__init__.js 2011-10-02 16:34:01 UTC (rev 21482) @@ -0,0 +1,3 @@ +/** + * The widgets for option pane, dialog, option dialog. + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-10-02 15:52:06
|
Revision: 21481 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21481&view=rev Author: sandersson Date: 2011-10-02 15:52:00 +0000 (Sun, 02 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 15:44:04 UTC (rev 21480) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-02 15:52:00 UTC (rev 21481) @@ -230,7 +230,7 @@ { if (qx.core.Environment.get("qx.debug")) { - if (!(page instanceof qx.ui.form.Button)) + if (!(button instanceof qx.ui.form.Button)) { throw new Error("Incompatible child for ButtonPane: " + button); } @@ -290,7 +290,7 @@ */ _constrainButtons : function(constraint) { - item = 0; + var item = 0; // Windows versions if(qx.core.Environment.get("os.name") == "win") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |