buildSDK/dependancy_bootstrap.txt
[roojs1] / Roo / bootstrap / MonthField.js
index 439241c..9348c26 100644 (file)
@@ -39,7 +39,8 @@ Roo.bootstrap.MonthField = function(config){
          * @event select
          * Fires when select a date.
          * @param {Roo.bootstrap.MonthField} this
-         * @param {Mixed} date The date value
+         * @param {String} oldvalue The old value
+         * @param {String} newvalue The new value
          */
         select : true
     });
@@ -86,13 +87,17 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
         
     },
     
-    setValue: function(v)
+    setValue: function(v, suppressEvent)
     {   
+        var o = this.getValue();
+        
         Roo.bootstrap.MonthField.superclass.setValue.call(this, v);
         
         this.update();
 
-        this.fireEvent('select', this, this.date);
+        if(suppressEvent !== true){
+            this.fireEvent('select', this, o, v);
+        }
         
     },
     
@@ -125,8 +130,6 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
         this.setValue(Roo.bootstrap.MonthField.dates[this.language].months[this.vIndex]);
         
         this.hide();
-        
-        this.fireEvent("select", this, e);
                         
     },
     
@@ -147,7 +150,7 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
                 tag: 'span',
                 cls: 'month',
                 html: Roo.bootstrap.MonthField.dates[this.language].monthsShort[i++]
-            }
+            };
             
             months.createChild(month);
         }
@@ -173,7 +176,9 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
     
     place: function()
     {
-        if(this.isInline) return;
+        if(this.isInline) {
+            return;
+        }
         
         this.picker().removeClass(['bottom', 'top']);
         
@@ -198,8 +203,6 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
     {
         Roo.bootstrap.MonthField.superclass.onFocus.call(this);
         this.show();
-        
-        this.fireEvent("focus", this);
     },
     
     onBlur : function()
@@ -211,8 +214,6 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
         this.setValue(d);
                 
         this.hide();
-        
-        this.fireEvent("blur", this);
     },
     
     show : function()
@@ -227,7 +228,9 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
     
     hide : function()
     {
-        if(this.isInline) return;
+        if(this.isInline) {
+            return;
+        }
         this.picker().hide();
         this.fireEvent('hide', this, this.date);
         
@@ -243,15 +246,14 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
     {
         Roo.bootstrap.MonthField.superclass.keyup.call(this);
         this.update();
-        
-        this.fireEvent("keyup", this, e);
     },
 
     fireKey: function(e)
     {
         if (!this.picker().isVisible()){
-            if (e.keyCode == 27) // allow escape to hide and re-show picker
+            if (e.keyCode == 27)   {// allow escape to hide and re-show picker
                 this.show();
+            }
             return;
         }
         
@@ -328,8 +330,6 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
                 this.hide();
                 
         }
-        
-        this.fireEvent("specialkey", this, e);
     },
     
     remove: function()