/
githubmirror
/
edx-platform
Обзор
Документация
Войти
/
githubmirror
/
edx-platform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-ulmo
cms/static/js/collections/chapter.js
14 строк
499 B
Syed Ali Abbas Zaidi
fix: multi lines and spaces issues (#31885)
03 май 2023, 10:22
Не верифицирован
03 май 2023, 10:22
f1fb38e
Код
Авторство
О чём код?
define(['backbone', 'js/models/chapter'], function(Backbone, ChapterModel) { var ChapterCollection = Backbone.Collection.extend({ model: ChapterModel, comparator: 'order', nextOrder: function() { if (!this.length) { return 1; } return this.last().get('order') + 1; }, isEmpty: function() { return this.length === 0 || this.every(function(m) { return m.isEmpty(); }); } }); return ChapterCollection; });