tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r471116 [8/31] - in /tapestry/tapestry4/trunk/tapestry-framework/src: java/org/apache/tapestry/services/impl/ js/dojo/ js/dojo/nls/ js/dojo/src/ js/dojo/src/animation/ js/dojo/src/cal/ js/dojo/src/charting/ js/dojo/src/charting/svg/ js/dojo...
Date Sat, 04 Nov 2006 04:39:55 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.crypto.Rijndael");dojo.require("dojo.crypto");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.Rijndael");dojo.crypto.Rijndael = new function(){this.encrypt=function(plaintext, key){};this.decrypt=function(ciphertext, key){};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,25 @@
+dojo.require("dojo.crypto");dojo.provide("dojo.crypto.SHA1");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.SHA1");dojo.crypto.SHA1 = new function(){var chrsz=8;var mask=(1<<chrsz)-1;function toWord(s) {var wa=[];for(var i=0; i<s.length*chrsz; i+=chrsz)
+wa[i>>5]|=(s.charCodeAt(i/chrsz)&mask)<<(i%32);return wa;}
+function toString(wa){var s=[];for(var i=0; i<wa.length*32; i+=chrsz)
+s.push(String.fromCharCode((wa[i>>5]>>>(i%32))&mask));return s.join("");}
+function toHex(wa) {var h="0123456789abcdef";var s=[];for(var i=0; i<wa.length*4; i++){s.push(h.charAt((wa[i>>2]>>((i%4)*8+4))&0xF)+h.charAt((wa[i>>2]>>((i%4)*8))&0xF));}
+return s.join("");}
+function toBase64(wa){var p="=";var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var s=[];for(var i=0; i<wa.length*4; i+=3){var t=(((wa[i>>2]>>8*(i%4))&0xFF)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0; j<4; j++){if(i*8+j*6>wa.length*32) s.push(p);else s.push(tab.charAt((t>>6*(3-j))&0x3F));}}
+return s.join("");}
+function add(x,y){var l=(x&0xffff)+(y&0xffff);var m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xffff);}
+function r(x,n){  return (x<<n)|(x>>>(32-n)); }
+function f(u,v,w){ return ((u&v)|(~u&w)); }
+function g(u,v,w){ return ((u&v)|(u&w)|(v&w)); }
+function h(u,v,w){ return (u^v^w); }
+function fn(i,u,v,w){if(i<20) return f(u,v,w);if(i<40) return h(u,v,w);if(i<60) return g(u,v,w);return h(u,v,w);}
+function cnst(i){if(i<20) return 1518500249;if(i<40) return 1859775393;if(i<60) return -1894007588;return -899497514;}
+function core(x,len){x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=[];var a= 1732584193;var b=-271733879;var c=-1732584194;var d= 271733878;var e=-1009589776;for(var i=0; i<x.length; i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0; j<80; j++){if(j<16) w[j]=x[i+j];else w[j]=r(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=add(add(r(a,5),fn(j,b,c,d)),add(add(e,w[j]),cnst(j)));e=d; d=c; c=r(b,30); b=a; a=t;}
+a=add(a,olda);b=add(b,oldb);c=add(c,oldc);d=add(d,oldd);e=add(e,olde);}
+return [a,b,c,d,e];}
+function hmac(data,key){var wa=toWord(key);if(wa.length>16) wa=core(wa,key.length*chrsz);var l=[], r=[];for(var i=0; i<16; i++){l[i]=wa[i]^0x36363636;r[i]=wa[i]^0x5c5c5c5c;}
+var h=core(l.concat(toWord(data)),512+data.length*chrsz);return core(r.concat(h),640);}
+this.compute=function(data,outputType){var out=outputType||dojo.crypto.outputTypes.Base64;switch(out){case dojo.crypto.outputTypes.Hex:{return toHex(core(toWord(data),data.length*chrsz));}
+case dojo.crypto.outputTypes.String:{return toString(core(toWord(data),data.length*chrsz));}
+default:{return toBase64(core(toWord(data),data.length*chrsz));}}};this.getHMAC=function(data,key,outputType){var out=outputType||dojo.crypto.outputTypes.Base64;switch(out){case dojo.crypto.outputTypes.Hex:{return toHex(hmac(data,key));}
+case dojo.crypto.outputTypes.String:{return toString(hmac(data,key));}
+default:{return toBase64(hmac(data,key));}}};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.crypto.SHA256");dojo.require("dojo.crypto");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.SHA256");dojo.crypto.SHA256 = new function(){this.compute=function(s){};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,4 @@
+
+dojo.kwCompoundRequire({common: [
+"dojo.crypto","dojo.crypto.MD5"
+]});dojo.provide("dojo.crypto.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data");dojo.data = {};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Read.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Read.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Read.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Read.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.data.Read");dojo.require("dojo.lang.declare");dojo.require("dojo.data.Result");dojo.require("dojo.experimental");dojo.experimental("dojo.data.Read");dojo.declare("dojo.data.Read", null, {get:
+function( item,  attribute,  defaultValue) {dojo.unimplemented('dojo.data.Read.get');var attributeValue = null;return attributeValue;},getValues:
+function( item,  attribute) {dojo.unimplemented('dojo.data.Read.getValues');var array = null;return array;},getAttributes:
+function( item) {dojo.unimplemented('dojo.data.Read.getAttributes');var array = null;return array;},hasAttribute:
+function( item,  attribute) {dojo.unimplemented('dojo.data.Read.hasAttribute');return false;},hasAttributeValue:
+function( item,  attribute,  value) {dojo.unimplemented('dojo.data.Read.hasAttributeValue');return false;},isItem:
+function( something) {dojo.unimplemented('dojo.data.Read.isItem');return false;},find:
+function( query,  optionalKeywordArgs ) {dojo.unimplemented('dojo.data.Read.find');var result = null;return result;},getIdentity:
+function( item) {dojo.unimplemented('dojo.data.Read.getIdentity');var itemIdentifyString = null;return itemIdentifyString;},getByIdentity:
+function( id) {dojo.unimplemented('dojo.data.Read.getByIdentity');var item = null;return item;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Read.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Result.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Result.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Result.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Result.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,9 @@
+
+dojo.provide("dojo.data.Result");dojo.require("dojo.lang.declare");dojo.require("dojo.experimental");dojo.experimental("dojo.data.Result");dojo.declare("dojo.data.Result", null, {forEach:
+function( callbackFunction,  callbackObject,  optionalKeywordArgs) {dojo.unimplemented('dojo.data.Result.forEach');return false;},getLength:
+function() {dojo.unimplemented('dojo.data.Result.getLength');return -1;},inProgress:
+function() {dojo.unimplemented('dojo.data.Result.inProgress');return false;},cancel:
+function() {dojo.unimplemented('dojo.data.Result.cancel');},setOnFindCompleted:
+function( callbackFunction,  callbackObject) {dojo.unimplemented('dojo.data.Result.setOnFindCompleted');},setOnError:
+function( errorCallbackFunction,  callbackObject) {dojo.unimplemented('dojo.data.Result.setOnError');},getStore:
+function() {dojo.unimplemented('dojo.data.Result.getStore');return null;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Result.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Write.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Write.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Write.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Write.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.data.Write");dojo.require("dojo.lang.declare");dojo.require("dojo.data.Read");dojo.require("dojo.experimental");dojo.experimental("dojo.data.Write");dojo.declare("dojo.data.Write", dojo.data.Read, {newItem:
+function( keywordArgs) {var newItem;dojo.unimplemented('dojo.data.Write.newItem');return newItem;},deleteItem:
+function( item) {dojo.unimplemented('dojo.data.Write.deleteItem');return false;},set:
+function( item,  attribute,  value) {dojo.unimplemented('dojo.data.Write.set');return false;},setValues:
+function( item,  attribute,  values) {dojo.unimplemented('dojo.data.Write.setValues');return false;},clear:
+function( item,  attribute) {dojo.unimplemented('dojo.data.Write.clear');return false;},save:
+function() {dojo.unimplemented('dojo.data.Write.save');return false;},revert:
+function() {dojo.unimplemented('dojo.data.Write.revert');return false;},isDirty:
+function( item) {dojo.unimplemented('dojo.data.Write.isDirty');return false;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/Write.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/CsvStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/CsvStore.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/CsvStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/CsvStore.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,28 @@
+
+dojo.provide("dojo.data.csv.CsvStore");dojo.require("dojo.data.Read");dojo.require("dojo.lang.assert");dojo.declare("dojo.data.csv.CsvStore", dojo.data.Read, {initializer:
+function( keywordParameters) {this._arrayOfItems = [];this._loadFinished = false;this._csvFileUrl = keywordParameters["url"];this._csvFileContents = keywordParameters["string"];},get:
+function( item,  attribute,  defaultValue) {var attributeValue = item[attribute] || defaultValue;return attributeValue;},getValues:
+function( item,  attribute) {var array = [this.get(item, attribute)];return array;},getAttributes:
+function( item) {var array = this._arrayOfKeys;return array;},hasAttribute:
+function( item,  attribute) {for (var i in this._arrayOfKeys) {if (this._arrayOfKeys[i] == attribute) {return true;}}
+return false;},hasAttributeValue:
+function( item,  attribute,  value) {return (this.get(item, attribute) == value);},isItem:
+function( something) {for (var i in this._arrayOfItems) {if (this._arrayOfItems[i] == something) {return true;}}
+return false;},find:
+function( query,  optionalKeywordArgs ) {if (!this._loadFinished) {if (this._csvFileUrl) {this._csvFileContents = dojo.hostenv.getText(this._csvFileUrl);}
+var arrayOfArrays = this._getArrayOfArraysFromCsvFileContents(this._csvFileContents);if (arrayOfArrays.length == 0) {this._arrayOfKeys = [];} else {this._arrayOfKeys = arrayOfArrays[0];}
+this._arrayOfItems = this._getArrayOfItemsFromArrayOfArrays(arrayOfArrays);}
+var result = new dojo.data.csv.Result(this._arrayOfItems, this);return result;},getIdentity:
+function( item) {for (var i in this._arrayOfItems) {if (this._arrayOfItems[i] == item) {return i;}}
+return null;},getByIdentity:
+function( id) {var i = parseInt(id);if (i < this._arrayOfItems.length) {return this._arrayOfItems[i];} else {return null;}},_getArrayOfArraysFromCsvFileContents:
+function( csvFileContents) {dojo.lang.assertType(csvFileContents, String);var lineEndingCharacters = new RegExp("\r\n|\n|\r");var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g');var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g');var doubleQuotes = new RegExp('""','g');var arrayOfOutputRecords = [];var arrayOfInputLines = csvFileContents.split(lineEndingCharacters);for (var i in arrayOfInputLines) {var singleLine = arrayOfInputLines[i];if (singleLine.length > 0) {var listOfFields = singleLine.split(',');var j = 0;while (j < listOfFields.length) {var space_field_space = listOfFields[j];var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, '');var field = field_space.replace(trailingWhiteSpaceCharacters, '');var firstChar = field.charAt(0);var lastChar = field.charAt(field.length - 1);var secondToLastChar = field.charAt(field.length - 2);var thirdToLastChar = field.charAt(field.length - 3);if ((firstChar == '"') &&
+((lastChar != '"') ||
+((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')) )) {if (j+1 === listOfFields.length) {return null;}
+var nextField = listOfFields[j+1];listOfFields[j] = field_space + ',' + nextField;listOfFields.splice(j+1, 1);} else {if ((firstChar == '"') && (lastChar == '"')) {field = field.slice(1, (field.length - 1));field = field.replace(doubleQuotes, '"');}
+listOfFields[j] = field;j += 1;}}
+arrayOfOutputRecords.push(listOfFields);}}
+return arrayOfOutputRecords;},_getArrayOfItemsFromArrayOfArrays:
+function( arrayOfArrays) {dojo.lang.assertType(arrayOfArrays, Array);var arrayOfItems = [];if (arrayOfArrays.length > 1) {var arrayOfKeys = arrayOfArrays[0];for (var i = 1; i < arrayOfArrays.length; ++i) {var row = arrayOfArrays[i];var item = {};for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item[key] = value;}
+arrayOfItems.push(item);}}
+return arrayOfItems;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/CsvStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/Result.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/Result.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/Result.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/Result.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.data.csv.Result");dojo.require("dojo.data.Result");dojo.require("dojo.lang.assert");dojo.declare("dojo.data.csv.Result", dojo.data.Result, {initializer:
+function( arrayOfItems,  dataStore) {dojo.lang.assertType(arrayOfItems, Array);this._arrayOfItems = arrayOfItems;this._dataStore = dataStore;this._cancel = false;this._inProgress = false;},forEach:
+function( callbackFunction,  callbackObject,  optionalKeywordArgs) {dojo.lang.assertType(callbackFunction, Function);dojo.lang.assertType(callbackObject, Object, {optional:true});dojo.lang.assertType(optionalKeywordArgs, "pureobject", {optional:true});this._inProgress = true;for (var i in this._arrayOfItems) {var item = this._arrayOfItems[i];if (!this._cancel) {callbackFunction.call(callbackObject, item, i, this);}}
+this._inProgress = false;this._cancel = false;return true;},getLength:
+function() {return this._arrayOfItems.length;},inProgress:
+function() {return this._inProgress;},cancel:
+function() {if (this._inProgress) {this._cancel = true;}},setOnFindCompleted:
+function( callbackFunction,  callbackObject) {dojo.unimplemented('dojo.data.csv.Result.setOnFindCompleted');},setOnError:
+function( errorCallbackFunction,  callbackObject) {dojo.unimplemented('dojo.data.csv.Result.setOnError');},getStore:
+function() {return this._dataStore;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/Result.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/__package__.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/__package__.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,4 @@
+
+dojo.require("dojo.experimental");dojo.experimental("dojo.data.csv.*");dojo.kwCompoundRequire({common: [
+"dojo.data.csv.CsvStore","dojo.data.csv.Result"
+]});dojo.provide("dojo.data.csv.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/csv/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Attribute");dojo.require("dojo.data.old.Item");dojo.require("dojo.lang.assert");dojo.data.old.Attribute = function( dataProvider,  attributeId) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.lang.assertType(attributeId, String);dojo.data.old.Item.call(this, dataProvider);this._attributeId = attributeId;};dojo.inherits(dojo.data.old.Attribute, dojo.data.old.Item);dojo.data.old.Attribute.prototype.toString = function() {return this._attributeId;};dojo.data.old.Attribute.prototype.getAttributeId = function() {return this._attributeId;};dojo.data.old.Attribute.prototype.getType = function() {return this.get('type');};dojo.data.old.Attribute.prototype.setType = function( type) {this.set('type', type);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,25 @@
+
+dojo.provide("dojo.data.old.Item");dojo.require("dojo.data.old.Observable");dojo.require("dojo.data.old.Value");dojo.require("dojo.lang.common");dojo.require("dojo.lang.assert");dojo.data.old.Item = function( dataProvider) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.data.old.Observable.call(this);this._dataProvider = dataProvider;this._dictionaryOfAttributeValues = {};};dojo.inherits(dojo.data.old.Item, dojo.data.old.Observable);dojo.data.old.Item.compare = function( itemOne,  itemTwo) {dojo.lang.assertType(itemOne, dojo.data.old.Item);if (!dojo.lang.isOfType(itemTwo, dojo.data.old.Item)) {return -1;}
+var nameOne = itemOne.getName();var nameTwo = itemTwo.getName();if (nameOne == nameTwo) {var attributeArrayOne = itemOne.getAttributes();var attributeArrayTwo = itemTwo.getAttributes();if (attributeArrayOne.length != attributeArrayTwo.length) {if (attributeArrayOne.length > attributeArrayTwo.length) {return 1;} else {return -1;}}
+for (var i in attributeArrayOne) {var attribute = attributeArrayOne[i];var arrayOfValuesOne = itemOne.getValues(attribute);var arrayOfValuesTwo = itemTwo.getValues(attribute);dojo.lang.assert(arrayOfValuesOne && (arrayOfValuesOne.length > 0));if (!arrayOfValuesTwo) {return 1;}
+if (arrayOfValuesOne.length != arrayOfValuesTwo.length) {if (arrayOfValuesOne.length > arrayOfValuesTwo.length) {return 1;} else {return -1;}}
+for (var j in arrayOfValuesOne) {var value = arrayOfValuesOne[j];if (!itemTwo.hasAttributeValue(value)) {return 1;}}
+return 0;}} else {if (nameOne > nameTwo) {return 1;} else {return -1;}}};dojo.data.old.Item.prototype.toString = function() {var arrayOfStrings = [];var attributes = this.getAttributes();for (var i in attributes) {var attribute = attributes[i];var arrayOfValues = this.getValues(attribute);var valueString;if (arrayOfValues.length == 1) {valueString = arrayOfValues[0];} else {valueString = '[';valueString += arrayOfValues.join(', ');valueString += ']';}
+arrayOfStrings.push('  ' + attribute + ': ' + valueString);}
+var returnString = '{ ';returnString += arrayOfStrings.join(',\n');returnString += ' }';return returnString;};dojo.data.old.Item.prototype.compare = function( otherItem) {return dojo.data.old.Item.compare(this, otherItem);};dojo.data.old.Item.prototype.isEqual = function( otherItem) {return (this.compare(otherItem) == 0);};dojo.data.old.Item.prototype.getName = function() {return this.get('name');};dojo.data.old.Item.prototype.get = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {return literalOrValueOrArray.getValue();}
+if (dojo.lang.isArray(literalOrValueOrArray)) {var dojoDataValue = literalOrValueOrArray[0];return dojoDataValue.getValue();}
+return literalOrValueOrArray;};dojo.data.old.Item.prototype.getValue = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {return literalOrValueOrArray;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {var dojoDataValue = literalOrValueOrArray[0];return dojoDataValue;}
+var literal = literalOrValueOrArray;dojoDataValue = new dojo.data.old.Value(literal);this._dictionaryOfAttributeValues[attributeId] = dojoDataValue;return dojoDataValue;};dojo.data.old.Item.prototype.getValues = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {var array = [literalOrValueOrArray];this._dictionaryOfAttributeValues[attributeId] = array;return array;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {return literalOrValueOrArray;}
+var literal = literalOrValueOrArray;var dojoDataValue = new dojo.data.old.Value(literal);array = [dojoDataValue];this._dictionaryOfAttributeValues[attributeId] = array;return array;};dojo.data.old.Item.prototype.load = function( attributeId,  value) {this._dataProvider.registerAttribute(attributeId);var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {this._dictionaryOfAttributeValues[attributeId] = value;return;}
+if (!(value instanceof dojo.data.old.Value)) {value = new dojo.data.old.Value(value);}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {var array = [literalOrValueOrArray, value];this._dictionaryOfAttributeValues[attributeId] = array;return;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {literalOrValueOrArray.push(value);return;}
+var literal = literalOrValueOrArray;var dojoDataValue = new dojo.data.old.Value(literal);array = [dojoDataValue, value];this._dictionaryOfAttributeValues[attributeId] = array;};dojo.data.old.Item.prototype.set = function( attributeId,  value) {this._dataProvider.registerAttribute(attributeId);this._dictionaryOfAttributeValues[attributeId] = value;this._dataProvider.noteChange(this, attributeId, value);};dojo.data.old.Item.prototype.setValue = function( attributeId,  value) {this.set(attributeId, value);};dojo.data.old.Item.prototype.addValue = function( attributeId,  value) {this.load(attributeId, value);this._dataProvider.noteChange(this, attributeId, value);};dojo.data.old.Item.prototype.setValues = function( attributeId,  arrayOfValues) {dojo.lang.assertType(arrayOfValues, Array);this._dataProvider.registerAttribute(attributeId);var finalArray = [];this._dictionaryOfAttributeValues[attributeId] = finalArray;for (var i in arrayOfValues) {var value = arrayOfValues[i];if (!(
 value instanceof dojo.data.old.Value)) {value = new dojo.data.old.Value(value);}
+finalArray.push(value);this._dataProvider.noteChange(this, attributeId, value);}};dojo.data.old.Item.prototype.getAttributes = function() {var arrayOfAttributes = [];for (var key in this._dictionaryOfAttributeValues) {arrayOfAttributes.push(this._dataProvider.getAttribute(key));}
+return arrayOfAttributes;};dojo.data.old.Item.prototype.hasAttribute = function( attributeId) {return (attributeId in this._dictionaryOfAttributeValues);};dojo.data.old.Item.prototype.hasAttributeValue = function( attributeId,  value) {var arrayOfValues = this.getValues(attributeId);for (var i in arrayOfValues) {var candidateValue = arrayOfValues[i];if (candidateValue.isEqual(value)) {return true;}}
+return false;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Kind");dojo.require("dojo.data.old.Item");dojo.data.old.Kind = function( dataProvider) {dojo.data.old.Item.call(this, dataProvider);};dojo.inherits(dojo.data.old.Kind, dojo.data.old.Item);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,4 @@
+
+dojo.provide("dojo.data.old.Observable");dojo.require("dojo.lang.common");dojo.require("dojo.lang.assert");dojo.data.old.Observable = function() {};dojo.data.old.Observable.prototype.addObserver = function( observer) {dojo.lang.assertType(observer, Object);dojo.lang.assertType(observer.observedObjectHasChanged, Function);if (!this._arrayOfObservers) {this._arrayOfObservers = [];}
+if (!dojo.lang.inArray(this._arrayOfObservers, observer)) {this._arrayOfObservers.push(observer);}};dojo.data.old.Observable.prototype.removeObserver = function( observer) {if (!this._arrayOfObservers) {return;}
+var index = dojo.lang.indexOf(this._arrayOfObservers, observer);if (index != -1) {this._arrayOfObservers.splice(index, 1);}};dojo.data.old.Observable.prototype.getObservers = function() {return this._arrayOfObservers;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.ResultSet");dojo.require("dojo.lang.assert");dojo.require("dojo.collections.Collections");dojo.data.old.ResultSet = function( dataProvider,  arrayOfItems) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.lang.assertType(arrayOfItems, Array, {optional: true});dojo.data.old.Observable.call(this);this._dataProvider = dataProvider;this._arrayOfItems = [];if (arrayOfItems) {this._arrayOfItems = arrayOfItems;}};dojo.inherits(dojo.data.old.ResultSet, dojo.data.old.Observable);dojo.data.old.ResultSet.prototype.toString = function() {var returnString = this._arrayOfItems.join(', ');return returnString;};dojo.data.old.ResultSet.prototype.toArray = function() {return this._arrayOfItems;};dojo.data.old.ResultSet.prototype.getIterator = function() {return new dojo.collections.Iterator(this._arrayOfItems);};dojo.data.old.ResultSet.prototype.getLength = function() {return this._arrayOfItems.length;};dojo.data.old.ResultSet.
 prototype.getItemAt = function( index) {return this._arrayOfItems[index];};dojo.data.old.ResultSet.prototype.indexOf = function( item) {return dojo.lang.indexOf(this._arrayOfItems, item);};dojo.data.old.ResultSet.prototype.contains = function( item) {return dojo.lang.inArray(this._arrayOfItems, item);};dojo.data.old.ResultSet.prototype.getDataProvider = function() {return this._dataProvider;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Type");dojo.require("dojo.data.old.Item");dojo.data.old.Type = function( dataProvider) {dojo.data.old.Item.call(this, dataProvider);};dojo.inherits(dojo.data.old.Type, dojo.data.old.Item);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Value");dojo.require("dojo.lang.assert");dojo.data.old.Value = function( value) {this._value = value;this._type = null;};dojo.data.old.Value.prototype.toString = function() {return this._value.toString();};dojo.data.old.Value.prototype.getValue = function() {return this._value;};dojo.data.old.Value.prototype.getType = function() {dojo.unimplemented('dojo.data.old.Value.prototype.getType');return this._type;};dojo.data.old.Value.prototype.compare = function() {dojo.unimplemented('dojo.data.old.Value.prototype.compare');};dojo.data.old.Value.prototype.isEqual = function() {dojo.unimplemented('dojo.data.old.Value.prototype.isEqual');};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,4 @@
+
+dojo.require("dojo.experimental");dojo.experimental("dojo.data.old.*");dojo.kwCompoundRequire({common: [
+"dojo.data.old.Item","dojo.data.old.ResultSet","dojo.data.old.provider.FlatFile"
+]});dojo.provide("dojo.data.old.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,8 @@
+
+dojo.provide("dojo.data.old.format.Csv");dojo.require("dojo.lang.assert");dojo.data.old.format.Csv = new function() {this.getArrayStructureFromCsvFileContents = function( csvFileContents) {dojo.lang.assertType(csvFileContents, String);var lineEndingCharacters = new RegExp("\r\n|\n|\r");var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g');var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g');var doubleQuotes = new RegExp('""','g');var arrayOfOutputRecords = [];var arrayOfInputLines = csvFileContents.split(lineEndingCharacters);for (var i in arrayOfInputLines) {var singleLine = arrayOfInputLines[i];if (singleLine.length > 0) {var listOfFields = singleLine.split(',');var j = 0;while (j < listOfFields.length) {var space_field_space = listOfFields[j];var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, '');var field = field_space.replace(trailingWhiteSpaceCharacters, '');var firstChar = field.charAt(0);var lastChar = field.charAt(field.length - 1);va
 r secondToLastChar = field.charAt(field.length - 2);var thirdToLastChar = field.charAt(field.length - 3);if ((firstChar == '"') &&
+((lastChar != '"') ||
+((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')) )) {if (j+1 === listOfFields.length) {return null;}
+var nextField = listOfFields[j+1];listOfFields[j] = field_space + ',' + nextField;listOfFields.splice(j+1, 1);} else {if ((firstChar == '"') && (lastChar == '"')) {field = field.slice(1, (field.length - 1));field = field.replace(doubleQuotes, '"');}
+listOfFields[j] = field;j += 1;}}
+arrayOfOutputRecords.push(listOfFields);}}
+return arrayOfOutputRecords;};this.loadDataProviderFromFileContents = function( dataProvider,  csvFileContents) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base);dojo.lang.assertType(csvFileContents, String);var arrayOfArrays = this.getArrayStructureFromCsvFileContents(csvFileContents);if (arrayOfArrays) {var arrayOfKeys = arrayOfArrays[0];for (var i = 1; i < arrayOfArrays.length; ++i) {var row = arrayOfArrays[i];var item = dataProvider.getNewItemToLoad();for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item.load(key, value);}}}};this.getCsvStringFromResultSet = function( resultSet) {dojo.unimplemented('dojo.data.old.format.Csv.getCsvStringFromResultSet');var csvString = null;return csvString;};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.data.old.format.Json");dojo.require("dojo.lang.assert");dojo.data.old.format.Json = new function() {this.loadDataProviderFromFileContents = function( dataProvider,  jsonFileContents) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base);dojo.lang.assertType(jsonFileContents, String);var arrayOfJsonData = eval("(" + jsonFileContents + ")");this.loadDataProviderFromArrayOfJsonData(dataProvider, arrayOfJsonData);};this.loadDataProviderFromArrayOfJsonData = function( dataProvider,  arrayOfJsonData) {dojo.lang.assertType(arrayOfJsonData, Array, {optional: true});if (arrayOfJsonData && (arrayOfJsonData.length > 0)) {var firstRow = arrayOfJsonData[0];dojo.lang.assertType(firstRow, [Array, "pureobject"]);if (dojo.lang.isArray(firstRow)) {_loadDataProviderFromArrayOfArrays(dataProvider, arrayOfJsonData);} else {dojo.lang.assertType(firstRow, "pureobject");_loadDataProviderFromArrayOfObjects(dataProvider, arrayOfJsonData);}}};this.getJsonStringFromResultS
 et = function( resultSet) {dojo.unimplemented('dojo.data.old.format.Json.getJsonStringFromResultSet');var jsonString = null;return jsonString;};function _loadDataProviderFromArrayOfArrays( dataProvider,  arrayOfJsonData) {var arrayOfKeys = arrayOfJsonData[0];for (var i = 1; i < arrayOfJsonData.length; ++i) {var row = arrayOfJsonData[i];var item = dataProvider.getNewItemToLoad();for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item.load(key, value);}}}
+function _loadDataProviderFromArrayOfObjects( dataProvider,  arrayOfJsonData) {for (var i in arrayOfJsonData) {var row = arrayOfJsonData[i];var item = dataProvider.getNewItemToLoad();for (var key in row) {var value = row[key];if (dojo.lang.isArray(value)) {var arrayOfValues = value;for (var j in arrayOfValues) {value = arrayOfValues[j];item.load(key, value);}} else {item.load(key, value);}}}}}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.data.old.provider.Base");dojo.require("dojo.lang.assert");dojo.data.old.provider.Base = function() {this._countOfNestedTransactions = 0;this._changesInCurrentTransaction = null;};dojo.data.old.provider.Base.prototype.beginTransaction = function() {if (this._countOfNestedTransactions === 0) {this._changesInCurrentTransaction = [];}
+this._countOfNestedTransactions += 1;};dojo.data.old.provider.Base.prototype.endTransaction = function() {this._countOfNestedTransactions -= 1;dojo.lang.assert(this._countOfNestedTransactions >= 0);if (this._countOfNestedTransactions === 0) {var listOfChangesMade = this._saveChanges();this._changesInCurrentTransaction = null;if (listOfChangesMade.length > 0) {this._notifyObserversOfChanges(listOfChangesMade);}}};dojo.data.old.provider.Base.prototype.getNewItemToLoad = function() {return this._newItem();};dojo.data.old.provider.Base.prototype.newItem = function( itemName) {dojo.lang.assertType(itemName, String, {optional: true});var item = this._newItem();if (itemName) {item.set('name', itemName);}
+return item;};dojo.data.old.provider.Base.prototype.newAttribute = function( attributeId) {dojo.lang.assertType(attributeId, String, {optional: true});var attribute = this._newAttribute(attributeId);return attribute;};dojo.data.old.provider.Base.prototype.getAttribute = function( attributeId) {dojo.unimplemented('dojo.data.old.provider.Base');var attribute;return attribute;};dojo.data.old.provider.Base.prototype.getAttributes = function() {dojo.unimplemented('dojo.data.old.provider.Base');return this._arrayOfAttributes;};dojo.data.old.provider.Base.prototype.fetchArray = function() {dojo.unimplemented('dojo.data.old.provider.Base');return [];};dojo.data.old.provider.Base.prototype.fetchResultSet = function() {dojo.unimplemented('dojo.data.old.provider.Base');var resultSet;return resultSet;};dojo.data.old.provider.Base.prototype.noteChange = function( item,  attribute,  value) {var change = {item: item, attribute: attribute, value: value};if (this._countOfNestedTransactions =
 == 0) {this.beginTransaction();this._changesInCurrentTransaction.push(change);this.endTransaction();} else {this._changesInCurrentTransaction.push(change);}};dojo.data.old.provider.Base.prototype.addItemObserver = function( item,  observer) {dojo.lang.assertType(item, dojo.data.old.Item);item.addObserver(observer);};dojo.data.old.provider.Base.prototype.removeItemObserver = function( item,  observer) {dojo.lang.assertType(item, dojo.data.old.Item);item.removeObserver(observer);};dojo.data.old.provider.Base.prototype._newItem = function() {var item = new dojo.data.old.Item(this);return item;};dojo.data.old.provider.Base.prototype._newAttribute = function( attributeId) {var attribute = new dojo.data.old.Attribute(this);return attribute;};dojo.data.old.provider.Base.prototype._saveChanges = function() {var arrayOfChangesMade = this._changesInCurrentTransaction;return arrayOfChangesMade;};dojo.data.old.provider.Base.prototype._notifyObserversOfChanges = function( arrayOfChanges)
  {var arrayOfResultSets = this._getResultSets();for (var i in arrayOfChanges) {var change = arrayOfChanges[i];var changedItem = change.item;var arrayOfItemObservers = changedItem.getObservers();for (var j in arrayOfItemObservers) {var observer = arrayOfItemObservers[j];observer.observedObjectHasChanged(changedItem, change);}
+for (var k in arrayOfResultSets) {var resultSet = arrayOfResultSets[k];var arrayOfResultSetObservers = resultSet.getObservers();for (var m in arrayOfResultSetObservers) {observer = arrayOfResultSetObservers[m];observer.observedObjectHasChanged(resultSet, change);}}}};dojo.data.old.provider.Base.prototype._getResultSets = function() {dojo.unimplemented('dojo.data.old.provider.Base');return [];};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.data.old.provider.Delicious");dojo.require("dojo.data.old.provider.FlatFile");dojo.require("dojo.data.old.format.Json");dojo.data.old.provider.Delicious = function() {dojo.data.old.provider.FlatFile.call(this);if (Delicious && Delicious.posts) {dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, Delicious.posts);} else {}
+var u = this.registerAttribute('u');var d = this.registerAttribute('d');var t = this.registerAttribute('t');u.load('name', 'Bookmark');d.load('name', 'Description');t.load('name', 'Tags');u.load('type', 'String');d.load('type', 'String');t.load('type', 'String');};dojo.inherits(dojo.data.old.provider.Delicious, dojo.data.old.provider.FlatFile);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.data.old.provider.FlatFile");dojo.require("dojo.data.old.provider.Base");dojo.require("dojo.data.old.Item");dojo.require("dojo.data.old.Attribute");dojo.require("dojo.data.old.ResultSet");dojo.require("dojo.data.old.format.Json");dojo.require("dojo.data.old.format.Csv");dojo.require("dojo.lang.assert");dojo.data.old.provider.FlatFile = function( keywordParameters) {dojo.lang.assertType(keywordParameters, "pureobject", {optional: true});dojo.data.old.provider.Base.call(this);this._arrayOfItems = [];this._resultSet = null;this._dictionaryOfAttributes = {};if (keywordParameters) {var jsonObjects = keywordParameters["jsonObjects"];var jsonString  = keywordParameters["jsonString"];var fileUrl     = keywordParameters["url"];if (jsonObjects) {dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, jsonObjects);}
+if (jsonString) {dojo.data.old.format.Json.loadDataProviderFromFileContents(this, jsonString);}
+if (fileUrl) {var arrayOfParts = fileUrl.split('.');var lastPart = arrayOfParts[(arrayOfParts.length - 1)];var formatParser = null;if (lastPart == "json") {formatParser = dojo.data.old.format.Json;}
+if (lastPart == "csv") {formatParser = dojo.data.old.format.Csv;}
+if (formatParser) {var fileContents = dojo.hostenv.getText(fileUrl);formatParser.loadDataProviderFromFileContents(this, fileContents);} else {dojo.lang.assert(false, "new dojo.data.old.provider.FlatFile({url: }) was passed a file without a .csv or .json suffix");}}}};dojo.inherits(dojo.data.old.provider.FlatFile, dojo.data.old.provider.Base);dojo.data.old.provider.FlatFile.prototype.getProviderCapabilities = function( keyword) {dojo.lang.assertType(keyword, String, {optional: true});if (!this._ourCapabilities) {this._ourCapabilities = {transactions: false,undo: false,login: false,versioning: false,anonymousRead: true,anonymousWrite: false,permissions: false,queries: false,strongTyping: false,datatypes: [String, Date, Number]};}
+if (keyword) {return this._ourCapabilities[keyword];} else {return this._ourCapabilities;}};dojo.data.old.provider.FlatFile.prototype.registerAttribute = function( attributeId) {var registeredAttribute = this.getAttribute(attributeId);if (!registeredAttribute) {var newAttribute = new dojo.data.old.Attribute(this, attributeId);this._dictionaryOfAttributes[attributeId] = newAttribute;registeredAttribute = newAttribute;}
+return registeredAttribute;};dojo.data.old.provider.FlatFile.prototype.getAttribute = function( attributeId) {var attribute = (this._dictionaryOfAttributes[attributeId] || null);return attribute;};dojo.data.old.provider.FlatFile.prototype.getAttributes = function() {var arrayOfAttributes = [];for (var key in this._dictionaryOfAttributes) {var attribute = this._dictionaryOfAttributes[key];arrayOfAttributes.push(attribute);}
+return arrayOfAttributes;};dojo.data.old.provider.FlatFile.prototype.fetchArray = function(query) {return this._arrayOfItems;};dojo.data.old.provider.FlatFile.prototype.fetchResultSet = function(query) {if (!this._resultSet) {this._resultSet = new dojo.data.old.ResultSet(this, this.fetchArray(query));}
+return this._resultSet;};dojo.data.old.provider.FlatFile.prototype._newItem = function() {var item = new dojo.data.old.Item(this);this._arrayOfItems.push(item);return item;};dojo.data.old.provider.FlatFile.prototype._newAttribute = function( attributeId) {dojo.lang.assertType(attributeId, String);dojo.lang.assert(this.getAttribute(attributeId) === null);var attribute = new dojo.data.old.Attribute(this, attributeId);this._dictionaryOfAttributes[attributeId] = attribute;return attribute;};dojo.data.old.provider.Base.prototype._getResultSets = function() {return [this._resultSet];};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.provider.JotSpot");dojo.require("dojo.data.old.provider.Base");dojo.data.old.provider.JotSpot = function() {dojo.unimplemented('dojo.data.old.provider.JotSpot');};dojo.inherits(dojo.data.old.provider.JotSpot, dojo.data.old.provider.Base);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.provider.MySql");dojo.require("dojo.data.old.provider.Base");dojo.data.old.provider.MySql = function() {dojo.unimplemented('dojo.data.old.provider.MySql');};dojo.inherits(dojo.data.old.provider.MySql, dojo.data.old.provider.Base);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt Fri Nov  3 20:39:29 2006
@@ -0,0 +1,45 @@
+Existing Features
+ * can import data from .json or .csv format files
+ * can import data from del.icio.us
+ * can create and modify data programmatically
+ * can bind data to dojo.widget.Chart
+ * can bind data to dojo.widget.SortableTable
+ * can bind one data set to multiple widgets
+ * notifications: widgets are notified when data changes
+ * notification available per-item or per-resultSet
+ * can create ad-hoc attributes
+ * attributes can be loosely-typed 
+ * attributes can have meta-data like type and display name
+ * half-implemented support for sorting
+ * half-implemented support for export to .json
+ * API for getting data in simple arrays 
+ * API for getting ResultSets with iterators (precursor to support for something like the openrico.org live grid)
+ 
+~~~~~~~~~~~~~~~~~~~~~~~~
+To-Do List
+ * be able to import data from an html <table></table>
+ * think about being able to import data from some type of XML 
+ * think about integration with dojo.undo.Manager
+ * think more about how to represent the notion of different data types
+ * think about what problems we'll run into when we have a MySQL data provider
+ * in TableBindingHack, improve support for data types in the SortableTable binding
+ * deal with ids (including MySQL multi-field keys)
+ * add support for item-references:  employeeItem.set('department', departmentItem);
+ * deal with Attributes as instances of Items, not just subclasses of Items
+ * unit tests for compare/sort code
+ * unit tests for everything
+ * implement item.toString('json') and item.toString('xml')
+ * implement dataProvider.newItem({name: 'foo', age: 26})
+ * deal better with transactions
+ * add support for deleting items
+ * don't send out multiple notifications to the same observer
+ * deal with item versions
+ * prototype a Yahoo data provider -- http://developer.yahoo.net/common/json.html
+ * prototype a data provider that enforces strong typing
+ * prototype a data provider that prevents ad-hoc attributes
+ * prototype a data provider that enforces single-kind item
+ * prototype a data provider that allows for login/authentication
+ * have loosely typed result sets play nicely with widgets that expect strong typing
+ * prototype an example of spreadsheet-style formulas or derivation rules
+ * experiment with some sort of fetch() that returns only a subset of a data provider's items
+

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.date");dojo.deprecated("dojo.date", "use one of the modules in dojo.date.* instead", "0.5");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,83 @@
+
+dojo.provide("dojo.date.common");dojo.date.setDayOfYear = function(dateObject, dayOfYear){dateObject.setMonth(0);dateObject.setDate(dayOfYear);return dateObject;}
+dojo.date.getDayOfYear = function(dateObject){var fullYear = dateObject.getFullYear();var lastDayOfPrevYear = new Date(fullYear-1, 11, 31);return Math.floor((dateObject.getTime() -
+lastDayOfPrevYear.getTime()) / 86400000);}
+dojo.date.setWeekOfYear = function(dateObject, week, firstDay){if(arguments.length == 1){ firstDay = 0; }
+dojo.unimplemented("dojo.date.setWeekOfYear");}
+dojo.date.getWeekOfYear = function(dateObject, firstDay){if(arguments.length == 1){ firstDay = 0; }
+var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1);var day = firstDayOfYear.getDay();firstDayOfYear.setDate(firstDayOfYear.getDate() -
+day + firstDay - (day > firstDay ? 7 : 0));return Math.floor((dateObject.getTime() -
+firstDayOfYear.getTime()) / 604800000);}
+dojo.date.setIsoWeekOfYear = function(dateObject, week, firstDay){if (arguments.length == 1) { firstDay = 1; }
+dojo.unimplemented("dojo.date.setIsoWeekOfYear");}
+dojo.date.getIsoWeekOfYear = function(dateObject, firstDay) {if (arguments.length == 1) { firstDay = 1; }
+dojo.unimplemented("dojo.date.getIsoWeekOfYear");}
+dojo.date.shortTimezones = ["IDLW", "BET", "HST", "MART", "AKST", "PST", "MST","CST", "EST", "AST", "NFT", "BST", "FST", "AT", "GMT", "CET", "EET", "MSK","IRT", "GST", "AFT", "AGTT", "IST", "NPT", "ALMT", "MMT", "JT", "AWST","JST", "ACST", "AEST", "LHST", "VUT", "NFT", "NZT", "CHAST", "PHOT","LINT"];dojo.date.timezoneOffsets = [-720, -660, -600, -570, -540, -480, -420, -360,-300, -240, -210, -180, -120, -60, 0, 60, 120, 180, 210, 240, 270, 300,330, 345, 360, 390, 420, 480, 540, 570, 600, 630, 660, 690, 720, 765, 780,840];dojo.date.getDaysInMonth = function(dateObject){var month = dateObject.getMonth();var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];if (month == 1 && dojo.date.isLeapYear(dateObject)) { return 29; }
+else { return days[month]; }}
+dojo.date.isLeapYear = function(dateObject){var year = dateObject.getFullYear();return (year%400 == 0) ? true : (year%100 == 0) ? false : (year%4 == 0) ? true : false;}
+dojo.date.getTimezoneName = function(dateObject){var str = dateObject.toString();var tz = '';var match;var pos = str.indexOf('(');if (pos > -1) {pos++;tz = str.substring(pos, str.indexOf(')'));}
+else{var pat = /([A-Z\/]+) \d{4}$/;if((match = str.match(pat))) {tz = match[1];}
+else{str = dateObject.toLocaleString();pat = / ([A-Z\/]+)$/;if((match = str.match(pat))) {tz = match[1];}}}
+return tz == 'AM' || tz == 'PM' ? '' : tz;}
+dojo.date.getOrdinal = function(dateObject){var date = dateObject.getDate();if(date%100 != 11 && date%10 == 1){ return "st"; }
+else if(date%100 != 12 && date%10 == 2){ return "nd"; }
+else if(date%100 != 13 && date%10 == 3){ return "rd"; }
+else{ return "th"; }}
+dojo.date.compareTypes={DATE:1, TIME:2};dojo.date.compare=function( dateA,  dateB,  options){var dA=dateA;var dB=dateB||new Date();var now=new Date();with(dojo.date.compareTypes){var opt=options||(DATE|TIME);var d1=new Date(
+(opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0
+);var d2=new Date(
+(opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0
+);}
+if(d1.valueOf()>d2.valueOf()){return 1;}
+if(d1.valueOf()<d2.valueOf()){return -1;}
+return 0;}
+dojo.date.dateParts={YEAR:0, MONTH:1, DAY:2, HOUR:3, MINUTE:4, SECOND:5, MILLISECOND:6, QUARTER:7, WEEK:8, WEEKDAY:9};dojo.date.add = function( dt,  interv,  incr){if(typeof dt == 'number'){dt = new Date(dt);}
+function fixOvershoot(){if (sum.getDate() < dt.getDate()){sum.setDate(0);}}
+var sum = new Date(dt);with(dojo.date.dateParts){switch(interv){case YEAR:
+sum.setFullYear(dt.getFullYear()+incr);fixOvershoot();break;case QUARTER:
+incr*=3;case MONTH:
+sum.setMonth(dt.getMonth()+incr);fixOvershoot();break;case WEEK:
+incr*=7;case DAY:
+sum.setDate(dt.getDate() + incr);break;case WEEKDAY:
+var dat = dt.getDate();var weeks = 0;var days = 0;var strt = 0;var trgt = 0;var adj = 0;var mod = incr % 5;if (mod == 0) {days = (incr > 0) ? 5 : -5;weeks = (incr > 0) ? ((incr-5)/5) : ((incr+5)/5);}
+else {days = mod;weeks = parseInt(incr/5);}
+strt = dt.getDay();if (strt == 6 && incr > 0) {adj = 1;}
+else if (strt == 0 && incr < 0) {adj = -1;}
+trgt = (strt + days);if (trgt == 0 || trgt == 6) {adj = (incr > 0) ? 2 : -2;}
+sum.setDate(dat + (7*weeks) + days + adj);break;case HOUR:
+sum.setHours(sum.getHours()+incr);break;case MINUTE:
+sum.setMinutes(sum.getMinutes()+incr);break;case SECOND:
+sum.setSeconds(sum.getSeconds()+incr);break;case MILLISECOND:
+sum.setMilliseconds(sum.getMilliseconds()+incr);break;default:
+break;}}
+return sum;};dojo.date.diff = function( dtA,  dtB,  interv){if(typeof dtA == 'number'){dtA = new Date(dtA);}
+if(typeof dtB == 'number'){dtB = new Date(dtB);}
+var yeaDiff = dtB.getFullYear() - dtA.getFullYear();var monDiff = (dtB.getMonth() - dtA.getMonth()) + (yeaDiff * 12);var msDiff = dtB.getTime() - dtA.getTime();var secDiff = msDiff/1000;var minDiff = secDiff/60;var houDiff = minDiff/60;var dayDiff = houDiff/24;var weeDiff = dayDiff/7;var delta = 0;with(dojo.date.dateParts){switch(interv){case YEAR:
+delta = yeaDiff;break;case QUARTER:
+var mA = dtA.getMonth();var mB = dtB.getMonth();var qA = Math.floor(mA/3) + 1;var qB = Math.floor(mB/3) + 1;qB += (yeaDiff * 4);delta = qB - qA;break;case MONTH:
+delta = monDiff;break;case WEEK:
+delta = parseInt(weeDiff);break;case DAY:
+delta = dayDiff;break;case WEEKDAY:
+var days = Math.round(dayDiff);var weeks = parseInt(days/7);var mod = days % 7;if (mod == 0) {days = weeks*5;}
+else {var adj = 0;var aDay = dtA.getDay();var bDay = dtB.getDay();weeks = parseInt(days/7);mod = days % 7;var dtMark = new Date(dtA);dtMark.setDate(dtMark.getDate()+(weeks*7));var dayMark = dtMark.getDay();if (dayDiff > 0) {switch (true) {case aDay == 6:
+adj = -1;break;case aDay == 0:
+adj = 0;break;case bDay == 6:
+adj = -1;break;case bDay == 0:
+adj = -2;break;case (dayMark + mod) > 5:
+adj = -2;break;default:
+break;}}
+else if (dayDiff < 0) {switch (true) {case aDay == 6:
+adj = 0;break;case aDay == 0:
+adj = 1;break;case bDay == 6:
+adj = 2;break;case bDay == 0:
+adj = 1;break;case (dayMark + mod) < 0:
+adj = 2;break;default:
+break;}}
+days += adj;days -= (weeks*2);}
+delta = days;break;case HOUR:
+delta = houDiff;break;case MINUTE:
+delta = minDiff;break;case SECOND:
+delta = secDiff;break;case MILLISECOND:
+delta = msDiff;break;default:
+break;}}
+return Math.round(delta);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/format.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/format.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/format.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/format.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,192 @@
+
+dojo.provide("dojo.date.format");dojo.require("dojo.date.common");dojo.require("dojo.date.supplemental");dojo.require("dojo.lang.array");dojo.require("dojo.lang.common");dojo.require("dojo.lang.func");dojo.require("dojo.string.common");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.i18n.calendar", "gregorian");dojo.requireLocalization("dojo.i18n.calendar", "gregorianExtras");(function(){dojo.date.format = function(dateObject, options){if(typeof options == "string"){dojo.deprecated("dojo.date.format", "To format dates with POSIX-style strings, please use dojo.date.strftime instead", "0.5");return dojo.date.strftime(dateObject, options);}
+function formatPattern(dateObject, pattern){return pattern.replace(/([a-z])\1*/ig, function(match){var s;var c = match.charAt(0);var l = match.length;var pad;var widthList = ["abbr", "wide", "narrow"];switch(c){case 'G':
+if(l>3){dojo.unimplemented("Era format not implemented");}
+s = info.eras[dateObject.getFullYear() < 0 ? 1 : 0];break;case 'y':
+s = dateObject.getFullYear();switch(l){case 1:
+break;case 2:
+s = String(s).substr(-2);break;default:
+pad = true;}
+break;case 'Q':
+case 'q':
+s = Math.ceil((dateObject.getMonth()+1)/3);switch(l){case 1: case 2:
+pad = true;break;case 3:
+case 4:
+dojo.unimplemented("Quarter format not implemented");}
+break;case 'M':
+case 'L':
+var m = dateObject.getMonth();var width;switch(l){case 1: case 2:
+s = m+1; pad = true;break;case 3: case 4: case 5:
+width = widthList[l-3];break;}
+if(width){var type = (c == "L") ? "standalone" : "format";var prop = ["months",type,width].join("-");s = info[prop][m];}
+break;case 'w':
+var firstDay = 0;s = dojo.date.getWeekOfYear(dateObject, firstDay); pad = true;break;case 'd':
+s = dateObject.getDate(); pad = true;break;case 'D':
+s = dojo.date.getDayOfYear(dateObject); pad = true;break;case 'E':
+case 'e':
+case 'c':
+var d = dateObject.getDay();var width;switch(l){case 1: case 2:
+if(c == 'e'){var first = dojo.date.getFirstDayOfWeek(options.locale);d = (d-first+7)%7;}
+if(c != 'c'){s = d+1; pad = true;break;}
+case 3: case 4: case 5:
+width = widthList[l-3];break;}
+if(width){var type = (c == "c") ? "standalone" : "format";var prop = ["days",type,width].join("-");s = info[prop][d];}
+break;case 'a':
+var timePeriod = (dateObject.getHours() < 12) ? 'am' : 'pm';s = info[timePeriod];break;case 'h':
+case 'H':
+case 'K':
+case 'k':
+var h = dateObject.getHours();switch (c) {case 'h':
+s = (h % 12) || 12;break;case 'H':
+s = h;break;case 'K':
+s = (h % 12);break;case 'k':
+s = h || 24;break;}
+pad = true;break;case 'm':
+s = dateObject.getMinutes(); pad = true;break;case 's':
+s = dateObject.getSeconds(); pad = true;break;case 'S':
+s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l-3));break;case 'v':
+case 'z':
+s = dojo.date.getTimezoneName(dateObject);if(s){break;}
+l=4;case 'Z':
+var offset = dateObject.getTimezoneOffset();var tz = [
+(offset<=0 ? "+" : "-"),dojo.string.pad(Math.floor(Math.abs(offset)/60), 2),dojo.string.pad(Math.abs(offset)% 60, 2)
+];if(l==4){tz.splice(0, 0, "GMT");tz.splice(3, 0, ":");}
+s = tz.join("");break;case 'Y':
+case 'u':
+case 'W':
+case 'F':
+case 'g':
+case 'A':
+dojo.debug(match+" modifier not yet implemented");s = "?";break;default:
+dojo.raise("dojo.date.format: invalid pattern char: "+pattern);}
+if(pad){ s = dojo.string.pad(s, l); }
+return s;});}
+options = options || {};var locale = dojo.hostenv.normalizeLocale(options.locale);var formatLength = options.formatLength || 'full';var info = dojo.date._getGregorianBundle(locale);var str = [];var sauce = dojo.lang.curry(this, formatPattern, dateObject);if(options.selector != "timeOnly"){var datePattern = options.datePattern || info["dateFormat-"+formatLength];if(datePattern){str.push(_processPattern(datePattern, sauce));}}
+if(options.selector != "dateOnly"){var timePattern = options.timePattern || info["timeFormat-"+formatLength];if(timePattern){str.push(_processPattern(timePattern, sauce));}}
+var result = str.join(" ");return result;};dojo.date.parse = function(value, options){options = options || {};var locale = dojo.hostenv.normalizeLocale(options.locale);var info = dojo.date._getGregorianBundle(locale);var formatLength = options.formatLength || 'full';if(!options.selector){ options.selector = 'dateOnly'; }
+var datePattern = options.datePattern || info["dateFormat-" + formatLength];var timePattern = options.timePattern || info["timeFormat-" + formatLength];var pattern;if(options.selector == 'dateOnly'){pattern = datePattern;}
+else if(options.selector == 'timeOnly'){pattern = timePattern;}else if(options.selector == 'dateTime'){pattern = datePattern + ' ' + timePattern;}else{var msg = "dojo.date.parse: Unknown selector param passed: '" + options.selector + "'.";msg += " Defaulting to date pattern.";dojo.debug(msg);pattern = datePattern;}
+var groups = [];var dateREString = _processPattern(pattern, dojo.lang.curry(this, _buildDateTimeRE, groups, info, options));var dateRE = new RegExp("^" + dateREString + "$");var match = dateRE.exec(value);if(!match){return null;}
+var widthList = ['abbr', 'wide', 'narrow'];var result = new Date(1972, 0);var expected = {};for(var i=1; i<match.length; i++){var grp=groups[i-1];var l=grp.length;var v=match[i];switch(grp.charAt(0)){case 'y':
+if(l != 2){result.setFullYear(v);expected.year = v;}else{if(v<100){v = Number(v);var year = '' + new Date().getFullYear();var century = year.substring(0, 2) * 100;var yearPart = Number(year.substring(2, 4));var cutoff = Math.min(yearPart + 20, 99);var num = (v < cutoff) ? century + v : century - 100 + v;result.setFullYear(num);expected.year = num;}else{if(options.strict){return null;}
+result.setFullYear(v);expected.year = v;}}
+break;case 'M':
+if (l>2) {if(!options.strict){v = v.replace(/\./g,'');v = v.toLowerCase();}
+var months = info['months-format-' + widthList[l-3]].concat();for (var j=0; j<months.length; j++){if(!options.strict){months[j] = months[j].toLowerCase();}
+if(v == months[j]){result.setMonth(j);expected.month = j;break;}}
+if(j==months.length){dojo.debug("dojo.date.parse: Could not parse month name: '" + v + "'.");return null;}}else{result.setMonth(v-1);expected.month = v-1;}
+break;case 'E':
+case 'e':
+if(!options.strict){v = v.toLowerCase();}
+var days = info['days-format-' + widthList[l-3]].concat();for (var j=0; j<days.length; j++){if(!options.strict){days[j] = days[j].toLowerCase();}
+if(v == days[j]){break;}}
+if(j==days.length){dojo.debug("dojo.date.parse: Could not parse weekday name: '" + v + "'.");return null;}
+break;case 'd':
+result.setDate(v);expected.date = v;break;case 'a':
+var am = options.am || info.am;var pm = options.pm || info.pm;if(!options.strict){v = v.replace(/\./g,'').toLowerCase();am = am.replace(/\./g,'').toLowerCase();pm = pm.replace(/\./g,'').toLowerCase();}
+if(options.strict && v != am && v != pm){dojo.debug("dojo.date.parse: Could not parse am/pm part.");return null;}
+var hours = result.getHours();if(v == pm && hours < 12){result.setHours(hours + 12);} else if(v == am && hours == 12){result.setHours(0);}
+break;case 'K':
+if(v==24){v=0;}
+case 'h':
+case 'H':
+case 'k':
+if(v>23){dojo.debug("dojo.date.parse: Illegal hours value");return null;}
+result.setHours(v);break;case 'm':
+result.setMinutes(v);break;case 's':
+result.setSeconds(v);break;case 'S':
+result.setMilliseconds(v);break;default:
+dojo.unimplemented("dojo.date.parse: unsupported pattern char=" + grp.charAt(0));}}
+if(expected.year && result.getFullYear() != expected.year){dojo.debug("Parsed year: '" + result.getFullYear() + "' did not match input year: '" + expected.year + "'.");return null;}
+if(expected.month && result.getMonth() != expected.month){dojo.debug("Parsed month: '" + result.getMonth() + "' did not match input month: '" + expected.month + "'.");return null;}
+if(expected.date && result.getDate() != expected.date){dojo.debug("Parsed day of month: '" + result.getDate() + "' did not match input day of month: '" + expected.date + "'.");return null;}
+return result;};function _processPattern(pattern, applyPattern, applyLiteral, applyAll){var identity = function(x){return x;};applyPattern = applyPattern || identity;applyLiteral = applyLiteral || identity;applyAll = applyAll || identity;var chunks = pattern.match(/(''|[^'])+/g);var literal = false;for(var i=0; i<chunks.length; i++){if(!chunks[i]){chunks[i]='';} else {chunks[i]=(literal ? applyLiteral : applyPattern)(chunks[i]);literal = !literal;}}
+return applyAll(chunks.join(''));}
+function _buildDateTimeRE(groups, info, options, pattern){return pattern.replace(/([a-z])\1*/ig, function(match){var s;var c = match.charAt(0);var l = match.length;switch(c){case 'y':
+s = '\\d' + ((l==2) ? '{2,4}' : '+');break;case 'M':
+s = (l>2) ? '\\S+' : '\\d{1,2}';break;case 'd':
+s = '\\d{1,2}';break;case 'E':
+s = '\\S+';break;case 'h':
+case 'H':
+case 'K':
+case 'k':
+s = '\\d{1,2}';break;case 'm':
+case 's':
+s = '[0-5]\\d';break;case 'S':
+s = '\\d{1,3}';break;case 'a':
+var am = options.am || info.am || 'AM';var pm = options.pm || info.pm || 'PM';if(options.strict){s = am + '|' + pm;}else{s = am;s += (am != am.toLowerCase()) ? '|' + am.toLowerCase() : '';s += '|';s += (pm != pm.toLowerCase()) ? pm + '|' + pm.toLowerCase() : pm;}
+break;default:
+dojo.unimplemented("parse of date format, pattern=" + pattern);}
+if(groups){ groups.push(match); }
+return '\\s*(' + s + ')\\s*';});}})();dojo.date.strftime = function(dateObject, format, locale){var padChar = null;function _(s, n){return dojo.string.pad(s, n || 2, padChar || "0");}
+var info = dojo.date._getGregorianBundle(locale);function $(property){switch (property){case "a":
+return dojo.date.getDayShortName(dateObject, locale);case "A":
+return dojo.date.getDayName(dateObject, locale);case "b":
+case "h":
+return dojo.date.getMonthShortName(dateObject, locale);case "B":
+return dojo.date.getMonthName(dateObject, locale);case "c":
+return dojo.date.format(dateObject, {locale: locale});case "C":
+return _(Math.floor(dateObject.getFullYear()/100));case "d":
+return _(dateObject.getDate());case "D":
+return $("m") + "/" + $("d") + "/" + $("y");case "e":
+if(padChar == null){ padChar = " "; }
+return _(dateObject.getDate());case "f":
+if(padChar == null){ padChar = " "; }
+return _(dateObject.getMonth()+1);case "g":
+break;case "G":
+dojo.unimplemented("unimplemented modifier 'G'");break;case "F":
+return $("Y") + "-" + $("m") + "-" + $("d");case "H":
+return _(dateObject.getHours());case "I":
+return _(dateObject.getHours() % 12 || 12);case "j":
+return _(dojo.date.getDayOfYear(dateObject), 3);case "k":
+if (padChar == null) { padChar = " "; }
+return _(dateObject.getHours());case "l":
+if (padChar == null) { padChar = " "; }
+return _(dateObject.getHours() % 12 || 12);case "m":
+return _(dateObject.getMonth() + 1);case "M":
+return _(dateObject.getMinutes());case "n":
+return "\n";case "p":
+return info[dateObject.getHours() < 12 ? "am" : "pm"];case "r":
+return $("I") + ":" + $("M") + ":" + $("S") + " " + $("p");case "R":
+return $("H") + ":" + $("M");case "S":
+return _(dateObject.getSeconds());case "t":
+return "\t";case "T":
+return $("H") + ":" + $("M") + ":" + $("S");case "u":
+return String(dateObject.getDay() || 7);case "U":
+return _(dojo.date.getWeekOfYear(dateObject));case "V":
+return _(dojo.date.getIsoWeekOfYear(dateObject));case "W":
+return _(dojo.date.getWeekOfYear(dateObject, 1));case "w":
+return String(dateObject.getDay());case "x":
+return dojo.date.format(dateObject, {selector:'dateOnly', locale:locale});case "X":
+return dojo.date.format(dateObject, {selector:'timeOnly', locale:locale});case "y":
+return _(dateObject.getFullYear()%100);case "Y":
+return String(dateObject.getFullYear());case "z":
+var timezoneOffset = dateObject.getTimezoneOffset();return (timezoneOffset > 0 ? "-" : "+") +
+_(Math.floor(Math.abs(timezoneOffset)/60)) + ":" +
+_(Math.abs(timezoneOffset)%60);case "Z":
+return dojo.date.getTimezoneName(dateObject);case "%":
+return "%";}}
+var string = "";var i = 0;var index = 0;var switchCase = null;while ((index = format.indexOf("%", i)) != -1){string += format.substring(i, index++);switch (format.charAt(index++)) {case "_":
+padChar = " "; break;case "-":
+padChar = ""; break;case "0":
+padChar = "0"; break;case "^":
+switchCase = "upper"; break;case "*":
+switchCase = "lower"; break;case "#":
+switchCase = "swap"; break;default:
+padChar = null; index--; break;}
+var property = $(format.charAt(index++));switch (switchCase){case "upper":
+property = property.toUpperCase();break;case "lower":
+property = property.toLowerCase();break;case "swap":
+var compareString = property.toLowerCase();var swapString = '';var j = 0;var ch = '';while (j < property.length){ch = property.charAt(j);swapString += (ch == compareString.charAt(j)) ?
+ch.toUpperCase() : ch.toLowerCase();j++;}
+property = swapString;break;default:
+break;}
+switchCase = null;string += property;i = index;}
+string += format.substring(i);return string;};(function(){var _customFormats = [];dojo.date.addCustomFormats = function(packageName, bundleName){_customFormats.push({pkg:packageName,name:bundleName});};dojo.date._getGregorianBundle = function(locale){var gregorian = {};dojo.lang.forEach(_customFormats, function(desc){var bundle = dojo.i18n.getLocalization(desc.pkg, desc.name, locale);gregorian = dojo.lang.mixin(gregorian, bundle);}, this);return gregorian;};})();dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");dojo.date.getNames = function(item, type, use, locale){var label;var lookup = dojo.date._getGregorianBundle(locale);var props = [item, use, type];if(use == 'standAlone'){label = lookup[props.join('-')];}
+props[1] = 'format';return (label || lookup[props.join('-')]).concat();};dojo.date.getDayName = function(dateObject, locale){return dojo.date.getNames('days', 'wide', 'format', locale)[dateObject.getDay()];};dojo.date.getDayShortName = function(dateObject, locale){return dojo.date.getNames('days', 'abbr', 'format', locale)[dateObject.getDay()];};dojo.date.getMonthName = function(dateObject, locale){return dojo.date.getNames('months', 'wide', 'format', locale)[dateObject.getMonth()];};dojo.date.getMonthShortName = function(dateObject, locale){return dojo.date.getNames('months', 'abbr', 'format', locale)[dateObject.getMonth()];};dojo.date.toRelativeString = function(dateObject){var now = new Date();var diff = (now - dateObject) / 1000;var end = " ago";var future = false;if(diff < 0){future = true;end = " from now";diff = -diff;}
+if(diff < 60){diff = Math.round(diff);return diff + " second" + (diff == 1 ? "" : "s") + end;}
+if(diff < 60*60){diff = Math.round(diff/60);return diff + " minute" + (diff == 1 ? "" : "s") + end;}
+if(diff < 60*60*24){diff = Math.round(diff/3600);return diff + " hour" + (diff == 1 ? "" : "s") + end;}
+if(diff < 60*60*24*7){diff = Math.round(diff/(3600*24));if(diff == 1){return future ? "Tomorrow" : "Yesterday";}else{return diff + " days" + end;}}
+return dojo.date.format(dateObject);};dojo.date.toSql = function(dateObject, noTime){return dojo.date.strftime(dateObject, "%F" + !noTime ? " %T" : "");};dojo.date.fromSql = function(sqlDate){var parts = sqlDate.split(/[\- :]/g);while(parts.length < 6){parts.push(0);}
+return new Date(parts[0], (parseInt(parts[1],10)-1), parts[2], parts[3], parts[4], parts[5]);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/format.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/serialize.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/serialize.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/serialize.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/serialize.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,19 @@
+
+dojo.provide("dojo.date.serialize");dojo.require("dojo.string.common");dojo.date.setIso8601 = function(dateObject, formattedString){var comps = (formattedString.indexOf("T") == -1) ? formattedString.split(" ") : formattedString.split("T");dateObject = dojo.date.setIso8601Date(dateObject, comps[0]);if(comps.length == 2){ dateObject = dojo.date.setIso8601Time(dateObject, comps[1]); }
+return dateObject;};dojo.date.fromIso8601 = function(formattedString){return dojo.date.setIso8601(new Date(0, 0), formattedString);};dojo.date.setIso8601Date = function(dateObject, formattedString){var regexp = "^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|" +
+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";var d = formattedString.match(new RegExp(regexp));if(!d){dojo.debug("invalid date string: " + formattedString);return null;}
+var year = d[1];var month = d[4];var date = d[6];var dayofyear = d[8];var week = d[10];var dayofweek = d[12] ? d[12] : 1;dateObject.setFullYear(year);if(dayofyear){dateObject.setMonth(0);dateObject.setDate(Number(dayofyear));}
+else if(week){dateObject.setMonth(0);dateObject.setDate(1);var gd = dateObject.getDay();var day =  gd ? gd : 7;var offset = Number(dayofweek) + (7 * Number(week));if(day <= 4){ dateObject.setDate(offset + 1 - day); }
+else{ dateObject.setDate(offset + 8 - day); }} else{if(month){dateObject.setDate(1);dateObject.setMonth(month - 1);}
+if(date){ dateObject.setDate(date); }}
+return dateObject;};dojo.date.fromIso8601Date = function(formattedString){return dojo.date.setIso8601Date(new Date(0, 0), formattedString);};dojo.date.setIso8601Time = function(dateObject, formattedString){var timezone = "Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";var d = formattedString.match(new RegExp(timezone));var offset = 0;if(d){if(d[0] != 'Z'){offset = (Number(d[3]) * 60) + Number(d[5]);offset *= ((d[2] == '-') ? 1 : -1);}
+offset -= dateObject.getTimezoneOffset();formattedString = formattedString.substr(0, formattedString.length - d[0].length);}
+var regexp = "^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(\.([0-9]+))?)?)?$";d = formattedString.match(new RegExp(regexp));if(!d){dojo.debug("invalid time string: " + formattedString);return null;}
+var hours = d[1];var mins = Number((d[3]) ? d[3] : 0);var secs = (d[5]) ? d[5] : 0;var ms = d[7] ? (Number("0." + d[7]) * 1000) : 0;dateObject.setHours(hours);dateObject.setMinutes(mins);dateObject.setSeconds(secs);dateObject.setMilliseconds(ms);if(offset !== 0){dateObject.setTime(dateObject.getTime() + offset * 60000);}
+return dateObject;};dojo.date.fromIso8601Time = function(formattedString){return dojo.date.setIso8601Time(new Date(0, 0), formattedString);};dojo.date.toRfc3339 = function(dateObject, selector){if(!dateObject){dateObject = new Date();}
+var _ = dojo.string.pad;var formattedDate = [];if(selector != "timeOnly"){var date = [_(dateObject.getFullYear(),4), _(dateObject.getMonth()+1,2), _(dateObject.getDate(),2)].join('-');formattedDate.push(date);}
+if(selector != "dateOnly"){var time = [_(dateObject.getHours(),2), _(dateObject.getMinutes(),2), _(dateObject.getSeconds(),2)].join(':');var timezoneOffset = dateObject.getTimezoneOffset();time += (timezoneOffset > 0 ? "-" : "+") +
+_(Math.floor(Math.abs(timezoneOffset)/60),2) + ":" +
+_(Math.abs(timezoneOffset)%60,2);formattedDate.push(time);}
+return formattedDate.join('T');};dojo.date.fromRfc3339 = function(rfcDate){if(rfcDate.indexOf("Tany")!=-1){rfcDate = rfcDate.replace("Tany","");}
+var dateObject = new Date();return dojo.date.setIso8601(dateObject, rfcDate);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/serialize.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/supplemental.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/supplemental.js?view=auto&rev=471116
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/supplemental.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/supplemental.js Fri Nov  3 20:39:29 2006
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.date.supplemental");dojo.date.getFirstDayOfWeek = function(locale){var firstDay = {mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};locale = dojo.hostenv.normalizeLocale(locale);var country = locale.split("-")[1];var dow = firstDay[country];return (typeof dow == 'undefined') ? 1 : dow;};dojo.date.getWeekend = function(locale){var weekendStart = {eg:5,il:5,sy:5,'in':0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var weekendEnd = {ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};locale = dojo.hostenv.normalizeLocale(locale);var country = locale.split("-")[1];var start = weekendStart[country];var end 
 = weekendEnd[country];if(typeof start == 'undefined'){start=6;}
+if(typeof end == 'undefined'){end=0;}
+return {start:start, end:end};};dojo.date.isWeekend = function(dateObj, locale){var weekend = dojo.date.getWeekend(locale);var day = (dateObj || new Date()).getDay();if(weekend.end<weekend.start){weekend.end+=7;if(day<weekend.start){ day+=7; }}
+return day >= weekend.start && day <= weekend.end;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/supplemental.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message