commit
d12158eb83
@ -19,6 +19,7 @@ $header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('functions.js');
|
||||
$scripts->addFile('makegrid.js');
|
||||
$scripts->addFile('jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('sql.js');
|
||||
|
||||
require 'libraries/db_common.inc.php';
|
||||
|
||||
@ -44,7 +44,7 @@ function loadResult(result_path, table_name, link)
|
||||
/** Load the browse results to the page */
|
||||
$("#table-info").show();
|
||||
$('#table-link').attr({"href" : 'sql.php' + link }).text(table_name);
|
||||
var url = result_path + "#sqlqueryresults";
|
||||
var url = result_path + "#searchresults";
|
||||
$.get(url, {'ajax_request': true, 'is_js_confirmed': true}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
$('#browse-results').html(data.message);
|
||||
@ -53,7 +53,9 @@ function loadResult(result_path, table_name, link)
|
||||
scrollTop: $("#browse-results").offset().top
|
||||
}, 1000);
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
PMA_makegrid($('#table_results')[0], true, true, true, true);
|
||||
$('.table_results').each(function () {
|
||||
PMA_makegrid(this, true, true, true, true);
|
||||
})
|
||||
$('#browse-results').show();
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
@ -82,7 +84,7 @@ function deleteResult(result_path, msg)
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strDeleting, false);
|
||||
/** Load the deleted option to the page*/
|
||||
$('#sqlqueryform').html('');
|
||||
var url = result_path + "#result_query, #sqlqueryform";
|
||||
var url = result_path;
|
||||
$.get(url, {'ajax_request': true, 'is_js_confirmed': true},
|
||||
function (data) {
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
@ -228,7 +230,7 @@ AJAX.registerOnload('db_search.js', function () {
|
||||
.show();
|
||||
} else {
|
||||
// error message (zero rows)
|
||||
$("#sqlqueryresults").html(data.error);
|
||||
$("#searchresults").html(data.error).show();
|
||||
}
|
||||
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
|
||||
@ -2698,11 +2698,11 @@ AJAX.registerOnload('functions.js', function () {
|
||||
**/
|
||||
$("#tbl_maintenance li a.maintain_action.ajax").live('click', function (event) {
|
||||
event.preventDefault();
|
||||
if ($("#sqlqueryresults").length !== 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
if ($(".sqlqueryresults").length !== 0) {
|
||||
$(".sqlqueryresults").remove();
|
||||
}
|
||||
if ($("#result_query").length !== 0) {
|
||||
$("#result_query").remove();
|
||||
if ($(".result_query").length !== 0) {
|
||||
$(".result_query").remove();
|
||||
}
|
||||
//variables which stores the common attributes
|
||||
$.post($(this).attr('href'), { ajax_request: 1 }, function (data) {
|
||||
@ -2712,20 +2712,20 @@ AJAX.registerOnload('functions.js', function () {
|
||||
var $temp_div;
|
||||
if (typeof data !== 'undefined' && data.success === true && data.sql_query !== undefined) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("<div id='sqlqueryresults' class='ajax'></div>").prependTo("#page_content");
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("<div class='sqlqueryresults ajax'></div>").prependTo("#page_content");
|
||||
$(".sqlqueryresults").html(data.sql_query);
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
scrollToTop();
|
||||
} else if (typeof data !== 'undefined' && data.success === true) {
|
||||
var $temp_div = $("<div id='temp_div'></div>");
|
||||
$temp_div.html(data.message);
|
||||
var $success = $temp_div.find("#result_query .success");
|
||||
var $success = $temp_div.find(".result_query .success");
|
||||
PMA_ajaxShowMessage($success);
|
||||
$("<div id='sqlqueryresults' class='ajax'></div>").prependTo("#page_content");
|
||||
$("#sqlqueryresults").html(data.message);
|
||||
$("<div class='sqlqueryresults ajax'></div>").prependTo("#page_content");
|
||||
$(".sqlqueryresults").html(data.message);
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
PMA_init_slider();
|
||||
$("#sqlqueryresults").children("fieldset,br").remove();
|
||||
$(".sqlqueryresults").children("fieldset,br").remove();
|
||||
scrollToTop();
|
||||
} else {
|
||||
$temp_div = $("<div id='temp_div'></div>");
|
||||
@ -3411,22 +3411,22 @@ function indexEditorDialog(url, title, callback_success, callback_failure)
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
//User wants to submit the form
|
||||
$.post($form.attr('action'), $form.serialize() + "&do_save_data=1", function (data) {
|
||||
if ($("#sqlqueryresults").length !== 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
if ($(".sqlqueryresults").length !== 0) {
|
||||
$(".sqlqueryresults").remove();
|
||||
}
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
$('<div class="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
}
|
||||
$("#result_query .notice").remove();
|
||||
$("#result_query").prepend(data.message);
|
||||
$(".result_query .notice").remove();
|
||||
$(".result_query").prepend(data.message);
|
||||
/*Reload the field form*/
|
||||
$("#table_index").remove();
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(data.index_table);
|
||||
@ -3733,7 +3733,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('.vpointer').die('hover');
|
||||
$('.vmarker').die('click');
|
||||
$('#pageselector').die('change');
|
||||
$('select.pageselector').die('change');
|
||||
$('a.formLinkSubmit').die('click');
|
||||
$('#update_recent_tables').unbind('ready');
|
||||
$('#sync_favorite_tables').unbind('ready');
|
||||
@ -4098,16 +4098,16 @@ AJAX.registerOnload('functions.js', function () {
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function (url) {
|
||||
PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
|
||||
$.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) {
|
||||
if ($("#sqlqueryresults").length !== 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
if ($(".sqlqueryresults").length !== 0) {
|
||||
$(".sqlqueryresults").remove();
|
||||
}
|
||||
if ($("#result_query").length !== 0) {
|
||||
$("#result_query").remove();
|
||||
if ($(".result_query").length !== 0) {
|
||||
$(".result_query").remove();
|
||||
}
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("<div id='sqlqueryresults'></div>").prependTo("#page_content");
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("<div class='sqlqueryresults ajax'></div>").prependTo("#page_content");
|
||||
$(".sqlqueryresults").html(data.sql_query);
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
@ -4348,7 +4348,7 @@ function PMA_createViewDialog($this)
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
$('#createViewDialog').dialog("close");
|
||||
$('#result_query').html(data.message);
|
||||
$('.result_query').html(data.message);
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
|
||||
@ -533,11 +533,11 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
$('<div class="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
|
||||
@ -194,9 +194,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.reposDrop();
|
||||
g.colRsz = false;
|
||||
$(g.cRsz).find('div').removeClass('colborder_active');
|
||||
if($('#sticky_columns').length !== 0) {
|
||||
rearrangeStickyColumns();
|
||||
}
|
||||
rearrangeStickyColumns($(t).prev('.sticky_columns'), $(t));
|
||||
} else if (g.colReorder) {
|
||||
// shift columns
|
||||
if (g.colReorder.newn != g.colReorder.n) {
|
||||
@ -223,9 +221,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.cPointer).css('visibility', 'hidden');
|
||||
|
||||
g.colReorder = false;
|
||||
if($('#sticky_columns').length !== 0) {
|
||||
rearrangeStickyColumns();
|
||||
}
|
||||
rearrangeStickyColumns($(t).prev('.sticky_columns'), $(t));
|
||||
}
|
||||
$(document.body).css('cursor', 'inherit').noSelect(false);
|
||||
},
|
||||
@ -251,7 +247,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.cRsz).find('div').hide();
|
||||
var $firstRowCols = $(g.t).find('tr:first th.draggable:visible');
|
||||
var $resizeHandles = $(g.cRsz).find('div').removeClass('condition');
|
||||
$('table.pma_table').find('thead th:first').removeClass('before-condition');
|
||||
$(g.t).find('table.pma_table').find('thead th:first').removeClass('before-condition');
|
||||
for (var n = 0, l = $firstRowCols.length; n < l; n++) {
|
||||
var $col = $($firstRowCols[n]);
|
||||
$($resizeHandles[n]).css('left', $col.position().left + $col.outerWidth(true))
|
||||
@ -264,7 +260,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
}
|
||||
if ($($resizeHandles[0]).hasClass('condition')) {
|
||||
$('table.pma_table').find('thead th:first').addClass('before-condition');
|
||||
$(g.t).find('thead th:first').addClass('before-condition');
|
||||
}
|
||||
$(g.cRsz).css('height', $(g.t).height());
|
||||
},
|
||||
@ -411,9 +407,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
var isOneColumn = g.visibleHeadersCount == 1;
|
||||
// enable or disable restore button
|
||||
if (isInitial || isOneColumn) {
|
||||
$('div.restore_column').hide();
|
||||
$(g.o).find('div.restore_column').hide();
|
||||
} else {
|
||||
$('div.restore_column').show();
|
||||
$(g.o).find('div.restore_column').show();
|
||||
}
|
||||
},
|
||||
|
||||
@ -722,7 +718,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
* @var field_name String containing the name of this field.
|
||||
* @see getFieldName()
|
||||
*/
|
||||
var field_name = getFieldName($td);
|
||||
var field_name = getFieldName($(t), $td);
|
||||
/**
|
||||
* @var relation_curr_value String current value of the field (for fields that are foreign keyed).
|
||||
*/
|
||||
@ -1068,7 +1064,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
/**
|
||||
* @var relational_display string 'K' if relational key, 'D' if relational display column
|
||||
*/
|
||||
var relational_display = $("#relational_display_K").prop('checked') ? 'K' : 'D';
|
||||
var relational_display = $(g.o).find("input[name=relational_display]:checked").val();
|
||||
/**
|
||||
* @var transform_fields Array containing the name/value pairs for transformed fields
|
||||
*/
|
||||
@ -1096,7 +1092,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
/**
|
||||
* @var is_unique Boolean, whether the rows in this table is unique or not
|
||||
*/
|
||||
var is_unique = $('td.edit_row_anchor').is('.nonunique') ? 0 : 1;
|
||||
var is_unique = $(g.t).find('td.edit_row_anchor').is('.nonunique') ? 0 : 1;
|
||||
/**
|
||||
* multi edit variables
|
||||
*/
|
||||
@ -1111,7 +1107,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
|
||||
// loop each edited row
|
||||
$('td.to_be_saved').parents('tr').each(function () {
|
||||
$(g.t).find('td.to_be_saved').parents('tr').each(function () {
|
||||
var $tr = $(this);
|
||||
var where_clause = $tr.find('.where_clause').val();
|
||||
if (typeof where_clause === 'undefined') {
|
||||
@ -1140,7 +1136,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
* @var field_name String containing the name of this field.
|
||||
* @see getFieldName()
|
||||
*/
|
||||
var field_name = getFieldName($this_field);
|
||||
var field_name = getFieldName($(g.t), $this_field);
|
||||
|
||||
/**
|
||||
* @var this_field_params Array temporary storage for the name/value of current field
|
||||
@ -1244,7 +1240,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.cEdit).find('*').prop('disabled', true);
|
||||
$(g.cEdit).find('.edit_box').addClass('edit_box_posting');
|
||||
} else {
|
||||
$('div.save_edited').addClass('saving_edited_data')
|
||||
$(g.o).find('div.save_edited').addClass('saving_edited_data')
|
||||
.find('input').prop('disabled', true); // disable the save button
|
||||
}
|
||||
|
||||
@ -1259,14 +1255,14 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.cEdit).find('*').removeProp('disabled');
|
||||
$(g.cEdit).find('.edit_box').removeClass('edit_box_posting');
|
||||
} else {
|
||||
$('div.save_edited').removeClass('saving_edited_data')
|
||||
$(g.o).find('div.save_edited').removeClass('saving_edited_data')
|
||||
.find('input').removeProp('disabled'); // enable the save button back
|
||||
}
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
|
||||
// update where_clause related data in each edited row
|
||||
$('td.to_be_saved').parents('tr').each(function () {
|
||||
$(g.t).find('td.to_be_saved').parents('tr').each(function () {
|
||||
var new_clause = $(this).data('new_clause');
|
||||
var $where_clause = $(this).find('.where_clause');
|
||||
var old_clause = $where_clause.val();
|
||||
@ -1305,22 +1301,23 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
var tools = $result_query.find('.tools').wrap('<p>').parent().html();
|
||||
// sqlOuter and tools will not be present if 'Show SQL queries' configuration is off
|
||||
if (typeof sqlOuter != 'undefined' && typeof tools != 'undefined') {
|
||||
$existing_query = $(g.o).find('.result_query');
|
||||
// If two query box exists update query in second else add a second box
|
||||
if ($('#result_query').find('div.sqlOuter').length > 1) {
|
||||
$('#result_query').children(":nth-child(4)").remove();
|
||||
$('#result_query').children(":nth-child(4)").remove();
|
||||
$('#result_query').append(sqlOuter + tools);
|
||||
if ($existing_query.find('div.sqlOuter').length > 1) {
|
||||
$existing_query.children(":nth-child(4)").remove();
|
||||
$existing_query.children(":nth-child(4)").remove();
|
||||
$existing_query.append(sqlOuter + tools);
|
||||
} else {
|
||||
$('#result_query').append(sqlOuter + tools);
|
||||
$existing_query.append(sqlOuter + tools);
|
||||
}
|
||||
PMA_highlightSQL($('#result_query'));
|
||||
PMA_highlightSQL($existing_query);
|
||||
}
|
||||
}
|
||||
// hide and/or update the successfully saved cells
|
||||
g.hideEditCell(true, data);
|
||||
|
||||
// remove the "Save edited cells" button
|
||||
$('div.save_edited').hide();
|
||||
$(g.o).find('div.save_edited').hide();
|
||||
// update saved fields
|
||||
$(g.t).find('.to_be_saved')
|
||||
.removeClass('to_be_saved')
|
||||
@ -1355,7 +1352,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
* @var field_name String containing the name of this field.
|
||||
* @see getFieldName()
|
||||
*/
|
||||
var field_name = getFieldName($this_field);
|
||||
var field_name = getFieldName($(g.t), $this_field);
|
||||
|
||||
/**
|
||||
* @var this_field_params Array temporary storage for the name/value of current field
|
||||
@ -1409,7 +1406,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.currentEditCell).addClass('to_be_saved')
|
||||
.data('value', this_field_params[field_name]);
|
||||
if (g.saveCellsAtOnce) {
|
||||
$('div.save_edited').show();
|
||||
$(g.o).find('div.save_edited').show();
|
||||
}
|
||||
g.isCellEdited = true;
|
||||
}
|
||||
@ -1485,7 +1482,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
var $firstRowCols = $(g.t).find('tr:first th.draggable');
|
||||
|
||||
// initialize column order
|
||||
$col_order = $('#col_order'); // check if column order is passed from PHP
|
||||
$col_order = $(g.o).find('.col_order'); // check if column order is passed from PHP
|
||||
if ($col_order.length > 0) {
|
||||
g.colOrder = $col_order.val().split(',');
|
||||
for (var i = 0; i < g.colOrder.length; i++) {
|
||||
@ -1499,9 +1496,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
|
||||
// register events
|
||||
$(t).find('th.draggable')
|
||||
$(g.t).find('th.draggable')
|
||||
.mousedown(function (e) {
|
||||
$('#sqlqueryresults').addClass("turnOffSelect");
|
||||
$(g.o).addClass("turnOffSelect");
|
||||
if (g.visibleHeadersCount > 1) {
|
||||
g.dragStartReorder(e, this);
|
||||
}
|
||||
@ -1536,12 +1533,12 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
})
|
||||
.find("input").focus().select();
|
||||
});
|
||||
$(t).find('th.draggable a')
|
||||
$(g.t).find('th.draggable a')
|
||||
.dblclick(function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
// restore column order when the restore button is clicked
|
||||
$('div.restore_column').click(function () {
|
||||
$(g.o).find('div.restore_column').click(function () {
|
||||
g.restoreColOrder();
|
||||
});
|
||||
|
||||
@ -1550,7 +1547,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
$(g.gDiv).append(g.cCpy);
|
||||
|
||||
// prevent default "dragstart" event when dragging a link
|
||||
$(t).find('th a').bind('dragstart', function () {
|
||||
$(g.t).find('th a').bind('dragstart', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1579,7 +1576,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
var $firstRowCols = $(g.t).find('tr:first th.draggable');
|
||||
|
||||
// initialize column visibility
|
||||
var $col_visib = $('#col_visib'); // check if column visibility is passed from PHP
|
||||
var $col_visib = $(g.o).find('.col_visib'); // check if column visibility is passed from PHP
|
||||
if ($col_visib.length > 0) {
|
||||
g.colVisib = $col_visib.val().split(',');
|
||||
for (var i = 0; i < g.colVisib.length; i++) {
|
||||
@ -1655,7 +1652,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
|
||||
// hide column visibility list if we move outside the list
|
||||
$(t).find('td, th.draggable').mouseenter(function () {
|
||||
$(g.t).find('td, th.draggable').mouseenter(function () {
|
||||
g.hideColList();
|
||||
});
|
||||
|
||||
@ -1704,11 +1701,11 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.showDataRowLinkText = PMA_messages.strShowDataRowLink;
|
||||
|
||||
// initialize cell editing configuration
|
||||
g.saveCellsAtOnce = $('#save_cells_at_once').val();
|
||||
g.saveCellsAtOnce = $(g.o).find('.save_cells_at_once').val();
|
||||
g.maxTruncatedLen = PMA_commonParams.get('LimitChars');
|
||||
|
||||
// register events
|
||||
$(t).find('td.data.click1')
|
||||
$(g.t).find('td.data.click1')
|
||||
.click(function (e) {
|
||||
startGridEditing(e, this);
|
||||
// prevent default action when clicking on "link" in a table
|
||||
@ -1717,7 +1714,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
});
|
||||
|
||||
$(t).find('td.data.click2')
|
||||
$(g.t).find('td.data.click2')
|
||||
.click(function (e) {
|
||||
$cell = $(this);
|
||||
// In the case of relational link, We want single click on the link
|
||||
@ -1807,7 +1804,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.hideEditCell(true);
|
||||
}
|
||||
});
|
||||
$('div.save_edited').click(function () {
|
||||
$(g.o).find('div.save_edited').click(function () {
|
||||
g.hideEditCell();
|
||||
g.postEditedCell();
|
||||
});
|
||||
@ -1846,6 +1843,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
// initialize the table variable
|
||||
g.t = t;
|
||||
|
||||
// enclosing .sqlqueryresults div
|
||||
g.o = $(t).parents('.sqlqueryresults');
|
||||
|
||||
// get data columns in the first row of the table
|
||||
var $firstRowCols = $(t).find('tr:first th.draggable');
|
||||
|
||||
@ -1860,8 +1860,8 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
}
|
||||
|
||||
// assign table create time
|
||||
// #table_create_time will only available if we are in "Browse" tab
|
||||
g.tableCreateTime = $('#table_create_time').val();
|
||||
// table_create_time will only available if we are in "Browse" tab
|
||||
g.tableCreateTime = $(t).find('.table_create_time').val();
|
||||
|
||||
// assign the hints
|
||||
g.sortHint = PMA_messages.strSortHint;
|
||||
@ -1870,7 +1870,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.copyHint = PMA_messages.strColNameCopyHint;
|
||||
|
||||
// assign common hidden inputs
|
||||
var $common_hidden_inputs = $('div.common_hidden_inputs');
|
||||
var $common_hidden_inputs = $(g.o).find('div.common_hidden_inputs');
|
||||
g.token = $common_hidden_inputs.find('input[name=token]').val();
|
||||
g.server = $common_hidden_inputs.find('input[name=server]').val();
|
||||
g.db = $common_hidden_inputs.find('input[name=db]').val();
|
||||
@ -1895,7 +1895,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.initColResize();
|
||||
}
|
||||
if (enableReorder &&
|
||||
$('table.navigation').length > 0) // disable reordering for result from EXPLAIN or SHOW syntax, which do not have a table navigation panel
|
||||
$(g.o).find('table.navigation').length > 0) // disable reordering for result from EXPLAIN or SHOW syntax, which do not have a table navigation panel
|
||||
{
|
||||
g.initColReorder();
|
||||
}
|
||||
@ -1938,7 +1938,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.dragMove(e);
|
||||
});
|
||||
$(document).mouseup(function (e) {
|
||||
$('#sqlqueryresults').removeClass("turnOffSelect");
|
||||
$(g.o).removeClass("turnOffSelect");
|
||||
g.dragEnd(e);
|
||||
});
|
||||
}
|
||||
|
||||
@ -993,8 +993,8 @@ var ResizeHandler = function () {
|
||||
event.preventDefault();
|
||||
var pos = event.data.resize_handler.getPos(event);
|
||||
event.data.resize_handler.setWidth(pos);
|
||||
if($('#sticky_columns').length !== 0) {
|
||||
handleStickyColumns();
|
||||
if ($('.sticky_columns').length !== 0) {
|
||||
handleAllStickyColumns();
|
||||
}
|
||||
};
|
||||
/**
|
||||
|
||||
@ -653,8 +653,8 @@ AJAX.registerOnload('normalization.js', function() {
|
||||
var title = PMA_messages.strAddPrimaryKey;
|
||||
indexEditorDialog(url, title, function(){
|
||||
//on success
|
||||
$("#sqlqueryresults").remove();
|
||||
$('#result_query').remove();
|
||||
$(".sqlqueryresults").remove();
|
||||
$('.result_query').remove();
|
||||
$('.tblFooters').html('');
|
||||
goToStep2('goToStep3');
|
||||
});
|
||||
|
||||
161
js/sql.js
161
js/sql.js
@ -40,23 +40,24 @@ function PMA_urlencode(str)
|
||||
* Get the field name for the current field. Required to construct the query
|
||||
* for grid editing
|
||||
*
|
||||
* @param $this_field jQuery object that points to the current field's tr
|
||||
* @param $table_results enclosing results table
|
||||
* @param $this_field jQuery object that points to the current field's tr
|
||||
*/
|
||||
function getFieldName($this_field)
|
||||
function getFieldName($table_results, $this_field)
|
||||
{
|
||||
|
||||
var this_field_index = $this_field.index();
|
||||
// ltr or rtl direction does not impact how the DOM was generated
|
||||
// check if the action column in the left exist
|
||||
var left_action_exist = !$('#table_results').find('th:first').hasClass('draggable');
|
||||
var left_action_exist = !$table_results.find('th:first').hasClass('draggable');
|
||||
// number of column span for checkbox and Actions
|
||||
var left_action_skip = left_action_exist ? $('#table_results').find('th:first').attr('colspan') - 1 : 0;
|
||||
var left_action_skip = left_action_exist ? $table_results.find('th:first').attr('colspan') - 1 : 0;
|
||||
|
||||
// If this column was sorted, the text of the a element contains something
|
||||
// like <small>1</small> that is useful to indicate the order in case
|
||||
// of a sort on multiple columns; however, we dont want this as part
|
||||
// of the column name so we strip it ( .clone() to .end() )
|
||||
var field_name = $('#table_results')
|
||||
var field_name = $table_results
|
||||
.find('thead')
|
||||
.find('th:eq(' + (this_field_index - left_action_skip) + ') a')
|
||||
.clone() // clone the element
|
||||
@ -66,7 +67,7 @@ function getFieldName($this_field)
|
||||
.text(); // grab the text
|
||||
// happens when just one row (headings contain no a)
|
||||
if (field_name === '') {
|
||||
var $heading = $('#table_results').find('thead').find('th:eq(' + (this_field_index - left_action_skip) + ')').children('span');
|
||||
var $heading = $table_results.find('thead').find('th:eq(' + (this_field_index - left_action_skip) + ')').children('span');
|
||||
// may contain column comment enclosed in a span - detach it temporarily to read the column name
|
||||
var $tempColComment = $heading.children().detach();
|
||||
field_name = $heading.text();
|
||||
@ -84,18 +85,16 @@ function getFieldName($this_field)
|
||||
*/
|
||||
AJAX.registerTeardown('sql.js', function () {
|
||||
$('a.delete_row.ajax').die('click');
|
||||
$('#bookmarkQueryForm').die('submit');
|
||||
$('.bookmarkQueryForm').die('submit');
|
||||
$('input#bkm_label').unbind('keyup');
|
||||
$("#sqlqueryresults").die('makegrid');
|
||||
$("#sqlqueryresults").die('stickycolumns');
|
||||
$(".sqlqueryresults").die('makegrid');
|
||||
$(".sqlqueryresults").die('stickycolumns');
|
||||
$("#togglequerybox").unbind('click');
|
||||
$("#button_submit_query").die('click');
|
||||
$("input[name=bookmark_variable]").unbind("keypress");
|
||||
$("#sqlqueryform.ajax").die('submit');
|
||||
$("input[name=navig].ajax").die('click');
|
||||
$("#pageselector").die('change');
|
||||
$("#table_results.ajax").find("a[title=Sort]").die('click');
|
||||
$("#displayOptionsForm.ajax").die('submit');
|
||||
$("form[name='displayOptionsForm'].ajax").die('submit');
|
||||
$('th.column_heading.pointer').die('hover');
|
||||
$('th.column_heading.marker').die('click');
|
||||
$(window).unbind('scroll');
|
||||
@ -143,7 +142,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
});
|
||||
|
||||
// Ajaxification for 'Bookmark this SQL query'
|
||||
$('#bookmarkQueryForm').live('submit', function (e) {
|
||||
$('.bookmarkQueryForm').live('submit', function (e) {
|
||||
e.preventDefault();
|
||||
PMA_ajaxShowMessage();
|
||||
$.post($(this).attr('action'), 'ajax_request=1&' + $(this).serialize(), function (data) {
|
||||
@ -167,8 +166,10 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#sqlqueryresults").live('makegrid', function () {
|
||||
PMA_makegrid($('#table_results')[0]);
|
||||
$(".sqlqueryresults").live('makegrid', function () {
|
||||
$('.table_results').each(function () {
|
||||
PMA_makegrid(this);
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
@ -176,16 +177,17 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#sqlqueryresults").live('stickycolumns', function () {
|
||||
if ($("#table_results").length === 0) {
|
||||
return;
|
||||
}
|
||||
//add sticky columns div
|
||||
initStickyColumns();
|
||||
rearrangeStickyColumns();
|
||||
//adjust sticky columns on scroll
|
||||
$(window).bind('scroll', function() {
|
||||
handleStickyColumns();
|
||||
$(".sqlqueryresults").live('stickycolumns', function () {
|
||||
$(".sticky_columns").remove();
|
||||
$(".table_results").each(function () {
|
||||
var $table_results = $(this);
|
||||
//add sticky columns div
|
||||
var $stick_columns = initStickyColumns($table_results);
|
||||
rearrangeStickyColumns($stick_columns, $table_results);
|
||||
//adjust sticky columns on scroll
|
||||
$(window).bind('scroll', function() {
|
||||
handleStickyColumns($stick_columns, $table_results);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -287,7 +289,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
$('div.error').remove();
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
var $sqlqueryresults = $('#sqlqueryresults');
|
||||
var $sqlqueryresultsouter = $('#sqlqueryresultsouter');
|
||||
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
|
||||
@ -314,10 +316,10 @@ AJAX.registerOnload('sql.js', function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
$sqlqueryresults
|
||||
$sqlqueryresultsouter
|
||||
.show()
|
||||
.html(data.message);
|
||||
PMA_highlightSQL($('#result_query'));
|
||||
PMA_highlightSQL($sqlqueryresultsouter);
|
||||
|
||||
if (typeof data.ajax_reload != 'undefined') {
|
||||
if (data.ajax_reload.reload) {
|
||||
@ -342,19 +344,14 @@ AJAX.registerOnload('sql.js', function () {
|
||||
url = 'server_sql.php';
|
||||
}
|
||||
PMA_commonActions.refreshMain(url, function () {
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
}
|
||||
$('#sqlqueryresultsouter')
|
||||
.show()
|
||||
.html(data.message);
|
||||
PMA_highlightSQL($('#sqlqueryresultsouter'));
|
||||
});
|
||||
}
|
||||
|
||||
$sqlqueryresults.show().trigger('makegrid').trigger('stickycolumns');
|
||||
$('.sqlqueryresults').trigger('makegrid').trigger('stickycolumns');
|
||||
$('#togglequerybox').show();
|
||||
PMA_init_slider();
|
||||
|
||||
@ -367,44 +364,41 @@ AJAX.registerOnload('sql.js', function () {
|
||||
}
|
||||
} else if (typeof data !== 'undefined' && data.success === false) {
|
||||
// show an error message that stays on screen
|
||||
$('#sqlqueryform').before(data.error);
|
||||
$sqlqueryresults.hide();
|
||||
$sqlqueryresultsouter
|
||||
.show()
|
||||
.html(data.error);
|
||||
}
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}); // end $.post()
|
||||
}); // end SQL Query submit
|
||||
|
||||
/**
|
||||
* Paginate results with Page Selector dropdown
|
||||
* @memberOf jQuery
|
||||
* @name paginate_dropdown_change
|
||||
*/
|
||||
$("#pageselector").live('change', function (event) {
|
||||
var $form = $(this).parent("form");
|
||||
$form.submit();
|
||||
}); // end Paginate results with Page Selector
|
||||
|
||||
/**
|
||||
* Ajax Event handler for the display options
|
||||
* @memberOf jQuery
|
||||
* @name displayOptionsForm_submit
|
||||
*/
|
||||
$("#displayOptionsForm.ajax").live('submit', function (event) {
|
||||
$("form[name='displayOptionsForm'].ajax").live('submit', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
$form = $(this);
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
$.post($form.attr('action'), $form.serialize() + '&ajax_request=true', function (data) {
|
||||
$("#sqlqueryresults")
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
var $sqlqueryresults = $form.parents(".sqlqueryresults")
|
||||
$sqlqueryresults
|
||||
.html(data.message)
|
||||
.trigger('makegrid');
|
||||
.trigger('makegrid')
|
||||
.trigger('stickycolumns');
|
||||
PMA_init_slider();
|
||||
PMA_highlightSQL($sqlqueryresults);
|
||||
}); // end $.post()
|
||||
}); //end displayOptionsForm handler
|
||||
|
||||
// Filter row handling. --STARTS--
|
||||
$(".filter_rows").live("keyup", function () {
|
||||
var $target_table = $("#table_results");
|
||||
var unique_id = $(this).data("for");
|
||||
var $target_table = $(".table_results[data-uniqueId='" + unique_id + "']");
|
||||
var $header_cells = $target_table.find("th[data-column]");
|
||||
var target_columns = Array();
|
||||
// To handle colspan=4, in case of edit,copy etc options.
|
||||
@ -418,7 +412,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
|
||||
var phrase = $(this).val();
|
||||
// Set same value to both Filter rows fields.
|
||||
$(".filter_rows").val(phrase);
|
||||
$(".filter_rows[data-for='" + unique_id + "']").val(phrase);
|
||||
// Handle colspan.
|
||||
$target_table.find("thead > tr").prepend(dummy_th);
|
||||
$.uiTableFilter($target_table, phrase, target_columns);
|
||||
@ -557,7 +551,7 @@ function PMA_changeClassForColumn($this_th, newclass, isAddClass)
|
||||
if (has_big_t) {
|
||||
th_index--;
|
||||
}
|
||||
var $tds = $("#table_results").find('tbody tr').find('td.data:eq(' + th_index + ')');
|
||||
var $tds = $this_th.parents(".table_results").find('tbody tr').find('td.data:eq(' + th_index + ')');
|
||||
if (isAddClass === undefined) {
|
||||
$tds.toggleClass(newclass);
|
||||
} else {
|
||||
@ -661,7 +655,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
/**
|
||||
* create resizable table
|
||||
*/
|
||||
$("#sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
$(".sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
});
|
||||
|
||||
/*
|
||||
@ -725,39 +719,35 @@ function initProfilingTables()
|
||||
/*
|
||||
* Set position, left, top, width of sticky_columns div
|
||||
*/
|
||||
function setStickyColumnsPosition(position, top, left) {
|
||||
if ($("#sticky_columns").length !== 0) {
|
||||
$("#sticky_columns")
|
||||
.css("position", position)
|
||||
.css("top", top)
|
||||
.css("left", left ? left : "auto")
|
||||
.css("width", $("#table_results").width());
|
||||
}
|
||||
function setStickyColumnsPosition($sticky_columns, $table_results, position, top, left) {
|
||||
$sticky_columns
|
||||
.css("position", position)
|
||||
.css("top", top)
|
||||
.css("left", left ? left : "auto")
|
||||
.css("width", $table_results.width());
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize sticky columns
|
||||
*/
|
||||
function initStickyColumns() {
|
||||
function initStickyColumns($table_results) {
|
||||
fixedTop = $('#floating_menubar').height();
|
||||
if ($("#sticky_columns").length === 0) {
|
||||
$('<table id="sticky_columns"></table>')
|
||||
.insertBefore('#page_content')
|
||||
var $sticky_columns = $('<table class="sticky_columns"></table>')
|
||||
.insertBefore($table_results)
|
||||
.css("position", "fixed")
|
||||
.css("z-index", "99")
|
||||
.css("width", $("#table_results").width())
|
||||
.css("width", $table_results.width())
|
||||
.css("margin-left", $('#page_content').css("margin-left"))
|
||||
.css("top", fixedTop)
|
||||
.css("display", "none");
|
||||
}
|
||||
return $sticky_columns;
|
||||
}
|
||||
|
||||
/*
|
||||
* Arrange/Rearrange columns in sticky header
|
||||
*/
|
||||
function rearrangeStickyColumns() {
|
||||
var $sticky_columns = $("#sticky_columns");
|
||||
var $originalHeader = $("#table_results > thead");
|
||||
function rearrangeStickyColumns($sticky_columns, $table_results) {
|
||||
var $originalHeader = $table_results.find("thead");
|
||||
var $originalColumns = $originalHeader.find("tr:first").children();
|
||||
var $clonedHeader = $originalHeader.clone();
|
||||
// clone width per cell
|
||||
@ -767,26 +757,31 @@ function rearrangeStickyColumns() {
|
||||
$sticky_columns.empty().append($clonedHeader);
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust sticky columns on horizontal/vertical scroll for all tables
|
||||
*/
|
||||
function handleAllStickyColumns() {
|
||||
$('.sticky_columns').each(function () {
|
||||
handleStickyColumns($(this), $(this).next('.table_results'));
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust sticky columns on horizontal/vertical scroll
|
||||
*/
|
||||
function handleStickyColumns() {
|
||||
if ($("#table_results").length === 0) {
|
||||
return;
|
||||
}
|
||||
function handleStickyColumns($sticky_columns, $table_results) {
|
||||
var currentScrollX = $(window).scrollLeft();
|
||||
var windowOffset = $(window).scrollTop();
|
||||
var tableStartOffset = $("#table_results").offset().top;
|
||||
var tableEndOffset = tableStartOffset + $("#table_results").height();
|
||||
var $sticky_columns = $("#sticky_columns");
|
||||
var tableStartOffset = $table_results.offset().top;
|
||||
var tableEndOffset = tableStartOffset + $table_results.height();
|
||||
if (windowOffset >= tableStartOffset && windowOffset <= tableEndOffset) {
|
||||
//for horizontal scrolling
|
||||
if(prevScrollX != currentScrollX) {
|
||||
prevScrollX = currentScrollX;
|
||||
setStickyColumnsPosition("absolute", fixedTop + windowOffset);
|
||||
setStickyColumnsPosition($sticky_columns, $table_results, "absolute", fixedTop + windowOffset);
|
||||
//for vertical scrolling
|
||||
} else {
|
||||
setStickyColumnsPosition("fixed", fixedTop, $("#pma_navigation").width() - currentScrollX);
|
||||
setStickyColumnsPosition($sticky_columns, $table_results, "fixed", fixedTop, $("#pma_navigation").width() - currentScrollX);
|
||||
}
|
||||
$sticky_columns.show();
|
||||
} else {
|
||||
|
||||
@ -38,9 +38,9 @@ AJAX.registerOnload('tbl_find_replace.js', function () {
|
||||
if (data.success === true) {
|
||||
$('#toggle_find_div').show();
|
||||
$('#toggle_find').click();
|
||||
$("#sqlqueryresults").html(data.preview);
|
||||
$("#sqlqueryresultsouter").html(data.preview);
|
||||
} else {
|
||||
$("#sqlqueryresults").html(data.error);
|
||||
$("#sqlqueryresultsouter").html(data.error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -97,7 +97,7 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
event.preventDefault();
|
||||
|
||||
// empty previous search results while we are waiting for new results
|
||||
$("#sqlqueryresults").empty();
|
||||
$("#sqlqueryresultsouter").empty();
|
||||
var $msgbox = PMA_ajaxShowMessage(PMA_messages.strSearching, false);
|
||||
|
||||
PMA_prepareForAjaxRequest($search_form);
|
||||
@ -142,10 +142,10 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
if (typeof data.sql_query !== 'undefined') { // zero rows
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("#sqlqueryresultsouter").html(data.sql_query);
|
||||
} else { // results found
|
||||
$("#sqlqueryresults").html(data.message);
|
||||
$("#sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
$("#sqlqueryresultsouter").html(data.message);
|
||||
$(".sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
}
|
||||
$('#tbl_search_form')
|
||||
// workaround for bug #3168569 - Issue on toggling the "Hide search criteria" in chrome.
|
||||
@ -160,9 +160,9 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
// needed for the display options slider in the results
|
||||
PMA_init_slider();
|
||||
} else {
|
||||
$("#sqlqueryresults").html(data.error);
|
||||
$("#sqlqueryresultsouter").html(data.error);
|
||||
}
|
||||
PMA_highlightSQL($('#sqlqueryresults'));
|
||||
PMA_highlightSQL($('#sqlqueryresultsouter'));
|
||||
}); // end $.post()
|
||||
});
|
||||
|
||||
|
||||
@ -110,8 +110,8 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
//User wants to submit the form
|
||||
$msg = PMA_ajaxShowMessage();
|
||||
$.post($form.attr('action'), $form.serialize() + '&do_save_data=1', function (data) {
|
||||
if ($("#sqlqueryresults").length !== 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
if ($(".sqlqueryresults").length !== 0) {
|
||||
$(".sqlqueryresults").remove();
|
||||
} else if ($(".error:not(.tab)").length !== 0) {
|
||||
$(".error:not(.tab)").remove();
|
||||
}
|
||||
@ -122,7 +122,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
.append(data.sql_query)
|
||||
.show();
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
$("#result_query .notice").remove();
|
||||
$(".result_query .notice").remove();
|
||||
reloadFieldForm();
|
||||
$form.remove();
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
@ -166,11 +166,11 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true, 'ajax_page_request' : true}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
$('<div class="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
@ -224,11 +224,11 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
$(this).remove();
|
||||
if (typeof data.reload != 'undefined') {
|
||||
PMA_commonActions.refreshMain(false, function () {
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
$('<div class="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
@ -270,11 +270,11 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
$('<div class="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
@ -314,8 +314,8 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
if ($('.result_query').length) {
|
||||
$('.result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
|
||||
@ -400,8 +400,8 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
'inline_edit' : false
|
||||
}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
$('#sqlqueryresults').html(data.sql_query);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
$('#sqlqueryresultsouter').html(data.sql_query);
|
||||
PMA_highlightSQL($('#sqlqueryresultsouter'));
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
}
|
||||
|
||||
@ -158,7 +158,10 @@ class PMA_DisplayResults
|
||||
'mime_map' => null,
|
||||
|
||||
/** boolean */
|
||||
'editable' => null
|
||||
'editable' => null,
|
||||
|
||||
/** random unique ID to distinguish result set */
|
||||
'unique_id' => null
|
||||
);
|
||||
|
||||
/**
|
||||
@ -219,6 +222,7 @@ class PMA_DisplayResults
|
||||
$this->__set('table', $table);
|
||||
$this->__set('goto', $goto);
|
||||
$this->__set('sql_query', $sql_query);
|
||||
$this->__set('unique_id', rand());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -796,8 +800,9 @@ class PMA_DisplayResults
|
||||
. '<td class="navigation_separator"></td>'
|
||||
. '<td>'
|
||||
. '<span>' . __('Filter rows') . ':</span>'
|
||||
. '<input type="text" class="filter_rows" placeholder="'
|
||||
. __('Search this table') . '">'
|
||||
. '<input type="text" class="filter_rows"'
|
||||
. ' placeholder="' . __('Search this table') . '"'
|
||||
. ' data-for="' . $this->__get('unique_id') . '" />'
|
||||
. '</td>'
|
||||
. '<td class="navigation_separator"></td>'
|
||||
. '</tr>'
|
||||
@ -861,9 +866,11 @@ class PMA_DisplayResults
|
||||
. (! $showing_all ? 'all' : $GLOBALS['cfg']['MaxRows']) . '" />'
|
||||
. '<input type="hidden" name="goto" value="' . $this->__get('goto')
|
||||
. '" />'
|
||||
. '<input type="checkbox" name="navig" id="navig" class="showAllRows"'
|
||||
. '<input type="checkbox" name="navig"'
|
||||
. ' id="showAll_' . $this->__get('unique_id') . '" class="showAllRows"'
|
||||
. (! $showing_all ? '' : ' checked="checked"') . ' value="all" />'
|
||||
. '<label for="navig">' . __('Show all') . '</label>'
|
||||
. '<label for="showAll_' . $this->__get('unique_id') . '">'
|
||||
. __('Show all') . '</label>'
|
||||
. '</form>'
|
||||
. '</td>';
|
||||
} // end of the '_getShowAllButtonForTableNavigation()' function
|
||||
@ -1056,7 +1063,7 @@ class PMA_DisplayResults
|
||||
}
|
||||
|
||||
// Output data needed for grid editing
|
||||
$table_headers_html .= '<input id="save_cells_at_once" type="hidden" value="'
|
||||
$table_headers_html .= '<input class="save_cells_at_once" type="hidden" value="'
|
||||
. $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />'
|
||||
. '<div class="common_hidden_inputs">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
@ -1569,20 +1576,20 @@ class PMA_DisplayResults
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
|
||||
if ($col_order) {
|
||||
$data_html .= '<input id="col_order" type="hidden" value="'
|
||||
$data_html .= '<input class="col_order" type="hidden" value="'
|
||||
. implode(',', $col_order) . '" />';
|
||||
}
|
||||
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
|
||||
if ($col_visib) {
|
||||
$data_html .= '<input id="col_visib" type="hidden" value="'
|
||||
$data_html .= '<input class="col_visib" type="hidden" value="'
|
||||
. implode(',', $col_visib) . '" />';
|
||||
}
|
||||
|
||||
// generate table create time
|
||||
if (! PMA_Table::isView($this->__get('db'), $this->__get('table'))) {
|
||||
$data_html .= '<input id="table_create_time" type="hidden" value="'
|
||||
$data_html .= '<input class="table_create_time" type="hidden" value="'
|
||||
. PMA_Table::sGetStatusInfo(
|
||||
$this->__get('db'), $this->__get('table'), 'Create_time'
|
||||
) . '" />';
|
||||
@ -1608,8 +1615,7 @@ class PMA_DisplayResults
|
||||
$options_html = '';
|
||||
|
||||
$options_html .= '<form method="post" action="sql.php" '
|
||||
. 'name="displayOptionsForm" '
|
||||
. 'id="displayOptionsForm"';
|
||||
. 'name="displayOptionsForm"';
|
||||
|
||||
$options_html .= ' class="ajax" ';
|
||||
|
||||
@ -1625,7 +1631,7 @@ class PMA_DisplayResults
|
||||
$options_html .= PMA_URL_getHiddenInputs($url_params)
|
||||
. '<br />'
|
||||
. PMA_Util::getDivForSliderEffect(
|
||||
'displayoptions', __('Options')
|
||||
'', __('Options')
|
||||
)
|
||||
. '<fieldset>';
|
||||
|
||||
@ -1638,7 +1644,8 @@ class PMA_DisplayResults
|
||||
// pftext means "partial or full texts" (done to reduce line lengths)
|
||||
$options_html .= PMA_Util::getRadioFields(
|
||||
'pftext', $choices,
|
||||
$_SESSION['tmpval']['pftext']
|
||||
$_SESSION['tmpval']['pftext'],
|
||||
true, true, '', 'pftext_' . $this->__get('unique_id')
|
||||
)
|
||||
. '</div>';
|
||||
|
||||
@ -1653,7 +1660,8 @@ class PMA_DisplayResults
|
||||
|
||||
$options_html .= PMA_Util::getRadioFields(
|
||||
'relational_display', $choices,
|
||||
$_SESSION['tmpval']['relational_display']
|
||||
$_SESSION['tmpval']['relational_display'],
|
||||
true, true, '', 'relational_display_' . $this->__get('unique_id')
|
||||
)
|
||||
. '</div>';
|
||||
}
|
||||
@ -1661,12 +1669,14 @@ class PMA_DisplayResults
|
||||
$options_html .= '<div class="formelement">'
|
||||
. PMA_Util::getCheckbox(
|
||||
'display_binary', __('Show binary contents'),
|
||||
! empty($_SESSION['tmpval']['display_binary']), false
|
||||
! empty($_SESSION['tmpval']['display_binary']), false,
|
||||
'display_binary_' . $this->__get('unique_id')
|
||||
)
|
||||
. '<br />'
|
||||
. PMA_Util::getCheckbox(
|
||||
'display_blob', __('Show BLOB contents'),
|
||||
! empty($_SESSION['tmpval']['display_blob']), false
|
||||
! empty($_SESSION['tmpval']['display_blob']), false,
|
||||
'display_blob_' . $this->__get('unique_id')
|
||||
)
|
||||
. '</div>';
|
||||
|
||||
@ -1677,7 +1687,8 @@ class PMA_DisplayResults
|
||||
$options_html .= '<div class="formelement">'
|
||||
. PMA_Util::getCheckbox(
|
||||
'hide_transformation', __('Hide browser transformation'),
|
||||
! empty($_SESSION['tmpval']['hide_transformation']), false
|
||||
! empty($_SESSION['tmpval']['hide_transformation']), false,
|
||||
'hide_transformation_' . $this->__get('unique_id')
|
||||
)
|
||||
. '</div>';
|
||||
|
||||
@ -1691,7 +1702,8 @@ class PMA_DisplayResults
|
||||
|
||||
$options_html .= PMA_Util::getRadioFields(
|
||||
'geoOption', $choices,
|
||||
$_SESSION['tmpval']['geoOption']
|
||||
$_SESSION['tmpval']['geoOption'],
|
||||
true, true, '', 'geoOption_' . $this->__get('unique_id')
|
||||
)
|
||||
. '</div>';
|
||||
}
|
||||
@ -1771,7 +1783,8 @@ class PMA_DisplayResults
|
||||
if (($del_lnk == self::DELETE_ROW) || ($del_lnk == self::KILL_PROCESS)) {
|
||||
|
||||
$form_html .= '<form method="post" action="tbl_row_action.php" '
|
||||
. 'name="resultsForm" id="resultsForm"';
|
||||
. 'name="resultsForm"'
|
||||
. ' id="resultsForm_' . $this->__get('unique_id'). '"';
|
||||
|
||||
$form_html .= ' class="ajax" ';
|
||||
|
||||
@ -1782,9 +1795,9 @@ class PMA_DisplayResults
|
||||
. '<input type="hidden" name="goto" value="sql.php" />';
|
||||
}
|
||||
|
||||
$form_html .= '<table id="table_results" class="data';
|
||||
$form_html .= ' ajax';
|
||||
$form_html .= '">';
|
||||
$form_html .= '<table class="table_results data ajax"';
|
||||
$form_html .= ' data-uniqueId="' . $this->__get('unique_id') . '"';
|
||||
$form_html .= '>';
|
||||
|
||||
return $form_html;
|
||||
|
||||
@ -5081,9 +5094,11 @@ class PMA_DisplayResults
|
||||
. ' alt="' . __('With selected:') . '" />';
|
||||
}
|
||||
|
||||
$links_html .= '<input type="checkbox" id="resultsForm_checkall" '
|
||||
$links_html .= '<input type="checkbox" '
|
||||
. 'id="resultsForm_' . $this->__get('unique_id') . '_checkall" '
|
||||
. 'class="checkall_box" title="' . __('Check All') . '" /> '
|
||||
. '<label for="resultsForm_checkall">' . __('Check All') . '</label> '
|
||||
. '<label for="resultsForm_' . $this->__get('unique_id') . '_checkall">'
|
||||
. __('Check All') . '</label> '
|
||||
. '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
|
||||
|
||||
$links_html .= PMA_Util::getButtonOrImage(
|
||||
|
||||
@ -1237,7 +1237,7 @@ class PMA_TableSearch
|
||||
. ($this->_searchType == 'zoom' ? '" id="inputFormSubmitId"' : '" ')
|
||||
. 'value="' . __('Go') . '" />';
|
||||
$html_output .= '</fieldset></form>';
|
||||
$html_output .= '<div id="sqlqueryresults"></div>';
|
||||
$html_output .= '<div id="sqlqueryresultsouter"></div>';
|
||||
return $html_output;
|
||||
}
|
||||
|
||||
@ -1369,7 +1369,8 @@ class PMA_TableSearch
|
||||
'useRegex',
|
||||
__('Use regular expression'),
|
||||
false,
|
||||
false
|
||||
false,
|
||||
'useRegex'
|
||||
);
|
||||
return $htmlOutput;
|
||||
}
|
||||
|
||||
@ -1019,7 +1019,7 @@ class PMA_Util
|
||||
|
||||
// In an Ajax request, $GLOBALS['cell_align_left'] may not be defined. Hence,
|
||||
// check for it's presence before using it
|
||||
$retval .= '<div id="result_query"'
|
||||
$retval .= '<div class="result_query"'
|
||||
. ( isset($GLOBALS['cell_align_left'])
|
||||
? ' style="text-align: ' . $GLOBALS['cell_align_left'] . '"'
|
||||
: '' )
|
||||
@ -2605,15 +2605,19 @@ class PMA_Util
|
||||
* @param string $label label for checkbox
|
||||
* @param boolean $checked is it initially checked?
|
||||
* @param boolean $onclick should it submit the form on click?
|
||||
* @param string $html_field_id id for the checkbox
|
||||
*
|
||||
* @return string HTML for the checkbox
|
||||
*/
|
||||
public static function getCheckbox($html_field_name, $label, $checked, $onclick)
|
||||
{
|
||||
return '<input type="checkbox" name="' . $html_field_name . '" id="'
|
||||
. $html_field_name . '"' . ($checked ? ' checked="checked"' : '')
|
||||
. ($onclick ? ' class="autosubmit"' : '') . ' /><label for="'
|
||||
. $html_field_name . '">' . $label . '</label>';
|
||||
public static function getCheckbox(
|
||||
$html_field_name, $label, $checked, $onclick, $html_field_id = ''
|
||||
) {
|
||||
return '<input type="checkbox" name="' . $html_field_name . '"'
|
||||
. ($html_field_id ? ' id="' . $html_field_id . '"' : '')
|
||||
. ($checked ? ' checked="checked"' : '')
|
||||
. ($onclick ? ' class="autosubmit"' : '') . ' />'
|
||||
. '<label' . ($html_field_id ? ' for="' . $html_field_id . '"' : '')
|
||||
. '>' . $label . '</label>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2625,12 +2629,15 @@ class PMA_Util
|
||||
* @param boolean $line_break whether to add HTML line break after a choice
|
||||
* @param boolean $escape_label whether to use htmlspecialchars() on label
|
||||
* @param string $class enclose each choice with a div of this class
|
||||
* @param string $id_prefix prefix for the id attribute, name will be
|
||||
* used if this is not supplied
|
||||
*
|
||||
* @return string set of html radio fiels
|
||||
*/
|
||||
public static function getRadioFields(
|
||||
$html_field_name, $choices, $checked_choice = '',
|
||||
$line_break = true, $escape_label = true, $class = ''
|
||||
$line_break = true, $escape_label = true, $class = '',
|
||||
$id_prefix = ''
|
||||
) {
|
||||
$radio_html = '';
|
||||
|
||||
@ -2640,7 +2647,10 @@ class PMA_Util
|
||||
$radio_html .= '<div class="' . $class . '">';
|
||||
}
|
||||
|
||||
$html_field_id = $html_field_name . '_' . $choice_value;
|
||||
if (! $id_prefix) {
|
||||
$id_prefix = $html_field_name;
|
||||
}
|
||||
$html_field_id = $id_prefix . '_' . $choice_value;
|
||||
$radio_html .= '<input type="radio" name="' . $html_field_name . '" id="'
|
||||
. $html_field_id . '" value="'
|
||||
. htmlspecialchars($choice_value) . '"';
|
||||
@ -2718,10 +2728,10 @@ class PMA_Util
|
||||
* @return string html div element
|
||||
*
|
||||
*/
|
||||
public static function getDivForSliderEffect($id, $message)
|
||||
public static function getDivForSliderEffect($id = '', $message = '')
|
||||
{
|
||||
if ($GLOBALS['cfg']['InitialSlidersState'] == 'disabled') {
|
||||
return '<div id="' . $id . '">';
|
||||
return '<div' . ($id ? ' id="' . $id . '"' : '') . '>';
|
||||
}
|
||||
/**
|
||||
* Bad hack on the next line. document.write() conflicts with jQuery,
|
||||
@ -2732,11 +2742,14 @@ class PMA_Util
|
||||
* append to
|
||||
*/
|
||||
|
||||
return '<div id="' . $id . '"'
|
||||
return '<div'
|
||||
. ($id ? ' id="' . $id . '"' : '')
|
||||
. (($GLOBALS['cfg']['InitialSlidersState'] == 'closed')
|
||||
? ' style="display: none; overflow:auto;"'
|
||||
: '')
|
||||
. ' class="pma_auto_slider" title="' . htmlspecialchars($message) . '">';
|
||||
. ' class="pma_auto_slider"'
|
||||
. ($message ? ' title="' . htmlspecialchars($message) . '"' : '')
|
||||
. '>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1757,13 +1757,13 @@ function PMA_getHtmlForAddUser($dbname)
|
||||
$html_output .= PMA_Util::getCheckbox(
|
||||
'createdb-1',
|
||||
__('Create database with same name and grant all privileges.'),
|
||||
false, false
|
||||
false, false, 'createdb-1'
|
||||
);
|
||||
$html_output .= '<br />' . "\n";
|
||||
$html_output .= PMA_Util::getCheckbox(
|
||||
'createdb-2',
|
||||
__('Grant all privileges on wildcard name (username\\_%).'),
|
||||
false, false
|
||||
false, false, 'createdb-2'
|
||||
);
|
||||
$html_output .= '<br />' . "\n";
|
||||
|
||||
@ -1775,7 +1775,8 @@ function PMA_getHtmlForAddUser($dbname)
|
||||
htmlspecialchars($dbname)
|
||||
),
|
||||
true,
|
||||
false
|
||||
false,
|
||||
'createdb-3'
|
||||
);
|
||||
$html_output .= '<input type="hidden" name="dbname" value="'
|
||||
. htmlspecialchars($dbname) . '" />' . "\n";
|
||||
|
||||
@ -616,7 +616,7 @@ function PMA_getHtmlForBookmark($disp_mode, $cfgBookmark, $sql_query, $db, $tabl
|
||||
$html = '<form action="sql.php" method="post"'
|
||||
. ' onsubmit="return ! emptyCheckTheField(this,'
|
||||
. '\'bkm_fields[bkm_label]\');"'
|
||||
. ' id="bookmarkQueryForm">';
|
||||
. ' class="bookmarkQueryForm">';
|
||||
$html .= PMA_URL_getHiddenInputs();
|
||||
$html .= '<input type="hidden" name="db"'
|
||||
. ' value="' . htmlspecialchars($db) . '" />';
|
||||
@ -636,16 +636,12 @@ function PMA_getHtmlForBookmark($disp_mode, $cfgBookmark, $sql_query, $db, $tabl
|
||||
);
|
||||
$html .= '</legend>';
|
||||
$html .= '<div class="formelement">';
|
||||
$html .= '<label for="fields_label_">' . __('Label:') . '</label>';
|
||||
$html .= '<input type="text" id="fields_label_"'
|
||||
. ' name="bkm_fields[bkm_label]" value="" />';
|
||||
$html .= '<label>' . __('Label:') . '</label>';
|
||||
$html .= '<input type="text" name="bkm_fields[bkm_label]" value="" />';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="formelement">';
|
||||
$html .= '<input type="checkbox" name="bkm_all_users"'
|
||||
. ' id="bkm_all_users" value="true" />';
|
||||
$html .= '<label for="bkm_all_users">'
|
||||
. __('Let every user access this bookmark')
|
||||
. '</label>';
|
||||
$html .= '<input type="checkbox" name="bkm_all_users" value="true" />';
|
||||
$html .= '<label>' . __('Let every user access this bookmark') . '</label>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="clearfloat"></div>';
|
||||
$html .= '</fieldset>';
|
||||
@ -1643,7 +1639,7 @@ function PMA_getHtmlForSqlQueryResults($previous_update_query_html,
|
||||
$table_html, $indexes_problems_html, $bookmark_support_html, $print_button_html
|
||||
) {
|
||||
//begin the sqlqueryresults div here. container div
|
||||
$html_output = '<div id="sqlqueryresults" class="ajax">';
|
||||
$html_output = '<div class="sqlqueryresults ajax">';
|
||||
$html_output .= isset($previous_update_query_html)
|
||||
? $previous_update_query_html : '';
|
||||
$html_output .= isset($profiling_chart_html) ? $profiling_chart_html : '';
|
||||
|
||||
@ -118,7 +118,7 @@ function PMA_getHtmlForSqlQueryForm(
|
||||
$html .= '</form>' . "\n";
|
||||
// print an empty div, which will be later filled with
|
||||
// the sql query results by ajax
|
||||
$html .= '<div id="sqlqueryresults"></div>';
|
||||
$html .= '<div id="sqlqueryresultsouter"></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ $response = PMA_Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('makegrid.js');
|
||||
$scripts->addFile('jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('sql.js');
|
||||
|
||||
require_once 'libraries/server_common.inc.php';
|
||||
|
||||
@ -18,6 +18,7 @@ $response = PMA_Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('makegrid.js');
|
||||
$scripts->addFile('jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('sql.js');
|
||||
|
||||
require 'libraries/tbl_common.inc.php';
|
||||
|
||||
@ -1608,6 +1608,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
'mysql',
|
||||
'user',
|
||||
'tbl_structure.php',
|
||||
0,
|
||||
'SELECT * FROM `user`',
|
||||
"\n"
|
||||
. '<td><form action="sql.php" method="post">'
|
||||
@ -1619,8 +1620,9 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
. '<input type="hidden" name="pos" value="0" />'
|
||||
. '<input type="hidden" name="session_max_rows" value="all" />'
|
||||
. '<input type="hidden" name="goto" value="tbl_structure.php" />'
|
||||
. '<input type="checkbox" name="navig" id="navig" class="showAllRows" value="all" />'
|
||||
. '<label for="navig">Show all</label></form></td>'
|
||||
. '<input type="checkbox" name="navig" id="showAll_0"'
|
||||
. ' class="showAllRows" value="all" />'
|
||||
. '<label for="showAll_0">Show all</label></form></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1632,6 +1634,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
* @param string $db the database name
|
||||
* @param string $table the table name
|
||||
* @param string $goto the URL to go back in case of errors
|
||||
* @param int $unique_id the unique id for the results set
|
||||
* @param string $html_sql_query the sql encoded by html special characters
|
||||
* @param string $output output of _getRowInfoForSpecialLinks
|
||||
*
|
||||
@ -1640,11 +1643,12 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
* @dataProvider dataProviderForTestGetShowAllCheckboxForTableNavigation
|
||||
*/
|
||||
public function testGetShowAllCheckboxForTableNavigation(
|
||||
$db, $table, $goto, $html_sql_query, $output
|
||||
$db, $table, $goto, $unique_id , $html_sql_query, $output
|
||||
) {
|
||||
$this->object->__set('db', $db);
|
||||
$this->object->__set('table', $table);
|
||||
$this->object->__set('goto', $goto);
|
||||
$this->object->__set('unique_id', $unique_id);
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
|
||||
@ -1200,7 +1200,7 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
|
||||
$item = PMA_Util::getCheckbox(
|
||||
'createdb-2',
|
||||
__('Grant all privileges on wildcard name (username\\_%).'),
|
||||
false, false
|
||||
false, false, 'createdb-2'
|
||||
);
|
||||
$this->assertContains(
|
||||
$item,
|
||||
|
||||
@ -31,7 +31,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
|
||||
$label = "text_label_for_checkbox";
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_Util::getCheckbox($name, $label, false, false),
|
||||
PMA_Util::getCheckbox($name, $label, false, false, $name),
|
||||
'<input type="checkbox" name="' . $name . '" id="' . $name
|
||||
. '" /><label for="' . $name . '">' . $label
|
||||
. '</label>'
|
||||
@ -49,7 +49,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
|
||||
$label = "text_label_for_checkbox";
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_Util::getCheckbox($name, $label, true, false),
|
||||
PMA_Util::getCheckbox($name, $label, true, false, $name),
|
||||
'<input type="checkbox" name="' . $name . '" id="' . $name
|
||||
. '" checked="checked" /><label for="' . $name . '">' . $label
|
||||
. '</label>'
|
||||
@ -67,7 +67,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
|
||||
$label = "text_label_for_checkbox";
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_Util::getCheckbox($name, $label, false, true),
|
||||
PMA_Util::getCheckbox($name, $label, false, true, $name),
|
||||
'<input type="checkbox" name="' . $name . '" id="' . $name
|
||||
. '" class="autosubmit" /><label for="' . $name . '">' . $label
|
||||
. '</label>'
|
||||
@ -85,7 +85,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
|
||||
$label = "text_label_for_checkbox";
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_Util::getCheckbox($name, $label, true, true),
|
||||
PMA_Util::getCheckbox($name, $label, true, true, $name),
|
||||
'<input type="checkbox" name="' . $name . '" id="' . $name
|
||||
. '" checked="checked" class="autosubmit" /><label for="' . $name
|
||||
. '">' . $label . '</label>'
|
||||
|
||||
@ -56,7 +56,7 @@ class PMA_ShowMessage_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['sql_query'] = "SELECT * FROM tblPatient ";
|
||||
|
||||
$this->expectOutputString(
|
||||
"<div id=\"result_query\" align=\"\">
|
||||
"<div class=\"result_query\" align=\"\">
|
||||
<div class=\"notice\">msg</div><code class=\"sql\"><span class=\"syntax\"><span class=\"inner_sql\"><a href=\"./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.0%2Fen%2Fselect.html&server=server&lang=en&token=647a62ad301bf9025e3b13bc7caa02cb\" target=\"mysql_doc\"><span class=\"syntax_alpha syntax_alpha_reservedWord\">SELECT</span></a> <span class=\"syntax_punct\">*</span> <br /><span class=\"syntax_alpha syntax_alpha_reservedWord\">FROM</span> <span class=\"syntax_alpha syntax_alpha_identifier\">tblPatient</span></span></span></code><div class=\"tools\"><form action=\"sql.php\" method=\"post\"><input type=\"hidden\" name=\"db\" value=\"db\" /><input type=\"hidden\" name=\"table\" value=\"tbl\" /><input type=\"hidden\" name=\"server\" value=\"server\" /><input type=\"hidden\" name=\"lang\" value=\"en\" /><input type=\"hidden\" name=\"token\" value=\"647a62ad301bf9025e3b13bc7caa02cb\" /><input type=\"hidden\" name=\"sql_query\" value=\"SELECT * FROM tblPatient \" /></form><script type=\"text/javascript\">
|
||||
//<![CDATA[
|
||||
$('.tools form').last().after('[<a href=\"#\" title=\"Inline edit of this query\" class=\"inline_edit_sql\">Inline</a>]');
|
||||
|
||||
@ -73,17 +73,17 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"3",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 3, 5)
|
||||
$this->getCellByTableClass('table_results', 3, 5)
|
||||
);
|
||||
|
||||
// case 2
|
||||
@ -93,17 +93,17 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"3",
|
||||
$this->getTable('table_results', 3, 5)
|
||||
$this->getCellByTableClass('table_results', 3, 5)
|
||||
);
|
||||
|
||||
// case 2
|
||||
@ -113,17 +113,17 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"3",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 3, 5)
|
||||
$this->getCellByTableClass('table_results', 3, 5)
|
||||
);
|
||||
|
||||
// case 4
|
||||
@ -133,17 +133,17 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"3",
|
||||
$this->getTable('table_results', 3, 5)
|
||||
$this->getCellByTableClass('table_results', 3, 5)
|
||||
);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
{
|
||||
$this->sleep();
|
||||
$this->byCssSelector(
|
||||
"table#table_results tbody tr:nth-child(2) td:nth-child(2) a"
|
||||
"table.table_results tbody tr:nth-child(2) td:nth-child(2) a"
|
||||
)->click();
|
||||
$this->sleep();
|
||||
/* TODO: this occasionally fails, so there is probably something wrong */
|
||||
@ -191,12 +191,12 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"foobar",
|
||||
$this->getTable('table_results', 2, 6)
|
||||
$this->getCellByTableClass('table_results', 2, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2009-01-20 02:00:02",
|
||||
$this->getTable('table_results', 2, 7)
|
||||
$this->getCellByTableClass('table_results', 2, 7)
|
||||
);
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
public function testChangeRecordsByDoubleClick()
|
||||
{
|
||||
$element = $this->byCssSelector(
|
||||
"table#table_results tbody tr:nth-child(1) td:nth-child(6)"
|
||||
"table.table_results tbody tr:nth-child(1) td:nth-child(6)"
|
||||
);
|
||||
|
||||
$this->moveto($element);
|
||||
@ -232,7 +232,7 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"abcde",
|
||||
$this->getTable('table_results', 1, 6)
|
||||
$this->getCellByTableClass('table_results', 1, 6)
|
||||
);
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
public function testCopyRecords()
|
||||
{
|
||||
$this->byCssSelector(
|
||||
"table#table_results tbody tr:nth-child(3) td:nth-child(3) a"
|
||||
"table.table_results tbody tr:nth-child(3) td:nth-child(3) a"
|
||||
)->click();
|
||||
|
||||
/* TODO: this occasionally fails, so there is probably something wrong */
|
||||
@ -273,12 +273,12 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"ABCDEFG",
|
||||
$this->getTable('table_results', 4, 6)
|
||||
$this->getCellByTableClass('table_results', 4, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2012-01-20 02:05:02",
|
||||
$this->getTable('table_results', 4, 7)
|
||||
$this->getCellByTableClass('table_results', 4, 7)
|
||||
);
|
||||
}
|
||||
|
||||
@ -306,12 +306,12 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"3",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertFalse(
|
||||
$this->isElementPresent(
|
||||
"byCssSelector", "table#table_results tbody tr:nth-child(2)"
|
||||
"byCssSelector", "table.table_results tbody tr:nth-child(2)"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -95,27 +95,27 @@ class PMA_SeleniumTableCreateTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"int(14)",
|
||||
$this->getTable('tablestructure', 1, 4)
|
||||
$this->getCellByTableId('tablestructure', 1, 4)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"UNSIGNED",
|
||||
$this->getTable('tablestructure', 1, 6)
|
||||
$this->getCellByTableId('tablestructure', 1, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"No",
|
||||
$this->getTable('tablestructure', 1, 7)
|
||||
$this->getCellByTableId('tablestructure', 1, 7)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"None",
|
||||
$this->getTable('tablestructure', 1, 8)
|
||||
$this->getCellByTableId('tablestructure', 1, 8)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"AUTO_INCREMENT",
|
||||
$this->getTable('tablestructure', 1, 9)
|
||||
$this->getCellByTableId('tablestructure', 1, 9)
|
||||
);
|
||||
|
||||
$this->assertFalse(
|
||||
@ -134,22 +134,22 @@ class PMA_SeleniumTableCreateTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"varchar(10)",
|
||||
$this->getTable('tablestructure', 2, 4)
|
||||
$this->getCellByTableId('tablestructure', 2, 4)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"utf8_general_ci",
|
||||
$this->getTable('tablestructure', 2, 5)
|
||||
$this->getCellByTableId('tablestructure', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"Yes",
|
||||
$this->getTable('tablestructure', 2, 7)
|
||||
$this->getCellByTableId('tablestructure', 2, 7)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"def",
|
||||
$this->getTable('tablestructure', 2, 8)
|
||||
$this->getCellByTableId('tablestructure', 2, 8)
|
||||
);
|
||||
|
||||
$this->assertFalse(
|
||||
|
||||
@ -107,47 +107,47 @@ class PMA_SeleniumTableInsertTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"1",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"abcd",
|
||||
$this->getTable('table_results', 1, 6)
|
||||
$this->getCellByTableClass('table_results', 1, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2011-01-20 02:00:02",
|
||||
$this->getTable('table_results', 1, 7)
|
||||
$this->getCellByTableClass('table_results', 1, 7)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 2, 5)
|
||||
$this->getCellByTableClass('table_results', 2, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"foo",
|
||||
$this->getTable('table_results', 2, 6)
|
||||
$this->getCellByTableClass('table_results', 2, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2010-01-20 02:00:02",
|
||||
$this->getTable('table_results', 2, 7)
|
||||
$this->getCellByTableClass('table_results', 2, 7)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"4",
|
||||
$this->getTable('table_results', 3, 5)
|
||||
$this->getCellByTableClass('table_results', 3, 5)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"Abcd",
|
||||
$this->getTable('table_results', 3, 6)
|
||||
$this->getCellByTableClass('table_results', 3, 6)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
"2012-01-20 02:00:02",
|
||||
$this->getTable('table_results', 3, 7)
|
||||
$this->getCellByTableClass('table_results', 3, 7)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ class PMA_SeleniumTableOperationsTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"2",
|
||||
$this->getTable('table_results', 1, 5)
|
||||
$this->getCellByTableClass('table_results', 1, 5)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ class PMA_SeleniumTableStructureTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertEquals(
|
||||
"int(11)",
|
||||
$this->getTable('tablestructure', 2, 4)
|
||||
$this->getCellByTableId('tablestructure', 2, 4)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -91,17 +91,17 @@ class PMA_SeleniumTrackingTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertContains(
|
||||
"DROP TABLE IF EXISTS `test_table`",
|
||||
$this->getTable('ddl_versions', 1, 4)
|
||||
$this->getCellByTableId('ddl_versions', 1, 4)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"CREATE TABLE `test_table` (",
|
||||
$this->getTable('ddl_versions', 2, 4)
|
||||
$this->getCellByTableId('ddl_versions', 2, 4)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"UPDATE test_table SET val = val + 1",
|
||||
$this->getTable('dml_versions', 1, 4)
|
||||
$this->getCellByTableId('dml_versions', 1, 4)
|
||||
);
|
||||
|
||||
$this->assertNotContains(
|
||||
@ -122,12 +122,12 @@ class PMA_SeleniumTrackingTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertContains(
|
||||
"DROP TABLE IF EXISTS `test_table`",
|
||||
$this->getTable('ddl_versions', 1, 4)
|
||||
$this->getCellByTableId('ddl_versions', 1, 4)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"CREATE TABLE `test_table` (",
|
||||
$this->getTable('ddl_versions', 2, 4)
|
||||
$this->getCellByTableId('ddl_versions', 2, 4)
|
||||
);
|
||||
|
||||
// only data
|
||||
@ -143,7 +143,7 @@ class PMA_SeleniumTrackingTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertContains(
|
||||
"UPDATE test_table SET val = val + 1",
|
||||
$this->getTable('dml_versions', 1, 4)
|
||||
$this->getCellByTableId('dml_versions', 1, 4)
|
||||
);
|
||||
|
||||
$this->assertNotContains(
|
||||
@ -201,12 +201,12 @@ class PMA_SeleniumTrackingTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertContains(
|
||||
"test_table",
|
||||
$this->getTable('noversions', 1, 1)
|
||||
$this->getCellByTableId('noversions', 1, 1)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"test_table_2",
|
||||
$this->getTable('noversions', 2, 1)
|
||||
$this->getCellByTableId('noversions', 2, 1)
|
||||
);
|
||||
}
|
||||
|
||||
@ -224,22 +224,22 @@ class PMA_SeleniumTrackingTest extends PMA_SeleniumBase
|
||||
|
||||
$this->assertContains(
|
||||
"id",
|
||||
$this->getTable('tablestructure', 1, 1)
|
||||
$this->getCellByTableId('tablestructure', 1, 1)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"val",
|
||||
$this->getTable('tablestructure', 2, 1)
|
||||
$this->getCellByTableId('tablestructure', 2, 1)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"PRIMARY",
|
||||
$this->getTable('tablestructure_indexes', 1, 1)
|
||||
$this->getCellByTableId('tablestructure_indexes', 1, 1)
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
"id",
|
||||
$this->getTable('tablestructure_indexes', 1, 5)
|
||||
$this->getCellByTableId('tablestructure_indexes', 1, 5)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -431,7 +431,7 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table cell data
|
||||
* Get table cell data by the ID of the table
|
||||
*
|
||||
* @param string $tableID Table identifier
|
||||
* @param int $row Table row
|
||||
@ -439,7 +439,7 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase
|
||||
*
|
||||
* @return text Data from the particular table cell
|
||||
*/
|
||||
public function getTable($tableID, $row, $column)
|
||||
public function getCellByTableId($tableID, $row, $column)
|
||||
{
|
||||
$sel = "table#{$tableID} tbody tr:nth-child({$row}) "
|
||||
. "td:nth-child({$column})";
|
||||
@ -449,6 +449,25 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase
|
||||
return $element->text();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table cell data by the class attribute of the table
|
||||
*
|
||||
* @param string $tableClass Class of the table
|
||||
* @param int $row Table row
|
||||
* @param int $column Table column
|
||||
*
|
||||
* @return text Data from the particular table cell
|
||||
*/
|
||||
public function getCellByTableClass($tableClass, $row, $column)
|
||||
{
|
||||
$sel = "table.{$tableClass} tbody tr:nth-child({$row}) "
|
||||
. "td:nth-child({$column})";
|
||||
$element = $this->byCssSelector(
|
||||
$sel
|
||||
);
|
||||
return $element->text();
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper around keys method to not use it on not supported
|
||||
* browsers.
|
||||
|
||||
@ -1391,7 +1391,7 @@ div.sqlvalidate {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#result_query div.sqlOuter,
|
||||
.result_query div.sqlOuter,
|
||||
div.sqlvalidate {
|
||||
border: <?php echo $GLOBALS['cfg']['MainColor']; ?> solid 1px;
|
||||
border-top: 0;
|
||||
@ -2649,7 +2649,7 @@ div#page_content form#db_search_form.ajax fieldset {
|
||||
margin-top: -0.3em;
|
||||
}
|
||||
|
||||
div#page_content div#tableslistcontainer, div#page_content div.notice, div#page_content div#result_query {
|
||||
div#page_content div#tableslistcontainer, div#page_content div.notice, div#page_content div.result_query {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ h2 a img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#table_results td.data {
|
||||
.table_results td.data {
|
||||
border-right: 1px solid #bbb;
|
||||
}
|
||||
|
||||
@ -1844,7 +1844,7 @@ div.sqlvalidate {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#result_query div.sqlOuter {
|
||||
.result_query div.sqlOuter {
|
||||
background: <?php echo $GLOBALS['cfg']['BgOne']; ?>;
|
||||
padding: 1em;
|
||||
}
|
||||
@ -2963,7 +2963,7 @@ div#page_content form#db_search_form.ajax fieldset {
|
||||
margin-top: -0.3em;
|
||||
}
|
||||
|
||||
div#page_content div#tableslistcontainer, div#page_content div.notice, div#page_content div#result_query {
|
||||
div#page_content div#tableslistcontainer, div#page_content div.notice, div#page_content div.result_query {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user