diff --git a/js/functions.js b/js/functions.js index 908ced29f..a3080180b 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1703,13 +1703,13 @@ function changeMIMEType(db, table, reference, mime_type) */ $(document).ready(function(){ var $oldText,$db,$table,$token,$sql_query; - $oldText=$(".syntax").html(); + $oldText=$(".inner_sql").html(); $("#inline_edit").click(function(){ $db=$("input[name='db']").val(); $table=$("input[name='table']").val(); $token=$("input[name='token']").val(); $sql_query=$("input[name='sql_query']").val(); - $(".syntax").replaceWith(""); + $(".inner_sql").replaceWith(""); return false; }); @@ -1718,7 +1718,7 @@ $(document).ready(function(){ }); $("#btnDiscard").live("click",function(){ - $(".sql").html(""+$oldText+""); + $(".sql").html(""+$oldText+""); }); $('.sqlbutton').click(function(evt){ diff --git a/libraries/common.lib.php b/libraries/common.lib.php index d7333c7a9..6591715ec 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -320,7 +320,7 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '') switch ($cfg['SQP']['fmtType']) { case 'none': if ($unparsed_sql != '') { - $formatted_sql = "
\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n
"; + $formatted_sql = '
' . "\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n" . '
'; } else { $formatted_sql = PMA_SQP_formatNone($parsed_sql); } diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 136612fe4..bb103aa50 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -2092,6 +2092,10 @@ if (! defined('PMA_MINIMUM_COMMON')) { $docu = TRUE; break; } // end switch + // inner_sql is a span that exists for all cases + // of $cfg['SQP']['fmtType'] to make possible a replacement + // for inline editing + $str .= ''; $close_docu_link = false; $indent = 0; $bracketlevel = 0; @@ -2578,7 +2582,10 @@ if (! defined('PMA_MINIMUM_COMMON')) { $str .= ''; $close_docu_link = false; } + // close inner_sql span + $str .= ''; if ($mode=='color') { + // close syntax span $str .= ''; }