The branch, master has been updated via 6290c8ecccfc3c614fb3c8d57da17bf20a99a6d7 (commit) via 989a1f35e9288f70fc7255b6368880185a7d60a2 (commit) via 20a04b2f2bf7935201b28bca609e488c82b05254 (commit) from cd1b2817b6238491df1a84405ccda7c78499f21f (commit)
- Log ----------------------------------------------------------------- commit 6290c8ecccfc3c614fb3c8d57da17bf20a99a6d7 Merge: cd1b2817b6238491df1a84405ccda7c78499f21f 989a1f35e9288f70fc7255b6368880185a7d60a2 Author: Marc Delisle marc@infomarc.info Date: Sat May 14 06:25:49 2011 -0400
Merge branch 'QA_3_4'
-----------------------------------------------------------------------
Summary of changes: js/functions.js | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/js/functions.js b/js/functions.js index 112cf0f..fd8b36b 100644 --- a/js/functions.js +++ b/js/functions.js @@ -747,21 +747,19 @@ function insertQuery(queryType) { valDis += "[value-" + NbSelect + "]"; editDis += myListBox.options[i].value + "=[value-" + NbSelect + "]"; } - if (queryType == "selectall") { - query = "SELECT * FROM `" + table + "` WHERE 1"; - } else if (queryType == "select") { - query = "SELECT " + chaineAj + " FROM `" + table + "` WHERE 1"; - } else if (queryType == "insert") { - query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")"; - } else if (queryType == "update") { - 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; + if (queryType == "selectall") { + query = "SELECT * FROM `" + table + "` WHERE 1"; + } else if (queryType == "select") { + query = "SELECT " + chaineAj + " FROM `" + table + "` WHERE 1"; + } else if (queryType == "insert") { + query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")"; + } else if (queryType == "update") { + query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1"; + } else if(queryType == "delete") { + query = "DELETE FROM `" + table + "` WHERE 1"; + } + document.sqlform.sql_query.value = query; + sql_box_locked = false; } }
@@ -1149,7 +1147,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; });
hooks/post-receive