Skip to content

Commit

Permalink
job-form dropdown selection - keyboard navigation and auto-completion (
Browse files Browse the repository at this point in the history
…fix #23)
  • Loading branch information
ansibleguy committed Mar 5, 2024
1 parent 8c1b3df commit 1df76d5
Show file tree
Hide file tree
Showing 7 changed files with 227 additions and 74 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

## Version 0

### 0.0.14
### 0.0.16

* Job-Form Selection
* Auto-Completion via Tab-Key
* Select using Up/Down/Enter Keys

----

### 0.0.14 / 0.0.15

* SQLite connection optimizations
* Database version-upgrade enhancements
* Allow to change listen address
* Fixed DB-migrations for PIP-based installation

----

Expand Down
2 changes: 1 addition & 1 deletion src/ansibleguy-webui/aw/api_endpoints/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get(cls, request, repository: int = None):
else:
base = str(request.GET['base'])

if base.find('..') != -1:
if base.find('..') != -1 or base.startswith('/'):
return Response(data={'msg': 'Traversal not allowed'}, status=403)

browse_root = browse_root / base
Expand Down
2 changes: 1 addition & 1 deletion src/ansibleguy-webui/aw/static/css/aw.css
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ input:invalid {
overflow-y: scroll;
}
.aw-fs-choice {}
.aw-fs-choice:hover {
.aw-fs-choice:hover, .aw-fs-choice[selected="1"] {
background-color: var(--tableRow2);
}
.aw-fs-choice-file {}
Expand Down
22 changes: 3 additions & 19 deletions src/ansibleguy-webui/aw/static/css/aw_mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
float: none;
}

form .form-control {
width: 35vw;
}

.aw-fs-choices {
form .form-control, .aw-fs-choices {
width: 35vw;
}

Expand Down Expand Up @@ -53,11 +49,7 @@
margin-top: 10px;
}

form .form-control {
width: 50vw;
}

.aw-fs-choices {
form .form-control, .aw-fs-choices {
width: 50vw;
}

Expand Down Expand Up @@ -85,11 +77,7 @@
padding-left: 5vw;
}

.aw-login {
width: 70vw;
}

.aw-login-fields {
form .form-control, .aw-login, .aw-login-fields, .aw-fs-choices {
width: 70vw;
}

Expand All @@ -101,10 +89,6 @@
padding: 1px 1px !important;
}

form .form-control {
width: 70vw;
}

.aw-responsive-lg {
display: none;
}
Expand Down
6 changes: 6 additions & 0 deletions src/ansibleguy-webui/aw/static/js/aw.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const DATA_REFRESH_SEC = 1;
const HTTP_PARAMS = new URLSearchParams(window.location.search);
const TITLE_NULL = 'Does not exist';
const LINK_NULL = 'javascript:void(0);';
const KEY_ENTER = 13;
const KEY_LEFT = 37;
const KEY_UP = 38;
const KEY_RIGHT = 39;
const KEY_DOWN = 40;
const KEY_TAB = 9;

// UTIL FUNCTIONS
function getCookie(name) {
Expand Down
Loading

0 comments on commit 1df76d5

Please # to comment.