tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r498423 [17/30] - in /tapestry/tapestry4/trunk: .settings/ eclipse/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/TimeTracker/src/java/org/apache/tapestry/timetracker/dao/ tapestry-examples/TimeTracker/src/java/org/ap...
Date Sun, 21 Jan 2007 18:26:26 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/browser.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/browser.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/browser.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/browser.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,81 @@
+
+dojo.provide("dojo.storage.browser");dojo.require("dojo.storage");dojo.require("dojo.flash");dojo.require("dojo.json");dojo.require("dojo.uri.*");dojo.storage.browser.FileStorageProvider = function(){}
+dojo.inherits(dojo.storage.browser.FileStorageProvider, dojo.storage);dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME = "__dojoAllKeys";dojo.storage.browser.FileStorageProvider._APPLET_ID = "__dojoFileJavaObj";dojo.lang.extend(dojo.storage.browser.FileStorageProvider, {namespace: "default",initialized: false,_available: null,_statusHandler: null,_keyIndex: new Array(),initialize: function(){if(djConfig["disableFileStorage"] == true){return;}
+this._loadKeyIndex();this.initialized = true;dojo.storage.manager.loaded();},isAvailable: function(){this._available = false;var protocol = window.location.protocol;if(protocol.indexOf("file") != -1 || protocol.indexOf("chrome") != -1){this._available = this._isAvailableXPCOM();if(this._available == false){this._available = this._isAvailableActiveX();}}
+return this._available;},put: function(key, value, resultsHandler){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+this._statusHandler = resultsHandler;try{this._save(key, value);resultsHandler.call(null, dojo.storage.SUCCESS, key);}catch(e){this._statusHandler.call(null, dojo.storage.FAILED,key, e.toString());}},get: function(key){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+var results = this._load(key);return results;},getKeys: function(){return this._keyIndex;},hasKey: function(key){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+this._loadKeyIndex();var exists = false;for(var i = 0; i < this._keyIndex.length; i++){if(this._keyIndex[i] == key){exists = true;}}
+return exists;},clear: function(){this._loadKeyIndex();var keyIndex = new Array();for(var i = 0; i < this._keyIndex.length; i++){keyIndex[keyIndex.length] = new String(this._keyIndex[i]);}
+for(var i = 0; i < keyIndex.length; i++){this.remove(keyIndex[i]);}},remove: function(key){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+this._loadKeyIndex();for(var i = 0; i < this._keyIndex.length; i++){if(this._keyIndex[i] == key){this._keyIndex.splice(i, 1);break;}}
+this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME,this._keyIndex,false);var fullPath = this._getPagePath() + key + ".txt";if(this._isAvailableXPCOM()){this._removeXPCOM(fullPath);}else if(this._isAvailableActiveX()){this._removeActiveX(fullPath);}},isPermanent: function(){return true;},getMaximumSize: function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI: function(){return false;},showSettingsUI: function(){dojo.raise(this.getType() + " does not support a storage settings user-interface");},hideSettingsUI: function(){dojo.raise(this.getType() + " does not support a storage settings user-interface");},getType: function(){return "dojo.storage.browser.FileStorageProvider";},_save: function(key, value, updateKeyIndex){if(typeof updateKeyIndex == "undefined"){updateKeyIndex = true;}
+if(dojo.lang.isString(value) == false){value = dojo.json.serialize(value);value = "\n" + value + "\n\n";}
+var fullPath = this._getPagePath() + key + ".txt";if(this._isAvailableXPCOM()){this._saveFileXPCOM(fullPath, value);}else if(this._isAvailableActiveX()){this._saveFileActiveX(fullPath, value);}
+if(updateKeyIndex){this._updateKeyIndex(key);}},_load: function(key){var fullPath = this._getPagePath() + key + ".txt";var results = null;if(this._isAvailableXPCOM()){results = this._loadFileXPCOM(fullPath);}else if(this._isAvailableActiveX()){results = this._loadFileActiveX(fullPath);}else if(this._isAvailableJava()){results = this._loadFileJava(fullPath);}
+if(results == null){return null;}
+if(!dojo.lang.isUndefined(results) && results != null
+&& /^\/\* JavaScript \*\//.test(results)){results = dojo.json.evalJson(results);}
+return results;},_updateKeyIndex: function(key){this._loadKeyIndex();var alreadyAdded = false;for(var i = 0; i < this._keyIndex.length; i++){if(this._keyIndex[i] == key){alreadyAdded = true;break;}}
+if(alreadyAdded == false){this._keyIndex[this._keyIndex.length] = key;}
+this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME,this._keyIndex,false);},_loadKeyIndex: function(){var indexContents = this._load(
+dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME);if(indexContents == null){this._keyIndex = new Array();}else{this._keyIndex = indexContents;}},_saveFileXPCOM: function(filename, value){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f = Components.classes["@mozilla.org/file/local;1"]
+.createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);var ouputStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
+.createInstance(Components.interfaces.nsIFileOutputStream);ouputStream.init(f, 0x20 | 0x04 | 0x08, 00400 + 00200, null);ouputStream.write(value, value.length);ouputStream.close();}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileXPCOM(): " + msg);}},_loadFileXPCOM: function(filename){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f = Components.classes["@mozilla.org/file/local;1"]
+.createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);if(f.exists() == false){return null;}
+var inp = Components.classes["@mozilla.org/network/file-input-stream;1"]
+.createInstance(Components.interfaces.nsIFileInputStream);inp.init(f, 0x01, 00004, null);var inputStream = Components.classes["@mozilla.org/scriptableinputstream;1"]
+.createInstance(Components.interfaces.nsIScriptableInputStream);inputStream.init(inp);var results = inputStream.read(inputStream.available());return results;}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileXPCOM(): " + msg);}
+return null;},_saveFileActiveX: function(filename, value){try{var fileSystem = new ActiveXObject("Scripting.FileSystemObject");var f = fileSystem.OpenTextFile(filename, 2 ,true );f.Write(value);f.Close();}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileActiveX(): " + msg);}},_loadFileActiveX: function(filename){try{var fileSystem = new ActiveXObject("Scripting.FileSystemObject");if(fileSystem.FileExists(filename) == false){return null;}
+var f = fileSystem.OpenTextFile(filename, 1 );var results = f.ReadAll();f.Close();return results;}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileActiveX(): " + msg);}},_saveFileJava: function(filename, value){try{var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);applet.save(filename, value);}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileJava(): " + msg);}},_loadFileJava: function(filename){try{var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);var results = applet.load(filename);return results;}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileJava(): " + msg);}},_isAvailableActiveX: function(){try{if(window.ActiveXObject){var fileSystem = new window.ActiveXObject("Scripting.FileSystemObject");return true;}}catch(e){dojo.debug(e);}
+return false;},_isAvailableXPCOM: function(){try{if(window.Components){netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");Components.classes["@mozilla.org/file/local;1"]
+.createInstance(Components.interfaces.nsILocalFile);return true;}}catch(e){dojo.debug(e);}
+return false;},_isAvailableJava: function(){try{if(dojo.render.html.safari == true || dojo.render.html.opera == true()){if(navigator.javaEnabled() == true){return true;}}
+}catch(e){dojo.debug(e);}
+return false;},_getPagePath: function(){var path = window.location.pathname;if(/\.html?$/i.test(path)){path = path.replace(/(?:\/|\\)?[^\.\/\\]*\.html?$/, "");}
+if(/^\/?[a-z]+\:/i.test(path)){path = path.replace(/^\/?/, "");path = path.replace(/\//g, "\\");}else if(/^[\/\\]{2,3}[^\/]/.test(path)){path = path.replace(/^[\/\\]{2,3}/, "");path = path.replace(/\//g, "\\");path = "\\\\" + path;}
+if(/\/$/.test(path) == false
+&& /\\$/.test(path) == false){if(/\//.test(path)){path += "/";}else{path += "\\";}}
+path = unescape(path);return path;},_removeXPCOM: function(filename){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f = Components.classes["@mozilla.org/file/local;1"]
+.createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);if(f.exists() == false || f.isDirectory()){return;}
+if(f.isFile()){f.remove(false);}}catch(e){dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): " + e.toString());}},_removeActiveX: function(filename){try{var fileSystem = new ActiveXObject("Scripting.FileSystemObject");fileSystem.DeleteFile(filename);}catch(e){dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): " + e.toString());}},_removeJava: function(filename){try{var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);applet.remove(filename);}catch(e){var msg = e.toString();if(e.name && e.message){msg = e.name + ": " + e.message;}
+dojo.raise("dojo.storage.browser.FileStorageProvider._removeJava(): " + msg);}},_writeApplet: function(){var archive = dojo.uri.moduleUri("dojo", "../DojoFileStorageProvider.jar").toString();var tag = "<applet "
++ "id='" + dojo.storage.browser.FileStorageProvider._APPLET_ID + "' "
++ "style='position: absolute; top: -500px; left: -500px; width: 1px; height: 1px;' "
++ "code='DojoFileStorageProvider.class' "
++ "archive='" + archive + "' "
++ "width='1' "
++ "height='1' "
++ ">"
++ "</applet>";document.writeln(tag);}});dojo.storage.browser.WhatWGStorageProvider = function(){}
+dojo.inherits(dojo.storage.browser.WhatWGStorageProvider, dojo.storage);dojo.lang.extend(dojo.storage.browser.WhatWGStorageProvider, {namespace: "default",initialized: false,_domain: null,_available: null,_statusHandler: null,initialize: function(){if(djConfig["disableWhatWGStorage"] == true){return;}
+this._domain = location.hostname;this.initialized = true;dojo.storage.manager.loaded();},isAvailable: function(){try{var myStorage = globalStorage[location.hostname];}catch(e){this._available = false;return this._available;}
+this._available = true;return this._available;},put: function(key, value, resultsHandler){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+this._statusHandler = resultsHandler;if(dojo.lang.isString(value)){value = "string:" + value;}else{value = dojo.json.serialize(value);}
+window.addEventListener("storage", function(evt){resultsHandler.call(null, dojo.storage.SUCCESS, key);}, false);try{var myStorage = globalStorage[this._domain];myStorage.setItem(key,value);}catch(e){this._statusHandler.call(null, dojo.storage.FAILED,key, e.toString());}},get: function(key){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+var myStorage = globalStorage[this._domain];var results = myStorage.getItem(key);if(results == null){return null;}
+results = results.value;if(!dojo.lang.isUndefined(results) && results != null
+&& /^string:/.test(results)){results = results.substring("string:".length);}else{results = dojo.json.evalJson(results);}
+return results;},getKeys: function(){var myStorage = globalStorage[this._domain];var keysArray = new Array();for(i=0; i<myStorage.length;i++){keysArray[i] = myStorage.key(i);}
+return keysArray;},clear: function(){var myStorage = globalStorage[this._domain];var keys = new Array();for(var i = 0; i < myStorage.length; i++){keys[keys.length] = myStorage.key(i);}
+for(var i = 0; i < keys.length; i++){myStorage.removeItem(keys[i]);}},remove: function(key){var myStorage = globalStorage[this._domain];myStorage.removeItem(key);},isPermanent: function(){return true;},getMaximumSize: function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI: function(){return false;},showSettingsUI: function(){dojo.raise(this.getType() + " does not support a storage settings user-interface");},hideSettingsUI: function(){dojo.raise(this.getType() + " does not support a storage settings user-interface");},getType: function(){return "dojo.storage.browser.WhatWGProvider";}});dojo.storage.browser.FlashStorageProvider = function(){}
+dojo.inherits(dojo.storage.browser.FlashStorageProvider, dojo.storage);dojo.lang.extend(dojo.storage.browser.FlashStorageProvider, {namespace: "default",initialized: false,_available: null,_statusHandler: null,initialize: function(){if(djConfig["disableFlashStorage"] == true){return;}
+var loadedListener = function(){dojo.storage._flashLoaded();}
+dojo.flash.addLoadedListener(loadedListener);var swfloc6 = dojo.uri.moduleUri("dojo", "../Storage_version6.swf").toString();var swfloc8 = dojo.uri.moduleUri("dojo", "../Storage_version8.swf").toString();dojo.flash.setSwf({flash6: swfloc6, flash8: swfloc8, visible: false});},isAvailable: function(){if(djConfig["disableFlashStorage"] == true){this._available = false;}else{this._available = true;}
+return this._available;},put: function(key, value, resultsHandler){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+this._statusHandler = resultsHandler;if(dojo.lang.isString(value)){value = "string:" + value;}else{value = dojo.json.serialize(value);}
+dojo.flash.comm.put(key, value, this.namespace);},get: function(key){if(this.isValidKey(key) == false){dojo.raise("Invalid key given: " + key);}
+var results = dojo.flash.comm.get(key, this.namespace);if(results == ""){return null;}
+if(!dojo.lang.isUndefined(results) && results != null
+&& /^string:/.test(results)){results = results.substring("string:".length);}else{results = dojo.json.evalJson(results);}
+return results;},getKeys: function(){var results = dojo.flash.comm.getKeys(this.namespace);if(results == ""){return [];}
+return results.split(",");},clear: function(){dojo.flash.comm.clear(this.namespace);},remove: function(key){dojo.unimplemented("dojo.storage.browser.FlashStorageProvider.remove");},isPermanent: function(){return true;},getMaximumSize: function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI: function(){return true;},showSettingsUI: function(){dojo.flash.comm.showSettings();dojo.flash.obj.setVisible(true);dojo.flash.obj.center();},hideSettingsUI: function(){dojo.flash.obj.setVisible(false);if(dojo.storage.onHideSettingsUI != null &&
+!dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)){dojo.storage.onHideSettingsUI.call(null);}},getType: function(){return "dojo.storage.browser.FlashStorageProvider";},_flashLoaded: function(){this._initialized = true;dojo.storage.manager.loaded();},_onStatus: function(statusResult, key){var ds = dojo.storage;var dfo = dojo.flash.obj;if(statusResult == ds.PENDING){dfo.center();dfo.setVisible(true);}else{dfo.setVisible(false);}
+if((!dj_undef("_statusHandler", ds))&&(ds._statusHandler != null)){ds._statusHandler.call(null, statusResult, key);}}
+});dojo.storage.manager.register("dojo.storage.browser.FileStorageProvider",new dojo.storage.browser.FileStorageProvider());dojo.storage.manager.register("dojo.storage.browser.WhatWGStorageProvider",new dojo.storage.browser.WhatWGStorageProvider());dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider",new dojo.storage.browser.FlashStorageProvider());dojo.storage.manager.initialize();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.class
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.class?view=auto&rev=498423
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.java?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.java (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/java/DojoFileStorageProvider.java Sun Jan 21 10:25:59 2007
@@ -0,0 +1,54 @@
+/**
+	This is a simple class that can load, save, and remove 
+	files from the native file system. It is needed by Safari and Opera
+	for the dojo.storage.browser.FileStorageProvider, since both of
+	these platforms have no native way to talk to the file system
+	for file:// URLs. Safari supports LiveConnect, but only for talking
+	to an applet, not for generic scripting by JavaScript, so we must
+	have an applet.
+
+	@author Brad Neuberg, bkn3@columbia.edu
+*/
+
+import java.io.*;
+import java.util.*;
+
+public class DojoFileStorageProvider{
+	public String load(String filePath) 
+			throws IOException, FileNotFoundException{
+		StringBuffer results = new StringBuffer();
+		BufferedReader reader = new BufferedReader(
+					new FileReader(filePath));	
+		String line = null;
+		while((line = reader.readLine()) != null){
+			results.append(line);
+		}
+
+		reader.close();
+
+		return results.toString();
+	}
+
+	public void save(String filePath, String content) 
+			throws IOException, FileNotFoundException{
+		PrintWriter writer = new PrintWriter(
+					new BufferedWriter(
+						new FileWriter(filePath, false)));
+		writer.print(content);
+
+		writer.close();
+	}
+
+	public void remove(String filePath)
+			throws IOException, FileNotFoundException{
+		File f = new File(filePath);
+
+		if(f.exists() == false || f.isDirectory()){
+			return;
+		}
+
+		if(f.exists() && f.isFile()){
+			f.delete();
+		}
+	}
+}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/storage_dialog.fla
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/storage_dialog.fla?view=auto&rev=498423
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/storage/storage_dialog.fla
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.string");dojo.require("dojo.string.common");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/Builder.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/Builder.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/Builder.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/Builder.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,15 @@
+
+dojo.provide("dojo.string.Builder");dojo.require("dojo.lang.common");dojo.string.Builder = function(str){this.arrConcat = (dojo.render.html.capable && dojo.render.html["ie"]);var a = [];var b = "";var length = this.length = b.length;if(this.arrConcat){if(b.length > 0){a.push(b);}
+b = "";}
+this.toString = this.valueOf = function(){return (this.arrConcat) ? a.join("") : b;};this.append = function(){for(var x=0; x<arguments.length; x++){var s = arguments[x];if(dojo.lang.isArrayLike(s)){this.append.apply(this, s);} else {if(this.arrConcat){a.push(s);}else{b+=s;}
+length += s.length;this.length = length;}}
+return this;};this.concat = function(){return this.append.apply(this, arguments);};this.clear = function(){a = [];b = "";length = this.length = 0;return this;};this.remove = function(f, l){var s = "";if(this.arrConcat){b = a.join("");}
+a=[];if(f>0){s = b.substring(0, (f-1));}
+b = s + b.substring(f + l);length = this.length = b.length;if(this.arrConcat){a.push(b);b="";}
+return this;};this.replace = function(o, n){if(this.arrConcat){b = a.join("");}
+a = [];b = b.replace(o,n);length = this.length = b.length;if(this.arrConcat){a.push(b);b="";}
+return this;};this.insert = function(idx, s){if(this.arrConcat){b = a.join("");}
+a=[];if(idx == 0){b = s + b;}else{var t = b.split("");t.splice(idx,0,s);b = t.join("")
+}
+length = this.length = b.length;if(this.arrConcat){a.push(b);b="";}
+return this;};this.append.apply(this, arguments);};
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/__package__.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/__package__.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,5 @@
+
+dojo.kwCompoundRequire({common: [
+"dojo.string","dojo.string.common","dojo.string.extras","dojo.string.Builder"
+]
+});dojo.provide("dojo.string.*");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/common.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/common.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,14 @@
+
+dojo.provide("dojo.string.common");dojo.string.trim = function(str, wh){if(!str.replace){ return str; }
+if(!str.length){ return str; }
+var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g);return str.replace(re, "");}
+dojo.string.trimStart = function(str) {return dojo.string.trim(str, 1);}
+dojo.string.trimEnd = function(str) {return dojo.string.trim(str, -1);}
+dojo.string.repeat = function(str, count, separator) {var out = "";for(var i = 0; i < count; i++) {out += str;if(separator && i < count - 1) {out += separator;}}
+return out;}
+dojo.string.pad = function(str, len,  c, dir) {var out = String(str);if(!c) {c = '0';}
+if(!dir) {dir = 1;}
+while(out.length < len) {if(dir > 0) {out = c + out;} else {out += c;}}
+return out;}
+dojo.string.padLeft = function(str, len, c) {return dojo.string.pad(str, len, c, 1);}
+dojo.string.padRight = function(str, len, c) {return dojo.string.pad(str, len, c, -1);}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/extras.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/extras.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/extras.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/string/extras.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,52 @@
+
+dojo.provide("dojo.string.extras");dojo.require("dojo.string.common");dojo.require("dojo.lang.common");dojo.require("dojo.lang.array");dojo.string.substituteParams = function(template, hash){var map = (typeof hash == 'object') ? hash : dojo.lang.toArray(arguments, 1);return template.replace(/\%\{(\w+)\}/g, function(match, key){if(typeof(map[key]) != "undefined" && map[key] != null){return map[key];}
+dojo.raise("Substitution not found: " + key);});};dojo.string.capitalize = function(str){if(!dojo.lang.isString(str)){ return ""; }
+return str.replace(/[^\s]+/g, function(word){return word.substring(0,1).toUpperCase() + word.substring(1);});}
+dojo.string.isBlank = function(str){if(!dojo.lang.isString(str)){ return true; }
+return (dojo.string.trim(str).length == 0);}
+dojo.string.encodeAscii = function(str){if(!dojo.lang.isString(str)){ return str; }
+var ret = "";var value = escape(str);var match, re = /%u([0-9A-F]{4})/i;while((match = value.match(re))){var num = Number("0x"+match[1]);var newVal = escape("&#" + num + ";");ret += value.substring(0, match.index) + newVal;value = value.substring(match.index+match[0].length);}
+ret += value.replace(/\+/g, "%2B");return ret;}
+dojo.string.escape = function(type, str ){var args = dojo.lang.toArray(arguments, 1);switch(type.toLowerCase()){case "xml":
+case "html":
+case "xhtml":
+return dojo.string.escapeXml.apply(this, args);case "sql":
+return dojo.string.escapeSql.apply(this, args);case "regexp":
+case "regex":
+return dojo.string.escapeRegExp.apply(this, args);case "javascript":
+case "jscript":
+case "js":
+return dojo.string.escapeJavaScript.apply(this, args);case "ascii":
+return dojo.string.encodeAscii.apply(this, args);default:
+return str;}}
+dojo.string.escapeXml = function(str, noSingleQuotes){str = str.replace(/&/gm, "&amp;").replace(/</gm, "&lt;")
+.replace(/>/gm, "&gt;").replace(/"/gm, "&quot;");if(!noSingleQuotes){ str = str.replace(/'/gm, "&#39;"); }
+return str;}
+dojo.string.escapeSql = function(str){return str.replace(/'/gm, "''");}
+dojo.string.escapeRegExp = function(str, except){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g, function(ch){if(except && except.indexOf(ch) != -1){return ch;}
+return "\\" + ch;});}
+dojo.string.escapeJavaScript = function(str){return str.replace(/(["'\f\b\n\t\r])/gm, "\\$1");}
+dojo.string.escapeString = function(str){return ('"' + str.replace(/(["\\])/g, '\\$1') + '"'
+).replace(/[\f]/g, "\\f"
+).replace(/[\b]/g, "\\b"
+).replace(/[\n]/g, "\\n"
+).replace(/[\t]/g, "\\t"
+).replace(/[\r]/g, "\\r");}
+dojo.string.summary = function(str, len){if(!len || str.length <= len){return str;}
+return str.substring(0, len).replace(/\.+$/, "") + "...";}
+dojo.string.endsWith = function(str, end, ignoreCase){if(ignoreCase){str = str.toLowerCase();end = end.toLowerCase();}
+if((str.length - end.length) < 0){return false;}
+return str.lastIndexOf(end) == str.length - end.length;}
+dojo.string.endsWithAny = function(str ){for(var i = 1; i < arguments.length; i++) {if(dojo.string.endsWith(str, arguments[i])) {return true;}}
+return false;}
+dojo.string.startsWith = function(str, start, ignoreCase){if(ignoreCase) {str = str.toLowerCase();start = start.toLowerCase();}
+return str.indexOf(start) == 0;}
+dojo.string.startsWithAny = function(str ){for(var i = 1; i < arguments.length; i++) {if(dojo.string.startsWith(str, arguments[i])) {return true;}}
+return false;}
+dojo.string.has = function(str ) {for(var i = 1; i < arguments.length; i++) {if(str.indexOf(arguments[i]) > -1){return true;}}
+return false;}
+dojo.string.normalizeNewlines = function(text, newlineChar){if (newlineChar == "\n"){text = text.replace(/\r\n/g, "\n");text = text.replace(/\r/g, "\n");} else if (newlineChar == "\r"){text = text.replace(/\r\n/g, "\r");text = text.replace(/\n/g, "\r");}else{text = text.replace(/([^\r])\n/g, "$1\r\n").replace(/\r([^\n])/g, "\r\n$1");}
+return text;}
+dojo.string.splitEscaped = function(str, charac){var components = [];for (var i = 0, prevcomma = 0; i < str.length; i++){if (str.charAt(i) == '\\'){ i++; continue; }
+if (str.charAt(i) == charac){components.push(str.substring(prevcomma, i));prevcomma = i + 1;}}
+components.push(str.substr(prevcomma));return components;}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/svg.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/svg.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/svg.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/svg.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,13 @@
+
+dojo.provide("dojo.svg");dojo.require("dojo.lang.common");dojo.require("dojo.dom");dojo.mixin(dojo.svg, dojo.dom);dojo.svg.graphics=dojo.svg.g=new function( d){this.suspend=function(){try { d.documentElement.suspendRedraw(0); } catch(e){ }};this.resume=function(){try { d.documentElement.unsuspendRedraw(0); } catch(e){ }};this.force=function(){try { d.documentElement.forceRedraw(); } catch(e){ }};}(document);dojo.svg.animations=dojo.svg.anim=new function( d){this.arePaused=function(){try {return d.documentElement.animationsPaused();} catch(e){return false;}} ;this.pause=function(){try { d.documentElement.pauseAnimations(); } catch(e){ }};this.resume=function(){try { d.documentElement.unpauseAnimations(); } catch(e){ }};}(document);dojo.svg.toCamelCase=function( selector){var arr=selector.split('-'), cc=arr[0];for(var i=1; i < arr.length; i++) {cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1);}
+return cc;};dojo.svg.toSelectorCase=function( selector) {return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase();};dojo.svg.getStyle=function( node,  cssSelector){return document.defaultView.getComputedStyle(node, cssSelector);};dojo.svg.getNumericStyle=function( node,  cssSelector){return parseFloat(dojo.svg.getStyle(node, cssSelector));};dojo.svg.getOpacity=function(node){return Math.min(1.0, dojo.svg.getNumericStyle(node, "fill-opacity"));};dojo.svg.setOpacity=function( node,  opacity){node.setAttributeNS(this.xmlns.svg, "fill-opacity", opacity);node.setAttributeNS(this.xmlns.svg, "stroke-opacity", opacity);};dojo.svg.clearOpacity=function( node){node.setAttributeNS(this.xmlns.svg, "fill-opacity", "1.0");node.setAttributeNS(this.xmlns.svg, "stroke-opacity", "1.0");};dojo.svg.getCoords=function( node){if (node.getBBox) {var box=node.getBBox();return { x: box.x, y: box.y };}
+return null;};dojo.svg.setCoords=function(node, coords){var p=dojo.svg.getCoords();if (!p) return;var dx=p.x - coords.x;var dy=p.y - coords.y;dojo.svg.translate(node, dx, dy);};dojo.svg.getDimensions=function(node){if (node.getBBox){var box=node.getBBox();return { width: box.width, height : box.height };}
+return null;};dojo.svg.setDimensions=function(node, dim){if (node.width){node.width.baseVal.value=dim.width;node.height.baseVal.value=dim.height;}
+else if (node.r){node.r.baseVal.value=Math.min(dim.width, dim.height)/2;}
+else if (node.rx){node.rx.baseVal.value=dim.width/2;node.ry.baseVal.value=dim.height/2;}};dojo.svg.translate=function(node, dx, dy){if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();t.setTranslate(dx, dy);node.transform.baseVal.appendItem(t);}};dojo.svg.scale=function(node, scaleX, scaleY){if (!scaleY) var scaleY=scaleX;if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();t.setScale(scaleX, scaleY);node.transform.baseVal.appendItem(t);}};dojo.svg.rotate=function(node, ang, cx, cy){if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();if (cx == null) t.setMatrix(t.matrix.rotate(ang));else t.setRotate(ang, cx, cy);node.transform.baseVal.appendItem(t);}};dojo.svg.skew=function(node, ang, axis){var dir=axis || "x";if (node.transform &&
  node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();if (dir != "x") t.setSkewY(ang);else t.setSkewX(ang);node.transform.baseVal.appendItem(t);}};dojo.svg.flip=function(node, axis){var dir=axis || "x";if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();t.setMatrix((dir != "x") ? t.matrix.flipY() : t.matrix.flipX());node.transform.baseVal.appendItem(t);}};dojo.svg.invert=function(node){if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var t=node.ownerSVGElement.createSVGTransform();t.setMatrix(t.matrix.inverse());node.transform.baseVal.appendItem(t);}};dojo.svg.applyMatrix=function(
+node,a,b,c,d,e,f
+){if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform){var m;if (b){var m=node.ownerSVGElement.createSVGMatrix();m.a=a;m.b=b;m.c=c;m.d=d;m.e=e;m.f=f;} else m=a;var t=node.ownerSVGElement.createSVGTransform();t.setMatrix(m);node.transform.baseVal.appendItem(t);}};dojo.svg.group=function(nodes){var p=nodes.item(0).parentNode;var g=document.createElementNS(this.xmlns.svg, "g");for (var i=0; i < nodes.length; i++) g.appendChild(nodes.item(i));p.appendChild(g);return g;};dojo.svg.ungroup=function(g){var p=g.parentNode;while (g.childNodes.length > 0) p.appendChild(g.childNodes.item(0));p.removeChild(g);};dojo.svg.getGroup=function(node){var a=this.getAncestors(node);for (var i=0; i < a.length; i++){if (a[i].nodeType == this.ELEMENT_NODE && a[i].nodeName.toLowerCase() == "g")
+return a[i];}
+return null;};dojo.svg.bringToFront=function(node){var n=this.getGroup(node) || node;n.ownerSVGElement.appendChild(n);};dojo.svg.sendToBack=function(node){var n=this.getGroup(node) || node;n.ownerSVGElement.insertBefore(n, n.ownerSVGElement.firstChild);};dojo.svg.bringForward=function(node){var n=this.getGroup(node) || node;if (this.getLastChildElement(n.parentNode) != n){this.insertAfter(n, this.getNextSiblingElement(n), true);}};dojo.svg.sendBackward=function(node){var n=this.getGroup(node) || node;if (this.getFirstChildElement(n.parentNode) != n){this.insertBefore(n, this.getPreviousSiblingElement(n), true);}};dojo.svg.createNodesFromText=function( txt,  wrap){var docFrag=(new DOMParser()).parseFromString(txt, "text/xml").normalize();if(wrap){return [docFrag.firstChild.cloneNode(true)];}
+var nodes=[];for(var x=0; x<docFrag.childNodes.length; x++){nodes.push(docFrag.childNodes.item(x).cloneNode(true));}
+return nodes;}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/Manager.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/Manager.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/Manager.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/Manager.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,19 @@
+
+dojo.provide("dojo.undo.Manager");dojo.require("dojo.lang.common");dojo.undo.Manager = function(parent) {this.clear();this._parent = parent;};dojo.extend(dojo.undo.Manager, {_parent: null,_undoStack: null,_redoStack: null,_currentManager: null,canUndo: false,canRedo: false,isUndoing: false,isRedoing: false,onUndo: function(manager, item) {},onRedo: function(manager, item) {},onUndoAny: function(manager, item) {},onRedoAny: function(manager, item) {},_updateStatus: function() {this.canUndo = this._undoStack.length > 0;this.canRedo = this._redoStack.length > 0;},clear: function() {this._undoStack = [];this._redoStack = [];this._currentManager = this;this.isUndoing = false;this.isRedoing = false;this._updateStatus();},undo: function() {if(!this.canUndo) { return false; }
+this.endAllTransactions();this.isUndoing = true;var top = this._undoStack.pop();if(top instanceof dojo.undo.Manager){top.undoAll();}else{top.undo();}
+if(top.redo){this._redoStack.push(top);}
+this.isUndoing = false;this._updateStatus();this.onUndo(this, top);if(!(top instanceof dojo.undo.Manager)) {this.getTop().onUndoAny(this, top);}
+return true;},redo: function() {if(!this.canRedo){ return false; }
+this.isRedoing = true;var top = this._redoStack.pop();if(top instanceof dojo.undo.Manager) {top.redoAll();}else{top.redo();}
+this._undoStack.push(top);this.isRedoing = false;this._updateStatus();this.onRedo(this, top);if(!(top instanceof dojo.undo.Manager)){this.getTop().onRedoAny(this, top);}
+return true;},undoAll: function() {while(this._undoStack.length > 0) {this.undo();}},redoAll: function() {while(this._redoStack.length > 0) {this.redo();}},push: function(undo, redo, description) {if(!undo) { return; }
+if(this._currentManager == this) {this._undoStack.push({undo: undo,redo: redo,description: description
+});} else {this._currentManager.push.apply(this._currentManager, arguments);}
+this._redoStack = [];this._updateStatus();},concat: function(manager) {if ( !manager ) { return; }
+if (this._currentManager == this ) {for(var x=0; x < manager._undoStack.length; x++) {this._undoStack.push(manager._undoStack[x]);}
+if (manager._undoStack.length > 0) {this._redoStack = [];}
+this._updateStatus();} else {this._currentManager.concat.apply(this._currentManager, arguments);}},beginTransaction: function(description) {if(this._currentManager == this) {var mgr = new dojo.undo.Manager(this);mgr.description = description ? description : "";this._undoStack.push(mgr);this._currentManager = mgr;return mgr;} else {this._currentManager = this._currentManager.beginTransaction.apply(this._currentManager, arguments);}},endTransaction: function(flatten ) {if(this._currentManager == this) {if(this._parent) {this._parent._currentManager = this._parent;if(this._undoStack.length == 0 || flatten) {var idx = dojo.lang.find(this._parent._undoStack, this);if (idx >= 0) {this._parent._undoStack.splice(idx, 1);if (flatten) {for(var x=0; x < this._undoStack.length; x++){this._parent._undoStack.splice(idx++, 0, this._undoStack[x]);}
+this._updateStatus();}}
+}
+return this._parent;}} else {this._currentManager = this._currentManager.endTransaction.apply(this._currentManager, arguments);}},endAllTransactions: function() {while(this._currentManager != this) {this.endTransaction();}},getTop: function() {if(this._parent) {return this._parent.getTop();} else {return this;}}
+});
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/__package__.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/__package__.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,2 @@
+
+dojo.require("dojo.undo.Manager");dojo.provide("dojo.undo.*");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/browser.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/browser.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/browser.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/undo/browser.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,32 @@
+
+dojo.provide("dojo.undo.browser");dojo.require("dojo.io.common");try{if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='" + (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html') + "'></iframe>");}}catch(e){}
+if(dojo.render.html.opera){dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");}
+dojo.undo.browser = {initialHref: (!dj_undef("window")) ? window.location.href : "",initialHash: (!dj_undef("window")) ? window.location.hash : "",moveForward: false,historyStack: [],forwardStack: [],historyIframe: null,bookmarkAnchor: null,locationTimer: null,setInitialState: function(args){this.initialState = this._createState(this.initialHref, args, this.initialHash);},addToHistory: function(args){this.forwardStack = [];var hash = null;var url = null;if(!this.historyIframe){if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"
++ " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"
++ " to the path on your domain to iframe_history.html");}
+this.historyIframe = window.frames["djhistory"];}
+if(!this.bookmarkAnchor){this.bookmarkAnchor = document.createElement("a");dojo.body().appendChild(this.bookmarkAnchor);this.bookmarkAnchor.style.display = "none";}
+if(args["changeUrl"]){hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime());if(this.historyStack.length == 0 && this.initialState.urlHash == hash){this.initialState = this._createState(url, args, hash);return;}else if(this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash){this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash);return;}
+this.changingUrl = true;setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1);this.bookmarkAnchor.href = hash;if(dojo.render.html.ie){url = this._loadIframeHistory();var oldCB = args["back"]||args["backButton"]||args["handle"];var tcb = function(handleName){if(window.location.hash != ""){setTimeout("window.location.href = '"+hash+"';", 1);}
+oldCB.apply(this, [handleName]);}
+if(args["back"]){args.back = tcb;}else if(args["backButton"]){args.backButton = tcb;}else if(args["handle"]){args.handle = tcb;}
+var oldFW = args["forward"]||args["forwardButton"]||args["handle"];var tfw = function(handleName){if(window.location.hash != ""){window.location.href = hash;}
+if(oldFW){oldFW.apply(this, [handleName]);}}
+if(args["forward"]){args.forward = tfw;}else if(args["forwardButton"]){args.forwardButton = tfw;}else if(args["handle"]){args.handle = tfw;}}else if(dojo.render.html.moz){if(!this.locationTimer){this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200);}}
+}else{url = this._loadIframeHistory();}
+this.historyStack.push(this._createState(url, args, hash));},checkLocation: function(){if (!this.changingUrl){var hsl = this.historyStack.length;if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){this.handleBackButton();return;}
+if(this.forwardStack.length > 0){if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){this.handleForwardButton();return;}}
+if((hsl >= 2)&&(this.historyStack[hsl-2])){if(this.historyStack[hsl-2].urlHash==window.location.hash){this.handleBackButton();return;}}
+}},iframeLoaded: function(evt, ifrLoc){if(!dojo.render.html.opera){var query = this._getUrlQuery(ifrLoc.href);if(query == null){if(this.historyStack.length == 1){this.handleBackButton();}
+return;}
+if(this.moveForward){this.moveForward = false;return;}
+if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){this.handleBackButton();}
+else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){this.handleForwardButton();}}
+},handleBackButton: function(){var current = this.historyStack.pop();if(!current){ return; }
+var last = this.historyStack[this.historyStack.length-1];if(!last && this.historyStack.length == 0){last = this.initialState;}
+if (last){if(last.kwArgs["back"]){last.kwArgs["back"]();}else if(last.kwArgs["backButton"]){last.kwArgs["backButton"]();}else if(last.kwArgs["handle"]){last.kwArgs.handle("back");}}
+this.forwardStack.push(current);},handleForwardButton: function(){var last = this.forwardStack.pop();if(!last){ return; }
+if(last.kwArgs["forward"]){last.kwArgs.forward();}else if(last.kwArgs["forwardButton"]){last.kwArgs.forwardButton();}else if(last.kwArgs["handle"]){last.kwArgs.handle("forward");}
+this.historyStack.push(last);},_createState: function(url, args, hash){return {"url": url, "kwArgs": args, "urlHash": hash};},_getUrlQuery: function(url){var segments = url.split("?");if (segments.length < 2){return null;}
+else{return segments[1];}},_loadIframeHistory: function(){var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html')
++ "?" + (new Date()).getTime();this.moveForward = true;dojo.io.setIFrameSrc(this.historyIframe, url, false);return url;}}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/Uri.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/Uri.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/Uri.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/Uri.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,18 @@
+
+dojo.provide("dojo.uri.Uri");dojo.uri = new function() {var authorityPattern = new RegExp("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");var uriPattern = new RegExp("(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var cssPattern = new RegExp("/(\\w+.css)");this.dojoUri = function (uri) {return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri);}
+this.moduleUri = function(module, uri){var loc = dojo.hostenv.getModuleSymbols(module).join('/');if(!loc){return null;}
+if(loc.lastIndexOf("/") != loc.length-1){loc += "/";}
+var colonIndex = loc.indexOf(":");var slashIndex = loc.indexOf("/");if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){loc = dojo.hostenv.getBaseScriptUri() + loc;}
+return new dojo.uri.Uri(loc,uri);}
+this.Uri = function () {var uri = arguments[0];if (uri && arguments.length > 1) {var cssMatch = cssPattern.exec(uri);if (cssMatch){uri = uri.toString().replace(cssMatch[1], "");}}
+for (var i = 1; i < arguments.length; i++) {if(!arguments[i]) { continue; }
+var relobj = new dojo.uri.Uri(arguments[i].toString());var uriobj = new dojo.uri.Uri(uri.toString());if ((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)) {if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; }
+relobj = uriobj;}
+if (relobj.scheme != null && relobj.authority != null)
+uri = "";if (relobj.scheme != null) { uri += relobj.scheme + ":"; }
+if (relobj.authority != null) { uri += "//" + relobj.authority; }
+uri += relobj.path;if (relobj.query != null) { uri += "?" + relobj.query; }
+if (relobj.fragment != null) { uri += "#" + relobj.fragment; }}
+this.uri = uri.toString();var r = this.uri.match(uriPattern);this.scheme = r[2] || (r[1] ? "" : null);this.authority = r[4] || (r[3] ? "" : null);this.path = r[5];this.query = r[7] || (r[6] ? "" : null);this.fragment  = r[9] || (r[8] ? "" : null);if (this.authority != null) {r = this.authority.match(authorityPattern);this.user = r[3] || null;this.password = r[4] || null;this.host = r[5];this.port = r[7] || null;}
+this.toString = function(){ return this.uri; }}
+};
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/__package__.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/__package__.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,3 @@
+
+dojo.kwCompoundRequire({common: [["dojo.uri.Uri", false, false]]
+});dojo.provide("dojo.uri.*");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/cache.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/cache.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/cache.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uri/cache.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.uri.cache");dojo.uri.cache = {_cache: {},set: function(uri, content){this._cache[uri.toString()] = content;return uri;},remove: function(uri){delete this._cache[uri.toString()];},get: function(uri){var key =  uri.toString();var value = this._cache[key];if(!value){value = dojo.hostenv.getText(key);if(value){this._cache[key] = value;}}
+return value;},allow: function(uri){return uri;}}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/LightweightGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/LightweightGenerator.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/LightweightGenerator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/LightweightGenerator.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.uuid.LightweightGenerator");dojo.uuid.LightweightGenerator = new function() {var HEX_RADIX = 16;function _generateRandomEightCharacterHexString() {var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );var eightCharacterHexString = random32bitNumber.toString(HEX_RADIX);while (eightCharacterHexString.length < 8) {eightCharacterHexString = "0" + eightCharacterHexString;}
+return eightCharacterHexString;}
+this.generate = function( returnType) {var hyphen = "-";var versionCodeForRandomlyGeneratedUuids = "4";var variantCodeForDCEUuids = "8";var a = _generateRandomEightCharacterHexString();var b = _generateRandomEightCharacterHexString();b = b.substring(0, 4) + hyphen + versionCodeForRandomlyGeneratedUuids + b.substring(5, 8);var c = _generateRandomEightCharacterHexString();c = variantCodeForDCEUuids + c.substring(1, 4) + hyphen + c.substring(4, 8);var d = _generateRandomEightCharacterHexString();var returnValue = a + hyphen + b + hyphen + c + d;returnValue = returnValue.toLowerCase();if (returnType && (returnType != String)) {returnValue = new returnType(returnValue);}
+return returnValue;};}();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NameBasedGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NameBasedGenerator.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NameBasedGenerator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NameBasedGenerator.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.uuid.NameBasedGenerator");dojo.uuid.NameBasedGenerator = new function() {this.generate = function( returnType) {dojo.unimplemented('dojo.uuid.NameBasedGenerator.generate');var returnValue = "00000000-0000-0000-0000-000000000000";if (returnType && (returnType != String)) {returnValue = new returnType(returnValue);}
+return returnValue;};}();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NilGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NilGenerator.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NilGenerator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/NilGenerator.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.uuid.NilGenerator");dojo.uuid.NilGenerator = new function() {this.generate = function( returnType) {var returnValue = "00000000-0000-0000-0000-000000000000";if (returnType && (returnType != String)) {returnValue = new returnType(returnValue);}
+return returnValue;};}();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/RandomGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/RandomGenerator.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/RandomGenerator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/RandomGenerator.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.uuid.RandomGenerator");dojo.uuid.RandomGenerator = new function() {this.generate = function( returnType) {dojo.unimplemented('dojo.uuid.RandomGenerator.generate');var returnValue = "00000000-0000-0000-0000-000000000000";if (returnType && (returnType != String)) {returnValue = new returnType(returnValue);}
+return returnValue;};}();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/TimeBasedGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/TimeBasedGenerator.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/TimeBasedGenerator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/TimeBasedGenerator.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,32 @@
+
+dojo.provide("dojo.uuid.TimeBasedGenerator");dojo.require("dojo.lang.common");dojo.require("dojo.lang.type");dojo.require("dojo.lang.assert");dojo.uuid.TimeBasedGenerator = new function() {this.GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;var _uuidPseudoNodeString = null;var _uuidClockSeqString = null;var _dateValueOfPreviousUuid = null;var _nextIntraMillisecondIncrement = 0;var _cachedMillisecondsBetween1582and1970 = null;var _cachedHundredNanosecondIntervalsPerMillisecond = null;var _uniformNode = null;var HEX_RADIX = 16;function _carry( arrayA) {arrayA[2] += arrayA[3] >>> 16;arrayA[3] &= 0xFFFF;arrayA[1] += arrayA[2] >>> 16;arrayA[2] &= 0xFFFF;arrayA[0] += arrayA[1] >>> 16;arrayA[1] &= 0xFFFF;dojo.lang.assert((arrayA[0] >>> 16) === 0);}
+function _get64bitArrayFromFloat( x) {var result = new Array(0, 0, 0, 0);result[3] = x % 0x10000;x -= result[3];x /= 0x10000;result[2] = x % 0x10000;x -= result[2];x /= 0x10000;result[1] = x % 0x10000;x -= result[1];x /= 0x10000;result[0] = x;return result;}
+function _addTwo64bitArrays( arrayA,  arrayB) {dojo.lang.assertType(arrayA, Array);dojo.lang.assertType(arrayB, Array);dojo.lang.assert(arrayA.length == 4);dojo.lang.assert(arrayB.length == 4);var result = new Array(0, 0, 0, 0);result[3] = arrayA[3] + arrayB[3];result[2] = arrayA[2] + arrayB[2];result[1] = arrayA[1] + arrayB[1];result[0] = arrayA[0] + arrayB[0];_carry(result);return result;}
+function _multiplyTwo64bitArrays( arrayA,  arrayB) {dojo.lang.assertType(arrayA, Array);dojo.lang.assertType(arrayB, Array);dojo.lang.assert(arrayA.length == 4);dojo.lang.assert(arrayB.length == 4);var overflow = false;if (arrayA[0] * arrayB[0] !== 0) { overflow = true; }
+if (arrayA[0] * arrayB[1] !== 0) { overflow = true; }
+if (arrayA[0] * arrayB[2] !== 0) { overflow = true; }
+if (arrayA[1] * arrayB[0] !== 0) { overflow = true; }
+if (arrayA[1] * arrayB[1] !== 0) { overflow = true; }
+if (arrayA[2] * arrayB[0] !== 0) { overflow = true; }
+dojo.lang.assert(!overflow);var result = new Array(0, 0, 0, 0);result[0] += arrayA[0] * arrayB[3];_carry(result);result[0] += arrayA[1] * arrayB[2];_carry(result);result[0] += arrayA[2] * arrayB[1];_carry(result);result[0] += arrayA[3] * arrayB[0];_carry(result);result[1] += arrayA[1] * arrayB[3];_carry(result);result[1] += arrayA[2] * arrayB[2];_carry(result);result[1] += arrayA[3] * arrayB[1];_carry(result);result[2] += arrayA[2] * arrayB[3];_carry(result);result[2] += arrayA[3] * arrayB[2];_carry(result);result[3] += arrayA[3] * arrayB[3];_carry(result);return result;}
+function _padWithLeadingZeros( string,  desiredLength) {while (string.length < desiredLength) {string = "0" + string;}
+return string;}
+function _generateRandomEightCharacterHexString() {var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );var eightCharacterString = random32bitNumber.toString(HEX_RADIX);while (eightCharacterString.length < 8) {eightCharacterString = "0" + eightCharacterString;}
+return eightCharacterString;}
+function _generateUuidString( node) {dojo.lang.assertType(node, String, {optional: true});if (node) {dojo.lang.assert(node.length == 12);} else {if (_uniformNode) {node = _uniformNode;} else {if (!_uuidPseudoNodeString) {var pseudoNodeIndicatorBit = 0x8000;var random15bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 15) );var leftmost4HexCharacters = (pseudoNodeIndicatorBit | random15bitNumber).toString(HEX_RADIX);_uuidPseudoNodeString = leftmost4HexCharacters + _generateRandomEightCharacterHexString();}
+node = _uuidPseudoNodeString;}}
+if (!_uuidClockSeqString) {var variantCodeForDCEUuids = 0x8000;var random14bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 14) );_uuidClockSeqString = (variantCodeForDCEUuids | random14bitNumber).toString(HEX_RADIX);}
+var now = new Date();var millisecondsSince1970 = now.valueOf();var nowArray = _get64bitArrayFromFloat(millisecondsSince1970);if (!_cachedMillisecondsBetween1582and1970) {var arraySecondsPerHour = _get64bitArrayFromFloat(60 * 60);var arrayHoursBetween1582and1970 = _get64bitArrayFromFloat(dojo.uuid.TimeBasedGenerator.GREGORIAN_CHANGE_OFFSET_IN_HOURS);var arraySecondsBetween1582and1970 = _multiplyTwo64bitArrays(arrayHoursBetween1582and1970, arraySecondsPerHour);var arrayMillisecondsPerSecond = _get64bitArrayFromFloat(1000);_cachedMillisecondsBetween1582and1970 = _multiplyTwo64bitArrays(arraySecondsBetween1582and1970, arrayMillisecondsPerSecond);_cachedHundredNanosecondIntervalsPerMillisecond = _get64bitArrayFromFloat(10000);}
+var arrayMillisecondsSince1970 = nowArray;var arrayMillisecondsSince1582 = _addTwo64bitArrays(_cachedMillisecondsBetween1582and1970, arrayMillisecondsSince1970);var arrayHundredNanosecondIntervalsSince1582 = _multiplyTwo64bitArrays(arrayMillisecondsSince1582, _cachedHundredNanosecondIntervalsPerMillisecond);if (now.valueOf() == _dateValueOfPreviousUuid) {arrayHundredNanosecondIntervalsSince1582[3] += _nextIntraMillisecondIncrement;_carry(arrayHundredNanosecondIntervalsSince1582);_nextIntraMillisecondIncrement += 1;if (_nextIntraMillisecondIncrement == 10000) {while (now.valueOf() == _dateValueOfPreviousUuid) {now = new Date();}}
+} else {_dateValueOfPreviousUuid = now.valueOf();_nextIntraMillisecondIncrement = 1;}
+var hexTimeLowLeftHalf  = arrayHundredNanosecondIntervalsSince1582[2].toString(HEX_RADIX);var hexTimeLowRightHalf = arrayHundredNanosecondIntervalsSince1582[3].toString(HEX_RADIX);var hexTimeLow = _padWithLeadingZeros(hexTimeLowLeftHalf, 4) + _padWithLeadingZeros(hexTimeLowRightHalf, 4);var hexTimeMid = arrayHundredNanosecondIntervalsSince1582[1].toString(HEX_RADIX);hexTimeMid = _padWithLeadingZeros(hexTimeMid, 4);var hexTimeHigh = arrayHundredNanosecondIntervalsSince1582[0].toString(HEX_RADIX);hexTimeHigh = _padWithLeadingZeros(hexTimeHigh, 3);var hyphen = "-";var versionCodeForTimeBasedUuids = "1";var resultUuid = hexTimeLow + hyphen + hexTimeMid + hyphen +
+versionCodeForTimeBasedUuids + hexTimeHigh + hyphen +
+_uuidClockSeqString + hyphen + node;resultUuid = resultUuid.toLowerCase();return resultUuid;}
+this.setNode = function( node) {dojo.lang.assert((node === null) || (node.length == 12));_uniformNode = node;};this.getNode = function() {return _uniformNode;};this.generate = function( input) {var nodeString = null;var returnType = null;if (input) {if (dojo.lang.isObject(input) && !dojo.lang.isBuiltIn(input)) {var namedParameters = input;dojo.lang.assertValidKeywords(namedParameters, ["node", "hardwareNode", "pseudoNode", "returnType"]);var node = namedParameters["node"];var hardwareNode = namedParameters["hardwareNode"];var pseudoNode = namedParameters["pseudoNode"];nodeString = (node || pseudoNode || hardwareNode);if (nodeString) {var firstCharacter = nodeString.charAt(0);var firstDigit = parseInt(firstCharacter, HEX_RADIX);if (hardwareNode) {dojo.lang.assert((firstDigit >= 0x0) && (firstDigit <= 0x7));}
+if (pseudoNode) {dojo.lang.assert((firstDigit >= 0x8) && (firstDigit <= 0xF));}}
+returnType = namedParameters["returnType"];dojo.lang.assertType(returnType, Function, {optional: true});} else {if (dojo.lang.isString(input)) {nodeString = input;returnType = null;} else {if (dojo.lang.isFunction(input)) {nodeString = null;returnType = input;}}
+}
+if (nodeString) {dojo.lang.assert(nodeString.length == 12);var integer = parseInt(nodeString, HEX_RADIX);dojo.lang.assert(isFinite(integer));}
+dojo.lang.assertType(returnType, Function, {optional: true});}
+var uuidString = _generateUuidString(nodeString);var returnValue;if (returnType && (returnType != String)) {returnValue = new returnType(uuidString);} else {returnValue = uuidString;}
+return returnValue;};}();
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/Uuid.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/Uuid.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/Uuid.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/Uuid.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,24 @@
+
+dojo.provide("dojo.uuid.Uuid");dojo.require("dojo.lang.common");dojo.require("dojo.lang.assert");dojo.uuid.Uuid = function( input) {this._uuidString = dojo.uuid.Uuid.NIL_UUID;if (input) {if (dojo.lang.isString(input)) {this._uuidString = input.toLowerCase();dojo.lang.assert(this.isValid());} else {if (dojo.lang.isObject(input) && input.generate) {var generator = input;this._uuidString = generator.generate();dojo.lang.assert(this.isValid());} else {dojo.lang.assert(false, "The dojo.uuid.Uuid() constructor must be initializated with a UUID string.");}}
+} else {var ourGenerator = dojo.uuid.Uuid.getGenerator();if (ourGenerator) {this._uuidString = ourGenerator.generate();dojo.lang.assert(this.isValid());}}
+};dojo.uuid.Uuid.NIL_UUID = "00000000-0000-0000-0000-000000000000";dojo.uuid.Uuid.Version = {UNKNOWN: 0,TIME_BASED: 1,DCE_SECURITY: 2,NAME_BASED_MD5: 3,RANDOM: 4,NAME_BASED_SHA1: 5 };dojo.uuid.Uuid.Variant = {NCS: "0",DCE: "10",MICROSOFT: "110",UNKNOWN: "111" };dojo.uuid.Uuid.HEX_RADIX = 16;dojo.uuid.Uuid.compare = function( uuidOne,  uuidTwo) {var uuidStringOne = uuidOne.toString();var uuidStringTwo = uuidTwo.toString();if (uuidStringOne > uuidStringTwo) return 1;if (uuidStringOne < uuidStringTwo) return -1;return 0;};dojo.uuid.Uuid.setGenerator = function( generator) {dojo.lang.assert(!generator || (dojo.lang.isObject(generator) && generator.generate));dojo.uuid.Uuid._ourGenerator = generator;};dojo.uuid.Uuid.getGenerator = function() {return dojo.uuid.Uuid._ourGenerator;};dojo.uuid.Uuid.prototype.toString = function(format) {if (format) {switch (format) {case '{}':
+return '{' + this._uuidString + '}';break;case '()':
+return '(' + this._uuidString + ')';break;case '""':
+return '"' + this._uuidString + '"';break;case "''":
+return "'" + this._uuidString + "'";break;case 'urn':
+return 'urn:uuid:' + this._uuidString;break;case '!-':
+return this._uuidString.split('-').join('');break;default:
+dojo.lang.assert(false, "The toString() method of dojo.uuid.Uuid was passed a bogus format.");}} else {return this._uuidString;}};dojo.uuid.Uuid.prototype.compare = function( otherUuid) {return dojo.uuid.Uuid.compare(this, otherUuid);};dojo.uuid.Uuid.prototype.isEqual = function( otherUuid) {return (this.compare(otherUuid) == 0);};dojo.uuid.Uuid.prototype.isValid = function() {try {dojo.lang.assertType(this._uuidString, String);dojo.lang.assert(this._uuidString.length == 36);dojo.lang.assert(this._uuidString == this._uuidString.toLowerCase());var arrayOfParts = this._uuidString.split("-");dojo.lang.assert(arrayOfParts.length == 5);dojo.lang.assert(arrayOfParts[0].length == 8);dojo.lang.assert(arrayOfParts[1].length == 4);dojo.lang.assert(arrayOfParts[2].length == 4);dojo.lang.assert(arrayOfParts[3].length == 4);dojo.lang.assert(arrayOfParts[4].length == 12);for (var i in arrayOfParts) {var part = arrayOfParts[i];var integer = parseInt(part, dojo.uuid.Uuid.HEX_RADIX);dojo.lan
 g.assert(isFinite(integer));}
+return true;} catch (e) {return false;}};dojo.uuid.Uuid.prototype.getVariant = function() {var variantCharacter = this._uuidString.charAt(19);var variantNumber = parseInt(variantCharacter, dojo.uuid.Uuid.HEX_RADIX);dojo.lang.assert((variantNumber >= 0) && (variantNumber <= 16));if (!dojo.uuid.Uuid._ourVariantLookupTable) {var Variant = dojo.uuid.Uuid.Variant;var lookupTable = [];lookupTable[0x0] = Variant.NCS;lookupTable[0x1] = Variant.NCS;lookupTable[0x2] = Variant.NCS;lookupTable[0x3] = Variant.NCS;lookupTable[0x4] = Variant.NCS;lookupTable[0x5] = Variant.NCS;lookupTable[0x6] = Variant.NCS;lookupTable[0x7] = Variant.NCS;lookupTable[0x8] = Variant.DCE;lookupTable[0x9] = Variant.DCE;lookupTable[0xA] = Variant.DCE;lookupTable[0xB] = Variant.DCE;lookupTable[0xC] = Variant.MICROSOFT;lookupTable[0xD] = Variant.MICROSOFT;lookupTable[0xE] = Variant.UNKNOWN;lookupTable[0xF] = Variant.UNKNOWN;dojo.uuid.Uuid._ourVariantLookupTable = lookupTable;}
+return dojo.uuid.Uuid._ourVariantLookupTable[variantNumber];};dojo.uuid.Uuid.prototype.getVersion = function() {if (!this._versionNumber) {var errorMessage = "Called getVersion() on a dojo.uuid.Uuid that was not a DCE Variant UUID.";dojo.lang.assert(this.getVariant() == dojo.uuid.Uuid.Variant.DCE, errorMessage);var versionCharacter = this._uuidString.charAt(14);this._versionNumber = parseInt(versionCharacter, dojo.uuid.Uuid.HEX_RADIX);}
+return this._versionNumber;};dojo.uuid.Uuid.prototype.getNode = function() {if (!this._nodeString) {var errorMessage = "Called getNode() on a dojo.uuid.Uuid that was not a TIME_BASED UUID.";dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage);var arrayOfStrings = this._uuidString.split('-');this._nodeString = arrayOfStrings[4];}
+return this._nodeString;};dojo.uuid.Uuid.prototype.getTimestamp = function( returnType) {var errorMessage = "Called getTimestamp() on a dojo.uuid.Uuid that was not a TIME_BASED UUID.";dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage);if (!returnType) {returnType = null};switch (returnType) {case "string":
+case String:
+return this.getTimestamp(Date).toUTCString();break;case "hex":
+if (!this._timestampAsHexString) {var arrayOfStrings = this._uuidString.split('-');var hexTimeLow = arrayOfStrings[0];var hexTimeMid = arrayOfStrings[1];var hexTimeHigh = arrayOfStrings[2];hexTimeHigh = hexTimeHigh.slice(1);this._timestampAsHexString = hexTimeHigh + hexTimeMid + hexTimeLow;dojo.lang.assert(this._timestampAsHexString.length == 15);}
+return this._timestampAsHexString;break;case null:
+case "date":
+case Date:
+if (!this._timestampAsDate) {var GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;var arrayOfParts = this._uuidString.split('-');var timeLow = parseInt(arrayOfParts[0], dojo.uuid.Uuid.HEX_RADIX);var timeMid = parseInt(arrayOfParts[1], dojo.uuid.Uuid.HEX_RADIX);var timeHigh = parseInt(arrayOfParts[2], dojo.uuid.Uuid.HEX_RADIX);var hundredNanosecondIntervalsSince1582 = timeHigh & 0x0FFF;hundredNanosecondIntervalsSince1582 <<= 16;hundredNanosecondIntervalsSince1582 += timeMid;hundredNanosecondIntervalsSince1582 *= 0x100000000;hundredNanosecondIntervalsSince1582 += timeLow;var millisecondsSince1582 = hundredNanosecondIntervalsSince1582 / 10000;var secondsPerHour = 60 * 60;var hoursBetween1582and1970 = GREGORIAN_CHANGE_OFFSET_IN_HOURS;var secondsBetween1582and1970 = hoursBetween1582and1970 * secondsPerHour;var millisecondsBetween1582and1970 = secondsBetween1582and1970 * 1000;var millisecondsSince1970 = millisecondsSince1582 - millisecondsBetween1582and1970;this._timestampAsDate = new D
 ate(millisecondsSince1970);}
+return this._timestampAsDate;break;default:
+dojo.lang.assert(false, "The getTimestamp() method dojo.uuid.Uuid was passed a bogus returnType: " + returnType);break;}};
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/__package__.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/uuid/__package__.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,5 @@
+
+dojo.kwCompoundRequire({common: [
+"dojo.uuid.Uuid","dojo.uuid.LightweightGenerator","dojo.uuid.RandomGenerator","dojo.uuid.TimeBasedGenerator","dojo.uuid.NameBasedGenerator","dojo.uuid.NilGenerator"
+]
+});dojo.provide("dojo.uuid.*");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.validate");dojo.require("dojo.validate.common");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/__package__.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/__package__.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,4 @@
+
+dojo.require("dojo.validate");dojo.kwCompoundRequire({common:["dojo.validate.check","dojo.validate.datetime","dojo.validate.de","dojo.validate.jp","dojo.validate.us","dojo.validate.web"
+]
+});dojo.provide("dojo.validate.*");
\ No newline at end of file

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/check.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/check.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/check.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/check.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,55 @@
+
+dojo.provide("dojo.validate.check");dojo.require("dojo.validate.common");dojo.require("dojo.lang.common");dojo.validate.check = function(form, profile){var missing = [];var invalid = [];var results = {isSuccessful: function() {return ( !this.hasInvalid() && !this.hasMissing() );},hasMissing: function() {return ( missing.length > 0 );},getMissing: function() {return missing;},isMissing: function(elemname) {for(var i = 0; i < missing.length; i++){if(elemname == missing[i]){ return true; }}
+return false;},hasInvalid: function() {return ( invalid.length > 0 );},getInvalid: function() {return invalid;},isInvalid: function(elemname){for(var i = 0; i < invalid.length; i++){if(elemname == invalid[i]){ return true; }}
+return false;}};if(profile.trim instanceof Array){for(var i = 0; i < profile.trim.length; i++){var elem = form[profile.trim[i]];if(dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+elem.value = elem.value.replace(/(^\s*|\s*$)/g, "");}}
+if(profile.uppercase instanceof Array){for(var i = 0; i < profile.uppercase.length; i++){var elem = form[profile.uppercase[i]];if(dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+elem.value = elem.value.toUpperCase();}}
+if(profile.lowercase instanceof Array){for (var i = 0; i < profile.lowercase.length; i++){var elem = form[profile.lowercase[i]];if(dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+elem.value = elem.value.toLowerCase();}}
+if(profile.ucfirst instanceof Array){for(var i = 0; i < profile.ucfirst.length; i++){var elem = form[profile.ucfirst[i]];if(dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+elem.value = elem.value.replace(/\b\w+\b/g, function(word) { return word.substring(0,1).toUpperCase() + word.substring(1).toLowerCase(); });}}
+if(profile.digit instanceof Array){for(var i = 0; i < profile.digit.length; i++){var elem = form[profile.digit[i]];if(dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+elem.value = elem.value.replace(/\D/g, "");}}
+if(profile.required instanceof Array){for(var i = 0; i < profile.required.length; i++){if(!dojo.lang.isString(profile.required[i])){ continue; }
+var elem = form[profile.required[i]];if(!dj_undef("type", elem)
+&& (elem.type == "text" || elem.type == "textarea" || elem.type == "password" || elem.type == "file")
+&& /^\s*$/.test(elem.value)){missing[missing.length] = elem.name;}
+else if(!dj_undef("type", elem) && (elem.type == "select-one" || elem.type == "select-multiple")
+&& (elem.selectedIndex == -1
+|| /^\s*$/.test(elem.options[elem.selectedIndex].value))){missing[missing.length] = elem.name;}
+else if(elem instanceof Array){var checked = false;for(var j = 0; j < elem.length; j++){if (elem[j].checked) { checked = true; }}
+if(!checked){missing[missing.length] = elem[0].name;}}
+}}
+if(profile.required instanceof Array){for (var i = 0; i < profile.required.length; i++){if(!dojo.lang.isObject(profile.required[i])){ continue; }
+var elem, numRequired;for(var name in profile.required[i]){elem = form[name];numRequired = profile.required[i][name];}
+if(elem instanceof Array){var checked = 0;for(var j = 0; j < elem.length; j++){if(elem[j].checked){ checked++; }}
+if(checked < numRequired){missing[missing.length] = elem[0].name;}}
+else if(!dj_undef("type", elem) && elem.type == "select-multiple" ){var selected = 0;for(var j = 0; j < elem.options.length; j++){if (elem.options[j].selected && !/^\s*$/.test(elem.options[j].value)) { selected++; }}
+if(selected < numRequired){missing[missing.length] = elem.name;}}
+}}
+if(dojo.lang.isObject(profile.dependencies)){for(name in profile.dependencies){var elem = form[name];if(dj_undef("type", elem)){continue;}
+if(elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
+if(/\S+/.test(elem.value)){ continue; }
+if(results.isMissing(elem.name)){ continue; }
+var target = form[profile.dependencies[name]];if(target.type != "text" && target.type != "textarea" && target.type != "password"){ continue; }
+if(/^\s*$/.test(target.value)){ continue; }
+missing[missing.length] = elem.name;}}
+if(dojo.lang.isObject(profile.constraints)){for(name in profile.constraints){var elem = form[name];if(!elem) {continue;}
+if(!dj_undef("tagName",elem)
+&& (elem.tagName.toLowerCase().indexOf("input") >= 0
+|| elem.tagName.toLowerCase().indexOf("textarea") >= 0)
+&& /^\s*$/.test(elem.value)){continue;}
+var isValid = true;if(dojo.lang.isFunction(profile.constraints[name])){isValid = profile.constraints[name](elem.value);}else if(dojo.lang.isArray(profile.constraints[name])){if(dojo.lang.isArray(profile.constraints[name][0])){for (var i=0; i<profile.constraints[name].length; i++){isValid = dojo.validate.evaluateConstraint(profile, profile.constraints[name][i], name, elem);if(!isValid){ break; }}
+}else{isValid = dojo.validate.evaluateConstraint(profile, profile.constraints[name], name, elem);}}
+if(!isValid){invalid[invalid.length] = elem.name;}}
+}
+if(dojo.lang.isObject(profile.confirm)){for(name in profile.confirm){var elem = form[name];var target = form[profile.confirm[name]];if (dj_undef("type", elem) || dj_undef("type", target) || (elem.type != "text" && elem.type != "textarea" && elem.type != "password")
+||(target.type != elem.type)
+||(target.value == elem.value)
+||(results.isInvalid(elem.name))
+||(/^\s*$/.test(target.value)))
+{continue;}
+invalid[invalid.length] = elem.name;}}
+return results;};dojo.validate.evaluateConstraint=function(profile, constraint, fieldName, elem){var isValidSomething = constraint[0];var params = constraint.slice(1);params.unshift(elem.value);if(typeof isValidSomething != "undefined"){return isValidSomething.apply(null, params);}
+return false;}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/common.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/common.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,18 @@
+
+dojo.provide("dojo.validate.common");dojo.require("dojo.regexp");dojo.validate.isText = function(value, flags){flags = (typeof flags == "object") ? flags : {};if(/^\s*$/.test(value)){ return false; }
+if(typeof flags.length == "number" && flags.length != value.length){ return false; }
+if(typeof flags.minlength == "number" && flags.minlength > value.length){ return false; }
+if(typeof flags.maxlength == "number" && flags.maxlength < value.length){ return false; }
+return true;}
+dojo.validate.isInteger = function(value, flags){var re = new RegExp("^" + dojo.regexp.integer(flags) + "$");return re.test(value);}
+dojo.validate.isRealNumber = function(value, flags){var re = new RegExp("^" + dojo.regexp.realNumber(flags) + "$");return re.test(value);}
+dojo.validate.isCurrency = function(value, flags){var re = new RegExp("^" + dojo.regexp.currency(flags) + "$");return re.test(value);}
+dojo.validate.isInRange = function(value, flags){value = value.replace(new RegExp(dojo.lang.has(flags,'separator')?flags.separator:',', 'g'), '');value = value.replace(dojo.lang.has(flags,'symbol')?flags.symbol:'$', '');if(isNaN(value)){return false;}
+flags = (typeof flags == "object") ? flags : {};var max = (typeof flags.max == "number") ? flags.max : Infinity;var min = (typeof flags.min == "number") ? flags.min : -Infinity;var dec = (typeof flags.decimal == "string") ? flags.decimal : ".";var pattern = "[^" + dec + "\\deE+-]";value = value.replace(RegExp(pattern, "g"), "");value = value.replace(/^([+-]?)(\D*)/, "$1");value = value.replace(/(\D*)$/, "");pattern = "(\\d)[" + dec + "](\\d)";value = value.replace(RegExp(pattern, "g"), "$1.$2");value = Number(value);if ( value < min || value > max ) { return false; }
+return true;}
+dojo.validate.isNumberFormat = function(value, flags){var re = new RegExp("^" + dojo.regexp.numberFormat(flags) + "$", "i");return re.test(value);}
+dojo.validate.isValidLuhn = function(value){var sum, parity, curDigit;if(typeof value!='string'){value = String(value);}
+value = value.replace(/[- ]/g,'');parity = value.length%2;sum=0;for(var i=0;i<value.length;i++){curDigit = parseInt(value.charAt(i));if(i%2==parity){curDigit*=2;}
+if(curDigit>9){curDigit-=9;}
+sum+=curDigit;}
+return !(sum%10);}

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/creditCard.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/creditCard.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/creditCard.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/validate/creditCard.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,17 @@
+
+dojo.provide('dojo.validate.creditCard');dojo.require("dojo.lang.common");dojo.require("dojo.validate.common");dojo.validate.isValidCreditCard = function(value, ccType){if(value&&ccType&&((ccType.toLowerCase()=='er'||dojo.validate.isValidLuhn(value))&&(dojo.validate.isValidCreditCardNumber(value,ccType.toLowerCase())))){return true;}
+return false;}
+dojo.validate.isValidCreditCardNumber = function(value,ccType) {if(typeof value!='string'){value = String(value);}
+value = value.replace(/[- ]/g,'');var results=[];var cardinfo = {'mc':'5[1-5][0-9]{14}','ec':'5[1-5][0-9]{14}','vi':'4([0-9]{12}|[0-9]{15})','ax':'3[47][0-9]{13}', 'dc':'3(0[0-5][0-9]{11}|[68][0-9]{12})','bl':'3(0[0-5][0-9]{11}|[68][0-9]{12})','di':'6011[0-9]{12}','jcb':'(3[0-9]{15}|(2131|1800)[0-9]{11})','er':'2(014|149)[0-9]{11}'
+};if(ccType&&dojo.lang.has(cardinfo,ccType.toLowerCase())){return Boolean(value.match(cardinfo[ccType.toLowerCase()]));}else{for(var p in cardinfo){if(value.match('^'+cardinfo[p]+'$')!=null){results.push(p);}}
+return (results.length)?results.join('|'):false;}}
+dojo.validate.isValidCvv = function(value, ccType) {if(typeof value!='string'){value=String(value);}
+var format;switch (ccType.toLowerCase()){case 'mc':
+case 'ec':
+case 'vi':
+case 'di':
+format = '###';break;case 'ax':
+format = '####';break;default:
+return false;}
+var flags = {format:format};if ((value.length == format.length)&&(dojo.validate.isNumberFormat(value, flags))){return true;}
+return false;}
\ No newline at end of file

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



Mime
View raw message