Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap5 #463

Merged
merged 92 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
affbbeb
added bs5
zebleck Sep 22, 2022
1c8cb2e
custom-chechbox to form-checkbox
zebleck Sep 22, 2022
48b5a31
Renamed .ml-* and .mr-* to .ms-* and .me-*.
zebleck Sep 28, 2022
bea0f2b
Continued working on this change:
zebleck Sep 29, 2022
70e5eeb
fix home layout to be consistent with prior version
zebleck Oct 20, 2022
ae82470
"custom-control-*" to "form-check-*"
zebleck Feb 2, 2023
3318aa3
add form-label class to most form-label
zebleck Feb 2, 2023
b47d2d7
add form-label class to most form-label v2
zebleck Feb 2, 2023
a5c1e2c
Merge branch 'mampf-next' into bootstrap5
zebleck Feb 16, 2023
d32dafd
fix media-search form
zebleck Feb 16, 2023
710ca75
fixed bootstrap issues
zebleck Mar 6, 2023
c000986
fixed modals
zebleck Mar 6, 2023
8a844be
change js_compressor uglifier to terser
zebleck Mar 13, 2023
7bba125
fix issues
zebleck Mar 13, 2023
c434aed
changed from-control to form-select
zebleck Mar 19, 2023
0476aec
fixing href underlines
zebleck Mar 19, 2023
9c939da
merge
zebleck Mar 19, 2023
9382b9f
fix new medium starting selected sort
zebleck Mar 20, 2023
34a89da
add data-masonry to fix card grid used for lecture content display
zebleck Mar 20, 2023
843854f
Merge branch mampf-next into bootstrap5
Splines Apr 26, 2023
cb541ff
Merge branch 'mampf-next' into bootstrap5
Splines Apr 26, 2023
cad3d73
Fix missing "bg-" instead of "badge-"
Splines Apr 26, 2023
3c1f1d6
Fix link underline in badges
Splines Apr 26, 2023
0b354da
Fix content tags color
Splines May 17, 2023
cd8269f
Remove padding from login remember_me checkbox
Splines May 17, 2023
7bc65d2
Restore card header and card footer padding
Splines May 17, 2023
4244c5c
Remove left-over code
Splines May 17, 2023
61f84f7
Remove underline upon button hovering
Splines May 17, 2023
13083dc
Remove text decoration from nav links
Splines May 17, 2023
78e9829
Add background color to tags in admin view for lesson
Splines May 17, 2023
8fbc3b3
Replace lectures edit card columns by masonry
Splines May 17, 2023
0651005
Replace seminar card-column by masonry
Splines May 17, 2023
dc0f842
Replace structure (example) card-columns with masonry
Splines May 17, 2023
ac5b5c6
Remove left-over card-columns breakpoint class
Splines May 17, 2023
ca34e4f
Merge branch 'mampf-next' into bootstrap5
Splines May 17, 2023
74cdf0b
Restore "data-parent" instead of "data-bs-parent"
Splines May 20, 2023
6adf0a8
Revert "Restore "data-parent" instead of "data-bs-parent""
Splines May 20, 2023
ab284cf
Use data-parent for custom attribute
Splines May 20, 2023
d0283cf
Revert tom-select bootstrap4 accordion fix
Splines May 20, 2023
ff4f6e1
Fix closing button of sponsors modal
Splines May 20, 2023
409d3d2
Restyle sponsors modal close button
Splines May 20, 2023
11e0999
Fix helpdesk method not found in commontator view
Splines May 20, 2023
a1aa794
Use cdn version of jquery-datetimepicker
Splines May 20, 2023
7da0cff
Remove autocomplete for datetimepicker input field
Splines May 20, 2023
5d346fe
Update chartjs-adapter-moment version
Splines May 20, 2023
1c6389a
Remove datetimepicker from application.js (webpacker)
Splines May 20, 2023
bbfcf6a
Remove unnecessary coffeescript hello world file
Splines May 20, 2023
56eaa4a
Restore empty application.sass to make webpacker happy
Splines May 20, 2023
13921bb
Remove left padding of preview toggle (commontator)
Splines May 20, 2023
8993b7c
Remove unused dependencies in yarn.lock
Splines May 21, 2023
cc2ac11
Fix positioning of external link label
Splines May 21, 2023
f9cfc53
Replace more custom-radio classes with form-check
Splines May 21, 2023
6df8fdf
Add padding to "comments" in publish medium modal
Splines May 21, 2023
e26b5fc
Use .btn-close instead of .close for close buttons
Splines May 21, 2023
bd4cae4
Get rid of "&times" in span for closing button
Splines May 21, 2023
71831fb
Fix closing button on sponsors modal
Splines May 21, 2023
0e8ddac
Replace custom-control-label by form-label
Splines May 21, 2023
cddb25b
Remove "row" class for language section
Splines May 21, 2023
0672919
Use form-check-label instead of form-label
Splines May 21, 2023
01cbea5
Readd hello world coffee for webpacker to be happy
Splines May 21, 2023
882d3b6
Use old strategy for datepicker import (npm, not CDN)
Splines May 21, 2023
852d11a
Init datetimepicker on pageload
Splines May 21, 2023
4697eb7
Get back to "css"/"myLib" import for datepicker
Splines May 22, 2023
e877997
Get rid of unnecessary divs in quizzes view
Splines May 22, 2023
7f6e7be
Wrap quizzes in full-width overflow-hidden container
Splines May 22, 2023
fdc50a0
Fix missing "form-check-label" CSS class
Splines May 22, 2023
eb380b7
Remove unwanted "text-end" css class
Splines May 23, 2023
3a8a385
Remove padding around media closing buttons
Splines May 23, 2023
2adb741
Fix coloring of tag badges
Splines May 23, 2023
e64edcc
Replace some form-control classes by form-select
Splines May 23, 2023
14eebc3
Bunk replace tag css classes
Splines May 23, 2023
87c06be
Force no underline of dropdown menu items
Splines May 23, 2023
b339f52
Replace remnant "custom-control" by "form-check"
Splines May 28, 2023
ab27827
Remove left-over console.log()
Splines May 28, 2023
d0f6541
Delete simple_spec.cy.js
Splines May 28, 2023
6e080f2
Remove unwanted `testing_spec.cy.js`
Splines May 28, 2023
68d7582
Remove dockerfile remnant
Splines May 28, 2023
efed032
Fix layout of long announcements
Splines Jun 7, 2023
1ab8a83
Fix duplicate close button
Splines Jun 7, 2023
8ba8ca4
Fix "du" vs. "Du" with variants e.g. "dich" etc.
Splines Jun 7, 2023
2fb4341
Fix badge color not applied to all elements
Splines Jun 7, 2023
4b1252f
Fix badge color in admin search view
Splines Jun 7, 2023
ad4a25e
Fix badge color in related tags info popup
Splines Jun 7, 2023
a2c9fe2
Fix tag color on light background
Splines Jun 7, 2023
6946db7
Fix button underline in "related media"
Splines Jun 7, 2023
e30135b
Fix uneven alignment of close medium button
Splines Jun 7, 2023
09cec0a
Add missing "show media" button to seminar content
Splines Jun 7, 2023
4381da6
Add missing helpdesk text for lesson details
Splines Jun 12, 2023
6f4a0ea
Visually separate multiple announcements
Splines Jun 13, 2023
9cdc5b5
Make button colors on lecture cards consistent
Splines Jun 13, 2023
47bfba5
Fix seminar content card not taking full width
Splines Jun 13, 2023
08c5e4c
Add megaphone icon in front of every announcement
Splines Jun 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "rails", "~> 7.0.4.3"
# Use dalli for caching to memcached in production
gem "dalli", ">= 2.7"
# Ruby wrapper for UglifyJS JavaScript compressor
gem "uglifier"
gem "terser"
# Use nulldb adapter for assets precompilation in production
gem "activerecord-nulldb-adapter"
# Use sqlite3 as the database for Active Record
Expand Down Expand Up @@ -60,7 +60,7 @@ gem "cancancan"
gem "jquery-rails"
gem "jquery-ui-rails"
gem "js-routes", '1.4.9'
gem "bootstrap", "~>4"
gem "bootstrap", "~>5"
gem "bootstrap_form"
gem "devise-bootstrap-views"
gem "fuzzy-string-match"
Expand Down
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ GEM
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap (4.6.2)
bootstrap (5.2.1)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.16.1, < 2)
popper_js (>= 2.11.6, < 3)
sassc-rails (>= 2.0.0)
bootstrap_form (5.1.0)
actionpack (>= 5.2)
Expand Down Expand Up @@ -389,7 +389,7 @@ GEM
ttfunk
pg (1.4.6)
pgreset (0.3)
popper_js (1.16.1)
popper_js (2.11.6)
pr_geohash (1.0.0)
premailer (1.21.0)
addressable
Expand Down Expand Up @@ -591,6 +591,8 @@ GEM
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
terser (1.1.14)
execjs (>= 0.3.0, < 3)
thor (1.2.1)
thredded (1.1.0)
active_record_union (>= 1.3.0)
Expand Down Expand Up @@ -626,8 +628,6 @@ GEM
turbolinks-source (5.2.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 Down Expand Up @@ -668,7 +668,7 @@ DEPENDENCIES
acts_as_votable
barby
bootsnap (>= 1.4.2)
bootstrap (~> 4)
bootstrap (~> 5)
bootstrap_form
byebug
cancancan
Expand Down Expand Up @@ -739,11 +739,11 @@ DEPENDENCIES
streamio-ffmpeg
sunspot_rails!
sunspot_solr
thredded
terser
thredded!
thredded-markdown_katex!
trix-rails
turbolinks (~> 5)
uglifier
web-console (>= 3.3.0)
webdrivers
webpacker (~> 5.x)
Expand Down
22 changes: 0 additions & 22 deletions app/assets/javascripts/_selectize_turbolinks_fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,6 @@ this.fillOptionsByAjax = function($selectizedSelection) {
maxOptions: null,
placeholder: placeholder,
closeAfterSelect: true,
dropdownParent: parent,
onInitialize:function(){
this.popper = Popper.createPopper(this.control,this.dropdown, {
placement: "bottom-start",
modifiers: [
{
name: "sameWidth",
enabled: true,
fn: ({ state }) => {
state.styles.popper.width = `${state.rects.reference.width}px`;
},
phase: "beforeWrite",
requires: ["computeStyles"],
}
]

});

},
onDropdownOpen:function(){
this.popper.update();
},
load: function(query, callback) {
var url;
if (send_data || !loaded) {
Expand Down
5 changes: 5 additions & 0 deletions app/assets/javascripts/bootstrap_modal_turbolinks_fix.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ $(document).on 'turbolinks:load', ->
$('.activeModal').modal('show')
# remove active status (this needs to be reestablished before caching)
$('.activeModal').removeClass('activeModal')

popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
popoverList = popoverTriggerList.map (popoverTriggerEl) ->
return new bootstrap.Popover(popoverTriggerEl)

return

$(document).on 'turbolinks:before-cache', ->
Expand Down
50 changes: 24 additions & 26 deletions app/assets/javascripts/lectures.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,43 @@ disableExceptOrganizational = ->
$('#lecture-organizational-warning').show()
$('.fa-edit').hide()
$('.new-in-lecture').hide()
$('[data-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
return

$(document).on 'turbolinks:load', ->

# activate all popovers
$('[data-toggle="popover"]').popover()
$('[data-bs-toggle="popover"]').popover()

# if any input is given to the lecture form (for people in lecture),
# disable other input
$('#lecture-form :input').on 'change', ->
$('#lecture-basics-warning').show()
$('.fa-edit:not(#update-teacher-button,#update-editors-button)').hide()
$('.new-in-lecture').hide()
$('[data-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
return

# if any input is given to the preferences form, disable other input
$('#lecture-preferences-form :input').on 'change', ->
$('#lecture-preferences-warning').show()
$('[data-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('.fa-edit').hide()
$('.new-in-lecture').hide()
return

# if any input is given to the comments form, disable other input
$('#lecture-comments-form :input').on 'change', ->
$('#lecture-comments-warning').show()
$('[data-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('.fa-edit').hide()
$('.new-in-lecture').hide()
return

# if any input is given to the assignments form, disable other input
$('#lecture-assignments-form :input').on 'change', ->
$('#lecture-assignments-warning').show()
$('[data-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable')
$('.new-in-lecture').hide()
return

Expand Down Expand Up @@ -90,7 +90,7 @@ $(document).on 'turbolinks:load', ->
# restore assignments form if lecture assignments editing is cancelled
$('#cancel-lecture-assignments').on 'click', ->
$('#lecture-assignments-warning').hide()
$('[data-toggle="collapse"]').prop('disabled', false).addClass('clickable')
$('[data-bs-toggle="collapse"]').prop('disabled', false).addClass('clickable')
$('.new-in-lecture').show()
maxSize = $('#lecture_submission_max_team_size').data('value')
$('#lecture_submission_max_team_size').val(maxSize)
Expand All @@ -117,59 +117,57 @@ $(document).on 'turbolinks:load', ->
if this.dataset.type == 'Lesson'
lessonId = this.dataset.id
$('.lecture-lesson[data-id="'+lessonId+'"]')
.removeClass('badge-secondary')
.addClass('badge-info')
.removeClass('bg-secondary')
.addClass('bg-info')
tags = $(this).data('tags')
for t in tags
$('.lecture-tag[data-id="'+t+'"]').removeClass('badge-light')
.addClass('badge-warning')
$('.lecture-tag[data-id="'+t+'"]').removeClass('bg-light')
.addClass('bg-warning')
return

# mouseleave over lesson -> restore original color of lessons and tags
$('[id^="lecture-medium_"]').on 'mouseleave', ->
if this.dataset.type == 'Lesson'
lessonId = this.dataset.id
$('.lecture-lesson[data-id="'+lessonId+'"]').removeClass('badge-info')
.addClass('badge-secondary')
$('.lecture-lesson[data-id="'+lessonId+'"]').removeClass('bg-info')
.addClass('bg-secondary')
tags = $(this).data('tags')
for t in tags
$('.lecture-tag[data-id="'+t+'"]').removeClass('badge-warning')
.addClass('badge-light')
$('.lecture-tag[data-id="'+t+'"]').removeClass('bg-warning')
.addClass('bg-light')
return

# mouseenter over lesson -> colorize tags
$('[id^="lecture-lesson_"]').on 'mouseenter', ->
tags = $(this).data('tags')
for t in tags
$('.lecture-tag[data-id="'+t+'"]').removeClass('badge-light')
.addClass('badge-warning')
$('.lecture-tag[data-id="'+t+'"]').addClass('bg-warning')
return

# mouseleave over lesson -> restore original color of tags
$('[id^="lecture-lesson_"]').on 'mouseleave', ->
tags = $(this).data('tags')
for t in tags
$('.lecture-tag[data-id="'+t+'"]').removeClass('badge-warning')
.addClass('badge-light')
$('.lecture-tag[data-id="'+t+'"]').removeClass('bg-warning')
return

# mouseenter over tag -> colorize lessons
$('[id^="lecture-tag_"]').on 'mouseenter', ->
lessons = $(this).data('lessons')
for l in lessons
$('.lecture-lesson[data-id="'+l+'"]').removeClass('badge-secondary')
.addClass('badge-info')
$('.lecture-lesson[data-id="'+l+'"]').removeClass('bg-secondary')
.addClass('bg-info')
return

# mouseleave over tag -> restore original color of lessons
$('[id^="lecture-tag_"]').on 'mouseleave', ->
lessons = $(this).data('lessons')
for l in lessons
$('.lecture-lesson[data-id="'+l+'"]').removeClass('badge-info')
.addClass('badge-secondary')
$('.lecture-lesson[data-id="'+l+'"]').removeClass('bg-info')
.addClass('bg-secondary')
return

$('#edited-media-tab a[data-toggle="tab"]').on 'shown.bs.tab', (e) ->
$('#edited-media-tab a[data-bs-toggle="tab"]').on 'shown.bs.tab', (e) ->
sort = e.target.dataset.sort # newly activated tab
path = $('#create-new-medium').prop('href')
if path
Expand Down Expand Up @@ -345,7 +343,7 @@ $(document).on 'turbolinks:load', ->

# clean up everything before turbolinks caches
$(document).on 'turbolinks:before-cache', ->
$('.lecture-tag').removeClass('badge-warning').addClass('badge-light')
$('.lecture-lesson').removeClass('badge-info').addClass('badge-secondary')
$('.lecture-tag').removeClass('bg-warning')
$('.lecture-lesson').removeClass('bg-info').addClass('bg-secondary')
$(document).off 'change', '#lecture_course_id'
return
2 changes: 1 addition & 1 deletion app/assets/javascripts/lessons.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(document).on 'turbolinks:load', ->
$('#new-lesson-area').empty().hide()
$('.fa-edit').show()
$('.new-in-lecture').show()
$('[data-toggle="collapse"]').removeClass('disabled')
$('[data-bs-toggle="collapse"]').removeClass('disabled')
return

$(document).on 'click', '.cancel-lesson-edit', ->
Expand Down
12 changes: 8 additions & 4 deletions app/assets/javascripts/media.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ fancyTimeFormat = (time) ->

$(document).on 'turbolinks:load', ->

# init datetimepicker
$('#release_date').datetimepicker
format: 'd.m.Y H:i'
inline: false
lang: 'en'

# disable/enable search field on the media search page, depending on
# whether 'all tags'/'all editors'/... are selected
$('[id^="search_all_"]').on 'change', ->
Expand Down Expand Up @@ -389,11 +395,9 @@ $(document).on 'turbolinks:load', ->
return

$('#release_date').on 'focus', ->
console.log('focussss')
Splines marked this conversation as resolved.
Show resolved Hide resolved
$('#medium_release_now_0').prop('checked', true)
$('#release_date').datetimepicker
format: 'd.m.Y H:i'
inline: false
lang: 'en'
$('#release_date').datetimepicker('toggle')
return

$('#medium_assignment_deadline').on 'focus', ->
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/sections.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $(document).on 'turbolinks:load', ->
$('#new-section-area-' + chapterId).empty().hide()
$('.fa-edit').show()
$('.new-in-lecture').show()
$('[data-toggle="collapse"]').removeClass('disabled')
$('[data-bs-toggle="collapse"]').removeClass('disabled')
return

# reload page if editing of section is cancelled
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/talks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $(document).on 'turbolinks:load', ->
$(document).on 'click', '#new-talk-date-button', ->
count = $(this).data('count')
$('#talk-date-picker')
.append('<div class="mt-2" id="talk_dates_'+count+'"><input type="date" name="talk[dates['+count+']]"><a class="fas fa-trash-alt clickable text-dark ml-2 remove-talk-date" data-count="'+count+'"></a></div>')
.append('<div class="mt-2" id="talk_dates_'+count+'"><input type="date" name="talk[dates['+count+']]"><a class="fas fa-trash-alt clickable text-dark ms-2 remove-talk-date" data-count="'+count+'"></a></div>')
$(this).data('count', count + 1)
$('#talk-basics-warning').show()
return
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/upload.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ directUpload provides an interface to upload (multiple) files to an endpoint
single
) ->
# update helpdesk
$('[data-toggle="popover"]').popover()
$('[data-bs-toggle="popover"]').popover()
hiddenInput = document.getElementById(hiddenInputElement)
hiddenInput2 = document.getElementById('upload-userManuscript-hidden2')
fileInput =document.getElementById(fileInputElement)
Expand Down Expand Up @@ -440,7 +440,7 @@ directUpload provides an interface to upload (multiple) files to an endpoint
@result = undefined
@userManuscriptUpload = (fileInput) ->
# update helpdesk
$('[data-toggle="popover"]').popover()
$('[data-bs-toggle="popover"]').popover()
hiddenInput = document.getElementById('upload-userManuscript-hidden')
hiddenInput2 = document.getElementById('upload-userManuscript-hidden2')
fileInput.style.display = 'none'
Expand Down
Loading