From f20956732a7f600ad0bbf209de4adc1ed85fc1eb Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 1 Oct 2017 19:57:28 +0300 Subject: [PATCH] Working on the time tracker --- .../tasks/time_tracker_knockout.blade.php | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/resources/views/tasks/time_tracker_knockout.blade.php b/resources/views/tasks/time_tracker_knockout.blade.php index 0f6685abb5b0..f4d96d64319a 100644 --- a/resources/views/tasks/time_tracker_knockout.blade.php +++ b/resources/views/tasks/time_tracker_knockout.blade.php @@ -1185,50 +1185,6 @@ self.endTime(self.startTime() + value); } }); - - - /* - self.startTime.pretty = ko.computed({ - read: function() { - return self.startTime() ? moment.unix(self.startTime()).tz(timezone).format(dateTimeFormat) : ''; - }, - write: function(data) { - self.startTime(moment(data, dateTimeFormat).tz(timezone).unix()); - } - }); - - self.endTime.pretty = ko.computed({ - read: function() { - return self.endTime() ? moment.unix(self.endTime()).tz(timezone).format(dateTimeFormat) : ''; - }, - write: function(data) { - self.endTime(moment(data, dateTimeFormat).tz(timezone).unix()); - } - }); - - self.setNow = function() { - self.startTime(moment.tz(timezone).unix()); - self.endTime(moment.tz(timezone).unix()); - } - - self.duration.pretty = ko.computed({ - read: function() { - var duration = false; - var start = self.startTime(); - var end = self.endTime(); - - if (start && end) { - var duration = end - start; - } - - var duration = moment.duration(duration * 1000); - return Math.floor(duration.asHours()) + moment.utc(duration.asMilliseconds()).format(":mm:ss"); - }, - write: function(data) { - self.endTime(self.startTime() + convertToSeconds(data)); - } - }); - */ }