File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1
1
var Fuse = require ( 'fuse.js' ) ;
2
- var mocks = require ( './mocks .json' ) ;
2
+ var mocks = require ( '../../build/test_dashboard_mocks .json' ) ;
3
3
4
4
5
5
// Our gracious testing object
@@ -127,6 +127,7 @@ var f = new Fuse(mocks, {
127
127
128
128
var searchBar = document . getElementById ( 'mocks-search' ) ;
129
129
var mocksList = document . getElementById ( 'mocks-list' ) ;
130
+ var plotArea = document . getElementById ( 'plots' ) ;
130
131
131
132
searchBar . addEventListener ( 'keyup' , function ( e ) {
132
133
@@ -148,15 +149,11 @@ searchBar.addEventListener('keyup', function(e) {
148
149
// Clear plots and plot selected.
149
150
Tabs . purge ( ) ;
150
151
Tabs . plotMock ( r . file . slice ( 0 , - 5 ) ) ;
151
-
152
- // Clear results.
153
- while ( mocksList . firstChild ) {
154
- mocksList . removeChild ( mocksList . firstChild ) ;
155
- }
156
-
157
- e . target . value = '' ;
158
152
} ) ;
159
153
160
154
mocksList . appendChild ( result ) ;
155
+
156
+ var listWidth = mocksList . getBoundingClientRect . width ;
157
+ plotArea . setAttribute ( 'width' , window . innerWidth - listWidth ) ;
161
158
} ) ;
162
159
} ) ;
Original file line number Diff line number Diff line change 1
1
html , body {
2
2
margin : 0 ;
3
- padding : 0 ;
3
+ padding : 40 px 0 0 0 ;
4
4
font-family : helvetica, arial, sans-serif;
5
+ background-color : # fafafa ;
5
6
}
6
7
header {
8
+ position : fixed;
9
+ top : 0 ;
7
10
height : 40px ;
11
+ width : 100% ;
8
12
border-bottom : 1px solid # 4983EC ;
13
+ background-color : # ffffff ;
14
+ z-index : 100000 ;
9
15
}
10
16
header img {
11
17
height : 100% ;
@@ -28,14 +34,16 @@ header span{
28
34
line-height : 40px ;
29
35
}
30
36
# mocks-list {
31
- position : absolute ;
37
+ position : fixed ;
32
38
right : 0px ;
33
39
top : 40px ;
40
+ bottom : 0px ;
34
41
z-index : 100000 ;
35
42
background-color : # fff ;
36
43
border-left : 1px solid # 4983EC ;
37
44
border-bottom : 1px solid # 4983EC ;
38
45
border-top : 1px solid # 4983EC ;
46
+ overflow : scroll;
39
47
}
40
48
.search-result {
41
49
display : block;
@@ -48,6 +56,9 @@ header span{
48
56
color : # fff ;
49
57
background-color : # 4983EC ;
50
58
}
59
+ # plots {
60
+ width : 100% ;
61
+ }
51
62
.dashboard-plot {
52
63
margin-bottom : 30px ;
53
64
max-width : 940px ;
You can’t perform that action at this time.
0 commit comments