Sha256: 61e029356cc76e7cbbb5fffa84a7ff4ced0862da6e362bda99fae2eede3f53d6
Contents?: true
Size: 1.7 KB
Versions: 60
Compression:
Stored size: 1.7 KB
Contents
I"Â(function() { var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; App.Controllers.Main.Pages = (function(superClass) { extend(Pages, superClass); function Pages() { return Pages.__super__.constructor.apply(this, arguments); } Pages.prototype.index = function() { this.view = new App.Views.Main.Pages.ArticleList; this.view.render(); this.connectWith([App.Models.Article, App.Models.Article.Comment]); return App.Models.Article.get('all', { page: 1 }).then((function(_this) { return function(resp) { return _this.view.renderArticles(resp.resources); }; })(this)); }; Pages.prototype.receivedSignal = function(signal, data) { switch (signal) { case 'Article published': return App.Models.Article.find({ id: data.id, abbr: true }).then((function(_this) { return function(article) { return _this.view.renderNewArticle(article); }; })(this)); case 'Article updated': return this.view.updateArticle(data.id); case 'Article.Comment created': return this.view.commentsQuantityChangedForArticle(data.article_id, 1); case 'Article.Comment destroyed': return this.view.commentsQuantityChangedForArticle(data.article_id, -1); } }; return Pages; })(App.Controllers.Base); }).call(this); :ET
Version data entries
60 entries across 27 versions & 1 rubygems