diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-09 18:48:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-09 18:48:36 +0000 |
commit | 087186ef344886add9fc09a594a43e5842a1c203 (patch) | |
tree | 511068904e4417188f9c5c731ab006ed7cd6a33c /public | |
parent | c23e497c424a102c05fbdb7218b2a9af141b30e9 (diff) | |
download | redmine-087186ef344886add9fc09a594a43e5842a1c203.tar.gz redmine-087186ef344886add9fc09a594a43e5842a1c203.zip |
Check if width parameter is present.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8594 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/application.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 5cd38e6d0..9d27c0463 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -209,7 +209,9 @@ function showModal(id, width) { $('modalbg').show(); var pageWidth = document.viewport.getWidth(); - el.setStyle({'width': width}); + if (width) { + el.setStyle({'width': width}); + } el.setStyle({'left': (((pageWidth - el.getWidth())/2 *100) / pageWidth) + '%'}); el.addClassName('modal'); el.show(); |