Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
ba5f337f
Commit
ba5f337f
authored
Oct 23, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug. Add validation to HTML5 sources field.
parent
aecc20af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
cms/static/js/views/transcripts/editor.js
+12
-4
cms/static/js/views/transcripts/utils.js
+0
-2
No files found.
cms/static/js/views/transcripts/editor.js
View file @
ba5f337f
...
...
@@ -110,11 +110,19 @@ function($, Backbone, _, Utils, MetadataView, MetadataCollection) {
// Get values from `Advanced` tab fields (`html5_sources`,
// `youtube_id_1_0`) that should be synchronized.
values
.
html5Sources
=
getField
(
metadataCollection
,
'html5_sources'
)
.
getDisplayValue
();
html5Sources
=
getField
(
metadataCollection
,
'html5_sources'
)
.
getDisplayValue
();
values
.
youtube
=
getField
(
metadataCollection
,
'youtube_id_1_0'
)
.
getDisplayValue
();
values
.
html5Sources
=
_
.
filter
(
html5Sources
,
function
(
value
)
{
var
link
=
Utils
.
parseLink
(
value
),
mode
=
link
&&
link
.
mode
;
return
mode
===
'html5'
&&
mode
;
});
values
.
youtube
=
getField
(
metadataCollection
,
'youtube_id_1_0'
)
.
getDisplayValue
();
// The length of youtube video_id should be 11 characters.
if
(
values
.
youtube
.
length
===
11
)
{
...
...
cms/static/js/views/transcripts/utils.js
View file @
ba5f337f
...
...
@@ -317,8 +317,6 @@ define(["jquery", "underscore", "jquery.ajaxQueue"], function($, _) {
return
function
(
action
,
component_id
,
videoList
,
extraParams
)
{
var
params
,
data
;
console
.
log
(
'[_command]: arguments = '
,
arguments
);
if
(
extraParams
)
{
if
(
$
.
isPlainObject
(
extraParams
))
{
params
=
extraParams
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment