mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-14 19:04:21 +08:00
Fix formatting according to HoundBot
This commit is contained in:
parent
e636f61d13
commit
21298415f0
4 changed files with 30 additions and 23 deletions
|
@ -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() {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true.
|
||||||
|
|
||||||
module VariablesModel
|
module VariablesModel
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue