Use .dcstylejson instead of .dcstyle.json
This commit is contained in:
parent
291d9fc65e
commit
fbc06d044f
|
@ -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 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="jsfu-file">
|
||||
<input id="js-file-input" type="file" style="display:none;" accept=".json,application/json">
|
||||
<input id="js-file-input" type="file" style="display:none;" accept={{accept}}>
|
||||
{{d-button class="fileSelect" action="selectFile" class="" icon="upload" label="upload_selector.select_file"}}
|
||||
{{conditional-loading-spinner condition=loading size="small"}}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<form {{action "dummy" on="submit"}}>
|
||||
<div class='modal-body'>
|
||||
{{json-file-uploader value=customizationFile}}
|
||||
{{json-file-uploader value=customizationFile extension=".dcstylejson"}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{d-button class='btn-primary' action='createCustomization' type='submit' disabled=notReady icon="plus" label='admin.customize.import'}}
|
||||
|
|
|
@ -62,7 +62,7 @@ class Admin::SiteCustomizationsController < Admin::AdminController
|
|||
format.any(:html, :text) do
|
||||
raise RenderEmpty.new if request.xhr?
|
||||
|
||||
response.headers['Content-Disposition'] = "attachment; filename=#{@site_customization.name.parameterize}.dcstyle.json"
|
||||
response.headers['Content-Disposition'] = "attachment; filename=#{@site_customization.name.parameterize}.dcstylejson"
|
||||
response.sending_file = true
|
||||
render json: SiteCustomizationSerializer.new(@site_customization)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue