voloko-sdoc 0.2.10.1 → 0.2.11

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: 10
3
+ :patch: 11
4
4
  :major: 0
@@ -73,7 +73,7 @@ class RDoc::Generator::SHtml
73
73
  @options.diagram = false
74
74
  @github_url_cache = {}
75
75
 
76
- template = @options.template || 'shtml'
76
+ template = @options.template || 'direct'
77
77
 
78
78
  templ_dir = self.class.template_dir template
79
79
 
@@ -342,8 +342,9 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
342
342
  this.setNavigationActive(false);
343
343
  }
344
344
 
345
- this.search = function(value) {
345
+ this.search = function(value, selectFirstMatch) {
346
346
  value = jQuery.trim(value).toLowerCase();
347
+ this.selectFirstMatch = selectFirstMatch;
347
348
  if (value) {
348
349
  this.$element.removeClass('panel_tree').addClass('panel_results');
349
350
  this.tree.setNavigationActive(false);
@@ -373,6 +374,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
373
374
  this.firstRun = false;
374
375
  this.$current = $(target.firstChild);
375
376
  this.$current.addClass('current');
377
+ if (this.selectFirstMatch) this.select();
376
378
  scrollIntoView(this.$current[0], this.$view[0])
377
379
  }
378
380
  if (jQuery.browser.msie) this.$element[0].className += '';
@@ -28,13 +28,21 @@
28
28
  });
29
29
 
30
30
  $('#search')[0].value == '' && $('#search-label').show();
31
-
32
- setInterval(function() { $('#search')[0].value != '' && $('#search-label').hide() }, 100)
33
31
  }
34
32
  $(function() {
35
- placeholder();
36
- new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
37
- $('#search').focus();
33
+ placeholder();
34
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
35
+ $('#search').focus();
36
+
37
+ var s = window.parent.location.search.match(/\?q=(.*)$/);
38
+ if (s) {
39
+ s = decodeURIComponent(s[1])
40
+ if (s.length > 0)
41
+ {
42
+ $('#search').val(s);
43
+ panel.search(s, true);
44
+ }
45
+ }
38
46
  })
39
47
  //]]>
40
48
  </script>
@@ -342,8 +342,9 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
342
342
  this.setNavigationActive(false);
343
343
  }
344
344
 
345
- this.search = function(value) {
345
+ this.search = function(value, selectFirstMatch) {
346
346
  value = jQuery.trim(value).toLowerCase();
347
+ this.selectFirstMatch = selectFirstMatch;
347
348
  if (value) {
348
349
  this.$element.removeClass('panel_tree').addClass('panel_results');
349
350
  this.tree.setNavigationActive(false);
@@ -373,6 +374,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
373
374
  this.firstRun = false;
374
375
  this.$current = $(target.firstChild);
375
376
  this.$current.addClass('current');
377
+ if (this.selectFirstMatch) this.select();
376
378
  scrollIntoView(this.$current[0], this.$view[0])
377
379
  }
378
380
  if (jQuery.browser.msie) this.$element[0].className += '';
@@ -28,13 +28,21 @@
28
28
  });
29
29
 
30
30
  $('#search')[0].value == '' && $('#search-label').show();
31
-
32
- setInterval(function() { $('#search')[0].value != '' && $('#search-label').hide() }, 100)
33
31
  }
34
32
  $(function() {
35
- placeholder();
36
- new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
37
- $('#search').focus();
33
+ placeholder();
34
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
35
+ $('#search').focus();
36
+
37
+ var s = window.parent.location.search.match(/\?q=(.*)$/);
38
+ if (s) {
39
+ s = decodeURIComponent(s[1])
40
+ if (s.length > 0)
41
+ {
42
+ $('#search').val(s);
43
+ panel.search(s, true);
44
+ }
45
+ }
38
46
  })
39
47
  //]]>
40
48
  </script>
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.10.1
4
+ version: 0.2.11
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-17 00:00:00 -07:00
12
+ date: 2009-04-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency