- @page_title = "#{t(@game.name)} ##{@script_level.try(:game_chapter) || @level.level_num} "

= render partial: "levels/blockly", locals: { app: @game.app }

.reference_area
  - if @videos && !@videos.empty?
    %h5
      %span.help_text Need help?
      %span Checkout these videos and hints.
    = render partial: 'levels/video', collection: @videos
  - if can? :edit, @level
    %br/
    #{link_to 'edit', edit_game_level_path(@game, @level)} / #{ link_to 'stats', level_stats_path(@level) }

.modal.fade#video_player{ style: 'display:none;'}
  .modal-header
    %a.close{'data-dismiss' => "modal"} &#X2297;
    %h3#video_title Modal Header
  .modal-body
    %iframe#video_iframe{ name: 'testname', width: "100%", height: '500px', frameborder: 1, scrolling: 'no', marginwidth: 0, marginheight: 0}
  -#.modal-footer
  -#  %a.close{'data-dismiss' => "modal"} Close


- if @autoplay_video && !mobile?
  :javascript
    initialize_video_popup('#{@autoplay_video.youtube_code}', '#{@autoplay_video.name}');

:javascript
  $('#video_player').on('hidden', function () {
    $('#video_iframe')[0].src = null;
  });

- @page_title = "#{t(@game.name)} ##{@script_level.try(:game_chapter) || @level.level_num} "

= render partial: "levels/blockly", locals: { app: @game.app }

.reference_area
  - if @videos && !@videos.empty?
    %h5
      %span.help_text Need help?
      %span Checkout these videos and hints.
    = render partial: 'levels/video', collection: @videos
  - if can? :edit, @level
    %br/
    #{link_to 'edit', edit_game_level_path(@game, @level)} / #{ link_to 'stats', level_stats_path(@level) }

.modal.fade#video_player{ style: 'display:none;'}
  .modal-header
    %a.close{'data-dismiss' => "modal"} &#X2297;
    %h3#video_title Modal Header
  .modal-body
    %iframe#video_iframe{ name: 'testname', width: "100%", height: '500px', frameborder: 1, scrolling: 'no', marginwidth: 0, marginheight: 0}
  -#.modal-footer
  -#  %a.close{'data-dismiss' => "modal"} Close


- if @autoplay_video && !mobile?
  :javascript
    initialize_video_popup('#{@autoplay_video.youtube_code}', '#{@autoplay_video.name}');

:javascript
  $('.modal-backdrop').addClass('video-backdrop');
  $('#video_player').on('hidden', function () {
    $('#video_iframe')[0].src = null;
  });

Add class to video back drop to distinguish it from other backdrops.
Add class to video back drop to distinguish it from other backdrops.
