From 6d4c07385f6b1afd0c390f87b3172a941bec3e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 21 Aug 2015 21:06:47 +0200 Subject: [PATCH] FIX: smoke test :fired: --- .../components/category-group.js.es6 | 2 +- .../controllers/upload-selector.js.es6 | 21 +++++------------- .../templates/modal/upload_selector.hbs | 22 +++++++++---------- spec/phantom_js/smoke_test.js | 10 ++++----- 4 files changed, 21 insertions(+), 34 deletions(-) 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 @@