-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to upload templates #403
Conversation
* Also "change template" now "select template" in file menu
* Checks for json extension, and shows error msg if needed * Other housekeeping copy/pasted from open file callback
lib/toolbar.html
Outdated
@@ -26,7 +38,7 @@ | |||
> | |||
<input | |||
type="file" | |||
accept=".xlsx,.xls,.tsv,.csv,.json" | |||
accept=".json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you were probably testing this - or maybe reusing? At any rate we need ".xlsx,.xls,.tsv,.csv," back in there - or else regular data files can't be loaded. A test data file is in the cancogen template folder under example input. Maybe this means a separate input for data load rather than template load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change should have been under upload template, but put it under open file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorting out the file load permitted file type input; vs template load input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm wondering what a purer solution looks like than "is_a dh_interface" but we can take it back to #338 . Any class can be displayed by DH more or less usefully. The menu system needs some kind of way to be cued about top-level-nice-DH-classes default that can be overridden though. |
Allow users to upload templates
Added upload template option in file menu
Load template fn now receives optional file arg, which should be an uploaded schema.json file.