[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_2RC1-1406-gf5a11a3

Michal Čihař nijel at users.sourceforge.net
Fri Apr 9 15:08:20 CEST 2010


The branch, master has been updated
       via  f5a11a3f647332fe109af17c1af4246aec096648 (commit)
      from  5309444bba069bab9e744dd4a42d329bd1e54169 (commit)


- Log -----------------------------------------------------------------
commit f5a11a3f647332fe109af17c1af4246aec096648
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Apr 9 15:08:05 2010 +0200

    Bind event externally.

-----------------------------------------------------------------------

Summary of changes:
 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 699a0fe..447d1c6 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1718,5 +1718,10 @@ $(document).ready(function(){
     $("#btnDiscard").live("click",function(){
         $(".sql").html("<span class=\"syntax\">"+$oldText+"</span>");
     });
+
+    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 f7638ec..e00c1b8 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) . '</textarea>' . "\n";
     // Add buttons to generate query easily for select all,single select,insert,update and delete
     if(count($fields_list)) {
-        echo '<input type="button" value="' . __('SELECT *') . '" id="selectall" onclick="insertQuery(this.id)" />';
-        echo '<input type="button" value="' . __('SELECT') . '" id="select" onclick="insertQuery(this.id)" />';
-        echo '<input type="button" value="' . __('INSERT') . '" id="insert" onclick="insertQuery(this.id)" />';
-        echo '<input type="button" value="' . __('UPDATE') . '" id="update" onclick="insertQuery(this.id)" />';
-        echo '<input type="button" value="' . __('DELETE') . '" id="delete" onclick="insertQuery(this.id)" />';
+        echo '<input type="button" value="' . __('SELECT *') . '" id="selectall" class="sqlbutton" />';
+        echo '<input type="button" value="' . __('SELECT') . '" id="select" class="sqlbutton" />';
+        echo '<input type="button" value="' . __('INSERT') . '" id="insert" class="sqlbutton" />';
+        echo '<input type="button" value="' . __('UPDATE') . '" id="update" class="sqlbutton" />';
+        echo '<input type="button" value="' . __('DELETE') . '" id="delete" class="sqlbutton" />';
     }
     echo '</div>' . "\n";
 


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list