You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by bb...@apache.org on 2007/09/13 04:22:56 UTC

svn commit: r575162 - in /incubator/xap/site/javascript/xmodify: xmodify-jquery-compressed.js xmodify-jquery.js xmodify-mootools-compressed.js xmodify-mootools.js xmodify-prototype-compressed.js xmodify-prototype.js

Author: bbuffone
Date: Wed Sep 12 21:22:56 2007
New Revision: 575162

URL: http://svn.apache.org/viewvc?rev=575162&view=rev
Log:
added HTML blending.

Modified:
    incubator/xap/site/javascript/xmodify/xmodify-jquery-compressed.js
    incubator/xap/site/javascript/xmodify/xmodify-jquery.js
    incubator/xap/site/javascript/xmodify/xmodify-mootools-compressed.js
    incubator/xap/site/javascript/xmodify/xmodify-mootools.js
    incubator/xap/site/javascript/xmodify/xmodify-prototype-compressed.js
    incubator/xap/site/javascript/xmodify/xmodify-prototype.js

Modified: incubator/xap/site/javascript/xmodify/xmodify-jquery-compressed.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-jquery-compressed.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-jquery-compressed.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-jquery-compressed.js Wed Sep 12 21:22:56 2007
@@ -1 +1 @@
-$.extend({xmodifyVersion:"0.3.0",xmodify:function(_1){var _2=_1.complete;_1.complete=function(_3,_4){if(_3.responseXML==null){_1.error.call(this,_3,_4);}else{jQuery.xProc(_3.responseXML);if(_2){_2.call(this,_3,_4);}}};return jQuery.ajax(_1);},xProc:function(_5){var _6={};jQuery.each(_5.documentElement.childNodes,function(){if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="modifications"){jQuery.each(this.childNodes,function(){if(this.nodeType==1){jQuery.xProcElem(this,_6);}});}});},xProcElem:function(_7,_8){var _9=jQuery.xNodeName(_7.nodeName);var _a=_7.getAttribute("select");if(_9=="append"){jQuery.xProcIn(_7.childNodes,function(_b){jQuery.xSelect(_a).append(_b);},_8);}else{if(_9=="set-attribute"){jQuery.each(_7.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_a).attr(this.getAttribute("name"),this.getAttribute("value"));}});}else{if(_9=="set-style"){jQuery.each(_7.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_a).css(this.getAttribute("name"),thi
 s.getAttribute("value"));}});}else{if(_9=="insert-before"){jQuery.xProcIn(_7.childNodes,function(_c){jQuery.xSelect(_a).before(_c);},_8);}else{if(_9=="insert-after"){jQuery.xProcIn(_7.childNodes,function(_d){jQuery.xSelect(_a).after(_d);},_8);}else{if(_9=="replace-children"||_9=="set-innerhtml"){jQuery.xSelect(_a).empty();jQuery.xProcIn(_7.childNodes,function(_e){jQuery.xSelect(_a).append(_e);},_8);}else{if(_9=="remove-element"){jQuery.xSelect(_a).remove();}else{if(_9=="remove-attribute"){jQuery.each(_7.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_a).removeAttr(this.getAttribute("name"));}});}else{if(_9=="replace"){jQuery.xSelect(_a).each(function(){if(this.nextSibling){var _f=this.nextSibling;$(this).remove();jQuery.xProcIn(_7.childNodes,function(_10){$(_f).before(_10);},_8);}else{var _11=this.parentNode;$(this).remove();jQuery.xProcIn(_7.childNodes,function(_12){$(_11).append(_12);},_8);}});}else{if(_9=="insert-at"){var _13=_7.getAttribute("index");jQuery.xSe
 lect(_a).each(function(){var _14=null;var _15=this;if(this.childNodes.length>_13){_14=this.childNodes[_13];}jQuery.xProcIn(_7.childNodes,function(_16){if(_14){$(_14).before(_16);}else{$(_15).append(_16);}},_8);});}else{if(_9=="variable"){var _17=_7.getAttribute("name");var _18=_7.getAttribute("deep");_8[_17]=jQuery.xSelect(_a).clone(_18);}}}}}}}}}}}},xProcIn:function(_19,_1a,_1b){$(_19).each(function(){if((this.nodeType==3||this.nodeType==4)&&jQuery.trim(this.nodeValue)!=""){_1a.call(this,this.nodeValue);}else{if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="value-of"){_1a.call(this,_1b[this.getAttribute("name")]);}else{if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="clone"){var _1c=this.getAttribute("select");var _1d=this.getAttribute("deep");_1a.call(this,jQuery.xSelect(_1c).clone(_1d));}else{if(this.nodeType==1){_1a.call(this,jQuery.xConvertToString(this));}}}}});},xConvertToString:function(_1e){var _1f="<"+_1e.nodeName;if(_1e.attributes){for(var i=0;i<_1e.at
 tributes.length;i++){_1f+=" "+_1e.attributes[i].name+"=\""+_1e.attributes[i].value+"\"";}}_1f+=">";for(var i=0;i<_1e.childNodes.length;i++){if(_1e.childNodes[i].nodeType==1){_1f+=jQuery.xConvertToString(_1e.childNodes[i]);}else{_1f+=_1e.childNodes[i].nodeValue;}}_1f+="</"+_1e.nodeName+">";return _1f;},xNodeName:function(_22){var i=_22.indexOf(":");if(i!=-1){_22=_22.substring(i+1);}return _22;},xSelect:function(_24){var obj=$(_24);return $(jQuery.makeArray(obj));}});
