Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / Month.html
index 3967476..9984be2 100644 (file)
@@ -3,8 +3,8 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>The source code</title>
-  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
-  <script type="text/javascript" src="../prettify/prettify.js"></script>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
   <style type="text/css">
     .highlight { display: block; background-color: #ddd; }
   </style>
 </head>
 <body onload="prettyPrint(); highlight();">
   <pre class="prettyprint lang-js"><span id='Ext-picker-Month'>/**
-</span> * @private
- * @class Ext.picker.Month
- * @extends Ext.Component
- * &lt;p&gt;A month picker component. This class is used by the {@link Ext.picker.Date DatePicker} class
- * to allow browsing and selection of year/months combinations.&lt;/p&gt;
+</span> * A month picker component. This class is used by the {@link Ext.picker.Date Date picker} class
+ * to allow browsing and selection of year/months combinations.
  */
 Ext.define('Ext.picker.Month', {
     extend: 'Ext.Component',
@@ -29,7 +26,7 @@ Ext.define('Ext.picker.Month', {
     alternateClassName: 'Ext.MonthPicker',
 
     renderTpl: [
-        '&lt;div class=&quot;{baseCls}-body&quot;&gt;',
+        '&lt;div id=&quot;{id}-bodyEl&quot; class=&quot;{baseCls}-body&quot;&gt;',
           '&lt;div class=&quot;{baseCls}-months&quot;&gt;',
               '&lt;tpl for=&quot;months&quot;&gt;',
                   '&lt;div class=&quot;{parent.baseCls}-item {parent.baseCls}-month&quot;&gt;&lt;a href=&quot;#&quot; hidefocus=&quot;on&quot;&gt;{.}&lt;/a&gt;&lt;/div&gt;',
@@ -37,27 +34,27 @@ Ext.define('Ext.picker.Month', {
           '&lt;/div&gt;',
           '&lt;div class=&quot;{baseCls}-years&quot;&gt;',
               '&lt;div class=&quot;{baseCls}-yearnav&quot;&gt;',
-                  '&lt;button class=&quot;{baseCls}-yearnav-prev&quot;&gt;&lt;/button&gt;',
-                  '&lt;button class=&quot;{baseCls}-yearnav-next&quot;&gt;&lt;/button&gt;',
+                  '&lt;button id=&quot;{id}-prevEl&quot; class=&quot;{baseCls}-yearnav-prev&quot;&gt;&lt;/button&gt;',
+                  '&lt;button id=&quot;{id}-nextEl&quot; class=&quot;{baseCls}-yearnav-next&quot;&gt;&lt;/button&gt;',
               '&lt;/div&gt;',
               '&lt;tpl for=&quot;years&quot;&gt;',
                   '&lt;div class=&quot;{parent.baseCls}-item {parent.baseCls}-year&quot;&gt;&lt;a href=&quot;#&quot; hidefocus=&quot;on&quot;&gt;{.}&lt;/a&gt;&lt;/div&gt;',
               '&lt;/tpl&gt;',
           '&lt;/div&gt;',
+          '&lt;div class=&quot;' + Ext.baseCSSPrefix + 'clear&quot;&gt;&lt;/div&gt;',
         '&lt;/div&gt;',
-        '&lt;div class=&quot;' + Ext.baseCSSPrefix + 'clear&quot;&gt;&lt;/div&gt;',
         '&lt;tpl if=&quot;showButtons&quot;&gt;',
-          '&lt;div class=&quot;{baseCls}-buttons&quot;&gt;&lt;/div&gt;',
+          '&lt;div id=&quot;{id}-buttonsEl&quot; class=&quot;{baseCls}-buttons&quot;&gt;&lt;/div&gt;',
         '&lt;/tpl&gt;'
     ],
 
 <span id='Ext-picker-Month-cfg-okText'>    /**
-</span>     * @cfg {String} okText The text to display on the ok button. Defaults to &lt;tt&gt;'OK'&lt;/tt&gt;
+</span>     * @cfg {String} okText The text to display on the ok button.
      */
     okText: 'OK',
 
 <span id='Ext-picker-Month-cfg-cancelText'>    /**
-</span>     * @cfg {String} cancelText The text to display on the cancel button. Defaults to &lt;tt&gt;'Cancel'&lt;/tt&gt;
+</span>     * @cfg {String} cancelText The text to display on the cancel button.
      */
     cancelText: 'Cancel',
 
@@ -67,7 +64,7 @@ Ext.define('Ext.picker.Month', {
     baseCls: Ext.baseCSSPrefix + 'monthpicker',
 
 <span id='Ext-picker-Month-cfg-showButtons'>    /**
-</span>     * @cfg {Boolean} showButtons True to show ok and cancel buttons below the picker. Defaults to &lt;tt&gt;true&lt;/tt&gt;.
+</span>     * @cfg {Boolean} showButtons True to show ok and cancel buttons below the picker.
      */
     showButtons: true,
 
@@ -77,10 +74,10 @@ Ext.define('Ext.picker.Month', {
      */
 
 <span id='Ext-picker-Month-cfg-value'>    /**
-</span>     * @cfg {Date/Array} value The default value to set. See {#setValue setValue}
+</span>     * @cfg {Date/Number[]} value The default value to set. See {@link #setValue}
      */
     width: 178,
-    
+
     // used when attached to date picker which isnt showing buttons
     smallCls: Ext.baseCSSPrefix + 'monthpicker-small',
 
@@ -176,13 +173,9 @@ Ext.define('Ext.picker.Month', {
             showButtons: me.showButtons
         });
 
-        Ext.apply(me.renderSelectors, {
-            bodyEl: '.' + me.baseCls + '-body',
-            prevEl: '.' + me.baseCls + '-yearnav-prev',
-            nextEl: '.' + me.baseCls + '-yearnav-next',
-            buttonsEl: '.' + me.baseCls + '-buttons'
-        });
-        this.callParent([ct, position]);
+        me.addChildEls('bodyEl', 'prevEl', 'nextEl', 'buttonsEl');
+
+        me.callParent(arguments);
     },
 
     // private, inherit docs
@@ -229,7 +222,7 @@ Ext.define('Ext.picker.Month', {
 
 <span id='Ext-picker-Month-method-setValue'>    /**
 </span>     * Set the value for the picker.
-     * @param {Date/Array} value The value to set. It can be a Date object, where the month/year will be extracted, or
+     * @param {Date/Number[]} value The value to set. It can be a Date object, where the month/year will be extracted, or
      * it can be an array, with the month as the first index and the year as the second.
      * @return {Ext.picker.Month} this
      */
@@ -265,7 +258,7 @@ Ext.define('Ext.picker.Month', {
 </span>     * Gets the selected value. It is returned as an array [month, year]. It may
      * be a partial value, for example [null, 2010]. The month is returned as
      * 0 based.
-     * @return {Array} The selected value
+     * @return {Number[]} The selected value
      */
     getValue: function(){
         return this.value;
@@ -284,7 +277,7 @@ Ext.define('Ext.picker.Month', {
 </span>     * Get an array of years to be pushed in the template. It is not in strict
      * numerical order because we want to show them in columns.
      * @private
-     * @return {Array} An array of years
+     * @return {Number[]} An array of years
      */
     getYears: function(){
         var me = this,
@@ -369,7 +362,7 @@ Ext.define('Ext.picker.Month', {
 
 <span id='Ext-picker-Month-method-adjustYear'>    /**
 </span>     * Modify the year display by passing an offset.
-     * @param {Number} offset The offset to move by. If not specified, it defaults to 10.
+     * @param {Number} [offset=10] The offset to move by.
      */
     adjustYear: function(offset){
         if (typeof offset != 'number') {
@@ -444,8 +437,8 @@ Ext.define('Ext.picker.Month', {
     beforeDestroy: function(){
         var me = this;
         me.years = me.months = null;
-        Ext.destroyMembers('backRepeater', 'nextRepeater', 'okBtn', 'cancelBtn');
-        this.callParent();
+        Ext.destroyMembers(me, 'backRepeater', 'nextRepeater', 'okBtn', 'cancelBtn');
+        me.callParent();
     }
 });
 </pre>