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

netteForms.js: support for toggling by css class, not only id #210

Merged
merged 1 commit into from Feb 11, 2019

Conversation

@Ciki
Copy link
Contributor

commented Feb 11, 2019

  • new feature
  • BC break? no

this is useful eg. for controls manually rendered as table cells <td> which have only <tr> valid parent .. if there are multiple cells within table row toggling via id is not feasible (it would toggle all the cells in that row).

Example

$form->addCheckbox('send', 'Ship to address')
	->addCondition($form::FILLED)
		->toggle('body .sendBox');
support for toggling by css class, not only id
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).

@Ciki Ciki changed the title js: support for toggling by css class, not only id netteForms.js: support for toggling by css class, not only id Feb 11, 2019

@dg

This comment has been minimized.

Copy link
Member

commented Feb 11, 2019

Thanks

@dg dg merged commit 8e01765 into nette:master Feb 11, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.062%
Details

dg added a commit that referenced this pull request Feb 11, 2019

support for toggling by CSS selector, not only id (#210)
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
@dg

This comment has been minimized.

Copy link
Member

commented Feb 11, 2019

I changed it to full CSS selector.

dg added a commit that referenced this pull request Feb 11, 2019

support for toggling by CSS selector, not only id (#210)
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).

dg added a commit that referenced this pull request Feb 11, 2019

netteForms: support for toggling by CSS selector, not only id (#210)
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).

dg added a commit that referenced this pull request Feb 19, 2019

netteForms: support for toggling by CSS selector, not only id (#210)
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.