Skip to content

Commit

Permalink
Convert Javascript links to buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
cirosantilli committed Dec 30, 2014
1 parent 394e2ec commit e6c5349
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/projects/index.html.haml
Expand Up @@ -44,7 +44,7 @@
Projects (#{@projects.total_count})
.panel-head-actions
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboard/projects.html.haml
Expand Up @@ -2,7 +2,7 @@
My Projects
.pull-right
.dropdown.inline
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn.btn-small{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
Expand Down
2 changes: 1 addition & 1 deletion app/views/explore/groups/index.html.haml
Expand Up @@ -8,7 +8,7 @@

.pull-right
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
Expand Down
2 changes: 1 addition & 1 deletion app/views/explore/projects/index.html.haml
Expand Up @@ -8,7 +8,7 @@

.pull-right
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
Expand Down
3 changes: 2 additions & 1 deletion app/views/groups/group_members/_group_member.html.haml
Expand Up @@ -14,7 +14,8 @@
%strong= member.human_access
- if show_controls
- if can?(current_user, :modify, member)
= link_to '#', class: "btn-tiny btn js-toggle-button", title: 'Edit access level' do
= button_tag class: "btn-tiny btn js-toggle-button",
title: 'Edit access level', type: 'button' do
%i.fa.fa-pencil-square-o
- if can?(current_user, :destroy, member)
- if current_user == member.user
Expand Down
2 changes: 1 addition & 1 deletion app/views/groups/members.html.haml
Expand Up @@ -17,7 +17,7 @@

- if current_user && current_user.can?(:manage_group, @group)
.pull-right
= link_to '#', class: 'btn btn-new js-toggle-button' do
= button_tag class: 'btn btn-new js-toggle-button', type: 'button' do
Add members
%i.fa.fa-chevron-down

Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/branches/index.html.haml
Expand Up @@ -8,7 +8,7 @@
New branch
 
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort.humanize
Expand Down
4 changes: 2 additions & 2 deletions app/views/search/_filter.html.haml
@@ -1,5 +1,5 @@
.dropdown.inline
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn.btn-small{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Group:
- if @group.present?
Expand All @@ -17,7 +17,7 @@
= group.name

.dropdown.inline.prepend-left-10.project-filter
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn.btn-small{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Project:
- if @project.present?
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_issuable_filter.html.haml
Expand Up @@ -15,7 +15,7 @@
All

.dropdown.inline.assignee-filter
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-user
%span.light assignee:
- if @assignee.present?
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_sort_dropdown.html.haml
@@ -1,5 +1,5 @@
.dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light sort:
- if @sort.present?
= @sort
Expand Down
2 changes: 1 addition & 1 deletion features/steps/groups.rb
Expand Up @@ -29,7 +29,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps

step 'I select user "Mary Jane" from list with role "Reporter"' do
user = User.find_by(name: "Mary Jane") || create(:user, name: "Mary Jane")
click_link 'Add members'
click_button 'Add members'
within ".users-group-form" do
select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "access_level"
Expand Down

0 comments on commit e6c5349

Please sign in to comment.