mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix #1494 zero indexed field list
This commit is contained in:
@@ -27,6 +27,13 @@ define([
|
|||||||
// store all single rendered views
|
// store all single rendered views
|
||||||
this.itemViews = [];
|
this.itemViews = [];
|
||||||
|
|
||||||
|
// force base 1 indexed
|
||||||
|
if (this.collection.first().get("sorter") === 0) {
|
||||||
|
this.collection.each(function (model) {
|
||||||
|
model.set({'sorter': model.get("sorter") + 1}, {silent: true});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// rerender whenever there is a change on the collection
|
// rerender whenever there is a change on the collection
|
||||||
this.collection.bind("reset", this.render, this);
|
this.collection.bind("reset", this.render, this);
|
||||||
this.collection.bind("add", this.render, this);
|
this.collection.bind("add", this.render, this);
|
||||||
|
Reference in New Issue
Block a user