mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Fix formatting according to HoundBot
This commit is contained in:
parent
1761d57b9d
commit
2558b7a313
4 changed files with 30 additions and 23 deletions
|
@ -219,31 +219,31 @@
|
|||
*/
|
||||
function initExportProjectsModal() {
|
||||
$exportProjectsBtn = $('#export-projects-button')
|
||||
$exportProjectsBtn.click(function() {
|
||||
$exportProjectsBtn.click(function() {
|
||||
|
||||
// Load HTML to refresh users list
|
||||
$.ajax({
|
||||
url: $exportProjectsBtn.data('export-projects-url'),
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
project_ids: selectedProjects
|
||||
},
|
||||
success: function(data) {
|
||||
// Update modal title
|
||||
exportProjectsModalHeader.html(data.title);
|
||||
// Load HTML to refresh users list
|
||||
$.ajax({
|
||||
url: $exportProjectsBtn.data('export-projects-url'),
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
project_ids: selectedProjects
|
||||
},
|
||||
success: function(data) {
|
||||
// Update modal title
|
||||
exportProjectsModalHeader.html(data.title);
|
||||
|
||||
// Set modal body
|
||||
exportProjectsModalBody.html(data.html);
|
||||
// Set modal body
|
||||
exportProjectsModalBody.html(data.html);
|
||||
|
||||
// Show the modal
|
||||
exportProjectsModal.modal('show');
|
||||
},
|
||||
error: function() {
|
||||
// TODO
|
||||
}
|
||||
});
|
||||
// Show the modal
|
||||
exportProjectsModal.modal('show');
|
||||
},
|
||||
error: function() {
|
||||
// TODO
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Remove modal content when modal window is closed.
|
||||
exportProjectsModal.on('hidden.bs.modal', function() {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true.
|
||||
|
||||
module VariablesModel
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
class User < ApplicationRecord
|
||||
include SearchableModel, SettingsModel, VariablesModel
|
||||
include User::TeamRoles, User::ProjectRoles
|
||||
include SearchableModel
|
||||
include SettingsModel
|
||||
include VariablesModel
|
||||
include User::TeamRoles
|
||||
include User::ProjectRoles
|
||||
|
||||
acts_as_token_authenticatable
|
||||
devise :invitable, :confirmable, :database_authenticatable, :registerable,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddVariablesToUsers < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
add_column :users, :variables, :jsonb, default: {}, null: false
|
||||
|
|
Loading…
Reference in a new issue