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: <hel...@us...> - 2011-09-23 04:32:00
|
Revision: 21455 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21455&view=rev Author: hellings Date: 2011-09-23 04:31:54 +0000 (Fri, 23 Sep 2011) Log Message: ----------- Update Mutable List demo code. Modified Paths: -------------- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js Modified: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js 2011-09-21 21:49:43 UTC (rev 21454) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js 2011-09-23 04:31:54 UTC (rev 21455) @@ -42,34 +42,30 @@ // Call super class this.base(arguments); - // Enable logging in debug variant - if (qx.core.Environment.get("qx.debug")) - { - // support native logging capabilities, e.g. Firebug for Firefox - qx.log.appender.Native; - // support additional cross-browser console. Press F7 to toggle visibility - qx.log.appender.Console; - } - /* ------------------------------------------------------------------------- Below is your actual application code... ------------------------------------------------------------------------- */ - // Create a button - var button1 = new mutablelist.Contribution("First Contribution", "mutablelist/test.png"); + // Create a list, give it the label and name for the list header + var list = new mutablelist.MutableList("List of Items", "Column Header"); + // Set default values + list.setData(['Pick up dry cleaning', 'Buy groceries', 'Drop Timmy off at little league practice']); // Document is the application root var doc = this.getRoot(); - // Add button to document at fixed coordinates - doc.add(button1, {left: 100, top: 50}); + // Add list to document at fixed coordinates + doc.add(list, {left: 100, top: 50}); + var button1 = new qx.ui.form.Button("Save"); // Add an event listener button1.addListener("execute", function(e) { - alert("Hello World!"); + var vals = list.getData().toArray(); + alert(vals.join('\n')); }); + doc.add(button1, {left: 10, top: 50}); } } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-21 21:49:50
|
Revision: 21454 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21454&view=rev Author: sandersson Date: 2011-09-21 21:49:43 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-21 20:51:26
|
Revision: 21453 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21453&view=rev Author: derrell Date: 2011-09-21 20:51:20 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Fix incorrect comment 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-09-21 20:50:49 UTC (rev 21452) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-09-21 20:51:20 UTC (rev 21453) @@ -267,8 +267,8 @@ * type {String} * "op" -- a logical operation. In this case, there must also be a * "method" member which contains the logical operation to - * be performed. Currently, the only supported operations - * are "and" and "contains". There must also be a "children" + * be performed. Currently, the only supported operation + * at present is "and". There must also be a "children" * member, which is an array of the critieria to which the * specified operation is applied. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-21 20:50:56
|
Revision: 21452 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21452&view=rev Author: derrell Date: 2011-09-21 20:50:49 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Use proper datastore service to auto-generate keys Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-21 17:41:14 UTC (rev 21451) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-21 20:50:49 UTC (rev 21452) @@ -362,7 +362,7 @@ { var dbKey; var dbEntity; - var datastore; + var datastoreService; var Datastore; var entityData = entity.getData(); var keyProperty = entity.getEntityKeyProperty(); @@ -373,8 +373,15 @@ var fieldName; var data; var key; + var keyRange; var keyFields = []; + // Gain access to the datastore service + Datastore = Packages.com.google.appengine.api.datastore; + datastoreService = + Datastore.DatastoreServiceFactory.getDatastoreService(); + + // Are we working with a composite key? if (qx.lang.Type.getClass(keyProperty) == "Array") { @@ -402,6 +409,7 @@ fields = entity.getDatabaseProperties().fields; // If there's no key yet... + dbKey = null; // Note: Rhino (and thus App Engine which uses Rhino-compiled code) // causes "global" to returned by qx.lang.Type.getClass(key) if key is @@ -418,11 +426,23 @@ { case "Key": case "Number": - key = rpcjs.appengine.Dbif.__nextKey++; + // Obtain a unique key that no other running instances will obtain. + keyRange = + datastoreService.allocateIds(entity.getEntityType(), 1); + + // Get its numeric value + dbKey = keyRange.getStart(); + key = dbKey.getId(); break; case "String": - key = String(rpcjs.appengine.Dbif.__nextKey++); + // Obtain a unique key that no other running instances will obtain. + keyRange = + datastoreService.allocateIds(entity.getEntityType(), 1); + + // Get its numeric value + dbKey = keyRange.getStart(); + key = dbKey.getName(); break; default: @@ -451,9 +471,12 @@ break; } - // Create the database key value - Datastore = Packages.com.google.appengine.api.datastore; - dbKey = Datastore.KeyFactory.createKey(entity.getEntityType(), key); + // If we didn't auto-generate one, ... + if (dbKey === null) + { + // ... create the database key value + dbKey = Datastore.KeyFactory.createKey(entity.getEntityType(), key); + } // Create an App Engine entity to store in the database dbEntity = new Packages.com.google.appengine.api.datastore.Entity(dbKey); @@ -525,8 +548,7 @@ } // Save it to the database - datastore = Datastore.DatastoreServiceFactory.getDatastoreService(); - datastore.put(dbEntity); + datastoreService.put(dbEntity); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2011-09-21 17:41:20
|
Revision: 21451 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21451&view=rev Author: sandersson Date: 2011-09-21 17:41:14 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Added Paths: ----------- trunk/qooxdoo-contrib/qxe/trunk/ trunk/qooxdoo-contrib/qxe/trunk/source/ trunk/qooxdoo-contrib/qxe/trunk/source/class/ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ trunk/qooxdoo-contrib/qxe/trunk/source/resource/ trunk/qooxdoo-contrib/qxe/trunk/source/translation/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ec...@us...> - 2011-09-21 09:02:07
|
Revision: 21450 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21450&view=rev Author: ecker Date: 2011-09-21 09:02:01 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Added info on how to select certain demos for contrib demobrowser Modified Paths: -------------- trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/readme.txt Modified: trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/readme.txt =================================================================== --- trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/readme.txt 2011-09-21 07:21:14 UTC (rev 21449) +++ trunk/qooxdoo-contrib/qooxdoo/contribDemobrowser/readme.txt 2011-09-21 09:02:01 UTC (rev 21450) @@ -26,6 +26,14 @@ framework versions. += Select Demos = + +File config.demo.js allows you to configure what demos, i.e. demos for what +contributions, should be built for the contrib demobrowser. Particularly when +developing and validating a single contribution of yours, you'd want to just +include that specific contribution to reduce build time of the demobrowser. + + = Usage = In the contribDemobrowser/ folder execute the typical commands to build the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ec...@us...> - 2011-09-21 07:21:23
|
Revision: 21449 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21449&view=rev Author: ecker Date: 2011-09-21 07:21:14 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Removed external dependencies and added info on download/license Added Paths: ----------- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/readme.txt Removed Paths: ------------- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-all-debug.js trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-all.css trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-core-debug.js Deleted: trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-all-debug.js =================================================================== --- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-all-debug.js 2011-09-21 07:18:08 UTC (rev 21448) +++ trunk/qooxdoo-contrib/QxExtJsCharts/trunk/source/resource/ExtJs4/ext-all-debug.js 2011-09-21 07:21:14 UTC (rev 21449) @@ -1,85935 +0,0 @@ -(function(){ -(function(){ -/** - * @class Ext.util.Sorter - * @extends Object - * Represents a single sorter that can be applied to a Store - */ -Ext.define('Ext.util.Sorter', { - - /** - * @cfg {String} property The property to sort by. Required unless {@link #sorter} is provided - */ - - /** - * @cfg {Function} sorterFn A specific sorter function to execute. Can be passed instead of {@link #property} - */ - - /** - * @cfg {String} root Optional root property. This is mostly useful when sorting a Store, in which case we set the - * root to 'data' to make the filter pull the {@link #property} out of the data object of each item - */ - - /** - * @cfg {String} direction The direction to sort by. Defaults to ASC - */ - direction: "ASC", - - constructor: function(config) { - Ext.apply(this, config); - - if (this.property == undefined && this.sorterFn == undefined) { - throw "A Sorter requires either a property or a sorter function"; - } - - this.sort = this.createSortFunction(this.sorterFn || this.defaultSorterFn); - }, - - /** - * @private - * Creates and returns a function which sorts an array by the given property and direction - * @return {Function} A function which sorts by the property/direction combination provided - */ - createSortFunction: function(sorterFn) { - var me = this, - property = me.property, - direction = me.direction || "ASC", - modifier = direction.toUpperCase() == "DESC" ? -1 : 1; - - //create a comparison function. Takes 2 objects, returns 1 if object 1 is greater, - //-1 if object 2 is greater or 0 if they are equal - return function(o1, o2) { - return modifier * sorterFn.call(me, o1, o2); - }; - }, - - /** - * @private - * Basic default sorter function that just compares the defined property of each object - */ - defaultSorterFn: function(o1, o2) { - var v1 = this.getRoot(o1)[this.property], - v2 = this.getRoot(o2)[this.property]; - - return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); - }, - - /** - * @private - * Returns the root property of the given item, based on the configured {@link #root} property - * @param {Object} item The item - * @return {Object} The root property of the object - */ - getRoot: function(item) { - return this.root == undefined ? item : item[this.root]; - } -}); -/** - * @class Ext.AbstractPlugin - * @extends Object - * - * Plugins are injected - */ -Ext.define('Ext.AbstractPlugin', { - disabled: false, - - constructor: function(config) { - if (!config.cmp) { - console.warn("Attempted to attach a plugin "); - } - Ext.apply(this, config); - }, - - getCmp: function() { - return this.cmp; - }, - - /** - * The init method is invoked after initComponent has been run for the - * component which we are injecting the plugin into. - */ - init: Ext.emptyFn, - - /** - * Enable the plugin and set the disabled flag to false. - */ - enable: function() { - this.disabled = false; - }, - - /** - * Disable the plugin and set the disabled flag to true. - */ - disable: function() { - this.disabled = true; - } -}); - -/** - * @class Ext.chart.Callouts - * @ignore - */ -Ext.define('Ext.chart.Callouts', { - - /* Begin Definitions */ - - /* End Definitions */ - - constructor: function(config) { - if (config.callouts) { - this.callouts = Ext.apply(this.callouts || {}, - config.callouts, { - styles: { - color: "#000", - font: "11px Helvetica, sans-serif" - } - }); - this.calloutsArray = []; - } - }, - - renderCallouts: function() { - if (!this.callouts) { - return; - } - - var me = this, - items = me.items, - animate = me.chart.animate, - config = me.callouts, - styles = config.styles, - group = me.calloutsArray, - store = me.chart.store, - len = store.getCount(), - ratio = items.length / len, - previouslyPlacedCallouts = [], - i, - count, - j, - p; - - for (i = 0, count = 0; i < len; i++) { - for (j = 0; j < ratio; j++) { - var item = items[count], - label = group[count], - storeItem = store.getAt(i), - display = config.renderer(label, storeItem); - if (display) { - if (!label) { - group[count] = label = me.onCreateCallout(storeItem, item, i, display, j, count); - } - for (p in label) { - label[p].setAttributes(styles, true); - } - me.onPlaceCallout(label, storeItem, item, i, display, animate, j, count, previouslyPlacedCallouts); - previouslyPlacedCallouts.push(label); - count++; - } - } - } - this.hideCallouts(count); - }, - - onCreateCallout: function(storeItem, item, i, display) { - var me = this, - group = me.calloutsGroup, - config = me.callouts, - styles = config.styles, - surface = me.chart.surface, - calloutObj = { - label: false, - box: false, - lines: false - }; - - calloutObj.lines = surface.add(Ext.apply({}, - { - type: 'path', - path: 'M0,0', - stroke: '#555' - }, - styles)); - - calloutObj.box = surface.add(Ext.apply({}, - { - type: 'rect', - stroke: '#555', - fill: '#fff' - }, - styles)); - - calloutObj.label = surface.add(Ext.apply({}, - { - type: 'text', - text: display - }, - styles)); - - return calloutObj; - }, - - hideCallouts: function(index) { - var calloutsArray = this.calloutsArray, - len = calloutsArray.length, - co, - p; - while (len-->index) { - co = calloutsArray[len]; - for (p in co) { - co[p].hide(true); - } - } - } -}); -/** - * @class Ext.draw.Color - * @extends Object - * - * Represents an RGB color and provides helper functions get - * color components in HSL color space. - */ -Ext.define('Ext.draw.Color', { - - /* Begin Definitions */ - - /* End Definitions */ - - colorToHexRe: /(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/, - rgbRe: /\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/, - hexRe: /\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/, - - /** - * @cfg {Number} lightnessFactor - * - * The default factor to compute the lighter or darker color. Defaults to 0.2. - */ - lightnessFactor: 0.2, - - /** - * @constructor - * @param {Number} red Red component (0..255) - * @param {Number} green Green component (0..255) - * @param {Number} blue Blue component (0..255) - */ - constructor : function(red, green, blue) { - var me = this, - clamp = Ext.Number.constrain; - me.r = clamp(red, 0, 255); - me.g = clamp(green, 0, 255); - me.b = clamp(blue, 0, 255); - }, - - /** - * Get the red component of the color, in the range 0..255. - * @return {Number} - */ - getRed: function() { - return this.r; - }, - - /** - * Get the green component of the color, in the range 0..255. - * @return {Number} - */ - getGreen: function() { - return this.g; - }, - - /** - * Get the blue component of the color, in the range 0..255. - * @return {Number} - */ - getBlue: function() { - return this.b; - }, - - /** - * Get the RGB values. - * @return {Array} - */ - getRGB: function() { - var me = this; - return [me.r, me.g, me.b]; - }, - - /** - * Get the equivalent HSL components of the color. - * @return {Array} - */ - getHSL: function() { - var me = this, - r = me.r / 255, - g = me.g / 255, - b = me.b / 255, - max = Math.max(r, g, b), - min = Math.min(r, g, b), - delta = max - min, - h, - s = 0, - l = 0.5 * (max + min); - - // min==max means achromatic (hue is undefined) - if (min != max) { - s = (l < 0.5) ? delta / (max + min) : delta / (2 - max - min); - if (r == max) { - h = 60 * (g - b) / delta; - } else if (g == max) { - h = 120 + 60 * (b - r) / delta; - } else { - h = 240 + 60 * (r - g) / delta; - } - if (h < 0) { - h += 360; - } - if (h >= 360) { - h -= 360; - } - } - return [h, s, l]; - }, - - /** - * Return a new color that is lighter than this color. - * @param {Number} factor Lighter factor (0..1), default to 0.2 - * @return Ext.draw.Color - */ - getLighter: function(factor) { - var hsl = this.getHSL(); - factor = factor || this.lightnessFactor; - hsl[2] = Ext.Number.constrain(hsl[2] + factor, 0, 1); - return this.fromHSL(hsl[0], hsl[1], hsl[2]); - }, - - /** - * Return a new color that is darker than this color. - * @param {Number} factor Darker factor (0..1), default to 0.2 - * @return Ext.draw.Color - */ - getDarker: function(factor) { - factor = factor || this.lightnessFactor; - return this.getLighter(-factor); - }, - - /** - * Return the color in the hex format, i.e. '#rrggbb'. - * @return {String} - */ - toString: function() { - var me = this, - round = Math.round, - r = round(me.r).toString(16), - g = round(me.g).toString(16), - b = round(me.b).toString(16); - r = (r.length == 1) ? '0' + r : r; - g = (g.length == 1) ? '0' + g : g; - b = (b.length == 1) ? '0' + b : b; - return ['#', r, g, b].join(''); - }, - - /** - * Convert a color to hexadecimal format. - * - * @param {String|Array} color The color value (i.e 'rgb(255, 255, 255)', 'color: #ffffff'). - * Can also be an Array, in this case the function handles the first member. - * @returns {String} The color in hexadecimal format. - */ - toHex: function(color) { - if (Ext.isArray(color)) { - color = color[0]; - } - if (!Ext.isString(color)) { - return ''; - } - if (color.substr(0, 1) === '#') { - return color; - } - var digits = this.colorToHexRe.exec(color); - - if (Ext.isArray(digits)) { - var red = parseInt(digits[2], 10), - green = parseInt(digits[3], 10), - blue = parseInt(digits[4], 10), - rgb = blue | (green << 8) | (red << 16); - return digits[1] + '#' + ("000000" + rgb.toString(16)).slice(-6); - } - else { - return ''; - } - }, - - /** - * Parse the string and create a new color. - * - * Supported formats: '#rrggbb', '#rgb', and 'rgb(r,g,b)'. - * - * If the string is not recognized, an undefined will be returned instead. - * - * @param {String} str Color in string. - * @returns Ext.draw.Color - */ - fromString: function(str) { - var values, r, g, b, - parse = parseInt; - - if ((str.length == 4 || str.length == 7) && str.substr(0, 1) === '#') { - values = str.match(this.hexRe); - if (values) { - r = parse(values[1], 16) >> 0; - g = parse(values[2], 16) >> 0; - b = parse(values[3], 16) >> 0; - if (str.length == 4) { - r += (r * 16); - g += (g * 16); - b += (b * 16); - } - } - } - else { - values = str.match(this.rgbRe); - if (values) { - r = values[1]; - g = values[2]; - b = values[3]; - } - } - - return (typeof r == 'undefined') ? undefined : Ext.create('Ext.draw.Color', r, g, b); - }, - - /** - * Returns the gray value (0 to 255) of the color. - * - * The gray value is calculated using the formula r*0.3 + g*0.59 + b*0.11. - * - * @returns {Number} - */ - getGrayscale: function() { - // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale - return this.r * 0.3 + this.g * 0.59 + this.b * 0.11; - }, - - /** - * Create a new color based on the specified HSL values. - * - * @param {Number} h Hue component (0..359) - * @param {Number} s Saturation component (0..1) - * @param {Number} l Lightness component (0..1) - * @returns Ext.draw.Color - */ - fromHSL: function(h, s, l) { - var C, X, m, i, rgb = [], - abs = Math.abs, - floor = Math.floor; - - if (s == 0 || h == null) { - // achromatic - rgb = [l, l, l]; - } - else { - // http://en.wikipedia.org/wiki/HSL_and_HSV#From_HSL - // C is the chroma - // X is the second largest component - // m is the lightness adjustment - h /= 60; - C = s * (1 - abs(2 * l - 1)); - X = C * (1 - abs(h - 2 * floor(h / 2) - 1)); - m = l - C / 2; - switch (floor(h)) { - case 0: - rgb = [C, X, 0]; - break; - case 1: - rgb = [X, C, 0]; - break; - case 2: - rgb = [0, C, X]; - break; - case 3: - rgb = [0, X, C]; - break; - case 4: - rgb = [X, 0, C]; - break; - case 5: - rgb = [C, 0, X]; - break; - } - rgb = [rgb[0] + m, rgb[1] + m, rgb[2] + m]; - } - return Ext.create('Ext.draw.Color', rgb[0] * 255, rgb[1] * 255, rgb[2] * 255); - } -}, function() { - var prototype = this.prototype; - - //These functions are both static and instance. TODO: find a more elegant way of copying them - this.extend({ - fromHSL: function() { - return prototype.fromHSL.apply(prototype, arguments); - }, - fromString: function() { - return prototype.fromString.apply(prototype, arguments); - }, - toHex: function() { - return prototype.toHex.apply(prototype, arguments); - } - }); -}); - -/** - * @class Ext.util.Floating - * A mixin to add floating capability to a Component - */ -Ext.define('Ext.util.Floating', { - - uses: ['Ext.Layer'], - - /** - * Construction of a floating Component involves transforming the el into a Layer based around that el. - * @param config - */ - constructor: function(config) { - this.floating = true; - this.el = new Ext.Layer(Ext.apply({}, config, { - hideMode: this.hideMode, - hidden: this.hidden, - shadow: Ext.isDefined(this.shadow) ? this.shadow : 'sides', - shadowOffset: this.shadowOffset, - constrain: false, - shim: this.shim === false ? false : undefined - }), this.el); - }, - - // private - // z-index is managed by the zIndexManager and may be overwritten at any time. - // Returns the next z-index to be used. - // If this is a Container, then it will have rebased any managed floating Components, - // and so the next available z-index will be approximately 10000 above that. - setZIndex: function(index) { - var me = this; - this.el.setZIndex(index); - - // Next item goes 10 above; - index += 10; - - // When a Container with floating items has its z-index set, it rebases any floating items it is managing. - // The returned value is a round number approximately 10000 above the last z-index used. - if (me.floatingItems) { - index = Math.floor(me.floatingItems.setBase(index) / 100) * 100 + 10000; - } - return index; - }, - - /** - * <p>Moves this floating Component into a constrain region.</p> - * <p>By default, this Component is constrained to be within the container it was added to, or the element - * it was rendered to.</p> - * <p>An alternative constraint may be passed.</p> - * @params {Mixed} constrainTo Optional. The Element or {@link Ext.util.Region Region} into which this Component is to be constrained. - */ - doConstrain: function(constrainTo) { - var me = this, - constrainEl, - vector, - xy; - - if (me.constrain || me.constrainHeader) { - if (me.constrainHeader) { - constrainEl = me.header.el; - } else { - constrainEl = me.el; - } - vector = constrainEl.getConstrainVector(constrainTo || (me.floatParent && me.floatParent.getTargetEl()) || me.container); - if (vector) { - xy = me.getPosition(); - xy[0] += vector[0]; - xy[1] += vector[1]; - me.setPosition(xy); - } - } - }, - - /** - * Aligns this floating Component to the specified element - * @param {Mixed} element The element to align to. - * @param {String} position (optional, defaults to "tl-bl?") The position to align to (see {@link Ext.core.Element#alignTo} for more details). - * @param {Array} offsets (optional) Offset the positioning by [x, y] - * @return {Component} this - */ - alignTo: function(element, position, offsets) { - var xy = this.el.getAlignToXY(element, position, offsets); - this.setPagePosition(xy); - return this; - }, - - /** - * Brings this floating Component to the front of any other visible, managed, floating Components - * @param {Boolean} preventFocus (optional) Specify <code>false</code> to prevent the Component from being focused. - * @return {Component} this - */ - toFront: function(preventFocus) { - if (this.zIndexManager.bringToFront(this)) { - if (!preventFocus || !preventFocus.getTarget().focus) { - this.focus(); - } - } - return this; - }, - - /** - * Makes this the active Component by showing its shadow, or deactivates it by hiding its shadow. This method also - * fires the {@link #activate} or {@link #deactivate} event depending on which action occurred. This method is - * called internally by {@link Ext.ZIndexManager}. - * @param {Boolean} active True to activate the Component, false to deactivate it (defaults to false) - */ - setActive: function(active) { - if (active) { - if (!this.maximized) { - //this.el.enableShadow(true); - } - this.fireEvent('activate', this); - } else { - this.el.disableShadow(); - this.fireEvent('deactivate', this); - } - }, - - /** - * Sends this Component to the back of (lower z-index than) any other visible windows - * @return {Component} this - */ - toBack: function() { - this.zIndexManager.sendToBack(this); - return this; - }, - - /** - * Center this Component in its container. - * @return {Component} this - */ - center: function() { - var xy = this.el.getAlignToXY(this.container, 'c-c'); - this.setPagePosition(xy); - return this; - }, - - // private - fitContainer: function() { - var vs = this.container.getViewSize(false); - this.setSize(vs); - } -}); -/** - * @class Ext.panel.Proxy - * @extends Object - * A custom drag proxy implementation specific to {@link Ext.panel.Panel}s. This class - * is primarily used internally for the Panel's drag drop implementation, and - * should never need to be created directly. - * @constructor - * @param panel The {@link Ext.panel.Panel} to proxy for - * @param config Configuration options - */ -Ext.define('Ext.panel.Proxy', { - - constructor: function(panel, config){ - /** - * @property panel - * @type Ext.panel.Panel - */ - this.panel = panel; - this.id = this.panel.id +'-ddproxy'; - Ext.apply(this, config); - }, - - /** - * @cfg {Boolean} insertProxy True to insert a placeholder proxy element - * while dragging the panel, false to drag with no proxy (defaults to true). - * Most Panels are not absolute positioned and therefore we need to reserve - * this space. - */ - insertProxy: true, - - // private overrides - setStatus: Ext.emptyFn, - reset: Ext.emptyFn, - update: Ext.emptyFn, - stop: Ext.emptyFn, - sync: Ext.emptyFn, - - /** - * Gets the proxy's element - * @return {Element} The proxy's element - */ - getEl: function(){ - return this.ghost.el; - }, - - /** - * Gets the proxy's ghost Panel - * @return {Panel} The proxy's ghost Panel - */ - getGhost: function(){ - return this.ghost; - }, - - /** - * Gets the proxy element. This is the element that represents where the - * Panel was before we started the drag operation. - * @return {Element} The proxy's element - */ - getProxy: function(){ - return this.proxy; - }, - - /** - * Hides the proxy - */ - hide : function(){ - if (this.ghost) { - if (this.proxy) { - this.proxy.remove(); - delete this.proxy; - } - - // Unghost the Panel, do not move the Panel to where the ghost was - this.panel.unghost(null, false); - delete this.ghost; - } - }, - - /** - * Shows the proxy - */ - show: function(){ - if (!this.ghost) { - var panelSize = this.panel.getSize(); - this.panel.el.setVisibilityMode(Ext.core.Element.DISPLAY); - this.ghost = this.panel.ghost(); - if (this.insertProxy) { - // bc Panels aren't absolute positioned we need to take up the space - // of where the panel previously was - this.proxy = this.panel.el.insertSibling({cls: Ext.baseCSSPrefix + 'panel-dd-spacer'}); - this.proxy.setSize(panelSize); - } - } - }, - - // private - repair: function(xy, callback, scope) { - this.hide(); - if (typeof callback == "function") { - callback.call(scope || this); - } - }, - - /** - * Moves the proxy to a different position in the DOM. This is typically - * called while dragging the Panel to keep the proxy sync'd to the Panel's - * location. - * @param {HTMLElement} parentNode The proxy's parent DOM node - * @param {HTMLElement} before (optional) The sibling node before which the - * proxy should be inserted (defaults to the parent's last child if not - * specified) - */ - moveProxy : function(parentNode, before){ - if (this.proxy) { - parentNode.insertBefore(this.proxy.dom, before); - } - } -}); -/** - * @class Ext.Layer - * @extends Ext.core.Element - * An extended {@link Ext.core.Element} object that supports a shadow and shim, constrain to viewport and - * automatic maintaining of shadow/shim positions. - * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true) - * @cfg {String/Boolean} shadow True to automatically create an {@link Ext.Shadow}, or a string indicating the - * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false) - * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: 'div', cls: 'x-layer'}). - * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true) - * @cfg {String} cls CSS class to add to the element - * @cfg {Number} zindex Starting z-index (defaults to 11000) - * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 4) - * @cfg {Boolean} useDisplay - * Defaults to use css offsets to hide the Layer. Specify <tt>true</tt> - * to use css style <tt>'display:none;'</tt> to hide the Layer. - * @cfg {String} visibilityCls The CSS class name to add in order to hide this Layer if this layer - * is configured with <code>{@link #hideMode}: 'asclass'</code> - * @cfg {String} hideMode - * A String which specifies how this Layer will be hidden. - * Values may be<div class="mdetail-params"><ul> - * <li><code>'display'</code> : The Component will be hidden using the <code>display: none</code> style.</li> - * <li><code>'visibility'</code> : The Component will be hidden using the <code>visibility: hidden</code> style.</li> - * <li><code>'offsets'</code> : The Component will be hidden by absolutely positioning it out of the visible area of the document. This - * is useful when a hidden Component must maintain measurable dimensions. Hiding using <code>display</code> results - * in a Component having zero dimensions.</li></ul></div> - * @constructor - * @param {Object} config An object with config options. - * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it. - */ -Ext.define('Ext.Layer', { - // shims are shared among layer to keep from having 100 iframes - statics: { - shims: [] - }, - - extend: 'Ext.core.Element', - - constructor: function(config, existingEl){ - config = config || {}; - var me = this, - dh = Ext.core.DomHelper, - cp = config.parentEl, - pel = cp ? Ext.getDom(cp) : document.body, - hm = config.hideMode; - - if (existingEl) { - me.dom = Ext.getDom(existingEl); - } - if (!me.dom) { - me.dom = dh.append(pel, config.dh || {tag: 'div', cls: Ext.baseCSSPrefix + 'layer'}); - } else { - me.addCls(Ext.baseCSSPrefix + 'layer'); - if (!me.dom.parentNode) { - pel.appendChild(me.dom); - } - } - - if(config.cls){ - me.addCls(config.cls); - } - me.constrain = config.constrain !== false; - - // Allow Components to pass their hide mode down to the Layer if they are floating. - // Otherwise, allow useDisplay to override the default hiding method which is visibility. - // TODO: Have ExtJS's Element implement visibilityMode by using classes as in Mobile. - if (hm) { - me.setVisibilityMode(Ext.core.Element[hm.toUpperCase()]); - if (me.visibilityMode == Ext.core.Element.ASCLASS) { - me.visibilityCls = config.visibilityCls; - } - } else if (config.useDisplay) { - me.setVisibilityMode(Ext.core.Element.DISPLAY); - } else { - me.setVisibilityMode(Ext.core.Element.VISIBILITY); - } - - if(config.id){ - me.id = me.dom.id = config.id; - }else{ - me.id = Ext.id(me.dom); - } - me.position('absolute'); - // if(config.shadow){ - // me.shadowOffset = config.shadowOffset || 4; - // me.shadow = new Ext.Shadow({ - // offset : me.shadowOffset, - // mode : config.shadow - // }); - // }else{ - me.shadowOffset = 0; - // } - me.useShim = config.shim !== false && Ext.useShims; - if (config.hidden === true) { - me.hide(); - } else { - this.show(); - } - }, - - getZIndex : function(){ - return parseInt((this.getShim() || this).getStyle('z-index'), 10); - }, - - getShim : function(){ - if(!this.useShim){ - return null; - } - if(this.shim){ - return this.shim; - } - var shim = shims.shift(); - if(!shim){ - shim = this.createShim(); - shim.enableDisplayMode('block'); - shim.dom.style.display = 'none'; - shim.dom.style.visibility = 'visible'; - } - var pn = this.dom.parentNode; - if(shim.dom.parentNode != pn){ - pn.insertBefore(shim.dom, this.dom); - } - shim.setStyle('z-index', this.getZIndex()-2); - this.shim = shim; - return shim; - }, - - hideShim : function(){ - if(this.shim){ - this.shim.setDisplayed(false); - shims.push(this.shim); - delete this.shim; - } - }, - - disableShadow : function(){ - if(this.shadow){ - this.shadowDisabled = true; - this.shadow.hide(); - this.lastShadowOffset = this.shadowOffset; - this.shadowOffset = 0; - } - }, - - enableShadow : function(show){ - if(this.shadow){ - this.shadowDisabled = false; - this.shadowOffset = this.lastShadowOffset; - delete this.lastShadowOffset; - if(show){ - this.sync(true); - } - } - }, - - // private - // this code can execute repeatedly in milliseconds (i.e. during a drag) so - // code size was sacrificed for efficiency (e.g. no getBox/setBox, no XY calls) - sync : function(doShow){ - var shadow = this.shadow; - if(!this.updating && this.isVisible() && (shadow || this.useShim)){ - var shim = this.getShim(), - w = this.getWidth(), - h = this.getHeight(), - l = this.getLeft(true), - t = this.getTop(true); - - if(shadow && !this.shadowDisabled){ - if(doShow && !shadow.isVisible()){ - shadow.show(this); - }else{ - shadow.realign(l, t, w, h); - } - if(shim){ - if(doShow){ - shim.show(); - } - // fit the shim behind the shadow, so it is shimmed too - var shadowAdj = shadow.el.getXY(), shimStyle = shim.dom.style, - shadowSize = shadow.el.getSize(); - shimStyle.left = (shadowAdj[0])+'px'; - shimStyle.top = (shadowAdj[1])+'px'; - shimStyle.width = (shadowSize.width)+'px'; - shimStyle.height = (shadowSize.height)+'px'; - } - }else if(shim){ - if(doShow){ - shim.show(); - } - shim.setSize(w, h); - shim.setLeftTop(l, t); - } - } - return this; - }, - - remove : function(){ - this.hideUnders(); - Ext.Layer.superclass.remove.call(this); - }, - - // private - beginUpdate : function(){ - this.updating = true; - }, - - // private - endUpdate : function(){ - this.updating = false; - this.sync(true); - }, - - // private - hideUnders : function(){ - if(this.shadow){ - this.shadow.hide(); - } - this.hideShim(); - }, - - // private - constrainXY : function(){ - if(this.constrain){ - var vw = Ext.core.Element.getViewWidth(), - vh = Ext.core.Element.getViewHeight(); - var s = Ext.getDoc().getScroll(); - - var xy = this.getXY(); - var x = xy[0], y = xy[1]; - var so = this.shadowOffset; - var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; - // only move it if it needs it - var moved = false; - // first validate right/bottom - if((x + w) > vw+s.left){ - x = vw - w - so; - moved = true; - } - if((y + h) > vh+s.top){ - y = vh - h - so; - moved = true; - } - // then make sure top/left isn't negative - if(x < s.left){ - x = s.left; - moved = true; - } - if(y < s.top){ - y = s.top; - moved = true; - } - if(moved){ - if(this.avoidY){ - var ay = this.avoidY; - if(y <= ay && (y+h) >= ay){ - y = ay-h-5; - } - } - xy = [x, y]; - Ext.Layer.superclass.setXY.call(this, xy); - this.sync(); - } - } - return this; - }, - - getConstrainOffset : function(){ - return this.shadowOffset; - }, - - // overridden Element method - setVisible : function(visible, animate, d, callback, e){ - // If animating into full visibility... - var cb; - if(animate && visible){ - cb = Ext.Function.bind(function(){ - this.sync(true); - if(callback){ - callback(); - } - }, this); - Ext.Layer.superclass.setVisible.call(this, true, true, d, cb, e); - }else{ -// Here we are either showing with no animation, or hiding - if(!visible){ - this.hideUnders(true); - } - cb = callback; - if(animate){ - cb = Ext.Function.bind(function(){ - this.hideAction(); - if(callback){ - callback(); - } - }, this); - } - Ext.Layer.superclass.setVisible.call(this, visible, animate, d, cb, e); - if(visible){ - this.sync(true); - } - } - return this; - }, - - // private - beforeFx : function(){ - this.beforeAction(); - return Ext.Layer.superclass.beforeFx.apply(this, arguments); - }, - - // private - afterFx : function(){ - Ext.Layer.superclass.afterFx.apply(this, arguments); - this.sync(this.isVisible()); - }, - - // private - beforeAction : function(){ - if(!this.updating && this.shadow){ - this.shadow.hide(); - } - }, - - // overridden Element method - setLeft : function(left){ - Ext.Layer.superclass.setLeft.apply(this, arguments); - return this.sync(); - }, - - setTop : function(top){ - Ext.Layer.superclass.setTop.apply(this, arguments); - return this.sync(); - }, - - setLeftTop : function(left, top){ - Ext.Layer.superclass.setLeftTop.apply(this, arguments); - return this.sync(); - }, - - setXY : function(xy, a, d, c, e){ - this.fixDisplay(); - this.beforeAction(); - var cb = this.createCB(c); - Ext.Layer.superclass.setXY.call(this, xy, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // private - createCB : function(c){ - var el = this; - return function(){ - el.constrainXY(); - el.sync(true); - if(c){ - c(); - } - }; - }, - - // overridden Element method - setX : function(x, a, d, c, e){ - this.setXY([x, this.getY()], a, d, c, e); - return this; - }, - - // overridden Element method - setY : function(y, a, d, c, e){ - this.setXY([this.getX(), y], a, d, c, e); - return this; - }, - - // overridden Element method - setSize : function(w, h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - Ext.Layer.superclass.setSize.call(this, w, h, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setWidth : function(w, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - Ext.Layer.superclass.setWidth.call(this, w, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setHeight : function(h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - Ext.Layer.superclass.setHeight.call(this, h, a, d, cb, e); - if(!a){ - cb(); - } - return this; - }, - - // overridden Element method - setBounds : function(x, y, width, height, animate, d, callback, e){ - this.beforeAction(); - var cb = this.createCB(callback); - if(!animate){ - Ext.Layer.superclass.setXY.call(this, [x, y]); - Ext.Layer.superclass.setSize.call(this, width, height, animate, d, cb, e); - cb(); - }else{ - Ext.Layer.superclass.setBounds.call(this, x, y, width, height, animate, d, cb, e); - } - return this; - }, - - /** - * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically - * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow - * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index). - * @param {Number} zindex The new z-index to set - * @return {this} The Layer - */ - setZIndex : function(zindex){ - this.zindex = zindex; - this.setStyle('z-index', zindex + 2); - if(this.shadow){ - this.shadow.setZIndex(zindex + 1); - } - if(this.shim){ - this.shim.setStyle('z-index', zindex); - } - return this; - } -}); -/** - * @class Ext.util.Filter - * @extends Object - * <p>Represents a filter that can be applied to a {@link Ext.data.MixedCollection MixedCollection}. Can either simply - * filter on a property/value pair or pass in a filter function with custom logic. Filters are always used in the context - * of MixedCollections, though {@link Ext.data.Store Store}s frequently create them when filtering and searching on their - * records. Example usage:</p> -<pre><code> -//set up a fictional MixedCollection containing a few people to filter on -var allNames = new Ext.util.MixedCollection(); -allNames.addAll([ - {id: 1, name: 'Ed', age: 25}, - {id: 2, name: 'Jamie', age: 37}, - {id: 3, name: 'Abe', age: 32}, - {id: 4, name: 'Aaron', age: 26}, - {id: 5, name: 'David', age: 32} -]); - -var ageFilter = new Ext.util.Filter({ - property: 'age', - value : 32 -}); - -var longNameFilter = new Ext.util.Filter({ - filterFn: function(item) { - return item.name.length > 4; - } -}); - -//a new MixedCollection with the 3 names longer than 4 characters -var longNames = allNames.filter(longNameFilter); - -//a new MixedCollection with the 2 people of age 24: -var youngFolk = allNames.filter(ageFilter); -</code></pre> - * @constructor - * @param {Object} config Config object - */ -Ext.define('Ext.util.Filter', { - - /* Begin Definitions */ - - /* End Definitions */ - /** - * @cfg {String} property The property to filter on. Required unless a {@link #filter} is passed - */ - - /** - * @cfg {Function} filterFn A custom filter function which is passed each item in the {@link Ext.util.MixedCollection} - * in turn. Should return true to accept each item or false to reject it - */ - - /** - * @cfg {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false - */ - anyMatch: false, - - /** - * @cfg {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. - * Ignored if anyMatch is true. - */ - exactMatch: false, - - /** - * @cfg {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false. - */ - caseSensitive: false, - - /** - * @cfg {String} root Optional root property. This is mostly useful when filtering a Store, in which case we set the - * root to 'data' to make the filter pull the {@link #property} out of the data object of each item - */ - - constructor: function(config) { - Ext.apply(this, config); - - //we're aliasing filter to filterFn mostly for API cleanliness reasons, despite the fact it dirties the code here. - //Ext.util.Sorter takes a sorterFn property but allows .sort to be called - we do the same here - this.filter = this.filter || this.filterFn; - - if (this.filter == undefined) { - if (this.property == undefined || this.value == undefined) { - // Commented this out temporarily because it stops us using string ids in models. TODO: Remove this once - // Model has been updated to allow string ids - - // throw "A Filter requires either a property or a filterFn to be set"; - } else { - this.filter = this.createFilterFn(); - } - - this.filterFn = this.filter; - } - }, - - /** - * @private - * Creates a filter function for the configured property/value/anyMatch/caseSensitive options for this Filter - */ - createFilterFn: function() { - var me = this, - matcher = me.createValueMatcher(), - property = me.property; - - return function(item) { - return matcher.test(me.getRoot.call(me, item)[property]); - }; - }, - - /** - * @private - * Returns the root property of the given item, based on the configured {@link #root} property - * @param {Object} item The item - * @return {Object} The root property of the object - */ - getRoot: function(item) { - return this.root == undefined ? item : item[this.root]; - }, - - /** - * @private - * Returns a regular expression based on the given value and matching options - */ - createValueMatcher : function() { - var me = this, - value = me.value, - anyMatch = me.anyMatch, - exactMatch = me.exactMatch, - caseSensitive = me.caseSensitive, - escapeRe = Ext.String.escapeRegex; - - if (!value.exec) { // not a regex - value = String(value); - - if (anyMatch === true) { - value = escapeRe(value); - } else { - value = '^' + escapeRe(value); - if (exactMatch === true) { - value += '$'; - } - } - value = new RegExp(value, caseSensitive ? '' : 'i'); - } - - return value; - } -}); -/** - * @class Ext.Template - * <p>Represents an HTML fragment template. Templates may be {@link #compile precompiled} - * for greater performance.</p> - * An instance of this class may be created by passing to the constructor either - * a single argument, or multiple arguments: - * <div class="mdetail-params"><ul> - * <li><b>single argument</b> : String/Array - * <div class="sub-desc"> - * The single argument may be either a String or an Array:<ul> - * <li><tt>String</tt> : </li><pre><code> -var t = new Ext.Template("<div>Hello {0}.</div>"); -t.{@link #append}('some-element', ['foo']); - </code></pre> - * <li><tt>Array</tt> : </li> - * An Array will be combined with <code>join('')</code>. -<pre><code> -var t = new Ext.Template([ - '<div name="{id}">', - '<span class="{cls}">{name:trim} {value:ellipsis(10)}</span>', - '</div>', -]); -t.{@link #compile}(); -t.{@link #append}('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'}); - </code></pre> - * </ul></div></li> - * <li><b>multiple arguments</b> : String, Object, Array, ... - * <div class="sub-desc"> - * Multiple arguments will be combined with <code>join('')</code>. - * <pre><code> -var t = new Ext.Template( - '<div name="{id}">', - '<span class="{cls}">{name} {value}</span>', - '</div>', - // a configuration object: - { - compiled: true, // {@link #compile} immediately - } -); - </code></pre> - * <p><b>Notes</b>:</p> - * <div class="mdetail-params"><ul> - * <li>Formatting and <code>disableFormats</code> are not applicable for Sencha Touch.</li> - * <li>For a list of available format functions, see {@link Ext.util.Format}.</li> - * <li><code>disableFormats</code> reduces <code>{@link #apply}</code> time - * when no formatting is required.</li> - * </ul></div> - * </div></li> - * </ul></div> - * @param {Mixed} config - */ - -Ext.define('Ext.Template', { - - /* Begin Definitions */ - - requires: ['Ext.core.DomHelper'], - - statics: { - /** - * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML. - * @param {String/HTMLElement} el A DOM element or its id - * @param {Object} config A configuration object - * @return {Ext.Template} The created template - * @static - */ - from: function(el, config) { - el = Ext.getDom(el); - return new this(el.value || el.innerHTML, config || ''); - } - }, - - /* End Definitions */ - - constructor: function(html) { - var me = this, - args = arguments, - buffer = [], - value, i, length; - - me.initialConfig = {}; - - if (Ext.isArray(html)) { - html = html.join(""); - } - else if (args.length > 1) { - for (i = 0, length = args.length; i < length; i++) { - value = args[i]; - if (typeof value == 'object') { - Ext.apply(me.initialConfig, value); - Ext.apply(me, value); - } else { - buffer.push(value); - } - } - html = buffer.join(''); - } - - // @private - me.html = html; - - if (me.compiled) { - me.compile(); - } - }, - isTemplate: true, - /** - * @cfg {Boolean} disableFormats true to disable format functions in the template. If the template doesn't contain format functions, setting - * disableFormats to true will reduce apply time (defaults to false) - */ - disableFormats: false, - - re: /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - /** - * Returns an HTML fragment of this template with the specified values applied. - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @return {String} The HTML fragment - * @hide repeat doc - */ - applyTemplate: function(values) { - var me = this, - useFormat = me.disableFormats !== true, - fm = Ext.String, - tpl = me; - - if (me.compiled) { - return me.compiled(values); - } - function fn(m, name, format, args) { - if (format && useFormat) { - if (args) { - args = [values[name]].concat(new Function('return ['+ args +'];')()); - } else { - args = [values[name]]; - } - if (format.substr(0, 5) == "this.") { - return tpl[format.substr(5)].apply(tpl, args); - } - else { - return fm[format].apply(fm, args); - } - } - else { - return values[name] !== undefined ? values[name] : ""; - } - } - return me.html.replace(me.re, fn); - }, - - /** - * Sets the HTML used as the template and optionally compiles it. - * @param {String} html - * @param {Boolean} compile (optional) True to compile the template (defaults to undefined) - * @return {Ext.Template} this - */ - set: function(html, compile) { - var me = this; - me.html = html; - me.compiled = null; - return compile ? me.compile() : me; - }, - - compileARe: /\\/g, - compileBRe: /(\r\n|\n)/g, - compileCRe: /'/g, - /** - * Compiles the template into an internal function, eliminating the RegEx overhead. - * @return {Ext.Template} this - * @hide repeat doc - */ - compile: function() { - var me = this, - fm = Ext.String, - useFormat = me.disableFormats !== true, - body, bodyReturn; - - function fn(m, name, format, args) { - if (format && useFormat) { - args = args ? ',' + args: ""; - if (format.substr(0, 5) != "this.") { - format = "fm." + format + '('; - } - else { - format = 'this.' + format.substr(5) + '('; - } - } - else { - args = ''; - format = "(values['" + name + "'] == undefined ? '' : "; - } - return "'," + format + "values['" + name + "']" + args + ") ,'"; - } - - bodyReturn = me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn); - body = "this.compiled = function(values){ return ['" + bodyReturn + "'].join('');};"; - eval(body); - return me; - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) as the first child of el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.core.Element (defaults to undefined) - * @return {HTMLElement/Ext.core.Element} The new node or Element - */ - insertFirst: function(el, values, returnElement) { - return this.doInsert('afterBegin', el, values, returnElement); - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) before el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.core.Element (defaults to undefined) - * @return {HTMLElement/Ext.core.Element} The new node or Element - */ - insertBefore: function(el, values, returnElement) { - return this.doInsert('beforeBegin', el, values, returnElement); - }, - - /** - * Applies the supplied values to the template and inserts the new node(s) after el. - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.core.Element (defaults to undefined) - * @return {HTMLElement/Ext.core.Element} The new node or Element - */ - insertAfter: function(el, values, returnElement) { - return this.doInsert('afterEnd', el, values, returnElement); - }, - - /** - * Applies the supplied <code>values</code> to the template and appends - * the new node(s) to the specified <code>el</code>. - * <p>For example usage {@link #Template see the constructor}.</p> - * @param {Mixed} el The context element - * @param {Object/Array} values - * The template values. Can be an array if the params are numeric (i.e. <code>{0}</code>) - * or an object (i.e. <code>{foo: 'bar'}</code>). - * @param {Boolean} returnElement (optional) true to return an Ext.core.Element (defaults to undefined) - * @return {HTMLElement/Ext.core.Element} The new node or Element - */ - append: function(el, values, returnElement) { - return this.doInsert('beforeEnd', el, values, returnElement); - }, - - doInsert: function(where, el, values, returnEl) { - el = Ext.getDom(el); - var newNode = Ext.core.DomHelper.insertHtml(where, el, this.applyTemplate(values)); - return returnEl ? Ext.get(newNode, true) : newNode; - }, - - /** - * Applies the supplied values to the template and overwrites the content of el with the new node(s). - * @param {Mixed} el The context element - * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) - * @param {Boolean} returnElement (optional) true to return a Ext.core.Element (defaults to undefined) - * @return {HTMLElement/Ext.core.Element} The new node or Element - */ - overwrite: function(el, values, returnElement) { - el = Ext.getDom(el); - el.innerHTML = this.applyTemplate(values); - return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; - } -}, function() { - //FIXME: We have to copy these here at the moment because these methods have been split between Ext.util.Format and Ext.String :/ - Ext.apply(Ext.util.Format, { - ellipsis: Ext.String.ellipsis, - htmlEncode: Ext.String.htmlEncode - }); - - /** - * Alias for {@link #applyTemplate} - * Returns an HTML fragment of this template with the specified <code>values</code> applied. - * @param {Object/Array} values - * The template values. Can be an array if the params are numeric (i.e. <code>{0}</code>) - * or an object (i.e. <code>{foo: 'bar'}</code>). - * @return {String} The HTML fragment - * @member Ext.Template - * @method apply - */ - this.createAlias('apply', 'applyTemplate'); -}); - -/** - * @class Ext.util.CSS - * Utility class for manipulating CSS rules - * @singleton - */ -Ext.define('Ext.util.CSS', function() { - var rules = null; - var doc = document; - - var camelRe = /(-[a-z])/gi; - var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; - - return { - - singleton: true, - - constructor: function() { - this.rules = {}; - this.initialized = false; - }, - - /** - * Creates a stylesheet from a text blob of rules. - * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document. - * @param {String} cssText The text containing the css rules - * @param {String} id An id to add to the stylesheet for later removal - * @return {StyleSheet} - */ - createStyleSheet : function(cssText, id) { - var ss, - head = doc.getElementsByTagName("head")[0], - styleEl = doc.createElement("style"); - - styleEl.setAttribute("type", "text/css"); - if (id) { - styleEl.setAttribute("id", id); - } - - if (Ext.isIE) { - head.appendChild(styleEl); - ss = styleEl.styleSheet; - ss.cssText = cssText; - } else { - try{ - styleEl.appendChild(doc.createTextNode(cssText)); - } catch(e) { - styleEl.cssText = cssText; - } - head.appendChild(styleEl); - ss = styleEl.styleSheet ? styleEl.styleSheet : (styleEl.sheet || doc.styleSheets[doc.styleSheets.length-1]); - } - this.cacheStyleSheet(ss); - return ss; - }, - - /** - * Removes a style or link tag by id - * @param {String} id The id of the tag - */ - removeStyleSheet : function(id) { - var existing = document.getElementById(id); - if (existing) { - existing.parentNode.removeChild(existing); - } - }, - - /** - * Dynamically swaps an existing stylesheet reference for a new one - * @param {String} id The id of an existing link tag to remove - * @param {String} url The href of the new stylesheet to include - */ - swapStyleSheet : function(id, url) { - var doc = document; - this.removeStyleSheet(id); - var ss = doc.createElement("link"); - ss.setAttribute("rel", "stylesheet"); - ss.setAttribute("type", "text/css"); - ss.setAttribute("id", id); - ss.setAttribute("href", url); - doc.getElementsByTagName("head")[0].appendChild(ss); - }, - - /** - * Refresh the rule cache if you have dynamically added stylesheets - * @return {Object} An object (hash) of rules indexed by selector - */ - refreshCache : function() { - return this.getRules(true); - }, - - // private - cacheStyleSheet : function(ss) { - if(!rules){ - rules = {}; - } - try {// try catch for cross domain access issue - var ssRules = ss.cssRules || ss.rules, - selectorText, - i = ssRules.length - 1, - j, - selectors; - - for (; i >= 0; --i) { - selectorText = ssRules[i].selectorText; - if (selectorText) { - - // Split in case there are multiple, comma-delimited selectors - selectorText = selectorText.split(','); - selectors = selectorText.length; - for (j = 0; j < selectors; j++) { - rules[Ext.String.trim(selectorText[j]).toLowerCase()] = ssRules[i]; - } - } - } - } catch(e) {} - }, - - /** - * Gets all css rules for the document - * @param {Boolean} refreshCache true to refresh the internal cache - * @return {Object} An object (hash) of rules indexed by selector - */ - getRules : function(refreshCache) { - if (rules === null || refreshCache) { - rules = {}; - var ds = doc.style... [truncated message content] |
From: <ec...@us...> - 2011-09-21 07:18:15
|
Revision: 21448 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21448&view=rev Author: ecker Date: 2011-09-21 07:18:08 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Added info about external dependencies/license Modified Paths: -------------- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/Manifest.json trunk/qooxdoo-contrib/QxExtJsCharts/trunk/readme.txt Modified: trunk/qooxdoo-contrib/QxExtJsCharts/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/Manifest.json 2011-09-20 04:31:27 UTC (rev 21447) +++ trunk/qooxdoo-contrib/QxExtJsCharts/trunk/Manifest.json 2011-09-21 07:18:08 UTC (rev 21448) @@ -3,7 +3,7 @@ { "name" : "QxExtJsCharts", - "summary" : "ExtJS Charts Integration for Qooxdoo", + "summary" : "ExtJS Charts Integration for qooxdoo", "description" : "Create ExtJS 4 charts in your qooxdoo application.", "homepage" : "http://contrib.qooxdoo.org/project/QxExtJsCharts", Modified: trunk/qooxdoo-contrib/QxExtJsCharts/trunk/readme.txt =================================================================== --- trunk/qooxdoo-contrib/QxExtJsCharts/trunk/readme.txt 2011-09-20 04:31:27 UTC (rev 21447) +++ trunk/qooxdoo-contrib/QxExtJsCharts/trunk/readme.txt 2011-09-21 07:18:08 UTC (rev 21448) @@ -1,16 +1,26 @@ -QxExtJsCharts ExtJS 4 Charting Functionality Integration for Qooxdoo -==================================================================== +== QxExtJsCharts == -A Qooxdoo wrapper for the excellent Charting functionality available with -Senchas ExtJS 4 toolkit (http://www.sencha.com/products/extjs/). +ExtJS 4 Charting Functionality Integration for qooxdoo +A qooxdoo wrapper for the excellent Charting functionality available with +Sencha's ExtJS 4 toolkit (http://www.sencha.com/products/extjs/). + +IMPORTANT: +The ExtJS 4 library code is *not* included with this extension. +Download the ExtJS4 library and extract the following files into the +source/resource/ExtJs4/ folder of this contribution: +ext-all.css, ext-all-debug.js, ext-core-debug.js + The ExtJS 4 charting functions are pure javascript and work on all browsers up from IE6 since they are built on a drawing core with backends for SVG, Canvas and VML. Note that ExtJS is released under the GPLv3 license which puts additional -restrictions on your Applications as oposed to the default GPL/EPL licensing -of Qooxdoo ... Sencha (the makers of ExtJS) will be happy to sell you -a commerctial license if you need this. +restrictions on your Applications as opposed to the default LGPL/EPL licensing +of qooxdoo ... Sencha (the makers of ExtJS) will be happy to sell you +a commercial license if you need this. +IMPORTANT: +For details please consult http://www.sencha.com/products/extjs/license/ + tobi oetiker <to...@oe...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hel...@us...> - 2011-09-20 05:14:36
|
Revision: 21446 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21446&view=rev Author: hellings Date: 2011-09-20 04:31:18 +0000 (Tue, 20 Sep 2011) Log Message: ----------- Added a mutable list plugin. Added Paths: ----------- trunk/qooxdoo-contrib/MutableList/ trunk/qooxdoo-contrib/MutableList/readme.txt trunk/qooxdoo-contrib/MutableList/trunk/ trunk/qooxdoo-contrib/MutableList/trunk/Manifest.json trunk/qooxdoo-contrib/MutableList/trunk/config.json trunk/qooxdoo-contrib/MutableList/trunk/demo/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/Manifest.json trunk/qooxdoo-contrib/MutableList/trunk/demo/default/config.json trunk/qooxdoo-contrib/MutableList/trunk/demo/default/generate.py trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/simulation/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/simulation/DemoSimulation.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/test/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/test/DemoTest.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Appearance.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Color.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Decoration.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Font.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Theme.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/index.html trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/demo/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/demo/test.png trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/script/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/script/mutablelist.demo.js trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/translation/ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/translation/readme.txt trunk/qooxdoo-contrib/MutableList/trunk/generate.py trunk/qooxdoo-contrib/MutableList/trunk/source/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/MutableList.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/__init__.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/test/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/test/DemoTest.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/Appearance.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/Color.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/Decoration.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/Font.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/classic/Theme.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/Appearance.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/Color.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/Decoration.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/Font.js trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/theme/modern/Theme.js trunk/qooxdoo-contrib/MutableList/trunk/source/index.html trunk/qooxdoo-contrib/MutableList/trunk/source/resource/ trunk/qooxdoo-contrib/MutableList/trunk/source/resource/mutablelist/ trunk/qooxdoo-contrib/MutableList/trunk/source/resource/mutablelist/add.png trunk/qooxdoo-contrib/MutableList/trunk/source/resource/mutablelist/del.png trunk/qooxdoo-contrib/MutableList/trunk/source/translation/ trunk/qooxdoo-contrib/MutableList/trunk/source/translation/readme.txt Added: trunk/qooxdoo-contrib/MutableList/readme.txt =================================================================== --- trunk/qooxdoo-contrib/MutableList/readme.txt (rev 0) +++ trunk/qooxdoo-contrib/MutableList/readme.txt 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,6 @@ +MutableList +========================= + +A list along with a text field and some basic operations that allow the +user to input new entries, edit and delete old entries, and that allows +the programmer to retrieve the list of entries. Added: trunk/qooxdoo-contrib/MutableList/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/Manifest.json (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/Manifest.json 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,34 @@ +{ + "info" : + { + "name" : "MutableList", + + "summary" : "MutableList Contribution", + "description" : "List that can be augmented and edited.", + + "homepage" : "http://contrib.qooxdoo.org/project/MutableList", + + "license" : "LGPL/EPL", + "authors" : + [ + { + "name" : "Gregory Hellings", + "email" : "gre...@gm..." + } + ], + + "version" : "trunk", + "qooxdoo-versions": ["1.5"] + }, + + "provides" : + { + "namespace" : "mutablelist", + "encoding" : "utf-8", + "class" : "source/class", + "resource" : "source/resource", + "translation" : "source/translation", + "type" : "contribution" + } +} + Added: trunk/qooxdoo-contrib/MutableList/trunk/config.json =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/config.json (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/config.json 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,78 @@ +{ + "name" : "MutableList", + + "include" : + [ + { + "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" + } + ], + + "export" : + [ + "api", + "api-data", + "clean", + "distclean", + "fix", + "info", + "inspector", + "lint", + "migration", + "pretty", + "test", + "test-source", + "translation" + ], + + "let" : + { + "APPLICATION" : "mutablelist", + "APPLICATION_MAIN_CLASS" : "${APPLICATION}.demo.Demo", + "QOOXDOO_PATH" : "../../qooxdoo/1.5", + //"QXTHEME" : "mutablelist.theme.modern.Theme", + "QXTHEME" : "qx.theme.Modern", + "API_EXCLUDE" : ["qx.test.*", "mutablelist.demo.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"], + "LOCALES" : [ "en" ], + "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache", + "ROOT" : "." + }, + + // You only need to edit the remainder of this file, if you want to customize + // specific jobs, or add own job definitions. + + "jobs" : + { + // Uncomment the following entry to add a contrib or library to your + // project; make sure to adapt the path to the Manifest.json; if you are + // using a contrib: library, it will be downloaded into the path specified + // by the 'cache/downloads' config key + /* + "libraries" : + { + "library" : + [ + { + "manifest" : "contrib://SkeletonApplication/trunk/Manifest.json" + } + ] + } + */ + + // If you want to tweak a job setting, see the following sample where + // the "format" feature of the "build-script" job is overridden. + // To see a list of available jobs, invoke 'generate.py x'. + /* + ,"build-script" : + { + "compile-options" : + { + "code" : + { + "format" : false + } + } + } + */ + } +} Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/Manifest.json (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/Manifest.json 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,34 @@ +{ + "info" : + { + "name" : "MutableList Demo", + + "summary" : "MutableList Demo", + "description" : "This is a skeleton for a qooxdoo contribution demo.", + + "homepage" : "http://demo.qooxdoo.org/contrib/MutableList", + + "license" : "LGPL/EPL", + "authors" : + [ + { + "name" : "First Author (uid)", + "email" : "fir...@so...main" + } + ], + + "version" : "trunk", + "qooxdoo-versions": ["1.5"] + }, + + "provides" : + { + "namespace" : "mutablelist.demo", + "encoding" : "utf-8", + "class" : "source/class", + "resource" : "source/resource", + "translation" : "source/translation", + "type" : "application" + } +} + Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/config.json =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/config.json (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/config.json 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,65 @@ +{ + "name" : "MutableList Demo", + + "include" : + [ + { + "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" + } + ], + + "export" : + [ + "api", + "api-data", + "build", + "clean", + "distclean", + "fix", + "info", + "inspector", + "lint", + "migration", + "pretty", + "profiling", + "source", + "source-all", + "source-hybrid", + "simulation-build", + "simulation-run", + "test", + "test-source", + "translation" + ], + + "default-job" : "source", + + "let" : + { + "APPLICATION" : "mutablelist.demo", + "QOOXDOO_PATH" : "../../../../qooxdoo/1.5", + "QXTHEME" : "mutablelist.demo.theme.Theme", + "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*", "${APPLICATION}.simulation.*"], + "LOCALES" : [ "en" ], + "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache", + "ROOT" : "." + }, + + "config-warnings" : + { + "job-shadowing" : ["libraries"] + }, + + "jobs" : + { + "libraries" : + { + "library" : + [ + { + "manifest" : "../../Manifest.json" + } + ] + } + } +} Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/generate.py =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/generate.py (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/generate.py 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,72 @@ +#!/usr/bin/env python +################################################################################ +# +# qooxdoo - the new era of web development +# +# http://qooxdoo.org +# +# Copyright: +# 2008 - 2010 1&1 Internet AG, Germany, http://www.1und1.de +# +# License: +# LGPL: http://www.gnu.org/licenses/lgpl.html +# EPL: http://www.eclipse.org/org/documents/epl-v10.php +# See the LICENSE file in the project's top-level directory for details. +# +# Authors: +# * Thomas Herchenroeder (thron7) +# +################################################################################ + +## +# This is a stub proxy for the real generator.py +## + +import sys, os, re, subprocess + +CMD_PYTHON = sys.executable +QOOXDOO_PATH = '../../qooxdoo/1.5' + +def getQxPath(): + path = QOOXDOO_PATH + # try updating from config file + if os.path.exists('config.json'): + # "using QOOXDOO_PATH from config.json" + qpathr=re.compile(r'"QOOXDOO_PATH"\s*:\s*"([^"]*)"\s*,?') + conffile = open('config.json') + aconffile = conffile.readlines() + for line in aconffile: + mo = qpathr.search(line) + if mo: + path = mo.group(1) + break # assume first occurrence is ok + path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), path)) + + return path + +os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # switch to skeleton dir +qxpath = getQxPath() +REAL_GENERATOR = os.path.join(qxpath, 'tool', 'bin', 'generator.py') + +if not os.path.exists(REAL_GENERATOR): + print "Cannot find real generator script under: \"%s\"; aborting" % REAL_GENERATOR + sys.exit(1) + +argList = [] +argList.append(CMD_PYTHON) +argList.append(REAL_GENERATOR) +argList.extend(sys.argv[1:]) +if sys.platform == "win32": + argList1=[] + for arg in argList: + if arg.find(' ')>-1: + argList1.append('"%s"' % arg) + else: + argList1.append(arg) + argList = argList1 +else: + argList = ['"%s"' % x for x in argList] # quote argv elements + +cmd = " ".join(argList) +retval = subprocess.call(cmd, shell=True) +sys.exit(retval) Property changes on: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/generate.py ___________________________________________________________________ Added: svn:executable + * Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/Application.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,75 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/* ************************************************************************ + +#asset(mutablelist/demo/*) + +************************************************************************ */ + +/** + * This is the main application class of your custom application "mutablelist" + */ +qx.Class.define("mutablelist.demo.Application", +{ + extend : qx.application.Standalone, + + + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : + { + /** + * This method contains the initial application code and gets called + * during startup of the application + * + * @lint ignoreDeprecated(alert) + */ + main : function() + { + // Call super class + this.base(arguments); + + // Enable logging in debug variant + if (qx.core.Environment.get("qx.debug")) + { + // support native logging capabilities, e.g. Firebug for Firefox + qx.log.appender.Native; + // support additional cross-browser console. Press F7 to toggle visibility + qx.log.appender.Console; + } + + /* + ------------------------------------------------------------------------- + Below is your actual application code... + ------------------------------------------------------------------------- + */ + + // Create a button + var button1 = new mutablelist.Contribution("First Contribution", "mutablelist/test.png"); + + // Document is the application root + var doc = this.getRoot(); + + // Add button to document at fixed coordinates + doc.add(button1, {left: 100, top: 50}); + + // Add an event listener + button1.addListener("execute", function(e) { + alert("Hello World!"); + }); + } + } +}); Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/simulation/DemoSimulation.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/simulation/DemoSimulation.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/simulation/DemoSimulation.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,44 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define simulated interaction tests for your + * application. See the manual for details: + * {@link http://manual.qooxdoo.org/1.5/pages/development/simulator.html} + * + * @lint ignoreUndefined(simulator) + */ +qx.Class.define("mutablelist.demo.simulation.DemoSimulation", { + + extend : simulator.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** Check if a widget is present (part of the DOM) */ + testButtonPresent : function() + { + this.assertNotNull(this.getSimulation().getWidgetOrNull("qxh=qx.ui.form.Button"), "Button widget not present!"); + }, + + /** Click a button and check if an alert box pops up */ + testButtonClick : function() + { + this.getQxSelenium().qxClick("qxh=qx.ui.form.Button"); + this.assertEquals("true", String(this.getQxSelenium().isAlertPresent())); + } + } + +}); Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/test/DemoTest.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/test/DemoTest.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/test/DemoTest.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,55 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define unit tests for your application. + * + * Execute <code>generate.py test</code> to generate a testrunner application + * and open it from <tt>test/index.html</tt> + * + * The methods that contain the tests are instance methods with a + * <code>test</code> prefix. You can create an arbitrary number of test + * classes like this one. They can be organized in a regular class hierarchy, + * i.e. using deeper namespaces and a corresponding file structure within the + * <tt>test</tt> folder. + */ +qx.Class.define("mutablelist.demo.test.DemoTest", +{ + extend : qx.dev.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** + * Here are some simple tests + */ + testSimple : function() + { + this.assertEquals(4, 3+1, "This should never fail!"); + this.assertFalse(false, "Can false be true?!"); + }, + + /** + * Here are some more advanced tests + */ + testAdvanced: function () + { + var a = 3; + var b = a; + this.assertIdentical(a, b, "A rose by any other name is still a rose"); + this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!"); + } + } +}); Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Appearance.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Appearance.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Appearance.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("mutablelist.demo.theme.Appearance", +{ + extend : qx.theme.modern.Appearance, + + appearances : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Color.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Color.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Color.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("mutablelist.demo.theme.Color", +{ + extend : qx.theme.modern.Color, + + colors : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Decoration.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Decoration.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("mutablelist.demo.theme.Decoration", +{ + extend : qx.theme.modern.Decoration, + + decorations : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Font.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Font.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Font.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("mutablelist.demo.theme.Font", +{ + extend : qx.theme.modern.Font, + + fonts : + { + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Theme.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Theme.js (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/class/mutablelist/demo/theme/Theme.js 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,21 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("mutablelist.demo.theme.Theme", +{ + meta : + { + color : mutablelist.demo.theme.Color, + decoration : mutablelist.demo.theme.Decoration, + font : mutablelist.demo.theme.Font, + icon : qx.theme.icon.Tango, + appearance : mutablelist.demo.theme.Appearance + } +}); \ No newline at end of file Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/index.html =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/index.html (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/index.html 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>MutableList</title> + <script type="text/javascript" src="script/mutablelist.demo.js"></script> +</head> +<body></body> +</html> Added: trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/demo/test.png =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/demo/test.png (rev 0) +++ trunk/qooxdoo-contrib/MutableList/trunk/demo/default/source/resource/mutablelist/demo/test.png 2011-09-20 04:31:18 UTC (rev 21446) @@ -0,0 +1,24 @@ +\x89PNG + + |
From: <hel...@us...> - 2011-09-20 05:14:29
|
Revision: 21447 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21447&view=rev Author: hellings Date: 2011-09-20 04:31:27 +0000 (Tue, 20 Sep 2011) Log Message: ----------- Updated copyright. Modified Paths: -------------- trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/MutableList.js Modified: trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/MutableList.js =================================================================== --- trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/MutableList.js 2011-09-20 04:31:18 UTC (rev 21446) +++ trunk/qooxdoo-contrib/MutableList/trunk/source/class/mutablelist/MutableList.js 2011-09-20 04:31:27 UTC (rev 21447) @@ -1,7 +1,7 @@ /* ************************************************************************ Copyright: - 2009 Gregory Hellings, http://greg.thehellings.com + 2011 Gregory Hellings, http://greg.thehellings.com License: LGPL: http://www.gnu.org/licenses/lgpl.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-16 23:53:43
|
Revision: 21445 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21445&view=rev Author: derrell Date: 2011-09-16 23:53:36 +0000 (Fri, 16 Sep 2011) Log Message: ----------- Work within max length allowed with any single blob fetch Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:51:24 UTC (rev 21444) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-16 23:53:36 UTC (rev 21445) @@ -619,7 +619,8 @@ printWriter = new PrintWriter(Channels.newWriter(writeChannel, "UTF8")); // Write our blob data as a series of 32k writes - printWriter.write(segment); + printWriter.write(blobData); + printWriter.close(); // Finalize the channel writeChannel.closeFinally(); @@ -649,6 +650,10 @@ var blobInfoFactory; var blobInfo; var size; + var maxFetchSize; + var segmentSize; + var startIndex; + var endIndex; var BlobstoreService; var BlobstoreServiceFactory; var BlobKey; @@ -673,10 +678,33 @@ size = blobInfo.getSize(); // Retrieve the blob - blob = blobstoreService.fetchData(blobKey, 0, size); + blob = []; + maxFetchSize = 1015808; + startIndex = 0; + while (size > 0) + { + // Determine how much to fetch. Use largest available size within limit. + segmentSize = Math.min(size, maxFetchSize); + endIndex = startIndex + segmentSize - 1; + + // Fetch a blob segment and convert it to a Java string. + blob.push( + String( + new java.lang.String( + blobstoreService.fetchData(blobKey, startIndex, endIndex)))); + + // Update our start index for next time + startIndex += segmentSize; + + // We've used up a bunch of the blob. Update remaining size. + size -= segmentSize; + } + // Join all of the parts together. + blob = blob.join(""); + // Give 'em what they came for - return String(blob); + return blob; }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-15 17:51:33
|
Revision: 21444 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21444&view=rev Author: derrell Date: 2011-09-15 17:51:24 +0000 (Thu, 15 Sep 2011) Log Message: ----------- Pass proper length to blob fetchData; convert blob result to JavaScript String Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:51:09 UTC (rev 21443) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:51:24 UTC (rev 21444) @@ -619,19 +619,7 @@ printWriter = new PrintWriter(Channels.newWriter(writeChannel, "UTF8")); // Write our blob data as a series of 32k writes - segmentSize = blobData.length; - while (blobData.length > 0) - { - // Get the first segmentSize of the remaining blob data - segment = blobData.substring(0, segmentSize); - - // Write it out - printWriter.write(segment); - - // Strip off that first segmentSize so we're ready for the next - // iteration - blobData = blobData.substring(segmentSize); - } + printWriter.write(segment); // Finalize the channel writeChannel.closeFinally(); @@ -658,12 +646,20 @@ var blob; var blobstoreService; var blobKey; + var blobInfoFactory; + var blobInfo; + var size; + var BlobstoreService; var BlobstoreServiceFactory; var BlobKey; + var BlobInfoFactory; + BlobstoreService = + Packages.com.google.appengine.api.blobstore.BlobstoreService; BlobstoreServiceFactory = Packages.com.google.appengine.api.blobstore.BlobstoreServiceFactory; BlobKey = Packages.com.google.appengine.api.blobstore.BlobKey; + BlobInfoFactory = com.google.appengine.api.blobstore.BlobInfoFactory; // Get a blobstore service blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); @@ -671,12 +667,16 @@ // Convert the (string) blobId to a blob key blobKey = new BlobKey(blobId); + // Load the information about this blob + blobInfoFactory = new BlobInfoFactory(); + blobInfo = blobInfoFactory.loadBlobInfo(blobKey); + size = blobInfo.getSize(); + // Retrieve the blob - blob = blobstoreService.fetchData(blobKey, 0, - BlobstoreService.MAX_BLOB_FETCH_SIZE); + blob = blobstoreService.fetchData(blobKey, 0, size); // Give 'em what they came for - return blob; + return String(blob); }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-15 17:51:18
|
Revision: 21443 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21443&view=rev Author: derrell Date: 2011-09-15 17:51:09 +0000 (Thu, 15 Sep 2011) Log Message: ----------- Be sure returned types are JavaScript types (especially a blob id) Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:50:55 UTC (rev 21442) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:51:09 UTC (rev 21443) @@ -299,10 +299,10 @@ { case "String": case "Date": - return(String(value)); + return value ? String(value) : null; case "LongString": - return value ? String(value.getValue()) : value; + return value ? String(value.getValue()) : null; case "Key": case "Integer": @@ -640,7 +640,7 @@ key = fileService.getBlobKey(file).getKeyString(); // Give 'em the blob id - return key; + return String(key); }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-15 17:51:01
|
Revision: 21442 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21442&view=rev Author: derrell Date: 2011-09-15 17:50:55 +0000 (Thu, 15 Sep 2011) Log Message: ----------- Added blob API to Entity and both sim and appengine backends Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/sim/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:50:34 UTC (rev 21441) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-15 17:50:55 UTC (rev 21442) @@ -573,6 +573,138 @@ // Remove this entity from the database datastore = Datastore.DatastoreServiceFactory.getDatastoreService(); datastore["delete"](dbKey); + }, + + /** + * Add a blob to the database. + * + * @param blobData {LongString} + * The data to be written as a blob + * + * @return {String} + * The blob ID of the just-added blob + * + * @throws {Error} + * If an error occurs while writing the blob to the database, an Error + * is thrown. + */ + putBlob : function(blobData) + { + var key; + var file; + var fileService; + var writeChannel; + var printWriter; + var segment; + var segmentSize; + var FileServiceFactory; + var Channels; + var PrintWriter; + + FileServiceFactory = + Packages.com.google.appengine.api.files.FileServiceFactory; + Channels = java.nio.channels.Channels; + PrintWriter = java.io.PrintWriter; + + // Get a file service + fileService = FileServiceFactory.getFileService(); + + // Create a new blob file with mime type "text/plain" + file = fileService.createNewBlobFile("text/plain"); + + // Open a write channel, with lock=true so we can finalize it + writeChannel = fileService.openWriteChannel(file, true); + + // Get a print writer for this channel, so we can write a string + printWriter = new PrintWriter(Channels.newWriter(writeChannel, "UTF8")); + + // Write our blob data as a series of 32k writes + segmentSize = blobData.length; + while (blobData.length > 0) + { + // Get the first segmentSize of the remaining blob data + segment = blobData.substring(0, segmentSize); + + // Write it out + printWriter.write(segment); + + // Strip off that first segmentSize so we're ready for the next + // iteration + blobData = blobData.substring(segmentSize); + } + + // Finalize the channel + writeChannel.closeFinally(); + + // Retrieve the blob key for this file + key = fileService.getBlobKey(file).getKeyString(); + + // Give 'em the blob id + return key; + }, + + /** + * Retrieve a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be retrieved + * + * @return {LongString} + * The blob data retrieved from the database. If there is no blob with + * the given ID, undefined is returned. + */ + getBlob : function(blobId) + { + var blob; + var blobstoreService; + var blobKey; + var BlobstoreServiceFactory; + var BlobKey; + + BlobstoreServiceFactory = + Packages.com.google.appengine.api.blobstore.BlobstoreServiceFactory; + BlobKey = Packages.com.google.appengine.api.blobstore.BlobKey; + + // Get a blobstore service + blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); + + // Convert the (string) blobId to a blob key + blobKey = new BlobKey(blobId); + + // Retrieve the blob + blob = blobstoreService.fetchData(blobKey, 0, + BlobstoreService.MAX_BLOB_FETCH_SIZE); + + // Give 'em what they came for + return blob; + }, + + /** + * Remove a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be removed. If the specified blob id does + * not exist, this request fails silently. + */ + removeBlob : function(blobId) + { + var blobstoreService; + var blobKey; + var BlobstoreServiceFactory; + var BlobKey; + + BlobstoreServiceFactory = + Packages.com.google.appengine.api.blobstore.BlobstoreServiceFactory; + BlobKey = Packages.com.google.appengine.api.blobstore.BlobKey; + + // Get a blobstore service + blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); + + // Convert the (string) blobId to a blob key + blobKey = new BlobKey(blobId); + + // Delete the blob + blobstoreService["delete"](blobKey); } }, Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-09-15 17:50:34 UTC (rev 21441) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-09-15 17:50:55 UTC (rev 21442) @@ -357,7 +357,67 @@ // that is being used. }, + /** + * Add a blob to the database. + * + * @param blobData {LongString} + * The data to be written as a blob + * + * @return {Key} + * The blob ID of the just-added blob + * + * @throws {Error} + * If an error occurs while writing the blob to the database, an Error + * is thrown. + */ + putBlob : function(blobData) + { + // This is a temporary place holder. + // + // This method is replaced by the putBlob method of the specific + // database that is being used. + }, + + + /** + * Retrieve a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be retrieved + * + * @return {LongString} + * The blob data retrieved from the database. If there is no blob with + * the given ID, undefined is returned. + */ + getBlob : function(entity) + { + // This is a temporary place holder. + // + // This method is replaced by the getBlob method of the specific + // database that is being used. + }, + + + /** + * Remove a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be removed. If the specified blob id does + * not exist, this request fails silently. + */ + removeBlob : function(entity) + { + // This is a temporary place holder. + // + // This method is replaced by the removeBlob method of the specific + // database that is being used. + }, + + + + + /** * Register functions which are specific to a certain database interface * * @param query {Function} @@ -371,13 +431,29 @@ * @param remove {Function} * The database-specific function to be used to remove an entry from the * database. It must provide the signature of {@link __remove}. + * + * @param getBlob {Function} + * The database-specific function to be used to retrieve a blob from the + * database. It must provide the signature of {@link __getBlob}. + * + * @param putBlob {Function} + * The database-specific function to be used to write a blob to the + * database. It must provide the signature of {@link __putBlob}. + * + * @param removeBlob {Function} + * The database-specific function to be used to remove a blob from the + * database. It must provide the signature of {@link __removeBlob}. */ - registerDatabaseProvider : function(query, put, remove) + registerDatabaseProvider : function(query, put, remove, + getBlob, putBlob, removeBlob) { // Save the specified functions. rpcjs.dbif.Entity.query = query; rpcjs.dbif.Entity.__put = put; rpcjs.dbif.Entity.__remove = remove; + rpcjs.dbif.Entity.getBlob = getBlob; + rpcjs.dbif.Entity.putBlob = putBlob; + rpcjs.dbif.Entity.removeBlob = removeBlob; } }, Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/sim/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/sim/Dbif.js 2011-09-15 17:50:34 UTC (rev 21441) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/sim/Dbif.js 2011-09-15 17:50:55 UTC (rev 21442) @@ -38,6 +38,9 @@ /** The default database. See {@link setDb}. */ Database : null, + /** The database map entry to use for blobs */ + BlobStorage : "**BLOB**", + /** * The next value to use for an auto-generated key for an entity */ @@ -551,6 +554,94 @@ qx.Bootstrap.debug("Writing DB to Web Storage"); localStorage.simDB = qx.lang.Json.stringify(rpcjs.sim.Dbif.Database); } + }, + + /** + * Add a blob to the database. + * + * @param blobData {LongString} + * The data to be written as a blob + * + * @return {String} + * The blob ID of the just-added blob + * + * @throws {Error} + * If an error occurs while writing the blob to the database, an Error + * is thrown. + */ + putBlob : function(blobData) + { + var blobStorage = rpcjs.sim.Dbif.BlobStorage; + var Db = rpcjs.sim.Dbif.Database; + var key; + + // If there's no blob storage yet... + if (! Db[blobStorage]) + { + // ... then create it. + Db[blobStorage] = {}; + } + + // Retrieve the next id value to use as this blob id + key = rpcjs.sim.Dbif.__nextKey++; + + // Convert it to a string, to allow consistency with other backends + key = key + ""; + + // Store the blob + Db[blobStorage][key] = blobData; + + // Give 'em the blob id + return key; + }, + + /** + * Retrieve a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be retrieved + * + * @return {LongString} + * The blob data retrieved from the database. If there is no blob with + * the given ID, undefined is returned. + */ + getBlob : function(blobId) + { + var blobStorage = rpcjs.sim.Dbif.BlobStorage; + var Db = rpcjs.sim.Dbif.Database; + + // Is there any blob storage? + if (! Db[blobStorage]) + { + // Nope. The blob must not exist. Not found. + return undefined; + } + + // Return the specified blob (or undefined, if it's not there). + return Db[blobStorage][blobId]; + }, + + /** + * Remove a blob from the database + * + * @param blobId {Key} + * The blob ID of the blob to be removed. If the specified blob id does + * not exist, this request fails silently. + */ + removeBlob : function(blobId) + { + var blobStorage = rpcjs.sim.Dbif.BlobStorage; + var Db = rpcjs.sim.Dbif.Database; + + // Is there any blob storage? + if (! Db[blobStorage]) + { + // Nope. The blob must not exist. + return; + } + + // Delete the specified blob + delete Db[blobStorage][blobId]; } }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-15 17:50:41
|
Revision: 21441 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21441&view=rev Author: derrell Date: 2011-09-15 17:50:34 +0000 (Thu, 15 Sep 2011) Log Message: ----------- Completed API documentation for rpcjs.dbif.Entity 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-09-13 06:40:39 UTC (rev 21440) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/dbif/Entity.js 2011-09-15 17:50:34 UTC (rev 21441) @@ -7,11 +7,27 @@ * EPL : http://www.eclipse.org/org/documents/epl-v10.php */ +/** + * The abstract base class from which all concrete entities descend. + */ qx.Class.define("rpcjs.dbif.Entity", { extend : qx.core.Object, type : "abstract", + /** + * Constructor for an Entity. + * + * @param entityType {String} + * The name of this type of entity. It is used during normal operation to + * retrieve the property types available for this entity. + * + * @param entityKey {String|Integer|Array} + * If the entity key is a single field, this must be a string or integer + * specifying that key value. If the entity key is composite, i.e., it is + * made up of a series of fields, then this must be an array containing + * the string or integer values of each of the fields in the key. + */ construct : function(entityType, entityKey) { var i; @@ -129,7 +145,10 @@ /** * The property name that is to be used as the database entity key (aka - * primary key). + * primary key). If the key is composite, i.e., composed of more than one + * property, than this 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. */ entityKeyProperty : { @@ -145,10 +164,11 @@ nullable : false }, - /* + /** * The unique id to be used as the database entity key (aka primary key), * if no other property has been designated in entityKeyProperty as the - * primary key. + * primary key. The actual value is determined by the specific database + * interface in use, so this may be either an integer or a string. */ uid : { @@ -166,7 +186,22 @@ propertyTypes : {}, - /** Register an entity type */ + /** + * Register an entity type. This is called by each subclass, immediately + * upon loading the subclass (typically in its defer: function), in order + * to register that subclass' entity type name to correspond with that + * subclass' class name. + * + * Each subclass of rpcjs.dbif.Entity represents a particular object type, + * and is identified by its class name and by its (shorter) entityType. + * + * @param classname {String} + * The class name of the concrete subclass of rpcjs.dbif.Entity being + * registered. + * + * @param entityType {String} + * The short entity type name of the subclass being registered. + */ registerEntityType : function(classname, entityType) { // Save this value in the map from classname to entity type @@ -174,7 +209,31 @@ }, - /** Register the property types for an entity class */ + /** + * Register the property types for an entity class. This is called by each + * subclass, immediately upon loading the subclass (typically in its + * defer: function), in order to register the names of the properties + * (fields) that are stored for each object of this type. + * + * @param entityType {String} + * The entity type name (as was passed to registerEntityType()), which + * uniquely identifies this subclass of rpcjs.dbif.Entity. + * + * @param propertyTypes {Map} + * A map containing, as its member names, the name of each of the + * properties (fields) to be stored for each object of this type. The + * value corresponding to each of those member names is the type of + * value to be stored in that property, and may be any of: "String", + * "LongString", "Date", "Key", "Integer", "Float", "KeyArray", + * "StringArray", "LongStringArray", or "NumberArray". + * + * @param keyField {String|Array} + * The name of the property that is to be used as the key field. If the + * key is composite, i.e., composed of more than one property, than this + * 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. + */ registerPropertyTypes : function(entityType, propertyTypes, keyField) { // If there's no key field name specified... @@ -284,7 +343,35 @@ }, - /** Register a put and query function, specific to a database */ + /** + * Remove an entity from the database + * + * @param entity {rpcjs.dbif.Entity} + * An instance of the entity to be removed. + */ + __remove : function(entity) + { + // This is a temporary place holder. + // + // This method is replaced by the remove method of the specific database + // that is being used. + }, + + /** + * Register functions which are specific to a certain database interface + * + * @param query {Function} + * The database-specific function to be used to query the database. It + * must provide the signature of {@link query}. + * + * @param put {Function} + * The database-specific function to be used to write an entry to the + * database. It must provide the signature of {@link __put}. + * + * @param remove {Function} + * The database-specific function to be used to remove an entry from the + * database. It must provide the signature of {@link __remove}. + */ registerDatabaseProvider : function(query, put, remove) { // Save the specified functions. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-13 06:40:46
|
Revision: 21440 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21440&view=rev Author: spackers Date: 2011-09-13 06:40:39 +0000 (Tue, 13 Sep 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/Aristo/trunk/Manifest.json trunk/qooxdoo-contrib/Aristo/trunk/source/class/aristo/theme/Decoration.js Modified: trunk/qooxdoo-contrib/Aristo/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/Aristo/trunk/Manifest.json 2011-09-09 06:37:29 UTC (rev 21439) +++ trunk/qooxdoo-contrib/Aristo/trunk/Manifest.json 2011-09-13 06:40:39 UTC (rev 21440) @@ -26,7 +26,7 @@ ], "version" : "trunk", - "qooxdoo-versions": ["1.3"] + "qooxdoo-versions": ["1.5"] }, "provides" : Modified: trunk/qooxdoo-contrib/Aristo/trunk/source/class/aristo/theme/Decoration.js =================================================================== --- trunk/qooxdoo-contrib/Aristo/trunk/source/class/aristo/theme/Decoration.js 2011-09-09 06:37:29 UTC (rev 21439) +++ trunk/qooxdoo-contrib/Aristo/trunk/source/class/aristo/theme/Decoration.js 2011-09-13 06:40:39 UTC (rev 21440) @@ -562,7 +562,8 @@ { /*backgroundImage : "aristo/decoration/menu/background.png", backgroundRepeat : "scale",*/ - backgroundColor: "background-menu" + backgroundColor: "background-menu", + width: 1 /* width:1 is required or the popup will overlap the mouse and be immediately closed (as of Qx1.5)*/ /*width : 1, color : "border-main", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <d_w...@us...> - 2011-09-09 06:37:36
|
Revision: 21439 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21439&view=rev Author: d_wagner Date: 2011-09-09 06:37:29 +0000 (Fri, 09 Sep 2011) Log Message: ----------- Use warning log level if the AUT error log couldn't be accessed Modified Paths: -------------- trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/testrunner2/test_testrunner2.js trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/testrunner2/test_testrunner2.js Modified: trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/testrunner2/test_testrunner2.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/testrunner2/test_testrunner2.js 2011-09-08 11:53:04 UTC (rev 21438) +++ trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/testrunner2/test_testrunner2.js 2011-09-09 06:37:29 UTC (rev 21439) @@ -205,7 +205,7 @@ autErrors = String(this.__sel.getEval(selWin + ".qx.Simulation.getAutErrors()")); } catch(ex) { - this.log("Couldn't get AUT errors " + ex.message, "error"); + this.log("Couldn't get AUT errors " + ex.message, "warn"); return; } Modified: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/testrunner2/test_testrunner2.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/testrunner2/test_testrunner2.js 2011-09-08 11:53:04 UTC (rev 21438) +++ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/testrunner2/test_testrunner2.js 2011-09-09 06:37:29 UTC (rev 21439) @@ -205,7 +205,7 @@ autErrors = String(this.__sel.getEval(selWin + ".qx.Simulation.getAutErrors()")); } catch(ex) { - this.log("Couldn't get AUT errors " + ex.message, "error"); + this.log("Couldn't get AUT errors " + ex.message, "warn"); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oe...@us...> - 2011-09-08 11:53:14
|
Revision: 21438 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21438&view=rev Author: oetiker Date: 2011-09-08 11:53:04 +0000 (Thu, 08 Sep 2011) Log Message: ----------- update to latest jqplot and make qooxdoo 1.5 aware Modified Paths: -------------- trunk/qooxdoo-contrib/QxJqPlot/trunk/Manifest.json trunk/qooxdoo-contrib/QxJqPlot/trunk/config.json trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/Manifest.json trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/config.json trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/generate.py trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/source/class/qxjqplot/demo/Application.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/class/qxjqplot/Plot.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/MIT-LICENSE.txt trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/README.txt trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/changes.txt trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/copyright.txt trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.jqplot.css trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.jqplot.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.jqplot.min.css trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.jqplot.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.BezierCurveRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.BezierCurveRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.barRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.barRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.blockRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.blockRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.bubbleRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.bubbleRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasAxisTickRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasTextRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasTextRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.categoryAxisRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.ciParser.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.ciParser.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.cursor.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.cursor.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.dateAxisRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.dateAxisRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.donutRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.donutRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.dragable.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.dragable.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.enhancedLegendRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.enhancedLegendRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.funnelRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.funnelRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.highlighter.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.highlighter.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.json2.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.logAxisRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.logAxisRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.mekkoAxisRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.mekkoAxisRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.mekkoRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.mekkoRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.meterGaugeRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.meterGaugeRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.ohlcRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.ohlcRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.pieRenderer.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.pieRenderer.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.pointLabels.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.pointLabels.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.trendline.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.trendline.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/usage.txt Added Paths: ----------- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasOverlay.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/plugins/jqplot.canvasOverlay.min.js Removed Paths: ------------- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery-1.4.1.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery-1.4.2.min.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery-1.4.3.js trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/jquery-1.4.3.min.js Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/Manifest.json 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/Manifest.json 2011-09-08 11:53:04 UTC (rev 21438) @@ -18,7 +18,7 @@ ], "version" : "trunk", - "qooxdoo-versions": ["1.4"] + "qooxdoo-versions": ["1.4","1.5"] }, "provides" : Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/config.json =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/config.json 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/config.json 2011-09-08 11:53:04 UTC (rev 21438) @@ -28,7 +28,7 @@ { "APPLICATION" : "qxjqplot", "APPLICATION_MAIN_CLASS" : "${APPLICATION}.demo.Demo", - "QOOXDOO_PATH" : "../../qooxdoo/1.4", + "QOOXDOO_PATH" : "../../qooxdoo/1.5", "QXTHEME" : "qx.theme.Modern", "API_EXCLUDE" : ["qx.test.*", "qxjqplot.demo.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"], "LOCALES" : [ "en" ], Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/Manifest.json 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/Manifest.json 2011-09-08 11:53:04 UTC (rev 21438) @@ -18,7 +18,7 @@ ], "version" : "trunk", - "qooxdoo-versions": ["1.4"] + "qooxdoo-versions": ["1.4","1.5"] }, "provides" : Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/config.json =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/config.json 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/config.json 2011-09-08 11:53:04 UTC (rev 21438) @@ -31,7 +31,7 @@ "let" : { "APPLICATION" : "qxjqplot.demo", - "QOOXDOO_PATH" : "../../../../qooxdoo/1.4", + "QOOXDOO_PATH" : "../../../../qooxdoo/1.5", "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"], "LOCALES" : [ "en" ], "CACHE" : "${TMPDIR}/qooxoo-cache", Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/generate.py =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/generate.py 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/generate.py 2011-09-08 11:53:04 UTC (rev 21438) @@ -25,7 +25,7 @@ import sys, os, re, subprocess CMD_PYTHON = 'python' -QOOXDOO_PATH = '../../qooxdoo/1.4' +QOOXDOO_PATH = '../../qooxdoo/1.5' def getQxPath(): path = QOOXDOO_PATH Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/source/class/qxjqplot/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/source/class/qxjqplot/demo/Application.js 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/demo/default/source/class/qxjqplot/demo/Application.js 2011-09-08 11:53:04 UTC (rev 21438) @@ -22,7 +22,7 @@ title:'Data Point Highlighting with Trendline', seriesDefaults: { trendline: { - show: true + show: true } }, highlighter: { @@ -55,7 +55,7 @@ } }}, plugins: ['highlighter','dragable', - 'dateAxisRenderer','trendline', + 'dateAxisRenderer', 'trendline', 'cursor' ] },{ @@ -65,13 +65,15 @@ [4, 25, 13, 22, 14, 17, 15]], options: { legend:{show:true}, + seriesDefault: {}, title:'Mixed Data Input Formats', series:[ {label:'Rising line', showLine:false, markerOptions:{style:'square'}}, {label:'Declining line'}, {label:'Zig Zag Line', lineWidth:5, showMarker:false} ] - } + }, + plugins: [] },{ title: 'Unit Revenues: Acme Traps Division', data: [ Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/class/qxjqplot/Plot.js =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/class/qxjqplot/Plot.js 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/class/qxjqplot/Plot.js 2011-09-08 11:53:04 UTC (rev 21438) @@ -2,7 +2,7 @@ Copyright: 2010 OETIKER+PARTNER AG, Tobi Oetiker, http://www.oetiker.ch - + License: LGPL: http://www.gnu.org/licenses/lgpl.html EPL: http://www.eclipse.org/org/documents/epl-v10.php @@ -16,6 +16,8 @@ /* ************************************************************************ #asset(jqPlot/*) +#ignore(jQuery) +#ignore(jQuery.jqplot.config) ************************************************************************ */ @@ -26,14 +28,14 @@ * for information on how to use jqPlot. * * <pre class='javascript'> - * var data = [[['frogs',3], ['buzzards',7], ['deer',2.5], ['turkeys',6], ['moles',5], ['ground hogs',4]]], - * var options = function($jqplot){return{ - * title: 'Pie Chart with Legend and sliceMargin', - * seriesDefaults:{renderer:$jqplot.PieRenderer, rendererOptions:{sliceMargin:8}}, - * legend:{show:true} - * }}; - * var plugins = ['pieRenderer']; - * var plot = new qxjqplot.Plot(data,options,plugins); + * var data = [[['frogs',3], ['buzzards',7], ['deer',2.5], ['turkeys',6], ['moles',5], ['ground hogs',4]]], + * var options = function($jqplot){return{ + * title: 'Pie Chart with Legend and sliceMargin', + * seriesDefaults:{renderer:$jqplot.PieRenderer, rendererOptions:{sliceMargin:8}}, + * legend:{show:true} + * }}; + * var plugins = ['pieRenderer']; + * var plot = new qxjqplot.Plot(data,options,plugins); * </pre> */ qx.Class.define("qxjqplot.Plot", { @@ -49,7 +51,7 @@ construct: function(dataSeries,getOptions,pluginArr){ this.base(arguments); var min = '.min'; - if (qx.core.Environment.get("qx.debug") == "on") { + if (qx.core.Environment.get("qx.debug")) { min = ''; } /* I guess it would not be all that difficult to create a stripped @@ -57,7 +59,7 @@ * this instead of full jQuery. */ var codeArr = [ - "jquery-1.4.3"+min+".js", + "jquery"+min+".js", "jquery.jqplot"+min+".js" ]; @@ -76,7 +78,7 @@ this.__addCss("jquery.jqplot"+min+".css"); this.__loadScriptArr(codeArr,qx.lang.Function.bind(this.__addCanvas,this,dataSeries,getOptions)); }, - statics : { + statics : { INSTANCE_COUNTER : 0, /** * map of loaded scripts @@ -96,7 +98,7 @@ '#ff811b', '#007333', '#ffe370', '#a6004f', '#a6004f', '#bde734', '#0094d8', '#ffbedd' ], - grid: { + grid: { background: '#ffffff' }, seriesDefaults: { @@ -117,17 +119,17 @@ */ scriptLoaded: 'qx.event.type.Event' }, - members : { - __useExCanvas: false, + members : { + __useExCanvas: false, /** * Once the jqPlot object has been created, returns a handle to the plot object * use the plotCreated to learn when the plot gets created. - * + * * @return {jqPlotObject} */ getPlotObject: function(){ return this.__plotObject; - }, + }, /** * Chain loading scripts. */ @@ -178,12 +180,10 @@ }, /** * our copy of the plot object - */ + */ __plotObject: null, /** * Create the canvas once everything is renderad - * - * @lint ignoreUndefined(jQuery) */ __addCanvas: function(dataSeries,getOptions){ var el = this.getContentElement().getDomElement(); @@ -200,12 +200,12 @@ } var id = 'jqPlotId'+(qxjqplot.Plot.INSTANCE_COUNTER++); - qx.bom.element.Attribute.set(el, 'id', id); - + qx.bom.element.Attribute.set(el, 'id', id); + var options = qx.lang.Type.isFunction(getOptions) ? getOptions(jQuery.jqplot) : getOptions; qx.lang.Object.mergeWith(options,qxjqplot.Plot.DEFAULT_OPTIONS,false); - jQuery.jqplot.config.enablePlugins = false; - var plot = this.__plotObject = jQuery.jqplot(id,dataSeries,options); + jQuery.jqplot.config.enablePlugins = false; + var plot = this.__plotObject = jQuery.jqplot(id,dataSeries,options); this.fireDataEvent('plotCreated', plot); this.addListener('resize',qx.lang.Function.bind(this.__redraw,this,plot,id,dataSeries,options),this); } @@ -214,7 +214,7 @@ // with out .flush() the plot div will not yet be // resized, causing the jqPlot not to render // properly - qx.html.Element.flush(); + qx.html.Element.flush(); if (!this.isSeeable()){ // // jqplot does not take kindely to being redrawn while not visible return; @@ -223,11 +223,11 @@ // it could be that others have been added since the last round // so we have to run the preInitHooks again or some plugins might // try to access non accessible structures - //for (var i=0; i<jQuery.jqplot.preInitHooks.length; i++) { - // jQuery.jqplot.preInitHooks[i].call(plot, id, dataSeries, options); - //} +// for (var i=0; i<jQuery.jqplot.preInitHooks.length; i++) { +// jQuery.jqplot.preInitHooks[i].call(plot, id, dataSeries, options); +// } plot.replot({ -// resetAxes: true + resetAxes: true }); } } Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/MIT-LICENSE.txt =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/MIT-LICENSE.txt 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/MIT-LICENSE.txt 2011-09-08 11:53:04 UTC (rev 21438) @@ -1,6 +1,6 @@ Title: MIT License -Copyright (c) 2009 - 2010 Chris Leonello +Copyright (c) 2009-2011 Chris Leonello Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/README.txt =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/README.txt 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/README.txt 2011-09-08 11:53:04 UTC (rev 21438) @@ -2,36 +2,6 @@ Pure JavaScript plotting plugin for jQuery. -Copyright (c) 2009 - 2010 Chris Leonello -jqPlot is currently available for use in all personal or commercial projects -under both the MIT and GPL version 2.0 licenses. This means that you can -choose the license that best suits your project and use it accordingly. - -Although not required, the author would appreciate an email letting him -know of any substantial use of jqPlot. You can reach the author at: -chris at jqplot or see http://www.jqplot.com/info.php . - -If you are feeling kind and generous, consider supporting the project by -making a donation at: http://www.jqplot.com/donate.php . - -jqPlot includes date instance methods and printf/sprintf functions by other authors: - -Date instance methods: - - author Ken Snyder (ken d snyder at gmail dot com) - date 2008-09-10 - version 2.0.2 (http://kendsnyder.com/sandbox/date/) - license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) - -JavaScript printf/sprintf functions. - - version 2007.04.27 - author Ash Searle - http://hexmen.com/blog/2007/03/printf-sprintf/ - http://hexmen.com/js/sprintf.js - The author (Ash Searle) has placed this code in the public domain: - "This code is unrestricted: you are free to use it however you like." - To learn how to use jqPlot, start with the Basic Unsage Instructions below. Then read the usage.txt and jqPlotOptions.txt files included with the distribution. @@ -51,12 +21,12 @@ Basic Usage Instructions: -jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.1 is included in +jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.4 is included in the distribution. To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and -optionally the excanvas script for IE support in your web page... +optionally the excanvas script to support IE version prior to IE 9 in your web page: -> <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]--> -> <script language="javascript" type="text/javascript" src="jquery-1.4.2.min.js"></script> +> <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]--> +> <script language="javascript" type="text/javascript" src="jquery-1.4.4.min.js"></script> > <script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script> > <link rel="stylesheet" type="text/css" href="jquery.jqplot.css" /> @@ -65,9 +35,43 @@ Building from source: -To build a distribution from source you need to have ant <http://ant.apache.org> -installed. There are 6 targets: clean, dist, min, tests, docs and all. Use +If you've cloned the repository, you can build a distribution from source. +You need to have ant <http://ant.apache.org> installed. You can simply +type "ant" from the jqplot directory to build the default "all" target. +There are 6 pertinent targets: clean, dist, min, docs, compress and all. Use: > ant -p to get a description of the various build targets. + +Legal Notices: + +Copyright (c) 2009-2010 Chris Leonello +jqPlot is currently available for use in all personal or commercial projects +under both the MIT and GPL version 2.0 licenses. This means that you can +choose the license that best suits your project and use it accordingly. + +Although not required, the author would appreciate an email letting him +know of any substantial use of jqPlot. You can reach the author at: +chris at jqplot or see http://www.jqplot.com/info.php . + +If you are feeling kind and generous, consider supporting the project by +making a donation at: http://www.jqplot.com/donate.php . + +jqPlot includes date instance methods and printf/sprintf functions by other authors: + +Date instance methods: + + author Ken Snyder (ken d snyder at gmail dot com) + date 2008-09-10 + version 2.0.2 (http://kendsnyder.com/sandbox/date/) + license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) + +JavaScript printf/sprintf functions. + + version 2007.04.27 + author Ash Searle + http://hexmen.com/blog/2007/03/printf-sprintf/ + http://hexmen.com/js/sprintf.js + The author (Ash Searle) has placed this code in the public domain: + "This code is unrestricted: you are free to use it however you like." Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/changes.txt =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/changes.txt 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/changes.txt 2011-09-08 11:53:04 UTC (rev 21438) @@ -1,5 +1,139 @@ Title: Change Log +1.0.0b2: +* Major improvements in memory usage: +** Merged in changes from Timo Besenruether to reuse canvas elements and improve + memory performance. +** Fixed all identifiable DOM leaks. +** Mergged in changes from cguillot for memory improvements in IE < 9. +* Added vertical and dashed vertical line support for canvas overlay. +* Fixed bug where initially hidden plots would not display. +* Fixed bug with point labels and null data points. +* Updated to jQuery 1.6.1. +* Improved pie slice margin calculation and fixed slice margin and pie positioning + with small slices. +* Improved bar renderer so bars always start at 0 if: +** The axis is a linear axis (not log/date). +** There are no other line types besides bars attached to the axis. +** The data on the axis is all >= 0. +** The user has not specified a pad, padMin or forceTickAt0 = true option. +* Modified tick prefix behavious so prefix no added to all ticks, even if format + string is specified. +* Fix to ensure original tick formats are applied when zooming and resetting + zoom. +* Updated auto tick format string so format adjusted when zooming. +* Modified auto tick computation to put less ticks on small plots and more + ticks on large plots. +* Update bubble render to support gradients in IE 9. + +1.0.0b1: +* Much improved tick generation algorithm to get precise rounded + tick values (Thanks Scott Prahl!). +* Auto compute tick format string if none is provided. +* Much better "slicing" of pie charts when using "sliceMargin" option to set + a gap between the slices. +* Expanded canvasOverlay plugin to create arbitrary dashed and solid + horizontal and vertical lines on top of plot. +* Added defaultColors and defaultNegativeColors options to $.jqplot.config. +* Fixed issue #318, highlighter & bar renderer incompatability. +* Improve highlighter tooltip positioning with negative bars. +* Fixed #305, mispelling of jqlotDragStart and jqlotDragStop. MUST NOW BIND + TO jqplotDragStart and jqplotDragStop. +* Fixed #290, some variables left in global scope. +* Fixed #289, OHLC line widths hard coded at 1.5. Now set by lineWidth option. +* Fixed #296 for determining databounds on log axes. +* Updated to jQuery 1.5.1 +* Fixed waterfall plot to ensure first and last bars always fill to zero. +* Added lineJoin and lineCap option to series lines. +* Bar widths now based on width of grid, not plot target for better scaling. +* Added looseZoom option to cursor so zooming can produce well rounded ticks. +* Added forceTickAt0 and forceTickAt100 options to ensure there will always + be a tick at 0 or 100 in the plot. +* Fixed bug where cursor legend didn't honor series showLabel option. + + +1.0.0a: + +* Series can now be moved forward or backward in stack to e.g. bring a line + forward when mousing over a point. +* Can now move outside of grid area while zooming. Can have zoom + constrained to grid area or allow zooming outside. +* Fixed issue #142 with tooltip drawn on top of event canvas, hiding + mouse events. +* Fixed #147 where pie slices with 0 value not rendering properly in IE. +* Fixed #130 where stack data not sorted properly. +* Fixed bug with null values not handled properly in category axes. +* Fixed #156 where pie charts not rendering on QTWebKit. +* Now using feature detection for canvas and canvas text capability + rather than browser version. +* Added enahncedLegendRenderer plugin to allow multi row/column legends + and clickable labels to show/hide series. +* Added fillToValue option to allow filled line plot to fill to an + arbitrary value. +* Added block plot plugin. +* Added funnel type charts. +* Added meter gauge type charts. +* Added plot theming support. +* $.jqplot.config.enablePlugins now false by default. +* Implemented highlighting on bar, pie, donut, funnel, etc. charts. +* Fix to pointlabels plugin to align labels properly on multi series plots. +* Added custom error handling to display error message in plot area. +* Fixed issue where would call to draw grid border of 0 width would + result in a default border being drawn. +* Added options to place legend outside of grid and shrink grid so everything + stays within plot div. +* Fixed bug in color generator so now calls to get() continually cycle + through colors just like next(). +* Added defaultAxisStart option. +* Added gradient fills to bubbles. +* Added bubble charts. +* Added showLabels option to bubble charts. +* Pass bubble radius to event callback in bubble charts. +* Fixed #207, typo in docs. +* Fixed #206 where "value" pie slice data labels were displaying wrong + value. +* Fixed #147 with 0 value slices in IE6. +* Fixed issue #241, disabled varyBarColor option in stacked charts. +* Added dataRenderer option to allow custom processors for JSON, AJAX + and anywhere else you might want to get data. +* Fixed null value handling so plot now properly skip or join over nulls. +* Fixed showTicks and showTickMarks option conflicts. +* Fixed issue #185 where pointLabels plugin incompatibility could crash + pie, donut and other plots. +* Fixed #23 and #143 to obey gridPadding option. +* Fixed #233 with highlighter tooltip separator. +* Fixed #224 where type checking failing on GWT. +* Fixed #272 with pie highlighting not working on replot. +* Memory performance improvements. +* Changes to build script so everything should build when pulled from repo. +* Fixed issue #275, IE 6/7 don't support array indexing of strings. +* Added event listener hooks for mouseUp, mouseDown, etc. to all line plots. +* Fixed bug with highlighter not working when null in data. +* Updated to jQuery 1.4.4 +* Fixed bug where donut plots showed value of radians of slice instead + of actual data. +* Reverted to excanvas r3 so IE8 no longer has to emulate IE7. +* Added tooltipContentEditor option to highlighter, allowing callback + to manipulate tooltip content at run time (thanks Tim Bunce!). +* Fixed bug where axes scale not resetting. +* Fixed bug with date axes where data bounds not properly set. +* Fixed issue where tick marks disappear if grid lines turned off. +* Updated replot method to allow passing in axes options for more control. +* Added experimental support for "broken" axes. +* Fixed bug with pies where pies with 0 valued slices did not draw correctly. +* Added canvasOverlay plugin to allow drawing of arbitrary shapes on a canvas + over the plot. +* Added option to display arbitrary text/html (message, animated gif, etc.) if + plot is constructed without data. Allow a "data loading" indicator to be shown. +* Added resetAxisValues method to manually update axis ticks without + redrawing the plot. +* Fix to labels on negative bars so label postiion of 'n' will be below a negative bar, + just as it is above a positive bar (thanks guigod!). +* Added thousands separator character (') to sprintf formatting (thanks yuichi1004!). +* Re-factored date parsing/formatting to use new jsDate module which does not + extend the Date prototype. + + 0.9.7: * Added Mekko chart plot type with enhanced legend and axes support. @@ -8,14 +142,14 @@ * Enhanced plot labels for waterfall style. * Enhanced bar plots so you can now color each bar of a series independently with the "varyBarColor" option. -* Refactored series drawing so that each series and series shadow drawn +* Re-factored series drawing so that each series and series shadow drawn on it's own canvas. Allows series to be redrawn independently of each other. * Added additional default series colors. -* Aded useNegativeColors option to turn off negative color array and use +* Added useNegativeColors option to turn off negative color array and use only seriesColors array to define all bar/filled line colors. * Fix css for cursor legend. * Modified shape renderer so rectangles can be stroked and filled. -* Refactored date methods out of dateAxisRenderer so that date formatter +* Re-factored date methods out of dateAxisRenderer so that date formatter and methods can be accesses outside of dateAxisRenderer plugin. * Fixed #132, now trigger series change event on plot target instead of drag canvas. * Fixes issue #116 where some source files had mix of tabs and spaces @@ -63,10 +197,10 @@ at the cursor location with a readout of data points at the line location which are displayed in the chart legend. * Changed cursor tooltip format string. Now one format string is used for - entire tooptip. + entire tooltip. * Added mechanisms to specify plot size when plot target is hidden or plot height/width otherwise cannot be determined from markup. -* Added $.jqplot.config object to specify jqplot wide configuraiton options. +* Added $.jqplot.config object to specify jqplot wide configuration options. These include enablePlugins to globally set the default plugin state on/off and defaultHeight/defaultWidth to specify default plot height/width. * Added fillToZero option which forces filled charts to fill to zero as opposed @@ -105,7 +239,7 @@ 0.9.3: * Preliminary support for axis labels. Currently rendered into DIV tags, - so no ratated label support. This feature is currently expreimental. + so no rotated label support. This feature is currently experimental. * Fixed bug #52, needed space in tick div tag between style and class declarations or plot failed in certain application doctypes. * Fixed issue #54, miter style line join for chart lines causing spikes at steep @@ -255,7 +389,7 @@ * Removed lots of lint in js code. * Moved tick css from js code into css file. * Fix to tick positioning css. y axis ticks were positioned to wrong side of axis div. -* Refactored axis tick renderer instantiation into the axes renderers themselves. +* Re-factored axis tick renderer instantiation into the axes renderers themselves. -For chnages prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/ \ No newline at end of file +For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/ \ No newline at end of file Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/copyright.txt =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/copyright.txt 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/copyright.txt 2011-09-08 11:53:04 UTC (rev 21438) @@ -1,5 +1,10 @@ /** - * Copyright (c) 2009 - 2010 Chris Leonello + * jqPlot + * Pure JavaScript plotting plugin using jQuery + * + * Version: @VERSION + * + * Copyright (c) 2009-2011 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can @@ -7,22 +12,13 @@ * * Although not required, the author would appreciate an email letting him * know of any substantial use of jqPlot. You can reach the author at: - * chris at jqplot or see http://www.jqplot.com/info.php . + * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . * - * jqPlot includes date instance methods and printf/sprintf functions by other authors: + * sprintf functions contained in jqplot.sprintf.js by Ash Searle: * - * Date instance methods contained in jqplot.dateMethods.js: - * - * author Ken Snyder (ken d snyder at gmail dot com) - * date 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) - * license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) - * - * JavaScript printf/sprintf functions contained in jqplot.sprintf.js: - * * version 2007.04.27 * author Ash Searle * http://hexmen.com/blog/2007/03/printf-sprintf/ Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.js =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.js 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.js 2011-09-08 11:53:04 UTC (rev 21438) @@ -1,3 +1,6 @@ +// Memory Leaks patch from http://explorercanvas.googlecode.com/svn/trunk/ +// svn : r73 +// ------------------------------------------------------------------ // Copyright 2006 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -171,6 +174,21 @@ //el.getContext().setCoordsize_() } return el; + }, + + // Memory Leaks patch : see http://code.google.com/p/explorercanvas/issues/detail?id=82 + uninitElement: function(el){ + if (el.getContext) { + var ctx = el.getContext(); + delete ctx.element_; + delete ctx.canvas; + el.innerHTML = ""; + //el.outerHTML = ""; + el.context_ = null; + el.getContext = null; + el.detachEvent("onpropertychange", onPropertyChange); + el.detachEvent("onresize", onResize); + } } }; Modified: trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.min.js =================================================================== --- trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.min.js 2011-09-08 07:16:19 UTC (rev 21437) +++ trunk/qooxdoo-contrib/QxJqPlot/trunk/source/resource/jqPlot/excanvas.min.js 2011-09-08 11:53:04 UTC (rev 21438) @@ -1,35 +1,30 @@ -document.createElement("canvas").getContext||function(){function Z(){return this.context_||(this.context_=new C(this))}function $(a,b){var c=P.call(arguments,2);return function(){return a.apply(b,c.concat(P.call(arguments)))}}function Q(a){return String(a).replace(/&/g,"&").replace(/"/g,""")}function R(a,b,c){a.namespaces[b]||a.namespaces.add(b,c,"#default#VML")}function S(a){R(a,"g_vml_","urn:schemas-microsoft-com:vml");R(a,"g_o_","urn:schemas-microsoft-com:office:office");if(!a.styleSheets.ex_canvas_){a= -a.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function aa(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect();b.style.height=b.attributes.height.nodeValue+"px";b.firstChild.style.height=b.clientHeight+"px";break}}function ba(a){a= -a.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function u(a,b){for(var c=D(),d=0;d<3;d++)for(var e=0;e<3;e++){for(var f=0,h=0;h<3;h++)f+=a[d][h]*b[h][e];c[d][e]=f}return c}function T(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX; -b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function U(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1);b=a.substring(b+1,c).split(",");if(b.length!=4||a.charAt(3)!="a")b[3]=1;return b}function E(a){return parseFloat(a)/100}function F(a,b,c){return Math.min(c,Math.max(b,a))}function ca(a){var b,c;c=parseFloat(a[0])/ -360%360;c<0&&c++;b=F(E(a[1]),0,1);a=F(E(a[2]),0,1);if(b==0)b=a=c=a;else{var d=a<0.5?a*(1+b):a+b-a*b,e=2*a-d;b=G(e,d,c+1/3);a=G(e,d,c);c=G(e,d,c-1/3)}return"#"+v[Math.floor(b*255)]+v[Math.floor(a*255)]+v[Math.floor(c*255)]}function G(a,b,c){c<0&&c++;c>1&&c--;return 6*c<1?a+(b-a)*6*c:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}function H(a){if(a in I)return I[a];var b,c=1;a=String(a);if(a.charAt(0)=="#")b=a;else if(/^rgb/.test(a)){c=U(a);b="#";for(var d,e=0;e<3;e++){d=c[e].indexOf("%")!=-1?Math.floor(E(c[e])* -255):+c[e];b+=v[F(d,0,255)]}c=+c[3]}else if(/^hsl/.test(a)){c=U(a);b=ca(c);c=c[3]}else b=da[a]||a;return I[a]={color:b,alpha:c}}function ea(a){if(J[a])return J[a];var b=document.createElement("div").style;try{b.font=a}catch(c){}return J[a]={style:b.fontStyle||w.style,variant:b.fontVariant||w.variant,weight:b.fontWeight||w.weight,size:b.fontSize||w.size,family:b.fontFamily||w.family}}function fa(a,b){var c={};for(var d in a)c[d]=a[d];b=parseFloat(b.currentStyle.fontSize);d=parseFloat(a.size);c.size= -typeof a.size=="number"?a.size:a.size.indexOf("px")!=-1?d:a.size.indexOf("em")!=-1?b*d:a.size.indexOf("%")!=-1?b/100*d:a.size.indexOf("pt")!=-1?d/0.75:b;c.size*=0.981;return c}function ga(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+"px "+a.family}function ha(a){return ia[a]||"square"}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=l*1;this.globalAlpha= -1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(false);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function V(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x, -cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});a.currentX_=d.x;a.currentY_=d.y}function W(a,b){var c=H(a.strokeStyle),d=c.color;c=c.alpha*a.globalAlpha;var e=a.lineScale_*a.lineWidth;if(e<1)c*=e;b.push("<g_vml_:stroke",' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',ha(a.lineCap),'"',' weight="',e,'px"',' color="',d,'" />')}function X(a,b,c,d){var e=a.fillStyle,f=a.arcScaleX_,h=a.arcScaleY_,j=d.x-c.x,m=d.y-c.y;if(e instanceof x){var k=0;d={x:0,y:0};var q=0, -o=1;if(e.type_=="gradient"){k=e.x1_/f;c=e.y1_/h;var n=p(a,e.x0_/f,e.y0_/h);k=p(a,k,c);k=Math.atan2(k.x-n.x,k.y-n.y)*180/Math.PI;if(k<0)k+=360;if(k<1.0E-6)k=0}else{n=p(a,e.x0_,e.y0_);d={x:(n.x-c.x)/j,y:(n.y-c.y)/m};j/=f*l;m/=h*l;o=r.max(j,m);q=2*e.r0_/o;o=2*e.r1_/o-q}f=e.colors_;f.sort(function(A,ja){return A.offset-ja.offset});h=f.length;n=f[0].color;c=f[h-1].color;j=f[0].alpha*a.globalAlpha;a=f[h-1].alpha*a.globalAlpha;m=[];for(var s=0;s<h;s++){var y=f[s];m.push(y.offset*o+q+" "+y.color)}b.push('<g_vml_:fill type="', -e.type_,'"',' method="none" focus="100%"',' color="',n,'"',' color2="',c,'"',' colors="',m.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',j,'"',' angle="',k,'"',' focusposition="',d.x,",",d.y,'" />')}else if(e instanceof K)j&&m&&b.push("<g_vml_:fill",' position="',-c.x/j*f*f,",",-c.y/m*h*h,'"',' type="tile"',' src="',e.src_,'" />');else{e=H(a.fillStyle);b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />')}}function p(a,b,c){a=a.m_;return{x:l*(b*a[0][0]+c*a[1][0]+ -a[2][0])-t,y:l*(b*a[0][1]+c*a[1][1]+a[2][1])-t}}function ka(a){return isFinite(a[0][0])&&isFinite(a[0][1])&&isFinite(a[1][0])&&isFinite(a[1][1])&&isFinite(a[2][0])&&isFinite(a[2][1])}function z(a,b,c){if(ka(b)){a.m_=b;if(c)a.lineScale_=la(ma(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}}function x(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function K(a,b){na(a);switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_= -b;break;default:L("SYNTAX_ERR")}this.src_=a.src;this.width_=a.width;this.height_=a.height}function L(a){throw new M(a);}function na(a){if(!a||a.nodeType!=1||a.tagName!="IMG")L("TYPE_MISMATCH_ERR");a.readyState!="complete"&&L("INVALID_STATE_ERR")}function M(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var r=Math,i=r.round,N=r.sin,O=r.cos,ma=r.abs,la=r.sqrt,l=10,t=l/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var P=Array.prototype.slice;S(document);var Y={init:function(a){a=a|| -document;a.createElement("canvas");a.attachEvent("onreadystatechange",$(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=Z;S(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",aa);a.attachEvent("onresize",ba);var b=a.attributes;if(b.width&&b.width.specified)a.style.width=b.width.nodeValue+"px";else a.width=a.clientWidth;if(b.height&&b.height.specified)a.style.height= -b.height.nodeValue+"px";else a.height=a.clientHeight}return a}};Y.init();for(var v=[],g=0;g<16;g++)for(var B=0;B<16;B++)v[g*16+B]=g.toString(16)+B.toString(16);var da={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C", -cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF", -firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3", -lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA", -mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D", -skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},I={},w={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"},J={},ia={butt:"flat",round:"round"};g=C.prototype;g.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_= -null}this.element_.innerHTML=""};g.beginPath=function(){this.currentPath_=[]};g.moveTo=function(a,b){a=p(this,a,b);this.currentPath_.push({type:"moveTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};g.lineTo=function(a,b){a=p(this,a,b);this.currentPath_.push({type:"lineTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};g.bezierCurveTo=function(a,b,c,d,e,f){e=p(this,e,f);a=p(this,a,b);c=p(this,c,d);V(this,a,c,e)};g.quadraticCurveTo=function(a,b,c,d){a=p(this,a,b);c=p(this,c,d);d={x:this.currentX_+ -2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};V(this,d,{x:d.x+(c.x-this.currentX_)/3,y:d.y+(c.y-this.currentY_)/3},c)};g.arc=function(a,b,c,d,e,f){c*=l;var h=f?"at":"wa",j=a+O(d)*c-t,m=b+N(d)*c-t;d=a+O(e)*c-t;e=b+N(e)*c-t;if(j==d&&!f)j+=0.125;a=p(this,a,b);j=p(this,j,m);d=p(this,d,e);this.currentPath_.push({type:h,x:a.x,y:a.y,radius:c,xStart:j.x,yStart:j.y,xEnd:d.x,yEnd:d.y})};g.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d); -this.closePath()};g.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke();this.currentPath_=e};g.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill();this.currentPath_=e};g.createLinearGradient=function(a,b,c,d){var e=new x("gradient");e.x0_=a;e.y0_=b;e.x1_= -c;e.y1_=d;return e};g.createRadialGradient=function(a,b,c,d,e,f){var h=new x("gradientradial");h.x0_=a;h.y0_=b;h.r0_=c;h.x1_=d;h.y1_=e;h.r1_=f;return h};g.drawImage=function(a){var b,c,d,e,f,h,j,m;d=a.runtimeStyle.width;e=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var k=a.width,q=a.height;a.runtimeStyle.width=d;a.runtimeStyle.height=e;if(arguments.length==3){b=arguments[1];c=arguments[2];f=h=0;j=d=k;m=e=q}else if(arguments.length==5){b=arguments[1];c=arguments[2]; -d=arguments[3];e=arguments[4];f=h=0;j=k;m=q}else if(arguments.length==9){f=arguments[1];h=arguments[2];j=arguments[3];m=arguments[4];b=arguments[5];c=arguments[6];d=arguments[7];e=arguments[8]}else throw Error("Invalid number of arguments");var o=p(this,b,c),n=[];n.push(" <g_vml_:group",' coordsize="',l*10,",",l*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var s=[];s.push("M11=",this.m_[0][0], -",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",i(o.x/l),",","Dy=",i(o.y/l),"");var y=p(this,b+d,c),A=p(this,b,c+e);b=p(this,b+d,c+e);o.x=r.max(o.x,y.x,A.x,b.x);o.y=r.max(o.y,y.y,A.y,b.y);n.push("padding:0 ",i(o.x/l),"px ",i(o.y/l),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",s.join(""),", sizingmethod='clip');")}else n.push("top:",i(o.y/l),"px;left:",i(o.x/l),"px;");n.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',l*d,"px;"," height:", -l*e,'px"',' cropleft="',f/k,'"',' croptop="',h/q,'"',' cropright="',(k-f-j)/k,'"',' cropbottom="',(q-h-m)/q,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",n.join(""))};g.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',l*10,",",l*10,'"',' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e]; -switch(f.type){case "moveTo":b.push(" m ",i(f.x),",",i(f.y));break;case "lineTo":b.push(" l ",i(f.x),",",i(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",i(f.cp1x),",",i(f.cp1y),",",i(f.cp2x),",",i(f.cp2y),",",i(f.x),",",i(f.y));break;case "at":case "wa":b.push(" ",f.type," ",i(f.x-this.arcScaleX_*f.radius),",",i(f.y-this.arcScaleY_*f.radius)," ",i(f.x+this.arcScaleX_*f.radius),",",i(f.y+this.arcScaleY_*f.radius)," ",i(f.xStart),",",i(f.yStart)," ",i(f.xEnd), -",",i(f.yEnd));break}if(f){if(c.x==null||f.x<c.x)c.x=f.x;if(d.x==null||f.x>d.x)d.x=f.x;if(c.y==null||f.y<c.y)c.y=f.y;if(d.y==null||f.y>d.y)d.y=f.y}}b.push(' ">');a?X(this,b,c,d):W(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};g.fill=function(){this.stroke(true)};g.closePath=function(){this.currentPath_.push({type:"close"})};g.save=function(){var a={};T(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=u(D(),this.m_)};g.restore=function(){if(this.aStack_.length){T(this.aStack_.pop(), -this);this.m_=this.mStack_.pop()}};g.translate=function(a,b){z(this,u([[1,0,0],[0,1,0],[a,b,1]],this.m_),false)};g.rotate=function(a){var b=O(a);a=N(a);z(this,u([[b,a,0],[-a,b,0],[0,0,1]],this.m_),false)};g.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,u([[a,0,0],[0,b,0],[0,0,1]],this.m_),true)};g.transform=function(a,b,c,d,e,f){z(this,u([[a,b,0],[c,d,0],[e,f,1]],this.m_),true)};g.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],true)};g.drawText_=function(a, -b,c,d,e){var f=this.m_;d=0;var h=1E3,j={x:0,y:0},m=[],k=fa(ea(this.font),this.element_),q=ga(k),o=this.element_.currentStyle,n=this.textAlign.toLowerCase();switch(n){case "left":case "center":case "right":break;case "end":n=o.direction=="ltr"?"right":"left";break;case "start":n=o.direction=="rtl"?"right":"left";break;default:n="left"}switch(this.textBaseline){case "hanging":case "top":j.y=k.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":j.y= --k.size/2.25;break}switch(n){case "right":d=1E3;h=0.05;break;case "center":d=h=500;break}b=p(this,b+j.x,c+j.y);m.push('<g_vml_:line from="',-d,' 0" to="',h,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?W(this,m):X(this,m,{x:-d,y:0},{x:h,y:k.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=i(b.x/l)+","+i(b.y/l);m.push('<g_vml_:skew on="t" matrix="', -e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',Q(a),'" style="v-text-align:',n,";font:",Q(q),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",m.join(""))};g.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,false)};g.strokeText=function(a,b,c,d){this.drawText_(a,b,c,d,true)};g.measureText=function(a){if(!this.textMeasureEl_){this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'); -this.textMeasureEl_=this.element_.lastChild}var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};g.clip=function(){};g.arcTo=function(){};g.createPattern=function(a,b){return new K(a,b)};x.prototype.addColorStop=function(a,b){b=H(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};g=M.prototype=new Error;g.INDEX_SIZE_ERR=1;g.DOMSTRING_SIZE_ERR= -2;g.HIERARCHY_REQUEST_ERR=3;g.WRONG_DOCUMENT_ERR=4;g.INVALID_CHARACTER_ERR=5;g.NO_DATA_ALLOWED_ERR=6;g.NO_MODIFICATION_ALLOWED_ERR=7;g.NOT_FOUND_ERR=8;g.NOT_SUPPORTED_ERR=9;g.INUSE_ATTRIBUTE_ERR=10;g.INVALID_STATE_ERR=11;g.SYNTAX_ERR=12;g.INVALID_MODIFICATION_ERR=13;g.NAMESPACE_ERR=14;g.INVALID_ACCESS_ERR=15;g.VALIDATION_ERR=16;g.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=Y;CanvasRenderingContext2D=C;CanvasGradient=x;CanvasPattern=K;DOMException=M}(); +/** + * jqPlot + * Pure JavaScript plotting plugin using jQuery + * + * Version: @VERSION + * + * Copyright (c) 2009-2011 Chris Leonello + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. + * + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: + * chris at jqplot dot com or see http://www.jqplot.com/info.php . + * + * If you are feeling kind and generous, consider supporting the project by + * making a donation at: http://www.jqplot.com/donate.php . + * + * sprintf functions contained in jqplot.sprintf.js by Ash Searle: + * + * version 2007.04.27 + * author Ash Searle + * http://hexmen.com/blog/2007/03/printf-sprintf/ + * http://hexmen.com/js/sprintf.js + * The author (Ash Searle) has placed this code in the public domain: + * "This code is unrestricted: you are free to use it however you like." + * + */ +if(!document.createElement("canvas").getContext){(function(){var ab=Math;var n=ab.round;var l=ab.sin;var A=ab.cos;var H=ab.abs;var N=ab.sqrt;var d=10;var f=d/2;var z=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function y(){return this.context_||(this.context_=new D(this))}var t=Array.prototype.slice;function g(j,m,p){var i=t.call(arguments,2);return function(){return j.apply(m,i.concat(t.call(arguments)))}}function af(i){return String(i).replace(/&/g,"&").replace(/"/g,""")}function Y(m,j,i){if(!m.namespaces[j]){m.namespaces.add(j,i,"#default#VML")}}function R(j){Y(j,"g_vml_","urn:schemas-microsoft-com:vml");Y(j,"g_o_","urn:schemas-microsoft-com:office:office");if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){this.initElement(m[j])}},initElement:function(j){if(!j.getContext){j.getContext=y;R(j.ownerDocument);j.innerHTML="";j.attachEvent("onpropertychange",x);j.attachEvent("onresize",W);var i=j.attributes;if(i.width&&i.width.specified){j.style.width=i.width.nodeValue+"px"}else{j.width=j.clientWidth}if(i.height&&i.height.specified){j.style.height=i.height.nodeValue+"px"}else{j.height=j.clientHeight}}return j},uninitElement:function(j){if(j.getContext){var i=j.getContext();delete i.element_;delete i.canvas;j.innerHTML="";j.context_=null;j.getContext=null;j.detachEvent("onpropertychange",x);j.detachEvent("onresize",W)}}};function x(j){var i=j.srcElement;switch(j.propertyName){case"width":i.getContext().clearRect();i.style.width=i.attributes.width.nodeValue+"px";i.firstChild.style.width=i.clientWidth+"px";break;case"height":i.getContext().clearRect();i.style.height=i.attributes.height.nodeValue+"px";i.firstChild.style.height=i.clientHeight+"px";break}}function W(j){var i=j.srcElement;if(i.firstChild){i.firstChild.style.width=i.clientWidth+"px";i.firstChild.style.height=i.clientHeight+"px"}}e.init();var k=[];for(var ae=0;ae<16;ae++){for(var ad=0;ad<16;ad++){k[ae*16+ad]=ae.toString(16)+ad.toString(16)}}function B(){return[[1,0,0],[0,1,0],[0,0,1]]}function J(p,m){var j=B();for(var i=0;i<3;i++){for(var ah=0;ah<3;ah++){var Z=0;for(var ag=0;ag<3;ag++){Z+=p[i][ag]*m[ag][ah]}j[i][ah]=Z}}return j}function v(j,i){i.fillStyle=j.fillStyle;i.lineCap=j.lineCap;i.lineJoin=j.lineJoin;i.lineWidth=j.lineWidth;i.miterLimit=j.miterLimit;i.shadowBlur=j.shadowBlur;i.shadowColor=j.shadowColor;i.shadowOffsetX=j.shadowOffsetX;i.shadowOffsetY=j.shadowOffsetY;i.strokeStyle=j.strokeStyle;i.globalAlpha=j.globalAlpha;i.font=j.font;i.textAlign=j.textAlign;i.textBaseline=j.textBaseline;i.arcScaleX_=j.arcScaleX_;i.arcScaleY_=j.arcScaleY_;i.lineScale_=j.lineScale_}var b={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",... [truncated message content] |
From: <d_w...@us...> - 2011-09-08 07:16:26
|
Revision: 21437 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21437&view=rev Author: d_wagner Date: 2011-09-08 07:16:19 +0000 (Thu, 08 Sep 2011) Log Message: ----------- Introduced demo load timeout configuration setting Modified Paths: -------------- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js Modified: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-09-07 21:12:47 UTC (rev 21436) +++ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-09-08 07:16:19 UTC (rev 21437) @@ -13,7 +13,8 @@ 'ignore' : 'showcase:Browser,widget:Iframe,test:Serialize,bom:Iframe,progressive:*', 'sampleGlobalErrorLogging' : false, 'shutdownSample' : false, - 'reloadBrowser' : false + 'reloadBrowser' : false, + 'demoLoadTimeout' : 30000 }; var args = arguments ? arguments : ""; @@ -120,7 +121,8 @@ simulation.Simulation.prototype.waitForDemoApp = function() { - this.__sel.waitForCondition(mySim.checkDemoReady, 30000); + var timeout = this.getConfigSetting("demoLoadTimeout") + this.__sel.waitForCondition(mySim.checkDemoReady, timeout); }; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2011-09-07 21:12:53
|
Revision: 21436 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21436&view=rev Author: derrell Date: 2011-09-07 21:12:47 +0000 (Wed, 07 Sep 2011) Log Message: ----------- App Engine does not allow id=0 Modified Paths: -------------- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js Modified: trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js =================================================================== --- trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-07 08:22:31 UTC (rev 21435) +++ trunk/qooxdoo-contrib/RpcJs/trunk/source/class/rpcjs/appengine/Dbif.js 2011-09-07 21:12:47 UTC (rev 21436) @@ -43,7 +43,7 @@ /** * The next value to use for an auto-generated key for an entity */ - __nextKey : 0, + __nextKey : 1, /* * Build a composite key. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-07 08:22:37
|
Revision: 21435 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21435&view=rev Author: spackers Date: 2011-09-07 08:22:31 +0000 (Wed, 07 Sep 2011) Log Message: ----------- fix for recursive type declarations Modified Paths: -------------- trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/Manifest.json trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/source/class/com/zenesis/qx/remote/ProxyManager.js Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/Manifest.json 2011-09-07 08:12:09 UTC (rev 21434) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/Manifest.json 2011-09-07 08:22:31 UTC (rev 21435) @@ -18,7 +18,7 @@ ], "version" : "trunk", - "qooxdoo-versions": ["1.0.1"] + "qooxdoo-versions": ["1.5"] }, "provides" : Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/source/class/com/zenesis/qx/remote/ProxyManager.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/source/class/com/zenesis/qx/remote/ProxyManager.js 2011-09-07 08:12:09 UTC (rev 21434) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/source/class/com/zenesis/qx/remote/ProxyManager.js 2011-09-07 08:22:31 UTC (rev 21435) @@ -435,6 +435,10 @@ return clazz; } + // Types are not created when encountered because thatr can lead to unsolvable recursive + // problems; definitions are queued here instead + var deferredTypes = []; + this.__classesBeingDefined[data.className] = true; try { // Create the JSON definition for qx.Class @@ -443,9 +447,7 @@ def = { members: { } }; else { def = { - construct: /*function(serverId) { - this.base(arguments, serverId); - },*/ new Function('serverId', 'this.base(arguments, serverId); this.$$proxy = {};'), + construct: new Function('serverId', 'this.base(arguments, serverId); this.$$proxy = {};'), members: { } }; if (data.extend) { @@ -478,17 +480,14 @@ else def.members[methodName] = new Function('return this._callServer("' + methodName + '", qx.lang.Array.fromArguments(arguments));'); - if (method.returnType) - this.getClassOrCreate(method.returnType); -// if (methodName == "addQuestion") -// debugger; + if (method.returnType && typeof method.returnType == "object") + deferredTypes.push(method.returnType); var params = method.parameters; if (params) - for (var i = 0; i < params.length; i++) { - if (params[i]) - params[i] = this.getClassOrCreate(params[i]); - } + for (var i = 0; i < params.length; i++) + if (params[i] && typeof params[i] == "object") + deferredTypes.push(params[i]); } // Add properties @@ -499,9 +498,8 @@ var fromDef = data.properties[propName]; fromDef.name = propName; - var propClass = null; - if (fromDef.clazz) - propClass = this.getClassOrCreate(fromDef.clazz); + if (fromDef.clazz && typeof fromDef.clazz == "object") + deferredTypes.push(fromDef.clazz); var toDef = def.properties[propName] = {}; @@ -559,12 +557,16 @@ var propDef = onDemandProperties[i]; this.__addOnDemandProperty(clazz, propDef.name, propDef.readOnly||false); } - - // Done - return clazz; }finally { delete this.__classesBeingDefined[data.className]; } + + // Create dependent classes + for (var i = 0; i < deferredTypes.length; i++) + this.getClassOrCreate(deferredTypes[i]); + + // Done + return clazz; }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-07 08:12:16
|
Revision: 21434 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21434&view=rev Author: spackers Date: 2011-09-07 08:12:09 +0000 (Wed, 07 Sep 2011) Log Message: ----------- changed to provide server response direct to file (without interpretation), added support for multiple upload widgets, and added a toolbar button implementation Modified Paths: -------------- trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js trunk/qooxdoo-contrib/UploadMgr/trunk/server/java/com/zenesis/qx/upload/DemoUploadServlet.java trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/AbstractHandler.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/File.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js Added 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/UploadToolbarButton.js Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/demo/default/source/class/uploadmgr/demo/Application.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -79,7 +79,7 @@ var uploader = new com.zenesis.qx.upload.UploadMgr(btn, "http://www.zenesis.com/demoupload"); uploader.addListener("addFile", function(evt) { var file = evt.getData(), - item = new qx.ui.form.ListItem(file.getFilename(), null, file); + item = new qx.ui.form.ListItem(file.getFilename() + " (queued for upload)", null, file); lst.add(item); // On modern browsers (ie not IE) we will get progress updates @@ -164,6 +164,20 @@ var lbl = new qx.ui.basic.Label("You can upload anything you like to test this (or as many as you like); the files will be deleted after the upload completes.") .set({ rich: true, width: 700 }); doc.add(lbl, { left: 100, top: 390 }); + + var lbl = new qx.ui.basic.Label("Update:: You can now have multiple upload buttons per UploadMgr instance - below are a few extra upload buttons for testing.") + .set({ rich: true, width: 700 }); + doc.add(lbl, { left: 100, top: 420 }); + + btn = new com.zenesis.qx.upload.UploadButton("Add File(s)", "com/zenesis/qx/upload/test.png"); + uploader.addWidget(btn); + doc.add(btn, { left: 100, top: 460 }); + btn = new com.zenesis.qx.upload.UploadButton("Add File(s)", "com/zenesis/qx/upload/test.png"); + uploader.addWidget(btn); + doc.add(btn, { left: 250, top: 460 }); + btn = new com.zenesis.qx.upload.UploadButton("Add File(s)", "com/zenesis/qx/upload/test.png"); + uploader.addWidget(btn); + doc.add(btn, { left: 400, top: 460 }); } } }); Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/server/java/com/zenesis/qx/upload/DemoUploadServlet.java =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/server/java/com/zenesis/qx/upload/DemoUploadServlet.java 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/server/java/com/zenesis/qx/upload/DemoUploadServlet.java 2011-09-07 08:12:09 UTC (rev 21434) @@ -115,6 +115,9 @@ private void receiveOctetStream(HttpServletRequest request) throws IOException { String filename = request.getHeader("X-File-Name"); + int pos = filename.lastIndexOf('/'); + if (pos > -1) + filename = filename.substring(pos + 1); receiveFile(request.getInputStream(), new File(uploadFilesToDir, filename)); } Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/AbstractHandler.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/AbstractHandler.js 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/AbstractHandler.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -154,7 +154,7 @@ /** * Called by derived classes when a file has completed * @param file {com.zenesis.qx.upload.File} the file which has finsihed uploading - * @param response + * @param response {String} text received */ _onCompleted: function(file, response) { this.debug("completed: id=" + file.getId() + ", fileName=" + file.getFilename() + ", response=" + response); @@ -165,6 +165,8 @@ break; } + file.setResponse(response); + // File state should be uploading or cancelled if (file.getState() == "uploading") { file.setState("uploaded"); Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/File.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/File.js 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/File.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -94,6 +94,16 @@ init: "not-started", event: "changeState", apply: "_applyState" + }, + + /** + * The response string received from the server + */ + response: { + init: null, + nullable: true, + check: "String", + event: "changeResponse" } }, 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-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/FormHandler.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -70,9 +70,9 @@ return; } - self.debug('iframe loaded'); + //self.debug('iframe loaded'); - var response = self._getIframeContentJSON(iframe); + var response = self._getIframeContent(iframe); self._onCompleted(file, response); @@ -107,23 +107,14 @@ }, /** - * Returns json object received by iframe from server. - * @return {Object} + * Returns text received by iframe from server. + * @return {String} */ - _getIframeContentJSON: function(iframe){ + _getIframeContent: function(iframe){ // iframe.contentWindow.document - for IE<7 var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document, - response; - - this.debug("converting iframe's innerHTML to JSON"); - this.debug("innerHTML = " + doc.body.innerHTML); - - try { - response = eval("(" + doc.body.innerHTML + ")"); - } catch(err){ - response = {}; - } - + response = doc.body.innerHTML; + //this.debug("response=" + response); return response; }, Added: 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 (rev 0) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/InputElement.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -0,0 +1,67 @@ +qx.Class.define("com.zenesis.qx.upload.InputElement", { + extend: qx.html.Element, + + construct: function(widget, multiple) { + // 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. + // since we are providing our one look via the underlying qooxdoo + // button anyway, all we have todo is position the ff upload + // button over the button element. This is tricky in itself + // as the ff upload button consists of a text and a button element + // which are not css accessible themselfes. So the best we can do, + // is align to the top right corner of the upload widget and set its + // font so large that it will cover even realy large underlying buttons. + var css = { + position : "absolute", + cursor : "pointer", + hideFocus : "true", + zIndex: widget.getZIndex() + 11, + opacity: 0, + // align to the top right hand corner + top: '0px', + right: '0px', + // ff ignores the width setting pick a realy large font size to get + // a huge button that covers the area of the upload button + fontFamily: 'Arial', + // from valums.com/ajax-upload: 4 persons reported this, the max values that worked for them were 243, 236, 236, 118 + fontSize: '118px' + }; + if ((qx.core.Environment && qx.core.Environment.get('browser.name') == 'ie' && qx.core.Environment.get('browser.version') < 9 ) + || ( ! qx.core.Environment && qx.bom.client.Engine.MSHTML && qx.bom.client.Engine.VERSION < 9.0)) { + css.filter = 'alpha(opacity=0)'; + css.width = '200%'; + css.height = '100%'; + } + + this.base(arguments, 'input', css, { + type : 'file', + name : 'myinput' + }); + this.__widget = widget; + this.setMultiple(!!multiple); + }, + + properties: { + multiple: { + init: false, + check: "Boolean", + apply: "_applyMultiple" + } + }, + + members: { + __widget: null, + + getWidget: function() { + return this.__widget; + }, + + _applyMultiple: function(value, oldValue) { + if (value) + this.setAttribute("multiple", "multiple"); + else + this.removeAttribute("multiple"); + } + } +}); \ No newline at end of file Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadMgr.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -39,8 +39,9 @@ construct: function(widget, uploadUrl) { this.base(arguments); + this.__widgetsData = {}; if (widget) - this.setWidget(widget); + this.addWidget(widget); if (uploadUrl) this.setUploadUrl(uploadUrl); if (com.zenesis.qx.upload.XhrHandler.isSupported()) @@ -73,19 +74,6 @@ properties: { /** - * The widget to add the input[type=file] to; this would typically be an instance - * of com.zenesis.qx.upload.UploadButton (see com.zenesis.qx.upload.MUploadButton - * for implementing for other widgets) - */ - widget: { - check: "qx.ui.core.Widget", - init: null, - nullable: true, - apply: "_applyWidget", - event: "changeWidget" - }, - - /** * The URL to upload to */ uploadUrl: { @@ -120,26 +108,37 @@ }, members: { - __appearListenerId: null, + __widgetsData: null, __inputElement: null, __uploadHandler: null, /** - * Callback for changes to the widget property - * @param value - * @param oldValue - * @param name + * Adds a widget which is to have an input[type=file] attached; this would typically be an + * instance of com.zenesis.qx.upload.UploadButton (see com.zenesis.qx.upload.MUploadButton + * for implementing for other widgets) */ - _applyWidget: function(value, oldValue, name) { - if (oldValue && this.__appearListenerId) { - oldValue.removeListener(this.__appearListenerId); + addWidget: function(widget) { + var id = widget.addListenerOnce("appear", function(evt) { + var data = this.__widgetsData[widget.toHashCode()]; + if (data) { + data.listenerId = null; + widget.getContainerElement().addAt(this._createInputElement(widget), 0); + } + }, this); + this.__widgetsData[widget.toHashCode()] = { listenerId: id, widget: widget, inputElement: null }; + }, + + /** + * Removes a widget + * @param widget + */ + removeWidget: function(widget) { + var data = this.__widgetsData[widget.toHashCode()]; + if (data) { + if (data.listenerId) + widget.removeListener(data.listenerId); + delete this.__widgetsData[widget.toHashCode()]; } - this.__appearListenerId = null; - if (value) { - this.__appearListenerId = value.addListenerOnce("appear", function(evt) { - value.getContainerElement().addAt(this._createInputElement(), 0); - }, this); - } }, /** @@ -157,11 +156,10 @@ * @param oldValue */ _applyMultiple: function(value, oldValue) { - if (this.__inputElement) { - if (value) - this.__inputElement.setAttribute("multiple", "multiple"); - else - this.__inputElement.removeAttribute("multiple"); + for (var hash in this.__widgetsData) { + var data = this.__widgetsData[hash]; + if (data.inputElement) + data.inputElement.setMultiple(value); } }, @@ -185,64 +183,26 @@ * Creates the input[type=file] element * @returns */ - _createInputElement: function() { - var control; - // 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. - // since we are providing our one look via the underlying qooxdoo - // button anyway, all we have todo is position the ff upload - // button over the button element. This is tricky in itself - // as the ff upload button consists of a text and a button element - // which are not css accessible themselfes. So the best we can do, - // is align to the top right corner of the upload widget and set its - // font so large that it will cover even realy large underlying buttons. - var css = { - position : "absolute", - cursor : "pointer", - hideFocus : "true", - zIndex: this.getWidget().getZIndex() + 11, - opacity: 0, - // align to the top right hand corner - top: '0px', - right: '0px', - // ff ignores the width setting pick a realy large font size to get - // a huge button that covers the area of the upload button - fontFamily: 'Arial', - // from valums.com/ajax-upload: 4 persons reported this, the max values that worked for them were 243, 236, 236, 118 - fontSize: '118px' - }; - if ((qx.core.Environment && qx.core.Environment.get('browser.name') == 'ie' && qx.core.Environment.get('browser.version') < 9 ) - || ( ! qx.core.Environment && qx.bom.client.Engine.MSHTML && qx.bom.client.Engine.VERSION < 9.0)) { - css.filter = 'alpha(opacity=0)'; - css.width = '200%'; - css.height = '100%'; - } + _createInputElement: function(widget) { + var data = this.__widgetsData[widget.toHashCode()]; + qx.core.Assert.assertNull(data.inputElement); + var elem = data.inputElement = new com.zenesis.qx.upload.InputElement(widget, this.getMultiple()); + elem.addListenerOnce("change", qx.lang.Function.bind(this._onInputChange, this, elem)); - control = new qx.html.Element('input',css,{ - type : 'file', - name : 'myinput' - }); - if (this.getMultiple()) - control.setAttribute("multiple", "multiple"); - control.addListener("change", this._onInputChange, this); - this.__inputElement = control; - - return control; + return elem; }, /** * Resets the input element - ie discards the current one (which presumably has already * been queued for uploading) and creates a new one */ - _resetInputElement: function() { - var el = this.__inputElement, - widget = this.getWidget(); - if (!el) - return; - el.removeListener("change", this._onInputChange, this); - widget.getContainerElement().remove(el); - widget.getContainerElement().addAt(this._createInputElement(), 0); + _resetInputElement: function(widget) { + var data = this.__widgetsData[widget.toHashCode()], + elem = data.inputElement, + container = widget.getContainerElement(); + data.inputElement = null; + container.remove(elem); + container.addAt(this._createInputElement(widget), 0); }, /** @@ -250,14 +210,13 @@ * has selected a file to upload * @param evt */ - _onInputChange: function(evt) { - var el = this.__inputElement; - this._resetInputElement(); + _onInputChange: function(elem, evt) { + var widget = elem.getWidget(); - this.__uploadHandler.addFile(el.getDomElement()); + this.__uploadHandler.addFile(elem.getDomElement()); if (this.getAutoUpload()) this.__uploadHandler.beginUploads(); - this._resetInputElement(); + this._resetInputElement(widget); } } }); \ No newline at end of file Added: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadToolbarButton.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadToolbarButton.js (rev 0) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/UploadToolbarButton.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -0,0 +1,35 @@ +/* *********************************************************************** + + UploadMgr - provides an API for uploading one or multiple files + with progress feedback (on modern browsers), does not block the user + interface during uploads, supports cancelling uploads. + + http://qooxdoo.org + + Copyright: + 2011 Zenesis Limited, http://www.zenesis.com + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + + This software is provided under the same licensing terms as Qooxdoo, + please see the LICENSE file in the Qooxdoo project's top-level directory + for details. + + Authors: + * John Spackman (joh...@ze...) + +************************************************************************/ + +/** + * Implementation of an UploadButton + */ +qx.Class.define("com.zenesis.qx.upload.UploadToolbarButton", { + extend: qx.ui.toolbar.Button, + include: [ com.zenesis.qx.upload.MUploadButton ], + + members: { + + } +}); \ No newline at end of file Modified: trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js =================================================================== --- trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js 2011-09-07 06:46:22 UTC (rev 21433) +++ trunk/qooxdoo-contrib/UploadMgr/trunk/source/class/com/zenesis/qx/upload/XhrHandler.js 2011-09-07 08:12:09 UTC (rev 21434) @@ -25,7 +25,10 @@ * John Spackman (joh...@ze...) ************************************************************************/ - +/* +#ignore(File) +#ignore(encodeUriComponent) + */ /** * Implementation of AbstractHandler that uses XMLHttpRequest; this is based on work * at http://valums.com/ajax-upload/. @@ -72,7 +75,7 @@ file.setUserData("com.zenesis.qx.upload.XhrHandler", xhr); xhr.upload.onprogress = function(e){ - self.debug("onprogress: lengthComputable=" + e.lengthComputable + ", total=" + e.total + ", loaded=" + e.loaded); + //self.debug("onprogress: lengthComputable=" + e.lengthComputable + ", total=" + e.total + ", loaded=" + e.loaded); if (e.lengthComputable) { file.setSize(e.total); file.setProgress(e.loaded); @@ -81,15 +84,8 @@ xhr.onreadystatechange = function(){ if (xhr.readyState == 4) { - var response = {}; - if (xhr.status == 200){ - self.debug("xhr server responseText = " + xhr.responseText); - - try { - response = qx.lang.Json.parse(xhr.responseText); - } catch(err){ - } - } + var response = xhr.responseText; + //self.debug("xhr server status=" + xhr.status + ", responseText=" + response); file.setUserData("com.zenesis.qx.upload.XhrHandler", null); self._onCompleted(file, response); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2011-09-07 06:46:31
|
Revision: 21433 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21433&view=rev Author: spackers Date: 2011-09-07 06:46:22 +0000 (Wed, 07 Sep 2011) Log Message: ----------- minor bug fixes, plus support for @Property on methods, and support for application/octet uploading (ie support for UploadMgr contrib) Modified Paths: -------------- trunk/qooxdoo-contrib/ServerObjects/trunk/client/arraytest/source/class/arraytest/Application.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/qso-lib/source/class/com/zenesis/qx/remote/ProxyManager.js trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/AppFile.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyManager.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyMethod.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyPropertyImpl.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxySessionTracker.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/ProxyTypeImpl.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/RequestHandler.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/UploadHandler.java trunk/qooxdoo-contrib/ServerObjects/trunk/server/src/java/com/zenesis/qx/remote/annotations/Property.java Added Paths: ----------- trunk/qooxdoo-contrib/ServerObjects/trunk/.project trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.2362eb932f0c.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.38c4a3d0a696.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.501c60856d23.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.801ce9c5a095.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.9c9d98f3fdcb.js trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.cdcc6bf539ca.js trunk/qooxdoo-contrib/ServerObjects/trunk/src/ trunk/qooxdoo-contrib/ServerObjects/trunk/src/java/ Added: trunk/qooxdoo-contrib/ServerObjects/trunk/.project =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/.project (rev 0) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/.project 2011-09-07 06:46:22 UTC (rev 21433) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>QSO Trunk Root</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + </natures> +</projectDescription> Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/arraytest/source/class/arraytest/Application.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/arraytest/source/class/arraytest/Application.js 2011-09-02 12:04:21 UTC (rev 21432) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/arraytest/source/class/arraytest/Application.js 2011-09-07 06:46:22 UTC (rev 21433) @@ -67,8 +67,8 @@ arr.addListener("change", function(evt) { var data = evt.getData(); - this.debug(purpose + ": " + data.type + ", start=" + data.start + ", end=" + data.end + ", items=" + qx.util.Json.stringify(data.items)); - this.debug(" ==> " + qx.util.Json.stringify(arr.toArray())); + this.debug(purpose + ": " + data.type + ", start=" + data.start + ", end=" + data.end + ", items=" + qx.lang.Json.stringify(data.items)); + this.debug(" ==> " + qx.lang.Json.stringify(arr.toArray())); }, this); // Doesn't fire event! Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json 2011-09-02 12:04:21 UTC (rev 21432) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/config.json 2011-09-07 06:46:22 UTC (rev 21433) @@ -32,7 +32,7 @@ "translation" ], - "default-job" : "source", + "default-job" : "source-hybrid", "let" : { Modified: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js 2011-09-02 12:04:21 UTC (rev 21432) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/class/demoapp/Application.js 2011-09-07 06:46:22 UTC (rev 21433) @@ -22,7 +22,9 @@ /* ************************************************************************ - #asset(demoapp/*) +#asset(demoapp/*) +#ignore(com.zenesis.qx.remote.test.simple.Pippo) +#ignore(com.zenesis.qx.remote.test.properties.TestProperties) ************************************************************************ */ Added: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.2362eb932f0c.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.2362eb932f0c.js (rev 0) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.2362eb932f0c.js 2011-09-07 06:46:22 UTC (rev 21433) @@ -0,0 +1,297 @@ +/* ************************************************************************ + + 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) + * Alexander Steitz (aback) + * Martin Wittemann (martinwittemann) + +************************************************************************ */ + +/** + * Modern color theme + */ +qx.Theme.define("qx.theme.modern.Color", +{ + colors : + { + /* + --------------------------------------------------------------------------- + BACKGROUND COLORS + --------------------------------------------------------------------------- + */ + + // application, desktop, ... + "background-application" : "#DFDFDF", + + // pane color for windows, splitpanes, ... + "background-pane" : "#F3F3F3", + + // textfields, ... + "background-light" : "#FCFCFC", + + // headers, ... + "background-medium" : "#EEEEEE", + + // splitpane + "background-splitpane" : "#AFAFAF", + + // tooltip, ... + "background-tip" : "#ffffdd", + + // error tooltip + "background-tip-error": "#C72B2B", + + // tables, ... + "background-odd" : "#E4E4E4", + + // html area + "htmlarea-background" : "white", + + // progress bar + "progressbar-background" : "white", + + + + + /* + --------------------------------------------------------------------------- + TEXT COLORS + --------------------------------------------------------------------------- + */ + + // other types + "text-light" : "#909090", + "text-gray" : "#4a4a4a", + + // labels + "text-label" : "#1a1a1a", + + // group boxes + "text-title" : "#314a6e", + + // text fields + "text-input" : "#000000", + + // states + "text-hovered" : "#001533", + "text-disabled" : "#7B7A7E", + "text-selected" : "#fffefe", + "text-active" : "#26364D", + "text-inactive" : "#404955", + "text-placeholder" : "#CBC8CD", + + + + + + + /* + --------------------------------------------------------------------------- + BORDER COLORS + --------------------------------------------------------------------------- + */ + + "border-inner-scrollbar" : "white", + + // menus, tables, scrollbars, list, etc. + "border-main" : "#4d4d4d", + "menu-separator-top" : "#C5C5C5", + "menu-separator-bottom" : "#FAFAFA", + + // between toolbars + "border-separator" : "#808080", + "border-toolbar-button-outer" : "#b6b6b6", + "border-toolbar-border-inner" : "#f8f8f8", + "border-toolbar-separator-right" : "#f4f4f4", + "border-toolbar-separator-left" : "#b8b8b8", + + // text fields + "border-input" : "#334866", + "border-inner-input" : "white", + + // disabled text fields + "border-disabled" : "#B6B6B6", + + // tab view, window + "border-pane" : "#00204D", + + // buttons + "border-button" : "#666666", + + // tables (vertical line) + "border-column" : "#CCCCCC", + + // focus state of text fields + "border-focused" : "#99C3FE", + + // invalid form widgets + "invalid" : "#990000", + "border-focused-invalid" : "#FF9999", + + // drag & drop + "border-dragover" : "#33508D", + + "keyboard-focus" : "black", + + + /* + --------------------------------------------------------------------------- + TABLE COLORS + --------------------------------------------------------------------------- + */ + + // equal to "background-pane" + "table-pane" : "#F3F3F3", + + // own table colors + // "table-row-background-selected" and "table-row-background-focused-selected" + // are inspired by the colors of the selection decorator + "table-focus-indicator" : "#0880EF", + "table-row-background-focused-selected" : "#084FAB", + "table-row-background-focused" : "#80B4EF", + "table-row-background-selected" : "#084FAB", + + // equal to "background-pane" and "background-odd" + "table-row-background-even" : "#F3F3F3", + "table-row-background-odd" : "#E4E4E4", + + // equal to "text-selected" and "text-label" + "table-row-selected" : "#fffefe", + "table-row" : "#1a1a1a", + + // equal to "border-collumn" + "table-row-line" : "#CCC", + "table-column-line" : "#CCC", + + "table-header-hovered" : "white", + + /* + --------------------------------------------------------------------------- + PROGRESSIVE TABLE COLORS + --------------------------------------------------------------------------- + */ + + "progressive-table-header" : "#AAAAAA", + "progressive-table-header-border-right" : "#F2F2F2", + + + "progressive-table-row-background-even" : "#F4F4F4", + "progressive-table-row-background-odd" : "#E4E4E4", + + "progressive-progressbar-background" : "gray", + "progressive-progressbar-indicator-done" : "#CCCCCC", + "progressive-progressbar-indicator-undone" : "white", + "progressive-progressbar-percent-background" : "gray", + "progressive-progressbar-percent-text" : "white", + + + /* + --------------------------------------------------------------------------- + CSS ONLY COLORS + --------------------------------------------------------------------------- + */ + "selected-start" : "#004DAD", + "selected-end" : "#00368A", + + "tabview-background" : "#07125A", + + "shadow" : qx.core.Environment.get("css.rgba") ? "rgba(0, 0, 0, 0.4)" : "#999999", + + "pane-start" : "#FBFBFB", + "pane-end" : "#F0F0F0", + + "group-background" : "#E8E8E8", + "group-border" : "#B4B4B4", + + "radiobutton-background" : "#EFEFEF", + + "checkbox-border" : "#314A6E", + "checkbox-focus" : "#87AFE7", + "checkbox-hovered" : "#B2D2FF", + "checkbox-hovered-inner" : "#D1E4FF", + "checkbox-inner" : "#EEEEEE", + "checkbox-start" : "#E4E4E4", + "checkbox-end" : "#F3F3F3", + "checkbox-disabled-border" : "#787878", + "checkbox-disabled-inner" : "#CACACA", + "checkbox-disabled-start" : "#D0D0D0", + "checkbox-disabled-end" : "#D8D8D8", + "checkbox-hovered-inner-invalid" : "#FAF2F2", + "checkbox-hovered-invalid" : "#F7E9E9", + + "radiobutton-checked" : "#005BC3", + "radiobutton-disabled" : "#D5D5D5", + "radiobutton-checked-disabled" : "#7B7B7B", + "radiobutton-hovered-invalid" : "#F7EAEA", + + "tooltip-error" : "#C82C2C", + + "scrollbar-start" : "#CCCCCC", + "scrollbar-end" : "#F1F1F1", + "scrollbar-slider-start" : "#EEEEEE", + "scrollbar-slider-end" : "#C3C3C3", + + "button-border-disabeld" : "#959595", + "button-start" : "#F0F0F0", + "button-end" : "#AFAFAF", + "button-disabled-start" : "#F4F4F4", + "button-disabled-end" : "#BABABA", + "button-hovered-start" : "#F0F9FE", + "button-hovered-end" : "#8EB8D6", + "button-focused" : "#83BAEA", + + "border-invalid" : "#930000", + + "input-start" : "#F0F0F0", + "input-end" : "#FBFCFB", + "input-focused-start" : "#D7E7F4", + "input-focused-end" : "#5CB0FD", + "input-focused-inner-invalid" : "#FF6B78", + "input-border-disabled" : "#9B9B9B", + "input-border-inner" : "white", + + "toolbar-start" : "#EFEFEF", + "toolbar-end" : "#DDDDDD", + + "window-border" : "#00204D", + "window-border-caption" : "#727272", + "window-caption-active-text" : "white", + "window-caption-active-start" : "#084FAA", + "window-caption-active-end" : "#003B91", + "window-caption-inactive-start" : "#F2F2F2", + "window-caption-inactive-end" : "#DBDBDB", + "window-statusbar-background" : "#EFEFEF", + + "tabview-start" : "#FCFCFC", + "tabview-end" : "#EEEEEE", + "tabview-inactive" : "#777D8D", + "tabview-inactive-start" : "#EAEAEA", + "tabview-inactive-end" : "#CECECE", + + "table-header-start" : "#E8E8E8", + "table-header-end" : "#B3B3B3", + + "menu-start" : "#E8E8E9", + "menu-end" : "#D9D9D9", + "menubar-start" : "#E8E8E8", + + "groupitem-start" : "#A7A7A7", + "groupitem-end" : "#949494", + "groupitem-text" : "white", + "virtual-row-layer-background-even" : "white", + "virtual-row-layer-background-odd" : "white" + } +}); Added: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.38c4a3d0a696.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.38c4a3d0a696.js (rev 0) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.38c4a3d0a696.js 2011-09-07 06:46:22 UTC (rev 21433) @@ -0,0 +1,87 @@ +/* ************************************************************************ + + 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) + +************************************************************************* */ + +/** + * The modern font theme. + */ +qx.Theme.define("qx.theme.modern.Font", +{ + fonts : + { + "default" : + { + size : (qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista")) ? 12 : 11, + lineHeight : 1.4, + family : qx.core.Environment.get("os.name") == "osx" ? + [ "Lucida Grande" ] : + ((qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista"))) ? + [ "Segoe UI", "Candara" ] : + [ "Tahoma", "Liberation Sans", "Arial", "sans-serif" ] + }, + + "bold" : + { + size : (qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista")) ? 12 : 11, + lineHeight : 1.4, + family : qx.core.Environment.get("os.name") == "osx" ? + [ "Lucida Grande" ] : + ((qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista"))) ? + [ "Segoe UI", "Candara" ] : + [ "Tahoma", "Liberation Sans", "Arial", "sans-serif" ], + bold : true + }, + + "small" : + { + size : (qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista")) ? 11 : 10, + lineHeight : 1.4, + family : qx.core.Environment.get("os.name") == "osx" ? + [ "Lucida Grande" ] : + ((qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista"))) ? + [ "Segoe UI", "Candara" ] : + [ "Tahoma", "Liberation Sans", "Arial", "sans-serif" ] + }, + + "monospace" : + { + size: 11, + lineHeight : 1.4, + family : qx.core.Environment.get("os.name") == "osx" ? + [ "Lucida Console", "Monaco" ] : + ((qx.core.Environment.get("os.name") == "win" && + (qx.core.Environment.get("os.version") == "7" || + qx.core.Environment.get("os.version") == "vista"))) ? + [ "Consolas" ] : + [ "Consolas", "DejaVu Sans Mono", "Courier New", "monospace" ] + } + } +}); Added: trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.501c60856d23.js =================================================================== --- trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.501c60856d23.js (rev 0) +++ trunk/qooxdoo-contrib/ServerObjects/trunk/client/demoapp/source/script/demoapp.501c60856d23.js 2011-09-07 06:46:22 UTC (rev 21433) @@ -0,0 +1,12719 @@ +/* ************************************************************************ + + 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) + +************************************************************************ */ + +/** + * Contains some common methods available to all log appenders. + */ +qx.Class.define("qx.log.appender.Util", +{ + statics : + { + /** + * Converts a single log entry to HTML + * + * @signature function(entry) + * @param entry {Map} The entry to process + * @return {void} + */ + toHtml : function(entry) + { + var output = []; + var item, msg, sub, list; + + output.push("<span class='offset'>", this.formatOffset(entry.offset, 6), "</span> "); + + if (entry.object) + { + var obj = entry.win.qx.core.ObjectRegistry.fromHashCode(entry.object); + if (obj) { + output.push("<span class='object' title='Object instance with hash code: " + obj.$$hash + "'>", obj.classname, "[" , obj.$$hash, "]</span>: "); + } + } + else if (entry.clazz) + { + output.push("<span class='object'>" + entry.clazz.classname, "</span>: "); + } + + var items = entry.items; + for (var i=0, il=items.length; i<il; i++) + { + item = items[i]; + msg = item.text; + + if (msg instanceof Array) + { + var list = []; + + for (var j=0, jl=msg.length; j<jl; j++) + { + sub = msg[j]; + if (typeof sub === "string") { + list.push("<span>" + this.escapeHTML(sub) + "</span>"); + } else if (sub.key) { + list.push("<span class='type-key'>" + sub.key + "</span>:<span class='type-" + sub.type + "'>" + this.escapeHTML(sub.text) + "</span>"); + } else { + list.push("<span class='type-" + sub.type + "'>" + this.escapeHTML(sub.text) + "</span>"); + } + } + + output.push("<span class='type-" + item.type + "'>"); + + if (item.type === "map") { + output.push("{", list.join(", "), "}"); + } else { + output.push("[", list.join(", "), "]"); + } + + output.push("</span>"); + } + else + { + output.push("<span class='type-" + item.type + "'>" + this.escapeHTML(msg) + "</span> "); + } + } + + var wrapper = document.createElement("DIV"); + wrapper.innerHTML = output.join(""); + wrapper.className = "level-" + entry.level; + + return wrapper; + }, + + + /** + * Formats a numeric time offset to 6 characters. + * + * @param offset {Integer} Current offset value + * @param length {Integer?6} Refine the length + * @return {String} Padded string + */ + formatOffset : function(offset, length) + { + var str = offset.toString(); + var diff = (length||6) - str.length; + var pad = ""; + + for (var i=0; i<diff; i++) { + pad += "0"; + } + + return pad+str; + }, + + + /** + * User-defined formatter for stack trace information. If the value is a + * function, it will be called with the raw stack trace string as the only + * argument. The return value is then appended to the log message. + */ + FORMAT_STACK : null, + + + /** + * Escapes the HTML in the given value + * + * @param value {String} value to escape + * @return {String} escaped value + */ + escapeHTML : function(value) { + return String(value).replace(/[<>&"']/g, this.__escapeHTMLReplace); + }, + + + /** + * Internal replacement helper for HTML escape. + * + * @param ch {String} Single item to replace. + * @return {String} Replaced item + */ + __escapeHTMLReplace : function(ch) + { + var map = + { + "<" : "<", + ">" : ">", + "&" : "&", + "'" : "'", + '"' : """ + }; + + return map[ch] || "?"; + }, + + + /** + * Converts a single log entry to plain text + * + * @param entry {Map} The entry to process + * @return {String} the formatted log entry + */ + toText : function(entry) { + return this.toTextArray(entry).join(" "); + }, + + + /** + * Converts a single log entry to an array of plain text + * + * @param entry {Map} The entry to process + * @return {Array} Argument list ready message array. + */ + toTextArray : function(entry) + { + var output = []; + + output.push(this.formatOffset(entry.offset, 6)); + + if (entry.object) + { + var obj = entry.win.qx.core.ObjectRegistry.fromHashCode(entry.object); + if (obj) { + output.push(obj.classname + "[" + obj.$$hash + "]:"); + } + } + else if (entry.clazz) { + output.push(entry.clazz.classname + ":"); + } + + var items = entry.items; + var item, msg; + for (var i=0, il=items.length; i<il; i++) + { + item = items[i]; + msg = item.text; + + if (item.trace && item.trace.length > 0) { + if (typeof(this.FORMAT_STACK) == "function") { + msg += "\n" + this.FORMAT_STACK(item.trace); + } else { + msg += "\n" + item.trace; + } + } + + if (msg instanceof Array) + { + var list = []; + for (var j=0, jl=msg.length; j<jl; j++) { + list.push(msg[j].text); + } + + if (item.type === "map") { + output.push("{", list.join(", "), "}"); + } else { + output.push("[", list.join(", "), "]"); + } + } + else + { + output.push(msg); + } + } + + return output; + } + } +}); +/* ************************************************************************ + + 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) + +************************************************************************ */ + +/* ************************************************************************ + +#require(qx.log.appender.Util) + +************************************************************************ */ + +/** + * Processes the incoming log entry and displays it by means of the native + * logging capabilities of the client. + * + * Supported browsers: + * * Firefox using an installed FireBug. + * * Safari using newer features of Web Inspector. + * * Internet Explorer 8. + * + * Currently unsupported browsers: + * * Opera using the <code>postError</code> (disabled due to missing + * functionality in opera as of version 9.6). + */ +qx.Class.define("qx.log.appender.Native", +{ + /* + ***************************************************************************** + STATICS + ***************************************************************************** + */ + + statics : + { + /** + * Processes a single log entry + * + * @signature function(entry) + * @param entry {Map} The entry to process + * @return {void} + */ + process : qx.core.Environment.select("engine.name", + { + "gecko" : function(entry) + { + if (window.console) { + console[entry.level].call(console, qx.log.appender.Util.toText(entry)); + } + }, + + "mshtml" : function(entry) + { + if (window.console) + { + var level = entry.level; + if (level == "debug") { + level = "log"; + } + + // IE8 as of RC1 does not support "apply" on the console object methods + var args = qx.log.appender.Util.toText(entry); + console[level](args); + } + }, + + "webkit" : function(entry) + { + if (window.console) + { + var level = entry.level; + if (level == "debug") { + level = "log"; + } + + // Webkit does not support "apply" on the console object methods + var args = qx.log.appender.Util.toText(entry); + console[level](args); + } + }, + + "opera" : function(entry) + { + // Opera's debugging as of 9.6 is not really useful, so currently + // qooxdoo's own console makes more sense + + /* + if (window.opera && opera.postError) { + opera.postError.apply(opera, qx.log.appender.Util.toTextArray(entry)); + } + */ + } + }) + }, + + + + + /* + ***************************************************************************** + DEFER + ***************************************************************************** + */ + + defer : function(statics) { + qx.log.Logger.register(statics); + } +}); +/* ************************************************************************ + + 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) + +************************************************************************ */ + +/* ************************************************************************ + +#require(qx.event.handler.Window) +#require(qx.event.handler.Keyboard) + +************************************************************************ */ + +/** + * Feature-rich console appender for the qooxdoo logging system. + * + * Creates a small inline element which is placed in the top-right corner + * of the window. Prints all messages with a nice color highlighting. + * + * * Allows user command inputs. + * * Command history enabled by default (Keyboard up/down arrows). + * * Lazy creation on first open. + * * Clearing the console using a button. + * * Display of offset (time after loading) of each message + * * Supports keyboard shortcuts F7 or Ctrl+D to toggle the visibility + */ +qx.Class.define("qx.log.appender.Console", +{ + statics : + { + /* + --------------------------------------------------------------------------- + INITIALIZATION AND SHUTDOWN + --------------------------------------------------------------------------- + */ + + /** + * Initializes the console, building HTML and pushing last + * log messages to the output window. + * + * @return {void} + */ + init : function() + { + // Build style sheet content + var style = + [ + '.qxconsole{z-index:10000;width:600px;height:300px;top:0px;right:0px;position:absolute;border-left:1px solid black;color:black;border-bottom:1px solid black;color:black;font-family:Consolas,Monaco,monospace;font-size:11px;line-height:1.2;}', + + '.qxconsole .control{background:#cdcdcd;border-bottom:1px solid black;padding:4px 8px;}', + '.qxconsole .control a{text-decoration:none;color:black;}', + + '.qxconsole .messages{background:white;height:100%;width:100%;overflow:auto;}', + '.qxconsole .messages div{padding:0px 4px;}', + + '.qxconsole .messages .user-command{color:blue}', + '.qxconsole .messages .user-result{background:white}', + '.qxconsole .messages .user-error{background:#FFE2D5}', + '.qxconsole .messages .level-debug{background:white}', + '.qxconsole .messages .level-info{background:#DEEDFA}', + '.qxconsole .messages .level-warn{background:#FFF7D5}', + '.qxconsole .messages .level-error{background:#FFE2D5}', + '.qxconsole .messages .level-user{background:#E3EFE9}', + '.qxconsole .messages .type-string{color:black;font-weight:normal;}', + '.qxconsole .messages .type-number{color:#155791;font-weight:normal;}', + '.qxconsole .messages .type-boolean{color:#15BC91;font-weight:normal;}', + '.qxconsole .messages .type-array{color:#CC3E8A;font-weight:bold;}', + '.qxconsole .messages .type-map{color:#CC3E8A;font-weight:bold;}', + '.qxconsole .messages .type-key{color:#565656;font-style:italic}', + '.qxconsole .messages .type-class{color:#5F3E8A;font-weight:bold}', + '.qxconsole .messages .type-instance{color:#565656;font-weight:bold}', + '.qxconsole .messages .type-stringify{color:#565656;font-weight:bold}', + + '.qxconsole .command{background:white;padding:2px 4px;border-top:1px solid black;}', + '.qxconsole .command input{width:100%;border:0 none;font-family:Consolas,Monaco,monospace;font-size:11px;line-height:1.2;}', + '.qxconsole .command input:focus{outline:none;}' + ]; + + // Include stylesheet + qx.bom.Stylesheet.createElement(style.join("")); + + // Build markup + var markup = + [ + '<div class="qxconsole">', + '<div class="control"><a href="javascript:qx.log.appender.Console.clear()">Clear</a> | <a href="javascript:qx.log.appender.Console.toggle()">Hide</a></div>', + '<div class="messages">', + '</div>', + '<div class="command">', + '<input type="text"/>', + '</div>', + '</div>' + ]; + + // Insert HTML to access DOM node + var wrapper = document.createElement("DIV"); + wrapper.innerHTML = markup.join(""); + var main = wrapper.firstChild; + document.body.appendChild(wrapper.firstChild); + + // Make important DOM nodes available + this.__main = main; + this.__log = main.childNodes[1]; + this.__cmd = main.childNodes[2].firstChild; + + // Correct height of messages frame + this.__onResize(); + + // Finally register to log engine + qx.log.Logger.register(this); + + // Register to object manager + qx.core.ObjectRegistry.register(this); + }, + + + /** + * Used by the object registry to dispose this instance e.g. remove listeners etc. + * + * @return {void} + */ + dispose : function() + { + qx.event.Registration.removeListener(document.documentElement, "keypress", this.__onKeyPress, this); + qx.log.Logger.unregister(this); + }, + + + + + + /* + --------------------------------------------------------------------------- + INSERT & CLEAR + --------------------------------------------------------------------------- + */ + + /** + * Clears the current console output. + * + * @return {void} + */ + clear : function() + { + // Remove all messages + this.__log.innerHTML = ""; + }, + + + /** + * Processes a single log entry + * + * @signature function(entry) + * @param entry {Map} The entry to process + * @return {void} + */ + process : function(entry) + { + // Append new content + this.__log.appendChild(qx.log.appender.Util.toHtml(entry)); + + // Scroll down + this.__scrollDown(); + }, + + + /** + * Automatically scroll down to the last line + */ + __scrollDown : function() { + this.__log.scrollTop = this.__log.scrollHeight; + }, + + + + + + /* + --------------------------------------------------------------------------- + VISIBILITY TOGGLING + --------------------------------------------------------------------------- + */ + + /** {Boolean} Flag to store last visibility status */ + __visible : true, + + + /** + * Toggles the visibility of the console between visible and hidden. + * + * @return {void} + */ + toggle : function() + { + if (!this.__main) + { + this.init(); + } + else if (this.__main.style.display == "none") + { + this.show(); + } + else + { + this.__main.style.display = "none"; + } + }, + + + /** + * Shows the console. + * + * @return {void} + */ + show : function() + { + if (!this.__main) { + this.init(); + } else { + this.__main.style.display = "block"; + this.__log.scrollTop = this.__log.scrollHeight; + } + }, + + + /* + --------------------------------------------------------------------------- + COMMAND LINE SUPPORT + --------------------------------------------------------------------------- + */ + + /** {Array} List of all previous commands. */ + __history : [], + + + /** + * Executes the currently given command + * + * @return {void} + */ + execute : function() + { + var value = this.__cmd.value; + if (value == "") { + return; + } + + if (value == "clear") { + return this.clear(); + } + + var command = document.createElement("div"); + command.innerHTML = qx.log.appender.Util.escapeHTML(">>> " + value); + command.className = "user-command"; + + this.__history.push(value); + this.__lastCommand = this.__history.length; + this.__log.appendChild(command); + this.__scrollDown(); + + try { + var ret = window.eval(value); + } + catch (ex) { + qx.log.Logger.error(ex); + } + + if (ret !== undefined) { + qx.log.Logger.debug(ret); + } + }, + + + + + /* + --------------------------------------------------------------------------- + EVENT LISTENERS + --------------------------------------------------------------------------- + */ + + /** + * Event handler for resize listener + * + * @param e {Event} Event object + * @return {void} + */ + __onResize : function(e) { + this.__log.style.height = (this.__main.clientHeight - this.__main.firstChild.offsetHeight - this.__main.lastChild.offsetHeight) + "px"; + }, + + + /** + * Event handler for keydown listener + * + * @param e {Event} Event object + * @return {void} + */ + __onKeyPress : function(e) + { + var iden = e.getKeyIdentifier(); + + // Console toggling + if ((iden == "F7") || (iden == "D" && e.isCtrlPressed())) + { + this.toggle(); + e.preventDefault(); + } + + // Not yet created + if (!this.__main) { + return; + } + + // Active element not in console + if (!qx.dom.Hierarchy.contains(this.__main, e.getTarget())) { + return; + } + + // Command execution + if (iden == "Enter" && this.__cmd.value != "") + { + this.execute(); + this.__cmd.value = ""; + } + + // History managment + if (iden == "Up" || iden == "Down") + { + this.__lastCommand += iden == "Up" ? -1 : 1; + this.__lastCommand = Math.min(Math.max(0, this.__lastCommand), this.__history.length); + + var entry = this.__history[this.__lastCommand]; + this.__cmd.value = entry || ""; + this.__cmd.select(); + } + } + }, + + + + + /* + ***************************************************************************** + DEFER + ***************************************************************************** + */ + + defer : function(statics) { + qx.event.Registration.addListener(document.documentElement, "keypress", statics.__onKeyPress, statics); + } +}); +/* ************************************************************************ + + server-objects - a contrib to the Qooxdoo project (http://qooxdoo.org/) + + http://qooxdoo.org + + Copyright: + 2010 Zenesis Limited, http://www.zenesis.com + + License: + LGPL: http://www.gnu.org/licenses/lgpl.html + EPL: http://www.eclipse.org/org/documents/epl-v10.php + + This software is provided under the same licensing terms as Qooxdoo, + please see the LICENSE file in the Qooxdoo project's top-level directory + for details. + + Authors: + * John Spackman (joh...@ze...) + +************************************************************************ */ + +/** + * ProxyManager + * + * The client must provide an implementation of this class so that the proxy classes + * have an implementation-neutral means to send data to the server + * + * Matches the server-side c.z.g.af.remote.ProxyManager. + * + * @author John Spackman [joh...@ze...] + */ +qx.Class.define("com.zenesis.qx.remote.ProxyManager", { + extend: qx.core.Object, + + statics: { + __instance: null, + + /** + * Called to set the singleton global instance that will be used to send data + */ + setInstance: function(instance) { + if (this.__instance && instance) + this.warn("Overwriting existing instance " + this.__instance + " with " + instance); + this.__instance = instance; + }, + + /** + * Returns the current instance + */ + getInstance: function() { + return this.__instance; + } + }, + + construct: function(proxyUrl) { + if (this.constructor.__instance) + this.warn("Not setting ProxyManager instance because one is already defined"); + else + com.zenesis.qx.remote.ProxyManager.setInstance(this); + + this.__serverObjects = []; + this.setProxyUrl(proxyUrl); + + /* + * Qooxdoo 0.8.2 compatability + */ + if (!qx.lang.Type) { + qx.lang.Type = { + getClass: function(value) { + var classString = Object.prototype.toString.call(value); + return classString.slice(8, -1); + }, + isArray: qx.lang.Array.isArray, + isDate: function(value) { + // Added "value !== null" because IE throws an exception "Object expected" + // by executing "value instanceof Array" if value is a DOM element that + // doesn't exist. It seems that there is a internal different between a + // JavaScript null and a null returned from calling DOM. + // e.q. by document.getElementById("ReturnedNull"). + return ( + value !== null && ( + this.getClass(value) == "Date" || + value instanceof Date) + ); + } + }; + } + }, + + properties: { + proxyUrl: { + init: null, + nullable: false, + check: "String" + } + }, + + events: { + "exception": "qx.event.type.Data" + }, + + members: { + + // Server object array and hash lookup + __serverObjects: null, + + // Client-created server objects and hash lookup + __clientObjects: null, + + // Dirty arrays + __dirtyArrays: null, + + // Extra class information + __classInfo: {}, + + // Classes currently being defined + __classesBeingDefined: {}, + + // Queue of commands to send to the server at the next flush + __queue: null, + + // The property currently being set, if any (used to prevent recursive sets) + __setPropertyObject: null, + __setPropertyName: null, + + // The number of call backs to the server + __numberOfCalls: 0, + + // Exception returned from the server, to be thrown at end of current function call + __exception: null, + + /** + * The Servlet at the other end is configured to return an initial object for this + * session; it can be any arbitrary object because QRJO will instantiate it correctly + * at this end. That becomes the entry point for the application from here on in. + * + * Can be called multiple times, the first object is always returned. + */ + getBootstrapObject: function() { + if (this.__serverObjects.length) + return this.__serverObjects[0]; + var result = null; + var msg = { cmd: "bootstrap" }; + this._sendCommandToServer(msg, function(evt) { + result = this._processResponse(evt, true); + }, this); + var ex = this.clearException(); + if (ex) + throw ex; + return result; + }, + + /** + * Detects whether the connection has ever been made, i.e. whether getBootstrapObject() has + * already been called. + * @return true if connected + */ + hasConnected: function() { + return this.__serverObjects.length > 0; + }, + + /** + * Registers a client object + * @return the new ID for this object + */ + registerClientObject: function(obj) { + if (!this.__clientObjects) + this.__clientObjects = [ "invalid" ]; + var index = this.__clientObjects.length; + this.__clientObjects[index] = obj; + return 0 - index; + }, + + /** + * Handles the "completed" event from the Request + * @param evt {Response} the response event + */ + _processResponse: function(evt) { + var txt = evt.getContent(); + var statusCode = evt.getStatusCode(); + + if (statusCode == 200) { + txt = qx.lang.String.trim(txt); + try { + //this.debug("received: txt=" + txt); + if (!txt.length) + return null; + var data = eval("(" + txt + ")"); + return this._processData(data); + } catch(e) { + this.debug("Exception during receive: " + this.__describeException(e)); + this._setException(e); + } + + } else { + this.debug("Error returned by server, code=" + statusCode); + this._setException(new Error("statusCode=" + statusCode)); + } + }, + + /** + * Called to handle the response from an upload + */ + uploadResponse: function(txt) { + txt = qx.lang.String.trim(txt); + try { + //this.debug("received: txt=" + txt); + if (!txt.length) + return null; + var data = eval("(" + txt + ")"); + return this._processData(data); + } catch(e) { + this.debug("Exception during uploadResponse: " + this.__describeException(e)); + throw e; + } + }, + + /** + * Called to interpret the text returned by the server and perform any commands + * @param data {Object} the response compiled from JSON + */ + _processData: function(data) { + var result = null; + for (var i = 0, l = data.length; i < l; i++) { + var elem = data[i]; + var type = elem.type; + + // Init or Function return + if (type == "bootstrap" || type == "return") { + qx.core.Assert.assertNull(result, "Multiple function returns in data from server"); + result = this._readProxyObject(elem.data); + + // An exception was thrown + } else if (type == "exception") { + this._handleServerException(elem.data, "function"); + + // A client-created object has been registered on the server, update the IDs to server IDs + } else if (type == "mapClientId") { + var index = 0 - elem.data.clientId; + var clientObject = this.__clientObjects[index]; + this.__clientObjects[index] = null; + qx.core.Assert.assertEquals(elem.data.clientId, clientObject.getServerId()); + + clientObject.setServerId(elem.data.serverId); + qx.core.Assert.assertEquals(elem.data.serverId, this.__serverObjects.length); + this.__serverObjects[elem.data.serverId] = clientObject; + + // Setting a property failed with an exception - change the value back and handle the exception + } else if (type == "restore") { + var obj = this._readProxyObject(elem.object); + try { + var value = this._readProxyObject(elem.data.oldValue); + this.setPropertyValueFromServer(obj, elem.name, value); + } catch(e) { + // Ignore it - we were only trying to recover from a server exception + } + this._handleServerException(elem.data, "property"); + + // A server property value changed, update the client + } else if (type == "set") { + var obj = this._readProxyObject(elem.object); + var value = this._readProxyObject(elem.data); + this.setPropertyValueFromServer(obj, elem.name, value); + + // An on demand server property value changed, clear the cache + } else if (type == "expire") { + var obj = this._readProxyObject(elem.object); + var upname = qx.lang.String.firstUp(elem.name); + obj["expire" + upname](false); + + // The server has sent a class definition + } else if (type == "define") { + this.getClassOrCreate(elem.object); + + // An event was fired on the server + } else if (type == "fire") { + var obj = this._readProxyObject(elem.object); + var eventData = elem.data ? this._readProxyObject(elem.data) : null; + obj.fireDataEvent(elem.name, eventData); + + // Explicitly load a type onto the client + } else if (type == "load-type") { + var clazz = this.getClassOrCreate(elem.object); + + // Unknown! + } else + qx.core.Assert.assertTrue(false, "Unexpected type of command from server: " + type); + } + + // Once all client objects are processed, the __clientObjects array should be full of + // nulls and therefore all client IDs are disposed of (and replaced with server IDs); + // when this is the case, we can reset the client ids array + var cos = this.__clientObjects; + if (cos && cos.length > 1) { + var isEmpty = true; + for (var i = 1; i < cos.length; i++) + if (cos[i] != null) { + isEmpty = false; + break; + } + if (isEmpty) + this.__clientObjects = null; + } + + return result; + }, + + /** + * Reads a proxy object from the server and either creates a new + * object (creating classes as required) or returns an existing one + */ + _readProxyObject: function(data) { + if (typeof data == "undefined" || data === null) + return null; + var result = null; + + // Array - unpack individual elements + if (qx.lang.Type.isArray(data)) { + // Do we really have to process each element? + var ok = true; + for (var i = 0; ok && i < data.length; i++) + if (typeof data[i] == "object") + ok = false; + + // All simple values, just use the parsed data + if (ok) + result = data; + + // Copy values by hand + else { + result = []; + for (var i = 0; i < data.length; i++) + result[i] = this._readProxyObject(data[i]); + } + + // Object - is it a server object or a map? + } else if (typeof data == "object") { + + // It's a server object + if (data.serverId != undefined) { + var serverId = data.serverId; + + // Get or create it + result = this.getServerObject(serverId); + if (!result) { + var clazz = this.getClassOrCreate(data.clazz); + result = this.__serverObjects[serverId] = new clazz(serverId); + } + + // Assign any values + if (data.order) { + for (var i = 0; i < data.order.length; i++) { + var propName = data.order[i]; + var propValue = data.values[propName]; +// if (propName == "resources" || propName == "questions") +// debugger; + if (propValue) + propValue = this._readProxyObject(propValue); + this.setPropertyValueFromServer(result, propName, propValue); + } + } + /* Cannot cycle through the names in "values" because the order is not guaranteed, + * and ordering is important if we're going to be able to recreate the objects because + * only the first reference contains the class and object definition - thereafter, + * just a serverId is sent + if (data.values) { + for (var propName in data.values) { + var propValue = data.values[propName]; + if (propValue) + propValue = this._readProxyObject(propValue); + this.setPropertyValueFromServer(result, propName, propValue); + } + } + */ + + // Prefetched method return values + if (data.prefetch) { + for (var methodName in data.prefetch) { + var value = data.prefetch[methodName]; + if (!result.$$proxy.cachedResults) + result.$$proxy.cachedResults = {}; + if (value) + value = this._readProxyObject(value); + result.$$proxy.cachedResults[methodName] = value; + } + } + + // Must be a map + } else { + // Do we really have to process every value? + var ok = true; + for (var propName in data) + if (typeof data[propName] == "object") { + ok = false; + break; + } + + // All simple values? then just use the already parsed data + if (ok) + result = data; + + // Copy one by one, recursively + else { + /* Note that ordering is not defined and if server objects with recursive + * references are passed for the first time in a map, they may fail to create. + */ + result = {}; + for (var propName in data) { + var propValue = data[propName]; + if (propValue) + propValue = this._readProxyObject(propValue); + result[propName] = propValue; + } + } + } + + // Scalar value, just use it direct + } else + result = data; + + return result; + }, + + /** + * Reads a "clazz" and interprets it to return a class, creating new + * class definitions as required + */ + getClassOrCreate: function(data) { + // If it's a string, then it's an existing class we need to create + if (typeof data == "string") { + if (this.__classesBeingDefined[data]) + return null; + var clazz = eval(data); + return clazz; + } + + this.__classesBeingDefined[data.className] = true; + try { + // Create the JSON definition for qx.Class + var def; + if (data.isInterface) + def = { members: { } }; + else { + def = { + construct: /*function(serverId) { + this.base(arguments, serverId); + },*/ new Function('serverId', 'this.base(arguments, serverId); this.$$proxy = {};'), + members: { } + }; + if (data.extend) { + def.extend = this.getClassOrCreate(data.extend); + data.extend = def.extend.prototype.$$proxyDef; + } else + def.extend = com.zenesis.qx.remote.Proxy; + } + + // Add interfaces + if (data.interfaces) { + var interfaces = data.interfaces; + for (var i = 0; i < data.interfaces.length; i++) + interfaces[i] = this.getClassOrCreate(interfaces[i]); + if (interfaces.length) { + if (data.isInterface) + def.extend = interfaces; + else + def.implement = interfaces; + } + } + + // Add methods + if (data.methods) + for (var methodName in data.methods) { + var method = data.methods[methodName]; + method.name = methodName; + if (data.isInterface) + def.members[methodName] = new Function(''); + else + def.members[methodName] = new Function('return this._callServer("' + methodName + '", qx.lang.Array.fromArguments(arguments));'); + + if (method.returnType) + this.getClassOrCreate(method.returnType); +// if (methodName == "addQuestion") +// debugger; + + var params = method.parameters; + if (params) + for (var i = 0; i < params.length; i++) { + if (params[i]) + params[i] = this.getClassOrCreate(params[i]); + } + } + + // Add properties + var onDemandProperties = []; + if (data.properties) { + def.properties = {}; + for (var propName in data.properties) { + var fromDef = data.properties[propName]; + fromDef.name = propName; + + var propClass = null; + if (fromDef.clazz) + propClass = this.getClassOrCreate(fromDef.clazz); + + var toDef = def.properties[propName] = {}; + + // Define the property + toDef.nullable = fromDef.nullable; + if (fromDef.event) + toDef.event = fromDef.event; + + // Handle arrays + if (fromDef.array) { + if (fromDef.array == "wrap") { + toDef.transform = "_transformToDataArray"; + toDef.check = "qx.data.Array"; + } else + toDef.check = "Array"; + + // Other checks + } else if (fromDef.check) + toDef.check = fromDef.check||fromDef.clazz; + + // Create an apply method + var applyName = "_apply" + qx.lang.String.firstUp(propName); + toDef.apply = applyName; + def.members[applyName] = new Function('value', 'this._applyProperty("' + propName + '", value);'); + + // onDemand properties - patch it later + if (fromDef.onDemand) + onDemandProperties[onDemandProperties.length] = fromDef; + } + } + + // Add events + if (data.events) { + def.events = {}; + for (var eventName in data.events) { + var fromDef = data.events[eventName]; + if (!fromDef.isProperty) + def.events[eventName] = "qx.event.type.Data"; + } + } + + // Define the class + var clazz; + if (data.isInterface) { + clazz = qx.Interface.define(data.className, def)||qx.Interface.getByName(data.className); + clazz.$$proxyDef = data; + } else { + clazz = qx.Class.define(data.className, def)||qx.Class.getByName(data.className); + clazz.prototype.$$proxyDef = data; + } + this.__classInfo[data.className] = data; + + // Patch on demand properties + for (var i = 0; i < onDemandProperties.length; i++) { + var propDef = onDemandProperties[i]; + this.__addOnDemandProperty(clazz, propDef.name, propDef.readOnly||false); + } + + // Done + return clazz; + }finally { + delete this.__classesBeingDefined[data.className]; + } + }, + + /** + * Adds an on-demand property + */ + __addOnDemandProperty: function(clazz, propName, readOnly) { + var upname = qx.lang.String.firstUp(propName); + clazz.prototype["get" + upname] = function() { + return this._getPropertyOnDemand(propName); + }; + clazz.prototype["expire" + upname] = function(sendToServer) { + return this._expirePropertyOnDemand(propName, sendToServer); + }; + if (!readOnly) + clazz.prototype["set" + upname] = function(value) { + return this._setPropertyOnDemand(propName, value); + }; + }, + + /** + * Returns the class definition received from the server for a named class + */ + getClassInfo: function(className) { + var info = this.__classInfo[className]; + qx.core.Assert.assertNotNull(info); + return info; + }, + + /** + * Serialises a value for sending to the server + */ + serializeValue: function(value) { + if (!value) + return value; + + if (qx.lang.Type.isArray(value)) { + var send = []; + for (var j = 0; j < value.length; j++) { + if (typeof value[j] === "undefined" || value[j] === null) + send[j] = null; + else + send[j] = this.serializeValue(value[j]); + } + return send; + } + + if (qx.lang.Type.isDate(value)) { + return value.getTime(); + } + + if (!value.classname) + return value; + + if (qx.Class.isSubClassOf(value.constructor, com.zenesis.qx.remote.Proxy)) + return value.getServerId(); + + if (qx.Class.isSubClassOf(value.constructor, qx.data.Array)) + return value.toArray(); + + if (qx.Class.isSubClassOf(value.constructor, qx.core.Object)) { + this.debug("Cannot serialize a Qooxdoo object to the server unless it implements com.zenesis.qx.remote.Proxied"); + return null; + } + + return value; + }, + + /** + * Called by Proxy to call a server method on a server object - not to be invoked directly + * @param serverObject {Object} the server object + * @param method {Object} method definition + * @param args {Array} the arguments passed to the method + */ + callServerMethod: function(serverObject, methodName, args) { + // Can we get it from the cache? + var methodDef = this._getMethodDef(serverObject, methodName); + if (methodDef && methodDef.cacheResult && serverObject.$$proxy.cachedResults && serverObject.$$proxy.cachedResults[methodName]) + return serverObject.$$proxy.cachedResults[methodName]; + + // Serialise the request + var parameters = []; + var notify = []; + for (var i = 0; i < args.length; i++) { + if (typeof args[i] == "function") + notify.push(args[i]); + else + parameters.push(this.serializeValue(args[i])); + } + var data = { + cmd: "call", + serverId: serverObject.getServerId(), + methodName: methodName, + parameters: parameters + }; + + // Call the server + var result = undefined; + this._sendCommandToServer(data, function(evt) { + result = this._processResponse(evt); + if (!this.getException()) { + var array = methodDef && methodDef.returnArray; // On-Demand property accessors don't have a method definition + if (array == "wrap") + result = new qx.data.Array(result||[]); + } + for (var i = 0; i < notify.length; i++) + notify[i].call(serverObject, result); + return result; + }, this, notify.length != 0); + + // Store in the cache and return + if (methodDef && methodDef.cacheResult) { + if (!serverObject.$$proxy.cachedResults) + serverObject.$$proxy.cachedResults = {}; + serverObject.$$proxy.cachedResults[methodName] = result; + } + return result; + }, + + /** + * Handler for "change" event on properties with arrays wrapped by qx.data.Array. For use only + * by Proxy. + * @param evt {Data} original "change" event for the array + * @param serverObject {Object} the Proxy instance for a server object + * @param propDef {Map} the property definition + */ + onWrappedArrayChange: function(evt, serverObject, propDef) { + var data = evt.getData(); + + // The change event for qx.data.Array doesn't give enough information to replicate + // the change, so for now we just hack it by remembering the array is dirty and + // copying the whole thing on the next server flush + if (!this.__dirtyArrays) + this.__dirtyArrays = {}; + var array = evt.getTarget(); + this.__dirtyArrays[array.toHashCode()] = { + array: array, + serverObject: serverObject, + propertyName: propDef.name + }; + }, + + /** + * Queues all the dirty arrays ready to flush them to the server + */ + _queueDirtyArrays: function() { + if (!this.__dirtyArrays) + return; + for (var arrHash in this.__dirtyArrays) { + var arrData = this.__dirtyArrays[arrHash]; + var d... [truncated message content] |
From: <d_w...@us...> - 2011-09-02 12:04:28
|
Revision: 21432 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21432&view=rev Author: d_wagner Date: 2011-09-02 12:04:21 +0000 (Fri, 02 Sep 2011) Log Message: ----------- Corrected version number Modified Paths: -------------- trunk/qooxdoo-contrib/Cropper/0.1/Manifest.json Modified: trunk/qooxdoo-contrib/Cropper/0.1/Manifest.json =================================================================== --- trunk/qooxdoo-contrib/Cropper/0.1/Manifest.json 2011-08-31 12:57:34 UTC (rev 21431) +++ trunk/qooxdoo-contrib/Cropper/0.1/Manifest.json 2011-09-02 12:04:21 UTC (rev 21432) @@ -17,7 +17,7 @@ } ], - "version" : "trunk", + "version" : "0.1", "qooxdoo-versions": ["1.2","1.3","1.4"] }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <d_w...@us...> - 2011-08-31 12:57:40
|
Revision: 21431 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21431&view=rev Author: d_wagner Date: 2011-08-31 12:57:34 +0000 (Wed, 31 Aug 2011) Log Message: ----------- Refactoring; Skip testAddFeed in IE9 Modified Paths: -------------- trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/feedreader/test_feedreader.js Modified: trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/feedreader/test_feedreader.js =================================================================== --- trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/feedreader/test_feedreader.js 2011-08-31 12:57:05 UTC (rev 21430) +++ trunk/qooxdoo-contrib/Simulator/1.5/tool/selenium/simulation/feedreader/test_feedreader.js 2011-08-31 12:57:34 UTC (rev 21431) @@ -47,10 +47,37 @@ locators.addFeedButton = 'qxh=qx.ui.container.Composite/child[1]/qx.ui.toolbar.Part/child[0]'; } +simulation.Simulation.prototype.waitForFeeds = function() +{ + var feedsLoaded = function(treeLocator) { + var tree = selenium.getQxWidgetByLocator(treeLocator); + var ready = true; + var items = tree.getItems(); + for (var i=0,l=items.length; i<l; i++) { + if (items[i].getChildren().length == 0) { + var icon = items[i].getIcon(); + if (!(icon.indexOf('internet-feed-reader.png') >=0 || icon.indexOf('process-stop') >=0 )) { + ready = false; + } + } + } + return ready; + }; + this.addOwnFunction("feedsLoaded", feedsLoaded); + var condition = 'selenium.qxStoredVars["autWindow"].qx.Simulation.feedsLoaded("' + locators.feedTree + '")'; + try { + this.waitForCondition(condition, "30000"); + //this.debug("All feeds finished loading."); + } catch(ex) { + this.log("Feeds not loaded after 30 seconds, clicking reload", "warn"); + this.qxClick(locators.reloadButton); + this.waitForCondition(condition, "30000"); + } +}; + simulation.Simulation.prototype.checkArticle = function() { var articleScript = 'selenium.getQxObjectFunction(\'' + locators.articleView + '\', "getArticle")'; - //var articleScript = selWin + '.qx.Simulation.getObjectByClassname(' + selWin + '.qx.core.Init.getApplication(), "feedreader.view.Article").getArticle()'; var article = this.getEval(articleScript, "Checking for article"); var modelClassName = "qx.data.model"; @@ -92,60 +119,10 @@ }; -simulation.Simulation.prototype.checkCombinedImage = function() +simulation.Simulation.prototype.testLocaleSwitch = function() { - var getImageBackground = function(locator) { - var qxImg = selenium.getQxWidgetByLocator(locator); - return qxImg.getContentElement().getDomElement().style.backgroundImage; - } - this.addOwnFunction("getImageBackground", getImageBackground); + var staticFeedsLabel = this.tree + ".getItems()[0].getContentElement().getChildren()[2].getChildren()[0].getValue().toString()"; - var imgLoc = locators.addFeedButton + "/child[0]"; - var imageBackground = this.getEval('selenium.qxStoredVars["autWindow"].qx.Simulation.getImageBackground("' + imgLoc +'")'); - imageBackground = String(imageBackground); - - if (imageBackground.indexOf("combined") >= 0 || imageBackground.indexOf("base64") >= 0) { - this.log("Add Feed button icon uses combined image.", "info"); - } else { - this.log("Add Feed button icon does not use combined image: " + imageBackground, "error"); - } - -}; - -mySim.runTest = function() -{ - var feedLoadTimeout = 30000; - var tree = 'selenium.getQxWidgetByLocator("' + locators.feedTree + '")'; - - var lastFeedNum = this.getEval(tree + '.getItems().length - 1', "Getting last feed's number"); - - var isLastFeedLoaded = tree + ".getItems()[" + lastFeedNum + "].getIcon().indexOf('internet-feed-reader.png') >= 0"; - - try { - this.__sel.waitForCondition(isLastFeedLoaded, feedLoadTimeout.toString()); - } catch(ex) { - this.log("Feeds not loaded after 30 seconds, clicking reload", "info"); - this.qxClick(locators.reloadButton, "", "Clicking reload button"); - this.waitForCondition(isLastFeedLoaded, feedLoadTimeout, "Waiting for feeds to load"); - } - - this.checkFeeds(); - - var getLastFeedLabel = tree + ".getItems()[" + lastFeedNum + "].getLabel()"; - var lastFeedLabel = this.getEval(getLastFeedLabel, "Getting last feed's label"); - - this.__sel.setSpeed("1000"); - - this.getEval(tree + ".resetSelection()", "Resetting tree selection"); - - this.qxClick(locators.firstFeed, "", "Selecting first feed from list"); - - this.qxClick(locators.firstFeedItem, "", "Selecting first feed item."); - - this.checkArticle(); - - var staticFeedsLabel = tree + ".getItems()[0].getContentElement().getChildren()[2].getChildren()[0].getValue().toString()"; - var oldLabel = this.getEval(staticFeedsLabel, "Getting label of Static Feeds"); // Use the preferences window to change the application language @@ -188,8 +165,31 @@ else { this.log("ERROR: Language change failed.", "error"); } +}; + +simulation.Simulation.prototype.isIe9 = function() +{ + var getBrowser = selWin + '.qx.core.Environment.get("browser.name")'; + var getVersion = selWin + '.qx.core.Environment.get("browser.version")'; + var browser = String(this.getEval(getBrowser)); + var version = String(this.getEval(getVersion)); + version = parseInt(version, 10); - // Add a new feed + return (browser == "ie" && version >= 9); +}; + +simulation.Simulation.prototype.testAddFeed = function() +{ + // "type" commands don't work in IE9 + if (this.isIe9()) { + this.log("Skipping testAddFeed", "debug"); + return; + } + + var lastFeedNum = this.getEval(this.tree + '.getItems().length - 1', "Getting last feed's number"); + var getLastFeedLabel = this.tree + ".getItems()[" + lastFeedNum + "].getLabel()"; + var lastFeedLabel = this.getEval(getLastFeedLabel, "Getting last feed's label"); + // Click "Add Feed" this.qxClick(locators.addFeedButton, "", "Clicking Add Feed button"); Packages.java.lang.Thread.sleep(2000); @@ -236,17 +236,17 @@ this.waitForCondition(isFeedWindowHidden, 10000, "Checking if Add Feed window is closed"); // Check if the new feed loaded. - var newLastFeedNum = this.getEval(tree + ".getItems().length - 1", "Getting last feed's number"); - var isNewLastFeedLoaded = tree + ".getItems()[" + newLastFeedNum + "].getIcon().indexOf('internet-feed-reader.png') >= 0"; + var newLastFeedNum = this.getEval(this.tree + ".getItems().length - 1", "Getting last feed's number"); + var isNewLastFeedLoaded = this.tree + ".getItems()[" + newLastFeedNum + "].getIcon().indexOf('internet-feed-reader.png') >= 0"; try { - this.__sel.waitForCondition(isNewLastFeedLoaded, feedLoadTimeout.toString()); + this.__sel.waitForCondition(isNewLastFeedLoaded, this.feedLoadTimeout.toString()); } catch(ex) { this.log("New feed not loaded after 30 seconds, waiting another 30 sec.", "info"); - this.waitForCondition(isNewLastFeedLoaded, feedLoadTimeout, "Waiting for new feed to load."); + this.waitForCondition(isNewLastFeedLoaded, this.feedLoadTimeout, "Waiting for new feed to load."); } - var getNewLastFeedLabel = tree + ".getItems()[" + newLastFeedNum + "].getLabel()"; + var getNewLastFeedLabel = this.tree + ".getItems()[" + newLastFeedNum + "].getLabel()"; var newLastFeedLabel = this.getEval(getNewLastFeedLabel, "Getting new feed's label"); if (newLastFeedLabel != lastFeedLabel) { @@ -257,19 +257,58 @@ } // Select the new feed - var treeLastSelect = tree + ".addToSelection(" + tree + ".getItems()[" + newLastFeedNum + "])"; + var treeLastSelect = this.tree + ".addToSelection(" + this.tree + ".getItems()[" + newLastFeedNum + "])"; this.getEval(treeLastSelect, "Selecting new feed."); - this.qxClick(locators.firstFeedItem, "", "Selecting first item from new feed."); - + this.qxClick(locators.firstFeedItem, "", "Selecting first item from new feed."); this.checkArticle(); - +}; + +simulation.Simulation.prototype.checkCombinedImage = function() +{ // IE uses the AlphaImageLoader so no combined images - if (this.getConfigSetting("testBrowser").indexOf("iexplore") < 0 ) { - this.checkCombinedImage(); + if (this.getConfigSetting("testBrowser").indexOf("iexplore") >= 0 ) { + return; } + var getImageBackground = function(locator) { + var qxImg = selenium.getQxWidgetByLocator(locator); + return qxImg.getContentElement().getDomElement().style.backgroundImage; + } + this.addOwnFunction("getImageBackground", getImageBackground); + + var imgLoc = locators.addFeedButton + "/child[0]"; + var imageBackground = this.getEval('selenium.qxStoredVars["autWindow"].qx.Simulation.getImageBackground("' + imgLoc +'")'); + imageBackground = String(imageBackground); + + if (imageBackground.indexOf("combined") >= 0 || imageBackground.indexOf("base64") >= 0) { + this.log("Add Feed button icon uses combined image.", "info"); + } else { + this.log("Add Feed button icon does not use combined image: " + imageBackground, "error"); + } }; +mySim.runTest = function() +{ + this.feedLoadTimeout = 30000; + this.tree = 'selenium.getQxWidgetByLocator("' + locators.feedTree + '")'; + + this.waitForFeeds(); + this.checkFeeds(); + + this.__sel.setSpeed("1000"); + + this.getEval(this.tree + ".resetSelection()", "Resetting tree selection"); + this.qxClick(locators.firstFeed, "", "Selecting first feed from list"); + this.qxClick(locators.firstFeedItem, "", "Selecting first feed item."); + this.checkArticle(); + + this.testLocaleSwitch(); + + this.testAddFeed(); + + this.checkCombinedImage(); +}; + // - Main -------------------------------------------------------------------- (function() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |