Amer
Amer

Reputation: 488

Completely disable ADAM in 2SXC

is there any way to completely disable ADAM in 2sxc?

or at least hide everything related to it? I don't want the users to use it or even to ask me what is it , I completely prefer to use the old traditional way of managing files.

Thanks

ADAM

Upvotes: 0

Views: 129

Answers (1)

MDM
MDM

Reputation: 927

This works for me to remove all Adam field hints:

var dropzone = document.getElementsByClassName('dropzone');
for (i = 0; i < dropzone.length; i++) { 
  var input = dropzone[i].getElementsByTagName('input');
  input[0].removeAttribute("uib-tooltip");
  var hint = dropzone[i].getElementsByTagName('adam-hint');
  hint[0].remove();
}

Note the remove() function is DOM level 4 which may not be supported everywhere (https://catalin.red/removing-an-element-with-plain-javascript-remove-method/). You can do that with removeChild() also but you'll need to do a little more work to get the direct parent of the adam-hint.

Upvotes: 1

Related Questions