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:38 UTC

svn commit: r575161 - in /incubator/xap/site/docs/xmodify/content: jquery-index.html mootools-index.html prototype-index.html statements/jquery/blend.htm statements/jquery/fillTable.xml statements/mootools/blend.htm statements/prototype/blend.htm

Author: bbuffone
Date: Wed Sep 12 21:22:32 2007
New Revision: 575161

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

Added:
    incubator/xap/site/docs/xmodify/content/statements/jquery/blend.htm
    incubator/xap/site/docs/xmodify/content/statements/mootools/blend.htm
    incubator/xap/site/docs/xmodify/content/statements/prototype/blend.htm
Modified:
    incubator/xap/site/docs/xmodify/content/jquery-index.html
    incubator/xap/site/docs/xmodify/content/mootools-index.html
    incubator/xap/site/docs/xmodify/content/prototype-index.html
    incubator/xap/site/docs/xmodify/content/statements/jquery/fillTable.xml

Modified: incubator/xap/site/docs/xmodify/content/jquery-index.html
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/jquery-index.html?rev=575161&r1=575160&r2=575161&view=diff
==============================================================================
--- incubator/xap/site/docs/xmodify/content/jquery-index.html (original)
+++ incubator/xap/site/docs/xmodify/content/jquery-index.html Wed Sep 12 21:22:32 2007
@@ -22,6 +22,15 @@
 	                }
 	            });
 	        }
+	        function executeBlend(fileName, select, mode){
+	            $.blend({ 
+	                url: "statements/jquery/"+fileName,
+	                complete: function(results, request){
+	                    //function will be called after the xmodify 
+	                    //processing is finished
+	                }
+	            }, select, mode);
+	        }
 	    </script>
 </head>
 
@@ -198,9 +207,78 @@
 		    	         <a href="statements/jquery/insertAfter.xml" target="_blank">Insert after</a>,
 		    	         <a href="statements/jquery/clearTable.xml" target="_blank">Clear table</a>,
 		    	         <a href="statements/jquery/replaceTable.xml" target="_blank">Replace table</a>
-		    	    </td></tr>	    	</table>  
+		    	    </td></tr>	    	
+				</table>  
+ 		  </td></tr>
+	    <tr height="50%"><td colspan="2">
+            	<table height="100%" width="100%">
+	            <tr height="28px"><td colspan="2"><hr><h4>Using Blend functionality to modify table:</h4>
+						Blend is a simple way to blend in HTML return from an Ajax request into the HTML DOM.  This provides
+						less functionality than xModify but is really simple to use.<br><br>
+						
+						blend({url:'myresource.html'}, selector, mode);
+						
+	    		        <hr/>
+	    		</td></tr>
+	    	    <tr><td style="border:1px dashed #aaa;height" width="200px" valign="top">
+	    	           <input style="width:150px" type="submit" value="Append to Table" onclick="executeBlend('blend.htm', '#myBlendTable', 'append')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert Before" onclick="executeBlend('blend.htm', 'TR[@type=\'insertRowBlend\']', 'insert-before')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert After" onclick="executeBlend('blend.htm', 'TR[@type=\'insertRowBlend\']', 'insert-after')"><br>
+	    	           <input style="width:150px" type="submit" value="Replace Children" onclick="executeBlend('blend.htm', '#myBlendTable', 'replace-children')"><br>
+   		    	    </td>
+	    	        <td valign="top"><table width="100%" height="100%" id="myBlendTable">
+	    	            <tr>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Customer ID</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Name</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Email</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Phone Number</th>
+	    	            </tr>
+	    	            <tr type="insertRowBlend">
+	    	                <td colspan="4"><b>This row is the index for insert before and after.</b></td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr height="95%">
+	    	               <td colspan="6" style="border-top:1px solid #000000">                   		    	         
+	    	               </td>
+	    	            </tr>		    	    
+	    	        </table></td>	    	        
+	    	    </tr>
+                <tr><td colspan="2">
+		    	         <b>xModify files user above: </b>
+		    	         <a href="statements/jquery/blend.html" target="_blank">Blend HTML File</a>, 
+		    	    </td></tr>	    	
+				</table>  
  		  </td>
