From fbc06d044ff40774620d15460e518434db847e70 Mon Sep 17 00:00:00 2001 From: riking Date: Sat, 16 May 2015 20:33:31 -0700 Subject: [PATCH] Use .dcstylejson instead of .dcstyle.json --- .../discourse/components/json-file-uploader.js.es6 | 4 ++++ .../discourse/templates/components/json-file-uploader.hbs | 2 +- .../discourse/templates/modal/upload-customization.hbs | 2 +- app/controllers/admin/site_customizations_controller.rb | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 b/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 index 954d5f8d2ae..250260dc483 100644 --- a/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 @@ -32,6 +32,10 @@ export default Em.Component.extend({ }.on('didInsertElement'), + accept: function() { + return ".json,application/json" + (this.get('extension') ? "," + this.get('extension') : ""); + }.property('extension'), + setReady: function() { let parsed; try { diff --git a/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs b/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs index 655e3f7340d..fba3461c547 100644 --- a/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs @@ -1,5 +1,5 @@
- + {{d-button class="fileSelect" action="selectFile" class="" icon="upload" label="upload_selector.select_file"}} {{conditional-loading-spinner condition=loading size="small"}}
diff --git a/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs b/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs index 8cc7851b3f3..3e49a755e5a 100644 --- a/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs +++ b/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs @@ -1,6 +1,6 @@