Sha256: 7e91daebf314091b9aafd74fbe0f68955a5e05495c2aa4581dc8cd4b2d2bde4d
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 KB
Contents
Lanes.View.mixins.ScreenChangeListener = { model_events: 'remote-update': 'onChange' events: 'show.bs.dropdown .changes-notification': 'onChangesShow' session: change_count: ['number', true, 0] derived: changes: deps:[], fn: -> new Lanes.Data.ChangeSetCollection([],{ parent: this }) changes_visible: { deps: ['change_count'], fn:-> @change_count > 0 } bindings: 'changes_visible': { selector: '.changes-notification', type: 'toggle' } 'change_count': [ { selector: '.changes-notification .title span', type: 'text' } { selector: '.changes-notification .dropdown-toggle .badge', type: 'text' } ] subviews: changesDropDown: hook: 'changes-display' view: 'ModelUpdate' collection: 'changes' onChange: (model,change)-> @changes.add(change) @change_count += 1 bindModel: (model)-> Lanes.View.Base.prototype.bindModel.call(this, model) @changes.reset([]) @change_count = 0 onChangesShow: (ev)-> this.changes.invoke('updateTimeAgo') this.$('.changes-notification .scroller').animate({ scrollTop: 0 }) }
Version data entries
3 entries across 3 versions & 1 rubygems