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
d6049239
Commit
d6049239
authored
Jun 28, 2014
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4217 from louyihua/master
Fix saving error of video editor with non-english translations
parents
4c717ee3
7555c6ec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
cms/templates/widgets/tabs-aggregator.html
+1
-1
common/lib/xmodule/xmodule/js/fixtures/tabs-edit.html
+3
-3
common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee
+3
-3
No files found.
cms/templates/widgets/tabs-aggregator.html
View file @
d6049239
...
...
@@ -5,7 +5,7 @@
<span
class=
"component-name"
></span>
<ul
class=
"${'editor-tabs' if (len(tabs) != 1) else 'editor-single-tab-name' }"
>
% for tab in tabs:
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-${html_id}-${loop.index}"
class=
"tab ${'current' if tab.get('current', False) else ''}"
>
${_(tab['name'])}
</a></li>
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-${html_id}-${loop.index}"
class=
"tab ${'current' if tab.get('current', False) else ''}"
data-tab_name=
"${tab['name']}"
>
${_(tab['name'])}
</a></li>
% endfor
</ul>
</div>
...
...
common/lib/xmodule/xmodule/js/fixtures/tabs-edit.html
View file @
d6049239
...
...
@@ -11,9 +11,9 @@
<div
class=
"wrapper-comp-editor"
id=
"editor-tab-id"
data-html_id=
'test_id'
>
<div
class=
"edit-header"
>
<ul
class=
"editor-tabs"
>
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-0"
class=
"tab"
>
Tab 0 Editor
</a></li>
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-1"
class=
"tab"
>
Tab 1 Transcripts
</a></li>
<li
class=
"inner_tab_wrap"
id=
"settings"
><a
href=
"#tab-2"
class=
"tab"
>
Tab 2 Settings
</a></li>
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-0"
class=
"tab"
data-tab_name=
"Tab 0 Editor"
>
(Tab 0 Editor)
</a></li>
<li
class=
"inner_tab_wrap"
><a
href=
"#tab-1"
class=
"tab"
data-tab_name=
"Tab 1 Transcripts"
>
(Tab 1 Transcripts)
</a></li>
<li
class=
"inner_tab_wrap"
id=
"settings"
><a
href=
"#tab-2"
class=
"tab"
data-tab_name=
"Tab 2 Settings"
>
(Tab 2 Settings)
</a></li>
</ul>
</div>
<div
class=
"tabs-wrapper"
>
...
...
common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee
View file @
d6049239
...
...
@@ -32,7 +32,7 @@ class @TabsEditingDescriptor
@
$tabs
.
each
(
(
index
,
value
)
->
if
$
(
value
).
hasClass
(
'current'
)
previousTab
=
$
(
value
).
html
(
)
previousTab
=
$
(
value
).
data
(
'tab_name'
)
)
# init and save data from previous tab
...
...
@@ -42,7 +42,7 @@ class @TabsEditingDescriptor
# (to be implemented when there is a use case for this functionality)
# call onswitch
onSwitchFunction
=
TabsEditingDescriptor
.
Model
.
modules
[
@
html_id
].
tabSwitch
[
$currentTarget
.
text
(
)]
onSwitchFunction
=
TabsEditingDescriptor
.
Model
.
modules
[
@
html_id
].
tabSwitch
[
$currentTarget
.
data
(
'tab_name'
)]
onSwitchFunction
()
if
$
.
isFunction
(
onSwitchFunction
)
@
$tabs
.
removeClass
(
'current'
)
...
...
@@ -59,7 +59,7 @@ class @TabsEditingDescriptor
save
:
->
@
element
.
off
(
'click'
,
'.editor-tabs .tab'
,
@
onSwitchEditor
)
current_tab
=
@
$tabs
.
filter
(
'.current'
).
html
(
)
current_tab
=
@
$tabs
.
filter
(
'.current'
).
data
(
'tab_name'
)
data
:
TabsEditingDescriptor
.
Model
.
getValue
(
@
html_id
,
current_tab
)
setMetadataEditor
:
(
metadataEditor
)
->
...
...
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