Commit b4af9941147401f861aa050b9d35046cb1e5d486
1 parent
60fcca24
Exists in
master
and in
4 other branches
Remove 'sortByRankingPosition' hack at ArticleService - issue #28
Showing
1 changed file
with
0 additions
and
11 deletions
Show diff stats
src/app/components/article-service/article.service.js
... | ... | @@ -118,7 +118,6 @@ |
118 | 118 | |
119 | 119 | UtilService.get(url, {params: paramsExtended}).then(function(data){ |
120 | 120 | _pipeInjectSlugIntoParentProgram(data); |
121 | - _pipeSortByRankinPosition(data); | |
122 | 121 | cbSuccess(data); |
123 | 122 | }).catch(function(error){ |
124 | 123 | cbError(error); |
... | ... | @@ -283,7 +282,6 @@ |
283 | 282 | |
284 | 283 | UtilService.get(url, {params: paramsExtended}).then(function(data){ |
285 | 284 | _pipeInjectSlugIntoParentProgram(data); |
286 | - _pipeSortByRankinPosition(data); | |
287 | 285 | cbSuccess(data); |
288 | 286 | }).catch(function(error){ |
289 | 287 | cbError(error); |
... | ... | @@ -303,15 +301,6 @@ |
303 | 301 | } |
304 | 302 | } |
305 | 303 | |
306 | - function _pipeSortByRankinPosition(data){ | |
307 | - if(!data.articles && data.article){ | |
308 | - data.articles = [data.article]; | |
309 | - } | |
310 | - data.articles = data.articles.sort(function(pA, pB){ | |
311 | - return pA.ranking_position - pB.ranking_position; | |
312 | - }); | |
313 | - } | |
314 | - | |
315 | 304 | function _pipeRemoveOldEvents(data){ |
316 | 305 | if(!data.articles && data.article){ |
317 | 306 | data.articles = [data.article]; | ... | ... |