diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-27 07:44:39 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-27 07:44:39 +0200 |
commit | 46675c06c526bfa9c6b5b43a645d7b0fd4608541 (patch) | |
tree | c3311ff17822c0dbdf299fe692f143e6e06f42ec | |
parent | 041167309dc9d037fa99b8ada226930ef632f3d3 (diff) | |
download | gitlab-ce-34168-cannot-edit-prioritized-labels-issues-with-firefox.tar.gz |
Optimisation of the Hide action34168-cannot-edit-prioritized-labels-issues-with-firefox
Fixed some bootlint problems with the buttons
-rw-r--r-- | app/assets/javascripts/label_manager.js | 5 | ||||
-rw-r--r-- | app/views/shared/_label.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/_label_row.html.haml | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/app/assets/javascripts/label_manager.js b/app/assets/javascripts/label_manager.js index 599b6b9383b..d8814802d9e 100644 --- a/app/assets/javascripts/label_manager.js +++ b/app/assets/javascripts/label_manager.js @@ -21,7 +21,7 @@ } bindEvents() { - this.prioritizedLabels.find('.btn-action').on('click', this, this.onButtonActionClick); + this.prioritizedLabels.find('.btn-action').on('mousedown', this, this.onButtonActionClick); return this.togglePriorityButton.on('click', this, this.onTogglePriorityClick); } @@ -39,8 +39,7 @@ onButtonActionClick(e) { e.stopPropagation(); - const $btn = $(e.currentTarget); - $btn.tooltip('hide'); + $(e.currentTarget).tooltip('hide'); } toggleEmptyState($label, $btn, action) { diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index c185e9b73ee..3f48dbca18a 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -6,7 +6,7 @@ = render "shared/label_row", label: label .visible-xs.visible-sm-inline-block.visible-md-inline-block.dropdown - %button.btn.btn-default.label-options-toggle{ data: { toggle: "dropdown" } } + %button.btn.btn-default.label-options-toggle{ type: 'button', data: { toggle: "dropdown" } } Options = icon('caret-down') .dropdown-menu.dropdown-menu-align-right diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index d28f9421ecf..7b599dff0e3 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -4,9 +4,9 @@ = icon('bars') .js-toggle-priority.toggle-priority{ data: { url: remove_priority_namespace_project_label_path(@project.namespace, @project, label), dom_id: dom_id(label), type: label.type } } - %button.add-priority.btn.has-tooltip{ title: 'Prioritize', :'data-placement' => 'top' } + %button.add-priority.btn.has-tooltip{ title: 'Prioritize', type: 'button', :'data-placement' => 'top' } = icon('star-o') - %button.remove-priority.btn.has-tooltip{ title: 'Remove priority', :'data-placement' => 'top' } + %button.remove-priority.btn.has-tooltip{ title: 'Remove priority', type: 'button', :'data-placement' => 'top' } = icon('star') %span.label-name = link_to_label(label, subject: @project, tooltip: false) |