-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set focus on first element of modal, fixes #1
Remove inline update of card title. At this point it's not necessary. When implemented in the future, it should not prevent mouse control of the cursor in the text box.
- Loading branch information
Showing
4 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
<% url = policy(card).update? ? edit_card_path(card) : card_path(card) %> | ||
<li id="<%= dom_id card %>" | ||
class="draggable block shadow-gray-500 max-w-sm p-3 m-2 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700 " | ||
class="draggable" | ||
data-sortable-update-url="<%= card_path(card) %>"> | ||
|
||
<% card_frame_id = dom_id(card, "turbo_frame") %> | ||
<%= form_with model: card, class: "contents inline-edit", data: { turbo_frame: card_frame_id } do %> | ||
<%= turbo_frame_tag card_frame_id, class: "contents" do %> | ||
<% if policy(card).update? %> | ||
<a href="<%= edit_card_path(card) %>" class="float-right"> | ||
<svg class="w-5 h-5" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="edit" role="img" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill-rule="evenodd" clip-rule="evenodd" d="m3.99 16.854-1.314 3.504a.75.75 0 0 0 .966.965l3.503-1.314a3 3 0 0 0 1.068-.687L18.36 9.175s-.354-1.061-1.414-2.122c-1.06-1.06-2.122-1.414-2.122-1.414L4.677 15.786a3 3 0 0 0-.687 1.068zm12.249-12.63 1.383-1.383c.248-.248.579-.406.925-.348.487.08 1.232.322 1.934 1.025.703.703.945 1.447 1.025 1.934.058.346-.1.677-.348.925L19.774 7.76s-.353-1.06-1.414-2.12c-1.06-1.062-2.121-1.415-2.121-1.415z" fill="currentColor"></path></g></svg> | ||
</a> | ||
<%= link_to card.title, edit_card_path(card), class: "font-normal text-gray-700 dark:text-gray-400", data: { turbo_frame: "modal" } %> | ||
<% else %> | ||
<%= link_to card.title, card_path(card), class: "font-normal text-gray-700 dark:text-gray-400", data: { turbo_frame: "modal" } %> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<a href="<%= url %>" data-turbo-frame="modal"> | ||
<div class="block shadow-gray-500 max-w-sm p-3 m-2 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700"> | ||
<p class="font-normal text-gray-700 dark:text-gray-400"><%= card.title %></p> | ||
</div> | ||
</a> | ||
</li> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters