voloko-sdoc 0.2.11.1 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 2
3
- :patch: 11
3
+ :patch: 12
4
4
  :major: 0
@@ -37,28 +37,33 @@ Searchdoc.Navigation = new function() {
37
37
  if (!this.navigationActive) return;
38
38
  switch(e.keyCode) {
39
39
  case 37: //Event.KEY_LEFT:
40
- if (this.moveLeft())
41
- e.preventDefault();
40
+ if (this.moveLeft()) e.preventDefault();
42
41
  break;
43
42
  case 38: //Event.KEY_UP:
44
- if (this.moveUp())
45
- e.preventDefault();
46
- this.startMoveTimeout(false);
43
+ case 73: // i
44
+ case 67: // c (dvorak)
45
+ if (e.keyCode == 38 || e.ctrlKey) {
46
+ if (this.moveUp()) e.preventDefault();
47
+ this.startMoveTimeout(false);
48
+ }
47
49
  break;
48
50
  case 39: //Event.KEY_RIGHT:
49
- if (this.moveRight())
50
- e.preventDefault();
51
+ if (this.moveRight()) e.preventDefault();
51
52
  break;
52
53
  case 40: //Event.KEY_DOWN:
53
- if (this.moveDown())
54
- e.preventDefault();
55
- this.startMoveTimeout(true);
54
+ case 75: // k
55
+ case 84: // t (dvorak)
56
+ if (e.keyCode == 40 || e.ctrlKey) {
57
+ if (this.moveDown()) e.preventDefault();
58
+ this.startMoveTimeout(true);
59
+ }
56
60
  break;
57
61
  case 9: //Event.KEY_TAB:
58
62
  case 13: //Event.KEY_RETURN:
59
63
  if (this.$current) this.select(this.$current);
60
64
  break;
61
65
  }
66
+ if (e.ctrlKey && e.shiftKey) this.select(this.$current);
62
67
  }
63
68
 
64
69
  this.clearMoveTimeout = function() {
@@ -464,10 +469,14 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
464
469
  }
465
470
 
466
471
  this.select = function($li) {
472
+ this.highlight($li);
467
473
  var path = $li[0].searchdoc_tree_data.path;
474
+ if (path) this.panel.open(path);
475
+ }
476
+
477
+ this.highlight = function($li) {
468
478
  if (this.$current) this.$current.removeClass('current');
469
479
  this.$current = $li.addClass('current');
470
- if (path) this.panel.open(path);
471
480
  }
472
481
 
473
482
  this.toggle = function($li) {
@@ -481,7 +490,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
481
490
 
482
491
  this.moveRight = function() {
483
492
  if (!this.$current) {
484
- this.select(this.$list.find('li:first'));
493
+ this.highlight(this.$list.find('li:first'));
485
494
  return;
486
495
  }
487
496
  if (this.$current.hasClass('closed')) {
@@ -491,7 +500,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
491
500
 
492
501
  this.moveLeft = function() {
493
502
  if (!this.$current) {
494
- this.select(this.$list.find('li:first'));
503
+ this.highlight(this.$list.find('li:first'));
495
504
  return;
496
505
  }
497
506
  if (!this.$current.hasClass('closed')) {
@@ -509,7 +518,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
509
518
 
510
519
  this.move = function(isDown) {
511
520
  if (!this.$current) {
512
- this.select(this.$list.find('li:first'));
521
+ this.highlight(this.$list.find('li:first'));
513
522
  return true;
514
523
  }
515
524
  var next = this.$current[0];
@@ -37,28 +37,33 @@ Searchdoc.Navigation = new function() {
37
37
  if (!this.navigationActive) return;
38
38
  switch(e.keyCode) {
39
39
  case 37: //Event.KEY_LEFT:
40
- if (this.moveLeft())
41
- e.preventDefault();
40
+ if (this.moveLeft()) e.preventDefault();
42
41
  break;
43
42
  case 38: //Event.KEY_UP:
44
- if (this.moveUp())
45
- e.preventDefault();
46
- this.startMoveTimeout(false);
43
+ case 73: // i
44
+ case 67: // c (dvorak)
45
+ if (e.keyCode == 38 || e.ctrlKey) {
46
+ if (this.moveUp()) e.preventDefault();
47
+ this.startMoveTimeout(false);
48
+ }
47
49
  break;
48
50
  case 39: //Event.KEY_RIGHT:
49
- if (this.moveRight())
50
- e.preventDefault();
51
+ if (this.moveRight()) e.preventDefault();
51
52
  break;
52
53
  case 40: //Event.KEY_DOWN:
53
- if (this.moveDown())
54
- e.preventDefault();
55
- this.startMoveTimeout(true);
54
+ case 75: // k
55
+ case 84: // t (dvorak)
56
+ if (e.keyCode == 40 || e.ctrlKey) {
57
+ if (this.moveDown()) e.preventDefault();
58
+ this.startMoveTimeout(true);
59
+ }
56
60
  break;
57
61
  case 9: //Event.KEY_TAB:
58
62
  case 13: //Event.KEY_RETURN:
59
63
  if (this.$current) this.select(this.$current);
60
64
  break;
61
65
  }
66
+ if (e.ctrlKey && e.shiftKey) this.select(this.$current);
62
67
  }
63
68
 
64
69
  this.clearMoveTimeout = function() {
@@ -464,10 +469,14 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
464
469
  }
465
470
 
466
471
  this.select = function($li) {
472
+ this.highlight($li);
467
473
  var path = $li[0].searchdoc_tree_data.path;
474
+ if (path) this.panel.open(path);
475
+ }
476
+
477
+ this.highlight = function($li) {
468
478
  if (this.$current) this.$current.removeClass('current');
469
479
  this.$current = $li.addClass('current');
470
- if (path) this.panel.open(path);
471
480
  }
472
481
 
473
482
  this.toggle = function($li) {
@@ -481,7 +490,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
481
490
 
482
491
  this.moveRight = function() {
483
492
  if (!this.$current) {
484
- this.select(this.$list.find('li:first'));
493
+ this.highlight(this.$list.find('li:first'));
485
494
  return;
486
495
  }
487
496
  if (this.$current.hasClass('closed')) {
@@ -491,7 +500,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
491
500
 
492
501
  this.moveLeft = function() {
493
502
  if (!this.$current) {
494
- this.select(this.$list.find('li:first'));
503
+ this.highlight(this.$list.find('li:first'));
495
504
  return;
496
505
  }
497
506
  if (!this.$current.hasClass('closed')) {
@@ -509,7 +518,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
509
518
 
510
519
  this.move = function(isDown) {
511
520
  if (!this.$current) {
512
- this.select(this.$list.find('li:first'));
521
+ this.highlight(this.$list.find('li:first'));
513
522
  return true;
514
523
  }
515
524
  var next = this.$current[0];
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voloko-sdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11.1
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Kolesnikov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-21 00:00:00 -07:00
12
+ date: 2009-04-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency