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

Avoid glitch on checkbox click #11071

Merged
merged 3 commits into from Oct 19, 2018

Conversation

Projects
None yet
5 participants
@jolelievre
Contributor

jolelievre commented Oct 18, 2018

Questions Answers
Branch? 1.7.5.x
Description? change in the product grid, in position mode, the mousedown target to the proper column to avoid glitch on checkbox click (the mousedown on the whole row didn't make sense anyway)
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #10319
How to test?

This change is Reviewable

@prestonBot prestonBot added the Bug label Oct 18, 2018

@jolelievre jolelievre added this to the 1.7.5.0 milestone Oct 18, 2018

$("body").on("mousedown", "tbody.sortable [data-uniturl]", function () {
$(this).find('input:checkbox[name="bulk_action_selected_products[]"]').attr("checked", true);
$("body").on("mousedown", "tbody.sortable [data-uniturl] td.placeholder", function () {
const trParent = $(this).closest('tr');

This comment has been minimized.

@PierreRambaud

PierreRambaud Oct 18, 2018

Contributor

No need to use const here, you never reuse the variable.
Watch out with indentation, sometimes 2, 4 and even 6 :)

@jolelievre

This comment has been minimized.

Contributor

jolelievre commented Oct 19, 2018

thanks @PierreRambaud I used a var, and I autoindented the whole file because it was messy :P

@eternoendless eternoendless changed the title from avoid glitch on checkbox click to Avoid glitch on checkbox click Oct 19, 2018

@eternoendless

Rules for indentation is 2 spaces for Javacript files. See code conventions.

Also, please fill out the table properly.

@prestonBot prestonBot added the 1.7.5.x label Oct 19, 2018

@jolelievre

This comment has been minimized.

Contributor

jolelievre commented Oct 19, 2018

my bad, I didn't pay attention to the branch, I changed the autoindent rules, so it's two spaces now

@eternoendless

LGTM

@ntiepresta ntiepresta assigned ntiepresta and unassigned ntiepresta Oct 19, 2018

@ntiepresta ntiepresta added QA ✔️ and removed waiting for QA labels Oct 19, 2018

@PierreRambaud PierreRambaud merged commit f92b0c6 into PrestaShop:1.7.5.x Oct 19, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@PierreRambaud

This comment has been minimized.

Contributor

PierreRambaud commented Oct 19, 2018

Thanks @jolelievre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment