fixed calling modal
This commit is contained in:
parent
18bc693b5c
commit
0b377cbe20
|
@ -36,7 +36,6 @@ class PagesController < ApplicationController
|
||||||
chat_room_id: chat_room.id
|
chat_room_id: chat_room.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def accept_call
|
def accept_call
|
||||||
|
|
|
@ -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>
|
</div>
|
||||||
<div class="call" data-user-id="<%= contact.id %>">
|
<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>
|
<i class="fas fa-phone"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="vertical-alignment-helper">
|
<div class="vertical-alignment-helper">
|
||||||
|
@ -58,3 +59,6 @@ end
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<%= javascript_pack_tag 'modal' %>
|
||||||
|
|
|
@ -15,6 +15,8 @@ module Polyglot
|
||||||
end
|
end
|
||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 5.2
|
config.load_defaults 5.2
|
||||||
|
config.action_view.embed_authenticity_token_in_remote_forms = true
|
||||||
|
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration can go into files in config/initializers
|
# Application configuration can go into files in config/initializers
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
|
ActiveRecord::Schema.define(version: 2018_08_30_100110) do
|
||||||
# ActiveRecord::Schema.define(version: 2018_08_30_100110) do
|
|
||||||
ActiveRecord::Schema.define(version: 2018_08_29_123204) do
|
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
Loading…
Reference in New Issue