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
[4.0] Improving row selection in Joomla! Admin #14913
Conversation
Can you drop jquery (you don't need it for such easy task) and use a class instead of changing directly the styles |
Do you mean adding a class to the row when the action is done? |
|
I have questions on the topics not checked:
|
"use strict";
var color = '#d9edf7', rows = document.querySelectorAll('tr[class^="row"]'); The above snippet should take care of the first checkbox. For compiling SCSS you need to have installed node and npm |
Here are the instructions for SCSS: https://github.com/joomla/joomla-cms/blob/4.0-dev/grunt-readme.md |
@@ -54,6 +54,7 @@ $fa-font-path: "../../../../media/vendor/font-awesome/fonts" | |||
// Tables | |||
$table-bg: transparent !default; | |||
$table-bg-accent: rgba(0,0,0,.03) !default; | |||
$table-row-selected #d9edf7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a colon after the variable name, like so: $table-row-selected:
media/system/js/multiselect.js
Outdated
|
||
document.addEventListener("DOMContentLoaded", function(event) { | ||
color = '#d9edf7'; | ||
rows = document.querySelectorAll('tr[class^="row"]'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to:
var colour = '#d9edf7',
rows = document.querySelectorAll('tr[class^="row"]');
Note, the British spelling of colour
media/system/js/multiselect.js
Outdated
rows.forEach(function(row, index) { | ||
changeBg(row, ''); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can simplify this if - else
statement to just:
var colour = this.checked ? colour : '';
rows.forEach(function(row, index) {
changeBg(row, colour);
});
I think that is all :) |
@jreys is this PR ready to Test? |
@jreys - one more thing, please use single quote's as opposed to double quotes where possible. |
@franz-wohlkoenig it's ready for testing now, everything fixed btw @C-Lodder I didn't use the |
@jreys - No worries. All seems to be good now. @dgt41 - JS look ok? |
I have tested this item ✅ successfully on 0a5a387 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14913. |
I have tested this item ✅ successfully on 0a5a387 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14913. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14913. |
I have tested this item ✅ successfully on ac8c87d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14913. |
Summary of Changes
Usually when I was using Joomla Admin, the multi-select on the list view was not very user-friendly since clicking on such a small square can sometimes fail on the first try. So I came up with a solution for
Testing Instructions
Expected result
When you click on a row on the articles list view (for example), it will highlight the whole line:
When you click on the select-all checkbox, it will highlight all items on that page:
Notice
I'm aware of backwards compatibility so the regular checkbox will still work as before while still highlighting the whole line.