Replace some _.each by native coffescript for.
parent
80c01d38eb
commit
e4975e3f25
|
@ -80,16 +80,16 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
loadHistory: ->
|
loadHistory: ->
|
||||||
return @rs.issues.history(@scope.issueId).then (history) =>
|
return @rs.issues.history(@scope.issueId).then (history) =>
|
||||||
_.each history.results, (historyResult) ->
|
for item in history.results
|
||||||
#If description was modified take only the description_html field
|
# If description was modified take only the description_html field
|
||||||
if historyResult.values_diff.description?
|
if item.values_diff.description?
|
||||||
historyResult.values_diff.description = historyResult.values_diff.description_html
|
item.values_diff.description = historyResult.values_diff.description_html
|
||||||
|
|
||||||
delete historyResult.values_diff.description_html
|
delete item.values_diff.description_html
|
||||||
delete historyResult.values_diff.description_diff
|
delete item.values_diff.description_diff
|
||||||
|
|
||||||
@scope.history = history.results
|
@scope.history = history.results
|
||||||
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
@scope.comments = _.filter(history.results, (item) -> item.comment != "")
|
||||||
|
|
||||||
loadInitialData: ->
|
loadInitialData: ->
|
||||||
params = {
|
params = {
|
||||||
|
|
Loading…
Reference in New Issue