JQuery Gantt Editor
jquery Gantt Edit (hereinafter referred to as GE) is an open source, jquery-based Gantt chart plugin, author: robicch. GitHub Address: Https://github.com/robicch/jQueryGantt
The first is GE's main features:
- Based on jquery
- MIT License: You can reuse it anywhere
- JSON data transfer
- Available all over the world
- Task Management and workflow processing
- Manage task dependencies (subordinate)
- Manage Jobs (resources, roles, progress)
- Server synchronization
- Support Undo Redo
- Browser compatible (can be compatible with IE8 and above, other basic support)
How to use
First download the component resources, click I download, the source code inside the gantt.html is already a can use the Gantt chart
Use Firefox or Google to debug your code
First, define a global variable GE; Here is a discussion of scope issues later
var ge = new Ganttmaster ();
Task data modifications to the Gantt Chart can be saved using Ge.saveproject ()
Ge.saveproject ()
Load a project using Ge.loadproject ( [Yourjsonproject] )
Ge.loadproject (JSON)
Project data structure for a Gantt chart
{tasks:[...] Resources: [...] Roles: [...] Deletedtaskids:[...]
Selectedrow:7
Canwrite:true
Canwriteonparent:true
mineditabledate:1349906300000
maxeditabledate:3499063999999}
where tasks,roles,resources are arrays
Tasks: It's a dry tut. The data in the order that is displayed on the Gantt Chart, all parameters of the task data shown here
{"id": "Tmp_fk1345562123031″," "Name": "Approval", "code": "APP", "Level": 2, "status": "Status_suspended", "Start":1348696800000, "duration":ten, "End": 1349906399999, "Startismilestone": false , "Endismilestone": false , "Assigs": [...], "Depends": "7:3,8″," description ":" Approval of testing "," Progress ":
-
- RESOURCEID: Unique ID, associated with resource
- Unique ID of the Id:assige object
- Roleid: Unique role ID, and roles want to associate
- Effort: expected impact of workload, also 13-bit timestamp
Resources: Arrays contain the following data structures
{"id": "Tmp_1″," "Name": "Resource 1″}
Roles: The array contains the following data structures
{"id": "Tmp_1″," "Name": "Project Manager"}
Deletetaskids: The number of deleted tasks, which contains the task data deleted by the client IDs, those whose IDs are beginning with temp will not be saved to the server, but will be silently deleted
Selectedrow: The line that is being edited now
CanWrite: Boolean, if you want to edit/create/delete tasks again, set him to Ture
Canwritonparent: This is a little vague, for example, you are the owner of a sub-task under a complex project, and your modified time is likely to be an image to the top of the project, so you can set it to false to organize changes to the top-project.
Mineditabledate,maxeditabledate: Set minimum and maximum time
State conversion rules
* Note: The case of the state here to differentiate does not support lowercase
- Any status->status_done: Bag to complete. All activities (execution) in the state, including suspend/suspend and undefined tasks can be set to complete state, subset will be set to completed state
- Status_failed-Status_done: Failure to complete, no manual setting, nothing to do
- status_undefined-status_active: Undefined to execution, all child tasks without dependencies (depends) become executed
- Status_suspended-status_active: From tentative/pending to execution, all subtasks that do not have a dependency (depends) disabled, including subtasks are set to active (temporarily not understood)
- Status_done-status_active: All those that have dependencies on this task will be set to suspend/suspend
- Any status-> status_suspended: arbitrary state to suspend/suspend, all subtasks, and subtasks dependent tasks will become paused/suspended, except for failed and forbidden
- Any status-> status_undefined: arbitrary state to undefined, all subtasks, and subtasks dependent tasks will become paused/suspended, except for failed and forbidden
- Any status-> status_failed: from any state to failure, all subtasks and subtasks are dependent on the task becoming failed
JQuery Gantt Edit: (i) parameters and method descriptions