dist/opt/svnadmin/templates/script.js
/**
 * Executes an test of the given settings-section.
 * 
 * @param testSection The section to test.
 * @param requestVars The variables which are required for an successful test.
 * @param resultContainer The id of the container, which will contain the result.
 */
Executes an test of the given settings-section.

@param testSection The section to test.
@param requestVars The variables which are required for an successful test.
@param resultContainer The id of the container, which will contain the result.
Executes an test of the given settings - section . @param testSection The section to test . @param requestVars The variables which are required for an successful test . @param resultContainer The id of the container which will contain the result .
function testSettings(testSection, params, resultContainer)
{	
	params.dotest = 1;
	params.dotestsec = testSection;
	var C = $(resultContainer);
	$.ajax({
		type: "post",
		url: "settings.php",
		data: params,
		cache: false,
		dataType: "json",
		beforeSend: function(jqXHR, settings) {
			C.removeClass();
			C.html(HtmlData.ajaxLoadingImage());
			C.show();
		},
		error: function(jqXHR, textStatus, errorThrown) {
			var s =
				"AJAX Error:<br>" +
				"jqXHR=" + jqXHR + "<br>" +
				"textStatus=" + textStatus + ";<br>" +
				"errorThrown=" + errorThrown + ";<br>";
			C.addClass("errormsg");
			C.html(s).show();
		},
		success: function(data, textStatus, jqXHR) {
			var msg = data.message;
			if (typeof data.php_error !== "undefined") {
				msg += "<br><b>An PHP error occured!</b><br>";
				msg += data.php_error.message;
			}
			if (data.type == "error") {
				C.addClass("errormsg");
			}
			else {
				C.addClass("okmsg");
			}
			C.html(data.message);
		},
		complete: function(jqXHR, textStatus) {
			C.show();
		}
	});
}
function testSettings ( testSection , params , resultContainer ) { params . dotest = 1 ; params . dotestsec = testSection ; var C = $ ( resultContainer ) ; $ . ajax ( { type : "post" , url : "settings.php" , data : params , cache : false , dataType : "json" , beforeSend : function ( jqXHR , settings ) { C . removeClass ( ) ; C . html ( HtmlData . ajaxLoadingImage ( ) ) ; C . show ( ) ; } , error : function ( jqXHR , textStatus , errorThrown ) { var s = "AJAX Error:<br>" + "jqXHR=" + jqXHR + "<br>" + "textStatus=" + textStatus + ";<br>" + "errorThrown=" + errorThrown + ";<br>" ; C . addClass ( "errormsg" ) ; C . html ( s ) . show ( ) ; } , success : function ( data , textStatus , jqXHR ) { var msg = data . message ; if ( typeof data . php_error !== "undefined" ) { msg += "<br><b>An PHP error occured!</b><br>" ; msg += data . php_error . message ; } if ( data . type == "error" ) { C . addClass ( "errormsg" ) ; } else { C . addClass ( "okmsg" ) ; } C . html ( data . message ) ; } , complete : function ( jqXHR , textStatus ) { C . show ( ) ; } } ) ; }
Executes an test of the given settings-section.
Executes an test of the given settings - section .
// Append static control parameters. // Hide old result element. // Get response text. // Set style class of container. // Display response to user. // Show result.