From f5a11a3f647332fe109af17c1af4246aec096648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 9 Apr 2010 15:08:05 +0200 Subject: [PATCH] Bind event externally. --- js/functions.js | 5 +++++ libraries/sql_query_form.lib.php | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/js/functions.js b/js/functions.js index 699a0fe11..447d1c648 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1718,5 +1718,10 @@ $(document).ready(function(){ $("#btnDiscard").live("click",function(){ $(".sql").html(""+$oldText+""); }); + + jQuery('.sqlbutton').click(function(evt){ + insertQuery(evt.target.id); + return false; + }); }); diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index f7638ecb1..e00c1b8cd 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -298,11 +298,11 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter .$auto_sel . $locking . '>' . htmlspecialchars($query) . '' . "\n"; // Add buttons to generate query easily for select all,single select,insert,update and delete if(count($fields_list)) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; } echo '' . "\n";