gadget_officejs_interface_widget_timeline_html.html 3.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
<!DOCTYPE html>
<html>
  <head>
    <title>Timeline Interface</title>
  </head>
  <body>
    <h1>widget_timeline_interface</h1>
    <h3>A timeline gadget allows to display various types of schedules</h3>
    <dl>
      <dt>render</dt>
      <dd>render a timeline</dd>
      <dl>
        <dt data-parameter-required="required" data-parameter-type="object">configuration_dict</dt>
        <dd><code style="display:block;white-space:pre-wrap">

  Generic timeline gadget. The purpose of this gadget is to provide an unique
  API for various timeline libraries

  Options supported are :
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Parameters to generate a graph",
  "properties": {
    "tree_title": {
      "description": "The title of the tree",
      "type": "string"
      },
    "tree_list": {
      "description": "the list of item needed to construct resource tree",
      "items": {
          "properties" : {
            "title": {
              "description": "The title of the resource",
              "type": "string"
            },
            "id": {
              "description": "an identifier for the resource",
              "type": "string"
            },
            "parent_id": {
              "description": "the identifier of the parent resource",
              "type": "string"
            },
          },
          "additionalProperties": false,
          "type": "object",
          },
      "type": "array",
     },
   "data_list": {
      "description": "the list of task to be displayed in timeline",
      "items": {
          "properties" : {
            "title": {
              "description": "The title of the task",
              "type": "string"
            },
            "id": {
              "description": "an identifier for the task",
              "type": "string"
            },
            "tree_id": {
              "description": "the identifier of the corresponding resource",
              "type": "string"
            },
            "start_date": {
              "description": "task starting date",
              "type": "string"
            },
            "stop_date": {
              "description": "task end date",
              "type": "string"
            },
            "background_color": {
              "description": "task color",
              "type": "string"
            },
          },
          "additionalProperties": false,
          "type": "object",
          },
      "type": "array",
      }
  },
  "additionalProperties": false
}






  Example of options:
  { tree_title: "Tasks",
    tree_list: [{'title': 'Phase 1',
                 'id': '1'},
                {'title': 'Phase 1.1',
                 'id': '1.1',
                 'parent_id': '1'},
                {'title': 'Phase 1.1.1',
                 'id': '1.1.1',
                 'parent_id': '1.1'},
                {'title': 'Phase 2',
                 'id': '2'}],
    data_list : [{'id': '1',
                  'tree_id': '1.1.1',
                  'title': 'Task A in Phase 1.1.1',
                  'start_date': '2017-03-01',
                  'stop_date': '2017-04-15'},
                 {'id': '2',
                  'tree_id': '2',
                  'title': 'Task B in Group 2',
                  'start_date': '2017-04-15',
                  'stop_date': '2017-06-30',
                  'background_color': 'green'}]
  }
          </code></dd>
      </dl>
    </dl>
  </body>
</html>