Commit a5d1428a authored by Fatih Acet's avatar Fatih Acet

Merge branch 'new-branch-unavailable-color' into 'master'

Remove green outline from `New branch unavailable` button on issue page

## What does this MR do?

- remove mistakenly added green outline from `New branch unavailable` button on issue page
- remove mistakenly added green outline from `Checking branches...` button on issue page

## Why was this MR needed?

`New branch unavailable` and `Checking branches...` buttons had green outline though that should only be added to the `New branch` button.

## What are the relevant issue numbers?

fixes #21006

## Screenshots

### Before

![before-checking](/uploads/f37f62c99602143d7ddc27fead4035c5/before-checking.png)

![before-new-branch](/uploads/4926f7c57b97831496c79b4176ad02a3/before-new-branch.png)

![before-unavailable](/uploads/041c32fa7eef86403c3ee749d4f1131a/before-unavailable.png)

### After

![after-checking](/uploads/918484eca0ccda2d27a8bb3e08a569fb/after-checking.png)

![after-new-branch](/uploads/ae380933d3e82117c887dabfb06a915a/after-new-branch.png)

![after-unavailable](/uploads/d861b3b379de404c62cf27a7207b005c/after-unavailable.png)

See merge request !5858
parents faac7121 4f13a793
......@@ -126,6 +126,7 @@ v 8.11.0
- Add Issues Board !5548
- Allow resolving merge conflicts in the UI !5479
- Improve diff performance by eliminating redundant checks for text blobs
- Remove green outline from `New branch unavailable` button on issue page !5858 (winniehell)
- Ensure that branch names containing escapable characters (e.g. %20) aren't unescaped indiscriminately. !5770 (ewiltshi)
- Convert switch icon into icon font (ClemMakesApps)
- API: Endpoints for enabling and disabling deploy keys
......
......@@ -127,7 +127,7 @@
Issue.prototype.initCanCreateBranch = function() {
var $container;
$container = $('div#new-branch');
$container = $('#new-branch');
if ($container.length === 0) {
return;
}
......@@ -139,7 +139,6 @@
if (data.can_create_branch) {
$container.find('.checking').hide();
$container.find('.available').show();
return $container.find('a').attr('disabled', false);
} else {
$container.find('.checking').hide();
return $container.find('.unavailable').show();
......
- if can?(current_user, :push_code, @project)
.pull-right
#new-branch{'data-path' => can_create_branch_namespace_project_issue_path(@project.namespace, @project, @issue)}
= link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid),
method: :post, class: 'btn btn-new btn-inverted has-tooltip', title: @issue.to_branch_name, disabled: 'disabled' do
.checking
= link_to '#', class: 'checking btn btn-grouped', disabled: 'disabled' do
= icon('spinner spin')
Checking branches
.available.hide
= link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid),
method: :post, class: 'btn btn-new btn-inverted btn-grouped has-tooltip available hide', title: @issue.to_branch_name do
New branch
.unavailable.hide
= link_to '#', class: 'unavailable btn btn-grouped hide', disabled: 'disabled' do
= icon('exclamation-triangle')
New branch unavailable
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment