Commit a99d25b1 authored by Phil Hughes's avatar Phil Hughes

Checks against date parsing instead of string

Removes template for html string that isn't needed
parent b0cf8210
......@@ -50,7 +50,7 @@ class @DueDateSelect
$selectbox.hide()
$value.css('display', '')
cssClass = if mediumDate is "No due date" then 'no-value' else 'bold'
cssClass = if Date.parse(mediumDate) then 'bold' else 'no-value'
$valueContent.html("<span class='#{cssClass}'>#{mediumDate}</span>")
$sidebarValue.html(mediumDate)
......
......@@ -39,7 +39,7 @@ class @LabelsSelect
</a>
<% }); %>'
)
labelNoneHTMLTemplate = _.template('<span class="no-value">None</span>')
labelNoneHTMLTemplate = '<span class="no-value">None</span>'
if newLabelField.length
......@@ -142,7 +142,7 @@ class @LabelsSelect
template = labelHTMLTemplate(data)
labelCount = data.labels.length
else
template = labelNoneHTMLTemplate()
template = labelNoneHTMLTemplate
$value
.removeAttr('style')
.html(template)
......
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