web/static/scripts/redisCommander.js
function setValidationClasses(element, success) {
  var add = (success ? 'validate-positive' : 'validate-negative');
  var remove = (success ? 'validate-negative' : 'validate-positive');
  if (element.className.indexOf(add) < 0) {
    $(element).removeClass(remove).addClass(add);
  }
}
function setValidationClasses(element, success) {
  var add = (success ? 'validate-positive' : 'validate-negative');
  var remove = (success ? 'validate-negative' : 'validate-positive');
  if (element.className.indexOf(add) < 0) {
    $(element).removeClass(remove).addClass(add);
  }
}
function setValidationClasses ( element , success ) { var add = ( success ? 'validate-positive' : 'validate-negative' ) ; var remove = ( success ? 'validate-negative' : 'validate-positive' ) ; if ( element . className . indexOf ( add ) < 0 ) { $ ( element ) . removeClass ( remove ) . addClass ( add ) ; } }
classes are only changed if not set right now

@param {Element} element HTML DOM element to change validation classes
@param {boolean} success true if positive validation class shall be assigned, false for error class
classes are only changed if not set right now