alterm4nn / ChronoZoom

ChronoZoom is an interactive timeline for all of history.
http://www.chronozoom.com
156 stars 124 forks source link

Ability to Copy and Paste Timelines #1341

Closed NeilCresswell closed 9 years ago

NeilCresswell commented 9 years ago

This is now fully functional but has a few rough edges remaining, which are being looked into.

Copy icon on any timeline (next to favorites once you're logged in) can be used to copy any timeline, including all descendant timelines and all related exhibits and exhibit content items. Timelines are copied to the client machine's localStorage, so they can then be imported, including on a different log in if desired or multiple times. The export can be maintained indefinitely until the user's cache is cleared.

Import icon appears when the user is logged in and when an export is located in localStorage which matches the same database schema at the time of export. Imports are only permitted if the imported timeline will fit within the date bounds of the target timeline to import into, and if the user has appropriate permissions on the target timeline.

Rough edges remaining:

This has been written so that the storage mechanism could be enhanced to include the option to store to a file, which would give the users a chance to do personal backups or to transfer data to a different server. If you'd like to grab a personal copy in the meantime, this is typically easy to do with your browser's developer tools (typically F12.) e.g. For Chrome F12, Resources, Local Storage, double click on the ExportedTimelines value to copy, then you can paste into a text file. You should also copy off the ExportedSchemaVersion.

Validation is limited, but timelines are only imported as complete timelines. (All or nothing.)

alterm4nn commented 9 years ago

@NeilCresswell There's still a bug with paste button not presenting right after clicking on copy.

NeilCresswell commented 9 years ago

Updated Copy and Paste for timelines as follows:

alterm4nn commented 9 years ago

@NeilCresswell Thanks!

saekow commented 9 years ago

Thank you as well ! !