Html::redefineAlert PHP Method

redefineAlert() static public method

In this function, we redefine 'window.alert' javascript function by a jquery-ui dialog equivalent (but prettier).
static public redefineAlert ( )
    static function redefineAlert()
    {
        echo self::scriptBlock("\n      window.old_alert = window.alert;\n      window.alert = function(message, caption) {\n         message = message.replace('\\n', '<br>');\n         caption = caption || '" . __("Information") . "';\n         \$('<div>').html(message).dialog({\n            title: caption,\n            buttons: {\n               " . __('OK') . ": function() {\n                  \$(this).dialog('close');\n               }\n            },\n            close: function(){\n               \$(this).remove();\n            },\n            draggable: true,\n            modal: true,\n            resizable: false,\n            width: 'auto'\n         });\n      };");
    }
Html