From 818b21287598a5efb7d81e39116c0847d8e67461 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 31 Jul 2017 17:24:37 +0100 Subject: [PATCH] Move tree_content inline js to old_tree_content --- app/views/projects/tree/_old_tree_content.html.haml | 6 ++++++ app/views/projects/tree/_tree_content.html.haml | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/views/projects/tree/_old_tree_content.html.haml b/app/views/projects/tree/_old_tree_content.html.haml index 820b947804e..c1b96b406af 100644 --- a/app/views/projects/tree/_old_tree_content.html.haml +++ b/app/views/projects/tree/_old_tree_content.html.haml @@ -22,3 +22,9 @@ - if can_edit_tree? = render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, @id), method: :post = render 'projects/blob/new_dir' + +:javascript + // Load last commit log for each file in tree + $('#tree-slider').waitForImages(function() { + gl.utils.ajaxGet("#{escape_javascript(@logs_path)}"); + }); diff --git a/app/views/projects/tree/_tree_content.html.haml b/app/views/projects/tree/_tree_content.html.haml index c51a8fdcec1..0ad4ab14139 100644 --- a/app/views/projects/tree/_tree_content.html.haml +++ b/app/views/projects/tree/_tree_content.html.haml @@ -2,10 +2,3 @@ = render 'shared/repo/repo', project: @project - else = render 'projects/tree/old_tree_content', tree: tree - - -:javascript - // Load last commit log for each file in tree - $('#tree-slider').waitForImages(function() { - gl.utils.ajaxGet("#{escape_javascript(@logs_path)}"); - });