Reworking everything to use RABL

This commit is contained in:
Will Marshall
2014-01-07 15:06:47 +11:00
parent 32c7682da2
commit 4d03f65766
9 changed files with 73 additions and 22 deletions

View File

@@ -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