Skip to content
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

Add ability to upload image handouts #254

Merged
merged 5 commits into from
Jul 13, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,14 @@ function createTranscriptBlock(langCode, langLabel, transcriptsValue, downloadTr
*/
function clickUploader(event, $fileUploader) {
'use strict';
var handoutsAllowedFileTypes = '.png, .jpeg, .jpg, .gif, .tiff';
Copy link

@z4y4ts z4y4ts Jul 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check what types stock open edx video xmodule supports.
I'm certain this list should include .pdf, and maybe some more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var $buttonBlock = $(event.currentTarget);
var indexOfParentLi = $('.language-transcript-selector').children().index($buttonBlock.closest('li'));
var langCode = $buttonBlock.attr('data-lang-code');
var langLabel = $buttonBlock.attr('data-lang-label');
var fieldNameDetails = $buttonBlock.attr('data-change-field-name') === 'transcripts' ? '.srt, .vtt' : '';
var fieldNameDetails = $buttonBlock.attr('data-change-field-name') === 'transcripts'
? '.srt, .vtt'
: handoutsAllowedFileTypes;
var fieldName = $buttonBlock.attr('data-change-field-name');
var dataLiIndex = $buttonBlock.attr('data-change-field-name') === 'transcripts' ? indexOfParentLi : '';
event.preventDefault();
Expand Down