Jacob O'Mara
a3b2f42cc7
This adds auto-complete for the sql reports editor codemirror instance. To prevent a regression in syntax highlighting the overlay mode 'sqlPlaceholders' has been removed and replaced with a highlighting engine that works correctly with the autocomplete engine. Test Plan: 1. Navigate to reports and create a new sql report 2. Write an Sql query and observe that there is no autocomplete options 3. Apply patch 4. Write a new Sql query and observe that there are now auto-complete options that can be navigated through with the arrow keys and accepted with either tab or the enter keys. 5. Ensure that items bounded in << >> or [[ ]] are still syntax highlighted post-patch Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
36 lines
623 B
CSS
36 lines
623 B
CSS
.CodeMirror-hints {
|
|
position: absolute;
|
|
z-index: 10;
|
|
overflow: hidden;
|
|
list-style: none;
|
|
|
|
margin: 0;
|
|
padding: 2px;
|
|
|
|
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
border-radius: 3px;
|
|
border: 1px solid silver;
|
|
|
|
background: white;
|
|
font-size: 90%;
|
|
font-family: monospace;
|
|
|
|
max-height: 20em;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.CodeMirror-hint {
|
|
margin: 0;
|
|
padding: 0 4px;
|
|
border-radius: 2px;
|
|
white-space: pre;
|
|
color: black;
|
|
cursor: pointer;
|
|
}
|
|
|
|
li.CodeMirror-hint-active {
|
|
background: #08f;
|
|
color: white;
|
|
}
|