mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 06:46:01 +01:00
Fixed the sudo dialog when called from a dialog, eg. email addresses (#19851).
git-svn-id: http://svn.redmine.org/redmine/trunk@14339 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$('#ajax-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
|
$("body").append($("<div>", {id: "sudo-modal"}).hide());
|
||||||
showModal('ajax-modal', '400px');
|
$('#sudo-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
|
||||||
|
showModal('sudo-modal', '400px');
|
||||||
$('#sudo_password').focus();
|
$('#sudo_password').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ function showModal(id, width, title) {
|
|||||||
var el = $('#'+id).first();
|
var el = $('#'+id).first();
|
||||||
if (el.length === 0 || el.is(':visible')) {return;}
|
if (el.length === 0 || el.is(':visible')) {return;}
|
||||||
if (!title) title = el.find('h3.title').text();
|
if (!title) title = el.find('h3.title').text();
|
||||||
|
// moves existing modals behind the transparent background
|
||||||
|
$(".modal").zIndex(99);
|
||||||
el.dialog({
|
el.dialog({
|
||||||
width: width,
|
width: width,
|
||||||
modal: true,
|
modal: true,
|
||||||
@@ -401,6 +403,8 @@ function hideModal(el) {
|
|||||||
modal = $('#ajax-modal');
|
modal = $('#ajax-modal');
|
||||||
}
|
}
|
||||||
modal.dialog("close");
|
modal.dialog("close");
|
||||||
|
// restores existing modals in front of the transparent background
|
||||||
|
$(".modal").zIndex(101);
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitPreview(url, form, target) {
|
function submitPreview(url, form, target) {
|
||||||
|
|||||||
Reference in New Issue
Block a user