Drupal 6
http://drupal.org/sandbox/iwhitcomb/1355428
git clone --branch 6.x-1.x iwhitcomb@git.drupal.org:sandbox/iwhitcomb/1355428.git datatable
Data Table is an addition to the core form API which allows the creation of a datatable field type. A data table is a draggable, sortable, table of data. Not only does it provide a table full of editable data, but also allows the developer to define a custom structure to display the data which taps directly into the form API. For example, rather than showing a grid full of text boxes, the developer can specify any of the normal form API elements to be used instead(ie: checkboxes, select lists, text areas, etc..)
This can be tested by creating a form via Drupals form API(See the datatable_example for code example)
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | codef2.txt | 1.93 KB | Robertas |
Comments
Comment #1
patrickd commentedYou can name your branches however you want, but if you want that drupal.org can recognize them as releases you have to be shure that they are well formatted (eg. 6.x-1.x). For additional resources please see the documentation about release naming conventions.
README.txt is missing, see the guidelines for in-project documentation
Comment #2
drupalnetworks commentedReview of the 6.x-1.x branch:
Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):
Remove "version" from the info file, it will be added by drupal.org packaging automatically.
./datatable.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
function process_datatable($element) {This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #3
iwhitcomb commentedgit clone --branch 6.x-1.x iwhitcomb@git.drupal.org:sandbox/iwhitcomb/1355428.git datatable
That should do it. Changed the branch name to 6.x-1.x from 6.x-1.x-dev, also went ahead and added a README.txt to the datatable_example module.
Comment #4
iwhitcomb commentedbump
Comment #5
jthorson commentedIt appears that there have been multiple project applications opened under your username:
Domain Login: http://drupal.org/node/1351074
Data Table Field: http://drupal.org/node/1370250
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue.
With this in mind, I have marked your secondary applications as 'closed(duplicate)', and left one application open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one I that I have left open, then please feel free to close the 'open' application as a duplicate, and re-open one of the other project applications which I had closed.
Thanks in advance for your patience and understanding!
Comment #6
iwhitcomb commentedReopening for review
Comment #7
morgothz commentedHi!
You have some errors in your sandbox project:
Let's see this piece of code:
I don't understand why you don't use $child variable directly instad of <?ph element_children($element[$element['#name']][$child] ?> in the second foreach; You should use
foreach ($child as $field) {instead offoreach (element_children($element[$element['#name']][$child]) as $field) {The same thing with $field variable declared in the second foreach, you should use:
if (!empty($field['#children'])) {instead ofif (!empty($element[$element['#name']][$child][$field]['#children'])) {Using this way, folowing statement:
$cols[$field] = theme('form_element', $element[$element['#name']][$child][$field], $element[$element['#name']][$child][$field]['#children']);will look like$cols[$field] = theme('form_element', $field, $field['#children']);I think is more clear using this way.
You must see Doxygen and comment formatting conventions (http://drupal.org/node/1354)
Comment #8
iwhitcomb commentedmorgothz -- Thanks for your feeback.
I commented all of the code per the Doxygen documentation.
As for the foreach and the use of element_children.
http://api.drupal.org/api/drupal/includes!common.inc/function/element_ch...
element_children doesn't actually return the array of the child elements, just an array of IDs which explains all of the confusing code. I'm looping over that to get the child element arrays from the main $element which is what you're seeing -- very confusing I know. Unless there's something else out there to return the actual child element(s) then I'm not sure how else to accomplish this.
Comment #9
iwhitcomb commentedbump
Comment #10
iwhitcomb commentedbump
Comment #11
markhalliwellAlso bumping this, I would like to get him commit access ASAP as he's part of our team.
Comment #12
Robertas commentedThere are still formatting issues - please see attached file.
Comment #13
sbrattla commentedAny change this module will be available for Drupal 7 too? It seems very promising.
Comment #14
iwhitcomb commentedRobertas -- I took care of the formatting issues
sbrattla -- Yes, absolutely I've already begun porting to D7. Once I get this approved I can start focusing more on that.
Comment #15
iwhitcomb commentedbump
Comment #16
iwhitcomb commentedclosing, not enough support
Comment #17
patrickd commentedI'm sorry about the delay, we currently got about 150 applications in the queue and have a huge lack of reviewers, so really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
Feel free to reopen if you feel like continuing on this.
I was in here my self for several moths waiting, I know how depressing this can be.
Sorry :(
Comment #18
iwhitcomb commentedNo problem, I understand. I just figured I'd try with something for D7 instead.
Comment #18.0
iwhitcomb commentedFixed git clone command