Skip to content

Instantly share code, notes, and snippets.

@nummi
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save nummi/45d0d4cd57d81000ba55 to your computer and use it in GitHub Desktop.

Select an option

Save nummi/45d0d4cd57d81000ba55 to your computer and use it in GitHub Desktop.
Tahi Overlay
import Ember from 'ember';
import OverlayComponent from 'tahi/pods/components/overlay/component';
export default OverlayComponent.extend({
fileUploadURL: '/files/important/',
importantFileIsUploaded: Ember.computed.notEmpty('model.file.src'),
actions: {
importantFileDidUpload: function(data) {
this.store.pushPayload('importantFile', data);
}
}
});
<h1>Some Important File</h1>
<tahi/fileuploader url={{fileUploadURL}}
done={{action "importantFileUploaded"}}></tahi/fileuploader>
{{#if importantFileIsUploaded}}
<tahi/question-radio task={{model}}
ident="file.personal_file"
question="<p>Is this your personal file?</p>">
<tahi/show-if-parent prop="selectedNo">
<tahi/question-input task={{model}}
ident="file.original_source"
question="Please provide the source of this file">
</tahi/show-if-parent>
</tahi/question-radio>
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment