public/assets/plugins/pickletree/pickletree.js
/**
   * toggle open or close node childs
   * @param {object} node
   */
toggle open or close node childs
@param {object} node
toggle open or close node childs @param { object } node
toggleNode(node) {
    if (node.childs.length > 0) {
      let ie = document.getElementById('i_' + node.id);
      let ule = document.getElementById('c_' + node.id);
      if (node.foldedStatus === false) {
        ie.classList.remove('fa-minus');
        ie.classList.add('fa-plus');
        ule.style.display = 'none';
      } else {
        ie.classList.remove('fa-plus');
        ie.classList.add('fa-minus');
        ule.style.display = '';
      }
      node.foldedStatus = !node.foldedStatus;
      for (let key in this.nodeList) {
        if (this.nodeList[key].id === node.id) {
          this.nodeList[key].foldedStatus = node.foldedStatus;
        }
      }
      this.log('node toggled..');
    } else {
      this.log('node not has childs...!');
    }
  }
toggleNode ( node ) { if ( node . childs . length > 0 ) { let ie = document . getElementById ( 'i_' + node . id ) ; let ule = document . getElementById ( 'c_' + node . id ) ; if ( node . foldedStatus === false ) { ie . classList . remove ( 'fa-minus' ) ; ie . classList . add ( 'fa-plus' ) ; ule . style . display = 'none' ; } else { ie . classList . remove ( 'fa-plus' ) ; ie . classList . add ( 'fa-minus' ) ; ule . style . display = '' ; } node . foldedStatus = ! node . foldedStatus ; for ( let key in this . nodeList ) { if ( this . nodeList [ key ] . id === node . id ) { this . nodeList [ key ] . foldedStatus = node . foldedStatus ; } } this . log ( 'node toggled..' ) ; } else { this . log ( 'node not has childs...!' ) ; } }
toggle open or close node childs
 @param {object} node
toggle open or close node childs @param { object } node
//change icon //hide element //change icon //show element //change node status