Merge branch '2015.11-develop' into 2016.11
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Jan 2017 11:33:20 +0000 (12:33 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Jan 2017 11:33:20 +0000 (12:33 +0100)
1  2 
tine20/HumanResources/js/DatePicker.js

@@@ -451,20 -448,9 +451,20 @@@ Tine.HumanResources.DatePicker = Ext.ex
          
          // 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);
          }
          
 +        // dont't handle click on feast days
 +        if (Ext.fly(t.parentNode).hasClass('hr-date-feast')) {
 +            return;
 +        }
 +        
 +        // dont't handle click on already defined vacation days from different vacation entries
 +        if (Ext.fly(t.parentNode).hasClass('hr-date-vacation') &&
 +           !Ext.fly(t.parentNode).hasClass('x-date-selected')) {
 +            return;
 +        }
 +        
          var date = new Date(t.dateValue),
              existing = this.store.getByDate(date);
              
          } else {
              var remaining = 0;
          }
-         
          if (existing) {
              this.store.remove(existing);
 +            var index = this.vacationDates.indexOf(t.dateValue);
 +            if (index > -1) {
 +                this.vacationDates.splice(index, 1);
 +            }
          } else {
              this.store.addSorted(new this.recordClass({date: date, duration: 1}));
          }