Skip to content

Commit

Permalink
trying again with trash button
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanTG committed Feb 1, 2025
1 parent 08ee737 commit 07983de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1573,9 +1573,9 @@ li.address_full {
border-radius: 15px;
}

.machine_name_container form {
.machine_name_container .remove_machine_container {
height: 33px;
width: auto;
width: 30px;
}

.w_100 {
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/mobile-application.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,6 @@ div.location_type {
line-height: 24px;
}

.machine_name {
line-height: 26px;
}

.external_machine_link a:after {
margin: 0 5px 0 4px;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/location_machine_xrefs/_list_machine.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%div.machine_name_container
%span{:class => "machine_name"}
%div{:class => "machine_name"}
#{lmx.machine.name}
%span.machine_year_man #{lmx.machine.year_and_manufacturer}
= render :partial => 'location_machine_xrefs/remove_machine', :locals => {:lmx => lmx}
13 changes: 7 additions & 6 deletions app/views/location_machine_xrefs/_remove_machine.html.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
- if !user_signed_in?
=link_to new_user_session_path, :class => "no_underline" do
%div.remove_machine_button
%div.remove_machine_container
- if !user_signed_in?
=link_to new_user_session_path, :class => "no_underline" do
%div.remove_machine_button
=image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine')
- else
= button_to location_machine_xref_path(:id => lmx.id), :id => "remove_machine_#{lmx.id}", :method => 'delete', :remote => true, :class => "remove_machine_button" do
=image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine')
- else
= button_to location_machine_xref_path(:id => lmx.id), :id => "remove_machine_#{lmx.id}", :method => 'delete', :remote => true, :class => "remove_machine_button" do
=image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine')

:javascript
$('#remove_machine_#{lmx.id}').click(function () {
Expand Down

0 comments on commit 07983de

Please sign in to comment.