Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
We are working on a project which using alot of datatables functionalities. We modified it to provide many dataTables features: dataTools, ColReorder, FixedColumns, ColVis, ... So we want contribute these modifications back to drupal community.
Thanks,
Andy
Comment | File | Size | Author |
---|---|---|---|
#25 | datatables.tar_.gz | 1.32 MB | bogtan |
#24 | datatables.tar_.gz | 1.3 MB | bogtan |
#17 | datatables.tar_.gz | 302.85 KB | broncomania |
#16 | dev1108532.patch | 9.9 KB | broncomania |
#15 | datatables-1108532-dev.patch | 17.39 KB | broncomania |
Comments
Comment #1
robinl CreditAttribution: robinl commentedHi Andy,
Your developments sound great. I am looking to incorporate some of these other features too so please let me know if you are in a position to share this!
Thanks
Robin
Comment #2
duellj CreditAttribution: duellj commentedHi Andy,
I'd be happy to integrate the feature additions you mentioned. Do you have a patch?
Comment #3
robinl CreditAttribution: robinl commentedHi Andy,
Have you managed to get any further with sharing this info? I am really keen to implement these features too.
Many thanks
Robin
Comment #4
thehong CreditAttribution: thehong commentedHere's my patch. Still not support views yet.
Comment #5
thehong CreditAttribution: thehong commentedComment #6
sachbearbeiter CreditAttribution: sachbearbeiter commentedsubscribe
Comment #7
broncomania CreditAttribution: broncomania commentedIs the views integration in progress ? I think this is the biggest advantage of the datatable. It has the capability to replace the standard table in drupal. The datatable library is absolutly amazing but I cant get it really work with views. Specially the server side funtionality.
Comment #8
guybrush CreditAttribution: guybrush commentedsubscribing
Comment #9
broncomania CreditAttribution: broncomania commentedOkay, it looks like nobody else is working on this feature, so i decided to start the development. At the moment i have included the patch from thehong.
I created the a hook menu entry for the server path and the logic for the views requirements. First the views name, display_id, and the args. These informations are submitted thru the path. So every view should later use the datatable without problems.
I got the request now working but I have to solve some problems. One of them is how can I get the total amount of available rows from the view. I see there is an entry in the view object but it is not filled thru this modul. Has any one an idea, maybe the maintainer of this module?
I am also looking for a co maintainer, because I think this code should be shared. At the moment it is not working and I just started to develop so any assistance is welcome.
I added some features from the datatable to extend the usecases, like state save, jquery ui themeroller, server side on/off, pagination on/off, pagination numbers or 2 buttons,...
Comment #10
broncomania CreditAttribution: broncomania commentedComment #11
duellj CreditAttribution: duellj commentedObviously I haven't had much time to work on this module lately. borcomania or thehong, are either of you interested in becoming co-maintainers of this module? Let me know, and I'd be happy to add you to the maintainers list.
Comment #12
broncomania CreditAttribution: broncomania commentedYeah, I just want to ask u today how to commit here. I finish some development and would like to share this dev status with others for a second view.
I finished the task with ajax requests but there are still some bugs. But it's worth to take a dev look.
Included are localization features, ajax integration (without filter and sorting at the moment) and a Javascript fix for preventing the double initialisation of the datatables.
Missing is the correct implementation of the drupal.attachBehavior. I patch the jquery.datatables.js file for the moment until I found out how to integrate it the correct way. Buggy is also the total number of rows thru the views 3 API.
Comment #13
duellj CreditAttribution: duellj commentedCan you post up a patch so I can take a look, and if it looks good I'll give you commit access.
Comment #14
broncomania CreditAttribution: broncomania commentedSure, I will finish today my task to include the drupal.attachBehavior() then I will make a patch and publish it here.
Comment #15
broncomania CreditAttribution: broncomania commentedOkay here is my patch, but the drupal.attachBehavior() is not included yet. To make it work there is also a patch to views 3 nessessary at the moment. This is just for have a look.
The problem with views 3 is that I can#t get the total rows as a part of the view result. There is some further work nessesary.
Edit: In this patch are some files missing. I think I have first to learn how to create a patch and how to include new files. The documentation is really awfull. Maybe you duellj can assist me in this step or give me a hint.
Comment #16
broncomania CreditAttribution: broncomania commentedSo here is the missing part.
Comment #17
broncomania CreditAttribution: broncomania commentedOkay I jut want to drop my latest work here:
This datatables version includes my latest state with the following changes:
What is not perfect:
The integration with the views 3 module needs until now a small patch to get the total amount of the available rows.
views/plugins/views_plugin_query_default.inc at row 1163
original:
changed views:
So if someone had a better solution, feel free to leave an update here!
I would also like to get better search support thru the views table class (checkbox search fields in the views admin area).
I think the first step is made to get a better table, but there is really some more know how necessary to make it stable and better.
Comment #18
thehong CreditAttribution: thehong commentedComment #19
broncomania CreditAttribution: broncomania commentedHmm, I thought there is more interest in this topic?
Comment #20
iancm CreditAttribution: iancm commentedI'm very interested in seeing where this is headed. Will the current patches also work for Drupal 7? I'm particularly after FixedColumns, ColVis plugins.
Comment #21
broncomania CreditAttribution: broncomania commentedI would like to open a new development branch with the ajax views integration. For sure its just a beta but somewhere has to start the development. It would be pity if this feature gets lost and I don't think that it is possible to add these features in a submodule. So duellj what do you think?
Comment #22
broncomania CreditAttribution: broncomania commentedNo, at the moment it's only for d6, but I think with some changes it could be addopted to d7 due to the same version of views (3). I you get it work, it would be nice if you share your code.
Comment #23
duellj CreditAttribution: duellj commentedbroncomania, I've opened up a new ajax branch, and have give you write access to the repo. I've committed some code there that starts the process for getting ajax support in D7. Feel free to start hacking against that branch to see if you can get ajax working. Also, if you want to create a new branch for all of your plugin work, that'd be fantastic (it'll be a little bit easier to review).
Thanks again for all your work!
Comment #24
bogtan CreditAttribution: bogtan commentedHi all,
For those who want to use dataTables with server side processing with Drupal 7, I managed to migrate the existing code from D6 to D7. It is also integrated with views exposed form and Twitter Bootstrap.
There is still an issue with sorting the columns (server side, before data is sent to dataTables).
How to use it:
Download the file and untar;
Copy the entire folder to sites/all/modules and enable the module;
Create a view (admin/structure/views/add) and set Display format to dataTables;
In Settings > Pagination and page length check Server side processing of the datatables
In PAGER section of the view set it to Paged output, full pager (10 or how many you want)
Make sure that in your views-view--.tpl.php you remove the $pager variable;
Comment #25
bogtan CreditAttribution: bogtan commenteddataTables now supports column sorting and server side free text search in column contents. The search is now supported for EntityReference fields and for FieldCollection items.
Comment #26
duellj CreditAttribution: duellj commentedbogtan,
Thanks for your work! It would be much easier to review and commit your changes if you created a patch (http://drupal.org/node/707484). Thanks!
Comment #27
tanmuhittin CreditAttribution: tanmuhittin commentedWhen I apply the patch https://www.drupal.org/node/1108532#comment-6692692 ajax pagination is ok but text search and filtering are not working. In text search I got 404 error on console. It is looking for a route
/datatables/viewname/page/?.....
and it is not found. Any idea?
Comment #28
dqdDrupal 6 reached EOL and I am sorry for that this issue hasn't been fixe din the life of Drupal 6 Read more about EOL here: https://www.drupal.org/about/drupal6-eol
Will close this with big thanks to all who have worked hard on this and feel free to open a new issue for this purpose on newer versions of this project.