From 67f11828ddeaf39c411d9eae68c1172aa3b3b6ec Mon Sep 17 00:00:00 2001 From: Yuki Date: Sun, 24 May 2015 19:38:07 +0530 Subject: [PATCH] Fix CAT-2015-0001 --- app/views/moderation/_discussion.html.haml | 2 +- app/views/shared/_answerbox.html.haml | 4 ++-- app/views/shared/_question.html.haml | 4 ++-- app/views/shared/_question_header.haml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/moderation/_discussion.html.haml b/app/views/moderation/_discussion.html.haml index 51054f2e..231bb0f4 100644 --- a/app/views/moderation/_discussion.html.haml +++ b/app/views/moderation/_discussion.html.haml @@ -19,7 +19,7 @@ %span.caret %ul.dropdown-menu.dropdown-menu-right{role: :menu} %li.text-danger - %a{href: '#', data: { action: 'mod-comment-destroy', id: comment.id }} + %a{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }} %i.fa.fa-trash-o Delete %p.comments--content= comment.content diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index dbc38b29..d1b4d95e 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -14,12 +14,12 @@ %ul.dropdown-menu.dropdown-menu-right{role: :menu} - if current_user.mod? or a.question.user == current_user %li.text-danger - %a{href: '#', data: { action: 'ab-question-destroy', q_id: a.question.id }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: a.question.id }} %i.fa.fa-trash-o Delete Question - unless a.question.user == current_user %li - %a{href: '#', data: { action: 'ab-question-report', q_id: a.question.id }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: a.question.id }} %i.fa.fa-exclamation-triangle Report %h6.text-muted.media-heading.answerbox--question-user diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index ea90fa2a..a34f9dc6 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -14,12 +14,12 @@ %ul.dropdown-menu.dropdown-menu-right{role: :menu} - if current_user.mod? or q.user == current_user %li.text-danger - %a{href: '#', data: { action: 'ab-question-destroy', q_id: q.id }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: q.id }} %i.fa.fa-trash-o Delete Question - unless q.user == current_user %li - %a{href: '#', data: { action: 'ab-question-report', q_id: q.id }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: q.id }} %i.fa.fa-exclamation-triangle Report %h6.media-heading.text-muted.answerbox--question-user diff --git a/app/views/shared/_question_header.haml b/app/views/shared/_question_header.haml index 0ead95b4..61400c46 100644 --- a/app/views/shared/_question_header.haml +++ b/app/views/shared/_question_header.haml @@ -15,12 +15,12 @@ %ul.dropdown-menu.dropdown-menu-right{role: :menu} - if current_user.mod? or question.user == current_user %li.text-danger - %a{href: '#', data: { action: 'ab-question-destroy', q_id: question.id, redirect: if question.author_is_anonymous? then "/" else show_user_questions_path(question.user.screen_name) end }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: question.id, redirect: if question.author_is_anonymous? then "/" else show_user_questions_path(question.user.screen_name) end }} %i.fa.fa-trash-o Delete Question - unless question.user == current_user %li - %a{href: '#', data: { action: 'ab-question-report', q_id: question.id }} + %a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: question.id }} %i.fa.fa-exclamation-triangle Report %h6.text-muted.media-heading.answerbox--question-user