From 20a04b2f2bf7935201b28bca609e488c82b05254 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Sat, 14 May 2011 06:23:28 -0400 Subject: [PATCH] Patch 3301623 Clear button does not work --- js/functions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index 4d4f9c539..988ad5508 100644 --- a/js/functions.js +++ b/js/functions.js @@ -753,8 +753,6 @@ function insertQuery(queryType) { query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1"; } else if(queryType == "delete") { query = "DELETE FROM `" + table + "` WHERE 1"; - } else if(queryType == "clear") { - query = ''; } document.sqlform.sql_query.value = query; sql_box_locked = false; @@ -1145,7 +1143,11 @@ $(document).ready(function(){ }); $('.sqlbutton').click(function(evt){ - insertQuery(evt.target.id); + if (evt.target.id == 'clear') { + $('#sqlquery').val(''); + } else { + insertQuery(evt.target.id); + } return false; });