remove some things
This commit is contained in:
parent
fa0d533059
commit
558f6e64c0
|
@ -29,6 +29,8 @@ Controller = Ember.Controller.extend
|
|||
@get('store').find('broadcast').then (result) ->
|
||||
broadcasts.pushObjects(result.toArray())
|
||||
|
||||
console.log(broadcasts)
|
||||
|
||||
broadcasts
|
||||
).property('currentUser.id')
|
||||
|
||||
|
|
|
@ -11,29 +11,12 @@ FlashesService = Ember.Service.extend
|
|||
@set('flashes', LimitedArray.create(limit: 1, content: []))
|
||||
|
||||
messages: (->
|
||||
#broadcasts = @get('unseenBroadcasts')
|
||||
flashes = @get('flashes')
|
||||
model = []
|
||||
# model.pushObjects(broadcasts) if broadcasts
|
||||
model.pushObjects(flashes.toArray().reverse()) if flashes
|
||||
model.pushObjects(flashes.toArray().reverse()) if flashes
|
||||
model.uniq()
|
||||
).property('flashes.[]', 'flashes.length')
|
||||
|
||||
# unseenBroadcasts: (->
|
||||
# @get('broadcasts').filter (broadcast) ->
|
||||
# !broadcast.get('isSeen')
|
||||
# ).property('broadcasts.[]', 'broadcasts.length')
|
||||
|
||||
# broadcasts: (->
|
||||
# broadcasts = Ember.ArrayProxy.create(content: [])
|
||||
|
||||
# if @get('currentUser.id')
|
||||
# @get('store').find('broadcast').then (result) ->
|
||||
# broadcasts.pushObjects(result.toArray())
|
||||
|
||||
# broadcasts
|
||||
# ).property('currentUser.id')
|
||||
|
||||
loadFlashes: (msgs) ->
|
||||
for msg in msgs
|
||||
type = Object.keys(msg)[0]
|
||||
|
@ -42,10 +25,6 @@ FlashesService = Ember.Service.extend
|
|||
Ember.run.later(this, (-> @get('flashes.content').removeObject(msg)), 15000)
|
||||
|
||||
close: (msg) ->
|
||||
# if msg.constructor.modelName == "broadcast"
|
||||
# msg.setSeen()
|
||||
# @notifyPropertyChange('unseenBroadcasts')
|
||||
# else
|
||||
@get('flashes').removeObject(msg)
|
||||
|
||||
`export default FlashesService`
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
</ul>
|
||||
{{/if}}
|
||||
|
||||
{{v2broadcasts}}
|
||||
|
||||
<nav id="navigation" class="navigation {{if is-open 'is-open'}}">
|
||||
<ul>
|
||||
<li><a href="http://blog.travis-ci.com" class="navigation-anchor">Blog</a></li>
|
||||
|
|
Loading…
Reference in New Issue
Block a user