Skip to content

Commit

Permalink
Merge pull request #267 from ncbo/bootstrap-5
Browse files Browse the repository at this point in the history
Upgrade to Bootstrap 5
  • Loading branch information
jvendetti authored Nov 16, 2023
2 parents 6e13441 + d25fe71 commit 8235b63
Show file tree
Hide file tree
Showing 55 changed files with 1,152 additions and 1,018 deletions.
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ source 'https://rubygems.org'
gem 'rails', '6.1.7.3'

gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.0.3'
gem 'terser'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# gem 'duktape'

gem 'bootstrap', '~> 4.1.0'
gem 'bootstrap', '~> 5.2.3'
gem 'chart-js-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
Expand All @@ -26,9 +26,12 @@ gem 'select2-rails'
# To use debugger
# gem 'debugger'

gem 'base64', '0.1.0'
gem 'cube-ruby', require: 'cube'
gem 'dalli'
gem 'flamegraph'
# Version 2.1 breaks graphql-client. See: https://github.com/github/graphql-client/issues/310.
gem 'graphql', '~> 2.0.27'
gem 'graphql-client'
gem 'haml', '~> 5.1'
gem 'i18n'
Expand Down
62 changes: 36 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ GEM
airbrussh (1.4.2)
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
autoprefixer-rails (10.4.13.0)
autoprefixer-rails (10.4.15.0)
execjs (~> 2)
base64 (0.1.1)
base64 (0.1.0)
bcrypt_pbkdf (1.1.0)
bootstrap (4.1.3)
autoprefixer-rails (>= 6.0.3)
popper_js (>= 1.12.9, < 2)
sass (>= 3.5.2)
bootstrap (5.2.3)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 2.11.6, < 3)
sassc-rails (>= 2.0.0)
brakeman (6.0.1)
builder (3.2.4)
capistrano (3.17.3)
Expand Down Expand Up @@ -136,9 +136,10 @@ GEM
erubi (1.12.0)
erubis (2.7.0)
eventmachine (1.2.7)
excon (0.102.0)
execjs (2.8.1)
faraday (2.7.10)
excon (0.103.0)
execjs (2.9.0)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-excon (2.1.0)
Expand All @@ -149,9 +150,9 @@ GEM
faraday-net_http (3.0.2)
ffi (1.15.5)
flamegraph (0.9.5)
globalid (1.1.0)
activesupport (>= 5.0)
graphql (2.0.26)
globalid (1.2.1)
activesupport (>= 6.1)
graphql (2.0.27)
graphql-client (0.18.0)
activesupport (>= 3.0)
graphql
Expand Down Expand Up @@ -196,7 +197,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mini_mime (1.1.5)
minitest (5.19.0)
minitest (5.20.0)
multi_json (1.15.0)
multipart-post (2.3.0)
mysql2 (0.5.5)
Expand All @@ -213,21 +214,21 @@ GEM
net-protocol
net-ssh (7.2.0)
netrc (0.11.0)
newrelic_rpm (9.4.2)
newrelic_rpm (9.5.0)
nio4r (2.5.9)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
oj (3.16.0)
oj (3.16.1)
open_uri_redirections (0.2.1)
parallel (1.23.0)
parser (3.2.2.3)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
popper_js (1.16.1)
popper_js (2.11.8)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -303,12 +304,11 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubocop (1.56.2)
base64 (~> 0.1.1)
rubocop (1.57.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand All @@ -332,6 +332,14 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
select2-rails (4.0.13)
sexp_processor (4.17.0)
spawnling (2.1.5)
Expand All @@ -347,17 +355,17 @@ GEM
net-ssh (>= 2.8.0)
stackprof (0.2.25)
temple (0.10.2)
terser (1.1.19)
execjs (>= 0.3.0, < 3)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.2.2)
tilt (2.2.0)
tilt (2.3.0)
timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
Expand All @@ -376,8 +384,9 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
base64 (= 0.1.0)
bcrypt_pbkdf (>= 1.0, < 2.0)
bootstrap (~> 4.1.0)
bootstrap (~> 5.2.3)
brakeman
capistrano (~> 3.17)
capistrano-bundler
Expand All @@ -392,6 +401,7 @@ DEPENDENCIES
dalli
ed25519 (>= 1.2, < 2.0)
flamegraph
graphql (~> 2.0.27)
graphql-client
haml (~> 5.1)
html2haml
Expand Down Expand Up @@ -420,9 +430,9 @@ DEPENDENCIES
sass-rails (~> 5.0)
select2-rails
stackprof
terser
thin
uglifier (>= 1.0.3)
will_paginate (~> 3.0)

