Test
This commit is contained in:
@@ -96,6 +96,8 @@
|
||||
} else {
|
||||
// Config is NOT writable. Keep the error on-screen and keep re-checking every two seconds.
|
||||
|
||||
alert('setting first timeout function');
|
||||
|
||||
setTimeout('recheckConfigurationWritability();', 5000); // 5s until first re-check
|
||||
}
|
||||
}
|
||||
@@ -131,29 +133,36 @@
|
||||
return isValid;
|
||||
}
|
||||
|
||||
function recheckConfigurationWritability() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "Default.aspx/IsConfigurationFileWritable",
|
||||
data: "{}",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
async: false, // blocks until function returns - race conditions otherwise
|
||||
success: function (msg) {
|
||||
if (msg.d == true) {
|
||||
// Yes, config is writable. Hide "unwritable" div, show "writable" div, all is nice
|
||||
$('#DivDatabaseUnwritable').slideUp('fast').fadeOut('fast');
|
||||
$('#DivDatabaseWritable').fadeIn('fast');
|
||||
} else {
|
||||
// Config is NOT writable. Keep the error on-screen and keep re-checking every two seconds.
|
||||
|
||||
setTimeout('recheckConfigurationWritability();', 2000); // 5s until first re-check
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function recheckConfigurationWritability() {
|
||||
|
||||
alert('In timeout function');
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "Default.aspx/IsConfigurationFileWritable",
|
||||
data: "{}",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
async: false, // blocks until function returns - race conditions otherwise
|
||||
success: function (msg) {
|
||||
if (msg.d == true) {
|
||||
|
||||
alert('yes, writable');
|
||||
|
||||
// Yes, config is writable. Hide "unwritable" div, show "writable" div, all is nice
|
||||
$('#DivDatabaseUnwritable').slideUp('fast').fadeOut('fast');
|
||||
$('#DivDatabaseWritable').fadeIn('fast');
|
||||
} else {
|
||||
// Config is NOT writable. Keep the error on-screen and keep re-checking every two seconds.
|
||||
|
||||
setTimeout('recheckConfigurationWritability();', 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
|
||||
</telerik:RadAjaxManager>
|
||||
|
||||
Reference in New Issue
Block a user