Commit 2c4ee263 authored by Pettersson Tomas's avatar Pettersson Tomas

CHANGEFN USESE DURATIONHOURS INSTEAD

parent a7f0790d
...@@ -614,12 +614,9 @@ var STWkit; ...@@ -614,12 +614,9 @@ var STWkit;
self.startTimeInput.value = changeCard.obsTimeInput.value; self.startTimeInput.value = changeCard.obsTimeInput.value;
self.updateFromStartDate(); self.updateFromStartDate();
} }
if ((typeof changeCard.updateto !== 'undefined')) { if ((typeof changeCard.durationhours !== 'undefined')) {
if (changeCard.updateto.isBefore(self.minDate) || changeCard.updateto.isAfter(self.maxDate)) self.durationHours.value = changeCard.durationhours;
return; self.updateFromStartDate();
self.to = changeCard.updateto.clone();
self.updateSlider();
// if (self.ready) self.validate();
} }
}; };
PeriodCard.prototype.isDateValid = function (date) { PeriodCard.prototype.isDateValid = function (date) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -676,13 +676,10 @@ module STWkit { ...@@ -676,13 +676,10 @@ module STWkit {
self.startTimeInput.value = changeCard.obsTimeInput.value; self.startTimeInput.value = changeCard.obsTimeInput.value;
self.updateFromStartDate(); self.updateFromStartDate();
} }
if ((typeof changeCard.updateto !== 'undefined')) { if ((typeof changeCard.durationhours !== 'undefined')) {
if (changeCard.updateto.isBefore(self.minDate) || changeCard.updateto.isAfter(self.maxDate)) return; self.durationHours.value = changeCard.durationhours;
self.to = changeCard.updateto.clone(); self.updateFromStartDate();
self.updateSlider();
// if (self.ready) self.validate();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment