Upgrade to ExtJS 3.3.0 - Released 10/06/2010
[extjs.git] / examples / docs / source / DayViewTemplate.html
diff --git a/examples/docs/source/DayViewTemplate.html b/examples/docs/source/DayViewTemplate.html
new file mode 100644 (file)
index 0000000..75eb323
--- /dev/null
@@ -0,0 +1,58 @@
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.calendar.DayViewTemplate"></div>/**
+ * @class Ext.calendar.DayViewTemplate
+ * @extends Ext.XTemplate
+ * <p>This is the template used to render the all-day event container used in {@link Ext.calendar.DayView DayView} and 
+ * {@link Ext.calendar.WeekView WeekView}. Internally this class simply defers to instances of {@link Ext.calerndar.DayHeaderTemplate}
+ * and  {@link Ext.calerndar.DayBodyTemplate} to perform the actual rendering logic, but it also provides the overall calendar view
+ * container that contains them both.  As such this is the template that should be used when rendering day or week views.</p> 
+ * <p>This template is automatically bound to the underlying event store by the 
+ * calendar components and expects records of type {@link Ext.calendar.EventRecord}.</p>
+ * @constructor
+ * @param {Object} config The config object
+ */
+Ext.calendar.DayViewTemplate = function(config){
+    
+    Ext.apply(this, config);
+    
+    this.headerTpl = new Ext.calendar.DayHeaderTemplate(config);
+    this.headerTpl.compile();
+    
+    this.bodyTpl = new Ext.calendar.DayBodyTemplate(config);
+    this.bodyTpl.compile();
+    
+    Ext.calendar.DayViewTemplate.superclass.constructor.call(this,
+        '<div class="ext-cal-inner-ct">',
+            '{headerTpl}',
+            '{bodyTpl}',
+        '</div>'
+    );
+};
+
+Ext.extend(Ext.calendar.DayViewTemplate, Ext.XTemplate, {
+    // private
+    applyTemplate : function(o){
+        return Ext.calendar.DayViewTemplate.superclass.applyTemplate.call(this, {
+            headerTpl: this.headerTpl.apply(o),
+            bodyTpl: this.bodyTpl.apply(o)
+        });
+    }
+});
+
+Ext.calendar.DayViewTemplate.prototype.apply = Ext.calendar.DayViewTemplate.prototype.applyTemplate;
+</pre>    
+</body>
+</html>
\ No newline at end of file