<fim-prefix>e user
                 */
                var $ajaxDialog = $('<div>' + data.message + '</div>').dialog({
                                      width: 500,
                                      buttons: button_options,
                                      title: data.title
                                  });
                // Attach syntax highlited editor to export dialog
                /**
                 * @var    $elm    jQuery object containing the reference
                 *                 to the Export textarea.
                 */
                var $elm = $ajaxDialog.find('textarea');
                /**
                 * @var    opts    Options to pass to the codemirror editor.
                 */
                var opts = {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"};
                CodeMirror.fromTextArea($elm[0], opts);
            } else {
                PMA_ajaxShowMessage(data.error, false);
            }
        }); // end $.get()
    }); // end $.live()

    /**
     * Attach Ajax event handlers for Drop functionality of Routines, Triggers and Events.
     */
    $('a.ajax_drop_anchor').live('click', function (event) {
        event.preventDefault();
        /**
         * @var $curr_row    Object containing reference to the current row
         */
        var $curr_row = $(this).parents('tr');
        /**
         * @var question    String containing the question to be asked for confirmation
         */
        // BUG: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
        // var question = $('<div/>').text($curr_row.children('td').children('.drop_sql').html());
        // FIXED:
 <fim-middle>       var question = $('<div/>').text($curr_row.children('td').children('.drop_sql').text());
        // We ask for confirmation first here, before submitting the ajax request
        $(this).PMA_conf<fix-suffix>irm(question, $(this).attr('href'), function (url) {
            /**
             * @var    $msg    jQuery object containing the reference to
             *                 the AJAX message shown to the user.
             */
            var $msg = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
            $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) {
                if (data.success === true) {
                    /**
                     * @var $table    Object containing reference to the main list of elements.
                     */
                    var $table = $curr_row.parent();
                    // Check how many rows will be left after we remove
                    // the one that the user has requested us to remove
                    if ($table.find('tr').length === 2) {
                        // If there are two rows left, it means that they are
                        // the header of the table and the rows that we are
        <|endoftext|>