Skip to content

Commit

Permalink
Merge branch 'master' into translations_en-yml--master_hu_HU
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Sep 2, 2020
2 parents 182956d + 2d4d76e commit 9546e6a
Show file tree
Hide file tree
Showing 7 changed files with 649 additions and 26 deletions.
23 changes: 16 additions & 7 deletions app/assets/javascripts/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,28 @@ $(document).on('turbolinks:load', function(){
listItem.setAttribute('class', 'list-group-item text-left not-saved add-access');
listItem.setAttribute("data-uid", uid)

let spanItem = "<span class='avatar float-left mr-2'>" + option.text().charAt(0) + "</span> <span class='shared-user'>" +
option.text() + " <span class='text-muted'>" + option.data("subtext") + "</span></span>" +
"<span class='text-primary float-right shared-user cursor-pointer' onclick='removeSharedUser(this)'><i class='fas fa-times'></i></span>"

listItem.innerHTML = spanItem
let spanItemAvatar = document.createElement("span"),
spanItemName = document.createElement("span"),
spanItemUser = document.createElement("span");
spanItemAvatar.setAttribute('class', 'avatar float-left mr-2');
spanItemAvatar.innerText = option.text().charAt(0);
spanItemName.setAttribute('class', 'shared-user');
spanItemName.innerText = option.text();
spanItemUser.setAttribute('class', 'text-muted');
spanItemUser.innerText = option.data('subtext');
spanItemName.append(spanItemUser);

listItem.innerHTML = "<span class='text-primary float-right shared-user cursor-pointer' onclick='removeSharedUser(this)'><i class='fas fa-times'></i></span>"
listItem.prepend(spanItemName);
listItem.prepend(spanItemAvatar);

$("#user-list").append(listItem)
}
})

$("#presentation-upload").change(function(data) {
var file = data.target.files[0]

// Check file type and size to make sure they aren't over the limit
if (validFileUpload(file)) {
$("#presentation-upload-label").text(file.name)
Expand Down Expand Up @@ -327,4 +336,4 @@ function checkIfAutoJoin() {
$("#joiner-consent").click()
$("#room-join").click()
}
}
}
17 changes: 1 addition & 16 deletions app/assets/javascripts/wait.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,7 @@ $(document).on("turbolinks:load", function(){
var join_attempts = 0;

var request_to_join_meeting = function(){
$.ajax({
url: window.location.pathname,
type: 'POST',
data: {
join_name: $(".background").attr("join-name")
},
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
},
success: function(){
// Enqueue another trial just incase they didn't actually join.
if(join_attempts < 4){ setTimeout(request_to_join_meeting, 10000); }
join_attempts++;
}
});
$.post(window.location.pathname, { join_name: $(".background").attr("join-name") })
}

// Refresh the page after 2 mins and attempt to reconnect to ActionCable
Expand Down
1 change: 1 addition & 0 deletions app/controllers/rooms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class RoomsController < ApplicationController
unless: -> { !Rails.configuration.enable_email_verification }
before_action :verify_room_owner_valid, only: [:show, :join]
before_action :verify_user_not_admin, only: [:show]
skip_before_action :verify_authenticity_token, only: [:join]

# POST /
def create
Expand Down
4 changes: 2 additions & 2 deletions app/views/sessions/ldap_signin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<span class="input-icon-addon">
<i class="fas fa-user"></i>
</span>
<%= f.text_field :username, class: "form-control", placeholder: t("administrator.users.table.username"), value: "" %>
<%= f.text_field :username, class: "form-control", placeholder: t("administrator.users.table.username"), value: "", autocomplete: "username", autocapitalize: "none", spellcheck: "false", autofocus: "" %>
</div>
</div>
<div class="form-group">
Expand All @@ -31,4 +31,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 2 additions & 0 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ test:

production:
adapter: <%= ENV['CABLE_ADAPTER'] || 'async' %>
url: <%= ENV['REDIS_URL'] %>
channel_prefix: greenlight_production
4 changes: 3 additions & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# The key base was updated as part of 2.3
if Rails.configuration.loadbalanced_configuration
Rails.application.config.session_store :cookie_store, key: '_greenlight-2_3_session',
domain: ENV['GREENLIGHT_SESSION_DOMAIN'] || 'blindside-dev.com'
domain: ENV['GREENLIGHT_SESSION_DOMAIN'] || 'blindside-dev.com',
secure: ENV['COOKIES_SECURE_OFF'].blank?,
same_site: ENV['COOKIES_SAME_SITE'].presence || 'None'
else
Rails.application.config.session_store :cookie_store, key: '_greenlight-2_3_session'
end

0 comments on commit 9546e6a

Please sign in to comment.