The branch, master has been updated via 4c1de0edcc62be76d9767af2dc068aac0b4383b7 (commit) via 9cf81c63ce61676a2653561c63879dd73861c2d4 (commit) from 996cf70d4833bcc56aaba47d0085fe3956a6ead6 (commit)
- Log ----------------------------------------------------------------- commit 4c1de0edcc62be76d9767af2dc068aac0b4383b7 Author: Marc Delisle marc@infomarc.info Date: Sun Feb 27 09:59:21 2011 -0500
Remove an incorrect second binding of the click event
commit 9cf81c63ce61676a2653561c63879dd73861c2d4 Author: Marc Delisle marc@infomarc.info Date: Sun Feb 27 09:44:31 2011 -0500
Inline edit for rows where an <input type="image"> has been generated for the Edit link
-----------------------------------------------------------------------
Summary of changes: js/functions.js | 8 +++++++- js/sql.js | 25 ++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/js/functions.js b/js/functions.js index 9d62ee8..f1542dd 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2523,7 +2523,13 @@ $(document).ready(function() { return $('a').css('cursor'); }) //todo: hover effect .live('click',function(e) { - $(this).parent().find('input:image').click(); + $this_span = $(this); + if ($this_span.closest('td').is('.inline_edit_anchor')) { + // this would bind a second click event to the inline edit + // anchor and would disturb its behavior + } else { + $this_span.parent().find('input:image').click(); + } });
}) // end of $(document).ready() diff --git a/js/sql.js b/js/sql.js index e5daf03..34e1e74 100644 --- a/js/sql.js +++ b/js/sql.js @@ -92,6 +92,7 @@ function appendInlineAnchor() { }); } else { + // horizontal mode $('.edit_row_anchor').each(function() {
var $this_td = $(this); @@ -103,13 +104,26 @@ function appendInlineAnchor() { if ($img_object.length != 0) { var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit'); $img_object.attr('src', img_src); + $cloned_anchor + .find('a').attr('href', '#') + .find('span') + .text(' ' + PMA_messages['strInlineEdit']); + $cloned_anchor + .find('span') + .first() + .prepend($img_object); + } else { + // the link was too big so <input type="image"> is there + $img_object = $cloned_anchor.find('input:image').attr('title', PMA_messages['strInlineEdit']); + var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit'); + $img_object.attr('src', img_src); + $cloned_anchor + .find('.clickprevimage') + .text(' ' + PMA_messages['strInlineEdit']); }
- $cloned_anchor.addClass('inline_edit_anchor') - .find('a').attr('href', '#') - .find('span') - .text(' ' + PMA_messages['strInlineEdit']) - .prepend($img_object); + $cloned_anchor + .addClass('inline_edit_anchor');
$this_td.after($cloned_anchor); }); @@ -413,6 +427,7 @@ $(document).ready(function() { */ var where_clause = $(this).parents('tbody').find('tr').find('.where_clause:nth('+this_row_index+')').val(); } + // horizontal mode else { var this_row_index = $(this).parent().index(); var $input_siblings = $(this).parent('tr').find('.inline_edit');
hooks/post-receive