1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update rdoc version from 5.0.0 to 5.0.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@67781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2019-08-27 12:55:42 +00:00
parent 1501268370
commit 03c737f357
8 changed files with 98 additions and 185 deletions

View file

@ -10,10 +10,8 @@ Navigation = new function() {
this.initNavigation = function() {
var _this = this;
$(document).keydown(function(e) {
document.addEventListener('keydown', function(e) {
_this.onkeydown(e);
}).keyup(function(e) {
_this.onkeyup(e);
});
this.navigationActive = true;
@ -21,20 +19,6 @@ Navigation = new function() {
this.setNavigationActive = function(state) {
this.navigationActive = state;
this.clearMoveTimeout();
}
this.onkeyup = function(e) {
if (!this.navigationActive) return;
switch(e.keyCode) {
case 37: //Event.KEY_LEFT:
case 38: //Event.KEY_UP:
case 39: //Event.KEY_RIGHT:
case 40: //Event.KEY_DOWN:
this.clearMoveTimeout();
break;
}
}
this.onkeydown = function(e) {
@ -46,7 +30,6 @@ Navigation = new function() {
case 38: //Event.KEY_UP:
if (e.keyCode == 38 || e.ctrlKey) {
if (this.moveUp()) e.preventDefault();
this.startMoveTimeout(false);
}
break;
case 39: //Event.KEY_RIGHT:
@ -55,34 +38,15 @@ Navigation = new function() {
case 40: //Event.KEY_DOWN:
if (e.keyCode == 40 || e.ctrlKey) {
if (this.moveDown()) e.preventDefault();
this.startMoveTimeout(true);
}
break;
case 13: //Event.KEY_RETURN:
if (this.$current)
if (this.current)
e.preventDefault();
this.select(this.$current);
this.select(this.current);
break;
}
if (e.ctrlKey && e.shiftKey) this.select(this.$current);
}
this.clearMoveTimeout = function() {
clearTimeout(this.moveTimeout);
this.moveTimeout = null;
}
this.startMoveTimeout = function(isDown) {
if (!$.browser.mozilla && !$.browser.opera) return;
if (this.moveTimeout) this.clearMoveTimeout();
var _this = this;
var go = function() {
if (!_this.moveTimeout) return;
_this[isDown ? 'moveDown' : 'moveUp']();
_this.moveTimout = setTimeout(go, 100);
}
this.moveTimeout = setTimeout(go, 200);
if (e.ctrlKey && e.shiftKey) this.select(this.current);
}
this.moveRight = function() {