Skip to content

Commit

Permalink
Add comparator (norder) to spList
Browse files Browse the repository at this point in the history
The Source Phrase list is returned ordered by norder, but adding/removing phrases, etc. is throwing the forward/back buttons off. Added a comparator so the list is re-sorted when the user adds/removes a phrase, etc.
  • Loading branch information
eb1 committed Aug 9, 2024
1 parent 55b7fb6 commit ea1b4fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions www/js/views/AdaptViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ define(function (require) {
// place two calls to render:
// - one deferred, when we get all the source phrases for the chapter back from the DB
// - one right now to say "please wait..."
this.collection.comparator = 'norder'; // sort by norder
this.collection.fetch({reset: true, data: {chapterid: this.options.chapterid}}).done(this.render);
this.render();
// AIM 1.6.0 - user setting to allow editing blank/empty verses
Expand Down

0 comments on commit ea1b4fd

Please sign in to comment.