Fix formatting according to HoundBot

This commit is contained in:
Jure Grabnar 2018-10-12 00:48:12 +02:00
parent e636f61d13
commit 21298415f0
4 changed files with 30 additions and 23 deletions

View file

@ -219,31 +219,31 @@
*/ */
function initExportProjectsModal() { function initExportProjectsModal() {
$exportProjectsBtn = $('#export-projects-button') $exportProjectsBtn = $('#export-projects-button')
$exportProjectsBtn.click(function() { $exportProjectsBtn.click(function() {
// Load HTML to refresh users list // Load HTML to refresh users list
$.ajax({ $.ajax({
url: $exportProjectsBtn.data('export-projects-url'), url: $exportProjectsBtn.data('export-projects-url'),
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: { data: {
project_ids: selectedProjects project_ids: selectedProjects
}, },
success: function(data) { success: function(data) {
// Update modal title // Update modal title
exportProjectsModalHeader.html(data.title); exportProjectsModalHeader.html(data.title);
// Set modal body // Set modal body
exportProjectsModalBody.html(data.html); exportProjectsModalBody.html(data.html);
// Show the modal // Show the modal
exportProjectsModal.modal('show'); exportProjectsModal.modal('show');
}, },
error: function() { error: function() {
// TODO // TODO
} }
});
}); });
});
// Remove modal content when modal window is closed. // Remove modal content when modal window is closed.
exportProjectsModal.on('hidden.bs.modal', function() { exportProjectsModal.on('hidden.bs.modal', function() {

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true.
module VariablesModel module VariablesModel
extend ActiveSupport::Concern extend ActiveSupport::Concern

View file

@ -1,6 +1,9 @@
class User < ApplicationRecord class User < ApplicationRecord
include SearchableModel, SettingsModel, VariablesModel include SearchableModel
include User::TeamRoles, User::ProjectRoles include SettingsModel
include VariablesModel
include User::TeamRoles
include User::ProjectRoles
acts_as_token_authenticatable acts_as_token_authenticatable
devise :invitable, :confirmable, :database_authenticatable, :registerable, devise :invitable, :confirmable, :database_authenticatable, :registerable,

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVariablesToUsers < ActiveRecord::Migration[5.1] class AddVariablesToUsers < ActiveRecord::Migration[5.1]
def up def up
add_column :users, :variables, :jsonb, default: {}, null: false add_column :users, :variables, :jsonb, default: {}, null: false