The branch, master has been updated via 47dd2a01430f6a0c142734260cf11ce920bb4e32 (commit) via 33b48269a5a65fc918e7a9ee96b4921a876d8bdf (commit) from fd121f211a805e6cb83b51f5087ac79e7791dbba (commit)
- Log ----------------------------------------------------------------- commit 47dd2a01430f6a0c142734260cf11ce920bb4e32 Merge: 33b48269a5a65fc918e7a9ee96b4921a876d8bdf fd121f211a805e6cb83b51f5087ac79e7791dbba Author: Marc Delisle marc@infomarc.info Date: Thu Jul 21 09:54:28 2011 -0400
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 33b48269a5a65fc918e7a9ee96b4921a876d8bdf Author: Marc Delisle marc@infomarc.info Date: Thu Jul 21 09:54:09 2011 -0400
Streamline jQuery usage
-----------------------------------------------------------------------
Summary of changes: js/sql.js | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/js/sql.js b/js/sql.js index 0476795..6ee84dd 100644 --- a/js/sql.js +++ b/js/sql.js @@ -281,10 +281,11 @@ $(document).ready(function() { if ($zero_row_results.length > 0) { $('#sqlquery').val($zero_row_results.val()); } else { - $sqlqueryresults.show(); - $sqlqueryresults.html(data); - $sqlqueryresults.trigger('appendAnchor'); - $sqlqueryresults.trigger('makegrid'); + $sqlqueryresults + .show() + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); $('#togglequerybox').show(); if ($("#togglequerybox").siblings(":visible").length > 0) { $("#togglequerybox").trigger('click'); @@ -320,14 +321,13 @@ $(document).ready(function() { */ var $form = $(this).parent("form");
- var $sqlqueryresults = $("#sqlqueryresults"); - PMA_prepareForAjaxRequest($form);
$.post($form.attr('action'), $form.serialize(), function(data) { - $sqlqueryresults.html(data); - $sqlqueryresults.trigger('appendAnchor'); - $sqlqueryresults.trigger('makegrid'); + $("#sqlqueryresults") + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); PMA_init_slider();
PMA_ajaxRemoveMessage($msgbox); @@ -341,22 +341,23 @@ $(document).ready(function() { * @see $cfg['AjaxEnable'] */ $("#pageselector").live('change', function(event) { - var $the_form = $(this).parent("form"); + var $form = $(this).parent("form");
if ($(this).hasClass('ajax')) { event.preventDefault();
var $msgbox = PMA_ajaxShowMessage();
- $.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) { - $("#sqlqueryresults").html(data); - $("#sqlqueryresults").trigger('appendAnchor'); - $("#sqlqueryresults").trigger('makegrid'); + $.post($form.attr('action'), $form.serialize() + '&ajax_request=true', function(data) { + $("#sqlqueryresults") + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); PMA_init_slider(); PMA_ajaxRemoveMessage($msgbox); }) // end $.post() } else { - $the_form.submit(); + $form.submit(); }
})// end Paginate results with Page Selector
hooks/post-receive