LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
05776Development Survey takingpublic2012-02-08 04:372013-09-21 15:15
ReporterTMSWhite 
Assigned ToTMSWhite 
PrioritylowSeveritytweak 
StatusassignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary05776: survey_runtime.js should not need to call check_conditions at startup
DescriptionAll text should be properly tailored; validations applied; and relevance criteria evaluated in PHP - should not need to also be called from JavaScript
Steps To Reproducecomment out line:

    if (typeof checkconditions!='undefined') checkconditions();

from survey_runtime.js and see (when running ls2_validation_tests.lss) that without running that function at startup, get validation tips in black (instead of color) that are missing their tailoring (e.g. "Please enter a number greater than" without the tailored number value)
Additional InformationThis is just a performance issue. It might be possible to speed up load a fraction of a second if this is resolved.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (23932)
DenisChenu (developer)
2013-02-01 11:20
edited on: 2013-02-01 11:22

Hello Thomas,

Think we had to remove all inline condition function.
And put this in external javascript with $.delegate system.

For exemple for text input:
$("#limesurvey").delegate("input.text","keyup focusout",function(event){
value=$(this).val();
name=$(this).attr("name");
type='text';
evt_type=event;
// Do the function
}

Etc ....
$.delegate is really better than included javascript, more robust javascript.
But need a lot of time to update this ;).

Use the .text class for restrict to only needed input, can test if numeric or if integeronly with:
numeric=$(this).hasClass("numeric");
integeronly=$(this).hasClass("integeronly");

Etc ....

User avatar (26302)
DenisChenu (developer)
2013-09-21 15:15

Think better to use data css3 function.

- Issue History
Date Modified Username Field Change
2012-02-08 04:37 TMSWhite New Issue
2012-02-09 09:43 Mazi Assigned To => TMSWhite
2012-02-09 09:43 Mazi Status new => assigned
2012-02-23 16:43 TMSWhite Project Bug reports => Development
2013-02-01 11:20 DenisChenu Note Added: 23932
2013-02-01 11:22 DenisChenu Note Edited: 23932 View Revisions
2013-09-21 15:15 DenisChenu Note Added: 26302


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker