You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/06/10 15:59:38 UTC

svn commit: r413300 [16/16] - in /tapestry/tapestry4/trunk/framework/src/js: dojo/ dojo/src/ dojo/src/animation/ dojo/src/collections/ dojo/src/compat/ dojo/src/crypto/ dojo/src/data/ dojo/src/data/format/ dojo/src/data/provider/ dojo/src/debug/ dojo/s...

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/domUtil.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/domUtil.js?rev=413300&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/domUtil.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/domUtil.js Sat Jun 10 06:59:28 2006
@@ -0,0 +1,84 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.xml.domUtil");
+dojo.require("dojo.graphics.color");
+dojo.require("dojo.dom");
+dojo.require("dojo.style");
+
+dojo.deprecated("dojo.xml.domUtil", "use dojo.dom instead", "0.4");
+
+// for loading script:
+dojo.xml.domUtil = new function(){
+	this.nodeTypes = {
+		ELEMENT_NODE                  : 1,
+		ATTRIBUTE_NODE                : 2,
+		TEXT_NODE                     : 3,
+		CDATA_SECTION_NODE            : 4,
+		ENTITY_REFERENCE_NODE         : 5,
+		ENTITY_NODE                   : 6,
+		PROCESSING_INSTRUCTION_NODE   : 7,
+		COMMENT_NODE                  : 8,
+		DOCUMENT_NODE                 : 9,
+		DOCUMENT_TYPE_NODE            : 10,
+		DOCUMENT_FRAGMENT_NODE        : 11,
+		NOTATION_NODE                 : 12
+	}
+	
+	this.dojoml = "http://www.dojotoolkit.org/2004/dojoml";
+	this.idIncrement = 0;
+	
+	this.getTagName = function(){return dojo.dom.getTagName.apply(dojo.dom, arguments);}
+	this.getUniqueId = function(){return dojo.dom.getUniqueId.apply(dojo.dom, arguments);}
+	this.getFirstChildTag = function() {return dojo.dom.getFirstChildElement.apply(dojo.dom, arguments);}
+	this.getLastChildTag = function() {return dojo.dom.getLastChildElement.apply(dojo.dom, arguments);}
+	this.getNextSiblingTag = function() {return dojo.dom.getNextSiblingElement.apply(dojo.dom, arguments);}
+	this.getPreviousSiblingTag = function() {return dojo.dom.getPreviousSiblingElement.apply(dojo.dom, arguments);}
+
+	this.forEachChildTag = function(node, unaryFunc) {
+		var child = this.getFirstChildTag(node);
+		while(child) {
+			if(unaryFunc(child) == "break") { break; }
+			child = this.getNextSiblingTag(child);
+		}
+	}
+
+	this.moveChildren = function() {return dojo.dom.moveChildren.apply(dojo.dom, arguments);}
+	this.copyChildren = function() {return dojo.dom.copyChildren.apply(dojo.dom, arguments);}
+	this.clearChildren = function() {return dojo.dom.removeChildren.apply(dojo.dom, arguments);}
+	this.replaceChildren = function() {return dojo.dom.replaceChildren.apply(dojo.dom, arguments);}
+
+	this.getStyle = function() {return dojo.style.getStyle.apply(dojo.style, arguments);}
+	this.toCamelCase = function() {return dojo.style.toCamelCase.apply(dojo.style, arguments);}
+	this.toSelectorCase = function() {return dojo.style.toSelectorCase.apply(dojo.style, arguments);}
+
+	this.getAncestors = function(){return dojo.dom.getAncestors.apply(dojo.dom, arguments);}
+	this.isChildOf = function() {return dojo.dom.isDescendantOf.apply(dojo.dom, arguments);}
+	this.createDocumentFromText = function() {return dojo.dom.createDocumentFromText.apply(dojo.dom, arguments);}
+
+	if(dojo.render.html.capable || dojo.render.svg.capable) {
+		this.createNodesFromText = function(txt, wrap){return dojo.dom.createNodesFromText.apply(dojo.dom, arguments);}
+	}
+
+	this.extractRGB = function(color) { return dojo.graphics.color.extractRGB(color); }
+	this.hex2rgb = function(hex) { return dojo.graphics.color.hex2rgb(hex); }
+	this.rgb2hex = function(r, g, b) { return dojo.graphics.color.rgb2hex(r, g, b); }
+
+	this.insertBefore = function() {return dojo.dom.insertBefore.apply(dojo.dom, arguments);}
+	this.before = this.insertBefore;
+	this.insertAfter = function() {return dojo.dom.insertAfter.apply(dojo.dom, arguments);}
+	this.after = this.insertAfter
+	this.insert = function(){return dojo.dom.insertAtPosition.apply(dojo.dom, arguments);}
+	this.insertAtIndex = function(){return dojo.dom.insertAtIndex.apply(dojo.dom, arguments);}
+	this.textContent = function () {return dojo.dom.textContent.apply(dojo.dom, arguments);}
+	this.renderedTextContent = function () {return dojo.dom.renderedTextContent.apply(dojo.dom, arguments);}
+	this.remove = function (node) {return dojo.dom.removeNode.apply(dojo.dom, arguments);}
+}
+

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

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/htmlUtil.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/htmlUtil.js?rev=413300&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/htmlUtil.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/htmlUtil.js Sat Jun 10 06:59:28 2006
@@ -0,0 +1,121 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.xml.htmlUtil");
+dojo.require("dojo.html");
+dojo.require("dojo.style");
+dojo.require("dojo.dom");
+
+dojo.deprecated("dojo.xml.htmlUtil", "use dojo.html instead", "0.4");
+
+dojo.xml.htmlUtil = new function(){
+	this.styleSheet = dojo.style.styleSheet;
+	
+	this._clobberSelection = function(){return dojo.html.clearSelection.apply(dojo.html, arguments);}
+	this.disableSelect = function(){return dojo.html.disableSelection.apply(dojo.html, arguments);}
+	this.enableSelect = function(){return dojo.html.enableSelection.apply(dojo.html, arguments);}
+	
+	this.getInnerWidth = function(){return dojo.style.getInnerWidth.apply(dojo.style, arguments);}
+	
+	this.getOuterWidth = function(node){
+		dojo.unimplemented("dojo.xml.htmlUtil.getOuterWidth");
+	}
+
+	this.getInnerHeight = function(){return dojo.style.getInnerHeight.apply(dojo.style, arguments);}
+
+	this.getOuterHeight = function(node){
+		dojo.unimplemented("dojo.xml.htmlUtil.getOuterHeight");
+	}
+
+	this.getTotalOffset = function(){return dojo.style.getTotalOffset.apply(dojo.style, arguments);}
+	this.totalOffsetLeft = function(){return dojo.style.totalOffsetLeft.apply(dojo.style, arguments);}
+
+	this.getAbsoluteX = this.totalOffsetLeft;
+
+	this.totalOffsetTop = function(){return dojo.style.totalOffsetTop.apply(dojo.style, arguments);}
+	
+	this.getAbsoluteY = this.totalOffsetTop;
+
+	this.getEventTarget = function(){return dojo.html.getEventTarget.apply(dojo.html, arguments);}
+	this.getScrollTop = function() {return dojo.html.getScrollTop.apply(dojo.html, arguments);}
+	this.getScrollLeft = function() {return dojo.html.getScrollLeft.apply(dojo.html, arguments);}
+
+	this.evtTgt = this.getEventTarget;
+
+	this.getParentOfType = function(){return dojo.html.getParentOfType.apply(dojo.html, arguments);}
+	this.getAttribute = function(){return dojo.html.getAttribute.apply(dojo.html, arguments);}
+	this.getAttr = function (node, attr) { // for backwards compat (may disappear!!!)
+		dojo.deprecated("dojo.xml.htmlUtil.getAttr", "use dojo.xml.htmlUtil.getAttribute instead", "0.4");
+		return dojo.xml.htmlUtil.getAttribute(node, attr);
+	}
+	this.hasAttribute = function(){return dojo.html.hasAttribute.apply(dojo.html, arguments);}
+
+	this.hasAttr = function (node, attr) { // for backwards compat (may disappear!!!)
+		dojo.deprecated("dojo.xml.htmlUtil.hasAttr", "use dojo.xml.htmlUtil.hasAttribute instead", "0.4");
+		return dojo.xml.htmlUtil.hasAttribute(node, attr);
+	}
+	
+	this.getClass = function(){return dojo.html.getClass.apply(dojo.html, arguments)}
+	this.hasClass = function(){return dojo.html.hasClass.apply(dojo.html, arguments)}
+	this.prependClass = function(){return dojo.html.prependClass.apply(dojo.html, arguments)}
+	this.addClass = function(){return dojo.html.addClass.apply(dojo.html, arguments)}
+	this.setClass = function(){return dojo.html.setClass.apply(dojo.html, arguments)}
+	this.removeClass = function(){return dojo.html.removeClass.apply(dojo.html, arguments)}
+
+	// Enum type for getElementsByClass classMatchType arg:
+	this.classMatchType = {
+		ContainsAll : 0, // all of the classes are part of the node's class (default)
+		ContainsAny : 1, // any of the classes are part of the node's class
+		IsOnly : 2 // only all of the classes are part of the node's class
+	}
+
+	this.getElementsByClass = function() {return dojo.html.getElementsByClass.apply(dojo.html, arguments)}
+	this.getElementsByClassName = this.getElementsByClass;
+	
+	this.setOpacity = function() {return dojo.style.setOpacity.apply(dojo.style, arguments)}
+	this.getOpacity = function() {return dojo.style.getOpacity.apply(dojo.style, arguments)}
+	this.clearOpacity = function() {return dojo.style.clearOpacity.apply(dojo.style, arguments)}
+	
+	this.gravity = function(){return dojo.html.gravity.apply(dojo.html, arguments)}
+	
+	this.gravity.NORTH = 1;
+	this.gravity.SOUTH = 1 << 1;
+	this.gravity.EAST = 1 << 2;
+	this.gravity.WEST = 1 << 3;
+	
+	this.overElement = function(){return dojo.html.overElement.apply(dojo.html, arguments)}
+
+	this.insertCssRule = function(){return dojo.style.insertCssRule.apply(dojo.style, arguments)}
+	
+	this.insertCSSRule = function(selector, declaration, index){
+		dojo.deprecated("dojo.xml.htmlUtil.insertCSSRule", "use dojo.style.insertCssRule instead", "0.4");
+		return dojo.xml.htmlUtil.insertCssRule(selector, declaration, index);
+	}
+	
+	this.removeCssRule = function(){return dojo.style.removeCssRule.apply(dojo.style, arguments)}
+
+	this.removeCSSRule = function(index){
+		dojo.deprecated("dojo.xml.htmlUtil.removeCSSRule", "use dojo.xml.htmlUtil.removeCssRule instead", "0.4");
+		return dojo.xml.htmlUtil.removeCssRule(index);
+	}
+
+	this.insertCssFile = function(){return dojo.style.insertCssFile.apply(dojo.style, arguments)}
+
+	this.insertCSSFile = function(URI, doc, checkDuplicates){
+		dojo.deprecated("dojo.xml.htmlUtil.insertCSSFile", "use dojo.xml.htmlUtil.insertCssFile instead", "0.4");
+		return dojo.xml.htmlUtil.insertCssFile(URI, doc, checkDuplicates);
+	}
+
+	this.getBackgroundColor = function() {return dojo.style.getBackgroundColor.apply(dojo.style, arguments)}
+
+	this.getUniqueId = function() { return dojo.dom.getUniqueId(); }
+
+	this.getStyle = function() {return dojo.style.getStyle.apply(dojo.style, arguments)}
+}

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

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/svgUtil.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/svgUtil.js?rev=413300&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/svgUtil.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/xml/svgUtil.js Sat Jun 10 06:59:28 2006
@@ -0,0 +1,32 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.xml.svgUtil");
+// FIXME: add imports for deps!
+
+dojo.xml.svgUtil = new function(){
+
+	this.getInnerWidth = function(node){
+		// FIXME: need to find out from dylan how to 
+	}
+
+	this.getOuterWidth = function(node){
+		
+	}
+
+	this.getInnerHeight = function(node){
+		
+	}
+
+	this.getOuterHeight = function(node){
+		
+	}
+
+}

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

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

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

Modified: tapestry/tapestry4/trunk/framework/src/js/tests/widget/test_widgetManager.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/tests/widget/test_widgetManager.js?rev=413300&r1=413299&r2=413300&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/tests/widget/test_widgetManager.js (original)
+++ tapestry/tapestry4/trunk/framework/src/js/tests/widget/test_widgetManager.js Sat Jun 10 06:59:28 2006
@@ -12,8 +12,3 @@
 	} catch (e) { jum.assertTrue("test2", e instanceof Error); return; }
 	throw new JUMAssertFailure("Previous test should have failed.");
 }
-
-function test_create_widget(){
-	var dp = new dojo.widget.Checkbox();
-	jum.assertFalse("test1", !dp);
-}