robicch / jQueryGantt

jQuery Gantt editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add save, load to local file system

brentfraser opened this issue · comments

It would be nice to be able to save the project to the local file system, and to load from the local file system. The functions could be invoked by the user clicking "Save File" and "Open File" buttons (next to the current "Save" and "Clear" buttons)

I've implemented this in #172, the UI isn't pretty but it's working.

Regards, Martinus

It looks pretty good.

Currently it saves/loads:

{
    "tasks": [
        {
            "id": -1,

I wonder if it should save/load:

{
    "project": {
        "tasks": [{
                "id": -1,

Basically adding a top level "project" object. I think this would make it compatible with the server-generated JSON (it 's been a while since I've looked at this.) Perhaps @robicch can comment?

This is possible in general, but the problem is how to check a single project integrity while editing.
I mean that you have to avoid to create cross project dependencies, block move up/down inside project boundaries and so on.
Moreover having several project on the same gantt will kill the editor :-)
It works quite fairly up to 250-300 tasks, no more.

I was thinking not so much about multiple projects but more about server compatibility, just to enable a workflow like:

  1. Create a project in the client, save locally
    2 Load the local project, do some more edits
  2. Upload the project to server

Hi Roberto
Thank you for making this available. I am looking for an online gantt software to manage a personal project and your editor won me over, because of how easy it is to make changes on the task list and assign resources.
I am not a programmer though, so i don't understand how to make it save files on a server. I have an wamp server were i copied all the files and un-commend the code between lines 154-174. I assumed by doing so, when i click the save button the gantt will be saved in a file in the root of my web-server. Instead it is downloading the json file.

So what do i need to do to save the project on the server?

I will actually only ever work in one project so i don't even need the option to load other files.
Kind regards
Alkis

@alkis01 unfortunately, to save/load to/from the server, you need to implement the functionality yourself, because this project only have the client side code.

Regards,

Martinus