docs: function (event, data) {
                  // A node was activated: display its title:
                  // On change
                  if (!multiselect) {
                      var _data = $dlg.data('selectId');
                      var newId = data.node.key;
  
                      if (_data.onChange) _data.onChange(newId, _data.selectedID, _data.objects[newId]);
  
                      _data.selectedID = newId;
                      if (!_data.noDialog) {
                          // Set title of dialog box
                          var title = _data.texts.selectid + ' - ' + getNameObj(_data.objects[newId], newId);
                          if (typeof M !== 'undefined') {
                              $dlg.find('.title').text(title);
                          } else {
                              $dlg.dialog('option', 'title', title);
                          }
  
                          // Enable/ disable 'Select' button
                          if (_data.objects[newId]) { // && _data.objects[newId].type === 'state') {
                              $dlg.find('#button-ok').removeClass('ui-state-disabled');
                              $dlg.find('.btn-set').removeClass('disabled');
                          } else {
                              $dlg.find('#button-ok').addClass('ui-state-disabled');
                              $dlg.find('.btn-set').addClass('disabled');
                          }
  
                      }
                  }
              }