Skip to content

Conversation

@LPmaverick
Copy link

  • allow for multiple rows to be reordered at once
  • new default option, placeholder
  • includes test html

- allow for multiple rows to be reordered at once
- includes test html
@DataTables
Copy link
Collaborator

This looks like a fantastic enhancement - thank you.

Couple of things:

  1. Are you happy for this to be included under the MIT license?
  2. I'm not sure how well this will work with the Editor integration - I'll check that out
  3. The demo HTML should really be an XML file similar to the others in the examples directories. That way the demo HTML doesn't need to be committed into every file.

The XML examples can be built using the method described here.

@LPmaverick
Copy link
Author

LPmaverick commented Mar 22, 2017 via email

@LPmaverick
Copy link
Author

LPmaverick commented May 2, 2017 via email

@DataTables
Copy link
Collaborator

Not yet, sorry. I've not managed to find time to review it and its implications properly yet. It is still in my inbox so I will get around to it though.

@stefanchiriac
Copy link

@DataTables There are any news about merging this pull request, or it has any chances to be merged any time soon?

@DataTables
Copy link
Collaborator

Hi - sorry I've been so long with this one. I've just tried it out and it looks great. I'm not going to merge it in immediately as there are two things I'd like to modify a little:

  1. It makes Select a hard dependency for RowReorder.
  2. When the drag is started to move the rows, it jumps the position of the rows, rather than keeping them in place.

That said, this will be a really excellent addition and thanks for contributing it @LPmaverick! Because its a new feature I'm going to publish 1.2.4 without it, but when I get a chance I'll circle back and make those changes for 1.3.0.

@LPmaverick
Copy link
Author

The reason for the jumping is to group all of the selected rows together if they happen to be spread out, and in the same order as they appear in the list.

@LPmaverick
Copy link
Author

How is this coming along? This is referring to this forum update.

@DataTables
Copy link
Collaborator

I'm afraid I've not yet made time to look into this PR. Apologies, its one of those things that keeps slipping away from me with other things going on. It is here though, so I will get to it!

@Hedva
Copy link

Hedva commented Jul 4, 2019

Do you have any expected date when this wil be implemented? Because right now I'm not sure what to do. Just wait until release, or update the code myself so at least I can use it. I prefer option 1, but if it takes another couple of months I'll go for option 2.

@DataTables
Copy link
Collaborator

I'd go for option 2 at the moment. My support backlog at the moment is enormous!

@paciox
Copy link

paciox commented Oct 28, 2024

WHY THE HECK THIS ISN'T MERGED STILL?
MOVE YOUR LAZY HEAD

You had an "normous support backlog" for 7 years?????????

@AllanJard
Copy link
Contributor

I haven't prioritised it over other work I've been doing. It can't be merged at the moment, but you are welcome to update it and patch to address the issue about it making Select a hard dependency, which I don't want at this time for this extension.

@paciox paciox mentioned this pull request Oct 28, 2024
@paciox
Copy link

paciox commented Oct 28, 2024

I haven't prioritised it over other work I've been doing. It can't be merged at the moment, but you are welcome to update it and patch to address the issue about it making Select a hard dependency, which I don't want at this time for this extension.

Well, time to prioritise it, since every major serious grid implementation in commercial/freeware frameworks supports it, or at least provide a working sample.
What was the datatable version at the time?
Can we have a working jsfiddle of this?

https://cdn.datatables.net/1.10.17/

I can find this and "I see DataTables CDN files for DataTables 1.10.17. This software was originally released on ." with a missing date....
What version of datatable it was? Where we can find it?

but you are welcome to update it and patch to address the issue

Me? Lol.... I didn't knew I was a maintainer of this library
You should do it. Moreover it gives weird unintelligible errors that requires hours of deep debugging for who isn't familiar with the inner code of datatables library. I have a work and no time to waste

Anyway it's fine for me to get it working on a older library,
Probably knowing which version of datatables was running in 2017 + using same jquery version + the js in that pull request might do the trick... so what version it was?

@AllanJard
Copy link
Contributor

It looks like 1.10.14 around that time: https://cdn.datatables.net/1.10.14/ .

Of course you aren't the maintainer of the library - I am. However, it is open source and if it is a feature you need, then you are welcome to implement it or pay someone to do so.

@paciox
Copy link

paciox commented Oct 28, 2024

It looks like 1.10.14 around that time: https://cdn.datatables.net/1.10.14/ .

Of course you aren't the maintainer of the library - I am. However, it is open source and if it is a feature you need, then you are welcome to implement it or pay someone to do so.

Does it have a single min file or I have to add every file listed there?
The newest version have a single file to add

Trying to make it work here:
https://jsfiddle.net/b91k8ors/1/

@AllanJard
Copy link
Contributor

Are the two core DataTables files you'll want. Plus jQuery (I'd imagine the latest of their 1.x series should be okay). Plus the patches RowReorder.

@paciox
Copy link

paciox commented Oct 28, 2024

Are the two core DataTables files you'll want. Plus jQuery (I'd imagine the latest of their 1.x series should be okay). Plus the patches RowReorder.

https://jsfiddle.net/zvto2mx5/1/

Does not work.

"79:28 Uncaught TypeError: $(...).DataTable is not a function"

Any idea? seems it doesn't get jquery or smth?

image

The cdns are the ones you suggested

@AllanJard
Copy link
Contributor

You need to load jQuery before DataTables. In JSFiddle you can click and drag the jQuery resource and put it to the top of the list.

@paciox
Copy link

paciox commented Oct 28, 2024

You need to load jQuery before DataTables. In JSFiddle you can click and drag the jQuery resource and put it to the top of the list.

Stupid me.
https://jsfiddle.net/zvto2mx5/3/

Now i fixed that and all the other errors it gave, but it seems to do nothing.
Any idea? no errors whatsoever

@AllanJard
Copy link
Contributor

The github file being loaded for the JS is an HTML page. Firefox shows me:

The resource from “https://github.com/LPmaverick/RowReorder/blob/master/js/dataTables.rowReorder.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

Even using their raw option isn't enough. Instead, if I copy / paste it into the JSFiddle and also include Select from around that era, then it does something: https://jsfiddle.net/re8bjLpu/ .

@paciox
Copy link

paciox commented Oct 29, 2024

The github file being loaded for the JS is an HTML page. Firefox shows me:

The resource from “https://github.com/LPmaverick/RowReorder/blob/master/js/dataTables.rowReorder.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

Even using their raw option isn't enough. Instead, if I copy / paste it into the JSFiddle and also include Select from around that era, then it does something: https://jsfiddle.net/re8bjLpu/ .

Wow, I haven't tought of checking out that one. Good spot!
Thanks, looks like it's working now, a bit rough in how it works but gets the job done

Thanks for now. If it's not too much work I will try to take a look into implementing in the new datatables lib and make a pull.
Can't promise anything though, at least for now

@piradoiv
Copy link

@AllanJard other than the Select dependency concern, are you interested in a PR that is compatible with the current codebase? I'd like to get this feature merged in and I'm happy to help, if you want.

@AllanJard
Copy link
Contributor

Possibly yes, it depends on how invasive the changes are? I also don't want to make Select a hard dependency for this plugin. That wouldn't be pulled in I'm afraid.

@piradoiv
Copy link

Perfect, I'll give it a try and create a new one as soon as possible.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants