diff --git a/app/assets/javascripts/discourse/components/category-group.js.es6 b/app/assets/javascripts/discourse/components/category-group.js.es6 index e81fa5d1d..887e4ad7b 100644 --- a/app/assets/javascripts/discourse/components/category-group.js.es6 +++ b/app/assets/javascripts/discourse/components/category-group.js.es6 @@ -31,6 +31,6 @@ export default Ember.Component.extend({ return categoryBadgeHTML(category, {allowUncategorized: true}); } }); - }.on('didInsertElement'), + }.on('didInsertElement') }); diff --git a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 index 2857b2a5c..f0a7d67fc 100644 --- a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 +++ b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 @@ -1,25 +1,14 @@ import ModalFunctionality from 'discourse/mixins/modal-functionality'; -import { setting } from 'discourse/lib/computed'; export default Ember.Controller.extend(ModalFunctionality, { - remote: Em.computed.not("local"), - local: false, showMore: false, - - _initialize: function() { - this.setProperties({ - local: this.get("allowLocal"), - showMore: false - }); - }.on('init'), - - maxSize: setting('max_attachment_size_kb'), - allowLocal: Em.computed.gt('maxSize', 0), + local: true, + remote: Ember.computed.not("local"), actions: { - useLocal: function() { this.setProperties({ local: true, showMore: false}); }, - useRemote: function() { this.set("local", false); }, - toggleShowMore: function() { this.toggleProperty("showMore"); } + useLocal() { this.setProperties({ local: true, showMore: false}); }, + useRemote() { this.set("local", false); }, + toggleShowMore() { this.toggleProperty("showMore"); } } }); diff --git a/app/assets/javascripts/discourse/templates/modal/upload_selector.hbs b/app/assets/javascripts/discourse/templates/modal/upload_selector.hbs index 4423fe5f7..254e02648 100644 --- a/app/assets/javascripts/discourse/templates/modal/upload_selector.hbs +++ b/app/assets/javascripts/discourse/templates/modal/upload_selector.hbs @@ -1,16 +1,14 @@