Update
This commit is contained in:
@@ -29,6 +29,7 @@ BX.Kanban.Column = function(options)
|
||||
this.total = null;
|
||||
this.isTotalFrozen = false;
|
||||
this.animate = options.animate || null;
|
||||
this.autoPagination = false;
|
||||
|
||||
this.canEdit = null;
|
||||
this.canSort = null;
|
||||
@@ -126,13 +127,22 @@ BX.Kanban.Column.prototype =
|
||||
this.setColor(options.color);
|
||||
this.setData(options.data);
|
||||
|
||||
var boolOptions = ["canEdit", "canSort", "canRemove", "canAddItem", "droppable", "canSortItems",];
|
||||
boolOptions.forEach(function(boolOption) {
|
||||
const boolOptions = [
|
||||
'canEdit',
|
||||
'canSort',
|
||||
'canRemove',
|
||||
'canAddItem',
|
||||
'droppable',
|
||||
'canSortItems',
|
||||
'autoPagination',
|
||||
];
|
||||
|
||||
boolOptions.forEach((boolOption) => {
|
||||
if (BX.type.isBoolean(options[boolOption]))
|
||||
{
|
||||
this[boolOption] = options[boolOption];
|
||||
}
|
||||
}, this);
|
||||
});
|
||||
},
|
||||
|
||||
setColor: function(color)
|
||||
@@ -567,6 +577,11 @@ BX.Kanban.Column.prototype =
|
||||
|
||||
hasLoading: function()
|
||||
{
|
||||
if (this.autoPagination)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return this.total !== null && this.total > this.getItemsCount();
|
||||
},
|
||||
|
||||
@@ -623,6 +638,11 @@ BX.Kanban.Column.prototype =
|
||||
columnContainer.classList[isEmptyColumn ? "add" : "remove"]("main-kanban-column-empty");
|
||||
columnContainer.classList[this.isDroppable() ? "add" : "remove"]("main-kanban-column-droppable");
|
||||
|
||||
if (this.autoPagination)
|
||||
{
|
||||
columnContainer.classList.add("--auto-pagination");
|
||||
}
|
||||
|
||||
if(!this.getGrid().firstRenderComplete)
|
||||
{
|
||||
this.hasBeenEdt = true;
|
||||
@@ -1172,7 +1192,7 @@ BX.Kanban.Column.prototype =
|
||||
var firstItem = this.getFirstItem(false);
|
||||
if (firstItem)
|
||||
{
|
||||
var existsDraftItem = firstItem.getId().indexOf('kanban-new-item-') === 0;
|
||||
const existsDraftItem = firstItem.getId().toString().indexOf('kanban-new-item-') === 0;
|
||||
if (existsDraftItem)
|
||||
{
|
||||
firstItem.applyDraftEditMode();
|
||||
@@ -2023,6 +2043,7 @@ BX.Kanban.Pagination.prototype = {
|
||||
jsDD.refreshDestArea();
|
||||
|
||||
var loader = this.getLoader();
|
||||
|
||||
if (!this.loadingInProgress && column.hasLoading() && loader.offsetTop < scrollTop + offsetHeight)
|
||||
{
|
||||
this.showLoader();
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
core/bitrix/js/main/kanban/column.min.js
vendored
2
core/bitrix/js/main/kanban/column.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -334,6 +334,10 @@
|
||||
font-weight: var(--ui-font-weight-regular, 400);
|
||||
}
|
||||
|
||||
.main-kanban-column.--auto-pagination .main-kanban-column-total-item {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-kanban-column-title-dark .main-kanban-column-total-item,
|
||||
.main-kanban-column-title-dark .main-kanban-column-title-text { color: #fff }
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user