Fix donwload subs for non youtube videos and non-en language - continue. Add acceptance tests. Add detetion of assets on request. Updated docstring. Add fixes and acceptance tests. Fix acceptance tests. Update docsrtings and cleanup code, resful for language_id. Specify exception type in POST. Fix url in upload module. Improve exception handling. Remove 'en' and catching in editable_metadata. Move descriptor.get_context test to lms tests. Add query parameter to translation dispatch. Response to format parameter of translatin GET request. Fix Acceprance test: Metadata Editor. move handlers to proper scores. Split video player into smaller files. Add ugettext and fix typoes. Add changelog. Support for downloading non-ascii filenames. Change event binding. Add content-language to download requests. Reractor POST handler to not update self.transcripts.
72 lines
2.4 KiB
HTML
72 lines
2.4 KiB
HTML
<%! from django.utils.translation import ugettext as _ %>
|
|
<%namespace name='static' file='../../static_content.html'/>
|
|
<%page args="tabName"/>
|
|
|
|
<%
|
|
import json
|
|
%>
|
|
|
|
## include js templates:
|
|
|
|
% for template_name in ["metadata-videolist-entry", "file-upload"]:
|
|
<script type="text/template" id="${template_name}">
|
|
<%static:include path="js/video/transcripts/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
|
|
% for template_name in ["transcripts-found", "transcripts-uploaded", "transcripts-use-existing", "transcripts-not-found", "transcripts-replace", "transcripts-import", "transcripts-choose"]:
|
|
<script type="text/template" id="${template_name}">
|
|
<%static:include path="js/video/transcripts/messages/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
% for template_name in ["metadata-translations-entry", "metadata-translations-item"]:
|
|
<script id="${template_name}" type="text/template">
|
|
<%static:include path="js/video/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
|
|
<div class="wrapper-comp-settings basic_metadata_edit" data-metadata='${json.dumps(transcripts_basic_tab_metadata) | h}'></div>
|
|
|
|
<script type="text/javascript">
|
|
require(
|
|
[
|
|
"domReady!",
|
|
"jquery",
|
|
"js/views/video/transcripts/editor"
|
|
],
|
|
|
|
function(doc, $, Editor) {
|
|
var transcripts = new Editor({
|
|
el: $('#editor-tab-${html_id}').find('.basic_metadata_edit')
|
|
}),
|
|
storage = TabsEditingDescriptor.getStorage();
|
|
|
|
TabsEditingDescriptor.Model.addModelUpdate(
|
|
'${html_id}',
|
|
'${tabName}',
|
|
function () {
|
|
// Advanced, Save
|
|
metadataEditor = storage.MetadataEditor;
|
|
|
|
if (metadataEditor) {
|
|
transcripts.syncAdvancedTab(metadataEditor.collection, metadataEditor);
|
|
}
|
|
}
|
|
);
|
|
|
|
TabsEditingDescriptor.Model.addOnSwitch(
|
|
'${html_id}',
|
|
'${tabName}',
|
|
function () {
|
|
// Basic
|
|
metadataEditor = storage.MetadataEditor;
|
|
|
|
if (metadataEditor) {
|
|
transcripts.syncBasicTab(metadataEditor.collection, metadataEditor);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
);
|
|
</script>
|