From cad80263ade171b9e6bb80156d3222323e6be691 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Tue, 25 Jul 2017 15:02:24 +0200 Subject: [PATCH] Fixes New Project Bug --- app/assets/javascripts/projects/project_new.js | 6 +++--- app/views/projects/pipelines/charts/_pipelines.haml | 2 +- app/views/projects/tree/_tree_content.html.haml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/projects/project_new.js b/app/assets/javascripts/projects/project_new.js index 4f87df8e160..e3fcf218cfb 100644 --- a/app/assets/javascripts/projects/project_new.js +++ b/app/assets/javascripts/projects/project_new.js @@ -2,9 +2,9 @@ document.addEventListener('DOMContentLoaded', () => { const importBtnTooltip = 'Please enter a valid project name.'; const $importBtnWrapper = $('.import_gitlab_project'); - $('.how_to_import_link').bind('click', function (e) { + $('.how_to_import_link').bind('click', (e) => { e.preventDefault(); - $(this).next('.modal').show(); + $('.how_to_import_link').next('.modal').show(); }); $('.modal-header .close').bind('click', () => { @@ -25,7 +25,7 @@ document.addEventListener('DOMContentLoaded', () => { }); $('#project_path').keyup(() => { - if ($(this).val().trim().length !== 0) { + if ($('#project_path').val().trim().length !== 0) { $('.btn_import_gitlab_project').attr('disabled', false); $importBtnWrapper.attr('title', ''); $importBtnWrapper.removeClass('has-tooltip'); diff --git a/app/views/projects/pipelines/charts/_pipelines.haml b/app/views/projects/pipelines/charts/_pipelines.haml index 9de22b39d23..02f1ef4b6da 100644 --- a/app/views/projects/pipelines/charts/_pipelines.haml +++ b/app/views/projects/pipelines/charts/_pipelines.haml @@ -30,7 +30,7 @@ %canvas#yearChart.padded{ height: 250 } %script#pipelinesChartsData{ type: "application/json" } - - chartData = [] + - chartData = [] - [:week, :month, :year].each do |scope| - chartData.push({ 'scope' => scope, 'labels' => @charts[scope].labels, 'totalValues' => @charts[scope].total, 'successValues' => @charts[scope].success }) = chartData.to_json.html_safe diff --git a/app/views/projects/tree/_tree_content.html.haml b/app/views/projects/tree/_tree_content.html.haml index bdd1623c075..ac3c784375d 100644 --- a/app/views/projects/tree/_tree_content.html.haml +++ b/app/views/projects/tree/_tree_content.html.haml @@ -1,4 +1,4 @@ -.tree-content-holder.js-tree-content{ 'data-logs-path': escape_javascript(@logs_path)} +.tree-content-holder.js-tree-content{ 'data-logs-path': escape_javascript(@logs_path) } .table-holder %table.table#tree-slider{ class: "table_#{@hex_path} tree-table" } %thead