diff options
author | Will <ifnspifn@gmail.com> | 2013-11-15 13:32:27 -0800 |
---|---|---|
committer | Will <ifnspifn@gmail.com> | 2013-11-15 15:36:55 -0800 |
commit | 2ca91aeee6715ce25bfc23eb68dc5b727cd2e41a (patch) | |
tree | b43b75c2378c2715fb75780b569892fb8c5ce4ab /wikipedia/models | |
parent | a18690dc897ea81adfb68ab41f77e088069583dd (diff) |
Domain specific apps no longer must specify links
Refactored the process of settings which articles should be linked
such that, if no linked articles JSON is specified, the view will
behave as if hide_links were set to true
[endlessm/eos-sdk#402]
Diffstat (limited to 'wikipedia/models')
-rw-r--r-- | wikipedia/models/domain_wiki_model.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wikipedia/models/domain_wiki_model.js b/wikipedia/models/domain_wiki_model.js index b5ced4e..ef41d3e 100644 --- a/wikipedia/models/domain_wiki_model.js +++ b/wikipedia/models/domain_wiki_model.js @@ -16,6 +16,7 @@ const DomainWikiModel = new Lang.Class({ _init: function(params) { this._articles = []; this._mainCategory = null; + this._linked_articles = undefined; this._categories = {}; this.parent(params); }, @@ -90,7 +91,10 @@ const DomainWikiModel = new Lang.Class({ }, getLinkedArticles:function(){ - return this._linked_articles; + if(this._linked_articles !== undefined) + return this._linked_articles["app_articles"].concat(this._linked_articles["extra_linked_articles"]); + else + return []; }, /** @@ -152,4 +156,4 @@ const DomainWikiModel = new Lang.Class({ getMainCategory: function () { return this._mainCategory; } -});
\ No newline at end of file +}); |