|
var $VoodooAjaxDialog
function jsonEncode(stringToEncode) {
if (stringToEncode) {
stringToEncode = stringToEncode.replace(/\\/g, "\\\\");
stringToEncode = stringToEncode.replace(/'/g, "\\\'");
return stringToEncode;
}
return "";
}
$(document).ready(function () {
$VoodooAjaxDialog = $('<div></div>').dialog({ autoOpen: false,
title: "Loading...",
width: 100,
height: 150,
modal: false
});
});
function createVoodooCmsDialog(modalId, title, width, height, isModal) {
$("#" + modalId).dialog({
autoOpen: false,
title: title,
width: width,
height: height,
modal: isModal
});
}
function openVoodooCmsDialog(modalId) {
$("#" + modalId).dialog('open');
}
function closeVoodooCmsDialog(modalId) {
$("#" + modalId).dialog('close');
}
function showVoodooJavaScriptError(xhr, ajaxOptions, thrownError) {
alert(xhr.status + ":" + thrownError + "<br />" + xhr.responseText);
}
function openVoodooCmsAjaxWait(color) {
$VoodooAjaxDialog.html("<img src=\"/content/images/Ajax-Loader-" + color + ".gif\" style=\"margin-left: 10px;\" />");
$VoodooAjaxDialog.dialog('open');
}
function closeVoodooCmsAjaxWait() {
$VoodooAjaxDialog.dialog('close');
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a general technology enthusiast and like to work on my Voodoo Content Management System and other personal programming projects in my free time.