Commit 5658e6bc by polesye

Merge pull request #868 from edx/hotfix/lose_header_bug

Fix bug when editing video causes other components to lose their header
parents 08168ec6 d93215c0
<div class="base_wrapper"> <div class="component-editor">
<section class="editor-with-tabs"> <div class="base_wrapper">
<div class="wrapper-comp-editor" id="editor-tab-id" data-html_id='test_id'> <section class="editor-with-tabs">
<div class="edit-header"> <div class="wrapper-comp-editor" id="editor-tab-id" data-html_id='test_id'>
<ul class="editor-tabs"> <div class="edit-header">
<li class="inner_tab_wrap"><a href="#tab-0" class="tab">Tab 0 Editor</a></li> <ul class="editor-tabs">
<li class="inner_tab_wrap"><a href="#tab-1" class="tab">Tab 1 Transcripts</a></li> <li class="inner_tab_wrap"><a href="#tab-0" class="tab">Tab 0 Editor</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-1" class="tab">Tab 1 Transcripts</a></li>
</ul> <li class="inner_tab_wrap" id="settings"><a href="#tab-2" class="tab">Tab 2 Settings</a></li>
</div> </ul>
<div class="tabs-wrapper"> </div>
<div class="component-tab" id="tab-0"> <div class="tabs-wrapper">
<textarea name="" class="edit-box">XML Editor Text</textarea> <div class="component-tab" id="tab-0">
<textarea name="" class="edit-box">XML Editor Text</textarea>
</div>
<div class="component-tab" id="tab-1">
Transcripts
</div>
<div class="component-tab" id="tab-2">
Subtitles
</div>
</div> </div>
<div class="component-tab" id="tab-1"> <div class="wrapper-comp-settings">
Transcripts <ul>
<li id="editor-mode"><a>Editor</a></li>
<li id="settings-mode"><a>Settings</a></li>
</ul>
</div> </div>
<div class="component-tab" id="tab-2">
Subtitles
</div>
</div>
<div class="wrapper-comp-settings">
<ul>
<li id="editor-mode"><a>Editor</a></li>
<li id="settings-mode"><a>Settings</a></li>
</ul>
</div> </div>
</div> </section>
</section>
<div class="component-edit-header" style="display: block"/> <div class="component-edit-header" style="display: block"/>
</div>
</div> </div>
...@@ -65,7 +65,7 @@ describe "TabsEditingDescriptor", -> ...@@ -65,7 +65,7 @@ describe "TabsEditingDescriptor", ->
describe "editor/settings header", -> describe "editor/settings header", ->
it "is hidden", -> it "is hidden", ->
expect(@descriptor.element.find(".component-edit-header").css('display')).toEqual('none') expect(@descriptor.element.closest(".component-editor").find(".component-edit-header")).toBeHidden()
describe "TabsEditingDescriptor special save cases", -> describe "TabsEditingDescriptor special save cases", ->
beforeEach -> beforeEach ->
......
...@@ -9,7 +9,7 @@ class @TabsEditingDescriptor ...@@ -9,7 +9,7 @@ class @TabsEditingDescriptor
### ###
# hide editor/settings bar # hide editor/settings bar
$('.component-edit-header').hide() @element.closest('.component-editor').find('.component-edit-header').hide()
@$tabs = $(".tab", @element) @$tabs = $(".tab", @element)
@$content = $(".component-tab", @element) @$content = $(".component-tab", @element)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment