From 742614e0da6e44aeea1780b6abb6f96bb745a3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=8D=8E=E4=BC=9F?= Date: Tue, 15 Feb 2022 13:25:12 +0800 Subject: [PATCH] Fix bug #19247 #19435 #19239 --- module/productplan/js/browse.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js index c39770db07..6cd9de4f10 100644 --- a/module/productplan/js/browse.js +++ b/module/productplan/js/browse.js @@ -367,27 +367,28 @@ function renderKanbanItem(item, $item) ].join('')).appendTo($item); var $time = $dateBox.children('.time'); - var $beginTimeShort = $.zui.formatDate(begin, 'MM-dd'); - var $beginTimeLong = $.zui.formatDate(begin, 'yyyy-MM-dd'); - var $endTimeShort = $.zui.formatDate(end, 'MM-dd'); - var $endTimeLong = $.zui.formatDate(end, 'yyyy-MM-dd') - var $to = productplanLang.to; - var $undetermined = productplanLang.future; - if(item.begin != '2030-01-01' && item.end != '2030-01-01') + var beginTimeShort = $.zui.formatDate(begin, 'MM-dd'); + var beginTimeLong = $.zui.formatDate(begin, 'yyyy-MM-dd'); + var endTimeShort = $.zui.formatDate(end, 'MM-dd'); + var endTimeLong = $.zui.formatDate(end, 'yyyy-MM-dd') + var to = productplanLang.to; + var undetermined = productplanLang.future; + var undetermindeDate = '2030-01-01'; + if(item.begin != undetermindeDate && item.end != undetermindeDate) { - $time.text($beginTimeShort + ' ' + $to + ' ' + $endTimeShort).attr('title', $beginTimeLong + $to + $$endTimeLong).show(); + $time.text(beginTimeShort + ' ' + to + ' ' + endTimeShort).attr('title', beginTimeLong + to + endTimeLong).show(); } - else if(item.begin != '2030-01-01' && item.end == '2030-01-01') + else if(item.begin != undetermindeDate && item.end == undetermindeDate) { - $time.text($beginTimeShort + ' ' + $to + ' ' + $undetermined).attr('title', $beginTimeLong + $to).show(); + $time.text(beginTimeShort + ' ' + to + ' ' + undetermined).attr('title', beginTimeLong + to).show(); } - else if(item.begin == '2030-01-01' && item.end != '2030-01-01') + else if(item.begin == undetermindeDate && item.end != undetermindeDate) { - $time.text($undetermined + ' ' + $to + ' ' + $endTimeShort).attr('title', $to + $endTimeLong).show(); + $time.text(undetermined + ' ' + to + ' ' + endTimeShort).attr('title', to + endTimeLong).show(); } else { - $time.text($undetermined).attr('title', $undetermined).show(); + $time.text(undetermined).attr('title', undetermined).show(); } /* Output plan desc information. */