Merge branch 'develop' into features/new-task-layout

This commit is contained in:
Urban Rotnik 2020-05-15 14:27:56 +02:00
commit a2ade6e0ec
48 changed files with 90 additions and 357 deletions

View file

@ -246,7 +246,7 @@ GEM
discard (1.1.0)
activerecord (>= 4.2, < 7)
docile (1.3.2)
doorkeeper (5.1.0)
doorkeeper (5.1.1)
railties (>= 5)
down (5.0.0)
addressable (~> 2.5)

View file

@ -1 +1 @@
1.18.7
1.18.8

View file

@ -47,6 +47,7 @@ var DasboardCurrentTasksWidget = (function() {
function filtersEnabled() {
return dropdownSelector.getValues(experimentFilter)
|| dropdownSelector.getValues(projectFilter)
|| $('.current-tasks-widget .task-search-field').val().length > 0
|| dropdownSelector.getValues(viewFilter) !== 'uncompleted';
}

View file

@ -244,7 +244,6 @@ function initializeEdit() {
{ color: 'white', shadow: true }
);
});
$.initTooltips();
}
function destroyEdit() {
@ -900,8 +899,6 @@ function bindEditTagsAjax(elements) {
.find(".edit-tags-link")
.html(my_module.tags_html);
});
// initialize tooltips again
$.initTooltips();
},
error: function(data){
// TODO

View file

@ -100,7 +100,6 @@ function initProtocolsTable() {
fnDrawCallback: function(settings, json) {
animateSpinner(this, false);
initRowSelection();
$.initTooltips();
},
preDrawCallback: function(settings) {
animateSpinner(this);

View file

@ -115,7 +115,6 @@
toggleButtons(true);
setTimeout(function() {
$.initTooltips();
initStepsComments();
FilePreviewModal.init();
SmartAnnotation.preventPropagation('.atwho-user-popover');
@ -618,7 +617,6 @@
animateSpinner(null, false);
DragNDropSteps.clearFiles();
FilePreviewModal.init();
$.initTooltips();
if (typeof refreshProtocolStatusBar === 'function') refreshProtocolStatusBar();
},
error: function(xhr) {

View file

@ -35,7 +35,8 @@ var RepositoryChecklistColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
);
$('.changing-existing-list-items-warning').removeClass('hidden');
initChecklistDropdown();
@ -45,7 +46,8 @@ var RepositoryChecklistColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
);
initChecklistDropdown();
initUpdatePlaceholder(this);
@ -55,7 +57,8 @@ var RepositoryChecklistColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
);
initChecklistDropdown();
})
@ -71,7 +74,7 @@ var RepositoryChecklistColumnType = (function() {
checkValidation: () => {
var $manageModal = $(manageModal);
var count = $manageModal.find('.items-count').attr('data-count');
return count < GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN;
return count <= GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN;
},
loadParams: () => {
var repositoryColumnParams = {};

View file

@ -83,7 +83,7 @@ var RepositoryListColumnType = (function() {
});
}
function refreshCounter(number) {
function refreshCounter(number, limit) {
var $manageModal = $(manageModal);
var $counterContainer = $manageModal.find('.limit-counter-container');
var $btn = $manageModal.find('.column-save-btn');
@ -91,7 +91,7 @@ var RepositoryListColumnType = (function() {
$counterContainer.find('.items-count').html(number).attr('data-count', number);
if (number >= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN) {
if (number > limit) {
$counterContainer.addClass('error-to-many-items');
$textarea.addClass('too-many-items');
$btn.addClass('disabled');
@ -102,11 +102,11 @@ var RepositoryListColumnType = (function() {
}
}
function refreshPreviewDropdownList(preview, textarea, delimiterContainer, dropdown) {
function refreshPreviewDropdownList(preview, textarea, delimiterContainer, dropdown, limit) {
var items = textToItems($(textarea).val(), delimiterContainer);
var hashItems = [];
drawDropdownPreview(items, preview);
refreshCounter(items.length);
refreshCounter(items.length, limit);
$.each(items, (index, option) => {
hashItems.push({ data: option });
@ -126,7 +126,8 @@ var RepositoryListColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
);
initListDropdown();
$('.changing-existing-list-items-warning').removeClass('hidden');
@ -137,7 +138,8 @@ var RepositoryListColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
);
initListDropdown();
})
@ -146,7 +148,8 @@ var RepositoryListColumnType = (function() {
previewContainer,
itemsTextarea,
delimiterDropdown,
dropdownOptions
dropdownOptions,
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
);
initListDropdown();
})
@ -162,7 +165,7 @@ var RepositoryListColumnType = (function() {
checkValidation: () => {
var $manageModal = $(manageModal);
var count = $manageModal.find('.items-count').attr('data-count');
return count < GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN;
return count <= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN;
},
loadParams: () => {
var repositoryColumnParams = {};
@ -172,8 +175,8 @@ var RepositoryListColumnType = (function() {
return repositoryColumnParams;
},
refreshPreviewDropdownList: (preview, textarea, delimiter, dropdown) => {
refreshPreviewDropdownList(preview, textarea, delimiter, dropdown);
refreshPreviewDropdownList: (preview, textarea, delimiter, dropdown, limit) => {
refreshPreviewDropdownList(preview, textarea, delimiter, dropdown, limit);
},
initListDropdown: () => {

View file

@ -158,7 +158,6 @@
function init(location) {
LOCATION = location;
global.addEventListener('paste', listener, false);
$.initTooltips();
}
function destroy() {

View file

@ -1,130 +0,0 @@
(function() {
'use strict';
$.initTooltips = function() {
var popoversArray = [];
var leaveTimeout;
var enterTimeout;
if ($(document.body).data('tooltips-enabled') === true || $(document.body).data('tooltips-enabled') == null) {
$('.tooltip_open').remove(); // Destroy all (if any) old open popovers
$('.help_tooltips').each(function(i, obj) {
var popoverObject = obj;
popoversArray.push(popoverObject);
});
$('.help_tooltips').each(function(i, obj) {
var link = $(obj).data('tooltiplink');
var textData = $(obj).data('tooltipcontent');
var customStyle = $(obj).data('tooltipstyle');
obj.dataset.tooltipId = i;
$(obj)
.popover({
html: true,
container: 'body',
placement: 'auto right',
trigger: 'manual',
content: 'popovers will not display if empty',
template:
'<div class="popover tooltip_' + i + '_window tooltip-open" '
+ 'role="tooltip" style="' + customStyle + '" data-popover-id="' + i + '">'
+ '<div class="popover-body" >' + textData + '</div>'
+ '<br><br><br>'
+ '<div class="popover-footer">'
+ '<a class="btn btn-link text-nowrap" href="' + link + '" target="_blank" rel="noopener noreferrer" >'
+ 'Read more&nbsp;&nbsp;&nbsp;<i class="fas fa-external-link-alt"></i>'
+ '</a>'
+ '</div>'
+ '</div>'
})
.off('shown.bs.popover')
.on('shown.bs.popover', function() {
// hide popup if object element hidden
if (!$(obj).is(':visible') || $(obj).is(':disabled')) {
$(obj).popover('hide');
}
// hide all other popovers
popoversArray.forEach(function(arrayItem) {
if (obj !== arrayItem) {
$(arrayItem).popover('hide');
}
});
})
.off('mouseleave')
.on('mouseleave', function() {
clearTimeout(enterTimeout);
leaveTimeout = setTimeout(function() {
if (!$('.tooltip_' + i + '_window:hover').length > 0) {
$(obj).popover('hide');
}
}, 100);
})
.off('mouseenter')
.on('mouseenter', function() {
clearTimeout(leaveTimeout);
enterTimeout = setTimeout(function() {
var top;
if ($(obj).hover().length > 0) {
$(obj).popover('show');
$('.tooltip_' + i + '_window').removeClass('tooltip-enter');
top = $(obj).offset().top;
$('.tooltip_' + i + '_window').css({
top: (top) + 'px'
});
$('.tooltip_' + i + '_window').off('mouseleave').on('mouseleave', function() {
$('.tooltip_' + i + '_window').removeClass('tooltip-enter');
$(obj).popover('hide');
});
$('.tooltip_' + i + '_window').off('mouseenter').on('mouseenter', function() {
$('.tooltip_' + i + '_window').addClass('tooltip-enter');
});
}
}, 1000);
});
});
}
$(document.body).on('click', function() {
$('.help_tooltips').each(function(i, obj) {
$(obj).popover('hide');
});
$('.popover.tooltip-open').each(function(i, obj) {
if ($('*[data-tooltip-id="' + obj.dataset.popoverId + '"]').length === 0) {
$(obj).remove();
}
});
});
$(document.body).on('mousemove', function(e) {
var mouse = { x: e.clientX, y: e.clientY };
$('.popover.tooltip-open').each(function(i, obj) {
var tooltipObj = '*[data-tooltip-id="' + obj.dataset.popoverId + '"]';
var objHeight;
var objWidth;
var objLeft;
var objTop;
var objCorners;
if ($(tooltipObj).length === 0) return;
objHeight = $(tooltipObj)[0].clientHeight;
objWidth = $(tooltipObj)[0].clientWidth;
objLeft = $(tooltipObj)[0].offsetLeft;
objTop = $(tooltipObj)[0].offsetTop;
objCorners = {
tl: { x: objLeft, y: objTop },
tr: { x: (objLeft + objWidth), y: objTop },
bl: { x: objLeft, y: (objTop + objHeight) },
br: { x: (objLeft + objWidth), y: (objTop + objHeight) }
};
if (
!(mouse.x > objCorners.tl.x && mouse.x < objCorners.br.x)
|| !(mouse.y > objCorners.tl.y && mouse.y < objCorners.br.y)
) {
$(tooltipObj).popover('hide');
}
});
});
};
$(document).on('turbolinks:load', function() {
$.initTooltips();
});
}());

View file

@ -76,19 +76,6 @@
);
}
// Initialize tooltips settings form
function tooltipSettings() {
var toggleInput = $('[name="tooltips_enabled"]');
toggleInput
.checkboxpicker({ onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle' });
if (toggleInput.attr('value') === 'true') {
toggleInput.prop('checked', true);
} else {
toggleInput.prop('checked', false);
}
}
// triggers submit action when the user clicks
function initTogglableSettingsForm() {
$('#togglable-settings-panel')
@ -148,6 +135,5 @@
initTimeZoneSelector();
initDateFormatSelector();
notificationsSettings();
tooltipSettings();
initTogglableSettingsForm();
})();

View file

@ -123,8 +123,8 @@
.fas-custom {
float: right;
margin-right: 5px;
top: 2px;
margin-right: 15px;
top: 17px;
}
.active {

View file

@ -23,6 +23,7 @@ class ProtocolsController < ApplicationController
linked_children
linked_children_datatable
)
before_action :switch_team_with_param, only: :index
before_action :check_view_all_permissions, only: %i(
index
datatable

View file

@ -31,6 +31,7 @@ class ReportsController < ApplicationController
only: %i(new edit available_repositories)
before_action :check_manage_permissions, only: BEFORE_ACTION_METHODS
before_action :switch_team_with_param, only: :index
# Index showing all reports of a single project
def index; end

View file

@ -5,7 +5,9 @@ class RepositoriesController < ApplicationController
include ActionView::Helpers::TagHelper
include ActionView::Context
include IconsHelper
include TeamsHelper
before_action :switch_team_with_param, only: :show
before_action :load_vars,
except: %i(index create create_modal parse_sheet)
before_action :load_parent_vars, except:

View file

@ -122,10 +122,10 @@ module Users
Activities::CreateActivityService
.call(activity_type: :invite_user_to_team,
owner: current_user,
subject: current_team,
team: current_team,
subject: @team,
team: @team,
message_items: {
team: current_team.id,
team: @team.id,
user_invited: user.id,
role: user_team.role_str
})

View file

@ -43,9 +43,6 @@ module Users
read_from_params(:system_message_notification_email) do |val|
@user.system_message_email_notification = val
end
read_from_params(:tooltips_enabled) do |val|
@user.settings[:tooltips_enabled] = val
end
if @user.save
respond_to do |format|
format.json do

View file

@ -198,12 +198,8 @@ class ProtocolsDatatable < CustomDatatable
end
def modules_html(record)
"<a href='#' data-action='load-linked-children' class='help_tooltips' " \
"data-tooltiplink='" +
I18n.t('tooltips.link.protocol.num_linked') +
"' data-tooltipcontent='" +
I18n.t('tooltips.text.protocol.num_linked') +
"' data-url='#{linked_children_protocol_path(record)}'>" \
"<a href='#' data-action='load-linked-children'" \
"data-url='#{linked_children_protocol_path(record)}'>" \
"#{record.nr_of_linked_children}" \
"</a>"
end

View file

@ -42,17 +42,17 @@ module GlobalActivitiesHelper
# Not link for now
return current_value
when Team
path = projects_path
path = projects_path(team: obj.id)
when Repository
path = repository_path(obj)
path = repository_path(obj, team: obj.team.id)
when RepositoryRow
return current_value unless obj.repository
path = repository_path(obj.repository)
path = repository_path(obj.repository, team: obj.repository.team.id)
when RepositoryColumn
return current_value unless obj.repository
path = repository_path(obj.repository)
path = repository_path(obj.repository, team: obj.repository.team.id)
when Project
path = obj.archived? ? projects_path : project_path(obj)
when Experiment
@ -69,11 +69,11 @@ module GlobalActivitiesHelper
end
when Protocol
if obj.in_repository_public?
path = protocols_path(type: :public)
path = protocols_path(type: :public, team: obj.team.id)
elsif obj.in_repository_private?
path = protocols_path(type: :private)
path = protocols_path(type: :private, team: obj.team.id)
elsif obj.in_repository_archived?
path = protocols_path(type: :archive)
path = protocols_path(type: :archive, team: obj.team.id)
elsif obj.my_module.navigable?
path = protocols_my_module_path(obj.my_module)
else
@ -86,7 +86,7 @@ module GlobalActivitiesHelper
when Step
return current_value
when Report
path = reports_path
path = reports_path(team: obj.team.id)
else
return current_value
end

View file

@ -20,4 +20,8 @@ module TeamsHelper
def team_created_by(team)
User.find_by_id(team.created_by_id)
end
def switch_team_with_param
current_team_switch(Team.find_by(id: params[:team])) if params[:team]
end
end

View file

@ -9,6 +9,7 @@ module TeamBySubjectModel
valid_subjects = Extends::ACTIVITY_SUBJECT_CHILDREN
# Check all activity subject
valid_subjects.each do |subject, _children|
subject = subject.to_s.camelize.to_sym
next unless subjects[subject]
parent_array = [subject.to_s.underscore]

View file

@ -43,8 +43,7 @@ class User < ApplicationRecord
recent: true,
recent_email: false,
system_message_email: false
},
tooltips_enabled: true
}
)
store_accessor :variables, :export_vars

View file

@ -18,7 +18,7 @@ module RepositoryColumns
to_be_deleted = existing_items_names - updating_items_names
to_be_created = updating_items_names - existing_items_names
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >=
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >
Constants::REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
@errors[:repository_column] = { repository_checklist_items: 'too many items' }

View file

@ -18,7 +18,7 @@ module RepositoryColumns
to_be_deleted = existing_items_names - updating_items_names
to_be_created = updating_items_names - existing_items_names
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >=
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >
Constants::REPOSITORY_LIST_ITEMS_PER_COLUMN
@errors[:repository_column] = { repository_list_items: 'too many items' }

View file

@ -116,10 +116,9 @@ module ProtocolsExporter
if step.tables.count > 0
step_xml << "<elnTables>\n"
step.tables.order(:id).each do |table|
table_xml = "<elnTable id=\"#{table.id}\" " \
"guid=\"#{get_guid(table.id)}\">\n"
table_xml << "<contents>#{table.contents.unpack1('H*')}" \
"</contents>\n"
table_xml = "<elnTable id=\"#{table.id}\" guid=\"#{get_guid(table.id)}\">\n"
table_xml << "<name>#{table.name}</name>\n"
table_xml << "<contents>#{table.contents.unpack1('H*')}</contents>\n"
table_xml << "</elnTable>\n"
step_xml << table_xml
end

View file

@ -10,9 +10,7 @@
>
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %>
<% if can_manage_experiment?(@experiment) %>
<%=link_to "", type: "button", class: "btn btn-primary help_tooltips", id: "canvas-new-module",
data: { tooltiplink: I18n.t('tooltips.link.task.new'),
tooltipcontent: I18n.t('tooltips.text.task.new') } do %>
<%=link_to "", type: "button", class: "btn btn-primary", id: "canvas-new-module" do %>
<span class="hbtn-default">
<span class="fas fa-credit-card"></span>
<%= t("experiments.canvas.edit.new_module") %>

View file

@ -1,8 +1,4 @@
<div
class="tags-container pull-right help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.task.color_tag') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.task.color_tag') %>"
>
<div class="tags-container pull-right">
<% tags2 = my_module.tags[0..3] %>
<% tags2.each do |tag| %>
<div style="color: <%= tag.color %>"

View file

@ -31,11 +31,7 @@
<div class="panel-body">
<% if !my_module.completed? && can_manage_module?(my_module) %>
<%= link_to due_date_my_module_path(my_module, format: :json), remote: true,
class: "due-date-link due-date-refresh help_tooltips",
data: {
tooltiplink: I18n.t('tooltips.link.task.due_date'),
tooltipcontent: I18n.t('tooltips.text.task.due_date')
} do %>
class: "due-date-link due-date-refresh" do %>
<%= render partial: "my_modules/card_due_date_label.html.erb", locals: { my_module: my_module, format: :full_date } %>
<% end %>
<% else %>

View file

@ -15,21 +15,15 @@
<li><%= link_to t('experiments.clone.label_title'),
clone_modal_experiment_url(experiment),
remote: true, type: 'button',
class: 'clone-experiment help_tooltips',
data: {
tooltiplink: I18n.t('tooltips.link.experiment.copy'),
tooltipcontent: I18n.t('tooltips.text.experiment.copy')
} %></li>
class: 'clone-experiment' %>
</li>
<% end %>
<% if can_move_experiment?(experiment) %>
<li><%= link_to t('experiments.move.label_title'),
move_modal_experiment_url(experiment),
remote: true, type: 'button',
class: 'move-experiment help_tooltips',
data: {
tooltiplink: I18n.t('tooltips.link.experiment.move'),
tooltipcontent: I18n.t('tooltips.text.experiment.move')
} %></li>
class: 'move-experiment'%>
</li>
<% end %>
<% if can_archive_experiment?(experiment) %>
<li><%= link_to t('experiments.archive.label_title'),

View file

@ -3,7 +3,7 @@
<div class="ga-breadcrumb">
<span class="fas fa-clipboard-check"></span>
<% if subject %>
<%= route_to_other_team(reports_path(subject),
<%= route_to_other_team(reports_path(subject, team: subject.team.id),
team,
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name) %>

View file

@ -3,7 +3,7 @@
<div class="ga-breadcrumb">
<span class="fas fa-list-alt"></span>
<% if subject %>
<%= route_to_other_team(repository_path(subject.id),
<%= route_to_other_team(repository_path(subject.id, team: subject.team.id),
team,
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name) %>

View file

@ -37,7 +37,6 @@
data-atwho-repositories-url="<%= atwho_repositories_team_path(current_team) %>"
data-atwho-rep-items-url="<%= atwho_rep_items_team_path(current_team) %>"
data-atwho-menu-items="<%= atwho_menu_items_team_path(current_team) %>"
data-tooltips-enabled="<%= current_user.settings[:tooltips_enabled] %>"
<% end %>
>

View file

@ -1,8 +1,6 @@
<% Repository.accessible_by_teams(current_team).order(created_at: :asc).each do |repository| %>
<li>
<a class="dropdown-item <%= "active-item" if @repository == repository %> help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.inventories') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.inventories') %>"
<a class="dropdown-item <%= "active-item" if @repository == repository %>"
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
title="<%= repository.name %>">
<% if enable_counters %>
@ -22,8 +20,7 @@
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
<li>
<a class="muted dropdown-item help_tooltips"
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.unshared_inventory') + repository.team.name %>"
<a class="muted dropdown-item"
title="<%= repository.name %>"
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">

View file

@ -1,8 +1,6 @@
<div class="pull-right my_module-state-buttons">
<% if can_complete_module?(@my_module) %>
<div class="btn-group help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.complete') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.complete') %>">
<div class="btn-group">
<% if !@my_module.completed? %>
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
<%= render 'my_modules/state_button_complete.html.erb' %>

View file

@ -18,11 +18,9 @@
</div>
<div class="repo-datatables-buttons pull-right" style="display: inline;">
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
<button class="btn btn-secondary manage-repo-column-index"
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
data-action="new"
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
data-action="new">
<span class="fas fa-wrench"></span>&nbsp;<%= t('repositories.index.columns') %>
</button>
</div>

View file

@ -18,9 +18,7 @@
<% if can_manage_module?(@my_module) %>
<div class="add-result-toolbar">
<span class="hidden-xs add-result-text"><%= t'my_modules.results.add_label' %></span>
<div class="sci-btn-group help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.task.results') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.task.results') %>">
<div class="sci-btn-group">
<a class="btn btn-primary"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"

View file

@ -22,11 +22,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-primary help_tooltips",
data: {
tooltiplink: I18n.t('tooltips.link.new_project'),
tooltipcontent: I18n.t('tooltips.text.new_project')
} %>
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-primary" %>
</div>
</div>
</div>

View file

@ -20,11 +20,7 @@
<% if can_clone_experiment?(experiment) %>
<%= link_to clone_modal_experiment_url(experiment),
remote: true, type: 'button',
class: 'clone-experiment help_tooltips pull-right',
data: {
tooltiplink: I18n.t('tooltips.link.experiment.copy'),
tooltipcontent: I18n.t('tooltips.text.experiment.copy')
} do %>
class: 'clone-experiment pull-right' do %>
<span class="fas fa-copy"></span>&nbsp;
<%= t('experiments.clone.label_title') %>
<% end %>
@ -33,7 +29,7 @@
<div class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></div>
<span class="help_tooltips panel-date" data-tooltiplink="<%= I18n.t('tooltips.link.experiment.dates') %>" data-tooltipcontent="<%= I18n.t('tooltips.text.experiment.dates') %>">
<span class="panel-date">
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
<%= l(experiment.created_at, format: :full_date) %> - <%= l(experiment.updated_at, format: :full_date) %>
</span>

View file

@ -16,11 +16,12 @@
<% repositories.each do |repository| %>
<li class="branch <%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
<span class="tree-link no-indent" title="<%= repository.name %>">
<%= link_to repository.name,
repository_path(repository),
<%= link_to repository_path(repository),
class: current_page?(repository_path(repository)) ? 'disabled line-wrap' : 'line-wrap',
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } %>
<%= inventory_shared_status_icon(repository, current_team) %>
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } do %>
<%= repository.name %>
<%= inventory_shared_status_icon(repository, current_team) %>
<% end %>
</span>
</li>
<% end %>

View file

@ -44,11 +44,9 @@
<% end %>
</div>
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
<button class="btn btn-secondary manage-repo-column-index"
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
data-action="new"
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
data-action="new">
<span class="fas fa-wrench"></span>&nbsp;<%= t('repositories.index.columns') %>
</button>
@ -113,10 +111,8 @@
<div class="toolbarButtonsDatatable" style="display:none">
<% if can_create_repository_rows?(@repository) %>
<button type="button" class="btn btn-primary editAdd help_tooltips"
id="addRepositoryRecord" onclick="onClickAddRecord()"
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.new') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.new') %>">
<button type="button" class="btn btn-primary editAdd"
id="addRepositoryRecord" onclick="onClickAddRecord()">
<span class="fas fa-plus"></span>
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
</button>

View file

@ -14,11 +14,9 @@
<div class="modal-footer">
<% if can_create_repository_columns?(@repository)%>
<button id="new-repo-column-modal"
class="btn btn-secondary help_tooltips manage-repo-column"
class="btn btn-secondary manage-repo-column"
data-modal-url="<%= repository_columns_create_html_path(@repository) %>"
data-action="new"
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
data-action="new">
<span class="fas fa-plus"></span>&nbsp;<%=t 'libraries.manange_modal_column_index.add_column' %>
</button>
<% end %>

View file

@ -1,9 +1,7 @@
<div class="well">
<%= form_for(@result, url: my_module_result_assets_path(format: :json), data: { type: :json }) do |f| %>
<div id="new-result-assets-select" class="text-center new-asset-box">
<span class="help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_add_files') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_add_files') %>">
<span>
<%= t('assets.drag_n_drop.label_html') %>
<label>
<span class="btn btn-default new-asset-upload-button">

View file

@ -117,18 +117,14 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
</button>
<!-- Invite buttons -->
<button type="button" class="btn btn-primary help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
<button type="button" class="btn btn-primary"
data-role="invite-btn" data-action="invite"
disabled="disabled">
<%= t('invite_users.invite_btn') %>
</button>
<div class="btn-group" data-role="invite-with-role-div">
<button type="button" class="btn btn-primary dropdown-toggle help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" data-id="invite-btn" aria-haspopup="true"
aria-expanded="false" data-role="invite-with-role-btn"
disabled="disabled">

View file

@ -52,9 +52,7 @@
</div>
<div class="tab-pane" role="tabpanel" id="new-step-assets">
<div class="text-center new-asset-box">
<span class="help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_add_files') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_add_files') %>">
<span>
<%=t 'assets.drag_n_drop.label_html' %>
<label>
<span class="btn btn-default new-asset-upload-button">

View file

@ -127,26 +127,6 @@
</div>
</div>
</div>
<hr>
<div class="preferences-settings-container">
<h4><%= t('users.settings.account.preferences.edit.tips.title') %></h4>
<div class="row">
<div class="col-sm-2">
</div>
<div class="col-sm-10">
<p><%=t 'users.settings.account.preferences.edit.tips.text1' %></p>
<p><%=t 'users.settings.account.preferences.edit.tips.text2' %></p>
<div class="row">
<div class="col-sm-4">
<%=t 'users.settings.account.preferences.edit.tips.toggle' %>
</div>
<div class="col-sm-8">
<%= check_box_tag :tooltips_enabled, @user.settings[:tooltips_enabled] %>
</div>
</div>
</div>
</div>
</div>
<% end %>
<br>
</div>

View file

@ -1623,11 +1623,6 @@ en:
date_format_label: "Date format"
date_format_sublabel: "Date format setting affects all date display throughout application."
date_format_title: "Date format"
tips:
title: "Help Tips"
text1: "When you place your mouse cursor on a certain element in SciNote and hold it for a bit, a short and helpful description will appear."
text2: "If you feel confident in SciNote already, you can turn off these Help Tips."
toggle: "Show Help Tips"
update_flash: "Preferences successfully updated."
addons:
head_title: "Settings | Add-ons"
@ -2350,57 +2345,6 @@ en:
invite_users:
permission_error: "You don't have permission to invite additional users to this team. Contact its administrator/s."
tooltips:
text:
invite_to_sci: "Invite other scientists to SciNote and gain additional free storage space for your team. How?"
new_project: "Project is the topmost layer when you are organizing your data in SciNote. It allows you to assign members and keep all project-related data within one project card."
experiment:
copy: "Copy this experiment as a template to another project. Only tasks and protocol steps will be copied!"
dates: "You can see the date when this experiment was created and when it was last modified."
move: "Move your experiment with all its tasks to another project. Make sure that members of both projects are the same even if a few other members were added."
task:
due_date: "Set due dates to your tasks and stay organized."
new: "Your experiment can be defined by a series of tasks. Start by adding the tasks and, if needed, connect them into a workflow."
color_tag: "Create personalised colorful tags to mark your tasks."
due_date_specific: "Set a due date to a specific task."
results: "You have three options to save your lab results: as classic text, created table or uploaded file from computer."
protocol:
step_edit: "You can edit the name and description of a protocol step, add checklists, tables or files."
step_add_files: "Drag and drop your files here. SciNote supports all types of files and images."
linking: "By linking the protocol in your task and the protocol in a repository you can see if any of the versions has been modified and decide to update either of them at any point."
complete: "You can complete the task if you are done working on it."
inventories: "You can assign inventory items to your task."
num_linked: "This number represents how many tasks are linked to the selected protocol."
unshared_inventory: "This Inventory has been unshared with your Team by "
inventory:
new: "Inventories in SciNote enable you to manage all your resources, from samples, reagents, lab equipment, plasmids, etc."
visibility: "You can make inventory columns visible or hidden."
manage_columns: "Add custom columns to your inventory table and choose whether the rows will contain text, number, file, date, time or be defined as a checklist, dropdown or status list."
link:
invite_to_sci: "https://support.scinote.net/hc/en-us/articles/115003902929"
new_project: "https://support.scinote.net/hc/en-us/articles/115003373852"
experiment:
copy: "https://support.scinote.net/hc/en-us/articles/115001434365"
dates: "https://support.scinote.net/hc/en-us/articles/115001799832"
move: "https://support.scinote.net/hc/en-us/articles/115001434385"
task:
due_date: "https://support.scinote.net/hc/en-us/articles/360000527572"
new: "https://support.scinote.net/hc/en-us/articles/360000537411"
color_tag: "https://support.scinote.net/hc/en-us/articles/360007237912"
due_date_specific: "https://support.scinote.net/hc/en-us/articles/360000527572"
results: "https://support.scinote.net/hc/en-us/articles/360007238592"
protocol:
step_edit: "https://support.scinote.net/hc/en-us/articles/115001788051"
step_add_files: "https://support.scinote.net/hc/en-us/articles/360007237252"
linking: "https://support.scinote.net/hc/en-us/articles/115003680385"
complete: "https://support.scinote.net/hc/en-us/articles/115001799812"
inventories: "https://support.scinote.net/hc/en-us/articles/360004694971"
num_linked: "https://support.scinote.net/hc/en-us/articles/115001788711"
inventory:
new: "https://support.scinote.net/hc/en-us/articles/360004627792"
visibility: "https://support.scinote.net/hc/en-us/articles/360004627472"
manage_columns: "https://support.scinote.net/hc/en-us/articles/360004695831"
marvinjs:
new_sketch: "New Chemical Drawing"
new_button: "Create Chemical Drawing"

View file

@ -45,9 +45,9 @@ en:
add_comment_to_project_html: "%{user} commented on project %{project}."
edit_project_comment_html: "%{user} edited comment on project %{project}."
delete_project_comment_html: "%{user} deleted comment on project %{project}."
create_report_html: "%{user} created report <strong>%{report}</strong>."
edit_report_html: "%{user} edited report <strong>%{report}</strong>."
delete_report_html: "%{user} deleted report <strong>%{report}</strong>."
create_report_html: "%{user} created report %{report}."
edit_report_html: "%{user} edited report %{report}."
delete_report_html: "%{user} deleted report %{report}."
add_result_html: "%{user} added %{type_of_result} result %{result}."
edit_result_html: "%{user} edited %{type_of_result} result %{result}."
add_comment_to_result_html: "%{user} commented on result %{result}."

View file

@ -68,7 +68,7 @@ describe RepositoryColumns::UpdateListColumnService do
context 'when there is more than 500 items' do
let(:params) do
{
repository_list_items_attributes: Array(1..510).map { |e| { data: "Item #{e}" } }
repository_list_items_attributes: Array(1..501).map { |e| { data: "Item #{e}" } }
}
end