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 +1 -1
- data/lib/sdoc/generator/shtml.rb +1 -1
- data/lib/sdoc/generator/template/direct/resources/js/searchdoc.js +3 -1
- data/lib/sdoc/generator/template/direct/resources/panel/index.html +13 -5
- data/lib/sdoc/generator/template/shtml/resources/js/searchdoc.js +3 -1
- data/lib/sdoc/generator/template/shtml/resources/panel/index.html +13 -5
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/sdoc/generator/shtml.rb
CHANGED
@@ -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
|
-
|
36
|
-
|
37
|
-
|
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
|
-
|
36
|
-
|
37
|
-
|
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.
|
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-
|
12
|
+
date: 2009-04-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|