Fix internal mods interactivity and improve layout (#3879)

This commit is contained in:
Ben Halpern 2019-08-29 19:00:22 -04:00 committed by GitHub
parent 92e107e82e
commit 81bff4da35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -15,6 +15,6 @@ class Internal::ModsController < Internal::ApplicationController
def update
@user = User.find(params[:id])
AssignTagModerator.add_trusted_role(@user)
redirect_to "/internal/mods"
render body: nil # No response needed at the moment
end
end

View file

@ -69,6 +69,7 @@
function submitForms() {
var form = $(this);
var valuesToSubmit = $(this).serialize();
form.parents(".wrapper").addClass("submitting-no-border")
$.ajax({
type: "POST",
url: $(this).attr('action'), //sumbits it to the given url of the form

View file

@ -119,10 +119,18 @@
border: 20px solid black;
}
.submitting-no-border {
background: #96f2cc !important;
}
.highlighted-no-border {
background: #2effa8 !important;
}
.highlighted-no-border input[type="submit"] {
display: none;
}
.highlighted-border {
border: 20px solid black;
}
@ -139,11 +147,10 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Internal DEV</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<% controller_names = %w[comments articles users tags welcome broadcasts reports pages classified_listings tools chat_channels] %>
<ul class="nav navbar-nav" style="font-size: 0.97em;">
<% controller_names = %w[comments articles users tags welcome broadcasts reports pages classified_listings tools chat_channels growth mods] %>
<% controller_names.each do |name| %>
<li class="<%= "active" if controller_name == name %>"><a href="/internal/<%= name %>"><%= name %></a></li>
<% end %>