sinatra-hexacta 0.3.18 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac08e6f3611186e3358b6d589bf917b392355b63cf6a83de7045e15ebeb87bff
|
4
|
+
data.tar.gz: e716ed84725768f317c4f7cca68948a519bbd486c39b4e4d98e9ce73bf23bafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bfa56f2d305905bfb72d4686fc82e98bba43a03e575b11c214068d690255c86390d7f0576195b93c1d54576a0e6cd5333d5ce363eb2256351a93a1715f77cbb
|
7
|
+
data.tar.gz: acd090509d47ee8ac5a00ad1e5b9583ac9b24e677a1c27858a786954e917530d857f94aa49818539f68f4f727fca7d4ac4cb1f009ad38867a9d200f53cf92944
|
@@ -11247,10 +11247,6 @@ body:not(.sw-toggled) #sidebar {
|
|
11247
11247
|
}
|
11248
11248
|
}
|
11249
11249
|
|
11250
|
-
.listview.lv-lg .lv-item:hover {
|
11251
|
-
background-color: #FFFFDB;
|
11252
|
-
}
|
11253
|
-
|
11254
11250
|
.listview .lv-item {
|
11255
11251
|
position: relative;
|
11256
11252
|
display: block;
|
@@ -16359,4 +16355,35 @@ svg.ct-chart-bar, svg.ct-chart-line{
|
|
16359
16355
|
.ct-legend .ct-series-14:before {
|
16360
16356
|
background-color: #a748ca;
|
16361
16357
|
border-color: #a748ca;
|
16362
|
-
}
|
16358
|
+
}
|
16359
|
+
|
16360
|
+
/* HEADER RESULTS */
|
16361
|
+
|
16362
|
+
#header .results {
|
16363
|
+
display:block;
|
16364
|
+
position: absolute;
|
16365
|
+
width: 500px;
|
16366
|
+
background: white;
|
16367
|
+
margin-left: 20px;
|
16368
|
+
margin-top: 5px;
|
16369
|
+
border-radius: 2px;
|
16370
|
+
overflow: auto;
|
16371
|
+
max-height: 0px;
|
16372
|
+
opacity: 0;
|
16373
|
+
-webkit-transition: all 0.2s ease-in-out;
|
16374
|
+
-o-transition: all 0.2s ease-in-out;
|
16375
|
+
transition: all 0.2s ease-in-out;
|
16376
|
+
}
|
16377
|
+
#header .results.toggled {
|
16378
|
+
opacity: 1;
|
16379
|
+
max-height: 400px;
|
16380
|
+
}
|
16381
|
+
|
16382
|
+
.progressive {
|
16383
|
+
animation: load 5s cubic-bezier(0.165, 0.840, 0.440, 1.000) forwards;
|
16384
|
+
}
|
16385
|
+
|
16386
|
+
@keyframes load {
|
16387
|
+
0% { width: 0; }
|
16388
|
+
100% { width: 100%; }
|
16389
|
+
}
|
Binary file
|
@@ -0,0 +1,75 @@
|
|
1
|
+
class Finder {
|
2
|
+
|
3
|
+
static find(query){
|
4
|
+
$.ajax({
|
5
|
+
url: "/find",
|
6
|
+
type: 'GET',
|
7
|
+
data: { query: query }
|
8
|
+
}).done(function(result) {
|
9
|
+
$("#header .results").html(result);
|
10
|
+
});
|
11
|
+
}
|
12
|
+
|
13
|
+
static do_find(url,query,html){
|
14
|
+
$.ajax({
|
15
|
+
url: url,
|
16
|
+
type: 'GET',
|
17
|
+
data: { query: query }
|
18
|
+
}).done(function(result) {
|
19
|
+
$(html).html(result);
|
20
|
+
});
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
var header_input_timeout = null;
|
25
|
+
|
26
|
+
$('#header input').keyup(function() {
|
27
|
+
clearTimeout(header_input_timeout);
|
28
|
+
|
29
|
+
if($('#header input').val().length > 2 && $.trim($('#header input').val())) {
|
30
|
+
header_input_timeout = setTimeout(function() {
|
31
|
+
$.xhrPool.abortAll();
|
32
|
+
Finder.find($('#header input').val());
|
33
|
+
}, 500);
|
34
|
+
}
|
35
|
+
});
|
36
|
+
|
37
|
+
$.xhrPool = [];
|
38
|
+
|
39
|
+
$.xhrPool.abortAll = function() {
|
40
|
+
$(this).each(function(idx, jqXHR) {
|
41
|
+
jqXHR.abort();
|
42
|
+
});
|
43
|
+
$(this).each(function(idx, jqXHR) {
|
44
|
+
var index = $.inArray(jqXHR, $.xhrPool);
|
45
|
+
if (index > -1) {
|
46
|
+
$.xhrPool.splice(index, 1);
|
47
|
+
}
|
48
|
+
});
|
49
|
+
};
|
50
|
+
|
51
|
+
$.ajaxSetup({
|
52
|
+
beforeSend: function(jqXHR) {
|
53
|
+
$.xhrPool.push(jqXHR);
|
54
|
+
},
|
55
|
+
complete: function(jqXHR) {
|
56
|
+
var index = $.inArray(jqXHR, $.xhrPool);
|
57
|
+
if (index > -1) {
|
58
|
+
$.xhrPool.splice(index, 1);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
});
|
62
|
+
|
63
|
+
$(document).ready(function(){
|
64
|
+
|
65
|
+
$("#header input").focusin(function() {
|
66
|
+
$("#header .results").addClass("toggled");
|
67
|
+
})
|
68
|
+
$("#header input").focusout(function() {
|
69
|
+
$("#header .results").removeClass("toggled");
|
70
|
+
})
|
71
|
+
$('#header .results').click(function() {
|
72
|
+
$("#header input").focus();
|
73
|
+
});
|
74
|
+
|
75
|
+
});
|
@@ -6,3 +6,4 @@ script src="/sinatra-hexacta/vendors/chartist/chartist.min.js"
|
|
6
6
|
script src="/sinatra-hexacta/vendors/chartist/chartist-plugin-legend.js"
|
7
7
|
|
8
8
|
script src="/sinatra-hexacta/js/app.js?ver=#{settings.version}" type='text/javascript'
|
9
|
+
script src="/sinatra-hexacta/js/finder.js?ver=#{settings.version}" type='text/javascript'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -110,10 +110,11 @@ files:
|
|
110
110
|
- lib/sinatra/public/fonts/roboto/Roboto-Thin-webfont.svg
|
111
111
|
- lib/sinatra/public/fonts/roboto/Roboto-Thin-webfont.ttf
|
112
112
|
- lib/sinatra/public/fonts/roboto/Roboto-Thin-webfont.woff
|
113
|
+
- lib/sinatra/public/img/finder.jpg
|
113
114
|
- lib/sinatra/public/img/select.png
|
114
115
|
- lib/sinatra/public/img/select@2x.png
|
115
116
|
- lib/sinatra/public/js/app.js
|
116
|
-
- lib/sinatra/public/js/
|
117
|
+
- lib/sinatra/public/js/finder.js
|
117
118
|
- lib/sinatra/public/vendors/animate.css/animate.min.css
|
118
119
|
- lib/sinatra/public/vendors/bootstrap-validator/validator.js
|
119
120
|
- lib/sinatra/public/vendors/bootstrap/bootstrap.min.js
|
@@ -1,29 +0,0 @@
|
|
1
|
-
|
2
|
-
$(':input[required]').each(function() {
|
3
|
-
console.log($(this).val());
|
4
|
-
if ($(this).val() == "" || $(this).val() == null) {
|
5
|
-
$(this).parent().removeClass("has-success");
|
6
|
-
$(this).parent().addClass("has-error");
|
7
|
-
} else {
|
8
|
-
$(this).parent().removeClass("has-error");
|
9
|
-
$(this).parent().addClass("has-success");
|
10
|
-
}
|
11
|
-
})
|
12
|
-
|
13
|
-
|
14
|
-
$(function() { //shorthand document.ready function
|
15
|
-
$('form').on('submit', function(e) { //use on if jQuery 1.7+
|
16
|
-
$(this).find(':input[required]').each(function() {
|
17
|
-
if ($(this).val() == "" || $(this).val() == null) {
|
18
|
-
$(this).parent().removeClass("success");
|
19
|
-
$(this).parent().addClass("error");
|
20
|
-
} else {
|
21
|
-
$(this).parent().removeClass("error");
|
22
|
-
$(this).parent().addClass("success");
|
23
|
-
}
|
24
|
-
})
|
25
|
-
if ($(this).find(':input[required]').length > 0) {
|
26
|
-
e.preventDefault();
|
27
|
-
}
|
28
|
-
});
|
29
|
-
});
|