From 382b8d062d5c4d542168ba67f057f2d245169ab8 Mon Sep 17 00:00:00 2001 From: eshnil Date: Tue, 27 Oct 2020 08:02:22 +0530 Subject: [PATCH] WIP #217 Show hint on mouseenter and mouseleave events --- app/components/split_button_component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/split_button_component.html.erb b/app/components/split_button_component.html.erb index 65eb0c5f..4340421a 100644 --- a/app/components/split_button_component.html.erb +++ b/app/components/split_button_component.html.erb @@ -2,7 +2,7 @@
<% 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 %>