Files
edx-platform/cms/templates/widgets/tabs-aggregator.html
louyihua 7555c6ec0c Fix saving error of video editor in non-english translation
Currently the code in ```tabs-aggregator.coffee``` uses the display name of a tab as the key to index the current tab. When a non-english translation is applied, the javascript code will get localized names instead of the original english names, which causes the following ```getValue``` function fails as it cannot reference the correct tab.
Use the 'data' attribute to store the original tab name.
2014-06-27 14:08:44 +08:00

22 lines
952 B
HTML

<%! from django.utils.translation import ugettext as _ %>
<div class="wrapper-comp-editor" id="editor-tab-${html_id}" data-html_id="${html_id}">
<section class="editor-with-tabs">
<div class="edit-header">
<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 ''}" data-tab_name="${tab['name']}">${_(tab['name'])}</a></li>
% endfor
</ul>
</div>
<div class="tabs-wrapper">
% for tab in tabs:
<div class="component-tab ${'is-inactive' if not tab.get('current', False) else ''}" id="tab-${html_id}-${loop.index}" >
<%include file="${tab['template']}" args="tabName=tab['name']"/>
</div>
% endfor
</div>
</section>
</div>