Skip to content

Commit

Permalink
adding back 'save only' option
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark committed Jan 11, 2024
1 parent d5274ad commit 7e98d83
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions explorer/src/js/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ export class ExplorerEditor {
this.$form.append(this.$snapshotField);
}.bind(this));

$("#save_only_button").click(function() {
var params = this.getParams(this);
if(params) {
this.$form.attr('action', '../' + this.queryId + '/?show=0&params=' + this.serializeParams(params));
} else {
this.$form.attr('action', '../' + this.queryId + '/?show=0');
}
this.$snapshotField.hide();
this.$form.append(this.$snapshotField);
}.bind(this));

$("#refresh_button").click(function(e) {
e.preventDefault();
var params = this.getParams();
Expand Down
6 changes: 5 additions & 1 deletion explorer/templates/explorer/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ <h2>
<div class="btn-group" role="group">
{% if can_change %}
<button id="save_button" type="submit"
class="btn btn-primary">
class="btn btn-primary dropdown-toggle"
data-bs-toggle="dropdown" aria-expanded="false">
{% trans 'Save & Run' %}
</button>
<ul class="dropdown-menu" area-labelledby="save_button">
<li><button class="dropdown-item" id="save_only_button">{% trans 'Save Only' %}</button></li>
</ul>
{% export_buttons query %}
<button type="button" class="btn btn-outline-primary" id="show_schema_button">
{% trans "Show Schema" %}
Expand Down

0 comments on commit 7e98d83

Please sign in to comment.