Add nocheckbox option into tree widget to instruct the component not to render checkbox for the relevant item

This commit is contained in:
Hadi Nategh 2015-07-28 13:04:53 +00:00
parent a5f347d484
commit c3e9afc85a

View File

@ -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/sub', tree::LABEL => 'sub', tree::IMAGE_LEAF => 'folderClosed.gif'),
* array(tree::ID => '/INBOX/sub2', tree::LABEL => 'sub2', 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( * array(
* tree::ID => '/user', * 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/birgit', tree::LABEL => 'birgit', tree::IMAGE_LEAF => 'folderClosed.gif'),
* array(tree::ID => '/user/ralf', tree::LABEL => 'ralf', tree::AUTOLOAD_CHILDREN => 1), * 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'; 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'; 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 * Parse and set extra attributes from xml in template object
* *