Skip to content

Commit

Permalink
Fix dropdowns (#1540)
Browse files Browse the repository at this point in the history
  • Loading branch information
berggren authored Dec 17, 2020
1 parent b5776d5 commit 00208bf
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 31 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion timesketch/frontend/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta name=csrf-token content="{{ csrf_token() }}"><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/dist/favicon.ico><title>Timesketch</title><link href=/dist/css/chunk-common.749c38af.css rel=preload as=style><link href=/dist/css/chunk-vendors.4a602e4f.css rel=preload as=style><link href=/dist/js/chunk-common.1562d3f9.js rel=preload as=script><link href=/dist/js/chunk-vendors.f0ee5ca0.js rel=preload as=script><link href=/dist/js/index.0c45ccdf.js rel=preload as=script><link href=/dist/css/chunk-vendors.4a602e4f.css rel=stylesheet><link href=/dist/css/chunk-common.749c38af.css rel=stylesheet></head><body><div id=app></div><script src=/dist/js/chunk-vendors.f0ee5ca0.js></script><script src=/dist/js/chunk-common.1562d3f9.js></script><script src=/dist/js/index.0c45ccdf.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta name=csrf-token content="{{ csrf_token() }}"><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/dist/favicon.ico><title>Timesketch</title><link href=/dist/css/chunk-common.f83adf06.css rel=preload as=style><link href=/dist/css/chunk-vendors.4a602e4f.css rel=preload as=style><link href=/dist/js/chunk-common.ead7bca0.js rel=preload as=script><link href=/dist/js/chunk-vendors.f0ee5ca0.js rel=preload as=script><link href=/dist/js/index.0c45ccdf.js rel=preload as=script><link href=/dist/css/chunk-vendors.4a602e4f.css rel=stylesheet><link href=/dist/css/chunk-common.f83adf06.css rel=stylesheet></head><body><div id=app></div><script src=/dist/js/chunk-vendors.f0ee5ca0.js></script><script src=/dist/js/chunk-common.ead7bca0.js></script><script src=/dist/js/index.0c45ccdf.js></script></body></html>
2 changes: 0 additions & 2 deletions timesketch/frontend/dist/js/chunk-common.1562d3f9.js

This file was deleted.

1 change: 0 additions & 1 deletion timesketch/frontend/dist/js/chunk-common.1562d3f9.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions timesketch/frontend/dist/js/chunk-common.ead7bca0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions timesketch/frontend/dist/js/chunk-common.ead7bca0.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion timesketch/frontend/dist/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
.card-content {
justify-content: center;
align-items: center;
}</style><link href=/dist/css/chunk-common.749c38af.css rel=preload as=style><link href=/dist/css/chunk-vendors.4a602e4f.css rel=preload as=style><link href=/dist/js/chunk-common.1562d3f9.js rel=preload as=script><link href=/dist/js/chunk-vendors.f0ee5ca0.js rel=preload as=script><link href=/dist/js/login.c1fa2383.js rel=preload as=script><link href=/dist/css/chunk-vendors.4a602e4f.css rel=stylesheet><link href=/dist/css/chunk-common.749c38af.css rel=stylesheet></head><body class=login-page><div class=columns><div class=column><div class="card is-wide has-text-centered"><div class=card-content><div class=content><div><img src=/dist/timesketch-color.png style=width:40px;><div style="font-size: 1.5em;">time<b>sketch</b></div><div style="font-size: 0.8em;">Digital Forensic Timeline Analysis</div></div><br><form method=post style="width:50%;margin-left: auto; margin-right: auto;"><div class=field><div class=control><input type=text class=input name=username placeholder=Username style=text-align:center;></div></div><div class=field><div class=control><input type=password class=input name=password placeholder=Password style=text-align:center;></div></div><div class=field><div class="control has-text-centered"><button type=submit class="button is-rounded is-wide is-info" style=width:100%;>Sign in</button></div></div>{{ form.csrf_token }}</form></div></div></div></div></div><script src=/dist/js/chunk-vendors.f0ee5ca0.js></script><script src=/dist/js/chunk-common.1562d3f9.js></script><script src=/dist/js/login.c1fa2383.js></script></body></html>
}</style><link href=/dist/css/chunk-common.f83adf06.css rel=preload as=style><link href=/dist/css/chunk-vendors.4a602e4f.css rel=preload as=style><link href=/dist/js/chunk-common.ead7bca0.js rel=preload as=script><link href=/dist/js/chunk-vendors.f0ee5ca0.js rel=preload as=script><link href=/dist/js/login.c1fa2383.js rel=preload as=script><link href=/dist/css/chunk-vendors.4a602e4f.css rel=stylesheet><link href=/dist/css/chunk-common.f83adf06.css rel=stylesheet></head><body class=login-page><div class=columns><div class=column><div class="card is-wide has-text-centered"><div class=card-content><div class=content><div><img src=/dist/timesketch-color.png style=width:40px;><div style="font-size: 1.5em;">time<b>sketch</b></div><div style="font-size: 0.8em;">Digital Forensic Timeline Analysis</div></div><br><form method=post style="width:50%;margin-left: auto; margin-right: auto;"><div class=field><div class=control><input type=text class=input name=username placeholder=Username style=text-align:center;></div></div><div class=field><div class=control><input type=password class=input name=password placeholder=Password style=text-align:center;></div></div><div class=field><div class="control has-text-centered"><button type=submit class="button is-rounded is-wide is-info" style=width:100%;>Sign in</button></div></div>{{ form.csrf_token }}</form></div></div></div></div></div><script src=/dist/js/chunk-vendors.f0ee5ca0.js></script><script src=/dist/js/chunk-common.ead7bca0.js></script><script src=/dist/js/login.c1fa2383.js></script></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,28 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<template>
<div class="dropdown" v-bind:class="{'is-active': dropdownActive}">
<div class="dropdown-trigger">
<a class="button" v-bind:class="{'is-rounded': isRounded}" aria-haspopup="true" aria-controls="dropdown-menu" v-on:click="dropdownActive = !dropdownActive">
<span>{{ title || 'Aggregations' }}</span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</div>
<div class="dropdown-menu" id="dropdown-menu" role="menu">
<div class="dropdown-content">
<b-dropdown ref="dropdown" animation="none" aria-role="menu" append-to-body>
<a class="button" v-bind:class="{ 'is-rounded': isRounded}" slot="trigger">
<span>+ Aggregation</span>
<b-icon :icon="active ? 'chevron-up' : 'chevron-down'" style="font-size: 0.6em;"></b-icon>
</a>
<div class="modal-card" style="width:500px;color: var(--font-color-dark);">
<section class="modal-card-body">
<span class="dropdown-item" v-if="aggregations && aggregations.length < 1">No saved aggregations</span>
<a class="dropdown-item" v-on:click="setActiveAggregation(agg)" v-for="agg in aggregations" :key="agg.id">
<span>{{ agg.name }}</span>
</a>
</div>
</section>
</div>
</div>
</b-dropdown>
</template>

