chrismheiser / lipdnet

All things related to Lipd.net and the LiPD Playground
http://www.lipd.net
1 stars 1 forks source link

Duplicate table feature #93

Open nickmckay opened 3 years ago

nickmckay commented 3 years ago

Can we create a "duplicate table" button? This would be helpful for many more complex files.

Originally posted by @alenakimbrough in https://github.com/chrismheiser/lipdnet/issues/78#issuecomment-780939261

nickmckay commented 3 years ago

Sorry, I guess I didn't realize how similar this was to the last issue. But all that is needed is that it would duplicate a table of the same type in the same paleo/chron object. I'll leave it here as a reminder for now.

alenakimbrough commented 3 years ago

Yes, a duplicate table button would be perfect! Thanks Nick.

Not sure if this is in a similar realm, but it would also be handy to be able to move/re-order columns. Say if you realized that you missed a critical column that should have gone in as column #3, not #18. Otherwise I think you have to start over/amend the columns in between.

chrismheiser commented 1 year ago

Duplicate table was written a while back in the commit below, but for some reason isn't on the prod site. Will deploy that and close this issue when done.

https://github.com/chrismheiser/lipdnet/commit/e3346f90f37622e71f79d27ac566befd2eb2b9bc

@alenakimbrough Manipulating the spreadsheet is available in the HandsOnTable module we use via the context menu (right click on a cell). They don't provide a function for moving or re-ordering columns, but I can add "add col left" and "add col right" to the context menu that may be a little helpful for your situation https://handsontable.com/docs/javascript-data-grid/context-menu/

EDIT: After putting some time into it, there's not a simple way to do moving, re-ordering, or add col left/right. While they have adding columns under the Pro / paid version of the package, so likely not worthwhile. I tried to do a workaround, but didn't get it functional.