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