##// END OF EJS Templates
Fixed the sudo dialog when called from a dialog, eg. email addresses (#19851)....
Jean-Philippe Lang -
r13957:f11bba5537b1
parent child
Show More
@@ -1,4 +1,4
1 $('#ajax-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
1 $("body").append($("<div>", {id: "sudo-modal"}).hide());
2 showModal('ajax-modal', '400px');
2 $('#sudo-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
3 showModal('sudo-modal', '400px');
3 $('#sudo_password').focus();
4 $('#sudo_password').focus();
4
@@ -383,6 +383,8 function showModal(id, width, title) {
383 var el = $('#'+id).first();
383 var el = $('#'+id).first();
384 if (el.length === 0 || el.is(':visible')) {return;}
384 if (el.length === 0 || el.is(':visible')) {return;}
385 if (!title) title = el.find('h3.title').text();
385 if (!title) title = el.find('h3.title').text();
386 // moves existing modals behind the transparent background
387 $(".modal").zIndex(99);
386 el.dialog({
388 el.dialog({
387 width: width,
389 width: width,
388 modal: true,
390 modal: true,
@@ -401,6 +403,8 function hideModal(el) {
401 modal = $('#ajax-modal');
403 modal = $('#ajax-modal');
402 }
404 }
403 modal.dialog("close");
405 modal.dialog("close");
406 // restores existing modals in front of the transparent background
407 $(".modal").zIndex(101);
404 }
408 }
405
409
406 function submitPreview(url, form, target) {
410 function submitPreview(url, form, target) {
General Comments 0
You need to be logged in to leave comments. Login now