From 8d424171ae1a4e1c978f49b278f54f99d321652a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 28 Jul 2015 13:01:32 +0000 Subject: [PATCH] Add checked option to tree widget --- etemplate/inc/class.etemplate_widget_tree.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_tree.inc.php b/etemplate/inc/class.etemplate_widget_tree.inc.php index 62153b91ea..ce7fbe78fa 100644 --- a/etemplate/inc/class.etemplate_widget_tree.inc.php +++ b/etemplate/inc/class.etemplate_widget_tree.inc.php @@ -32,6 +32,7 @@ egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css'); * array(tree::ID => '/INBOX/sub', tree::LABEL => 'sub', tree::IMAGE_LEAF => 'folderClosed.gif'), * array(tree::ID => '/INBOX/sub2', tree::LABEL => 'sub2', tree::IMAGE_LEAF => 'folderClosed.gif'), * ), + * tree::CHECKED => true * ), * array( * tree::ID => '/user', @@ -39,7 +40,8 @@ egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css'); * tree::CHILDREN => array( * array(tree::ID => '/user/birgit', tree::LABEL => 'birgit', tree::IMAGE_LEAF => 'folderClosed.gif'), * array(tree::ID => '/user/ralf', tree::LABEL => 'ralf', tree::AUTOLOAD_CHILDREN => 1), - * ) + * ), + * tree::CHECKED => false * ), * )); * @@ -95,7 +97,12 @@ class etemplate_widget_tree extends etemplate_widget * key of flag if folder is open, default folder is closed */ const OPEN = 'open'; - + + /** + * check checkbox if exists (in case of three-state checkboxes values can be:0 unchecked- 1 - checked or -1 - unsure) + */ + const CHECKED = 0; + /** * Parse and set extra attributes from xml in template object *