mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Refactor invite users modal initialization [SCI-2651]
This commit is contained in:
parent
422baaf64a
commit
6795b08a91
4 changed files with 7 additions and 4 deletions
|
@ -164,8 +164,10 @@
|
|||
}
|
||||
|
||||
function initializeModalsToggle() {
|
||||
$("[data-trigger='invite-users']").on('click', function() {
|
||||
$("[data-trigger='invite-users']").on('click', function(event) {
|
||||
var id = $(this).attr('data-modal-id');
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$('[data-role=invite-users-modal][data-id=' + id + ']')
|
||||
.modal('show');
|
||||
});
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//= require users/settings/teams/invite_users_modal
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<div class="panel-body">
|
||||
<div class="col-xs-24 col-sm-12">
|
||||
<a href="#" class="btn btn-primary pull-right row" data-trigger="invite-users"
|
||||
data-modal-id="team-invite-users-modal" data-remote="true">
|
||||
data-modal-id="team-invite-users-modal">
|
||||
<span class="fas fa-plus"></span>
|
||||
<%= t("users.settings.teams.edit.add_user") %>
|
||||
</a>
|
||||
|
@ -137,4 +137,5 @@
|
|||
<%= render partial: 'users/settings/user_teams/destroy_user_team_modal.html.erb' %>
|
||||
<%= stylesheet_link_tag 'datatables' %>
|
||||
<%= javascript_include_tag 'users/settings/teams/show' %>
|
||||
<%= javascript_include_tag 'users/settings/teams/invite_users_modal' %>
|
||||
<span data-hook="team-bottom"></span>
|
||||
|
|
|
@ -28,6 +28,8 @@ Rails.application.config.assets.precompile +=
|
|||
Rails.application.config.assets.precompile +=
|
||||
%w(users/settings/teams/add_user_modal.js)
|
||||
Rails.application.config.assets.precompile += %w(users/settings/teams/show.js)
|
||||
Rails.application.config.assets.precompile +=
|
||||
%w(users/settings/teams/invite_users_modal.js)
|
||||
Rails.application.config.assets.precompile += %w(my_modules/activities.js)
|
||||
Rails.application.config.assets.precompile += %w(my_modules/protocols.js)
|
||||
Rails.application.config.assets.precompile +=
|
||||
|
|
Loading…
Reference in a new issue