Sha256: a38ed82a413df2250f7761cea87e016013af612c953f3b1aefdb5cc0cb9f350c
Contents?: true
Size: 1.2 KB
Versions: 36
Compression:
Stored size: 1.2 KB
Contents
I"¿(function() { App.Services.NotificationCenter = (function() { function NotificationCenter() {} NotificationCenter.prototype.receivedSignal = function(data) { switch (data.signal) { case 'ping': return this._pingSignal(); case 'message': return this._messageSignal(data); } }; NotificationCenter.prototype._pingSignal = function() { if (App.Env.namespaceController.constructor !== App.Controllers.User) { return; } return alert('Ping!'); }; NotificationCenter.prototype._messageSignal = function(data) { var view; if (!(view = this._getRoomView())) { return; } return view.receivedMessage(data.message, data.author); }; NotificationCenter.prototype._getRoomView = function() { if (App.Env.namespaceController.constructor !== App.Controllers.User) { return false; } if (App.Env.controller.constructor !== App.Controllers.User.Rooms) { return false; } if (App.Env.action !== 'show') { return false; } return App.Env.controller.getView('show'); }; return NotificationCenter; })(); }).call(this); :ET
Version data entries
36 entries across 23 versions & 1 rubygems