This module implements jQuery tristate checkbox plugin
(http://jlbruno.github.io/jQuery-Tristate-Checkbox-plugin/) as form element.
In your form definitions you can use $element['#type'] = 'nested_checkboxes'.

Project page

https://drupal.org/sandbox/gease/2021485

Git Repository

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/gease/2021485.git nested_checkbox

Installation and Usage

You need to download jQuery tristate checkbox plugin into libraries folder, and install jQuery Update module. See README.txt for details.

Comments

gease’s picture

Title: Nested checkboxes » [D7] Nested checkboxes
gease’s picture

Status: Active » Needs review
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

cybernetikz’s picture

There is still a master branch, make sure to set the correct default branch.

gease’s picture

Thank you, done.

pplantinga’s picture

Here's my review:

  1. jQuery selector doesn't apply to the checkboxes. Perhaps on line 169 of nested_checkboxes.module change 'nested-checkboxes' to 'nested_checkboxes'.
  2. Value of checked boxes upon submit should be 1, not the title (to be the same as the checkbox).
  3. Theme them similarly to checkboxes:
    • Put checkbox before label.
    • Add "option" class to label.
  4. Some code lines are really long e.g. nested_checkboxes.module @130. For this case, you could separate the value for %name into a variable.
  5. Need more inline documentation to see what's going on: e.g. theme_nested_checkboxes() in nested_checkboxes.module.
pplantinga’s picture

Status: Needs review » Needs work

Change status to "needs work"

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

Updated usage info.

gease’s picture

Issue summary: View changes
Status: Closed (won't fix) » Needs review
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxgease2021485git

I'm a robot and this is an automated message from Project Applications Scraper.

gease’s picture

Status: Needs work » Needs review
VasilyKraev’s picture

Not easy-to-read declarations with conditions, for example, line 119 @ nested_checkbox.module

don't be fanatic in cutting lines to 80 chars: lines 142, 154, 215, 220, etc

Use Drupal.behaviors instead $(document).ready

gease’s picture

Changed js to Drupal.behaviors and made some reformatting according to previous comment.

Sumit kumar’s picture

Status: Needs review » Needs work

PA Review Error:

<FILE: /var/www/drupal-7-pareview/pareview_temp/nested_checkbox.module
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
104 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/nested_checkbox.js
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | Missing file doc comment
----------------------------------------------------------------------
klausi’s picture

Status: Needs work » Needs review

Those minor coding standard errors are surely not application blockers, please do a real manual review.

RavindraSingh’s picture

StatusFileSize
new81.99 KB

This module provides UI to see the nested checkbox.
Nexted checkboxes

This would be good if you can write documentation to save values as well.

luckyorange’s picture

Manual Review

Individual user account
Yes
No duplication
Yes
Master Branch
Yes
Licensing
Yes
3rd party assets/code
Yes
README.txt/README.md
Yes
Code long/complex enough for review
Yes
Secure code
Yes
Coding style & Drupal API usage
I see no issues. Really clean code. Great work!

This review uses the Project Application Review Template.

luckyorange’s picture

Status: Needs review » Reviewed & tested by the community
ayesh’s picture

Status: Reviewed & tested by the community » Fixed

Hi Vadim,
I'm sorry it took more time to get reviewed. I had this on my test site for some time, and it works well.

A few suggestions:
- Is there any way to set error to a specific nested check box set? can you show a form_set_error() example?
- It's not really necessary to define the module package as "Other" in the module .info file. Unless you explicitly set one, it will be sent to the Other set anyway.

No blocking issues that I could find about.

Thanks for your contribution, Vadim Valuev!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.