mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Pagenator should be Paginator
This commit is contained in:
parent
8bb05b41ce
commit
cb9e393fbc
7 changed files with 14 additions and 14 deletions
|
|
@ -518,7 +518,7 @@ export function changeTheme(value, themeTrigger = ()=>{}) {
|
||||||
/**
|
/**
|
||||||
* @returns {function}
|
* @returns {function}
|
||||||
*/
|
*/
|
||||||
export function computedPagenatorHelper(koCurrentPage, koPageCount) {
|
export function computedPaginatorHelper(koCurrentPage, koPageCount) {
|
||||||
return () => {
|
return () => {
|
||||||
const currentPage = koCurrentPage(),
|
const currentPage = koCurrentPage(),
|
||||||
pageCount = koPageCount(),
|
pageCount = koPageCount(),
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.e-pagenator {
|
.e-paginator {
|
||||||
|
|
||||||
.e-page {
|
.e-page {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import {
|
||||||
|
|
||||||
import {
|
import {
|
||||||
delegateRunOnDestroy,
|
delegateRunOnDestroy,
|
||||||
computedPagenatorHelper,
|
computedPaginatorHelper,
|
||||||
pInt
|
pInt
|
||||||
} from 'Common/Utils';
|
} from 'Common/Utils';
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
return 0 >= iPage ? 1 : iPage;
|
return 0 >= iPage ? 1 : iPage;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.contactsPagenator = ko.computed(computedPagenatorHelper(this.contactsPage, this.contactsPageCount));
|
this.contactsPaginator = ko.computed(computedPaginatorHelper(this.contactsPage, this.contactsPageCount));
|
||||||
|
|
||||||
this.emptySelection = ko.observable(true);
|
this.emptySelection = ko.observable(true);
|
||||||
this.viewClearSearch = ko.observable(false);
|
this.viewClearSearch = ko.observable(false);
|
||||||
|
|
@ -615,7 +615,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
dom.addEventListener('click', event => {
|
dom.addEventListener('click', event => {
|
||||||
let el = event.target.closestWithin('.e-pagenator .e-page', dom);
|
let el = event.target.closestWithin('.e-paginator .e-page', dom);
|
||||||
if (el && ko.dataFor(el)) {
|
if (el && ko.dataFor(el)) {
|
||||||
self.contactsPage(pInt(ko.dataFor(el).value));
|
self.contactsPage(pInt(ko.dataFor(el).value));
|
||||||
self.reloadContactList();
|
self.reloadContactList();
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||||
|
|
||||||
import { leftPanelDisabled, moveAction } from 'Common/Globals';
|
import { leftPanelDisabled, moveAction } from 'Common/Globals';
|
||||||
|
|
||||||
import { computedPagenatorHelper } from 'Common/Utils';
|
import { computedPaginatorHelper } from 'Common/Utils';
|
||||||
import { File } from 'Common/File';
|
import { File } from 'Common/File';
|
||||||
|
|
||||||
import { mailBox, append } from 'Common/Links';
|
import { mailBox, append } from 'Common/Links';
|
||||||
|
|
@ -128,8 +128,8 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
return value ? i18n('MESSAGE_LIST/SEARCH_RESULT_FOR', { 'SEARCH': value }) : '';
|
return value ? i18n('MESSAGE_LIST/SEARCH_RESULT_FOR', { 'SEARCH': value }) : '';
|
||||||
});
|
});
|
||||||
|
|
||||||
this.messageListPagenator = ko.computed(
|
this.messageListPaginator = ko.computed(
|
||||||
computedPagenatorHelper(MessageStore.messageListPage, MessageStore.messageListPageCount)
|
computedPaginatorHelper(MessageStore.messageListPage, MessageStore.messageListPageCount)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.checkAll = ko.computed({
|
this.checkAll = ko.computed({
|
||||||
|
|
@ -375,7 +375,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
this.iGoToUpUpOrDownDownTimeout = setTimeout(() => {
|
this.iGoToUpUpOrDownDownTimeout = setTimeout(() => {
|
||||||
let prev, next, temp, current;
|
let prev, next, temp, current;
|
||||||
|
|
||||||
this.messageListPagenator().find(item => {
|
this.messageListPaginator().find(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
if (current) {
|
if (current) {
|
||||||
next = item;
|
next = item;
|
||||||
|
|
@ -702,7 +702,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
AppStore.focusedState(Focused.MessageList);
|
AppStore.focusedState(Focused.MessageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
let el = eqs(event, '.e-pagenator .e-page');
|
let el = eqs(event, '.e-paginator .e-page');
|
||||||
el && this.gotoPage(ko.dataFor(el));
|
el && this.gotoPage(ko.dataFor(el));
|
||||||
|
|
||||||
eqs(event, '.messageList .checkboxCkeckAll') && this.checkAll(!this.checkAll());
|
eqs(event, '.messageList .checkboxCkeckAll') && this.checkAll(!this.checkAll());
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="e-pagenator g-ui-user-select-none" data-bind="foreach: $data">
|
<div class="e-paginator g-ui-user-select-none" data-bind="foreach: $data">
|
||||||
<a class="e-page" data-bind="css: { 'current': current, 'custom': custom }, title: title">
|
<a class="e-page" data-bind="css: { 'current': current, 'custom': custom }, title: title">
|
||||||
<span class="e-page-number" data-bind="text: name"></span>
|
<span class="e-page-number" data-bind="text: name"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
<span data-bind="text: userUsageProc"></span>%
|
<span data-bind="text: userUsageProc"></span>%
|
||||||
</span>
|
</span>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<!-- ko template: { name: 'Pagenator', data: messageListPagenator } --><!-- /ko -->
|
<!-- ko template: { name: 'Paginator', data: messageListPaginator } --><!-- /ko -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="b-list-footer-toolbar">
|
<div class="b-list-footer-toolbar">
|
||||||
<div class="pull-right footer-pager">
|
<div class="pull-right footer-pager">
|
||||||
<!-- ko template: { name: 'Pagenator', data: contactsPagenator } --><!-- /ko -->
|
<!-- ko template: { name: 'Paginator', data: contactsPaginator } --><!-- /ko -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="b-view-content-toolbar btn-toolbar" data-bind="css: {'read-only': viewReadOnly}">
|
<div class="b-view-content-toolbar btn-toolbar" data-bind="css: {'read-only': viewReadOnly}">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue