diff --git a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 index 37078d492..ebda2c04a 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 @@ -3,7 +3,7 @@ import DiscoveryController from 'discourse/controllers/discovery'; export default DiscoveryController.extend({ needs: ['modal', 'discovery'], - withLogo: Em.computed.filterBy('categories', 'logo_url'), + withLogo: Em.computed.filterBy('model.categories', 'logo_url'), showPostsColumn: Em.computed.empty('withLogo'), actions: { @@ -35,7 +35,7 @@ export default DiscoveryController.extend({ }.property(), latestTopicOnly: function() { - return this.get('categories').find(function(c) { return c.get('featuredTopics.length') > 1; }) === undefined; - }.property('categories.@each.featuredTopics.length') + return this.get('model.categories').find(function(c) { return c.get('featuredTopics.length') > 1; }) === undefined; + }.property('model.categories.@each.featuredTopics.length') }); diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 index 462f87439..15c8d66c2 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 @@ -14,6 +14,7 @@ var controllerOpts = { order: 'default', ascending: false, expandGloballyPinned: false, + expandAllPinned: false, actions: { @@ -86,12 +87,12 @@ var controllerOpts = { }, showDismissRead: function() { - return this.isFilterPage(this.get('filter'), 'unread') && this.get('topics.length') > 0; - }.property('filter', 'topics.length'), + return this.isFilterPage(this.get('model.filter'), 'unread') && this.get('model.topics.length') > 0; + }.property('model.filter', 'model.topics.length'), showResetNew: function() { - return this.get('filter') === 'new' && this.get('topics.length') > 0; - }.property('filter', 'topics.length'), + return this.get('model.filter') === 'new' && this.get('model.topics.length') > 0; + }.property('model.filter', 'model.topics.length'), showDismissAtTop: function() { return (this.isFilterPage(this.get('model.filter'), 'new') || @@ -117,7 +118,7 @@ var controllerOpts = { return I18n.t('topics.bottom.category', {category: category.get('name')}); } else { var split = (this.get('model.filter') || '').split('/'); - if (this.get('topics.length') === 0) { + if (this.get('model.topics.length') === 0) { return I18n.t("topics.none." + split[0], { category: split[1] }); @@ -127,19 +128,19 @@ var controllerOpts = { }); } } - }.property('allLoaded', 'topics.length'), + }.property('allLoaded', 'model.topics.length'), footerEducation: function() { - if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return; } + if (!this.get('allLoaded') || this.get('model.topics.length') > 0 || !Discourse.User.current()) { return; } - var split = (this.get('filter') || '').split('/'); + var split = (this.get('model.filter') || '').split('/'); if (split[0] !== 'new' && split[0] !== 'unread') { return; } return I18n.t("topics.none.educate." + split[0], { userPrefsUrl: Discourse.getURL("/users/") + (Discourse.User.currentProp("username_lower")) + "/preferences" }); - }.property('allLoaded', 'topics.length'), + }.property('allLoaded', 'model.topics.length'), loadMoreTopics() { return this.get('model').loadMore(); diff --git a/app/assets/javascripts/discourse/helpers/border-color.js.es6 b/app/assets/javascripts/discourse/helpers/border-color.js.es6 new file mode 100644 index 000000000..eda61b6ae --- /dev/null +++ b/app/assets/javascripts/discourse/helpers/border-color.js.es6 @@ -0,0 +1,4 @@ +export default Ember.Handlebars.makeBoundHelper(function(value) { + return ("border-color: #" + value).htmlSafe(); +}); + diff --git a/app/assets/javascripts/discourse/models/topic-list.js.es6 b/app/assets/javascripts/discourse/models/topic-list.js.es6 index c4d77f050..7f158b924 100644 --- a/app/assets/javascripts/discourse/models/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/models/topic-list.js.es6 @@ -41,7 +41,7 @@ const TopicList = RestModel.extend({ refreshSort: function(order, ascending) { const self = this, - params = this.get('params'); + params = this.get('params') || {}; params.order = order || params.order; diff --git a/app/assets/javascripts/discourse/templates/discovery/categories.hbs b/app/assets/javascripts/discourse/templates/discovery/categories.hbs index 3fdfdafd9..0aa789da0 100644 --- a/app/assets/javascripts/discourse/templates/discovery/categories.hbs +++ b/app/assets/javascripts/discourse/templates/discovery/categories.hbs @@ -1,4 +1,4 @@ -{{#if categories}} +{{#if model.categories}}
+ |
{{category-title-link category=c}}
diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.hbs b/app/assets/javascripts/discourse/templates/discovery/topics.hbs
index ce943932d..7a1e637fc 100644
--- a/app/assets/javascripts/discourse/templates/discovery/topics.hbs
+++ b/app/assets/javascripts/discourse/templates/discovery/topics.hbs
@@ -45,7 +45,7 @@
bulkSelectEnabled=bulkSelectEnabled
selected=selected
expandGloballyPinned=expandGloballyPinned
- expandAllPinned=model.expandAllPinned
+ expandAllPinned=expandAllPinned
topics=model.topics}}
{{/if}}
@@ -67,7 +67,7 @@
{{footerMessage}} - {{#if can_create_topic}}{{i18n 'topic.suggest_create_topic'}}{{/if}} + {{#if model.can_create_topic}}{{i18n 'topic.suggest_create_topic'}}{{/if}}{{else}} {{#if top}} diff --git a/vendor/assets/javascripts/ember.debug.js b/vendor/assets/javascripts/ember.debug.js index fc731e966..7cb4c446a 100644 --- a/vendor/assets/javascripts/ember.debug.js +++ b/vendor/assets/javascripts/ember.debug.js @@ -26892,17 +26892,7 @@ enifed('ember-runtime/controllers/object_controller', ['exports', 'ember-metal/c @uses Ember.ControllerMixin @deprecated **/ - exports['default'] = ObjectProxy['default'].extend(ControllerMixin['default'], { - init: function() { - this._super(); - - Ember['default'].deprecate(objectControllerDeprecation, this.isGenerated, { - url: 'http://emberjs.com/guides/deprecations/#toc_objectcontroller' - }); - } - }); - - exports.objectControllerDeprecation = objectControllerDeprecation; + exports['default'] = ObjectProxy['default'].extend(ControllerMixin['default']); }); enifed('ember-runtime/copy', ['exports', 'ember-metal/enumerable_utils', 'ember-metal/utils', 'ember-runtime/system/object', 'ember-runtime/mixins/copyable'], function (exports, enumerable_utils, utils, EmberObject, Copyable) { @@ -49407,4 +49397,4 @@ enifed("rsvp/utils", }); requireModule("ember"); -})(); \ No newline at end of file +})(); |