FIX: Fixed reorder categories by number not working correctly

This commit is contained in:
venarius
2019-03-16 23:57:26 +01:00
committed by Robin Ward
parent 2506acae80
commit ad363f45f0
2 changed files with 88 additions and 2 deletions

View File

@@ -85,8 +85,7 @@ export default Ember.Controller.extend(ModalFunctionality, Ember.Evented, {
actions: {
change(cat, e) {
let position = parseInt($(e.target).val());
cat.set("position", position);
this.fixIndices();
this.moveDir(cat, position - this.get("categoriesOrdered").indexOf(cat));
},
moveUp(cat) {