Changes to CRm-15729
authorWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 3 Mar 2015 15:58:43 +0000 (21:28 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Wed, 4 Mar 2015 06:52:49 +0000 (12:22 +0530)
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Tag/Form/Tag.php

index 3e87594de9f4b0a64382087813e870cc3c68c47b..23c83cf6bd569da8777d5685a9fadca2e536c101 100644 (file)
@@ -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)
index 6c6ecfce2e542911cb45cf2ae374423d7551d6b8..5d416985b9528965404530db1482d86b11bcdb5f 100644 (file)
@@ -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');