\ No newline at end of file
+$.extend({xmodifyVersion:"0.3.0",xmodify:function(_1){var _2=_1.complete;_1.complete=function(_3,_4){if(_3.responseXML==null){_1.error.call(this,_3,_4);}else{jQuery.xProc(_3.responseXML);if(_2){_2.call(this,_3,_4);}}};return jQuery.ajax(_1);},blend:function(_5,_6,_7){var _8=_5.complete;var _9={};_5.complete=function(_a,_b){if(_a.responseText==null){_5.error.call(this,_a,_b);}else{var _c=document.createElement(_7);_c.setAttribute("select",_6);_c.appendChild(document.createTextNode(_a.responseText));jQuery.xProcElem(_c,_9);if(_8){_8.call(this,_a,_b);}}};return jQuery.ajax(_5);},xProc:function(_d){var _e={};jQuery.each(_d.documentElement.childNodes,function(){if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="modifications"){jQuery.each(this.childNodes,function(){if(this.nodeType==1){jQuery.xProcElem(this,_e);}});}});},xProcElem:function(_f,_10){var _11=jQuery.xNodeName(_f.nodeName);var _12=_f.getAttribute("select");if(_11=="append"){jQuery.xProcIn(_f.childNodes,function(_1
 3){jQuery.xSelect(_12).append(_13);},_10);}else{if(_11=="set-attribute"){jQuery.each(_f.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_12).attr(this.getAttribute("name"),this.getAttribute("value"));}});}else{if(_11=="set-style"){jQuery.each(_f.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_12).css(this.getAttribute("name"),this.getAttribute("value"));}});}else{if(_11=="insert-before"){jQuery.xProcIn(_f.childNodes,function(_14){jQuery.xSelect(_12).before(_14);},_10);}else{if(_11=="insert-after"){jQuery.xProcIn(_f.childNodes,function(_15){jQuery.xSelect(_12).after(_15);},_10);}else{if(_11=="replace-children"||_11=="set-innerhtml"){jQuery.xSelect(_12).empty();jQuery.xProcIn(_f.childNodes,function(_16){jQuery.xSelect(_12).append(_16);},_10);}else{if(_11=="remove-element"){jQuery.xSelect(_12).remove();}else{if(_11=="remove-attribute"){jQuery.each(_f.childNodes,function(){if(this.nodeType==1){jQuery.xSelect(_12).removeAttr(this.getAttribute("name"));}});}el
 se{if(_11=="replace"){jQuery.xSelect(_12).each(function(){if(this.nextSibling){var _17=this.nextSibling;$(this).remove();jQuery.xProcIn(_f.childNodes,function(_18){$(_17).before(_18);},_10);}else{var _19=this.parentNode;$(this).remove();jQuery.xProcIn(_f.childNodes,function(_1a){$(_19).append(_1a);},_10);}});}else{if(_11=="insert-at"){var _1b=_f.getAttribute("index");jQuery.xSelect(_12).each(function(){var _1c=null;var _1d=this;if(this.childNodes.length>_1b){_1c=this.childNodes[_1b];}jQuery.xProcIn(_f.childNodes,function(_1e){if(_1c){$(_1c).before(_1e);}else{$(_1d).append(_1e);}},_10);});}else{if(_11=="variable"){var _1f=_f.getAttribute("name");var _20=_f.getAttribute("deep");_10[_1f]=jQuery.xSelect(_12).clone(_20);}}}}}}}}}}}},xProcIn:function(_21,_22,_23){$(_21).each(function(){if((this.nodeType==3||this.nodeType==4)&&jQuery.trim(this.nodeValue)!=""){_22.call(this,this.nodeValue);}else{if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="value-of"){_22.call(this,_23[this
 .getAttribute("name")]);}else{if(this.nodeType==1&&jQuery.xNodeName(this.nodeName)=="clone"){var _24=this.getAttribute("select");var _25=this.getAttribute("deep");_22.call(this,jQuery.xSelect(_24).clone(_25));}else{if(this.nodeType==1){_22.call(this,jQuery.xConvertToString(this));}}}}});},xConvertToString:function(_26){var _27="<"+_26.nodeName;if(_26.attributes){for(var i=0;i<_26.attributes.length;i++){_27+=" "+_26.attributes[i].name+"=\""+_26.attributes[i].value+"\"";}}_27+=">";for(var i=0;i<_26.childNodes.length;i++){if(_26.childNodes[i].nodeType==1){_27+=jQuery.xConvertToString(_26.childNodes[i]);}else{_27+=_26.childNodes[i].nodeValue;}}_27+="</"+_26.nodeName+">";return _27;},xNodeName:function(_2a){var i=_2a.indexOf(":");if(i!=-1){_2a=_2a.substring(i+1);}return _2a.toLowerCase();},xSelect:function(_2c){var obj=$(_2c);return $(jQuery.makeArray(obj));}});
\ No newline at end of file

Modified: incubator/xap/site/javascript/xmodify/xmodify-jquery.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-jquery.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-jquery.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-jquery.js Wed Sep 12 21:22:56 2007
@@ -42,8 +42,35 @@
         return jQuery.ajax(ajaxProperties);
     },
 	
