Drop pagedown-bootstrap library and all its related code

This commit is contained in:
Julia Casamitjana
2024-04-11 10:42:41 +02:00
committed by Dominic Sauer
parent 9fe18f1873
commit 0667cbeefb
8 changed files with 0 additions and 2185 deletions

View File

@ -32,7 +32,6 @@ gem 'net-imap', require: false
gem 'net-pop', require: false gem 'net-pop', require: false
gem 'net-smtp', require: false gem 'net-smtp', require: false
gem 'nokogiri' gem 'nokogiri'
gem 'pagedown-bootstrap-rails'
gem 'pg' gem 'pg'
gem 'proformaxml', '~> 1.3.0' gem 'proformaxml', '~> 1.3.0'
gem 'prometheus_exporter' gem 'prometheus_exporter'

View File

@ -291,8 +291,6 @@ GEM
snaky_hash (~> 2.0) snaky_hash (~> 2.0)
version_gem (~> 1.1) version_gem (~> 1.1)
package_json (0.1.0) package_json (0.1.0)
pagedown-bootstrap-rails (2.1.4)
railties (> 3.1)
parallel (1.24.0) parallel (1.24.0)
parser (3.3.0.5) parser (3.3.0.5)
ast (~> 2.4.1) ast (~> 2.4.1)
@ -611,7 +609,6 @@ DEPENDENCIES
net-pop net-pop
net-smtp net-smtp
nokogiri nokogiri
pagedown-bootstrap-rails
pg pg
proformaxml (~> 1.3.0) proformaxml (~> 1.3.0)
prometheus_exporter prometheus_exporter

View File

@ -11,7 +11,6 @@
// about supported directives. // about supported directives.
// //
//= require turbolinks //= require turbolinks
//= require pagedown_bootstrap
//= require rails-timeago //= require rails-timeago
//= require locales/jquery.timeago.de.js //= require locales/jquery.timeago.de.js
// //

View File

@ -52,5 +52,4 @@ $(document).on('turbolinks:load', function() {
// Remove some elements before going back to an older site. Otherwise, they might not work. // Remove some elements before going back to an older site. Otherwise, they might not work.
$(document).on('turbolinks:before-cache', function() { $(document).on('turbolinks:before-cache', function() {
$('.chosen-container').remove(); $('.chosen-container').remove();
$('#wmd-button-row-description').remove();
}); });

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
//= require markdown.converter
// markdown.editor is slightly adjusted to work with Bootstrap 4.
// Taken from https://github.com/hughevans/pagedown-bootstrap-rails, V2.1.4
//= require markdown.editor
//= require markdown.sanitizer
//= require markdown.extra
renderPagedown = function() {
$(".wmd-output").each(function (i) {
const converter = Markdown.getSanitizingConverter();
const content = $(this).html();
return $(this).html(converter.makeHtml(content));
})
};
createPagedownEditor = function( selector, context ) {
if (context == null) { context = 'body'; }
return $(selector, context).each(function(i, input) {
if ($(input).data('is_rendered')) {
return;
}
const attr = $(input).attr('id').split('wmd-input')[1];
const converter = Markdown.getSanitizingConverter();
Markdown.Extra.init(converter);
const help = {
handler() {
window.open('https://daringfireball.net/projects/markdown/syntax', '_blank');
return false;
},
title: "<%= I18n.t('components.markdown_editor.help', default: 'Markdown Editing Help') %>"
};
const editor = new Markdown.Editor(converter, attr, help);
editor.run();
$('[data-bs-toggle="tooltip"]').tooltip();
return $(input).data('is_rendered', true);
});
};
$(document).on('turbolinks:load', function() {
renderPagedown();
return createPagedownEditor('.wmd-input');
});

View File

@ -10,7 +10,6 @@
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope. * file per style scope.
* *
*= require pagedown_bootstrap
* *
* lib/assets * lib/assets
*= require flash *= require flash

View File

@ -31,7 +31,3 @@
.toggle-input { .toggle-input {
font-size: 80%; font-size: 80%;
} }
.wmd-preview {
background-color: var(--bs-secondary-bg);
}