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 11var Fuse = require('fuse.js');
2- var mocks = require('./mocks .json');
2+ var mocks = require('../../build/test_dashboard_mocks .json');
33
44
55// Our gracious testing object
@@ -127,6 +127,7 @@ var f = new Fuse(mocks, {
127127
128128var searchBar = document.getElementById('mocks-search');
129129var mocksList = document.getElementById('mocks-list');
130+ var plotArea = document.getElementById('plots');
130131
131132searchBar.addEventListener('keyup', function(e) {
132133
@@ -148,15 +149,11 @@ searchBar.addEventListener('keyup', function(e) {
148149 // Clear plots and plot selected.
149150 Tabs.purge();
150151 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 = '';
158152 });
159153
160154 mocksList.appendChild(result);
155+
156+ var listWidth = mocksList.getBoundingClientRect.width;
157+ plotArea.setAttribute('width', window.innerWidth - listWidth);
161158 });
162159});
Original file line number Diff line number Diff line change 11html, body{
22 margin: 0;
3- padding: 0;
3+ padding: 40px 0 0 0;
44 font-family: helvetica, arial, sans-serif;
5+ background-color: #fafafa;
56}
67header{
8+ position: fixed;
9+ top: 0;
710 height: 40px;
11+ width: 100%;
812 border-bottom: 1px solid #4983EC;
13+ background-color: #ffffff;
14+ z-index: 100000;
915}
1016header img{
1117 height: 100%;
@@ -28,14 +34,16 @@ header span{
2834 line-height: 40px;
2935}
3036#mocks-list{
31- position: absolute ;
37+ position: fixed ;
3238 right: 0px;
3339 top: 40px;
40+ bottom: 0px;
3441 z-index: 100000;
3542 background-color: #fff;
3643 border-left: 1px solid #4983EC;
3744 border-bottom: 1px solid #4983EC;
3845 border-top: 1px solid #4983EC;
46+ overflow: scroll;
3947}
4048.search-result{
4149 display: block;
@@ -48,6 +56,9 @@ header span{
4856 color: #fff;
4957 background-color: #4983EC;
5058}
59+ #plots{
60+ width: 100%;
61+ }
5162.dashboard-plot{
5263 margin-bottom: 30px;
5364 max-width: 940px;
You can’t perform that action at this time.
0 commit comments