selector onUpUpOrDownDown event

This commit is contained in:
RainLoop Team 2015-03-31 21:54:11 +04:00
parent bdd92429b0
commit c1c817c837
3 changed files with 17 additions and 9 deletions

View file

@ -401,6 +401,14 @@
return !!(this.oCallbacks['onAutoSelect'] || this.emptyTrueFunction)();
};
/**
* @param {boolean}
*/
Selector.prototype.doUpUpOrDownDown = function (bUp)
{
(this.oCallbacks['onUpUpOrDownDown'] || this.emptyTrueFunction)(!!bUp);
};
/**
* @param {Object} oItem
* @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)
{

View file

@ -255,6 +255,9 @@
return this.useAutoSelect();
}, this));
// this.selector.on('onUpUpOrDownDown', _.bind(function (bV) {
// }, this));
Events
.sub('mailbox.message-list.selector.go-down', function () {
this.selector.goDown(true);

View file

@ -474,15 +474,7 @@
}, this);
this.fullScreenMode.subscribe(function (bValue) {
if (bValue)
{
Globals.$html.addClass('rl-message-fullscreen');
}
else
{
Globals.$html.removeClass('rl-message-fullscreen');
}
Globals.$html.toggleClass('rl-message-fullscreen', bValue);
Utils.windowResize();
});