Merge remote branch 'origin/master'
This commit is contained in:
@@ -60,9 +60,9 @@ $(document).ready(function() {
|
||||
.after(data.sql_query);
|
||||
|
||||
//Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
|
||||
var notice_class = $("#topmenucontainer").next("div").find('.notice');
|
||||
if($(notice_class).text() == '') {
|
||||
$(notice_class).remove();
|
||||
var $notice_class = $("#topmenucontainer").next("div").find('.notice');
|
||||
if ($notice_class.text() == '') {
|
||||
$notice_class.remove();
|
||||
}
|
||||
|
||||
$("<span>" + PMA_messages['strReloadDatabase'] + "?</span>").dialog({
|
||||
|
24
js/sql.js
24
js/sql.js
@@ -54,10 +54,11 @@ function getFieldName($this_field, disp_mode) {
|
||||
* The function that iterates over each row in the table_results and appends a
|
||||
* new inline edit anchor to each table row.
|
||||
*
|
||||
* @param disp_mode string
|
||||
*/
|
||||
function appendInlineAnchor(disp_mode) {
|
||||
if(disp_mode == 'vertical') {
|
||||
function appendInlineAnchor() {
|
||||
var disp_mode = $("#top_direction_dropdown").val();
|
||||
|
||||
if (disp_mode == 'vertical') {
|
||||
// there can be one or two tr containing this class, depending
|
||||
// on the ModifyDeleteAtLeft and ModifyDeleteAtRight cfg parameters
|
||||
$('#table_results tr')
|
||||
@@ -163,10 +164,9 @@ $(document).ready(function() {
|
||||
* Attach the {@link appendInlineAnchor} function to a custom event, which
|
||||
* will be triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
* @name sqlqueryresults_live
|
||||
*/
|
||||
$("#sqlqueryresults").live('appendAnchor',function() {
|
||||
appendInlineAnchor(disp_mode);
|
||||
appendInlineAnchor();
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -224,7 +224,10 @@ $(document).ready(function() {
|
||||
|
||||
$.post($(this).attr('action'), $(this).serialize() , function(data) {
|
||||
if(data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
// fade out previous success message, if any
|
||||
$('.success').fadeOut();
|
||||
// show a message that stays on screen
|
||||
$('#sqlqueryform').before(data.message);
|
||||
$('#sqlqueryresults').show();
|
||||
// this happens if a USE command was typed
|
||||
if (typeof data.reload != 'undefined') {
|
||||
@@ -243,6 +246,7 @@ $(document).ready(function() {
|
||||
$('#sqlqueryresults').hide();
|
||||
}
|
||||
else {
|
||||
// real results are returned
|
||||
$('#sqlqueryresults').show();
|
||||
$("#sqlqueryresults").html(data);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
@@ -270,13 +274,13 @@ $(document).ready(function() {
|
||||
PMA_ajaxShowMessage();
|
||||
|
||||
/**
|
||||
* @var the_form Object referring to the form element that paginates the results table
|
||||
* @var $the_form Object referring to the form element that paginates the results table
|
||||
*/
|
||||
var the_form = $(this).parent("form");
|
||||
var $the_form = $(this).parent("form");
|
||||
|
||||
$(the_form).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||
$the_form.append('<input type="hidden" name="ajax_request" value="true" />');
|
||||
|
||||
$.post($(the_form).attr('action'), $(the_form).serialize(), function(data) {
|
||||
$.post($the_form.attr('action'), $the_form.serialize(), function(data) {
|
||||
$("#sqlqueryresults").html(data);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
}) // end $.post()
|
||||
|
@@ -51,7 +51,7 @@ $(document).ready(function() {
|
||||
event.preventDefault();
|
||||
|
||||
// empty previous search results while we are waiting for new results
|
||||
$("#searchresults").empty();
|
||||
$("#sqlqueryresults").empty();
|
||||
PMA_ajaxShowMessage(PMA_messages['strSearching']);
|
||||
|
||||
// add this hidden field just once
|
||||
@@ -62,7 +62,8 @@ $(document).ready(function() {
|
||||
$.post($search_form.attr('action'), $search_form.serialize(), function(response) {
|
||||
if (typeof response == 'string') {
|
||||
// found results
|
||||
$("#searchresults").html(response);
|
||||
$("#sqlqueryresults").html(response);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
$('#tbl_search_form').hide();
|
||||
$('#togglesearchform')
|
||||
// always start with the Show message
|
||||
@@ -71,7 +72,7 @@ $(document).ready(function() {
|
||||
.show();
|
||||
} else {
|
||||
// error message (zero rows)
|
||||
$("#searchresults").html(response['message']);
|
||||
$("#sqlqueryresults").html(response['message']);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@@ -16,6 +16,7 @@
|
||||
require_once './libraries/common.inc.php';
|
||||
require_once './libraries/mysql_charsets.lib.php';
|
||||
|
||||
$GLOBALS['js_include'][] = 'sql.js';
|
||||
$GLOBALS['js_include'][] = 'tbl_select.js';
|
||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
|
||||
@@ -302,7 +303,7 @@ $(function() {
|
||||
<input type="submit" name="submit" value="<?php echo __('Go'); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="searchresults"></div>
|
||||
<div id="sqlqueryresults"></div>
|
||||
<?php
|
||||
require './libraries/footer.inc.php';
|
||||
}
|
||||
|
Reference in New Issue
Block a user