mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Reworking everything to use RABL
This commit is contained in:
@@ -5,6 +5,7 @@ window.Shop = angular.module("Shop", ["ngResource", "filters"]).config ($httpPro
|
||||
|
||||
angular.module("filters", []).filter "truncate", ->
|
||||
(text, length, end) ->
|
||||
text = text || ""
|
||||
length = 10 if isNaN(length)
|
||||
end = "..." if end is `undefined`
|
||||
if text.length <= length or text.length - end.length <= length
|
||||
|
||||
Reference in New Issue
Block a user