+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*
*/
$this->assign('tagged', $entityTag);
// get the list of all the categories
- $allTag = CRM_Core_BAO_Tag::getTagsUsedFor($this->_entityTable);
+ $allTags = CRM_Core_BAO_Tag::getTagsUsedFor($this->_entityTable, FALSE);
// need to append the array with the " checked " if contact is tagged with the tag
- foreach ($allTag as $tagID => $varValue) {
+ foreach ($allTags as $tagID => $varValue) {
if (in_array($tagID, $entityTag)) {
$tagAttribute = array(
'checked' => 'checked',
$tags = new CRM_Core_BAO_Tag();
$tree = $tags->getTree($this->_entityTable, 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');
- $this->assign('loadjsTree', FALSE);
- 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');
- $this->assign('loadjsTree', TRUE);
- }
$this->assign('tree', $tree);
- $this->assign('tag', $allTag);
+ $this->assign('allTags', $allTags);
//build tag widget
$parentNames = CRM_Core_BAO_Tag::getTagSet('civicrm_contact');