-	blend: function(ajaxProperties, select, blendMode){
-		
+	/**
+	 * This method provides a shortcut for blending html into the 
+	 * current html application. Check the jQuery documentation 
+	 * specifics on the format and functionality of jQuery's selectors
+	 * 
+	 * Mode can be any of the following append, replace, replace-children
+	 * insert-after, insert-before
+	 * 
+	 * @param {Object} ajaxProperties
+	 * @param {Object} select
+	 * @param {Object} mode
+	 */
+	blend: function(ajaxProperties, select, mode){
+        var complete = ajaxProperties.complete;
+        var variables = {};
+        ajaxProperties.complete = function(result, request){
+            if (result.responseText == null){
+                ajaxProperties.error.call(this, result, request);
+            }else{
+				var node = document.createElement(mode);
+				node.setAttribute("select", select);
+				node.appendChild(document.createTextNode(result.responseText));
+                jQuery.xProcElem(node, variables);
+                if (complete){
+                    complete.call(this, result, request);
+                }
+            }
+        }
+        return jQuery.ajax(ajaxProperties);
 	},
     
     /**
@@ -65,9 +92,7 @@
 				    //process all the modification elements
                     jQuery.each(this.childNodes, function(){
             				if (this.nodeType == 1){
-						        var nodeName = jQuery.xNodeName(modElement.nodeName);
-						        var select = modElement.getAttribute("select");        
-                                jQuery.xProcElem(nodeName, select, variables, this);
+                                jQuery.xProcElem(this, variables);
                             }
                         }
             		);
@@ -110,7 +135,9 @@
      * Need to add the must exist attribute
      * Need to add events.
      */
-    xProcElem: function(nodeName, select, variables, modElement){
+    xProcElem: function(modElement, variables){
+        var nodeName = jQuery.xNodeName(modElement.nodeName);
+        var select = modElement.getAttribute("select");
         if (nodeName == "append"){
             jQuery.xProcIn(modElement.childNodes, function(nodeValue){    
                 jQuery.xSelect(select).append(nodeValue);        
@@ -243,7 +270,7 @@
 		if (i != -1){
 			name = name.substring(i + 1);
 		}
-		return name;
+		return name.toLowerCase();
     },
 	
 	xSelect: function(select){

Modified: incubator/xap/site/javascript/xmodify/xmodify-mootools-compressed.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-mootools-compressed.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-mootools-compressed.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-mootools-compressed.js Wed Sep 12 21:22:56 2007
@@ -1 +1 @@
-XHR.xmodifyVersion="0.3.0";XHR.prototype.xmodify=function(_1,_2){var _3=this.onSuccess;var _4=this;this.onSuccess=function(){if(_4.transport.responseXML==null){_4.onFailure.call(this);}else{_4.xProc(_4.transport.responseXML);if(_3){_3.call(this);}}};return this.send(_1,_2);};XHR.prototype.xProc=function(_5){var _6={};$each(_5.documentElement.childNodes,function(_7){if(_7.nodeType==1&&XHR.xNodeName(_7.nodeName)=="modifications"){$each(_7.childNodes,function(_8){if(_8.nodeType==1){XHR.xProcElem(_8,_6);}});}});};XHR.xProcElem=function(_9,_a){var _b=XHR.xNodeName(_9.nodeName);var _c=_9.getAttribute("select");if(_b=="append"){XHR.xProcIn(_9.childNodes,function(_d){$A(_d).each(function(_e){$$(_c).each(function(_f){XHR.appendTableElement(_f,_e);});});},_a);}else{if(_b=="set-attribute"){$each(_9.childNodes,function(_10){if(_10.nodeType==1){$$(_c).setProperty(_10.getAttribute("name"),_10.getAttribute("value"));}});}else{if(_b=="set-style"){$each(_9.childNodes,function(_11){if(_11.nod
 eType==1){$$(_c).setStyle(_11.getAttribute("name"),_11.getAttribute("value"));}});}else{if(_b=="insert-before"){XHR.xProcIn(_9.childNodes,function(_12){$A(_12).each(function(_13){$$(_c).each(function(_14){_14.parentNode.insertBefore(_13,_14);});});},_a);}else{if(_b=="insert-after"){XHR.xProcIn(_9.childNodes,function(_15){$A(_15).each(function(_16){$$(_c).each(function(_17){if(_17.nextSibling){_17.parentNode.insertBefore(_16,_17.nextSibling);}else{XHR.appendTableElement(_17.parentNode,_16);}});});},_a);}else{if(_b=="replace-children"||_b=="set-innerhtml"){XHR.xProcIn(_9.childNodes,function(_18){$$(_c).each(function(_19){_19.empty();$A(_18).each(function(_1a){XHR.appendTableElement(_19,_1a);});});},_a);}else{if(_b=="remove-element"){$each($$(_c),function(_1b){_1b.remove();});}else{if(_b=="remove-attribute"){$each(_9.childNodes,function(_1c){if(_1c.nodeType==1){$$(_c).removeProperty(_1c.getAttribute("name"));}});}else{if(_b=="replace"){XHR.xProcIn(_9.childNodes,function(_1d){$A
 (_1d).each(function(_1e){$$(_c).each(function(_1f){_1f.replaceWith(_1e);});});});}else{if(_b=="insert-at"){var _20=_9.getAttribute("index");XHR.xProcIn(_9.childNodes,function(_21){$A(_21).each(function(_22){$$(_c).each(function(_23){var _24=null;var _25=_23;if(_23.childNodes.length>_20){_24=_23.childNodes[_20];}if(_24){_23.insertBefore(_22,_24);}else{XHR.appendTableElement(_23,_22);}});});},_a);}else{if(_b=="variable"){var _26=_9.getAttribute("name");var _27=_9.getAttribute("deep");var arr=new Array();$$(_c).each(function(_29){arr.push(_29);});_a[_26]=arr;}}}}}}}}}}}};XHR.xProcIn=function(_2a,_2b,_2c){$each(_2a,function(_2d){if((_2d.nodeType==3||_2d.nodeType==4)&&_2d.nodeValue.trim()!=""){_2b.call(_2d,XHR.convertStringToHTML(_2d.nodeValue));}else{if(_2d.nodeType==1&&XHR.xNodeName(_2d.nodeName)=="value-of"){_2b.call(_2d,_2c[_2d.getAttribute("name")]);}else{if(_2d.nodeType==1&&XHR.xNodeName(_2d.nodeName)=="clone"){var _2e=_2d.getAttribute("select");var _2f=_2d.getAttribute("de
 ep");$$(_2e).each(function(_30){_2b.call(_2d,[_30.cloneNode(_2f)]);});}else{if(this.nodeType==1){_2b.call(this,XHR.convertStringToHTML(XHR.xConvertToString(this)));}}}}});};XHR.xConvertToString=function(_31){var _32="<"+_31.nodeName;if(_31.attributes){for(var i=0;i<_31.attributes.length;i++){_32+=" "+_31.attributes[i].name+"=\""+_31.attributes[i].value+"\"";}}_32+=">";for(var i=0;i<_31.childNodes.length;i++){if(_31.childNodes[i].nodeType==1){_32+=XHR.xConvertToString(_31.childNodes[i]);}else{_32+=_31.childNodes[i].nodeValue;}}_32+="</"+_31.nodeName+">";return _32;};XHR.xNodeName=function(_35){var i=_35.indexOf(":");if(i!=-1){_35=_35.substring(i+1);}return _35;};XHR.appendTableElement=function(_37,_38){if(XHR.xNodeName(_37.nodeName)=="TABLE"&&XHR.xNodeName(_38.nodeName)=="TR"){obj=_37.getElementsByTagName("tbody")[0]||_37.appendChild(document.createElement("tbody"));obj.appendChild(_38);}else{_37.appendChild(_38);}};XHR.convertStringToHTML=function(_39){var s=_39.replace(/^\s
 +|\s+$/g,"");var div=document.createElement("div");var tb=[];var _3d=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=_3d[1]+s+_3d[2];while(_3d[0]--){div=div.firstChild;}if(window.ie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0){tb=div.firstChild&&div.firstChild.childNodes;}else{if(_3d[1]=="<table>"&&s.indexOf("<tbody")<0){tb=div.childNodes;}}for(var n=tb.length-1;n>=0;--n){if(tb[n].nodeName.toUpperCase()=="TBODY"&&!tb[n].childNodes.length){tb[n].parentNode.removeChild(tb[n]);}}}arg=new Array();for(var i=0,l=div.childNodes.length;i<l;i++){arg.push(div.childNodes[i]);}return arg;};
\ No newline at end of file
+XHR.xmodifyVersion="0.3.0";XHR.prototype.xmodify=function(_1,_2){var _3=this.onSuccess;var _4=this;this.onSuccess=function(){if(_4.transport.responseXML==null){_4.onFailure.call(this);}else{_4.xProc(_4.transport.responseXML);if(_3){_3.call(this);}}};return this.send(_1,_2);};XHR.prototype.blend=function(_5,_6,_7,_8){var _9=this.onSuccess;var _a=this;var _b={};this.onSuccess=function(){if(_a.transport.responseText==null){_a.onFailure.call(this);}else{var _c=document.createElement(_7);_c.setAttribute("select",_6);_c.appendChild(document.createTextNode(_a.transport.responseText));XHR.xProcElem(_c,_b);if(_9){_9.call(this);}}};return this.send(_5,_8);};XHR.prototype.xProc=function(_d){var _e={};$each(_d.documentElement.childNodes,function(_f){if(_f.nodeType==1&&XHR.xNodeName(_f.nodeName)=="modifications"){$each(_f.childNodes,function(_10){if(_10.nodeType==1){XHR.xProcElem(_10,_e);}});}});};XHR.xProcElem=function(_11,_12){var _13=XHR.xNodeName(_11.nodeName);var _14=_11.getAttribut
 e("select");if(_13=="append"){XHR.xProcIn(_11.childNodes,function(_15){$A(_15).each(function(_16){$$(_14).each(function(_17){XHR.appendTableElement(_17,_16);});});},_12);}else{if(_13=="set-attribute"){$each(_11.childNodes,function(_18){if(_18.nodeType==1){$$(_14).setProperty(_18.getAttribute("name"),_18.getAttribute("value"));}});}else{if(_13=="set-style"){$each(_11.childNodes,function(_19){if(_19.nodeType==1){$$(_14).setStyle(_19.getAttribute("name"),_19.getAttribute("value"));}});}else{if(_13=="insert-before"){XHR.xProcIn(_11.childNodes,function(_1a){$A(_1a).each(function(_1b){$$(_14).each(function(_1c){_1c.parentNode.insertBefore(_1b,_1c);});});},_12);}else{if(_13=="insert-after"){XHR.xProcIn(_11.childNodes,function(_1d){$A(_1d).each(function(_1e){$$(_14).each(function(_1f){if(_1f.nextSibling){_1f.parentNode.insertBefore(_1e,_1f.nextSibling);}else{XHR.appendTableElement(_1f.parentNode,_1e);}});});},_12);}else{if(_13=="replace-children"||_13=="set-innerhtml"){XHR.xProcIn(_
 11.childNodes,function(_20){$$(_14).each(function(_21){_21.empty();$A(_20).each(function(_22){XHR.appendTableElement(_21,_22);});});},_12);}else{if(_13=="remove-element"){$each($$(_14),function(_23){_23.remove();});}else{if(_13=="remove-attribute"){$each(_11.childNodes,function(_24){if(_24.nodeType==1){$$(_14).removeProperty(_24.getAttribute("name"));}});}else{if(_13=="replace"){XHR.xProcIn(_11.childNodes,function(_25){$A(_25).each(function(_26){$$(_14).each(function(_27){_27.replaceWith(_26);});});});}else{if(_13=="insert-at"){var _28=_11.getAttribute("index");XHR.xProcIn(_11.childNodes,function(_29){$A(_29).each(function(_2a){$$(_14).each(function(_2b){var _2c=null;var _2d=_2b;if(_2b.childNodes.length>_28){_2c=_2b.childNodes[_28];}if(_2c){_2b.insertBefore(_2a,_2c);}else{XHR.appendTableElement(_2b,_2a);}});});},_12);}else{if(_13=="variable"){var _2e=_11.getAttribute("name");var _2f=_11.getAttribute("deep");var arr=new Array();$$(_14).each(function(_31){arr.push(_31);});_12[
 _2e]=arr;}}}}}}}}}}}};XHR.xProcIn=function(_32,_33,_34){$each(_32,function(_35){if((_35.nodeType==3||_35.nodeType==4)&&_35.nodeValue.trim()!=""){_33.call(_35,XHR.convertStringToHTML(_35.nodeValue));}else{if(_35.nodeType==1&&XHR.xNodeName(_35.nodeName)=="value-of"){_33.call(_35,_34[_35.getAttribute("name")]);}else{if(_35.nodeType==1&&XHR.xNodeName(_35.nodeName)=="clone"){var _36=_35.getAttribute("select");var _37=_35.getAttribute("deep");$$(_36).each(function(_38){_33.call(_35,[_38.cloneNode(_37)]);});}else{if(this.nodeType==1){_33.call(this,XHR.convertStringToHTML(XHR.xConvertToString(this)));}}}}});};XHR.xConvertToString=function(_39){var _3a="<"+_39.nodeName;if(_39.attributes){for(var i=0;i<_39.attributes.length;i++){_3a+=" "+_39.attributes[i].name+"=\""+_39.attributes[i].value+"\"";}}_3a+=">";for(var i=0;i<_39.childNodes.length;i++){if(_39.childNodes[i].nodeType==1){_3a+=XHR.xConvertToString(_39.childNodes[i]);}else{_3a+=_39.childNodes[i].nodeValue;}}_3a+="</"+_39.nodeNam
 e+">";return _3a;};XHR.xNodeName=function(_3d){var i=_3d.indexOf(":");if(i!=-1){_3d=_3d.substring(i+1);}return _3d.toLowerCase();};XHR.appendTableElement=function(_3f,_40){if(XHR.xNodeName(_3f.nodeName)=="TABLE"&&XHR.xNodeName(_40.nodeName)=="TR"){obj=_3f.getElementsByTagName("tbody")[0]||_3f.appendChild(document.createElement("tbody"));obj.appendChild(_40);}else{_3f.appendChild(_40);}};XHR.convertStringToHTML=function(_41){var s=_41.replace(/^\s+|\s+$/g,"");var div=document.createElement("div");var tb=[];var _45=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=_45[1]+s+_45[2];while(_45[0]--){div=div.firstChild;}if(window.ie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0){tb=div.firstChild&&div.firstChild.childN
 odes;}else{if(_45[1]=="<table>"&&s.indexOf("<tbody")<0){tb=div.childNodes;}}for(var n=tb.length-1;n>=0;--n){if(tb[n].nodeName.toUpperCase()=="TBODY"&&!tb[n].childNodes.length){tb[n].parentNode.removeChild(tb[n]);}}}arg=new Array();for(var i=0,l=div.childNodes.length;i<l;i++){arg.push(div.childNodes[i]);}return arg;};
\ No newline at end of file

Modified: incubator/xap/site/javascript/xmodify/xmodify-mootools.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-mootools.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-mootools.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-mootools.js Wed Sep 12 21:22:56 2007
@@ -43,6 +43,39 @@
         return this.send(url, queryString);
     }
     
+	/**
+	 * This method provides a shortcut for blending html into the 
+	 * current html application. Check the Mootools documentation 
+	 * specifics on the format and functionality of Mootool's selectors
+	 * 
+	 * Mode can be any of the following append, replace, replace-children
+	 * insert-after, insert-before
+	 * 
+	 * @param {String} url
+	 * @param {Object} select
+	 * @param {Object} mode
+	 * @param {String} queryString
+	 */
+	XHR.prototype.blend = function(url, select, mode, queryString){
+        var onSuccess = this.onSuccess;
+        var thisVar = this;
+        var variables = {};
+        this.onSuccess = function(){
+            if (thisVar.transport.responseText == null){
+                thisVar.onFailure.call(this);
+            }else{
+				var node = document.createElement(mode);
+				node.setAttribute("select", select);
+				node.appendChild(document.createTextNode(thisVar.transport.responseText));
+                XHR.xProcElem(node, variables);
+                if (onSuccess){
+                    onSuccess.call(this);
+                }
+            }
+        }
+        return this.send(url, queryString);
+	}
+
     /**
      * Will return the modification element.
      *
@@ -262,7 +295,7 @@
 		if (i != -1){
 			name = name.substring(i + 1);
 		}
-		return name;
+		return name.toLowerCase();
     }
 	
 	/**

Modified: incubator/xap/site/javascript/xmodify/xmodify-prototype-compressed.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-prototype-compressed.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-prototype-compressed.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-prototype-compressed.js Wed Sep 12 21:22:56 2007
@@ -1 +1 @@
-Prototype.xmodifyVersion="0.3.0";Ajax.xmodify=function(_1,_2){var _3=this.onSuccess;if(_2==null){_2={method:"get"};}else{if(_2.method==null){_2.method="get";}}var _4=this;_2.onSuccess=function(_5){if(_5.responseXML==null){_2.onFailure.call(this);}else{Ajax.xProc(_5.responseXML);if(_3){_3.call(this);}}};return new Ajax.Request(_1,_2);};Ajax.xProc=function(_6){var _7={};$A(_6.documentElement.childNodes).each(function(_8){if(_8.nodeType==1&&Ajax.xNodeName(_8.nodeName)=="modifications"){$A(_8.childNodes).each(function(_9){if(_9.nodeType==1){Ajax.xProcElem(_9,_7);}});}});};Ajax.xProcElem=function(_a,_b){var _c=Ajax.xNodeName(_a.nodeName);var _d=_a.getAttribute("select");if(_c=="append"){Ajax.xProcIn(_a.childNodes,function(_e){$$(_d).each(function(_f){$A(_e).each(function(_10){Ajax.appendTableElement(_f,_10);});});},_b);}else{if(_c=="set-attribute"){$A(_a.childNodes).each(function(_11){if(_11.nodeType==1){$$(_d).each(function(_12){_12.setAttribute(_11.getAttribute("name"),_11.getA
 ttribute("value"));});}var _13;});}else{if(_c=="set-style"){$A(_a.childNodes).each(function(_14){if(_14.nodeType==1){$$(_d).each(function(_15){var _16=new Array();_16[_14.getAttribute("name")]=_14.getAttribute("value");$(_15).setStyle(_16);});}var _17;});}else{if(_c=="insert-before"){Ajax.xProcIn(_a.childNodes,function(_18){$$(_d).each(function(_19){$A(_18).each(function(_1a){_19.parentNode.insertBefore(_1a,_19);});});},_b);}else{if(_c=="insert-after"){Ajax.xProcIn(_a.childNodes,function(_1b){$$(_d).each(function(_1c){$A(_1b).each(function(_1d){if(_1c.nextSibling){_1c.parentNode.insertBefore(_1d,_1c.nextSibling);}else{Ajax.appendTableElement(_1c.parentNode,_1d);}});});},_b);}else{if(_c=="set-innerhtml"||_c=="replace-children"){Ajax.xProcIn(_a.childNodes,function(_1e){$$(_d).each(function(_1f){_1f.innerHTML="";$A(_1e).each(function(_20){Ajax.appendTableElement(_1f,_20);});});},_b);}else{if(_c=="remove-element"){$$(_d).each(function(_21){_21.remove();});}else{if(_c=="remove-at
 tribute"){$A(_a.childNodes).each(function(_22){if(_22.nodeType==1){$$(_d).each(function(_23){_23.removeAttribute(_22.getAttribute("name"));});}});}else{if(_c=="replace"){Ajax.xProcIn(_a.childNodes,function(_24){$$(_d).each(function(_25){$A(_24).each(function(_26){_25.replace(_26,_25);});});});}else{if(_c=="insert-at"){var _27=_a.getAttribute("index");Ajax.xProcIn(_a.childNodes,function(_28){$$(_d).each(function(_29){$A(_28).each(function(_2a){var _2b=null;var _2c=_29;if(_29.childNodes.length>_27){_2b=_29.childNodes[_27];}if(_2b){_29.insertBefore(_2a,_2b);}else{Ajax.appendTableElement(_29,_2a);}});});},_b);}else{if(_c=="variable"){var _2d=_a.getAttribute("name");var _2e=_a.getAttribute("deep");var arr=new Array();$$(_d).each(function(_30){arr.push(_30);});_b[_2d]=arr;}}}}}}}}}}}};Ajax.xProcIn=function(_31,_32,_33){$A(_31).each(function(_34){if((_34.nodeType==3||_34.nodeType==4)&&_34.nodeValue.replace(/^\s+|\s+$/g,"")!=""){_32.call(_34,Ajax.convertStringToHTML(_34.nodeValue));
 }else{if(_34.nodeType==1&&Ajax.xNodeName(_34.nodeName)=="value-of"){_32.call(_34,_33[_34.getAttribute("name")]);}else{if(_34.nodeType==1&&Ajax.xNodeName(_34.nodeName)=="clone"){var _35=_34.getAttribute("select");var _36=_34.getAttribute("deep");$$(_35).each(function(_37){_32.call(_34,[_37.cloneNode(_36)]);});}else{if(this.nodeType==1){_32.call(this,Ajax.convertStringToHTML(Ajax.xConvertToString(this)));}}}}});};Ajax.xConvertToString=function(_38){var _39="<"+_38.nodeName;if(_38.attributes){for(var i=0;i<_38.attributes.length;i++){_39+=" "+_38.attributes[i].name+"=\""+_38.attributes[i].value+"\"";}}_39+=">";for(var i=0;i<_38.childNodes.length;i++){if(_38.childNodes[i].nodeType==1){_39+=Ajax.xConvertToString(_38.childNodes[i]);}else{_39+=_38.childNodes[i].nodeValue;}}_39+="</"+_38.nodeName+">";return _39;};Ajax.xNodeName=function(_3c){var i=_3c.indexOf(":");if(i!=-1){_3c=_3c.substring(i+1);}return _3c;};Ajax.appendTableElement=function(_3e,_3f){if(Ajax.xNodeName(_3e.nodeName)=
 ="TABLE"&&Ajax.xNodeName(_3f.nodeName)=="TR"){obj=_3e.getElementsByTagName("tbody")[0]||_3e.appendChild(document.createElement("tbody"));obj.appendChild(_3f);}else{_3e.appendChild(_3f);}};Ajax.convertStringToHTML=function(_40){var s=_40.replace(/^\s+|\s+$/g,"");var div=document.createElement("div");var tb=[];var _44=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=_44[1]+s+_44[2];while(_44[0]--){div=div.firstChild;}if(window.ie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0){tb=div.firstChild&&div.firstChild.childNodes;}else{if(_44[1]=="<table>"&&s.indexOf("<tbody")<0){tb=div.childNodes;}}for(var n=tb.length-1;n>=0;--n){if(tb[n].nodeName.toUpperCase()=="TBODY"&&!tb[n].childNodes.length){tb[n].parentNode.removeCh
 ild(tb[n]);}}}arg=new Array();for(var i=0,l=div.childNodes.length;i<l;i++){arg.push(div.childNodes[i]);}return arg;};
\ No newline at end of file
+Prototype.xmodifyVersion="0.3.0";Ajax.xmodify=function(_1,_2){var _3=this.onSuccess;if(_2==null){_2={method:"get"};}else{if(_2.method==null){_2.method="get";}}var _4=this;_2.onSuccess=function(_5){if(_5.responseXML==null){_2.onFailure.call(this);}else{Ajax.xProc(_5.responseXML);if(_3){_3.call(this);}}};return new Ajax.Request(_1,_2);};Ajax.blend=function(_6,_7,_8,_9){var _a=this.onSuccess;var _b={};if(_9==null){_9={method:"get"};}else{if(_9.method==null){_9.method="get";}}var _c=this;_9.onSuccess=function(_d){if(_d.responseText==null){_9.onFailure.call(this);}else{var _e=document.createElement(_8);_e.setAttribute("select",_7);_e.appendChild(document.createTextNode(_d.responseText));Ajax.xProcElem(_e,_b);if(_a){_a.call(this);}}};return new Ajax.Request(_6,_9);};Ajax.xProc=function(_f){var _10={};$A(_f.documentElement.childNodes).each(function(_11){if(_11.nodeType==1&&Ajax.xNodeName(_11.nodeName)=="modifications"){$A(_11.childNodes).each(function(_12){if(_12.nodeType==1){Ajax.
 xProcElem(_12,_10);}});}});};Ajax.xProcElem=function(_13,_14){var _15=Ajax.xNodeName(_13.nodeName);var _16=_13.getAttribute("select");if(_15=="append"){Ajax.xProcIn(_13.childNodes,function(_17){$$(_16).each(function(_18){$A(_17).each(function(_19){Ajax.appendTableElement(_18,_19);});});},_14);}else{if(_15=="set-attribute"){$A(_13.childNodes).each(function(_1a){if(_1a.nodeType==1){$$(_16).each(function(_1b){_1b.setAttribute(_1a.getAttribute("name"),_1a.getAttribute("value"));});}var _1c;});}else{if(_15=="set-style"){$A(_13.childNodes).each(function(_1d){if(_1d.nodeType==1){$$(_16).each(function(_1e){var _1f=new Array();_1f[_1d.getAttribute("name")]=_1d.getAttribute("value");$(_1e).setStyle(_1f);});}var _20;});}else{if(_15=="insert-before"){Ajax.xProcIn(_13.childNodes,function(_21){$$(_16).each(function(_22){$A(_21).each(function(_23){_22.parentNode.insertBefore(_23,_22);});});},_14);}else{if(_15=="insert-after"){Ajax.xProcIn(_13.childNodes,function(_24){$$(_16).each(function(
 _25){$A(_24).each(function(_26){if(_25.nextSibling){_25.parentNode.insertBefore(_26,_25.nextSibling);}else{Ajax.appendTableElement(_25.parentNode,_26);}});});},_14);}else{if(_15=="set-innerhtml"||_15=="replace-children"){Ajax.xProcIn(_13.childNodes,function(_27){$$(_16).each(function(_28){_28.innerHTML="";$A(_27).each(function(_29){Ajax.appendTableElement(_28,_29);});});},_14);}else{if(_15=="remove-element"){$$(_16).each(function(_2a){_2a.remove();});}else{if(_15=="remove-attribute"){$A(_13.childNodes).each(function(_2b){if(_2b.nodeType==1){$$(_16).each(function(_2c){_2c.removeAttribute(_2b.getAttribute("name"));});}});}else{if(_15=="replace"){Ajax.xProcIn(_13.childNodes,function(_2d){$$(_16).each(function(_2e){$A(_2d).each(function(_2f){_2e.replace(_2f,_2e);});});});}else{if(_15=="insert-at"){var _30=_13.getAttribute("index");Ajax.xProcIn(_13.childNodes,function(_31){$$(_16).each(function(_32){$A(_31).each(function(_33){var _34=null;var _35=_32;if(_32.childNodes.length>_30)
 {_34=_32.childNodes[_30];}if(_34){_32.insertBefore(_33,_34);}else{Ajax.appendTableElement(_32,_33);}});});},_14);}else{if(_15=="variable"){var _36=_13.getAttribute("name");var _37=_13.getAttribute("deep");var arr=new Array();$$(_16).each(function(_39){arr.push(_39);});_14[_36]=arr;}}}}}}}}}}}};Ajax.xProcIn=function(_3a,_3b,_3c){$A(_3a).each(function(_3d){if((_3d.nodeType==3||_3d.nodeType==4)&&_3d.nodeValue.replace(/^\s+|\s+$/g,"")!=""){_3b.call(_3d,Ajax.convertStringToHTML(_3d.nodeValue));}else{if(_3d.nodeType==1&&Ajax.xNodeName(_3d.nodeName)=="value-of"){_3b.call(_3d,_3c[_3d.getAttribute("name")]);}else{if(_3d.nodeType==1&&Ajax.xNodeName(_3d.nodeName)=="clone"){var _3e=_3d.getAttribute("select");var _3f=_3d.getAttribute("deep");$$(_3e).each(function(_40){_3b.call(_3d,[_40.cloneNode(_3f)]);});}else{if(this.nodeType==1){_3b.call(this,Ajax.convertStringToHTML(Ajax.xConvertToString(this)));}}}}});};Ajax.xConvertToString=function(_41){var _42="<"+_41.nodeName;if(_41.attributes){
 for(var i=0;i<_41.attributes.length;i++){_42+=" "+_41.attributes[i].name+"=\""+_41.attributes[i].value+"\"";}}_42+=">";for(var i=0;i<_41.childNodes.length;i++){if(_41.childNodes[i].nodeType==1){_42+=Ajax.xConvertToString(_41.childNodes[i]);}else{_42+=_41.childNodes[i].nodeValue;}}_42+="</"+_41.nodeName+">";return _42;};Ajax.xNodeName=function(_45){var i=_45.indexOf(":");if(i!=-1){_45=_45.substring(i+1);}return _45.toLowerCase();};Ajax.appendTableElement=function(_47,_48){if(Ajax.xNodeName(_47.nodeName)=="TABLE"&&Ajax.xNodeName(_48.nodeName)=="TR"){obj=_47.getElementsByTagName("tbody")[0]||_47.appendChild(document.createElement("tbody"));obj.appendChild(_48);}else{_47.appendChild(_48);}};Ajax.convertStringToHTML=function(_49){var s=_49.replace(/^\s+|\s+$/g,"");var div=document.createElement("div");var tb=[];var _4d=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2
 ,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=_4d[1]+s+_4d[2];while(_4d[0]--){div=div.firstChild;}if(window.ie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0){tb=div.firstChild&&div.firstChild.childNodes;}else{if(_4d[1]=="<table>"&&s.indexOf("<tbody")<0){tb=div.childNodes;}}for(var n=tb.length-1;n>=0;--n){if(tb[n].nodeName.toUpperCase()=="TBODY"&&!tb[n].childNodes.length){tb[n].parentNode.removeChild(tb[n]);}}}arg=new Array();for(var i=0,l=div.childNodes.length;i<l;i++){arg.push(div.childNodes[i]);}return arg;};
\ No newline at end of file

Modified: incubator/xap/site/javascript/xmodify/xmodify-prototype.js
URL: http://svn.apache.org/viewvc/incubator/xap/site/javascript/xmodify/xmodify-prototype.js?rev=575162&r1=575161&r2=575162&view=diff
==============================================================================
--- incubator/xap/site/javascript/xmodify/xmodify-prototype.js (original)
+++ incubator/xap/site/javascript/xmodify/xmodify-prototype.js Wed Sep 12 21:22:56 2007
@@ -48,7 +48,44 @@
         return new Ajax.Request(url, options);
     }
 	
-    
+	/**
+	 * This method provides a shortcut for blending html into the 
+	 * current html application. Check the Prototype documentation 
+	 * specifics on the format and functionality of Prototype's selectors
+	 * 
+	 * Mode can be any of the following append, replace, replace-children
+	 * insert-after, insert-before
+	 * 
+	 * @param {String} url
+	 * @param {Object} select
+	 * @param {Object} mode
+	 * @param {String} options
+	 */
+    Ajax.blend = function(url, select, mode, options){
+        var onSuccess = this.onSuccess;
+		var variables = {};
+		if (options == null){
+			options = {method:"get"};
+		}else if (options.method == null){
+			options.method = "get";
+		}
+        var thisVar = this;
+        options.onSuccess = function(transport){
+            if (transport.responseText == null){
+               options.onFailure.call(this);
+            }else{
+				var node = document.createElement(mode);
+				node.setAttribute("select", select);
+				node.appendChild(document.createTextNode(transport.responseText));
+                Ajax.xProcElem(node, variables);
+                if (onSuccess){
+                    onSuccess.call(this);
+                }
+            }
+        }
+        return new Ajax.Request(url, options);
+    }
+   
     /**
      * Will return the modification element.
      *
@@ -274,7 +311,7 @@
 		if (i != -1){
 			name = name.substring(i + 1);
 		}
-		return name;
+		return name.toLowerCase();
     }
 	
 	/**