Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
WIP #217 Show hint on mouseenter and mouseleave events
Browse files Browse the repository at this point in the history
  • Loading branch information
teampolyglot committed Oct 27, 2020
1 parent 615c9c3 commit 382b8d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/split_button_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="review-<%= @review.item.id %>">
<span class="relative z-0 inline-flex shadow-sm rounded-md">
<% if @review.persisted? and @review.status.present? %>
<%= button_to ("✔ " + Review::STATUSES[@review.status.to_sym]), review_path(@review, review: {status: ""}), remote: true, method: :patch, class: "relative inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 text-sm leading-5 font-medium bg-gray-400 hover:bg-gray-600 focus:z-10 focus:outline-none focus:border-indigo-700 focus:shadow-outline-blue active:bg-indigo-700" %>
<%= button_to ("✔ " + Review::STATUSES[@review.status.to_sym]), review_path(@review, review: {status: ""}), remote: true, method: :patch, class: "relative inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 text-sm leading-5 font-medium bg-gray-400 hover:bg-gray-600 focus:z-10 focus:outline-none focus:border-indigo-700 focus:shadow-outline-blue active:bg-indigo-700", "x-on:mouseenter": "$event.target.value = $event.target.value.replace('✔','⨯')", "x-on:mouseleave": "$event.target.value = $event.target.value.replace('⨯','✔')" %>
<% elsif @review.persisted? %>
<%= button_to Review::STATUSES[:want_to_learn], review_path(@review, review: {status: "want_to_learn"}), remote: true, method: :patch, class: "relative inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 text-sm leading-5 font-medium text-white bg-indigo-600 hover:bg-indigo-500 focus:z-10 focus:outline-none focus:border-indigo-700 focus:shadow-outline-blue active:bg-indigo-700" %>
<% else %>
Expand Down

0 comments on commit 382b8d0

Please sign in to comment.