sinatra-hexacta 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/public/js/finder.js +9 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728aa24903dfacd5848f5cf2fc1f88927f658951a69a5f92ef691851c42cd856
|
4
|
+
data.tar.gz: e80174daa95bb53cd75ad0478d96fde0ebbbb7616e2da79a6b52ec04378be60e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad49dbe7dcf2d8b4863455ba676313a8963b5569a322e73e5e1401db20d4a8b537b32827ede670c228673a10a4d2c50e703d60e785f79b76dcdb3c3effb043d
|
7
|
+
data.tar.gz: 5d9a06abb2fce33e637f5a9b436139d6c466e6992ad6aa937ff5fc90025e567581db96000e5a6dab8ae264c48135619a51e20e41e343b49f2b9058e9bf1df8b4
|
@@ -21,6 +21,7 @@ class Finder {
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
|
24
|
+
var last_query = null;
|
24
25
|
var header_input_timeout = null;
|
25
26
|
$.xhrPool = [];
|
26
27
|
|
@@ -59,15 +60,20 @@ $(document).ready(function(){
|
|
59
60
|
$('#header .results').click(function() {
|
60
61
|
$("#header input").focus();
|
61
62
|
});
|
62
|
-
|
63
63
|
$('#header input').keyup(function() {
|
64
64
|
clearTimeout(header_input_timeout);
|
65
65
|
|
66
66
|
if($('#header input').val().length > 2 && $.trim($('#header input').val())) {
|
67
67
|
header_input_timeout = setTimeout(function() {
|
68
68
|
$.xhrPool.abortAll();
|
69
|
-
|
70
|
-
|
69
|
+
if (last_query != $.trim($('#header input').val())) {
|
70
|
+
last_query = $.trim($('#header input').val());
|
71
|
+
console.log(last_query);
|
72
|
+
if (last_query.length > 2) {
|
73
|
+
Finder.find(last_query);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}, 1000);
|
71
77
|
}
|
72
78
|
});
|
73
79
|
});
|