From c3e9afc85abf9a5d982595b32a25efeaea7588bb Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 28 Jul 2015 13:04:53 +0000 Subject: [PATCH] Add nocheckbox option into tree widget to instruct the component not to render checkbox for the relevant item --- etemplate/inc/class.etemplate_widget_tree.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_tree.inc.php b/etemplate/inc/class.etemplate_widget_tree.inc.php index 0629f98d80..1712422573 100644 --- a/etemplate/inc/class.etemplate_widget_tree.inc.php +++ b/etemplate/inc/class.etemplate_widget_tree.inc.php @@ -32,7 +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 + * tree::CHECKED => true, * ), * array( * tree::ID => '/user', @@ -41,7 +41,7 @@ egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css'); * 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 + * tree::NOCHECKBOX => true * ), * )); * @@ -99,10 +99,15 @@ class etemplate_widget_tree extends etemplate_widget const OPEN = 'open'; /** - * check checkbox if exists (in case of three-state checkboxes values can be:0 unchecked- 1 - checked or -1 - unsure) + * key to check checkbox if exists (in case of three-state checkboxes values can be:0 unchecked- 1 - checked or -1 - unsure) */ const CHECKED = 'checked'; + /** + * key to instruct the component not to render checkbox for the related item, optional + */ + const NOCHECKBOX = 'nocheckbox'; + /** * Parse and set extra attributes from xml in template object *