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
c3e1d592
Commit
c3e1d592
authored
Jul 12, 2017
by
M. Rehan
Committed by
GitHub
Jul 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15528 from edx/mrehan/fix-noisy-ajax-captions
Dont fetch captions while fetching translations
parents
d8133c3a
c9bbc0b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
+0
-2
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+2
-4
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
View file @
c3e1d592
...
@@ -779,7 +779,6 @@
...
@@ -779,7 +779,6 @@
Caption
.
fetchAvailableTranslations
();
Caption
.
fetchAvailableTranslations
();
expect
(
$
.
ajaxWithPrefix
).
toHaveBeenCalled
();
expect
(
$
.
ajaxWithPrefix
).
toHaveBeenCalled
();
expect
(
Caption
.
fetchCaption
).
toHaveBeenCalled
();
expect
(
state
.
config
.
transcriptLanguages
).
toEqual
({
expect
(
state
.
config
.
transcriptLanguages
).
toEqual
({
'uk'
:
'Ukrainian'
,
'uk'
:
'Ukrainian'
,
'de'
:
'German'
'de'
:
'German'
...
@@ -799,7 +798,6 @@
...
@@ -799,7 +798,6 @@
Caption
.
fetchAvailableTranslations
();
Caption
.
fetchAvailableTranslations
();
expect
(
$
.
ajaxWithPrefix
).
toHaveBeenCalled
();
expect
(
$
.
ajaxWithPrefix
).
toHaveBeenCalled
();
expect
(
Caption
.
fetchCaption
).
not
.
toHaveBeenCalled
();
expect
(
state
.
config
.
transcriptLanguages
).
toEqual
({});
expect
(
state
.
config
.
transcriptLanguages
).
toEqual
({});
expect
(
Caption
.
renderLanguageMenu
).
not
.
toHaveBeenCalled
();
expect
(
Caption
.
renderLanguageMenu
).
not
.
toHaveBeenCalled
();
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
c3e1d592
...
@@ -596,8 +596,8 @@
...
@@ -596,8 +596,8 @@
},
},
/**
/**
* @desc Fetch the list of available
translations. Upon successful receipt,
* @desc Fetch the list of available
language codes. Upon successful receipt
*
the list of available translation
s will be updated.
*
the list of available language
s will be updated.
*
*
* @returns {jquery Promise}
* @returns {jquery Promise}
*/
*/
...
@@ -618,8 +618,6 @@
...
@@ -618,8 +618,6 @@
self
.
container
.
find
(
'.langs-list'
).
remove
();
self
.
container
.
find
(
'.langs-list'
).
remove
();
if
(
_
.
keys
(
newLanguages
).
length
)
{
if
(
_
.
keys
(
newLanguages
).
length
)
{
// And try again to fetch transcript.
self
.
fetchCaption
();
self
.
renderLanguageMenu
(
newLanguages
);
self
.
renderLanguageMenu
(
newLanguages
);
}
}
},
},
...
...
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