- 		</tr>
+		</tr>
 	 </table>   
 </div>
 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

Modified: incubator/xap/site/docs/xmodify/content/mootools-index.html
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/mootools-index.html?rev=575161&r1=575160&r2=575161&view=diff
==============================================================================
--- incubator/xap/site/docs/xmodify/content/mootools-index.html (original)
+++ incubator/xap/site/docs/xmodify/content/mootools-index.html Wed Sep 12 21:22:32 2007
@@ -18,6 +18,17 @@
                                 );            
             var result = myXhr.xmodify("statements/mootools/"+macroName+".xml");
         }
+        function executeBlend(macroName, select, mode){
+            var myXhr = new XHR(
+                                    {
+                                        async: true, 
+                                        method: "get",
+                                        onSuccess: function(){
+                                        }
+                                    }
+                                );            
+            var result = myXhr.blend("statements/mootools/"+macroName, select, mode);
+        }
     </script>
 </head>
 
@@ -197,7 +208,76 @@
 		    	    </td></tr>	    	</table>  
  		  </td>
  		</tr>
-	 </table>   
+	    <tr height="50%"><td colspan="2">
+            	<table height="100%" width="100%">
+	            <tr height="28px"><td colspan="2"><hr><h4>Using Blend functionality to modify table:</h4>
+						Blend is a simple way to blend in HTML return from an Ajax request into the HTML DOM.  This provides
+						less functionality than xModify but is really simple to use.<br><br>
+						
+						blend('myresource.html, selector, mode, queryParameters);
+						
+	    		        <hr/>
+	    		</td></tr>
+	    	    <tr><td style="border:1px dashed #aaa;height" width="200px" valign="top">
+	    	           <input style="width:150px" type="submit" value="Append to Table" onclick="executeBlend('blend.htm', '#myBlendTable', 'append')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert Before" onclick="executeBlend('blend.htm', 'TR[type=\'insertRowBlend\']', 'insert-before')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert After" onclick="executeBlend('blend.htm', 'TR[type=\'insertRowBlend\']', 'insert-after')"><br>
+	    	           <input style="width:150px" type="submit" value="Replace Children" onclick="executeBlend('blend.htm', '#myBlendTable', 'replace-children')"><br>
+   		    	    </td>
+	    	        <td valign="top"><table width="100%" height="100%" id="myBlendTable">
+	    	            <tr>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Customer ID</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Name</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Email</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Phone Number</th>
+	    	            </tr>
+	    	            <tr type="insertRowBlend">
+	    	                <td colspan="4"><b>This row is the index for insert before and after.</b></td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr height="95%">
+	    	               <td colspan="6" style="border-top:1px solid #000000">                   		    	         
+	    	               </td>
+	    	            </tr>		    	    
+	    	        </table></td>	    	        
+	    	    </tr>
+                <tr><td colspan="2">
+		    	         <b>xModify files user above: </b>
+		    	         <a href="statements/jquery/blend.html" target="_blank">Blend HTML File</a>, 
+		    	    </td></tr>	    	
+				</table>  
+ 		  </td>
+		</tr>	 
+</table>   
 </div>
 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
 </script>

Modified: incubator/xap/site/docs/xmodify/content/prototype-index.html
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/prototype-index.html?rev=575161&r1=575160&r2=575161&view=diff
==============================================================================
--- incubator/xap/site/docs/xmodify/content/prototype-index.html (original)
+++ incubator/xap/site/docs/xmodify/content/prototype-index.html Wed Sep 12 21:22:32 2007
@@ -10,6 +10,9 @@
         function executexModify(macroName){         
            new Ajax.xmodify("statements/prototype/"+macroName+".xml");
         }
+        function executeBlend(macroName, select, mode){         
+           new Ajax.blend("statements/prototype/"+macroName, select, mode);
+        }
     </script>
 </head>
 
@@ -190,7 +193,75 @@
 			</table>  
  		  </td>
  		</tr>
-	 </table>   
+	    <tr height="50%"><td colspan="2">
+            	<table height="100%" width="100%">
+	            <tr height="28px"><td colspan="2"><hr><h4>Using Blend functionality to modify table:</h4>
+						Blend is a simple way to blend in HTML return from an Ajax request into the HTML DOM.  This provides
+						less functionality than xModify but is really simple to use.<br><br>
+						
+						blend(myresource.html, selector, mode, options);
+						
+	    		        <hr/>
+	    		</td></tr>
+	    	    <tr><td style="border:1px dashed #aaa;height" width="200px" valign="top">
+	    	           <input style="width:150px" type="submit" value="Append to Table" onclick="executeBlend('blend.htm', '#myBlendTable', 'append')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert Before" onclick="executeBlend('blend.htm', 'TR[type=\'insertRowBlend\']', 'insert-before')"><br>
+	    	           <input style="width:150px" type="submit" value="Insert After" onclick="executeBlend('blend.htm', 'TR[type=\'insertRowBlend\']', 'insert-after')"><br>
+	    	           <input style="width:150px" type="submit" value="Replace Children" onclick="executeBlend('blend.htm', '#myBlendTable', 'replace-children')"><br>
+   		    	    </td>
+	    	        <td valign="top"><table width="100%" height="100%" id="myBlendTable">
+	    	            <tr>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Customer ID</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Name</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Email</th>
+	    	                <th align="left" style="border-bottom: 1px solid #000000">Phone Number</th>
+	    	            </tr>
+	    	            <tr type="insertRowBlend">
+	    	                <td colspan="4"><b>This row is the index for insert before and after.</b></td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr>
+	    	                <td>1</td>
+	    	                <td>Robert</td>
+	    	                <td>bbuffone@acme.com</td>
+	    	                <td>555-555-5555</td>
+	    	            </tr>
+	    	            <tr height="95%">
+	    	               <td colspan="6" style="border-top:1px solid #000000">                   		    	         
+	    	               </td>
+	    	            </tr>		    	    
+	    	        </table></td>	    	        
+	    	    </tr>
+                <tr><td colspan="2">
+		    	         <b>xModify files user above: </b>
+		    	         <a href="statements/jquery/blend.html" target="_blank">Blend HTML File</a>, 
+		    	    </td></tr>	    	
+				</table>  
+ 		  </td>
+		</tr>		 </table>   
 </div>
 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
 </script>

Added: incubator/xap/site/docs/xmodify/content/statements/jquery/blend.htm
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/jquery/blend.htm?rev=575161&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/jquery/blend.htm (added)
+++ incubator/xap/site/docs/xmodify/content/statements/jquery/blend.htm Wed Sep 12 21:22:32 2007
@@ -0,0 +1,18 @@
+<tr type="data">
+    <td>10</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>19</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>18</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
\ No newline at end of file

Modified: incubator/xap/site/docs/xmodify/content/statements/jquery/fillTable.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/jquery/fillTable.xml?rev=575161&r1=575160&r2=575161&view=diff
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/jquery/fillTable.xml (original)
+++ incubator/xap/site/docs/xmodify/content/statements/jquery/fillTable.xml Wed Sep 12 21:22:32 2007
@@ -3,7 +3,7 @@
         Adde the data back into the table
     -->
 	<xm:modifications document="html">
-	    <xm:append select="TABLE[@id='myTable']/TBODY"><![CDATA[
+	    <xm:append select="#myTable"><![CDATA[
 	        <tr type="data">
 	            <td>10</td>
 	            <td>Robert</td>

Added: incubator/xap/site/docs/xmodify/content/statements/mootools/blend.htm
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/mootools/blend.htm?rev=575161&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/mootools/blend.htm (added)
+++ incubator/xap/site/docs/xmodify/content/statements/mootools/blend.htm Wed Sep 12 21:22:32 2007
@@ -0,0 +1,18 @@
+<tr type="data">
+    <td>10</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>19</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>18</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
\ No newline at end of file

Added: incubator/xap/site/docs/xmodify/content/statements/prototype/blend.htm
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/blend.htm?rev=575161&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/blend.htm (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/blend.htm Wed Sep 12 21:22:32 2007
@@ -0,0 +1,18 @@
+<tr type="data">
+    <td>10</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>19</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
+<tr type="data">
+    <td>18</td>
+    <td>Robert</td>
+    <td>bbuffone@acme.com</td>
+    <td>555-555-5555</td>
+</tr>
\ No newline at end of file