BUNDLED WITH
2.4.18
2.4.19
8 changes: 4 additions & 4 deletions app/assets/javascripts/admin/licenses.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
jQuery(".admin.index").ready(function() {

jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var href = jQuery(e.target).data('href');
if (typeof href !== 'undefined' && href === '/admin/licenses') {
jQuery('button[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
const target = jQuery(e.target).data('bsTarget');
if (typeof target !== 'undefined' && target === '#licensing') {
jQuery.ajax({
method: 'GET',
url: href,
url: 'admin/licenses',
success: function(data){},
error: function(data){}
});
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/bioportal.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ function bpPopWindow(e) {
newWindow.focus()
};
}
jQuery("div.footer-support, div.dropdown-menu.dropdown-menu-right").on("click", "a.pop_window", { w: "800", h: "600" }, bpPopWindow)
jQuery("div.footer-support, ul.dropdown-menu.dropdown-menu-end").on("click", "a.pop_window", { w: "800", h: "600" }, bpPopWindow)

/**************************************************************
* Standardized BP modal popups
Expand Down
6 changes: 3 additions & 3 deletions app/assets/javascripts/bp_annotatorplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function get_annotations() {
}

jQuery("#annotations_container").hide();
jQuery(".annotator_spinner").show();
jQuery(".annotator_spinner").css('display', 'inline-block');
ajax_process_halt();

var params = {},
Expand Down Expand Up @@ -148,12 +148,12 @@ function get_annotations() {
success: function(data) {
set_last_params(params);
display_annotations(data, bp_last_params);
jQuery(".annotator_spinner").hide(200);
jQuery(".annotator_spinner").hide();
jQuery("#annotations_container").show(300);
},
error: function(data) {
set_last_params(params);
jQuery(".annotator_spinner").hide(200);
jQuery(".annotator_spinner").hide();
jQuery("#annotations_container").hide();
jQuery("#annotator_error").html(" Problem getting annotations, please try again");
}
Expand Down
4 changes: 3 additions & 1 deletion app/assets/javascripts/bp_ontology_viewer.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ jQuery(document).ready(function() {
if (typeof jQuery.bioportal.ont_pages[content_section].init === 'function') {
jQuery.bioportal.ont_pages[content_section].init(jQuery.bioportal.ont_pages[content_section]);
}
jQuery("#ont-" + content_section + "-tab").tab("show");
const triggerEl = document.querySelector(`#navbar-ontology a[data-bs-target="#ont_${content_section}_content"]`);
const tabTrigger = new bootstrap.Tab(triggerEl);
bootstrap.Tab.getInstance(triggerEl).show();

// Retrieve AJAX content if not already displayed
if ($.QueryString["skip_ajax_tabs"] != 'true') {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/bp_search.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function performSearch() {
// Display error message if no results found
if (data.collection.length === 0) {
result_count.html("");
jQuery("#search_results").html("<h2 style='padding-top: 1em;'>No matches found</h2>");
jQuery("#search_results").html("<h2>No matches found</h2>");
} else {
if (jQuery("#ontology_ontologyId").val() === null) {
resultsOntCount = jQuery("<span>");
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/submissions.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function addContact(event) {
var removeButton = newContact.querySelector("button").cloneNode(true);
removeButton.classList.replace("btn-success", "btn-danger");
removeButton.classList.replace("add-contact", "remove-contact");
removeButton.classList.add("ml-1")
removeButton.classList.add("ms-1")
removeButton.querySelector("i").classList.replace("fa-plus", "fa-minus");
newContact.appendChild(removeButton);

Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ table.dataTable tbody tr.selected {
.ontologies_list_container .dataTables_filter {
float: right;
padding-top: 3px;
padding-bottom: 5px;
}

.ontologies_list_container .dataTables_filter input {
Expand Down
8 changes: 2 additions & 6 deletions app/assets/stylesheets/annotator.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
div#semanticTypes_chzn.chzn-container input.default {
font-style: oblique !important;
}

div#semanticTypes_chzn.chzn-container-active input.default {
font-style: normal !important;
select#semantic_types + .chosen-container {
display: block;
}

div#annotations_filter, div#annotations_info {
Expand Down
21 changes: 2 additions & 19 deletions app/assets/stylesheets/bioportal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,9 @@ button.fg-button-menu, button.fg-button {
/************************************
* Top navigation bar
************************************/
.btn-bp-login {
div#topNavigationToggler a.btn.btn-login {
color: #C58612;
border-color: #C58612 !important;
border-color: #C58612;

&:hover {
color: #234979;
Expand All @@ -926,23 +926,6 @@ button.fg-button-menu, button.fg-button {
background-color: #234979;
}

.nav_text a {
font-family: 'Droid Sans', sans-serif;
font-size: 1.1em;
padding: 25px 15px;
position: relative;
text-decoration: none;
top: 11px;
}

.nav_text a:hover {
color: lightGray !important;
}

.nav_text_active a {
color: lightGray !important;
}

/************************************
* Ontology picker
************************************/
Expand Down
Loading

0 comments on commit 8235b63

Please sign in to comment.