From 6669beaf0ef6110d56468c06923a087210f351cd Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 9 Jul 2018 13:13:44 +0200 Subject: [PATCH] Change icons throughout the rest of application [SCI-2445] --- app/assets/javascripts/application.js.erb | 12 +++++----- .../javascripts/my_modules/results.js.erb | 16 +++++++------- app/assets/javascripts/projects/canvas.js.erb | 4 ++-- app/assets/javascripts/protocols/steps.js.erb | 22 +++++++++---------- .../repository_columns/index.js.erb | 2 +- .../samples/sample_datatable.js.erb | 18 +++++++-------- app/assets/javascripts/sidebar.js.erb | 2 +- .../javascripts/sitewide/atwho_res.js.erb | 6 ++--- .../javascripts/sitewide/drag_n_drop.js.erb | 8 +++---- .../javascripts/sitewide/string_utils.js | 2 +- app/assets/stylesheets/constants.scss | 5 ----- app/assets/stylesheets/mixins.scss | 9 -------- .../stylesheets/partials/_tree_view.scss | 6 ++--- app/assets/stylesheets/projects.scss | 4 ++-- app/assets/stylesheets/reports_pdf.scss | 4 ++-- .../stylesheets/sample_types_groups.scss | 4 ++-- .../stylesheets/themes/main_navigation.scss | 2 +- app/assets/stylesheets/themes/scinote.scss | 10 ++++----- .../protocol_linked_children_datatable.rb | 2 +- app/datatables/sample_datatable.rb | 4 ++-- app/datatables/teams_datatable.rb | 2 +- app/helpers/application_helper.rb | 2 +- app/helpers/bootstrap_form_helper.rb | 6 ++--- app/javascript/packs/fontawesome.scss | 6 ++--- .../AlertsContainer/components/Alert.jsx | 20 ++++++++--------- .../Navigation/components/InfoDropdown.jsx | 2 +- .../components/NotificationImage.jsx | 2 +- .../Navigation/components/SearchDropdown.jsx | 2 +- .../SettingsPage/scenes/preferences/index.jsx | 2 +- app/views/canvas/_edit.html.erb | 6 ++--- app/views/canvas/edit/_my_module.html.erb | 2 +- app/views/comments/_edit.html.erb | 2 +- app/views/experiments/canvas.html.erb | 8 +++---- app/views/layouts/sign_in_halt.html.erb | 2 +- app/views/my_module_tags/_index_edit.html.erb | 10 ++++----- app/views/my_modules/_due_date_label.html.erb | 6 ++--- app/views/my_modules/_module_header.html.erb | 12 +++++----- app/views/my_modules/_result.html.erb | 8 +++---- .../_state_button_complete.html.erb | 2 +- .../_state_button_uncomplete.html.erb | 2 +- app/views/my_modules/archive/_result.html.erb | 6 ++--- .../protocols/_protocol_buttons.html.erb | 18 +++++++-------- .../_protocol_status_bar_buttons.html.erb | 20 ++++++++--------- app/views/my_modules/repository.html.erb | 4 ++-- app/views/my_modules/results.html.erb | 8 +++---- app/views/projects/_notifications.html.erb | 4 ++-- app/views/projects/archive.html.erb | 2 +- .../experiment_archive/_experiment.html.erb | 6 ++--- app/views/projects/index.html.erb | 6 ++--- app/views/projects/show.html.erb | 4 ++-- app/views/projects/show/_experiment.html.erb | 2 +- app/views/protocols/_header.html.erb | 16 +++++++------- app/views/protocols/_steps.html.erb | 6 ++--- .../_import_json_protocol_p_desc.html.erb | 2 +- .../_import_json_protocol_s_desc.html.erb | 2 +- .../import_export/_import_modal.html.erb | 8 +++---- .../import_export/_preview_templates.html.erb | 2 +- app/views/protocols/index.html.erb | 16 +++++++------- .../index/_import_results_modal.html.erb | 2 +- .../_protocol_preview_modal_body.html.erb | 10 ++++----- .../index/_results_modal_body.html.erb | 2 +- .../elements/_element_controls.html.erb | 10 ++++----- .../elements/_my_module_element.html.erb | 4 ++-- .../_my_module_result_asset_element.html.erb | 4 ++-- .../_my_module_result_text_element.html.erb | 4 ++-- .../_my_module_samples_element.html.erb | 4 ++-- .../elements/_my_module_step_element.html.erb | 4 ++-- .../reports/elements/_new_element.html.erb | 2 +- .../elements/_project_header_element.html.erb | 2 +- .../elements/_step_asset_element.html.erb | 4 ++-- app/views/reports/index.html.erb | 4 ++-- .../reports/new/_report_navigation.html.erb | 6 ++--- .../new/modal/_experiment_contents.html.erb | 4 ++-- .../new/modal/_module_contents.html.erb | 2 +- .../new/modal/_project_contents.html.erb | 4 ++-- .../_delete_repository_modal.html.erb | 2 +- .../_repository_row_info_modal.html.erb | 2 +- app/views/repositories/index.html.erb | 2 +- app/views/repositories/show.html.erb | 12 +++++----- .../_delete_column_modal_body.html.erb | 2 +- app/views/repository_columns/index.html.erb | 4 ++-- app/views/result_assets/_new.html.erb | 2 +- .../sample_groups/_sample_group.html.erb | 2 +- app/views/sample_my_modules/_index.html.erb | 2 +- app/views/sample_types/_sample_type.html.erb | 2 +- .../_delete_custom_field_modal_body.html.erb | 2 +- app/views/samples/_info_sample_modal.html.erb | 4 ++-- app/views/search/index.html.erb | 10 ++++----- app/views/search/new.html.erb | 2 +- app/views/search/results/_assets.html.erb | 4 ++-- app/views/search/results/_checklists.html.erb | 2 +- app/views/search/results/_modules.html.erb | 2 +- app/views/search/results/_results.html.erb | 6 ++--- app/views/search/results/_samples.html.erb | 4 ++-- app/views/search/results/_steps.html.erb | 2 +- app/views/shared/_file_preview_modal.html.erb | 4 ++-- app/views/shared/_flash_alerts.html.erb | 6 ++--- app/views/shared/_navigation.html.erb | 4 ++-- app/views/shared/_sample.html.erb | 4 ++-- app/views/shared/_samples.html.erb | 16 +++++++------- .../shared/_secondary_navigation.html.erb | 12 +++++----- app/views/shared/sidebar/_my_modules.html.erb | 2 +- app/views/steps/_empty_step.html.erb | 8 +++---- app/views/steps/_form_assets.html.erb | 4 ++-- app/views/steps/_form_checklists.html.erb | 6 ++--- app/views/steps/_form_tables.html.erb | 2 +- app/views/steps/_step.html.erb | 12 +++++----- .../user_my_modules/_index_edit.html.erb | 4 ++-- .../icons/_system_message.html.erb | 2 +- app/views/user_projects/_index_edit.html.erb | 4 ++-- app/views/users/registrations/edit.html.erb | 2 +- app/views/users/settings/_sidebar.html.erb | 4 ++-- .../account/preferences/index.html.erb | 2 +- .../settings/teams/_user_dropdown.html.erb | 12 +++++----- app/views/users/settings/teams/index.html.erb | 2 +- app/views/users/settings/teams/show.html.erb | 8 +++---- .../_destroy_user_team_modal_body.html.erb | 2 +- .../_leave_user_team_modal_body.html.erb | 2 +- package-lock.json | 9 ++++---- package.json | 2 +- 120 files changed, 321 insertions(+), 334 deletions(-) diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index 1dd1c5f92..f83ff8de2 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -209,21 +209,21 @@ var HelperModule = (function(){ } helpers.flashAlertMsg = function(message, type) { - var alertType, glyphSign; + var alertType, fasSign; $('#notifications').html(''); if (type === 'success') { alertType = ' alert-success '; - glyphSign = ' glyphicon-ok-sign '; + fasSign = ' fa-check-circle '; } else if (type === 'danger') { alertType = ' alert-danger '; - glyphSign = ' glyphicon-exclamation-sign '; + fasSign = ' fa-exclamation-circle '; } else if (type === 'info') { alertType = ' alert-info '; - glyphSign = ' glyphicon-exclamation-sign '; + fasSign = ' fa-exclamation-circle '; } else if (type === 'warning') { alertType = ' alert-warning '; - glyphSign = ' glyphicon-exclamation-sign '; + fasSign = ' fa-exclamation-circle '; } var htmlSnippet = '
' + @@ -231,7 +231,7 @@ var HelperModule = (function(){ '' + - ' ' + + ' ' + '' + message + '' + '
' + ''; diff --git a/app/assets/javascripts/my_modules/results.js.erb b/app/assets/javascripts/my_modules/results.js.erb index e44bab9a9..8fafa0e07 100644 --- a/app/assets/javascripts/my_modules/results.js.erb +++ b/app/assets/javascripts/my_modules/results.js.erb @@ -28,8 +28,8 @@ $('#results-collapse-btn').click(function () { $('.result .panel-collapse').collapse('hide'); $(document).find('span.collapse-result-icon').each(function() { - $(this).addClass('glyphicon-collapse-down'); - $(this).removeClass('glyphicon-collapse-up'); + $(this).addClass('fa-caret-square-down'); + $(this).removeClass('fa-caret-square-up'); }); }); @@ -80,8 +80,8 @@ var collapseIcon = $(this).find('.collapse-result-icon'); var collapsed = $(this).hasClass('collapsed'); // Toggle collapse button - collapseIcon.toggleClass('glyphicon-collapse-up', !collapsed); - collapseIcon.toggleClass('glyphicon-collapse-down', collapsed); + collapseIcon.toggleClass('fa-caret-square-up', !collapsed); + collapseIcon.toggleClass('fa-caret-square-down', collapsed); }); } @@ -100,8 +100,8 @@ function _expandAllResults() { $('.result .panel-collapse').collapse('show'); $(document).find('span.collapse-result-icon').each(function() { - $(this).addClass('glyphicon-collapse-up'); - $(this).removeClass('glyphicon-collapse-down'); + $(this).addClass('fa-caret-square-up'); + $(this).removeClass('fa-caret-square-down'); }); $(document).find('div.step-result-hot-table').each(function() { _renderTable(this); @@ -111,8 +111,8 @@ function expandResult(result) { $('.panel-collapse', result).collapse('show'); $(result).find('span.collapse-result-icon').each(function() { - $(this).addClass('glyphicon-collapse-up'); - $(this).removeClass('glyphicon-collapse-down'); + $(this).addClass('fa-caret-square-up'); + $(this).removeClass('fa-caret-square-down'); }); _renderTable($(result).find('div.step-result-hot-table')); animateSpinner(null, false); diff --git a/app/assets/javascripts/projects/canvas.js.erb b/app/assets/javascripts/projects/canvas.js.erb index 1ca361b59..e86ddcd25 100644 --- a/app/assets/javascripts/projects/canvas.js.erb +++ b/app/assets/javascripts/projects/canvas.js.erb @@ -1119,8 +1119,8 @@ function updateModuleHtml(module, id, name, gridDistX, gridDistY) { var toggleIcon = document.createElement("span"); $(toggleIcon) - .addClass("glyphicon") - .addClass("glyphicon-triangle-bottom") + .addClass("fas") + .addClass("fa-caret-down") .attr("aria-hidden", "true") .appendTo(dropdownToggle); diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index c41de1592..edadf8b91 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -48,7 +48,7 @@ $('.task-state-label').html(data.module_state_label); task_button .find('button') - .html(' ' + + .html(' ' + data.task_button_title); modal.modal('hide'); }, @@ -81,7 +81,7 @@ button = step.find("[data-action='complete-step']"); button.attr("data-action", "uncomplete-step"); button.find(".btn").removeClass("btn-toggle").addClass("btn-default"); - button.find("button").html(' ' + data.new_title); + button.find("button").html(' ' + data.new_title); if (data.task_ready_to_complete) { $('#completed-task-modal').modal('show'); @@ -94,7 +94,7 @@ button = step.find("[data-action='uncomplete-step']"); button.attr("data-action", "complete-step"); button.find(".btn").removeClass("btn-default").addClass("btn-toggle"); - button.find("button").html(' ' + data.new_title); + button.find("button").html(' ' + data.new_title); } }, error: function (data) { @@ -196,8 +196,8 @@ var collapseIcon = $(this).find(".collapse-step-icon"); var collapsed = $(this).hasClass("collapsed"); // Toggle collapse button - collapseIcon.toggleClass("glyphicon-collapse-up", !collapsed); - collapseIcon.toggleClass("glyphicon-collapse-down", collapsed); + collapseIcon.toggleClass("fa-caret-square-up", !collapsed); + collapseIcon.toggleClass("fa-caret-square-down", collapsed); }); } @@ -620,16 +620,16 @@ renderTable($(this)); }); $(document).find("span.collapse-step-icon").each(function() { - $(this).addClass("glyphicon-collapse-up"); - $(this).removeClass("glyphicon-collapse-down"); + $(this).addClass("fa-caret-square-up"); + $(this).removeClass("fa-caret-square-down"); }); } function expandStep(step) { $('.panel-collapse', step).collapse('show'); $(step).find("span.collapse-step-icon") - .addClass("glyphicon-collapse-up") - .removeClass("glyphicon-collapse-down"); + .addClass("fa-caret-square-up") + .removeClass("fa-caret-square-down"); $(step).find("div.step-result-hot-table").each(function() { renderTable($(this)); }); @@ -667,8 +667,8 @@ $("[data-action='collapse-steps']").click(function () { $('.step .panel-collapse').collapse('hide'); $(document).find("span.collapse-step-icon").each(function() { - $(this).addClass("glyphicon-collapse-down"); - $(this).removeClass("glyphicon-collapse-up"); + $(this).addClass("fa-caret-square-down"); + $(this).removeClass("fa-caret-square-up"); }); }); diff --git a/app/assets/javascripts/repository_columns/index.js.erb b/app/assets/javascripts/repository_columns/index.js.erb index 7d1da2db7..c598e277d 100644 --- a/app/assets/javascripts/repository_columns/index.js.erb +++ b/app/assets/javascripts/repository_columns/index.js.erb @@ -121,7 +121,7 @@ html += ' '; html += '<%= I18n.t "libraries.repository_columns.index.edit_column" %> '; html += ''; $(html).insertBefore('.repository-columns-body ul li:first') diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb index 2bb7e9550..d633a7f9c 100644 --- a/app/assets/javascripts/samples/sample_datatable.js.erb +++ b/app/assets/javascripts/samples/sample_datatable.js.erb @@ -921,11 +921,11 @@ function createSampleGroupSelect(data, selected) { $option = $('') .attr('value', -1).text(I18n.t('samples.table.no_group')) - .attr('data-icon', 'glyphicon glyphicon-asterisk'); + .attr('data-icon', 'fas fa-asterisk'); $selectGroup.append($option); $.each(data, function(i, val) { - var $span = $('').addClass('glyphicon glyphicon-asterisk') + var $span = $('').addClass('fas fa-asterisk') .css('color', val.color); var $option = $('') .attr('value', val.id).text(val.name) @@ -1077,7 +1077,7 @@ function changeToEditMode() { var editable = $(el).is('[data-editable]'); var deletable = $(el).is('[data-deletable]'); - var visClass = (visible) ? 'fas fa-eye' : 'glyphicon-eye-close'; + var visClass = (visible) ? 'fa-eye' : 'fa-eye-slash'; var visLi = (visible) ? '' : 'col-invisible'; var editClass = (editable) ? '' : 'disabled'; var delClass = (deletable) ? '' : 'disabled'; @@ -1102,11 +1102,11 @@ function changeToEditMode() { '' + generateColumnNameTooltip(thederName) + ' ' + '' + '' + - '' + - '' + - '"> ' + + '' + + '' + + '"> ' + '">' + - '">' + + '">' + '
'; dropdownList.append(html); } @@ -1140,14 +1140,14 @@ function changeToEditMode() { var column = table.column(li.attr('data-position')); if (column.visible()) { - self.addClass('glyphicon-eye-close'); + self.addClass('fa-eye-slash'); self.removeClass('fas fa-eye'); li.addClass('col-invisible'); column.visible(false); table.setColumnSearchable(column.index(), false); } else { self.addClass('fas fa-eye'); - self.removeClass('glyphicon-eye-close'); + self.removeClass('fa-eye-slash'); li.removeClass('col-invisible'); column.visible(true); table.setColumnSearchable(column.index(), true); diff --git a/app/assets/javascripts/sidebar.js.erb b/app/assets/javascripts/sidebar.js.erb index 4ba1f43f3..7afcce2c6 100644 --- a/app/assets/javascripts/sidebar.js.erb +++ b/app/assets/javascripts/sidebar.js.erb @@ -124,7 +124,7 @@ $(".tree li.parent_li ") .find("> span i") .removeClass("no-arrow") - .addClass("glyphicon glyphicon-triangle-right expanded"); + .addClass("fas fa-caret-right expanded"); // Add IDs to all parent var i = 0; diff --git a/app/assets/javascripts/sitewide/atwho_res.js.erb b/app/assets/javascripts/sitewide/atwho_res.js.erb index 78a4f207e..b2677a9ef 100644 --- a/app/assets/javascripts/sitewide/atwho_res.js.erb +++ b/app/assets/javascripts/sitewide/atwho_res.js.erb @@ -172,7 +172,7 @@ var SmartAnnotation = (function() { '">Tasks' + rep_buttons + '
' + - '' + + '' + '
' + '
' + '
' + @@ -458,7 +458,7 @@ var SmartAnnotation = (function() { '
' + '
' + '
' + - '' + + '' + '
' + '', limit: <%= Constants::ATWHO_SEARCH_LIMIT %>, @@ -480,7 +480,7 @@ var SmartAnnotation = (function() { // Closes the atwho popup * needed in repositories to close the popup // if nothing is selected and the user leaves the form * function closePopup() { - $('.atwho-header-res').find('.glyphicon-remove').click(); + $('.atwho-header-res').find('.fa-times').click(); } function initialize(field) { diff --git a/app/assets/javascripts/sitewide/drag_n_drop.js.erb b/app/assets/javascripts/sitewide/drag_n_drop.js.erb index dcc56621c..f932745a8 100644 --- a/app/assets/javascripts/sitewide/drag_n_drop.js.erb +++ b/app/assets/javascripts/sitewide/drag_n_drop.js.erb @@ -270,11 +270,11 @@ function _uploadedAssetPreview(asset, i) { var html = '
'; html += '
'; - html += ''; + html += ''; html += '<%= I18n.t 'assets.drag_n_drop.file_label' %>'; html += '
'; html += ''; - html += '
'; + html += '
'; html += '
'; html += ' '; @@ -442,11 +442,11 @@ function _uploadedAssetPreview(asset, i) { var html = '
'; html += '
'; - html += ''; + html += ''; html += '<%= I18n.t 'assets.drag_n_drop.file_label' %>'; html += '
'; html += ''; - html += '
'; + html += '
'; html += '
'; html += ''; html += ' " \ + " " \ "#{I18n.t('samples.table.no_group')}" else - " " \ "#{escape_input(record.sample_group.name)}" end diff --git a/app/datatables/teams_datatable.rb b/app/datatables/teams_datatable.rb index 76f8db8dd..6dbfac5de 100644 --- a/app/datatables/teams_datatable.rb +++ b/app/datatables/teams_datatable.rb @@ -71,7 +71,7 @@ class TeamsDatatable < CustomDatatable # If user is last admin of team, don't allow # him/her to leave team def leave_team_button(user_team) - button = " + button = " #{I18n.t('users.settings.teams.index.leave')} " diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7af454f11..c54d255a9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -148,7 +148,7 @@ module ApplicationHelper alt='thumb'>
#{user.full_name}
- +

#{user.email}

) if user_still_in_team diff --git a/app/helpers/bootstrap_form_helper.rb b/app/helpers/bootstrap_form_helper.rb index 1db04fe84..b711edb93 100644 --- a/app/helpers/bootstrap_form_helper.rb +++ b/app/helpers/bootstrap_form_helper.rb @@ -48,7 +48,7 @@ module BootstrapFormHelper end res << "" if options[:clear] then - res << "
" + res << "
" end res << "