Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Selected Nodes
<?php //For use the component YsJQuery::useComponent(YsJQueryConstant::COMPONENT_JQTREE); $root = new YsTreeNode('rootId'); $node0 = new YsTreeNode('node0', 'Node 0', $root); $node0->setSelected(true); $node0->setInitiallyOpen(true); $node1 = new YsTreeNode('node1', 'Node 1', $root); $node1->setSelected(true); $node00 = new YsTreeNode('node00', 'Node 00', $node0); $node01 = new YsTreeNode('node01', 'Node 01', $node0); $node000 = new YsTreeNode('node000', 'Node 000', $node00); $node001 = new YsTreeNode('node001', 'Node 001', $node00); $node10 = new YsTreeNode('node10', 'Node 10', $node1); $node11 = new YsTreeNode('node11', 'Node 11', $node1); $tree = new YsTree('treeId',$root); $tree->setSelectionLimit(3); ?> <button id="btnOpenDialog">Show Demo</button> <?php echo YsUIDialog::initWidget('dialogId','style="display:none" title="Basic dialog"') ?> <?php echo $tree->draw(); ?> <br/> <?php echo YsUIButton::initToolbar('toolbarId') ?> <button onclick="<?php echo $tree->selectAll() ?>">Select All</button> <button onclick="<?php echo $tree->deselectAll() ?>">Deselect All</button> <button onclick="<?php echo $tree->selectNode($node00)?>">Select Node 00</button> <button onclick="<?php echo $tree->deselectNode($node00)?>">Deselect Node 00</button> <button onclick="<?php echo $tree->hoverNode($node0) ?>">Hover Node 0</button> <button onclick="<?php echo $tree->dehoverNode($node0) ?>">Dehover Node 0</button> <button onclick="<?php echo $tree->toggleSelected() ?>">Toggle Selected</button> <button onclick="alert(jQuery('#treeId').jstree('is_selected','node00'))">Is selected Node 00?</button> <button onclick="alert(jQuery('#treeId').jstree('get_selected').children('a').text())">Get Selected</button> <?php echo YsUIButton::endToolbar() ?> <?php echo YsUIDialog::endWidget() ?> <?php echo YsJQuery::newInstance() ->onClick() // On Click ->in('#btnOpenDialog') // In the button with id "btnOpenDialog" ->execute( // DO YsUIDialog::build('#dialogId') // Build and open the UI Dialog ->_modal(true) ->_width(670) ->_height('auto') ->_buttons(array( 'Ok' => new YsJsFunction('alert("Hello world")'), 'Close' => new YsJsFunction(YsUIDialog::close('this'))) ), YsUIButton::build()->in('#toolbarId > button') ); ?>
Support requests, bug reports, and off-topic comments will be deleted without warning.