diff --git a/src/codehelp/templates/class_config_form.html b/src/codehelp/templates/class_config_form.html index 0c8991b..9f4a9cd 100644 --- a/src/codehelp/templates/class_config_form.html +++ b/src/codehelp/templates/class_config_form.html @@ -35,25 +35,28 @@

dragenter(index) { if (this.drag_index === null) { return } if (index === this.drag_index) { return } - // reorder the list - const origlist = this.languages; + // reorder the list, placing the dragged item at this index and shifting others let new_languages = []; - origlist.forEach((el, i) => { + const drag_item = this.languages[this.drag_index]; + this.languages.forEach((el, i) => { if (i === this.drag_index) { return } else if (i === index && i < this.drag_index) { - new_languages.push(origlist[this.drag_index]); + new_languages.push(drag_item); new_languages.push(el); } else if (i === index && i > this.drag_index) { new_languages.push(el); - new_languages.push(origlist[this.drag_index]); + new_languages.push(drag_item); } else { new_languages.push(el); } }); - this.languages = new_languages; - this.drag_index = index; + this.languages = new_languages; // update w/ newly ordered list + this.drag_index = index; // this new index is now the one we're dragging + }, + stop_drag() { + this.drag_index = null; }, })); }); @@ -71,17 +74,17 @@

@@ -90,7 +93,7 @@

- +
diff --git a/src/gened/templates/instructor_class_config.html b/src/gened/templates/instructor_class_config.html index 2fa21aa..f75f957 100644 --- a/src/gened/templates/instructor_class_config.html +++ b/src/gened/templates/instructor_class_config.html @@ -95,7 +95,7 @@

Access

Only until: - + anywhere on Earth
@@ -180,14 +180,14 @@

Language Model

- +

Note that GPT-4 produces more accurate results than 3.5 but is also roughly 10 times the cost.

- {% for model in models %}