<script>
export default {
props: ['isRounded', 'title', 'aggregations'],
data () {
return {
dropdownActive: false
}
},
props: ['isRounded', 'aggregations'],
methods: {
setActiveAggregation: function (aggregation) {
this.$emit('addAggregation', aggregation)
this.viewListDropdownActive = false
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend/src/components/Sketch/EventListRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ limitations under the License.
<i class="fas fa-search" style="color: #d3d3d3;"></i>
</span>
<span class="icon control">
<b-dropdown ref="labelDropdown" aria-role="list">
<b-dropdown ref="labelDropdown" aria-role="list" append-to-body>
<i class="fas fa-tag" style="color: #d3d3d3;" slot="trigger"></i>
<div class="modal-card" style="width:300px;color: var(--font-color-dark);">
<section class="modal-card-body">
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend/src/components/Sketch/Graph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
<header class="card-header" style="border-bottom: 0;">

<div v-if="currentGraph">
<b-dropdown aria-role="list">
<b-dropdown aria-role="list" append-to-body>

<a class="button ts-search-dropdown" style="background-color: transparent;" slot="trigger" slot-scope="{ active }">
<span class="icon is-small" style="margin-right: 10px; margin-top:2px; font-size: 0.6em;">
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend/src/views/SketchExplore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ limitations under the License.
</div>
<div class="level-item">
<div v-if="eventList.objects.length">
<b-dropdown position="is-bottom-left" aria-role="menu" trap-focus :can-close="true">
<b-dropdown position="is-bottom-left" aria-role="menu" trap-focus append-to-body :can-close="true">
<button class="button is-outlined is-small" style="border-radius: 4px;" slot="trigger">
<span class="icon is-small">
<i class="fas fa-table"></i>
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend/src/views/SketchOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ limitations under the License.
</a>
</b-tooltip>

<b-dropdown v-if="meta.permissions.write" aria-role="list" position="is-bottom-left">
<b-dropdown v-if="meta.permissions.write" aria-role="list" append-to-body position="is-bottom-left">
<a class="button ts-dropdown-button" style="background:transparent;border:none;" slot="trigger" slot-scope="{ active }">
<span class="icon is-small">
<i :class="active ? 'fas fa-angle-up' : 'fas fa-angle-down'"></i>
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend/src/views/SketchStoryContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ limitations under the License.
<ts-view-list-dropdown @setActiveView="addViewComponent($event, index)" :is-simple="true" :title="'+ Saved search'"></ts-view-list-dropdown>
</p>
<p class="control" v-if="allAggregations">
<ts-aggregation-list-dropdown @addAggregation="addAggregationComponent($event, index)" :is-rounded="true" :title="'+ Aggregation'" :aggregations="allAggregations" ></ts-aggregation-list-dropdown>
<ts-aggregation-list-dropdown @addAggregation="addAggregationComponent($event, index)" :is-rounded="true" :aggregations="allAggregations" ></ts-aggregation-list-dropdown>
</p>
</div>
</div>
Expand Down

0 comments on commit 00208bf

Please sign in to comment.