mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 02:42:10 +00:00
fixed calling modal
This commit is contained in:
@@ -36,7 +36,6 @@ class PagesController < ApplicationController
|
||||
chat_room_id: chat_room.id
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
def accept_call
|
||||
|
||||
8
app/javascript/packs/modal.js
Normal file
8
app/javascript/packs/modal.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import "bootstrap";
|
||||
|
||||
const btn = document.getElementById("modalTrigger");
|
||||
const modal = document.getElementById("myModal");
|
||||
|
||||
btn.addEventListener('click', function(event) {
|
||||
$('#myModal').modal('show');
|
||||
});
|
||||
@@ -18,13 +18,14 @@ end
|
||||
</div>
|
||||
</div>
|
||||
<div class="call" data-user-id="<%= contact.id %>">
|
||||
<%= link_to establish_call_path(contact.id), 'data-toggle':"modal", 'data-target':"#myModal" do %>
|
||||
<%= link_to establish_call_path(contact.id), remote: true, id: "modalTrigger" do %>
|
||||
<i class="fas fa-phone"></i>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="vertical-alignment-helper">
|
||||
@@ -58,3 +59,6 @@ end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%= javascript_pack_tag 'modal' %>
|
||||
|
||||
Reference in New Issue
Block a user