From 641febac64fcfa52e642ab3d8e8193d25a5c6cac Mon Sep 17 00:00:00 2001
From: James Lopez <james@jameslopez.es>
Date: Wed, 20 Jul 2016 15:50:21 +0200
Subject: [PATCH] fix JS - now tooltip and flash should show

---
 app/views/projects/new.html.haml | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index c72d014..5025542 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -89,9 +89,9 @@
                     = link_to "#", class: 'btn js-toggle-button import_git' do
                       %i.fa.fa-git
                       %span Repo by URL
-                %div
+                %div{ class: 'import_gitlab_project' }
                   - if gitlab_project_import_enabled?
-                    = link_to new_import_gitlab_project_path, class: 'btn import_gitlab_project project-submit' do
+                    = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
                       %i.fa.fa-gitlab
                       %span GitLab export
 
@@ -130,16 +130,16 @@
     $(".modal").hide();
   });
 
-  $('.import_gitlab_project').bind('click', function() {
-    var _href = $("a.import_gitlab_project").attr("href");
-    $(".import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val());
+  $('.btn_import_gitlab_project').bind('click', function() {
+    var _href = $("a.btn_import_gitlab_project").attr("href");
+    $(".btn_import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val());
   });
 
-  $('.import_gitlab_project').attr('disabled',true)
+  $('.btn_import_gitlab_project').attr('disabled',true)
   $('.import_gitlab_project').attr('title', 'Project path required.');
 
   $('.import_gitlab_project').click(function( event ) {
-    if($('.import_gitlab_project').attr('disabled')) {
+    if($('.btn_import_gitlab_project').attr('disabled')) {
       event.preventDefault();
       new Flash("Please enter a path for the project to be imported to.");
     }
@@ -147,11 +147,11 @@
 
   $('#project_path').keyup(function(){
     if($(this).val().length !=0) {
-      $('.import_gitlab_project').attr('disabled', false);
+      $('.btn_import_gitlab_project').attr('disabled', false);
       $('.import_gitlab_project').attr('title','');
       $(".flash-container").html("")
     } else {
-      $('.import_gitlab_project').attr('disabled',true);
+      $('.btn_import_gitlab_project').attr('disabled',true);
       $('.import_gitlab_project').attr('title', 'Project path required.');
     }
   });
--
libgit2 0.27.1