Bug #3202516 Multiple Change Password windows
This commit is contained in:
@@ -2000,22 +2000,26 @@ $(document).ready(function() {
|
|||||||
* Attach Ajax event handler on the change password anchor
|
* Attach Ajax event handler on the change password anchor
|
||||||
* @see $cfg['AjaxEnable']
|
* @see $cfg['AjaxEnable']
|
||||||
*/
|
*/
|
||||||
|
$('#change_password_anchor.obh').live('click',function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('#change_password_anchor.ajax').live('click', function(event) {
|
$('#change_password_anchor.ajax').live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
$(this).removeClass('ajax').addClass('obh');
|
||||||
/**
|
/**
|
||||||
* @var button_options Object containing options to be passed to jQueryUI's dialog
|
* @var button_options Object containing options to be passed to jQueryUI's dialog
|
||||||
*/
|
*/
|
||||||
var button_options = {};
|
var button_options = {};
|
||||||
|
|
||||||
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();}
|
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();}
|
||||||
|
|
||||||
$.get($(this).attr('href'), {'ajax_request': true}, function(data) {
|
$.get($(this).attr('href'), {'ajax_request': true}, function(data) {
|
||||||
$('<div id="change_password_dialog"></div>')
|
$('<div id="change_password_dialog"></div>')
|
||||||
.dialog({
|
.dialog({
|
||||||
title: PMA_messages['strChangePassword'],
|
title: PMA_messages['strChangePassword'],
|
||||||
width: 600,
|
width: 600,
|
||||||
buttons : button_options
|
close: function(ev,ui) {$(this).remove();},
|
||||||
|
buttons : button_options,
|
||||||
|
beforeClose: function(ev,ui){ $('#change_password_anchor.obh').removeClass('obh').addClass('ajax')}
|
||||||
})
|
})
|
||||||
.append(data);
|
.append(data);
|
||||||
displayPasswordGenerateButton();
|
displayPasswordGenerateButton();
|
||||||
@@ -2051,6 +2055,7 @@ $(document).ready(function() {
|
|||||||
$("#topmenucontainer").after(data.sql_query);
|
$("#topmenucontainer").after(data.sql_query);
|
||||||
$("#change_password_dialog").hide().remove();
|
$("#change_password_dialog").hide().remove();
|
||||||
$("#edit_user_dialog").dialog("close").remove();
|
$("#edit_user_dialog").dialog("close").remove();
|
||||||
|
$('#change_password_anchor.obh').removeClass('obh').addClass('ajax');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PMA_ajaxShowMessage(data.error);
|
PMA_ajaxShowMessage(data.error);
|
||||||
|
Reference in New Issue
Block a user