Commit 9a1ca575 authored by Winnie Hellmann's avatar Winnie Hellmann

Replace @click/@submit with v-on in HAML

parent 92bb6f53
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
":current-board" => current_board_json, ":current-board" => current_board_json,
"milestone-path" => milestones_filter_path(milestone_filter_opts) } "milestone-path" => milestones_filter_path(milestone_filter_opts) }
.dropdown .dropdown
%button.dropdown-menu-toggle{ "@click" => "loadBoards", %button.dropdown-menu-toggle{ "v-on:click" => "loadBoards",
data: { toggle: "dropdown" } } data: { toggle: "dropdown" } }
{{ board.name }} {{ board.name }}
= icon("chevron-down") = icon("chevron-down")
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.dropdown-title .dropdown-title
%button.dropdown-title-button.dropdown-menu-back{ type: "button", %button.dropdown-title-button.dropdown-menu-back{ type: "button",
aria: { label: "Go back" }, aria: { label: "Go back" },
"@click.stop.prevent" => "showPage('')", "v-on:click.stop.prevent" => "showPage('')",
"v-if" => "currentPage !== ''" } "v-if" => "currentPage !== ''" }
= icon("arrow-left") = icon("arrow-left")
{{ title }} {{ title }}
...@@ -45,23 +45,23 @@ ...@@ -45,23 +45,23 @@
method: :delete do method: :delete do
Delete Delete
%button.btn.btn-default.pull-right{ type: "button", %button.btn.btn-default.pull-right{ type: "button",
"@click.stop.prevent" => "showPage('')" } "v-on:click.stop.prevent" => "showPage('')" }
Cancel Cancel
- if can?(current_user, :admin_board, parent) - if can?(current_user, :admin_board, parent)
.dropdown-footer{ "v-if" => "currentPage === ''" } .dropdown-footer{ "v-if" => "currentPage === ''" }
%ul.dropdown-footer-list %ul.dropdown-footer-list
- if parent.feature_available?(:multiple_issue_boards) - if parent.feature_available?(:multiple_issue_boards)
%li %li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('new')" } %a{ "href" => "#", "v-on:click.stop.prevent" => "showPage('new')" }
Create new board Create new board
%li %li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('edit')" } %a{ "href" => "#", "v-on:click.stop.prevent" => "showPage('edit')" }
Edit board name Edit board name
- if parent.issue_board_milestone_available?(current_user) - if parent.issue_board_milestone_available?(current_user)
%li %li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('milestone')" } %a{ "href" => "#", "v-on:click.stop.prevent" => "showPage('milestone')" }
Edit board milestone Edit board milestone
%li{ "v-if" => "showDelete" } %li{ "v-if" => "showDelete" }
%a{ "href" => "#", "@click.stop.prevent" => "showPage('delete')" } %a{ "href" => "#", "v-on:click.stop.prevent" => "showPage('delete')" }
%span.text-danger %span.text-danger
Delete board Delete board
.board-selector-page-two .board-selector-page-two
%form{ "@submit.prevent" => "submit" } %form{ "v-on:submit.prevent" => "submit" }
.dropdown-content .dropdown-content
%input{ type: "hidden", %input{ type: "hidden",
id: "board-milestone", id: "board-milestone",
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%label.label-light{ for: "board-milestone" } %label.label-light{ for: "board-milestone" }
Board milestone Board milestone
%button.dropdown-menu-toggle.wide{ type: "button", %button.dropdown-menu-toggle.wide{ type: "button",
"@click.stop.prevent" => "loadMilestones($event)" } "v-on:click.stop.prevent" => "loadMilestones($event)" }
{{ milestoneToggleText }} {{ milestoneToggleText }}
= icon("chevron-down") = icon("chevron-down")
.dropdown-menu.dropdown-menu-selectable{ "v-if" => "milestoneDropdownOpen", .dropdown-menu.dropdown-menu-selectable{ "v-if" => "milestoneDropdownOpen",
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
%li{ "v-for" => "milestone in extraMilestones" } %li{ "v-for" => "milestone in extraMilestones" }
%a{ href: "#", %a{ href: "#",
":class" => "{ 'is-active': milestone.id === board.milestone_id }", ":class" => "{ 'is-active': milestone.id === board.milestone_id }",
"@click.stop.prevent" => "selectMilestone(milestone)" } "v-on:click.stop.prevent" => "selectMilestone(milestone)" }
{{ milestone.title }} {{ milestone.title }}
%li.divider %li.divider
%li{ "v-for" => "milestone in milestones" } %li{ "v-for" => "milestone in milestones" }
%a{ href: "#", %a{ href: "#",
":class" => "{ 'is-active': milestone.id === board.milestone_id }", ":class" => "{ 'is-active': milestone.id === board.milestone_id }",
"@click.stop.prevent" => "selectMilestone(milestone)" } "v-on:click.stop.prevent" => "selectMilestone(milestone)" }
{{ milestone.title }} {{ milestone.title }}
= dropdown_loading = dropdown_loading
%span %span
...@@ -47,5 +47,5 @@ ...@@ -47,5 +47,5 @@
"ref" => "'submit-btn'" } "ref" => "'submit-btn'" }
{{ buttonText }} {{ buttonText }}
%button.btn.btn-default.pull-right{ type: "button", %button.btn.btn-default.pull-right{ type: "button",
"@click.stop.prevent" => "cancel" } "v-on:click.stop.prevent" => "cancel" }
Cancel Cancel
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