From 087186ef344886add9fc09a594a43e5842a1c203 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 9 Jan 2012 18:48:36 +0000 Subject: Check if width parameter is present. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8594 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public') 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(); -- cgit v1.2.3