mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
selector onUpUpOrDownDown event
This commit is contained in:
parent
bdd92429b0
commit
c1c817c837
3 changed files with 17 additions and 9 deletions
|
|
@ -401,6 +401,14 @@
|
||||||
return !!(this.oCallbacks['onAutoSelect'] || this.emptyTrueFunction)();
|
return !!(this.oCallbacks['onAutoSelect'] || this.emptyTrueFunction)();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean}
|
||||||
|
*/
|
||||||
|
Selector.prototype.doUpUpOrDownDown = function (bUp)
|
||||||
|
{
|
||||||
|
(this.oCallbacks['onUpUpOrDownDown'] || this.emptyTrueFunction)(!!bUp);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} oItem
|
* @param {Object} oItem
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
|
|
@ -484,6 +492,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!oResult && bForceSelect && (Enums.EventKeyCode.Down === iEventKeyCode || Enums.EventKeyCode.Up === iEventKeyCode))
|
||||||
|
{
|
||||||
|
this.doUpUpOrDownDown(Enums.EventKeyCode.Up === iEventKeyCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (Enums.EventKeyCode.Home === iEventKeyCode || Enums.EventKeyCode.End === iEventKeyCode)
|
else if (Enums.EventKeyCode.Home === iEventKeyCode || Enums.EventKeyCode.End === iEventKeyCode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,9 @@
|
||||||
return this.useAutoSelect();
|
return this.useAutoSelect();
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
|
// this.selector.on('onUpUpOrDownDown', _.bind(function (bV) {
|
||||||
|
// }, this));
|
||||||
|
|
||||||
Events
|
Events
|
||||||
.sub('mailbox.message-list.selector.go-down', function () {
|
.sub('mailbox.message-list.selector.go-down', function () {
|
||||||
this.selector.goDown(true);
|
this.selector.goDown(true);
|
||||||
|
|
|
||||||
|
|
@ -474,15 +474,7 @@
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.fullScreenMode.subscribe(function (bValue) {
|
this.fullScreenMode.subscribe(function (bValue) {
|
||||||
if (bValue)
|
Globals.$html.toggleClass('rl-message-fullscreen', bValue);
|
||||||
{
|
|
||||||
Globals.$html.addClass('rl-message-fullscreen');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Globals.$html.removeClass('rl-message-fullscreen');
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils.windowResize();
|
Utils.windowResize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue