summaryrefslogtreecommitdiffstats
path: root/coffee/services/feedmodel.coffee
blob: ff7f9c14808f3a83543bdd817178e727f19f207f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
###
# ownCloud
#
# @author Bernhard Posselt
# Copyright (c) 2012 - Bernhard Posselt <nukeawhale@gmail.com>
#
# This file is licensed under the Affero General Public License version 3 or
# later.
#
# See the COPYING-README file
#
###

angular.module('News').factory '_FeedModel', ['Model', (Model) ->

	class FeedModel extends Model

		constructor: () ->
			super()


		add: (item) ->
			super(@bindAdditional(item))


		bindAdditional: (item) ->
			if item.icon == "url()"
				item.icon = 'url(' + OC.imagePath('news', 'rss.svg') + ')'
			return item


	return FeedModel 
]