|
Lines 796-801
Link Here
|
| 796 |
<label for="notes">Notes:</label> |
796 |
<label for="notes">Notes:</label> |
| 797 |
<textarea name="notes" id="notes"></textarea> |
797 |
<textarea name="notes" id="notes"></textarea> |
| 798 |
</li> |
798 |
</li> |
|
|
799 |
<li> |
| 800 |
<label for="use-autocomplete">Use SQL autocomplete:</label> |
| 801 |
<input id="use-autocomplete" type="checkbox" /> |
| 802 |
</li> |
| 799 |
</ol> |
803 |
</ol> |
| 800 |
</fieldset> |
804 |
</fieldset> |
| 801 |
<fieldset class="action"><input type="hidden" name="phase" value="Save Report" /> |
805 |
<fieldset class="action"><input type="hidden" name="phase" value="Save Report" /> |
|
Lines 1277-1282
Link Here
|
| 1277 |
<label for="notes">Notes:</label> |
1281 |
<label for="notes">Notes:</label> |
| 1278 |
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea> |
1282 |
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea> |
| 1279 |
</li> |
1283 |
</li> |
|
|
1284 |
<li> |
| 1285 |
<label for="use-autocomplete">Use SQL autocomplete:</label> |
| 1286 |
<input id="use-autocomplete" type="checkbox" /> |
| 1287 |
</li> |
| 1280 |
</ol> |
1288 |
</ol> |
| 1281 |
</fieldset> <!-- /.rows --> |
1289 |
</fieldset> <!-- /.rows --> |
| 1282 |
|
1290 |
|
|
Lines 1391-1396
Link Here
|
| 1391 |
<label for="notes">Notes:</label> |
1399 |
<label for="notes">Notes:</label> |
| 1392 |
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea> |
1400 |
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea> |
| 1393 |
</li> |
1401 |
</li> |
|
|
1402 |
<li> |
| 1403 |
<label for="use-autocomplete">Use SQL autocomplete:</label> |
| 1404 |
<input id="use-autocomplete" type="checkbox" /> |
| 1405 |
</li> |
| 1394 |
</ol> |
1406 |
</ol> |
| 1395 |
</fieldset> <!-- /.rows --> |
1407 |
</fieldset> <!-- /.rows --> |
| 1396 |
|
1408 |
|
|
Lines 1576-1581
Link Here
|
| 1576 |
[% END %] |
1588 |
[% END %] |
| 1577 |
|
1589 |
|
| 1578 |
[% IF ( create || editsql || save ) %] |
1590 |
[% IF ( create || editsql || save ) %] |
|
|
1591 |
if ( Cookies.get("use-autocomplete") == "true" ) { |
| 1592 |
$('#use-autocomplete').prop('checked' , true ); |
| 1593 |
} |
| 1594 |
|
| 1595 |
$('#use-autocomplete').on( "change", function(){ |
| 1596 |
Cookies.set("use-autocomplete", $(this).is(':checked'), { expires: 365, sameSite: 'Lax' }); |
| 1597 |
location.reload(true); |
| 1598 |
}); |
| 1579 |
|
1599 |
|
| 1580 |
var editor = CodeMirror.fromTextArea(sql, { |
1600 |
var editor = CodeMirror.fromTextArea(sql, { |
| 1581 |
lineNumbers: true, |
1601 |
lineNumbers: true, |
|
Lines 1645-1657
Link Here
|
| 1645 |
"220": "backslash", |
1665 |
"220": "backslash", |
| 1646 |
"222": "quote" |
1666 |
"222": "quote" |
| 1647 |
} |
1667 |
} |
| 1648 |
//Trigger auto-complete on all keys not in dictionary of exclusions above. |
1668 |
if ( Cookies.get("use-autocomplete") == "true" ) { |
| 1649 |
editor.on("keyup", function(cm, e) { |
1669 |
//Trigger auto-complete on all keys not in dictionary of exclusions above. |
| 1650 |
if (ExcludedTriggerKeys[e.keyCode] == undefined) { |
1670 |
editor.on("keyup", function(cm, e) { |
| 1651 |
CodeMirror.commands.autocomplete(editor, null, { completeSingle: false }); |
1671 |
if (ExcludedTriggerKeys[e.keyCode] == undefined) { |
| 1652 |
} |
1672 |
CodeMirror.commands.autocomplete(editor, null, { completeSingle: false }); |
| 1653 |
}) |
1673 |
} |
| 1654 |
|
1674 |
}); |
|
|
1675 |
} |
| 1655 |
// https://stackoverflow.com/questions/2086287/how-to-clear-jquery-validation-error-messages#answer-16025232 |
1676 |
// https://stackoverflow.com/questions/2086287/how-to-clear-jquery-validation-error-messages#answer-16025232 |
| 1656 |
function clearValidation( formElement ){ |
1677 |
function clearValidation( formElement ){ |
| 1657 |
// formElement should be a jQuery object |
1678 |
// formElement should be a jQuery object |
| 1658 |
- |
|
|