summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js22
-rw-r--r--client/components/lists/list.styl6
-rw-r--r--client/components/lists/listBody.js22
-rw-r--r--client/components/lists/listHeader.jade3
4 files changed, 27 insertions, 26 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 8574caf7..839304f8 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -1,6 +1,6 @@
import { Cookies } from 'meteor/ostrio:cookies';
const cookies = new Cookies();
-const { calculateIndex, enableClickOnTouch } = Utils;
+const { calculateIndex } = Utils;
BlazeComponent.extendComponent({
// Proxy
@@ -114,9 +114,6 @@ BlazeComponent.extendComponent({
},
});
- // ugly touch event hotfix
- enableClickOnTouch(itemsSelector);
-
this.autorun(() => {
let showDesktopDragHandles = false;
currentUser = Meteor.user();
@@ -129,7 +126,7 @@ BlazeComponent.extendComponent({
showDesktopDragHandles = false;
}
- if (!Utils.isMiniScreen() && showDesktopDragHandles) {
+ if (Utils.isMiniScreen() || showDesktopDragHandles) {
$cards.sortable({
handle: '.handle',
});
@@ -139,27 +136,16 @@ BlazeComponent.extendComponent({
});
}
- if ($cards.data('sortable')) {
+ if ($cards.data('uiSortable') || $cards.data('sortable')) {
$cards.sortable(
'option',
'disabled',
- // Disable drag-dropping when user is not member/is miniscreen
+ // Disable drag-dropping when user is not member
!userIsMember(),
// Not disable drag-dropping while in multi-selection mode
// MultiSelection.isActive() || !userIsMember(),
);
}
-
- if ($cards.data('sortable')) {
- $cards.sortable(
- 'option',
- 'disabled',
- // Disable drag-dropping when user is not member/is miniscreen
- Utils.isMiniScreen(),
- // Not disable drag-dropping while in multi-selection mode
- // MultiSelection.isActive() || !userIsMember(),
- );
- }
});
// We want to re-run this function any time a card is added.
diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl
index 27cf678c..bc7f763f 100644
--- a/client/components/lists/list.styl
+++ b/client/components/lists/list.styl
@@ -43,9 +43,6 @@
background: white
margin: -3px 0 8px
-.list-header-card-count
- height: 35px
-
.list-header-add
flex: 0 0 auto
padding: 20px 12px 4px
@@ -60,6 +57,9 @@
background-color: #e4e4e4;
border-bottom: 6px solid #e4e4e4;
+ &.list-header-card-count
+ min-height: 35px
+ height: auto
&.ui-sortable-handle
cursor: grab
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 89c27ec7..88f88db0 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -411,7 +411,7 @@ BlazeComponent.extendComponent({
type: 'board',
},
{
- sort: ['title'],
+ sort: { sort: 1 /* boards default sorting */ },
},
);
return boards;
@@ -597,7 +597,7 @@ BlazeComponent.extendComponent({
type: 'board',
},
{
- sort: ['title'],
+ sort: { sort: 1 /* boards default sorting */ },
},
);
return boards;
@@ -743,9 +743,25 @@ BlazeComponent.extendComponent({
},
updateList() {
+ // Use fallback when requestIdleCallback is not available on iOS and Safari
+ // https://www.afasterweb.com/2017/11/20/utilizing-idle-moments/
+ checkIdleTime =
+ window.requestIdleCallback ||
+ function(handler) {
+ const startTime = Date.now();
+ return setTimeout(function() {
+ handler({
+ didTimeout: false,
+ timeRemaining() {
+ return Math.max(0, 50.0 - (Date.now() - startTime));
+ },
+ });
+ }, 1);
+ };
+
if (this.spinnerInView()) {
this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);
- window.requestIdleCallback(() => this.updateList());
+ checkIdleTime(() => this.updateList());
}
},
diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade
index 182fee9e..fa1faf34 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -30,10 +30,9 @@ template(name="listHeader")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon
a.fa.fa-navicon.js-open-list-menu
- //a.list-header-handle.handle.fa.fa-arrows.js-list-handle
else
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
- //a.list-header-handle.handle.fa.fa-arrows.js-list-handle
+ a.list-header-handle.handle.fa.fa-arrows.js-list-handle
else if currentUser.isBoardMember
if isWatching
i.list-header-watch-icon.fa.fa-eye