Remove Travis CI badge and improve dropdown selection handling
1. Removed broken Travis CI build status badge from README header 2. Enhanced dropdown selection on messages page: - Added explicit JavaScript change event handler - Added CSS to ensure proper text color and background - Added blur/focus to force visual update after selection - Added console logging for debugging This should resolve the issue where selected recipient names weren't displaying properly in the dropdown after selection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,14 @@ $(document).on('turbolinks:load', function() {
|
||||
makeActive();
|
||||
});
|
||||
|
||||
// Explicitly handle dropdown selection to ensure display updates
|
||||
$('#message_receiver_id').on('change', function() {
|
||||
var selectedText = $(this).find('option:selected').text();
|
||||
console.log('Selected recipient:', selectedText);
|
||||
// Force a visual update
|
||||
$(this).blur().focus();
|
||||
});
|
||||
|
||||
// Form submission with AJAX
|
||||
$("#submit_button").click(function(event) {
|
||||
event.preventDefault();
|
||||
@@ -306,4 +314,19 @@ $("#submit_button").click(function(event) {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure dropdown displays selected value properly */
|
||||
#message_receiver_id {
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#message_receiver_id option {
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
#message_receiver_id:focus {
|
||||
border-color: var(--rg-success);
|
||||
box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user