mirror of
https://github.com/redmine/redmine.git
synced 2026-01-06 15:42:57 +01:00
Adds a dialog box for CSV export options (#4742).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7874 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -186,6 +186,39 @@ function promptToRemote(text, param, url) {
|
||||
}
|
||||
}
|
||||
|
||||
function showModal(id, width) {
|
||||
el = $(id);
|
||||
if (el == undefined || el.visible()) {return;}
|
||||
var h = $$('body')[0].getHeight();
|
||||
var d = document.createElement("div");
|
||||
d.id = 'modalbg';
|
||||
$('main').appendChild(d);
|
||||
$('modalbg').setStyle({ width: '100%', height: h + 'px' });
|
||||
$('modalbg').show();
|
||||
|
||||
var pageWidth = document.viewport.getWidth();
|
||||
el.setStyle({'width': width});
|
||||
el.setStyle({'left': (((pageWidth - el.getWidth())/2 *100) / pageWidth) + '%'});
|
||||
el.addClassName('modal');
|
||||
el.show();
|
||||
|
||||
var submit = el.down("input[type=submit]");
|
||||
if (submit) {
|
||||
submit.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function hideModal(el) {
|
||||
var modal = Element.up(el, 'div.modal');
|
||||
if (modal) {
|
||||
modal.hide();
|
||||
}
|
||||
var bg = $('modalbg');
|
||||
if (bg) {
|
||||
bg.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function collapseScmEntry(id) {
|
||||
var els = document.getElementsByClassName(id, 'browser');
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user