diff options
author | Rory MacQueen <rory@endlessm.com> | 2013-07-26 18:24:41 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2013-07-26 18:24:41 -0700 |
commit | 4c3634f241f3b112e6fd58ad9361b6b5a84fc960 (patch) | |
tree | 85173eaaa93360ed6cf26c9d0ac942140e3de34f | |
parent | 6fca9c7919b7198c24ae8cc8e1afda10e499b279 (diff) |
Removed unnecessary code
-rw-r--r-- | wikipedia/src/endless_wikipedia/PrebuiltWikipediaApplication.js | 41 | ||||
-rw-r--r-- | wikipedia/src/endless_wikipedia/WikipediaApplication.js | 37 | ||||
-rw-r--r-- | wikipedia/src/models/domain_wiki_model.js | 8 |
3 files changed, 0 insertions, 86 deletions
diff --git a/wikipedia/src/endless_wikipedia/PrebuiltWikipediaApplication.js b/wikipedia/src/endless_wikipedia/PrebuiltWikipediaApplication.js index 3486919..3aa4a3c 100644 --- a/wikipedia/src/endless_wikipedia/PrebuiltWikipediaApplication.js +++ b/wikipedia/src/endless_wikipedia/PrebuiltWikipediaApplication.js @@ -26,47 +26,6 @@ const PrebuiltWikipediaApplication = new Lang.Class({ let filename = this.application_uri; this._domain_wiki_presenter = new DomainWikiPresenter.DomainWikiPresenter(this._domain_wiki_model, this._domain_wiki_view, filename); - this._domain_wiki_view.set_categories(categories); - - this._domain_wiki_view.connect('category-chosen', Lang.bind(this, this._onCategoryClicked)); - this._domain_wiki_view.connect('article-chosen', Lang.bind(this, this._onArticleClicked)); - //this._view = new WikipediaView.WikipediaView(this); - }, - - _onCategoryClicked: function(page, title, index) { - this._current_category = index; - let category = this._domain_wiki_model.getCategories()[index]; - let articles = this._domain_wiki_model.getArticlesForCategoryIndex(index); - - let titles = new Array(); - for(let i = 0; i < articles.length; i++){ - titles.push(articles[i].title); - } - - this._domain_wiki_view.set_category_info(category, titles); - - this._domain_wiki_view.transition_page(Endless.PageManagerTransitionType.SLIDE_LEFT, 'category'); - - }, - - _onArticleClicked: function(article_list, title, index) { - // Need to know which category this came from!! - //this._article_view.title = title; - //this._article_view.article_uri = uri; - let articles = this._domain_wiki_model.getArticlesForCategoryIndex(this._current_category); - this._domain_wiki_view.set_article_info(articles[index]); - this._domain_wiki_view.transition_page(Endless.PageManagerTransitionType.SLIDE_LEFT, 'article'); - - }, - - _onCategoryBackClicked: function(button) { - this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_RIGHT; - this._window.page_manager.visible_page_name = 'front'; - }, - - _onArticleBackClicked: function(button) { - this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_RIGHT; - this._window.page_manager.visible_page_name = 'category'; } }); diff --git a/wikipedia/src/endless_wikipedia/WikipediaApplication.js b/wikipedia/src/endless_wikipedia/WikipediaApplication.js index faac464..dbf0554 100644 --- a/wikipedia/src/endless_wikipedia/WikipediaApplication.js +++ b/wikipedia/src/endless_wikipedia/WikipediaApplication.js @@ -31,22 +31,6 @@ const WikipediaApplication = new Lang.Class({ this.parent(props); }, - // PROPERTIES - - get categories_uri() { - return this._categories_uri; - }, - - set categories_uri(value) { - this._application_uri = value; - }, - - get application_name() { - if(this._categories) - return this._categories.app_name; - return undefined; - }, - // VIRTUAL FUNCTIONS vfunc_startup: function() { @@ -61,27 +45,6 @@ const WikipediaApplication = new Lang.Class({ let css_file = Gio.File.new_for_uri('resource:///com/endlessm/brazil/css/endless_brazil.css') provider.load_from_file(css_file); Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - }, - - // PUBLIC API - - getCategories: function() { - let category_list = this._categories.categories.map(function(element, index, obj) { - return { - title: element.category_name, - image_uri: element.image_uri, - content: element.content_text - }; - }) - return category_list; - }, - - getArticlesForCategory: function(category_title) { - //... - }, - - getArticlesForCategoryIndex: function(index) { - return this._categories.categories[index].articles; } }); diff --git a/wikipedia/src/models/domain_wiki_model.js b/wikipedia/src/models/domain_wiki_model.js index 4188c2c..c838361 100644 --- a/wikipedia/src/models/domain_wiki_model.js +++ b/wikipedia/src/models/domain_wiki_model.js @@ -44,13 +44,5 @@ const DomainWikiModel = new Lang.Class({ getCategories: function() { return this._categories; - }, - - get application_name(){ - return this._application_name; - }, - - get image_uri(){ - return this._image_uri; } });
\ No newline at end of file |