yui3/commit

ADD yui3_load

authorMichiel Hildebrand
Fri Nov 9 15:58:20 2012 +0100
committerMichiel Hildebrand
Fri Nov 9 15:58:20 2012 +0100
commit5bcbd1a4c242ec95182c551bada010d313aec223
tree4892750b272b2ec579a11714759e6646794352e4
parent94f9f52c91bbb2729b83c4e2653dac55cf5f769b
Diff style: patch stat
diff --git a/lib/yui3.pl b/lib/yui3.pl
index 6a77041b4b..4810c290b5 100644
--- a/lib/yui3.pl
+++ b/lib/yui3.pl
@@ -34,7 +34,7 @@
 
 js_yui3(Head, Include, Body) -->
 	html_requires(yui3('yui/yui-min.js')),
- 	html('var Y = YUI(\n'),
+	html('var Y = YUI(\n'),
 	js_args(Head),
 	html(');\n'),
 	html('Y.use('),
@@ -80,7 +80,7 @@ js_yui3_delegate(Select, Context, Event, Fn, Args) -->
 %	Emit javascript function.
 
 js_function(Args, Body) -->
- 	html(['function(', \js_vars(Args), ') {\n']),
+	html(['function(', \js_vars(Args), ') {\n']),
 	html([Body,'\n']),
 	html('}').
 
diff --git a/lib/yui3_beta.pl b/lib/yui3_beta.pl
index 35a41d9ffc..f7cac2af59 100644
--- a/lib/yui3_beta.pl
+++ b/lib/yui3_beta.pl
@@ -13,6 +13,7 @@
 	    yui3_on//4,
 	    yui3_delegate//6,
 	    yui3_io//2,
+	    yui3_load//2,
 	    js_function//2
 	  ]).
 
@@ -69,7 +70,7 @@ yui3_config -->
                     "gallery-": {},
                     "gallerycss-": { type: "css" }
                 }
-            },
+            }
           }
 	}
 	']).
@@ -201,6 +202,16 @@ yui3_plug(Selector, Plugin, Conf) -->
 yui3_io(Server, Conf) -->
 	html(['Y.io("',Server,'", ', \js_args([Conf]), ');']).
 
+
+%%	yui3_load(+Node, +URL)
+%
+%	Fetch remote html and set content to Node
+
+yui3_load(Node, URL) -->
+	yui3_select(Node),
+	html(['.load(',\js_arg(URL),');']).
+
+
 %%	yui3_select(+YUI3_Selector)
 %
 %	Emit YUI3 selector.