From a4a56e959d315d7091287e14800301e0326ebad5 Mon Sep 17 00:00:00 2001 From: Web Access Date: Tue, 3 Mar 2015 21:28:43 +0530 Subject: [PATCH] Changes to CRm-15729 --- CRM/Contact/Form/Edit/TagsAndGroups.php | 3 ++- CRM/Tag/Form/Tag.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index 3e87594de9..23c83cf6bd 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -159,8 +159,9 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $tree = $tags->getTree('civicrm_contact', TRUE); // let's not load jstree if there are not children. This also fixes blank // display at the beginning of checkboxes + $loadJsTree = CRM_Utils_Array::retrieveValueRecursive($tree, 'children'); $form->assign('loadjsTree', FALSE); - if (!empty(CRM_Utils_Array::retrieveValueRecursive($tree, 'children'))) { + if (!empty($loadJsTree)) { // CODE FROM CRM/Tag/Form/Tag.php // CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) diff --git a/CRM/Tag/Form/Tag.php b/CRM/Tag/Form/Tag.php index 6c6ecfce2e..5d416985b9 100644 --- a/CRM/Tag/Form/Tag.php +++ b/CRM/Tag/Form/Tag.php @@ -102,8 +102,9 @@ class CRM_Tag_Form_Tag extends CRM_Core_Form { // let's not load jstree if there are not children. This also fixes blank // display at the beginning of checkboxes + $loadJsTree = CRM_Utils_Array::retrieveValueRecursive($tree, 'children'); $this->assign('loadjsTree', FALSE); - if (!empty(CRM_Utils_Array::retrieveValueRecursive($tree, 'children'))) { + if (!empty($loadJsTree)) { CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) ->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header'); -- 2.25.1