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)(); 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)
{ {

View file

@ -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);

View file

@ -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();
}); });