Initial commit
This commit is contained in:
143
pma/js/dist/server/databases.js
vendored
Normal file
143
pma/js/dist/server/databases.js
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @fileoverview functions used on the server databases list page
|
||||
* @name Server Databases
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
/* global MicroHistory */
|
||||
// js/microhistory.js
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server/databases.js', function () {
|
||||
$(document).off('submit', '#dbStatsForm');
|
||||
$(document).off('submit', '#create_database_form.ajax');
|
||||
});
|
||||
/**
|
||||
* AJAX scripts for /server/databases
|
||||
*
|
||||
* Actions ajaxified here:
|
||||
* Drop Databases
|
||||
*
|
||||
*/
|
||||
|
||||
AJAX.registerOnload('server/databases.js', function () {
|
||||
/**
|
||||
* Attach Event Handler for 'Drop Databases'
|
||||
*/
|
||||
$(document).on('submit', '#dbStatsForm', function (event) {
|
||||
event.preventDefault();
|
||||
var $form = $(this);
|
||||
/**
|
||||
* @var selected_dbs Array containing the names of the checked databases
|
||||
*/
|
||||
|
||||
var selectedDbs = []; // loop over all checked checkboxes, except the .checkall_box checkbox
|
||||
|
||||
$form.find('input:checkbox:checked:not(.checkall_box)').each(function () {
|
||||
$(this).closest('tr').addClass('removeMe');
|
||||
selectedDbs[selectedDbs.length] = 'DROP DATABASE `' + Functions.escapeHtml($(this).val()) + '`;';
|
||||
});
|
||||
|
||||
if (!selectedDbs.length) {
|
||||
Functions.ajaxShowMessage($('<div class="alert alert-primary" role="alert"></div>').text(Messages.strNoDatabasesSelected), 2000);
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
|
||||
|
||||
var question = Messages.strDropDatabaseStrongWarning + ' ' + Functions.sprintf(Messages.strDoYouReally, selectedDbs.join('<br>'));
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
$(this).confirm(question, 'index.php?route=/server/databases/destroy&' + $(this).serialize() + argsep + 'drop_selected_dbs=1', function (url) {
|
||||
Functions.ajaxShowMessage(Messages.strProcessingRequest, false);
|
||||
var parts = url.split('?');
|
||||
var params = Functions.getJsConfirmCommonParam(this, parts[1]);
|
||||
$.post(parts[0], params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
Functions.ajaxShowMessage(data.message);
|
||||
var $rowsToRemove = $form.find('tr.removeMe');
|
||||
var $databasesCount = $('#filter-rows-count');
|
||||
var newCount = parseInt($databasesCount.text(), 10) - $rowsToRemove.length;
|
||||
$databasesCount.text(newCount);
|
||||
$rowsToRemove.remove();
|
||||
$form.find('tbody').sortTable('.name');
|
||||
|
||||
if ($form.find('tbody').find('tr').length === 0) {
|
||||
// user just dropped the last db on this page
|
||||
CommonActions.refreshMain();
|
||||
}
|
||||
|
||||
Navigation.reload();
|
||||
} else {
|
||||
$form.find('tr.removeMe').removeClass('removeMe');
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.post()
|
||||
});
|
||||
}); // end of Drop Database action
|
||||
|
||||
/**
|
||||
* Attach Ajax event handlers for 'Create Database'.
|
||||
*/
|
||||
|
||||
$(document).on('submit', '#create_database_form.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $form = $(this); // TODO Remove this section when all browsers support HTML5 "required" property
|
||||
|
||||
var newDbNameInput = $form.find('input[name=new_db]');
|
||||
|
||||
if (newDbNameInput.val() === '') {
|
||||
newDbNameInput.trigger('focus');
|
||||
alert(Messages.strFormEmpty);
|
||||
return;
|
||||
} // end remove
|
||||
|
||||
|
||||
Functions.ajaxShowMessage(Messages.strProcessingRequest);
|
||||
Functions.prepareForAjaxRequest($form);
|
||||
$.post($form.attr('action'), $form.serialize(), function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
Functions.ajaxShowMessage(data.message);
|
||||
var $databasesCountObject = $('#filter-rows-count');
|
||||
var databasesCount = parseInt($databasesCountObject.text(), 10) + 1;
|
||||
$databasesCountObject.text(databasesCount);
|
||||
Navigation.reload(); // make ajax request to load db structure page - taken from ajax.js
|
||||
|
||||
var dbStructUrl = data.url;
|
||||
dbStructUrl = dbStructUrl.replace(/amp;/ig, '');
|
||||
var params = 'ajax_request=true' + CommonParams.get('arg_separator') + 'ajax_page_request=true';
|
||||
|
||||
if (!(history && history.pushState)) {
|
||||
params += MicroHistory.menus.getRequestParam();
|
||||
}
|
||||
|
||||
$.get(dbStructUrl, params, AJAX.responseHandler);
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.post()
|
||||
}); // end $(document).on()
|
||||
|
||||
/* Don't show filter if number of databases are very few */
|
||||
|
||||
var databasesCount = $('#filter-rows-count').html();
|
||||
|
||||
if (databasesCount <= 10) {
|
||||
$('#tableFilter').hide();
|
||||
}
|
||||
|
||||
var tableRows = $('.server_databases');
|
||||
$.each(tableRows, function () {
|
||||
$(this).on('click', function () {
|
||||
CommonActions.setDb($(this).attr('data'));
|
||||
});
|
||||
});
|
||||
}); // end $()
|
18
pma/js/dist/server/plugins.js
vendored
Normal file
18
pma/js/dist/server/plugins.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Functions used in server plugins pages
|
||||
*/
|
||||
AJAX.registerOnload('server/plugins.js', function () {
|
||||
// Make columns sortable, but only for tables with more than 1 data row
|
||||
var $tables = $('#plugins_plugins table:has(tbody tr + tr)');
|
||||
$tables.tablesorter({
|
||||
sortList: [[0, 0]],
|
||||
headers: {
|
||||
1: {
|
||||
sorter: false
|
||||
}
|
||||
}
|
||||
});
|
||||
$tables.find('thead th').append('<div class="sorticon"></div>');
|
||||
});
|
439
pma/js/dist/server/privileges.js
vendored
Normal file
439
pma/js/dist/server/privileges.js
vendored
Normal file
@ -0,0 +1,439 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @fileoverview functions used in server privilege pages
|
||||
* @name Server Privileges
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Validates the "add a user" form
|
||||
*
|
||||
* @return boolean whether the form is validated or not
|
||||
*/
|
||||
function checkAddUser(theForm) {
|
||||
if (theForm.elements.hostname.value === '') {
|
||||
alert(Messages.strHostEmpty);
|
||||
theForm.elements.hostname.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (theForm.elements.pred_username && theForm.elements.pred_username.value === 'userdefined' && theForm.elements.username.value === '') {
|
||||
alert(Messages.strUserEmpty);
|
||||
theForm.elements.username.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return Functions.checkPassword($(theForm));
|
||||
}
|
||||
/**
|
||||
* AJAX scripts for /server/privileges page.
|
||||
*
|
||||
* Actions ajaxified here:
|
||||
* Add user
|
||||
* Revoke a user
|
||||
* Edit privileges
|
||||
* Export privileges
|
||||
* Paginate table of users
|
||||
* Flush privileges
|
||||
*
|
||||
* @memberOf jQuery
|
||||
* @name document.ready
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
|
||||
|
||||
AJAX.registerTeardown('server/privileges.js', function () {
|
||||
$('#fieldset_add_user_login').off('change', 'input[name=\'username\']');
|
||||
$(document).off('click', '#deleteUserCard .btn.ajax');
|
||||
$(document).off('click', 'a.edit_user_group_anchor.ajax');
|
||||
$(document).off('click', 'button.mult_submit[value=export]');
|
||||
$(document).off('click', 'a.export_user_anchor.ajax');
|
||||
$(document).off('click', '#initials_table a.ajax');
|
||||
$('#dropUsersDbCheckbox').off('click');
|
||||
$(document).off('click', '.checkall_box');
|
||||
$(document).off('change', '#checkbox_SSL_priv');
|
||||
$(document).off('change', 'input[name="ssl_type"]');
|
||||
$(document).off('change', '#select_authentication_plugin');
|
||||
});
|
||||
AJAX.registerOnload('server/privileges.js', function () {
|
||||
/**
|
||||
* Display a warning if there is already a user by the name entered as the username.
|
||||
*/
|
||||
$('#fieldset_add_user_login').on('change', 'input[name=\'username\']', function () {
|
||||
var username = $(this).val();
|
||||
var $warning = $('#user_exists_warning');
|
||||
|
||||
if ($('#select_pred_username').val() === 'userdefined' && username !== '') {
|
||||
var href = $('form[name=\'usersForm\']').attr('action');
|
||||
var params = {
|
||||
'ajax_request': true,
|
||||
'server': CommonParams.get('server'),
|
||||
'validate_username': true,
|
||||
'username': username
|
||||
};
|
||||
$.get(href, params, function (data) {
|
||||
if (data.user_exists) {
|
||||
$warning.show();
|
||||
} else {
|
||||
$warning.hide();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$warning.hide();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Indicating password strength
|
||||
*/
|
||||
|
||||
$('#text_pma_pw').on('keyup', function () {
|
||||
var meterObj = $('#password_strength_meter');
|
||||
var meterObjLabel = $('#password_strength');
|
||||
var username = $('input[name="username"]');
|
||||
username = username.val();
|
||||
Functions.checkPasswordStrength($(this).val(), meterObj, meterObjLabel, username);
|
||||
});
|
||||
/**
|
||||
* Automatically switching to 'Use Text field' from 'No password' once start writing in text area
|
||||
*/
|
||||
|
||||
$('#text_pma_pw').on('input', function () {
|
||||
if ($('#text_pma_pw').val() !== '') {
|
||||
$('#select_pred_password').val('userdefined');
|
||||
}
|
||||
});
|
||||
$('#text_pma_change_pw').on('keyup', function () {
|
||||
var meterObj = $('#change_password_strength_meter');
|
||||
var meterObjLabel = $('#change_password_strength');
|
||||
Functions.checkPasswordStrength($(this).val(), meterObj, meterObjLabel, CommonParams.get('user'));
|
||||
});
|
||||
/**
|
||||
* Display a notice if sha256_password is selected
|
||||
*/
|
||||
|
||||
$(document).on('change', '#select_authentication_plugin', function () {
|
||||
var selectedPlugin = $(this).val();
|
||||
|
||||
if (selectedPlugin === 'sha256_password') {
|
||||
$('#ssl_reqd_warning').show();
|
||||
} else {
|
||||
$('#ssl_reqd_warning').hide();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* AJAX handler for 'Revoke User'
|
||||
*
|
||||
* @see Functions.ajaxShowMessage()
|
||||
* @memberOf jQuery
|
||||
* @name revoke_user_click
|
||||
*/
|
||||
|
||||
$(document).on('click', '#deleteUserCard .btn.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $thisButton = $(this);
|
||||
var $form = $('#usersForm');
|
||||
$thisButton.confirm(Messages.strDropUserWarning, $form.attr('action'), function (url) {
|
||||
var $dropUsersDbCheckbox = $('#dropUsersDbCheckbox');
|
||||
|
||||
if ($dropUsersDbCheckbox.is(':checked')) {
|
||||
var isConfirmed = confirm(Messages.strDropDatabaseStrongWarning + '\n' + Functions.sprintf(Messages.strDoYouReally, 'DROP DATABASE'));
|
||||
|
||||
if (!isConfirmed) {
|
||||
// Uncheck the drop users database checkbox
|
||||
$dropUsersDbCheckbox.prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
Functions.ajaxShowMessage(Messages.strRemovingSelectedUsers);
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
$.post(url, $form.serialize() + argsep + 'delete=' + $thisButton.val() + argsep + 'ajax_request=true', function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
Functions.ajaxShowMessage(data.message); // Refresh navigation, if we dropped some databases with the name
|
||||
// that is the same as the username of the deleted user
|
||||
|
||||
if ($('#dropUsersDbCheckbox:checked').length) {
|
||||
Navigation.reload();
|
||||
} // Remove the revoked user from the users list
|
||||
|
||||
|
||||
$form.find('input:checkbox:checked').parents('tr').slideUp('medium', function () {
|
||||
var thisUserInitial = $(this).find('input:checkbox').val().charAt(0).toUpperCase();
|
||||
$(this).remove(); // If this is the last user with this_user_initial, remove the link from #initials_table
|
||||
|
||||
if ($('#userRightsTable').find('input:checkbox[value^="' + thisUserInitial + '"], input:checkbox[value^="' + thisUserInitial.toLowerCase() + '"]').length === 0) {
|
||||
$('#initials_table').find('td > a:contains(' + thisUserInitial + ')').parent('td').html(thisUserInitial);
|
||||
} // Re-check the classes of each row
|
||||
|
||||
|
||||
$form.find('tbody').find('tr').each(function (index) {
|
||||
if (index >= 0 && index % 2 === 0) {
|
||||
$(this).removeClass('odd').addClass('even');
|
||||
} else if (index >= 0 && index % 2 !== 0) {
|
||||
$(this).removeClass('even').addClass('odd');
|
||||
}
|
||||
}); // update the checkall checkbox
|
||||
|
||||
$(Functions.checkboxesSel).trigger('change');
|
||||
});
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.post()
|
||||
});
|
||||
}); // end Revoke User
|
||||
|
||||
$(document).on('click', 'a.edit_user_group_anchor.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
$(this).parents('tr').addClass('current_row');
|
||||
var $msg = Functions.ajaxShowMessage();
|
||||
$.get($(this).attr('href'), {
|
||||
'ajax_request': true,
|
||||
'edit_user_group_dialog': true
|
||||
}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
Functions.ajaxRemoveMessage($msg);
|
||||
var buttonOptions = {};
|
||||
|
||||
buttonOptions[Messages.strGo] = function () {
|
||||
var usrGroup = $('#changeUserGroupDialog').find('select[name="userGroup"]').val();
|
||||
var $message = Functions.ajaxShowMessage();
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
$.post('index.php?route=/server/privileges', $('#changeUserGroupDialog').find('form').serialize() + argsep + 'ajax_request=1', function (data) {
|
||||
Functions.ajaxRemoveMessage($message);
|
||||
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
$('#usersForm').find('.current_row').removeClass('current_row').find('.usrGroup').text(usrGroup);
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
$('#usersForm').find('.current_row').removeClass('current_row');
|
||||
}
|
||||
});
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
buttonOptions[Messages.strClose] = function () {
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
var $dialog = $('<div></div>').attr('id', 'changeUserGroupDialog').append(data.message).dialog({
|
||||
width: 500,
|
||||
minWidth: 300,
|
||||
modal: true,
|
||||
buttons: buttonOptions,
|
||||
title: $('legend', $(data.message)).text(),
|
||||
close: function close() {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
$dialog.find('legend').remove();
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
$('#usersForm').find('.current_row').removeClass('current_row');
|
||||
}
|
||||
});
|
||||
});
|
||||
/**
|
||||
* AJAX handler for 'Export Privileges'
|
||||
*
|
||||
* @see Functions.ajaxShowMessage()
|
||||
* @memberOf jQuery
|
||||
* @name export_user_click
|
||||
*/
|
||||
|
||||
$(document).on('click', 'button.mult_submit[value=export]', function (event) {
|
||||
event.preventDefault(); // can't export if no users checked
|
||||
|
||||
if ($(this.form).find('input:checked').length === 0) {
|
||||
Functions.ajaxShowMessage(Messages.strNoAccountSelected, 2000, 'success');
|
||||
return;
|
||||
}
|
||||
|
||||
var $msgbox = Functions.ajaxShowMessage();
|
||||
var buttonOptions = {};
|
||||
|
||||
buttonOptions[Messages.strClose] = function () {
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var serverId = CommonParams.get('server');
|
||||
var selectedUsers = $('#usersForm input[name*=\'selected_usr\']:checkbox').serialize();
|
||||
var postStr = selectedUsers + '&submit_mult=export' + argsep + 'ajax_request=true&server=' + serverId;
|
||||
$.post($(this.form).prop('action'), postStr, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
var $ajaxDialog = $('<div></div>').append(data.message).dialog({
|
||||
title: data.title,
|
||||
width: 500,
|
||||
buttons: buttonOptions,
|
||||
close: function close() {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
Functions.ajaxRemoveMessage($msgbox); // Attach syntax highlighted editor to export dialog
|
||||
|
||||
Functions.getSqlEditor($ajaxDialog.find('textarea'));
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.post
|
||||
}); // if exporting non-ajax, highlight anyways
|
||||
|
||||
Functions.getSqlEditor($('textarea.export'));
|
||||
$(document).on('click', 'a.export_user_anchor.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $msgbox = Functions.ajaxShowMessage();
|
||||
/**
|
||||
* @var button_options Object containing options for jQueryUI dialog buttons
|
||||
*/
|
||||
|
||||
var buttonOptions = {};
|
||||
|
||||
buttonOptions[Messages.strClose] = function () {
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
$.get($(this).attr('href'), {
|
||||
'ajax_request': true
|
||||
}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
var $ajaxDialog = $('<div></div>').append(data.message).dialog({
|
||||
title: data.title,
|
||||
width: 500,
|
||||
buttons: buttonOptions,
|
||||
close: function close() {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
Functions.ajaxRemoveMessage($msgbox); // Attach syntax highlighted editor to export dialog
|
||||
|
||||
Functions.getSqlEditor($ajaxDialog.find('textarea'));
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.get
|
||||
}); // end export privileges
|
||||
|
||||
/**
|
||||
* AJAX handler to Paginate the Users Table
|
||||
*
|
||||
* @see Functions.ajaxShowMessage()
|
||||
* @name paginate_users_table_click
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
|
||||
$(document).on('click', '#initials_table a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $msgbox = Functions.ajaxShowMessage();
|
||||
$.get($(this).attr('href'), {
|
||||
'ajax_request': true
|
||||
}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
Functions.ajaxRemoveMessage($msgbox); // This form is not on screen when first entering Privileges
|
||||
// if there are more than 50 users
|
||||
|
||||
$('.alert-primary').remove();
|
||||
$('#usersForm').hide('medium').remove();
|
||||
$('#fieldset_add_user').hide('medium').remove();
|
||||
$('#initials_table').prop('id', 'initials_table_old').after(data.message).show('medium').siblings('h2').not($('#initials_table').prop('id', 'initials_table_old').after(data.message).show('medium').siblings('h2').first()).remove(); // prevent double initials table
|
||||
|
||||
$('#initials_table_old').remove();
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.get
|
||||
}); // end of the paginate users table
|
||||
|
||||
$(document).on('change', 'input[name="ssl_type"]', function () {
|
||||
var $div = $('#specified_div');
|
||||
|
||||
if ($('#ssl_type_SPECIFIED').is(':checked')) {
|
||||
$div.find('input').prop('disabled', false);
|
||||
} else {
|
||||
$div.find('input').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
$(document).on('change', '#checkbox_SSL_priv', function () {
|
||||
var $div = $('#require_ssl_div');
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
$div.find('input').prop('disabled', false);
|
||||
$('#ssl_type_SPECIFIED').trigger('change');
|
||||
} else {
|
||||
$div.find('input').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
$('#checkbox_SSL_priv').trigger('change');
|
||||
/*
|
||||
* Create submenu for simpler interface
|
||||
*/
|
||||
|
||||
var addOrUpdateSubmenu = function addOrUpdateSubmenu() {
|
||||
var $subNav = $('.nav-pills');
|
||||
var $editUserDialog = $('#edit_user_dialog');
|
||||
var submenuLabel;
|
||||
var submenuLink;
|
||||
var linkNumber; // if submenu exists yet, remove it first
|
||||
|
||||
if ($subNav.length > 0) {
|
||||
$subNav.remove();
|
||||
} // construct a submenu from the existing fieldsets
|
||||
|
||||
|
||||
$subNav = $('<ul></ul>').prop('class', 'nav nav-pills m-2');
|
||||
$('#edit_user_dialog .submenu-item').each(function () {
|
||||
submenuLabel = $(this).find('legend[data-submenu-label]').data('submenu-label');
|
||||
submenuLink = $('<a></a>').prop('class', 'nav-link').prop('href', '#').html(submenuLabel);
|
||||
$('<li></li>').prop('class', 'nav-item').append(submenuLink).appendTo($subNav);
|
||||
}); // click handlers for submenu
|
||||
|
||||
$subNav.find('a').on('click', function (e) {
|
||||
e.preventDefault(); // if already active, ignore click
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$subNav.find('a').removeClass('active');
|
||||
$(this).addClass('active'); // which section to show now?
|
||||
|
||||
linkNumber = $subNav.find('a').index($(this)); // hide all sections but the one to show
|
||||
|
||||
$('#edit_user_dialog .submenu-item').hide().eq(linkNumber).show();
|
||||
}); // make first menu item active
|
||||
// TODO: support URL hash history
|
||||
|
||||
$subNav.find('> :first-child a').addClass('active');
|
||||
$editUserDialog.prepend($subNav); // hide all sections but the first
|
||||
|
||||
$('#edit_user_dialog .submenu-item').hide().eq(0).show(); // scroll to the top
|
||||
|
||||
$('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, 'fast');
|
||||
};
|
||||
|
||||
$('input.autofocus').trigger('focus');
|
||||
$(Functions.checkboxesSel).trigger('change');
|
||||
Functions.displayPasswordGenerateButton();
|
||||
|
||||
if ($('#edit_user_dialog').length > 0) {
|
||||
addOrUpdateSubmenu();
|
||||
}
|
||||
|
||||
var windowWidth = $(window).width();
|
||||
$('.jsresponsive').css('max-width', windowWidth - 35 + 'px');
|
||||
$('#addUsersForm').on('submit', function () {
|
||||
return checkAddUser(this);
|
||||
});
|
||||
$('#copyUserForm').on('submit', function () {
|
||||
return checkAddUser(this);
|
||||
});
|
||||
});
|
2290
pma/js/dist/server/status/monitor.js
vendored
Normal file
2290
pma/js/dist/server/status/monitor.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
198
pma/js/dist/server/status/processes.js
vendored
Normal file
198
pma/js/dist/server/status/processes.js
vendored
Normal file
@ -0,0 +1,198 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Server Status Processes
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
// object to store process list state information
|
||||
var processList = {
|
||||
// denotes whether auto refresh is on or off
|
||||
autoRefresh: false,
|
||||
// stores the GET request which refresh process list
|
||||
refreshRequest: null,
|
||||
// stores the timeout id returned by setTimeout
|
||||
refreshTimeout: null,
|
||||
// the refresh interval in seconds
|
||||
refreshInterval: null,
|
||||
// the refresh URL (required to save last used option)
|
||||
// i.e. full or sorting url
|
||||
refreshUrl: null,
|
||||
|
||||
/**
|
||||
* Handles killing of a process
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
init: function init() {
|
||||
processList.setRefreshLabel();
|
||||
|
||||
if (processList.refreshUrl === null) {
|
||||
processList.refreshUrl = 'index.php?route=/server/status/processes/refresh';
|
||||
}
|
||||
|
||||
if (processList.refreshInterval === null) {
|
||||
processList.refreshInterval = $('#id_refreshRate').val();
|
||||
} else {
|
||||
$('#id_refreshRate').val(processList.refreshInterval);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles killing of a process
|
||||
*
|
||||
* @param object the event object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
killProcessHandler: function killProcessHandler(event) {
|
||||
event.preventDefault();
|
||||
var argSep = CommonParams.get('arg_separator');
|
||||
var params = $(this).getPostData();
|
||||
params += argSep + 'ajax_request=1' + argSep + 'server=' + CommonParams.get('server'); // Get row element of the process to be killed.
|
||||
|
||||
var $tr = $(this).closest('tr');
|
||||
$.post($(this).attr('href'), params, function (data) {
|
||||
// Check if process was killed or not.
|
||||
if (data.hasOwnProperty('success') && data.success) {
|
||||
// remove the row of killed process.
|
||||
$tr.remove(); // As we just removed a row, reapply odd-even classes
|
||||
// to keep table stripes consistent
|
||||
|
||||
var $tableProcessListTr = $('#tableprocesslist').find('> tbody > tr');
|
||||
$tableProcessListTr.each(function (index) {
|
||||
if (index >= 0 && index % 2 === 0) {
|
||||
$(this).removeClass('odd').addClass('even');
|
||||
} else if (index >= 0 && index % 2 !== 0) {
|
||||
$(this).removeClass('even').addClass('odd');
|
||||
}
|
||||
}); // Show process killed message
|
||||
|
||||
Functions.ajaxShowMessage(data.message, false);
|
||||
} else {
|
||||
// Show process error message
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles Auto Refreshing
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
refresh: function refresh() {
|
||||
// abort any previous pending requests
|
||||
// this is necessary, it may go into
|
||||
// multiple loops causing unnecessary
|
||||
// requests even after leaving the page.
|
||||
processList.abortRefresh(); // if auto refresh is enabled
|
||||
|
||||
if (processList.autoRefresh) {
|
||||
// Only fetch the table contents
|
||||
processList.refreshUrl = 'index.php?route=/server/status/processes/refresh';
|
||||
var interval = parseInt(processList.refreshInterval, 10) * 1000;
|
||||
var urlParams = processList.getUrlParams();
|
||||
processList.refreshRequest = $.post(processList.refreshUrl, urlParams, function (data) {
|
||||
if (data.hasOwnProperty('success') && data.success) {
|
||||
var $newTable = $(data.message);
|
||||
$('#tableprocesslist').html($newTable.html());
|
||||
Functions.highlightSql($('#tableprocesslist'));
|
||||
}
|
||||
|
||||
processList.refreshTimeout = setTimeout(processList.refresh, interval);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop current request and clears timeout
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
abortRefresh: function abortRefresh() {
|
||||
if (processList.refreshRequest !== null) {
|
||||
processList.refreshRequest.abort();
|
||||
processList.refreshRequest = null;
|
||||
}
|
||||
|
||||
clearTimeout(processList.refreshTimeout);
|
||||
},
|
||||
|
||||
/**
|
||||
* Set label of refresh button
|
||||
* change between play & pause
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
setRefreshLabel: function setRefreshLabel() {
|
||||
var img = 'play';
|
||||
var label = Messages.strStartRefresh;
|
||||
|
||||
if (processList.autoRefresh) {
|
||||
img = 'pause';
|
||||
label = Messages.strStopRefresh;
|
||||
processList.refresh();
|
||||
}
|
||||
|
||||
$('a#toggleRefresh').html(Functions.getImage(img) + Functions.escapeHtml(label));
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the Url Parameters
|
||||
* for autorefresh request,
|
||||
* includes showExecuting if the filter is checked
|
||||
*
|
||||
* @return urlParams - url parameters with autoRefresh request
|
||||
*/
|
||||
getUrlParams: function getUrlParams() {
|
||||
var urlParams = {
|
||||
'server': CommonParams.get('server'),
|
||||
'ajax_request': true,
|
||||
'refresh': true,
|
||||
'full': $('input[name="full"]').val(),
|
||||
'order_by_field': $('input[name="order_by_field"]').val(),
|
||||
'column_name': $('input[name="column_name"]').val(),
|
||||
'sort_order': $('input[name="sort_order"]').val()
|
||||
};
|
||||
|
||||
if ($('#showExecuting').is(':checked')) {
|
||||
urlParams.showExecuting = true;
|
||||
return urlParams;
|
||||
}
|
||||
|
||||
return urlParams;
|
||||
}
|
||||
};
|
||||
AJAX.registerOnload('server/status/processes.js', function () {
|
||||
processList.init(); // Bind event handler for kill_process
|
||||
|
||||
$('#tableprocesslist').on('click', 'a.kill_process', processList.killProcessHandler); // Bind event handler for toggling refresh of process list
|
||||
|
||||
$('a#toggleRefresh').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
processList.autoRefresh = !processList.autoRefresh;
|
||||
processList.setRefreshLabel();
|
||||
}); // Bind event handler for change in refresh rate
|
||||
|
||||
$('#id_refreshRate').on('change', function () {
|
||||
processList.refreshInterval = $(this).val();
|
||||
processList.refresh();
|
||||
}); // Bind event handler for table header links
|
||||
|
||||
$('#tableprocesslist').on('click', 'thead a', function () {
|
||||
processList.refreshUrl = $(this).attr('href');
|
||||
});
|
||||
});
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
|
||||
AJAX.registerTeardown('server/status/processes.js', function () {
|
||||
$('#tableprocesslist').off('click', 'a.kill_process');
|
||||
$('a#toggleRefresh').off('click');
|
||||
$('#id_refreshRate').off('change');
|
||||
$('#tableprocesslist').off('click', 'thead a'); // stop refreshing further
|
||||
|
||||
processList.abortRefresh();
|
||||
});
|
42
pma/js/dist/server/status/queries.js
vendored
Normal file
42
pma/js/dist/server/status/queries.js
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server status query page
|
||||
* @name Server Status Query
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
/* global initTableSorter */
|
||||
// js/server/status/sorter.js
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server/status/queries.js', function () {
|
||||
if (document.getElementById('serverstatusquerieschart') !== null) {
|
||||
var queryPieChart = $('#serverstatusquerieschart').data('queryPieChart');
|
||||
|
||||
if (queryPieChart) {
|
||||
queryPieChart.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
AJAX.registerOnload('server/status/queries.js', function () {
|
||||
// Build query statistics chart
|
||||
var cdata = [];
|
||||
|
||||
try {
|
||||
if (document.getElementById('serverstatusquerieschart') !== null) {
|
||||
$.each($('#serverstatusquerieschart').data('chart'), function (key, value) {
|
||||
cdata.push([key, parseInt(value, 10)]);
|
||||
});
|
||||
$('#serverstatusquerieschart').data('queryPieChart', Functions.createProfilingChart('serverstatusquerieschart', cdata));
|
||||
}
|
||||
} catch (exception) {// Could not load chart, no big deal...
|
||||
}
|
||||
|
||||
initTableSorter('statustabs_queries');
|
||||
});
|
78
pma/js/dist/server/status/sorter.js
vendored
Normal file
78
pma/js/dist/server/status/sorter.js
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
|
||||
// TODO: tablesorter shouldn't sort already sorted columns
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function initTableSorter(tabid) {
|
||||
var $table;
|
||||
var opts;
|
||||
|
||||
switch (tabid) {
|
||||
case 'statustabs_queries':
|
||||
$table = $('#serverStatusQueriesDetails');
|
||||
opts = {
|
||||
sortList: [[3, 1]],
|
||||
headers: {
|
||||
1: {
|
||||
sorter: 'fancyNumber'
|
||||
},
|
||||
2: {
|
||||
sorter: 'fancyNumber'
|
||||
}
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
$table.tablesorter(opts);
|
||||
$table.find('tr').first().find('th').append('<div class="sorticon"></div>');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$.tablesorter.addParser({
|
||||
id: 'fancyNumber',
|
||||
is: function is(s) {
|
||||
return /^[0-9]?[0-9,\\.]*\s?(k|M|G|T|%)?$/.test(s);
|
||||
},
|
||||
format: function format(s) {
|
||||
var num = jQuery.tablesorter.formatFloat(s.replace(Messages.strThousandsSeparator, '').replace(Messages.strDecimalSeparator, '.'));
|
||||
var factor = 1;
|
||||
|
||||
switch (s.charAt(s.length - 1)) {
|
||||
case '%':
|
||||
factor = -2;
|
||||
break;
|
||||
// Todo: Complete this list (as well as in the regexp a few lines up)
|
||||
|
||||
case 'k':
|
||||
factor = 3;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
factor = 6;
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
factor = 9;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
factor = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
return num * Math.pow(10, factor);
|
||||
},
|
||||
type: 'numeric'
|
||||
});
|
||||
$.tablesorter.addParser({
|
||||
id: 'withinSpanNumber',
|
||||
is: function is(s) {
|
||||
return /<span class="original"/.test(s);
|
||||
},
|
||||
format: function format(s, table, html) {
|
||||
var res = html.innerHTML.match(/<span(\s*style="display:none;"\s*)?\s*class="original">(.*)?<\/span>/);
|
||||
return res && res.length >= 3 ? res[2] : 0;
|
||||
},
|
||||
type: 'numeric'
|
||||
});
|
||||
});
|
98
pma/js/dist/server/status/variables.js
vendored
Normal file
98
pma/js/dist/server/status/variables.js
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server/status/variables.js', function () {
|
||||
$('#filterAlert').off('change');
|
||||
$('#filterText').off('keyup');
|
||||
$('#filterCategory').off('change');
|
||||
$('#dontFormat').off('change');
|
||||
});
|
||||
AJAX.registerOnload('server/status/variables.js', function () {
|
||||
// Filters for status variables
|
||||
var textFilter = null;
|
||||
var alertFilter = $('#filterAlert').prop('checked');
|
||||
var categoryFilter = $('#filterCategory').find(':selected').val();
|
||||
var text = ''; // Holds filter text
|
||||
|
||||
/* 3 Filtering functions */
|
||||
|
||||
$('#filterAlert').on('change', function () {
|
||||
alertFilter = this.checked;
|
||||
filterVariables();
|
||||
});
|
||||
$('#filterCategory').on('change', function () {
|
||||
categoryFilter = $(this).val();
|
||||
filterVariables();
|
||||
});
|
||||
$('#dontFormat').on('change', function () {
|
||||
// Hiding the table while changing values speeds up the process a lot
|
||||
var serverStatusVariables = $('#serverStatusVariables');
|
||||
serverStatusVariables.hide();
|
||||
serverStatusVariables.find('td.value span.original').toggle(this.checked);
|
||||
serverStatusVariables.find('td.value span.formatted').toggle(!this.checked);
|
||||
serverStatusVariables.show();
|
||||
}).trigger('change');
|
||||
$('#filterText').on('keyup', function () {
|
||||
var word = $(this).val().replace(/_/g, ' ');
|
||||
|
||||
if (word.length === 0) {
|
||||
textFilter = null;
|
||||
} else {
|
||||
try {
|
||||
textFilter = new RegExp('(^| )' + word, 'i');
|
||||
$(this).removeClass('error');
|
||||
} catch (e) {
|
||||
if (e instanceof SyntaxError) {
|
||||
$(this).addClass('error');
|
||||
textFilter = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
text = word;
|
||||
filterVariables();
|
||||
}).trigger('keyup');
|
||||
/* Filters the status variables by name/category/alert in the variables tab */
|
||||
|
||||
function filterVariables() {
|
||||
var usefulLinks = 0;
|
||||
var section = text;
|
||||
|
||||
if (categoryFilter.length > 0) {
|
||||
section = categoryFilter;
|
||||
}
|
||||
|
||||
if (section.length > 1) {
|
||||
$('#linkSuggestions').find('span').each(function () {
|
||||
if ($(this).attr('class').indexOf('status_' + section) !== -1) {
|
||||
usefulLinks++;
|
||||
$(this).css('display', '');
|
||||
} else {
|
||||
$(this).css('display', 'none');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (usefulLinks > 0) {
|
||||
$('#linkSuggestions').css('display', '');
|
||||
} else {
|
||||
$('#linkSuggestions').css('display', 'none');
|
||||
}
|
||||
|
||||
$('#serverStatusVariables').find('th.name').each(function () {
|
||||
if ((textFilter === null || textFilter.exec($(this).text())) && (!alertFilter || $(this).next().find('span.attention').length > 0) && (categoryFilter.length === 0 || $(this).parent().hasClass('s_' + categoryFilter))) {
|
||||
$(this).parent().css('display', '');
|
||||
} else {
|
||||
$(this).parent().css('display', 'none');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
50
pma/js/dist/server/user_groups.js
vendored
Normal file
50
pma/js/dist/server/user_groups.js
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server user groups page
|
||||
* @name Server User Groups
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server/user_groups.js', function () {
|
||||
$(document).off('click', 'a.deleteUserGroup.ajax');
|
||||
});
|
||||
/**
|
||||
* Bind event handlers
|
||||
*/
|
||||
|
||||
AJAX.registerOnload('server/user_groups.js', function () {
|
||||
// update the checkall checkbox on Edit user group page
|
||||
$(Functions.checkboxesSel).trigger('change');
|
||||
$(document).on('click', 'a.deleteUserGroup.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $link = $(this);
|
||||
var groupName = $link.parents('tr').find('td').first().text();
|
||||
var buttonOptions = {};
|
||||
|
||||
buttonOptions[Messages.strGo] = function () {
|
||||
$(this).dialog('close');
|
||||
$link.removeClass('ajax').trigger('click');
|
||||
};
|
||||
|
||||
buttonOptions[Messages.strClose] = function () {
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
$('<div></div>').attr('id', 'confirmUserGroupDeleteDialog').append(Functions.sprintf(Messages.strDropUserGroupWarning, Functions.escapeHtml(groupName))).dialog({
|
||||
width: 300,
|
||||
minWidth: 200,
|
||||
modal: true,
|
||||
buttons: buttonOptions,
|
||||
title: Messages.strConfirm,
|
||||
close: function close() {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
102
pma/js/dist/server/variables.js
vendored
Normal file
102
pma/js/dist/server/variables.js
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server variables page
|
||||
* @name Server Replication
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server/variables.js', function () {
|
||||
$(document).off('click', 'a.editLink');
|
||||
$('#serverVariables').find('.var-name').find('a img').remove();
|
||||
});
|
||||
AJAX.registerOnload('server/variables.js', function () {
|
||||
var $saveLink = $('a.saveLink');
|
||||
var $cancelLink = $('a.cancelLink');
|
||||
$('#serverVariables').find('.var-name').find('a').append($('#docImage').clone().css('display', 'inline-block'));
|
||||
/* Launches the variable editor */
|
||||
|
||||
$(document).on('click', 'a.editLink', function (event) {
|
||||
event.preventDefault();
|
||||
editVariable(this);
|
||||
});
|
||||
/* Allows the user to edit a server variable */
|
||||
|
||||
function editVariable(link) {
|
||||
var $link = $(link);
|
||||
var $cell = $link.parent();
|
||||
var $valueCell = $link.parents('.var-row').find('.var-value');
|
||||
var varName = $link.data('variable');
|
||||
var $mySaveLink = $saveLink.clone().css('display', 'inline-block');
|
||||
var $myCancelLink = $cancelLink.clone().css('display', 'inline-block');
|
||||
var $msgbox = Functions.ajaxShowMessage();
|
||||
var $myEditLink = $cell.find('a.editLink');
|
||||
$cell.addClass('edit'); // variable is being edited
|
||||
|
||||
$myEditLink.remove(); // remove edit link
|
||||
|
||||
$mySaveLink.on('click', function () {
|
||||
var $msgbox = Functions.ajaxShowMessage(Messages.strProcessingRequest);
|
||||
$.post('index.php?route=/server/variables/set/' + encodeURIComponent(varName), {
|
||||
'ajax_request': true,
|
||||
'varValue': $valueCell.find('input').val()
|
||||
}, function (data) {
|
||||
if (data.success) {
|
||||
$valueCell.html(data.variable).data('content', data.variable);
|
||||
Functions.ajaxRemoveMessage($msgbox);
|
||||
} else {
|
||||
if (data.error === '') {
|
||||
Functions.ajaxShowMessage(Messages.strRequestFailed, false);
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
|
||||
$valueCell.html($valueCell.data('content'));
|
||||
}
|
||||
|
||||
$cell.removeClass('edit').html($myEditLink);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$myCancelLink.on('click', function () {
|
||||
$valueCell.html($valueCell.data('content'));
|
||||
$cell.removeClass('edit').html($myEditLink);
|
||||
return false;
|
||||
});
|
||||
$.get('index.php?route=/server/variables/get/' + encodeURIComponent(varName), {
|
||||
'ajax_request': true
|
||||
}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
var $links = $('<div></div>').append($myCancelLink).append(' ').append($mySaveLink);
|
||||
var $editor = $('<div></div>', {
|
||||
'class': 'serverVariableEditor'
|
||||
}).append($('<div></div>').append($('<input>', {
|
||||
type: 'text',
|
||||
'class': 'form-control form-control-sm'
|
||||
}).val(data.message))); // Save and replace content
|
||||
|
||||
$cell.html($links).children().css('display', 'flex');
|
||||
$valueCell.data('content', $valueCell.html()).html($editor).find('input').trigger('focus').on('keydown', function (event) {
|
||||
// Keyboard shortcuts
|
||||
if (event.keyCode === 13) {
|
||||
// Enter key
|
||||
$mySaveLink.trigger('click');
|
||||
} else if (event.keyCode === 27) {
|
||||
// Escape key
|
||||
$myCancelLink.trigger('click');
|
||||
}
|
||||
});
|
||||
Functions.ajaxRemoveMessage($msgbox);
|
||||
} else {
|
||||
$cell.removeClass('edit').html($myEditLink);
|
||||
Functions.ajaxShowMessage(data.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user