Added vip feature.

This commit is contained in:
Martin Edenhofer 2015-02-06 16:24:11 +01:00
parent afc1d6571d
commit c030efc5c3

View file

@ -61,6 +61,8 @@ class App.User extends App.Model
if !@image || @image is 'none' if !@image || @image is 'none'
return @uniqueAvatar(size, placement, cssClass) return @uniqueAvatar(size, placement, cssClass)
else else
if @vip
cssClass += "#{cssClass} vip"
"<span class=\"avatar user-popover #{cssClass}\" data-id=\"#{@id}\" style=\"background-image: url(#{ @imageUrl })\" #{placement}></span>" "<span class=\"avatar user-popover #{cssClass}\" data-id=\"#{@id}\" style=\"background-image: url(#{ @imageUrl })\" #{placement}></span>"
uniqueAvatar: (size = 40, placement = '', cssClass = '', avatar) -> uniqueAvatar: (size = 40, placement = '', cssClass = '', avatar) ->
@ -80,6 +82,9 @@ class App.User extends App.Model
data = "data-id=\"#{@id}\"" data = "data-id=\"#{@id}\""
else else
data = "data-avatar-id=\"#{avatar.id}\"" data = "data-avatar-id=\"#{avatar.id}\""
if @vip
cssClass += "#{cssClass} vip"
"<span class=\"avatar unique #{cssClass}\" #{data} style=\"background-position: -#{ x }px -#{ y }px;\" #{placement}>#{ @initials() }</span>" "<span class=\"avatar unique #{cssClass}\" #{data} style=\"background-position: -#{ x }px -#{ y }px;\" #{placement}>#{ @initials() }</span>"
@_fillUp: (data) -> @_fillUp: (data) ->