0012432: vacation popup can't be closed
authorCornelius Weiß <c.weiss@metaways.de>
Fri, 6 Jan 2017 14:58:26 +0000 (15:58 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Jan 2017 08:47:09 +0000 (09:47 +0100)
Change-Id: I6af49fe152e9e6a226a6fee2ff863b152395b4a9
Reviewed-on: http://gerrit.tine20.com/customers/4055
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/HumanResources/js/DatePicker.js

index 89a595f..3350956 100644 (file)
@@ -439,16 +439,16 @@ Tine.HumanResources.DatePicker = Ext.extend(Ext.DatePicker, {
     handleDateClick: function(e, t) {
         // don't handle date click, if this is disabled, or the clicked node doesn't have a timestamp assigned
         if (this.disabled || ! t.dateValue) {
-            return;
+            return Tine.HumanResources.DatePicker.superclass.handleDateClick.call(this, e, t);
         }
         // don't handle click on disabled dates defined by contract or feast calendar
         if (Ext.fly(t.parentNode).hasClass('x-date-disabled')) {
-            return;
+            return Tine.HumanResources.DatePicker.superclass.handleDateClick.call(this, e, t);
         }
         
         // dont't handle click on already defined sickness days
         if (Ext.fly(t.parentNode).hasClass('hr-date-sickness')) {
-            return;
+            return Tine.HumanResources.DatePicker.superclass.handleDateClick.call(this, e, t);
         }
         
         var date = new Date(t.dateValue),
@@ -457,28 +457,28 @@ Tine.HumanResources.DatePicker = Ext.extend(Ext.DatePicker, {
         date.clearTime();
         
         if (this.accountPickerActive) {
-            
+
             var remaining = this.editDialog.getForm().findField('remaining_vacation_days').getValue();
-            
+
             if (existing) {
                 remaining++;
             } else {
                 remaining--;
             }
-            
+
             if (remaining < 0) {
                 Ext.MessageBox.show({
-                    title: this.app.i18n._('No more vacation days'), 
+                    title: this.app.i18n._('No more vacation days'),
                     msg: this.app.i18n._('The Employee has no more possible vacation days left for this year. Create a new vacation and use another personal account the vacation should be taken from.'),
                     icon: Ext.MessageBox.WARNING,
                     buttons: Ext.Msg.OK
                 });
-                return;
+                return Tine.HumanResources.DatePicker.superclass.handleDateClick.call(this, e, t);
             }
         } else {
             var remaining = 0;
         }
-        
+
         if (existing) {
             this.store.remove(existing);
         } else {
@@ -491,7 +491,7 @@ Tine.HumanResources.DatePicker = Ext.extend(Ext.DatePicker, {
             } else {
                 this.editDialog.accountPicker.enable();
             }
-            
+
             this.editDialog.getForm().findField('remaining_vacation_days').setValue(remaining);
         }