diff --git a/app/assets/javascripts/avalon_progress.js.coffee b/app/assets/javascripts/avalon_progress.js.coffee index b922eb4aa6..455168601a 100644 --- a/app/assets/javascripts/avalon_progress.js.coffee +++ b/app/assets/javascripts/avalon_progress.js.coffee @@ -37,8 +37,9 @@ class AvalonProgress sections = $('a[data-segment]') sections.each (i,sec) => id = $(sec).data('segment') - bar = $(sec).closest('.panel-title').find('span.progress') - info_box = $(sec).next('div.alert') + section_node = $(sec).closest('.panel-title') + bar = section_node.find('span.progress') + info_box = section_node.find('div.alert') info = @data[id] diff --git a/app/helpers/media_objects_helper.rb b/app/helpers/media_objects_helper.rb index daef85bdfb..fd2f13d383 100644 --- a/app/helpers/media_objects_helper.rb +++ b/app/helpers/media_objects_helper.rb @@ -155,7 +155,7 @@ def structure_html section, index, show_progress if section.structuralMetadata.empty? label = "#{index+1}. #{stream_label_for(section)} #{duration}".html_safe link = link_to label, share_link_for( section ), data: data, class: 'playable wrap' + (current ? ' current-stream current-section' : '') - return "#{headeropen}#{headerclose}" + return "#{headeropen}#{headerclose}" end sectionnode = section.structuralMetadata.xpath('//Item') @@ -224,7 +224,7 @@ def parse_node section, node, tracknumber url = "#{share_link_for( section )}?t=#{start},#{stop}" data = {segment: section.id, is_video: section.is_video?, native_url: native_url, fragmentbegin: start, fragmentend: stop} link = link_to label, url, data: data, class: 'playable wrap'+(is_current_section?(section) ? ' current-stream' : '' ) - return "
  • #{link}
  • ", tracknumber + return "
  • #{link}
  • ", tracknumber end end