summaryrefslogtreecommitdiff
path: root/wikipedia/presenters
diff options
context:
space:
mode:
authorWill <ifnspifn@gmail.com>2013-11-15 13:32:27 -0800
committerWill <ifnspifn@gmail.com>2013-11-15 15:36:55 -0800
commit2ca91aeee6715ce25bfc23eb68dc5b727cd2e41a (patch)
treeb43b75c2378c2715fb75780b569892fb8c5ce4ab /wikipedia/presenters
parenta18690dc897ea81adfb68ab41f77e088069583dd (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/presenters')
-rw-r--r--wikipedia/presenters/domain_wiki_presenter.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/wikipedia/presenters/domain_wiki_presenter.js b/wikipedia/presenters/domain_wiki_presenter.js
index 3e59a01..b348825 100644
--- a/wikipedia/presenters/domain_wiki_presenter.js
+++ b/wikipedia/presenters/domain_wiki_presenter.js
@@ -42,14 +42,15 @@ const DomainWikiPresenter = new Lang.Class({
Lang.bind(this, this._onArticleBackClicked));
this.initAppInfoFromJsonFile(app_filename);
- this.initPageRankFromJsonFile(linked_articles_filename);
+
+ if(linked_articles_filename !== '')
+ this.initPageRankFromJsonFile(linked_articles_filename);
let firstLevel = this._model.getMainCategory().getSubcategories();
firstLevel.push(this._model.getMainCategory());
this._view.set_categories(firstLevel);
- let linked_articles = this._model.getLinkedArticles();
- let to_show = linked_articles["app_articles"].concat(linked_articles["extra_linked_articles"]);
+ let to_show = this._model.getLinkedArticles();
this._view.set_showable_links(to_show);
let app_name = _pathnameToAppName(app_filename);
@@ -94,4 +95,4 @@ const DomainWikiPresenter = new Lang.Class({
_onArticleBackClicked: function(button) {
this._view.show_category_page();
}
-}); \ No newline at end of file
+});