[sword-svn] r175 - trunk/www
Fri Mar 18 01:00:22 EDT 2022
Author:
Date: 2022-03-18 01:00:22 -0400 (Fri, 18 Mar 2022)
New Revision: 175
Modified:
trunk/www/index.html
Log:
Added sorting for lessons
Modified: trunk/www/index.html
===================================================================
--- trunk/www/index.html 2022-03-18 04:33:44 UTC (rev 174)
+++ trunk/www/index.html 2022-03-18 05:00:22 UTC (rev 175)
@@ -175,14 +175,17 @@
$('#setupMessage').html('Select lessons for review');
$('#headerPadSetupLessons').height($('#setupMessage').outerHeight());
- d = document.getElementById('lessons');
- d.innerHTML='';
- var lessons = '';
+ $('#lessons').html('');
lessonSet.getLessons(function(lessons) {
+ var lessonNames = [];
$(lessons).each(function() {
- lessons += '<option value="' + this.getDescription() + '">' + this.getDescription() + '</option>';
+ lessonNames.push(this.getDescription());
});
- d.innerHTML = lessons;
+ var lessonOptions = '';
+ $(lessonNames.sort()).each(function() {
+ lessonOptions += '<option value="' + this + '">' + this + '</option>';
+ });
+ $('#lessons').html(lessonOptions);
});
}
More information about the sword-cvs
mailing list