From a20a1b392bb062bd7e539601ca0102a202c18529 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 20 Jan 2012 16:30:40 +0000 Subject: [PATCH] Fixed issue#05450: Question code can be empty when a space is entered Dev changed Javascript isEmpty() function so that this fixes other places where spaces could have been inadvertently accepted git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12137 b72ed6b6-b9f8-46b5-92b4-906544132732 --- scripts/admin/admin_core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/admin/admin_core.js b/scripts/admin/admin_core.js index 8e7ba28a47a..5518d9ae4dc 100644 --- a/scripts/admin/admin_core.js +++ b/scripts/admin/admin_core.js @@ -333,7 +333,7 @@ function validatefilename (form, strmessage ) // If the length of the element's string is 0 then display helper message function isEmpty(elem, helperMsg) { - if(elem.value.length == 0){ + if($.trim(elem.value).length == 0){ alert(helperMsg); elem.focus(); // set the focus to this input return false;