##// END OF EJS Templates
Use JQuery Dialog (#11445)....
Jean-Philippe Lang -
r9887:46b1a49453c4
parent child
Show More
@@ -273,33 +273,27 function setPredecessorFieldsVisibility() {
273 }
273 }
274
274
275 function showModal(id, width) {
275 function showModal(id, width) {
276 el = $('#'+id).first();
276 var el = $('#'+id).first();
277 if (el.length == 0 || el.is(':visible')) {return;}
277 if (el.length == 0 || el.is(':visible')) {return;}
278 var h = $('body').height();
278 var title = el.find('h3.title').text();
279 var d = document.createElement("div");
279 el.dialog({
280 d.id = 'modalbg';
280 width: width,
281 $(d).appendTo('#main').css('width', '100%').css('height', h + 'px').show();
281 modal: true,
282
282 resizable: false,
283 var pageWidth = $(window).width();
283 dialogClass: 'modal',
284 if (width) {
284 title: title
285 el.css('width', width);
285 });
286 }
287 el.css('left', (((pageWidth - el.width())/2 *100) / pageWidth) + '%');
288 el.addClass('modal');
289 el.show();
290
291 el.find("input[type=text], input[type=submit]").first().focus();
286 el.find("input[type=text], input[type=submit]").first().focus();
292 }
287 }
293
288
294 function hideModal(el) {
289 function hideModal(el) {
295 var modal;
290 var modal;
296 if (el) {
291 if (el) {
297 modal = $(el).parents('div.modal').first();
292 modal = $(el).parents('.ui-dialog-content');
298 } else {
293 } else {
299 modal = $('#ajax-modal');
294 modal = $('#ajax-modal');
300 }
295 }
301 modal.hide();
296 modal.dialog("close");
302 $('#modalbg').remove();
303 }
297 }
304
298
305 function submitPreview(url, form, target) {
299 function submitPreview(url, form, target) {
@@ -91,12 +91,9 html>body #content { min-height: 600px; }
91 #login-form label {font-weight: bold;}
91 #login-form label {font-weight: bold;}
92 #login-form input#username, #login-form input#password { width: 300px; }
92 #login-form input#username, #login-form input#password { width: 300px; }
93
93
94 #modalbg {position:absolute; top:0; left:0; width:100%; height:100%; background:#ccc; z-index:49; opacity:0.5;}
94 div.modal { border-radius:5px; background:#fff; z-index:50; padding:4px;}
95 html>body #modalbg {position:fixed;}
95 div.modal h3.title {display:none;}
96 div.modal { border-radius:5px; position:absolute; top:25%; background:#fff; border:2px solid #759FCF; z-index:50; padding:0px; padding:8px; box-shadow: 1px 1px 8px #888; }
97 div.modal h3.title {background:#759FCF; color:#fff; border:0; padding-left:8px; margin:-8px; margin-bottom: 1em; border-top-left-radius:2px;border-top-right-radius:2px;}
98 div.modal p.buttons {text-align:right; margin-bottom:0;}
96 div.modal p.buttons {text-align:right; margin-bottom:0;}
99 html>body div.modal {position:fixed;}
100
97
101 input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }
98 input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }
102
99
General Comments 0
You need to be logged in to leave comments. Login now