From 6f7b52627b17b2c8ca3365fc4260cb55f8faa9fc Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Mon, 6 Jun 2011 11:10:50 +0100 Subject: [PATCH] Attached syntax highlited editor to Routine, Trigger and Event export dialogs. --- js/functions.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/functions.js b/js/functions.js index dd7e60e420..0ba3467635 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2312,11 +2312,14 @@ $(document).ready(function() { /** * Display the dialog to the user */ - $('
'+data.message+'
').dialog({ - width: 450, - buttons: button_options, - title: data.title - }).find('textarea').width('100%'); + var $ajaxDialog = $('
'+data.message+'
').dialog({ + width: 500, + buttons: button_options, + title: data.title + }); + // Attach syntax highlited editor to export dialog + var elm = $ajaxDialog.find('textarea'); + CodeMirror.fromTextArea(elm[0], {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"}); } else { PMA_ajaxShowMessage(data.error); }