The branch, master has been updated via da0fc40022e97fd13a2ea154ece2438f8de9470b (commit) from 326f13827b1779c310a93beb6ffc95404fbe1ff5 (commit)
- Log ----------------------------------------------------------------- commit da0fc40022e97fd13a2ea154ece2438f8de9470b Author: Madhura Jayaratne madhura.cj@gmail.com Date: Tue Mar 15 20:57:47 2011 +0530
A better way to handle clashing between row highlighting and inline edit.
-----------------------------------------------------------------------
Summary of changes: js/functions.js | 2 +- js/sql.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/js/functions.js b/js/functions.js index 3068c3e..94221b1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -594,7 +594,7 @@ $(document).ready(function() { */ $('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) { //do not trigger when clicked on anchor or inside input element (in inline editing mode) with exception of the first checkbox - if ($(e.target).is('a, a *') || $(e.target).parents('tr').find('td:nth(2)').hasClass('inline_edit_active')) { + if ($(e.target).is('a, a *')) { return; } // XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently diff --git a/js/sql.js b/js/sql.js index 1c46c05..1a389ae 100644 --- a/js/sql.js +++ b/js/sql.js @@ -416,7 +416,7 @@ $(document).ready(function() { $(".inline_edit_anchor").live('click', function(event) { /** @lends jQuery */ event.preventDefault(); - $(this).removeClass('inline_edit_anchor').addClass('inline_edit_active'); + $(this).removeClass('inline_edit_anchor').addClass('inline_edit_active').parent('tr').addClass('noclick');
// adding submit and hide buttons to inline edit <td> // for "hide", button the original data to be restored is present in .original_data @@ -442,7 +442,7 @@ $(document).ready(function() {
var $this_hide = $(this).parent(); $this_hide.removeClass("inline_edit_active hover").addClass("inline_edit_anchor"); - $this_hide.parent().removeClass("hover"); + $this_hide.parent().removeClass("hover noclick"); $this_hide.siblings().removeClass("hover");
var last_column = $this_hide.siblings().length; @@ -898,7 +898,7 @@ $(document).ready(function() {
PMA_ajaxShowMessage(data.message); $this_td.removeClass('inline_edit_active hover').addClass('inline_edit_anchor'); - $this_td.parent().removeClass('hover') + $this_td.parent().removeClass('hover noclick'); $this_td.siblings().removeClass('hover');
$input_siblings.each(function() {
hooks/post-receive