dist/opt/svnadmin/templates/script.js
/**
 * This function should be called with any change of the provider types.
 * It handles the logic of possible combinations and updates the user interface.
 * On this way the user can not make a wrong configuration.
 * 
 * @return void
 */
This function should be called with any change of the provider types.
It handles the logic of possible combinations and updates the user interface.
On this way the user can not make a wrong configuration.

@return void
This function should be called with any change of the provider types . It handles the logic of possible combinations and updates the user interface . On this way the user can not make a wrong configuration . @return void
function updateSettingsSelection()
{
  var speed = "slow";
  if ($("#UserViewProviderType").val() == "off")
  {
    $("#tbl_userfile").hide(speed);
    $("#tbl_userdigestfile").hide(speed);
    $("#tbl_ldapconnection").hide(speed);
    $("#tbl_ldapuser").hide(speed);
    $("#UserEditProviderType").val("off");
    $("#UserEditProviderType").attr("disabled", "disabled");
  }
  else if($("#UserViewProviderType").val() == "passwd")
  {
    $("#tbl_ldapconnection").hide(speed);
    $("#tbl_ldapuser").hide(speed);
    $("#tbl_userdigestfile").hide(speed);
    $("#tbl_userfile").show(speed);
    $("#UserEditProviderType").removeAttr("disabled");
	if($("#UserEditProviderType").val() != "off")
	  $("#UserEditProviderType").val("passwd");
  }
  else if($("#UserViewProviderType").val() == "digest")
  {
    $("#tbl_ldapconnection").hide(speed);
    $("#tbl_ldapuser").hide(speed);
    $("#tbl_userfile").hide(speed);
    $("#tbl_userdigestfile").show(speed);
    $("#UserEditProviderType").removeAttr("disabled");
	if($("#UserEditProviderType").val() != "off")
	  $("#UserEditProviderType").val("digest");
  }
  else if($("#UserViewProviderType").val() == "ldap")
  {
    $("#tbl_userfile").hide(speed);
    $("#tbl_userdigestfile").hide(speed);
    $("#tbl_ldapconnection").show(speed);
    $("#tbl_ldapuser").show(speed);
    $("#UserEditProviderType").val("off");
    $("#UserEditProviderType").attr("disabled", "disabled");
  }
  if ($("#GroupViewProviderType").val() == "off")
  {
    if ($("#UserViewProviderType").val() != "ldap"){
      $("#tbl_ldapconnection").hide(speed);
    }
    $("#tbl_ldapgroup").hide(speed);
    $("#GroupEditProviderType").val("off");
    $("#GroupEditProviderType").attr("disabled", "disabled");
  }
  else if ($("#GroupViewProviderType").val() == "svnauthfile")
  {
    if ($("#UserViewProviderType").val() != "ldap"){
      $("#tbl_ldapconnection").hide(speed);
    }
    $("#tbl_ldapgroup").hide(speed);
    $("#GroupEditProviderType").removeAttr("disabled");
  }
  else if ($("#GroupViewProviderType").val() == "ldap")
  {
    if ($("#UserViewProviderType").val() == "ldap")
    {
      $("#tbl_ldapconnection").show(speed);
      $("#tbl_ldapgroup").show(speed);
      $("#GroupEditProviderType").val("off");
      $("#GroupEditProviderType").attr("disabled", "disabled");
    }
    else
    {
      $("#GroupViewProviderType").val("off");
      $("#tbl_ldapgroup").hide(speed);
      $("#GroupEditProviderType").val("off");
      $("#GroupEditProviderType").attr("disabled", "disabled");
      alert("The users must be fetched from LDAP, if you want to use the groups from your LDAP server.");
    }
  }
  if ($("#RepositoryViewProviderType").val() == "off")
  {
    $("#tbl_subversion").hide(speed);
    $("#RepositoryEditProviderType").val("off");
    $("#RepositoryEditProviderType").attr("disabled", "disabled");
  }
  else if ($("#RepositoryViewProviderType").val() == "svnclient")
  {
    $("#tbl_subversion").show(speed);
    $("#RepositoryEditProviderType").removeAttr("disabled");
  }
}
function updateSettingsSelection ( ) { var speed = "slow" ; if ( $ ( "#UserViewProviderType" ) . val ( ) == "off" ) { $ ( "#tbl_userfile" ) . hide ( speed ) ; $ ( "#tbl_userdigestfile" ) . hide ( speed ) ; $ ( "#tbl_ldapconnection" ) . hide ( speed ) ; $ ( "#tbl_ldapuser" ) . hide ( speed ) ; $ ( "#UserEditProviderType" ) . val ( "off" ) ; $ ( "#UserEditProviderType" ) . attr ( "disabled" , "disabled" ) ; } else if ( $ ( "#UserViewProviderType" ) . val ( ) == "passwd" ) { $ ( "#tbl_ldapconnection" ) . hide ( speed ) ; $ ( "#tbl_ldapuser" ) . hide ( speed ) ; $ ( "#tbl_userdigestfile" ) . hide ( speed ) ; $ ( "#tbl_userfile" ) . show ( speed ) ; $ ( "#UserEditProviderType" ) . removeAttr ( "disabled" ) ; if ( $ ( "#UserEditProviderType" ) . val ( ) != "off" ) $ ( "#UserEditProviderType" ) . val ( "passwd" ) ; } else if ( $ ( "#UserViewProviderType" ) . val ( ) == "digest" ) { $ ( "#tbl_ldapconnection" ) . hide ( speed ) ; $ ( "#tbl_ldapuser" ) . hide ( speed ) ; $ ( "#tbl_userfile" ) . hide ( speed ) ; $ ( "#tbl_userdigestfile" ) . show ( speed ) ; $ ( "#UserEditProviderType" ) . removeAttr ( "disabled" ) ; if ( $ ( "#UserEditProviderType" ) . val ( ) != "off" ) $ ( "#UserEditProviderType" ) . val ( "digest" ) ; } else if ( $ ( "#UserViewProviderType" ) . val ( ) == "ldap" ) { $ ( "#tbl_userfile" ) . hide ( speed ) ; $ ( "#tbl_userdigestfile" ) . hide ( speed ) ; $ ( "#tbl_ldapconnection" ) . show ( speed ) ; $ ( "#tbl_ldapuser" ) . show ( speed ) ; $ ( "#UserEditProviderType" ) . val ( "off" ) ; $ ( "#UserEditProviderType" ) . attr ( "disabled" , "disabled" ) ; } if ( $ ( "#GroupViewProviderType" ) . val ( ) == "off" ) { if ( $ ( "#UserViewProviderType" ) . val ( ) != "ldap" ) { $ ( "#tbl_ldapconnection" ) . hide ( speed ) ; } $ ( "#tbl_ldapgroup" ) . hide ( speed ) ; $ ( "#GroupEditProviderType" ) . val ( "off" ) ; $ ( "#GroupEditProviderType" ) . attr ( "disabled" , "disabled" ) ; } else if ( $ ( "#GroupViewProviderType" ) . val ( ) == "svnauthfile" ) { if ( $ ( "#UserViewProviderType" ) . val ( ) != "ldap" ) { $ ( "#tbl_ldapconnection" ) . hide ( speed ) ; } $ ( "#tbl_ldapgroup" ) . hide ( speed ) ; $ ( "#GroupEditProviderType" ) . removeAttr ( "disabled" ) ; } else if ( $ ( "#GroupViewProviderType" ) . val ( ) == "ldap" ) { if ( $ ( "#UserViewProviderType" ) . val ( ) == "ldap" ) { $ ( "#tbl_ldapconnection" ) . show ( speed ) ; $ ( "#tbl_ldapgroup" ) . show ( speed ) ; $ ( "#GroupEditProviderType" ) . val ( "off" ) ; $ ( "#GroupEditProviderType" ) . attr ( "disabled" , "disabled" ) ; } else { $ ( "#GroupViewProviderType" ) . val ( "off" ) ; $ ( "#tbl_ldapgroup" ) . hide ( speed ) ; $ ( "#GroupEditProviderType" ) . val ( "off" ) ; $ ( "#GroupEditProviderType" ) . attr ( "disabled" , "disabled" ) ; alert ( "The users must be fetched from LDAP, if you want to use the groups from your LDAP server." ) ; } } if ( $ ( "#RepositoryViewProviderType" ) . val ( ) == "off" ) { $ ( "#tbl_subversion" ) . hide ( speed ) ; $ ( "#RepositoryEditProviderType" ) . val ( "off" ) ; $ ( "#RepositoryEditProviderType" ) . attr ( "disabled" , "disabled" ) ; } else if ( $ ( "#RepositoryViewProviderType" ) . val ( ) == "svnclient" ) { $ ( "#tbl_subversion" ) . show ( speed ) ; $ ( "#RepositoryEditProviderType" ) . removeAttr ( "disabled" ) ; } }
This function should be called with any change of the provider types.
This function should be called with any change of the provider types .
// UserView // Group view // Repository view