doc/api/panel/index.html in dfect-1.0.0 vs doc/api/panel/index.html in dfect-1.1.0
- old
+ new
@@ -26,16 +26,24 @@
$('#search').blur(function() {
this.value == '' && $('#search-label').show()
});
$('#search')[0].value == '' && $('#search-label').show();
-
- setInterval(function() { $('#search')[0].value != '' && $('#search-label').hide() }, 100)
}
$(function() {
- placeholder();
- new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
- $('#search').focus();
+ placeholder();
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
+ $('#search').focus();
+
+ var s = window.parent.location.search.match(/\?q=([^&]+)/);
+ if (s) {
+ s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
+ if (s.length > 0)
+ {
+ $('#search').val(s);
+ panel.search(s, true);
+ }
+ }
})
//]]>
</script>
</head>
<body>