diff options
-rw-r--r-- | codebase/gantt_connector.php | 14 | ||||
-rw-r--r-- | samples/gantt/01_basic_init_connector.php | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/codebase/gantt_connector.php b/codebase/gantt_connector.php index 11ae06a..1c04116 100644 --- a/codebase/gantt_connector.php +++ b/codebase/gantt_connector.php @@ -93,10 +93,16 @@ class GanttConnector extends Connector{ $this->request->set_filter($this->config->text[1]["name"],$_GET["from"],">"); } } - + public function openAll($mode = true) { GanttDataItem::$open = $mode; } + + public function render_links($table,$id="",$fields=false,$extra=false,$relation_id=false) { + $links = new OptionsConnector($this->get_connection(),$this->names["db_class"]); + $links->render_table($table,$id,$fields,$extra); + $this->set_options("links", $links); + } } /*! DataProcessor class for Gantt component @@ -237,5 +243,11 @@ class JSONGanttConnector extends GanttConnector { $this->event->trigger("beforeOutput", $this, $out); $out->output("", true, $this->encoding); } + + public function render_links($table,$id="",$fields=false,$extra=false,$relation_id=false) { + $links = new JSONOptionsConnector($this->get_connection(),$this->names["db_class"]); + $links->render_table($table,$id,$fields,$extra); + $this->set_options("links", $links); + } } ?>
\ No newline at end of file diff --git a/samples/gantt/01_basic_init_connector.php b/samples/gantt/01_basic_init_connector.php index 304ab35..a39c2b3 100644 --- a/samples/gantt/01_basic_init_connector.php +++ b/samples/gantt/01_basic_init_connector.php @@ -8,5 +8,6 @@ $gantt = new JSONGanttConnector($res); $gantt->openAll(); + $gantt->render_links("gantt_links", "id", "source_task,target_task,type"); $gantt->render_table("gantt_tasks","id","start_date,duration,text,progress,order,parent"); ?>
\ No newline at end of file |